@nodaro/sdk 2.33.0 → 2.34.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/{chunk-6ECW23GA.js → chunk-4JKI6JRC.js} +2 -2
- package/dist/{chunk-6ECW23GA.js.map → chunk-4JKI6JRC.js.map} +1 -1
- package/dist/{chunk-56NJIP7P.cjs → chunk-5MTCKWKA.cjs} +3 -3
- package/dist/{chunk-56NJIP7P.cjs.map → chunk-5MTCKWKA.cjs.map} +1 -1
- package/dist/{chunk-GKQSA24K.cjs → chunk-CFY6XXOT.cjs} +16 -12
- package/dist/chunk-CFY6XXOT.cjs.map +1 -0
- package/dist/{chunk-JSCC2N7N.js → chunk-CWH642B2.js} +14 -10
- package/dist/chunk-CWH642B2.js.map +1 -0
- package/dist/{chunk-B7RG6AUQ.cjs → chunk-EAGD6NEE.cjs} +2 -2
- package/dist/{chunk-B7RG6AUQ.cjs.map → chunk-EAGD6NEE.cjs.map} +1 -1
- package/dist/chunk-GDXS4EJ5.js +28 -0
- package/dist/chunk-GDXS4EJ5.js.map +1 -0
- package/dist/chunk-GVBSOZDI.cjs +30 -0
- package/dist/chunk-GVBSOZDI.cjs.map +1 -0
- package/dist/chunk-KARJ7P7Y.js +3 -0
- package/dist/chunk-KARJ7P7Y.js.map +1 -0
- package/dist/chunk-RQSGS7ZK.cjs +4 -0
- package/dist/chunk-RQSGS7ZK.cjs.map +1 -0
- package/dist/{chunk-Y5CYFNNW.js → chunk-VFMWBW2Q.js} +3 -3
- package/dist/{chunk-Y5CYFNNW.js.map → chunk-VFMWBW2Q.js.map} +1 -1
- package/dist/entries/cast-swap.cjs +13 -0
- package/dist/entries/cast-swap.cjs.map +1 -0
- package/dist/entries/cast-swap.d.cts +127 -0
- package/dist/entries/cast-swap.d.ts +127 -0
- package/dist/entries/cast-swap.js +4 -0
- package/dist/entries/cast-swap.js.map +1 -0
- package/dist/entries/characters.d.cts +1 -1
- package/dist/entries/characters.d.ts +1 -1
- package/dist/entries/client.cjs +16 -15
- package/dist/entries/client.d.cts +4 -1
- package/dist/entries/client.d.ts +4 -1
- package/dist/entries/client.js +11 -10
- package/dist/entries/core.cjs +5 -5
- package/dist/entries/core.js +1 -1
- package/dist/entries/creatures.d.cts +1 -1
- package/dist/entries/creatures.d.ts +1 -1
- package/dist/entries/locations.d.cts +1 -1
- package/dist/entries/locations.d.ts +1 -1
- package/dist/entries/nodes.cjs +2 -2
- package/dist/entries/nodes.d.cts +1 -1
- package/dist/entries/nodes.d.ts +1 -1
- package/dist/entries/nodes.js +1 -1
- package/dist/entries/objects.d.cts +1 -1
- package/dist/entries/objects.d.ts +1 -1
- package/dist/entries/scene3d.d.cts +2 -2
- package/dist/entries/scene3d.d.ts +2 -2
- package/dist/index.cjs +97 -91
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +18 -16
- package/dist/{nodes-J8ByUN8z.d.cts → nodes-CTujw6Qd.d.cts} +22 -0
- package/dist/{nodes-C-wrO6Sg.d.ts → nodes-D2tbtzt7.d.ts} +22 -0
- package/package.json +6 -1
- package/dist/chunk-GKQSA24K.cjs.map +0 -1
- package/dist/chunk-JSCC2N7N.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/binary-response.ts","../src/core.ts","../src/auth.ts"],"names":[],"mappings":";;;;AACA,eAAsB,kBAAA,CAAmB,UAAoB,QAAA,EAAwC;AACnG,EAAA,MAAM,UAAA,GAAa,QAAA,CAAS,OAAA,CAAQ,GAAA,CAAI,gBAAgB,CAAA;AACxD,EAAA,IAAI,UAAA,KAAe,IAAA,KAAS,CAAC,OAAA,CAAQ,IAAA,CAAK,UAAU,CAAA,IAAK,MAAA,CAAO,UAAU,CAAA,GAAI,QAAA,CAAA,EAAW;AACvF,IAAA,MAAM,QAAA,CAAS,MAAM,MAAA,EAAO;AAC5B,IAAA,MAAM,IAAI,MAAM,iDAAiD,CAAA;AAAA,EACnE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C,KAAK,MAAA,CAAO,OAAA,CAAQ,KAAK,CAAA,EAAG;AAC1C,QAAA,IAAI,CAAA,KAAM,QAAW,CAAA,CAAE,YAAA,CAAa,IAAI,CAAA,EAAG,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,MACtD;AACA,MAAA,OAAO,KAAK,OAAA,GAAU,CAAA,CAAE,UAAS,GAAI,CAAA,CAAE,WAAW,CAAA,CAAE,MAAA;AAAA,IACtD;AACA,IAAA,OAAO,OAAA;AAAA,EACT;AACF;;;ACjUO,IAAM,kBAAN,MAAsC;AAAA,EAC3C,YAAoB,KAAA,EAAe;AAAf,IAAA,IAAA,CAAA,KAAA,GAAA,KAAA;AAAA,EAAgB;AAAA,EAAhB,KAAA;AAAA,EACpB,MAAM,QAAA,GAAW;AACf,IAAA,OAAO,IAAA,CAAK,KAAA;AAAA,EACd;AACF;AAEO,IAAM,eAAN,MAAmC;AAAA,EACxC,YAAoB,EAAA,EAAkD;AAAlD,IAAA,IAAA,CAAA,EAAA,GAAA,EAAA;AAAA,EAAmD;AAAA,EAAnD,EAAA;AAAA,EACpB,MAAM,QAAA,GAAW;AACf,IAAA,OAAO,KAAK,EAAA,EAAG;AAAA,EACjB;AACF;AASO,SAAS,aAAa,QAAA,EAAoC;AAC/D,EAAA,OAAO;AAAA,IACL,MAAM,QAAA,GAAW;AACf,MAAA,MAAM,EAAE,IAAA,EAAK,GAAI,MAAM,QAAA,CAAS,KAAK,UAAA,EAAW;AAChD,MAAA,OAAO,IAAA,CAAK,SAAS,YAAA,IAAgB,IAAA;AAAA,IACvC;AAAA,GACF;AACF","file":"chunk-Y5CYFNNW.js","sourcesContent":["/** Bound decoded response bytes even when Content-Length is absent or compressed. */\nexport async function readBinaryResponse(response: Response, maxBytes: number): Promise<ArrayBuffer> {\n const advertised = response.headers.get(\"content-length\")\n if (advertised !== null && (!/^\\d+$/.test(advertised) || Number(advertised) > maxBytes)) {\n await response.body?.cancel()\n throw new Error(\"Binary response exceeds its declared size limit\")\n }\n if (!response.body) return new ArrayBuffer(0)\n const reader = response.body.getReader()\n const chunks: Uint8Array[] = []\n let length = 0\n try {\n while (true) {\n const next = await reader.read()\n if (next.done) break\n length += next.value.byteLength\n if (length > maxBytes) {\n await reader.cancel()\n throw new Error(\"Binary response exceeds its declared size limit\")\n }\n chunks.push(next.value)\n }\n } finally { reader.releaseLock() }\n const bytes = new Uint8Array(length)\n let offset = 0\n for (const chunk of chunks) { bytes.set(chunk, offset); offset += chunk.byteLength }\n return bytes.buffer\n}\n","/**\n * The client core: configuration, auth, the request transport and the\n * account-identity calls — everything a resource needs, and none of the\n * resources themselves.\n *\n * {@link NodaroClient} (`createClient`) extends it with every resource. An app\n * that uses only a few resources can extend it with just those, so it loads\n * (and its tests depend on) only the resource modules it actually uses:\n *\n * class AppClient extends NodaroClientCore {\n * readonly jobs = new JobsResource(this)\n * readonly nodes = new NodesResource(this) // needs `jobs` on the same client\n * }\n *\n * A resource that calls another one through the client says so in its\n * constructor type (`NodesResource` takes a core that also has `jobs`), so a\n * client missing it fails to compile rather than at run time.\n */\nimport { readBinaryResponse } from \"./binary-response.js\"\nimport { throwFromResponse } from \"./errors.js\"\nimport type { Auth } from \"./auth.js\"\nimport type { DeveloperAppKind, DeveloperAppScope } from \"./resources/developer-apps.js\"\nimport { WORKSPACE_HEADER, type MeOrganizations } from \"@nodaro/shared/organizations\"\n\n/** Replaced at build time by tsup `define` from package.json. The fallback\n * keeps `tsx`/vitest runs of the source working, where no define applies. */\ndeclare const __SDK_VERSION__: string | undefined\nconst SDK_VERSION = typeof __SDK_VERSION__ === \"string\" ? __SDK_VERSION__ : \"0.0.0-dev\"\n\n/**\n * Identifies the calling package to the backend, which records it as the job's\n * provenance (`jobs.source` / `source_detail`) so an operator can tell a CLI\n * run from an SDK integration from a browser session.\n *\n * Only `sdk/…` and `cli/…` are honoured server-side; anything else is ignored\n * rather than trusted, since this is an unauthenticated header.\n */\nexport const CLIENT_HEADER = \"X-Nodaro-Client\"\n\n/**\n * In a browser the header is redundant AND a liability, so it is not sent.\n *\n * Redundant: the browser already sends `Origin`, which names the actual product\n * (`studio.nodaro.ai`) rather than merely the library it used — and the backend\n * deliberately prefers Origin over this header, so a browser-sent value is\n * discarded on arrival.\n *\n * A liability: `X-Nodaro-Client` is not a CORS-safelisted request header, so a\n * browser sending it requires an exact match in the server's\n * `Access-Control-Allow-Headers`. Any deployment whose backend predates that\n * allowlist entry would fail the PREFLIGHT — breaking every API call from the\n * app, not just its provenance. Self-hosted and lagging deployments make that a\n * real risk, and nothing in a browser app would reveal the cause.\n *\n * An EXPLICIT `clientLabel` is always sent regardless: a caller that names\n * itself has opted in deliberately, and that intent outranks this default.\n */\nconst isBrowser = (): boolean => typeof window !== \"undefined\" && typeof window.document !== \"undefined\"\n\nexport interface ClientOptions {\n /** Backend base URL, e.g. \"https://nodaro.example.com\" or empty string for same-origin. */\n baseUrl: string\n /** Auth provider. Use StaticTokenAuth, supabaseAuth, or CallbackAuth. */\n auth: Auth\n /** Optional fetch override (for tests or custom transports). */\n fetch?: typeof fetch\n /** Default request timeout in ms. Default 60s. */\n timeoutMs?: number\n /**\n * Overrides the `X-Nodaro-Client` label. Defaults to `sdk/<version>`.\n *\n * Exists for `@nodaro/cli`, which is a wrapper AROUND this SDK: without an\n * override every CLI invocation would be recorded as an SDK call and the two\n * surfaces could never be told apart.\n */\n clientLabel?: string\n /**\n * The workspace every request acts in — sent as `X-Nodaro-Workspace`.\n *\n * It selects which workspace a LIST reads from and where a CREATE lands.\n * It never authorizes: reading, updating, deleting or running an\n * identified object is decided by that object's own workspace, so a\n * forgotten header cannot hide work and a forged one cannot reach anyone\n * else's. Omit it to work in the caller's personal space.\n *\n * Prefer {@link NodaroClient.withWorkspace} for anything short-lived — one\n * client per workspace, no shared mutable selection to get wrong.\n */\n workspaceId?: string\n}\n\ninterface RequestOptions {\n body?: unknown\n query?: Record<string, string | number | boolean | undefined>\n headers?: Record<string, string>\n signal?: AbortSignal\n}\n\n/**\n * The authenticated user's canonical identity (`GET /v1/me`). A token-\n * introspection primitive: any valid bearer token (first-party Supabase JWT or\n * a developer-app OAuth token) resolves to its owner's identity. Mirrors the\n * `profiles` identity columns server-side — the route is the source of truth.\n */\nexport interface UserIdentity {\n /** Nodaro user id (= the Supabase auth user id). */\n readonly id: string\n readonly email: string\n /** Human-readable display name (from `profiles.full_name`); `null` if unset. */\n readonly displayName: string | null\n /** Avatar URL; `null` if unset. */\n readonly avatarUrl: string | null\n /** Subscription tier (e.g. \"free\", \"pro\"). */\n readonly tier: string\n /**\n * Whether the user holds an admin role. DESCRIPTIVE only — use it to decide\n * whether to render admin surfaces without capability-probing an admin\n * endpoint; every admin API stays enforced server-side regardless.\n */\n readonly isAdmin: boolean\n}\n\n/**\n * An app the user let into their account through OAuth (`GET\n * /v1/me/connected-apps`): a developer app, an AI assistant's MCP connector, or\n * a self-hosted install. One entry per grant still in force.\n */\nexport interface ConnectedApp {\n /** The grant's id — what {@link NodaroClient.revokeConnectedApp} takes. */\n readonly authorizationId: string\n /** The app's name; `null` if it has none. A `dynamic_mcp` client chose its own. */\n readonly name: string | null\n /**\n * How the app came to exist: `user` (a developer app someone registered),\n * `first_party_mcp`, `dynamic_mcp` (an MCP client that registered itself) or\n * `community_instance` (a self-hosted install).\n */\n readonly kind: DeveloperAppKind | (string & {})\n readonly homepageUrl: string | null\n /** The scopes this grant holds. */\n readonly scopes: readonly DeveloperAppScope[]\n /** When the user granted access (ISO 8601). */\n readonly connectedAt: string\n /** The latest use of any token issued under the grant; `null` if never used. */\n readonly lastUsedAt: string | null\n}\n\nexport class NodaroClientCore {\n readonly baseUrl: string\n readonly auth: Auth\n readonly timeoutMs: number\n /** Value sent as `X-Nodaro-Client`; recorded by the backend as job provenance. */\n readonly clientLabel: string\n /** Whether to actually send it — see the note on {@link CLIENT_HEADER}. */\n private readonly sendClientHeader: boolean\n private readonly fetchOverride: typeof fetch | undefined\n\n /**\n * Resolved lazily so consumers can swap `globalThis.fetch` after the\n * client has been constructed (e.g. test mocks). Always rebound to the\n * global object — native fetch throws \"Illegal invocation\" when its\n * `this` is anything else.\n */\n get fetch(): typeof fetch {\n return this.fetchOverride ?? globalThis.fetch.bind(globalThis)\n }\n\n /** The workspace this client acts in; undefined = the personal space. */\n readonly workspaceId: string | undefined\n\n constructor(opts: ClientOptions) {\n this.baseUrl = opts.baseUrl.replace(/\\/$/, \"\") // strip trailing slash\n this.auth = opts.auth\n this.fetchOverride = opts.fetch\n this.timeoutMs = opts.timeoutMs ?? 60_000\n this.clientLabel = opts.clientLabel ?? `sdk/${SDK_VERSION}`\n this.workspaceId = opts.workspaceId\n // Explicit label = deliberate opt-in, always sent. The default is suppressed\n // in browsers — see the note on CLIENT_HEADER.\n this.sendClientHeader = opts.clientLabel !== undefined || !isBrowser()\n }\n\n /**\n * The transport: build the request, send it, throw the typed error on a\n * non-2xx via {@link throwFromResponse}, then read the body via `read` — all\n * inside the abort timer, so `timeoutMs` bounds the body download too (a\n * stalled CSV stream aborts, it does not hang forever). Both the JSON path\n * ({@link request}) and the text path ({@link requestText}) go through here.\n */\n private async send<T>(\n method: string,\n path: string,\n options: RequestOptions,\n read: (res: Response) => Promise<T>,\n ): Promise<T> {\n const url = this.buildUrl(path, options.query)\n\n const token = await this.auth.getToken()\n // A `FormData` body is a multipart upload: let the runtime set\n // `Content-Type: multipart/form-data; boundary=…` itself (a manual JSON\n // content-type corrupts the boundary), and send the body as-is rather than\n // JSON-stringifying it. Every other body stays JSON, exactly as before.\n const isFormData =\n typeof FormData !== \"undefined\" && options.body instanceof FormData\n const headers: Record<string, string> = {\n ...(isFormData ? {} : { \"Content-Type\": \"application/json\" }),\n ...(this.sendClientHeader ? { [CLIENT_HEADER]: this.clientLabel } : {}),\n // Before per-request headers: a resource that needs to reach outside\n // this client's workspace says so explicitly and wins.\n ...(this.workspaceId ? { [WORKSPACE_HEADER]: this.workspaceId } : {}),\n ...(options.headers ?? {}),\n }\n if (token) headers[\"Authorization\"] = `Bearer ${token}`\n\n const ac = new AbortController()\n const timeoutId = setTimeout(() => ac.abort(), this.timeoutMs)\n const abort = () => ac.abort(options.signal?.reason)\n options.signal?.addEventListener(\"abort\", abort, { once: true })\n if (options.signal?.aborted) abort()\n\n try {\n ac.signal.throwIfAborted()\n const res = await this.fetch(url, {\n method,\n headers,\n body:\n options.body === undefined\n ? undefined\n : isFormData\n ? (options.body as FormData)\n : JSON.stringify(options.body),\n signal: ac.signal,\n })\n\n if (!res.ok) {\n let errBody: Record<string, unknown> = {}\n try {\n errBody = await res.json() as Record<string, unknown>\n } catch {\n // Empty/non-JSON body — fall through with empty errBody\n }\n throwFromResponse(res.status, errBody)\n }\n\n return await read(res)\n } finally {\n clearTimeout(timeoutId)\n options.signal?.removeEventListener(\"abort\", abort)\n }\n }\n\n /** Authenticated, bounded binary reads through the normal timeout/error transport. */\n async requestBytes(method: string, path: string, options: RequestOptions & { maxBytes: number }): Promise<ArrayBuffer> {\n if (!Number.isSafeInteger(options.maxBytes) || options.maxBytes < 1) throw new Error(\"maxBytes must be a positive integer\")\n return this.send(method, path, options, (response) => readBinaryResponse(response, options.maxBytes))\n }\n\n async request<T>(method: string, path: string, options: RequestOptions = {}): Promise<T> {\n return this.send(method, path, options, async (res) =>\n // 204 No Content\n res.status === 204 ? (undefined as T) : ((await res.json()) as T),\n )\n }\n\n /**\n * Like {@link request}, for endpoints that answer text (CSV exports). Errors\n * are still the JSON envelope and throw the same typed errors, and the read is\n * bounded by the same timeout as the request.\n */\n async requestText(method: string, path: string, options: RequestOptions = {}): Promise<string> {\n return this.send(method, path, options, (res) => res.text())\n }\n\n /**\n * `GET /v1/me` → the authenticated user's identity (see {@link UserIdentity}).\n * Unwraps the `{ data }` envelope. Throws `UnauthorizedError` (401) when the\n * token is missing/invalid, and the SDK's other typed errors as usual.\n *\n * On an instance with organizations it also carries what the caller belongs\n * to. THREE states, and collapsing them is wrong in a way users feel: the\n * organization fields ABSENT means this instance has no organizations at\n * all; present and empty means the account belongs to none; and\n * `organizationsUnavailable` means the lookup failed — keep whatever\n * selection you already had rather than concluding the person was removed\n * from everything.\n */\n async me(): Promise<UserIdentity & MeOrganizations> {\n const res = await this.request<{ data: UserIdentity & MeOrganizations }>(\"GET\", \"/v1/me\")\n return res.data\n }\n\n /**\n * `GET /v1/me/connected-apps` → every app with access to the signed-in\n * user's account (see {@link ConnectedApp}), newest grant first.\n *\n * **A signed-in browser session only.** The route answers a Supabase\n * session token (`supabaseAuth(…)`, `createSharedSupabaseClient`, or a\n * `StaticTokenAuth` holding one) and refuses every other credential with\n * `UnauthorizedError` (\"Sign in required\"): an app token or an API key must\n * not list the grants it lives under. Build your \"Connected apps\" settings\n * screen on this; a server-side integration cannot call it.\n */\n async connectedApps(): Promise<ConnectedApp[]> {\n const res = await this.request<{ apps: ConnectedApp[] }>(\"GET\", \"/v1/me/connected-apps\")\n return res.apps\n }\n\n /**\n * `POST /v1/me/connected-apps/:authorizationId/revoke` — ends an app's\n * access: the grant and every token issued under it, at once (the app's next\n * call is a 401). Resolves when done.\n *\n * A signed-in browser session only, like {@link connectedApps}. Throws\n * `NotFoundError` when the grant is not the user's or is already revoked.\n */\n async revokeConnectedApp(authorizationId: string): Promise<void> {\n await this.request(\"POST\", `/v1/me/connected-apps/${encodeURIComponent(authorizationId)}/revoke`)\n }\n\n private buildUrl(path: string, query?: Record<string, string | number | boolean | undefined>): string {\n const base = this.baseUrl || (typeof window !== \"undefined\" ? window.location.origin : \"http://placeholder\")\n const url = new URL(path, base)\n // If baseUrl was empty, strip the placeholder origin\n const fullUrl = this.baseUrl ? url.toString() : url.pathname + url.search\n if (query) {\n const u = new URL(this.baseUrl ? fullUrl : fullUrl, base)\n for (const [k, v] of Object.entries(query)) {\n if (v !== undefined) u.searchParams.set(k, String(v))\n }\n return this.baseUrl ? u.toString() : u.pathname + u.search\n }\n return fullUrl\n }\n}\n","/**\n * Auth provides the token used for `Authorization: Bearer <token>` on each request.\n * Implementations:\n * - StaticTokenAuth — fixed string (server-side, OAuth access token, API token)\n * - CallbackAuth — caller-supplied async function (BYO logic)\n * - supabaseAuth — pulls JWT from a Supabase client live (browser frontends)\n */\nexport interface Auth {\n /** Returns the current Bearer token, or null if not authenticated. */\n getToken(): Promise<string | null>\n}\n\nexport class StaticTokenAuth implements Auth {\n constructor(private token: string) {}\n async getToken() {\n return this.token\n }\n}\n\nexport class CallbackAuth implements Auth {\n constructor(private fn: () => string | null | Promise<string | null>) {}\n async getToken() {\n return this.fn()\n }\n}\n\ninterface SupabaseLikeClient {\n auth: {\n getSession(): Promise<{ data: { session: { access_token: string } | null } }>\n }\n}\n\n/** Pulls a JWT from a Supabase v2 client. Caller supplies their own supabase. */\nexport function supabaseAuth(supabase: SupabaseLikeClient): Auth {\n return {\n async getToken() {\n const { data } = await supabase.auth.getSession()\n return data.session?.access_token ?? null\n },\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/binary-response.ts","../src/core.ts","../src/auth.ts"],"names":[],"mappings":";;;;AACA,eAAsB,kBAAA,CAAmB,UAAoB,QAAA,EAAwC;AACnG,EAAA,MAAM,UAAA,GAAa,QAAA,CAAS,OAAA,CAAQ,GAAA,CAAI,gBAAgB,CAAA;AACxD,EAAA,IAAI,UAAA,KAAe,IAAA,KAAS,CAAC,OAAA,CAAQ,IAAA,CAAK,UAAU,CAAA,IAAK,MAAA,CAAO,UAAU,CAAA,GAAI,QAAA,CAAA,EAAW;AACvF,IAAA,MAAM,QAAA,CAAS,MAAM,MAAA,EAAO;AAC5B,IAAA,MAAM,IAAI,MAAM,iDAAiD,CAAA;AAAA,EACnE;AACA,EAAA,IAAI,CAAC,QAAA,CAAS,IAAA,EAAM,OAAO,IAAI,YAAY,CAAC,CAAA;AAC5C,EAAA,MAAM,MAAA,GAAS,QAAA,CAAS,IAAA,CAAK,SAAA,EAAU;AACvC,EAAA,MAAM,SAAuB,EAAC;AAC9B,EAAA,IAAI,MAAA,GAAS,CAAA;AACb,EAAA,IAAI;AACF,IAAA,OAAO,IAAA,EAAM;AACX,MA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;AAAA,IACtD;AACA,IAAA,OAAO,OAAA;AAAA,EACT;AACF;;;ACjUO,IAAM,kBAAN,MAAsC;AAAA,EAC3C,YAAoB,KAAA,EAAe;AAAf,IAAA,IAAA,CAAA,KAAA,GAAA,KAAA;AAAA,EAAgB;AAAA,EAAhB,KAAA;AAAA,EACpB,MAAM,QAAA,GAAW;AACf,IAAA,OAAO,IAAA,CAAK,KAAA;AAAA,EACd;AACF;AAEO,IAAM,eAAN,MAAmC;AAAA,EACxC,YAAoB,EAAA,EAAkD;AAAlD,IAAA,IAAA,CAAA,EAAA,GAAA,EAAA;AAAA,EAAmD;AAAA,EAAnD,EAAA;AAAA,EACpB,MAAM,QAAA,GAAW;AACf,IAAA,OAAO,KAAK,EAAA,EAAG;AAAA,EACjB;AACF;AASO,SAAS,aAAa,QAAA,EAAoC;AAC/D,EAAA,OAAO;AAAA,IACL,MAAM,QAAA,GAAW;AACf,MAAA,MAAM,EAAE,IAAA,EAAK,GAAI,MAAM,QAAA,CAAS,KAAK,UAAA,EAAW;AAChD,MAAA,OAAO,IAAA,CAAK,SAAS,YAAA,IAAgB,IAAA;AAAA,IACvC;AAAA,GACF;AACF","file":"chunk-VFMWBW2Q.js","sourcesContent":["/** Bound decoded response bytes even when Content-Length is absent or compressed. */\nexport async function readBinaryResponse(response: Response, maxBytes: number): Promise<ArrayBuffer> {\n const advertised = response.headers.get(\"content-length\")\n if (advertised !== null && (!/^\\d+$/.test(advertised) || Number(advertised) > maxBytes)) {\n await response.body?.cancel()\n throw new Error(\"Binary response exceeds its declared size limit\")\n }\n if (!response.body) return new ArrayBuffer(0)\n const reader = response.body.getReader()\n const chunks: Uint8Array[] = []\n let length = 0\n try {\n while (true) {\n const next = await reader.read()\n if (next.done) break\n length += next.value.byteLength\n if (length > maxBytes) {\n await reader.cancel()\n throw new Error(\"Binary response exceeds its declared size limit\")\n }\n chunks.push(next.value)\n }\n } finally { reader.releaseLock() }\n const bytes = new Uint8Array(length)\n let offset = 0\n for (const chunk of chunks) { bytes.set(chunk, offset); offset += chunk.byteLength }\n return bytes.buffer\n}\n","/**\n * The client core: configuration, auth, the request transport and the\n * account-identity calls — everything a resource needs, and none of the\n * resources themselves.\n *\n * {@link NodaroClient} (`createClient`) extends it with every resource. An app\n * that uses only a few resources can extend it with just those, so it loads\n * (and its tests depend on) only the resource modules it actually uses:\n *\n * class AppClient extends NodaroClientCore {\n * readonly jobs = new JobsResource(this)\n * readonly nodes = new NodesResource(this) // needs `jobs` on the same client\n * }\n *\n * A resource that calls another one through the client says so in its\n * constructor type (`NodesResource` takes a core that also has `jobs`), so a\n * client missing it fails to compile rather than at run time.\n */\nimport { readBinaryResponse } from \"./binary-response.js\"\nimport { throwFromResponse } from \"./errors.js\"\nimport type { Auth } from \"./auth.js\"\nimport type { DeveloperAppKind, DeveloperAppScope } from \"./resources/developer-apps.js\"\nimport { WORKSPACE_HEADER, type MeOrganizations } from \"@nodaro/shared/organizations\"\n\n/** Replaced at build time by tsup `define` from package.json. The fallback\n * keeps `tsx`/vitest runs of the source working, where no define applies. */\ndeclare const __SDK_VERSION__: string | undefined\nconst SDK_VERSION = typeof __SDK_VERSION__ === \"string\" ? __SDK_VERSION__ : \"0.0.0-dev\"\n\n/**\n * Identifies the calling package to the backend, which records it as the job's\n * provenance (`jobs.source` / `source_detail`) so an operator can tell a CLI\n * run from an SDK integration from a browser session.\n *\n * Only `sdk/…` and `cli/…` are honoured server-side; anything else is ignored\n * rather than trusted, since this is an unauthenticated header.\n */\nexport const CLIENT_HEADER = \"X-Nodaro-Client\"\n\n/**\n * In a browser the header is redundant AND a liability, so it is not sent.\n *\n * Redundant: the browser already sends `Origin`, which names the actual product\n * (`studio.nodaro.ai`) rather than merely the library it used — and the backend\n * deliberately prefers Origin over this header, so a browser-sent value is\n * discarded on arrival.\n *\n * A liability: `X-Nodaro-Client` is not a CORS-safelisted request header, so a\n * browser sending it requires an exact match in the server's\n * `Access-Control-Allow-Headers`. Any deployment whose backend predates that\n * allowlist entry would fail the PREFLIGHT — breaking every API call from the\n * app, not just its provenance. Self-hosted and lagging deployments make that a\n * real risk, and nothing in a browser app would reveal the cause.\n *\n * An EXPLICIT `clientLabel` is always sent regardless: a caller that names\n * itself has opted in deliberately, and that intent outranks this default.\n */\nconst isBrowser = (): boolean => typeof window !== \"undefined\" && typeof window.document !== \"undefined\"\n\nexport interface ClientOptions {\n /** Backend base URL, e.g. \"https://nodaro.example.com\" or empty string for same-origin. */\n baseUrl: string\n /** Auth provider. Use StaticTokenAuth, supabaseAuth, or CallbackAuth. */\n auth: Auth\n /** Optional fetch override (for tests or custom transports). */\n fetch?: typeof fetch\n /** Default request timeout in ms. Default 60s. */\n timeoutMs?: number\n /**\n * Overrides the `X-Nodaro-Client` label. Defaults to `sdk/<version>`.\n *\n * Exists for `@nodaro/cli`, which is a wrapper AROUND this SDK: without an\n * override every CLI invocation would be recorded as an SDK call and the two\n * surfaces could never be told apart.\n */\n clientLabel?: string\n /**\n * The workspace every request acts in — sent as `X-Nodaro-Workspace`.\n *\n * It selects which workspace a LIST reads from and where a CREATE lands.\n * It never authorizes: reading, updating, deleting or running an\n * identified object is decided by that object's own workspace, so a\n * forgotten header cannot hide work and a forged one cannot reach anyone\n * else's. Omit it to work in the caller's personal space.\n *\n * Prefer {@link NodaroClient.withWorkspace} for anything short-lived — one\n * client per workspace, no shared mutable selection to get wrong.\n */\n workspaceId?: string\n}\n\ninterface RequestOptions {\n body?: unknown\n query?: Record<string, string | number | boolean | undefined>\n headers?: Record<string, string>\n signal?: AbortSignal\n}\n\n/**\n * The authenticated user's canonical identity (`GET /v1/me`). A token-\n * introspection primitive: any valid bearer token (first-party Supabase JWT or\n * a developer-app OAuth token) resolves to its owner's identity. Mirrors the\n * `profiles` identity columns server-side — the route is the source of truth.\n */\nexport interface UserIdentity {\n /** Nodaro user id (= the Supabase auth user id). */\n readonly id: string\n readonly email: string\n /** Human-readable display name (from `profiles.full_name`); `null` if unset. */\n readonly displayName: string | null\n /** Avatar URL; `null` if unset. */\n readonly avatarUrl: string | null\n /** Subscription tier (e.g. \"free\", \"pro\"). */\n readonly tier: string\n /**\n * Whether the user holds an admin role. DESCRIPTIVE only — use it to decide\n * whether to render admin surfaces without capability-probing an admin\n * endpoint; every admin API stays enforced server-side regardless.\n */\n readonly isAdmin: boolean\n}\n\n/**\n * An app the user let into their account through OAuth (`GET\n * /v1/me/connected-apps`): a developer app, an AI assistant's MCP connector, or\n * a self-hosted install. One entry per grant still in force.\n */\nexport interface ConnectedApp {\n /** The grant's id — what {@link NodaroClient.revokeConnectedApp} takes. */\n readonly authorizationId: string\n /** The app's name; `null` if it has none. A `dynamic_mcp` client chose its own. */\n readonly name: string | null\n /**\n * How the app came to exist: `user` (a developer app someone registered),\n * `first_party_mcp`, `dynamic_mcp` (an MCP client that registered itself) or\n * `community_instance` (a self-hosted install).\n */\n readonly kind: DeveloperAppKind | (string & {})\n readonly homepageUrl: string | null\n /** The scopes this grant holds. */\n readonly scopes: readonly DeveloperAppScope[]\n /** When the user granted access (ISO 8601). */\n readonly connectedAt: string\n /** The latest use of any token issued under the grant; `null` if never used. */\n readonly lastUsedAt: string | null\n}\n\nexport class NodaroClientCore {\n readonly baseUrl: string\n readonly auth: Auth\n readonly timeoutMs: number\n /** Value sent as `X-Nodaro-Client`; recorded by the backend as job provenance. */\n readonly clientLabel: string\n /** Whether to actually send it — see the note on {@link CLIENT_HEADER}. */\n private readonly sendClientHeader: boolean\n private readonly fetchOverride: typeof fetch | undefined\n\n /**\n * Resolved lazily so consumers can swap `globalThis.fetch` after the\n * client has been constructed (e.g. test mocks). Always rebound to the\n * global object — native fetch throws \"Illegal invocation\" when its\n * `this` is anything else.\n */\n get fetch(): typeof fetch {\n return this.fetchOverride ?? globalThis.fetch.bind(globalThis)\n }\n\n /** The workspace this client acts in; undefined = the personal space. */\n readonly workspaceId: string | undefined\n\n constructor(opts: ClientOptions) {\n this.baseUrl = opts.baseUrl.replace(/\\/$/, \"\") // strip trailing slash\n this.auth = opts.auth\n this.fetchOverride = opts.fetch\n this.timeoutMs = opts.timeoutMs ?? 60_000\n this.clientLabel = opts.clientLabel ?? `sdk/${SDK_VERSION}`\n this.workspaceId = opts.workspaceId\n // Explicit label = deliberate opt-in, always sent. The default is suppressed\n // in browsers — see the note on CLIENT_HEADER.\n this.sendClientHeader = opts.clientLabel !== undefined || !isBrowser()\n }\n\n /**\n * The transport: build the request, send it, throw the typed error on a\n * non-2xx via {@link throwFromResponse}, then read the body via `read` — all\n * inside the abort timer, so `timeoutMs` bounds the body download too (a\n * stalled CSV stream aborts, it does not hang forever). Both the JSON path\n * ({@link request}) and the text path ({@link requestText}) go through here.\n */\n private async send<T>(\n method: string,\n path: string,\n options: RequestOptions,\n read: (res: Response) => Promise<T>,\n ): Promise<T> {\n const url = this.buildUrl(path, options.query)\n\n const token = await this.auth.getToken()\n // A `FormData` body is a multipart upload: let the runtime set\n // `Content-Type: multipart/form-data; boundary=…` itself (a manual JSON\n // content-type corrupts the boundary), and send the body as-is rather than\n // JSON-stringifying it. Every other body stays JSON, exactly as before.\n const isFormData =\n typeof FormData !== \"undefined\" && options.body instanceof FormData\n const headers: Record<string, string> = {\n ...(isFormData ? {} : { \"Content-Type\": \"application/json\" }),\n ...(this.sendClientHeader ? { [CLIENT_HEADER]: this.clientLabel } : {}),\n // Before per-request headers: a resource that needs to reach outside\n // this client's workspace says so explicitly and wins.\n ...(this.workspaceId ? { [WORKSPACE_HEADER]: this.workspaceId } : {}),\n ...(options.headers ?? {}),\n }\n if (token) headers[\"Authorization\"] = `Bearer ${token}`\n\n const ac = new AbortController()\n const timeoutId = setTimeout(() => ac.abort(), this.timeoutMs)\n const abort = () => ac.abort(options.signal?.reason)\n options.signal?.addEventListener(\"abort\", abort, { once: true })\n if (options.signal?.aborted) abort()\n\n try {\n ac.signal.throwIfAborted()\n const res = await this.fetch(url, {\n method,\n headers,\n body:\n options.body === undefined\n ? undefined\n : isFormData\n ? (options.body as FormData)\n : JSON.stringify(options.body),\n signal: ac.signal,\n })\n\n if (!res.ok) {\n let errBody: Record<string, unknown> = {}\n try {\n errBody = await res.json() as Record<string, unknown>\n } catch {\n // Empty/non-JSON body — fall through with empty errBody\n }\n throwFromResponse(res.status, errBody)\n }\n\n return await read(res)\n } finally {\n clearTimeout(timeoutId)\n options.signal?.removeEventListener(\"abort\", abort)\n }\n }\n\n /** Authenticated, bounded binary reads through the normal timeout/error transport. */\n async requestBytes(method: string, path: string, options: RequestOptions & { maxBytes: number }): Promise<ArrayBuffer> {\n if (!Number.isSafeInteger(options.maxBytes) || options.maxBytes < 1) throw new Error(\"maxBytes must be a positive integer\")\n return this.send(method, path, options, (response) => readBinaryResponse(response, options.maxBytes))\n }\n\n async request<T>(method: string, path: string, options: RequestOptions = {}): Promise<T> {\n return this.send(method, path, options, async (res) =>\n // 204 No Content\n res.status === 204 ? (undefined as T) : ((await res.json()) as T),\n )\n }\n\n /**\n * Like {@link request}, for endpoints that answer text (CSV exports). Errors\n * are still the JSON envelope and throw the same typed errors, and the read is\n * bounded by the same timeout as the request.\n */\n async requestText(method: string, path: string, options: RequestOptions = {}): Promise<string> {\n return this.send(method, path, options, (res) => res.text())\n }\n\n /**\n * `GET /v1/me` → the authenticated user's identity (see {@link UserIdentity}).\n * Unwraps the `{ data }` envelope. Throws `UnauthorizedError` (401) when the\n * token is missing/invalid, and the SDK's other typed errors as usual.\n *\n * On an instance with organizations it also carries what the caller belongs\n * to. THREE states, and collapsing them is wrong in a way users feel: the\n * organization fields ABSENT means this instance has no organizations at\n * all; present and empty means the account belongs to none; and\n * `organizationsUnavailable` means the lookup failed — keep whatever\n * selection you already had rather than concluding the person was removed\n * from everything.\n */\n async me(): Promise<UserIdentity & MeOrganizations> {\n const res = await this.request<{ data: UserIdentity & MeOrganizations }>(\"GET\", \"/v1/me\")\n return res.data\n }\n\n /**\n * `GET /v1/me/connected-apps` → every app with access to the signed-in\n * user's account (see {@link ConnectedApp}), newest grant first.\n *\n * **A signed-in browser session only.** The route answers a Supabase\n * session token (`supabaseAuth(…)`, `createSharedSupabaseClient`, or a\n * `StaticTokenAuth` holding one) and refuses every other credential with\n * `UnauthorizedError` (\"Sign in required\"): an app token or an API key must\n * not list the grants it lives under. Build your \"Connected apps\" settings\n * screen on this; a server-side integration cannot call it.\n */\n async connectedApps(): Promise<ConnectedApp[]> {\n const res = await this.request<{ apps: ConnectedApp[] }>(\"GET\", \"/v1/me/connected-apps\")\n return res.apps\n }\n\n /**\n * `POST /v1/me/connected-apps/:authorizationId/revoke` — ends an app's\n * access: the grant and every token issued under it, at once (the app's next\n * call is a 401). Resolves when done.\n *\n * A signed-in browser session only, like {@link connectedApps}. Throws\n * `NotFoundError` when the grant is not the user's or is already revoked.\n */\n async revokeConnectedApp(authorizationId: string): Promise<void> {\n await this.request(\"POST\", `/v1/me/connected-apps/${encodeURIComponent(authorizationId)}/revoke`)\n }\n\n private buildUrl(path: string, query?: Record<string, string | number | boolean | undefined>): string {\n const base = this.baseUrl || (typeof window !== \"undefined\" ? window.location.origin : \"http://placeholder\")\n const url = new URL(path, base)\n // If baseUrl was empty, strip the placeholder origin\n const fullUrl = this.baseUrl ? url.toString() : url.pathname + url.search\n if (query) {\n const u = new URL(this.baseUrl ? fullUrl : fullUrl, base)\n for (const [k, v] of Object.entries(query)) {\n if (v !== undefined) u.searchParams.set(k, String(v))\n }\n return this.baseUrl ? u.toString() : u.pathname + u.search\n }\n return fullUrl\n }\n}\n","/**\n * Auth provides the token used for `Authorization: Bearer <token>` on each request.\n * Implementations:\n * - StaticTokenAuth — fixed string (server-side, OAuth access token, API token)\n * - CallbackAuth — caller-supplied async function (BYO logic)\n * - supabaseAuth — pulls JWT from a Supabase client live (browser frontends)\n */\nexport interface Auth {\n /** Returns the current Bearer token, or null if not authenticated. */\n getToken(): Promise<string | null>\n}\n\nexport class StaticTokenAuth implements Auth {\n constructor(private token: string) {}\n async getToken() {\n return this.token\n }\n}\n\nexport class CallbackAuth implements Auth {\n constructor(private fn: () => string | null | Promise<string | null>) {}\n async getToken() {\n return this.fn()\n }\n}\n\ninterface SupabaseLikeClient {\n auth: {\n getSession(): Promise<{ data: { session: { access_token: string } | null } }>\n }\n}\n\n/** Pulls a JWT from a Supabase v2 client. Caller supplies their own supabase. */\nexport function supabaseAuth(supabase: SupabaseLikeClient): Auth {\n return {\n async getToken() {\n const { data } = await supabase.auth.getSession()\n return data.session?.access_token ?? null\n },\n }\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('../chunk-RQSGS7ZK.cjs');
|
|
4
|
+
var chunkGVBSOZDI_cjs = require('../chunk-GVBSOZDI.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "CastSwapResource", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkGVBSOZDI_cjs.CastSwapResource; }
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=cast-swap.cjs.map
|
|
13
|
+
//# sourceMappingURL=cast-swap.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"cast-swap.cjs"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { N as NodaroClientCore } from '../developer-apps-zSQXWmEG.cjs';
|
|
2
|
+
import '@nodaro/shared/apps';
|
|
3
|
+
import '@nodaro/shared/organizations';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Cast Swap — replace the people and/or the location in a short video with
|
|
7
|
+
* your own references, keeping its motion, framing, timing and sound.
|
|
8
|
+
*
|
|
9
|
+
* Cloud edition only: `/v1/cast-swap` is served by the cloud plugin and 404s
|
|
10
|
+
* on self-hosted installs. `run()` answers 202 with a job id; follow it with
|
|
11
|
+
* `client.jobs.get(jobId)` / `client.jobs.getStatus(jobId)` like any other job.
|
|
12
|
+
*
|
|
13
|
+
* Repeats: pass `{ idempotencyKey }` to `run()` and it is sent as the
|
|
14
|
+
* `Idempotency-Key` header. A repeat with the same key within the credit
|
|
15
|
+
* guard's dedup window (about 10 s) answers 200 `{ jobId, deduped: true }` with
|
|
16
|
+
* an `X-Dedup-Hit` header; a later one answers 202 with the first run's
|
|
17
|
+
* `jobId`. Nothing new is started or charged.
|
|
18
|
+
*
|
|
19
|
+
* Refusals (thrown as a `NodaroError` subclass; body `{ error: { code, message } }`), before
|
|
20
|
+
* anything is charged: 400 `validation_error` (the body; also a `postPrompt`
|
|
21
|
+
* over 4,000 characters), `raw_reference_token`, `invalid_role_mention`,
|
|
22
|
+
* `unsafe_url`, `video_unreadable`, `clip_out_of_range` (4–30 s),
|
|
23
|
+
* `preview_out_of_range`; 401; 402 `insufficient_credits` (`run()` only); 404
|
|
24
|
+
* (a `sessionId` you may not use, `run()` only); 422 `job_blocked` (`run()`
|
|
25
|
+
* only); 503 `host_too_old` (both); 503 `estimate_unavailable` (`estimate()`
|
|
26
|
+
* only).
|
|
27
|
+
*/
|
|
28
|
+
/** Whether a swapped person takes this trait from the references (`"new"`) or keeps the video's (`"original"`). */
|
|
29
|
+
type CastSwapTraitSource = "new" | "original";
|
|
30
|
+
/** A person in the video to recast. */
|
|
31
|
+
interface CastSwapPersonRole {
|
|
32
|
+
kind: "person";
|
|
33
|
+
/** How the person is told apart in the video, e.g. `"the woman that attacks"`. */
|
|
34
|
+
name: string;
|
|
35
|
+
/** 0–3 images of ONE person. Empty or `null` keeps the original person. */
|
|
36
|
+
images: string[] | null;
|
|
37
|
+
/** Body from the references or the video. Default `"new"`. */
|
|
38
|
+
body?: CastSwapTraitSource;
|
|
39
|
+
/** Outfit from the references or the video. Default `"new"`. */
|
|
40
|
+
outfit?: CastSwapTraitSource;
|
|
41
|
+
/** Hairstyle and haircut from the references or the video. Default `"new"`. */
|
|
42
|
+
hair?: CastSwapTraitSource;
|
|
43
|
+
}
|
|
44
|
+
/** The place the video happens in. */
|
|
45
|
+
interface CastSwapLocationRole {
|
|
46
|
+
kind: "location";
|
|
47
|
+
/** How the place is named. Default `"the setting"`. */
|
|
48
|
+
name?: string;
|
|
49
|
+
/** 0–3 images of ONE place. Empty or `null` keeps the original place. */
|
|
50
|
+
images: string[] | null;
|
|
51
|
+
}
|
|
52
|
+
type CastSwapRole = CastSwapPersonRole | CastSwapLocationRole;
|
|
53
|
+
/** The body of `POST /v1/cast-swap` and `POST /v1/cast-swap/estimate`. */
|
|
54
|
+
interface CastSwapParams {
|
|
55
|
+
/** The source clip, 4–30 seconds. */
|
|
56
|
+
videoUrl: string;
|
|
57
|
+
/**
|
|
58
|
+
* Who and what to swap: at most 6 person roles and at most 1 location role.
|
|
59
|
+
* A role with no images is skipped (that person or place stays as in the
|
|
60
|
+
* video). At least one role with images, or a `postPrompt`, is required.
|
|
61
|
+
*/
|
|
62
|
+
roles: CastSwapRole[];
|
|
63
|
+
/**
|
|
64
|
+
* Extra instructions in your own words, at most 4,000 characters. Mention a
|
|
65
|
+
* role as `{role:N}`, where N is its 1-based position in `roles`
|
|
66
|
+
* (`{role:1}` is `roles[0]`; empty roles count).
|
|
67
|
+
*
|
|
68
|
+
* The route answers 400, before charging, for an N outside 1..`roles.length`,
|
|
69
|
+
* for a raw `{image:` / `{video:` / `{audio:` token in the post prompt or a
|
|
70
|
+
* role's `name`, for a clip outside 4–30 s, and for a preview past the clip's
|
|
71
|
+
* end (`previewStart + 4` > its length).
|
|
72
|
+
*/
|
|
73
|
+
postPrompt?: string;
|
|
74
|
+
/** `true` runs on 4 seconds of the clip, starting at `previewStart`: a cheap check of the roles and choices. */
|
|
75
|
+
preview?: boolean;
|
|
76
|
+
/** Where the preview starts, in seconds. Default 0. */
|
|
77
|
+
previewStart?: number;
|
|
78
|
+
/** Default `"draft"`, the only value accepted today. */
|
|
79
|
+
quality?: "draft";
|
|
80
|
+
/** A generation session to file the result in. */
|
|
81
|
+
sessionId?: string;
|
|
82
|
+
/** The client app that sent the run (stored on the job as `input_data.origin`). */
|
|
83
|
+
origin?: string;
|
|
84
|
+
}
|
|
85
|
+
/** What a run would cost, in credits. */
|
|
86
|
+
interface CastSwapEstimate {
|
|
87
|
+
/** The quote in credits: `breakdown.castSwap + breakdown.seedance`. */
|
|
88
|
+
totalCredits: number;
|
|
89
|
+
/** `castSwap`: the run itself; `seedance`: the video model it calls. */
|
|
90
|
+
breakdown: {
|
|
91
|
+
castSwap: number;
|
|
92
|
+
seedance: number;
|
|
93
|
+
};
|
|
94
|
+
/** `true` when the video is made at Auto length: the final charge is expected to come out lower than this quote. */
|
|
95
|
+
settlesLower: boolean;
|
|
96
|
+
}
|
|
97
|
+
/** Per-call options for {@link CastSwapResource.run}. */
|
|
98
|
+
interface CastSwapRunOptions {
|
|
99
|
+
/**
|
|
100
|
+
* Sent as the `Idempotency-Key` header, unchanged (the SDK checks nothing;
|
|
101
|
+
* an empty string sends no header, like no key).
|
|
102
|
+
* The server takes 8–200 characters and answers 400 for any other length.
|
|
103
|
+
* Reuse the same value when retrying the same run: within about 10 s the
|
|
104
|
+
* repeat answers 200 `{ jobId, deduped: true }`, later 202 with the first
|
|
105
|
+
* run's `jobId`. Nothing new is started or charged.
|
|
106
|
+
*/
|
|
107
|
+
idempotencyKey?: string;
|
|
108
|
+
}
|
|
109
|
+
declare class CastSwapResource {
|
|
110
|
+
private client;
|
|
111
|
+
constructor(client: NodaroClientCore);
|
|
112
|
+
/**
|
|
113
|
+
* Start a Cast Swap run (`POST /v1/cast-swap`, 202 `{ jobId }`). Returns the
|
|
114
|
+
* job to follow. With `options.idempotencyKey` (sent as the
|
|
115
|
+
* `Idempotency-Key` header; 8–200 characters, else 400) a repeat with the
|
|
116
|
+
* same key within about 10 s answers 200 `{ jobId, deduped: true }`, a later
|
|
117
|
+
* one 202 with the first run's `jobId`; nothing new starts.
|
|
118
|
+
*/
|
|
119
|
+
run(params: CastSwapParams, options?: CastSwapRunOptions): Promise<{
|
|
120
|
+
jobId: string;
|
|
121
|
+
deduped?: boolean;
|
|
122
|
+
}>;
|
|
123
|
+
/** Quote a run before starting it (`POST /v1/cast-swap/estimate`); spends nothing. */
|
|
124
|
+
estimate(params: CastSwapParams): Promise<CastSwapEstimate>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { type CastSwapEstimate, type CastSwapLocationRole, type CastSwapParams, type CastSwapPersonRole, CastSwapResource, type CastSwapRole, type CastSwapRunOptions, type CastSwapTraitSource };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { N as NodaroClientCore } from '../developer-apps-zSQXWmEG.js';
|
|
2
|
+
import '@nodaro/shared/apps';
|
|
3
|
+
import '@nodaro/shared/organizations';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Cast Swap — replace the people and/or the location in a short video with
|
|
7
|
+
* your own references, keeping its motion, framing, timing and sound.
|
|
8
|
+
*
|
|
9
|
+
* Cloud edition only: `/v1/cast-swap` is served by the cloud plugin and 404s
|
|
10
|
+
* on self-hosted installs. `run()` answers 202 with a job id; follow it with
|
|
11
|
+
* `client.jobs.get(jobId)` / `client.jobs.getStatus(jobId)` like any other job.
|
|
12
|
+
*
|
|
13
|
+
* Repeats: pass `{ idempotencyKey }` to `run()` and it is sent as the
|
|
14
|
+
* `Idempotency-Key` header. A repeat with the same key within the credit
|
|
15
|
+
* guard's dedup window (about 10 s) answers 200 `{ jobId, deduped: true }` with
|
|
16
|
+
* an `X-Dedup-Hit` header; a later one answers 202 with the first run's
|
|
17
|
+
* `jobId`. Nothing new is started or charged.
|
|
18
|
+
*
|
|
19
|
+
* Refusals (thrown as a `NodaroError` subclass; body `{ error: { code, message } }`), before
|
|
20
|
+
* anything is charged: 400 `validation_error` (the body; also a `postPrompt`
|
|
21
|
+
* over 4,000 characters), `raw_reference_token`, `invalid_role_mention`,
|
|
22
|
+
* `unsafe_url`, `video_unreadable`, `clip_out_of_range` (4–30 s),
|
|
23
|
+
* `preview_out_of_range`; 401; 402 `insufficient_credits` (`run()` only); 404
|
|
24
|
+
* (a `sessionId` you may not use, `run()` only); 422 `job_blocked` (`run()`
|
|
25
|
+
* only); 503 `host_too_old` (both); 503 `estimate_unavailable` (`estimate()`
|
|
26
|
+
* only).
|
|
27
|
+
*/
|
|
28
|
+
/** Whether a swapped person takes this trait from the references (`"new"`) or keeps the video's (`"original"`). */
|
|
29
|
+
type CastSwapTraitSource = "new" | "original";
|
|
30
|
+
/** A person in the video to recast. */
|
|
31
|
+
interface CastSwapPersonRole {
|
|
32
|
+
kind: "person";
|
|
33
|
+
/** How the person is told apart in the video, e.g. `"the woman that attacks"`. */
|
|
34
|
+
name: string;
|
|
35
|
+
/** 0–3 images of ONE person. Empty or `null` keeps the original person. */
|
|
36
|
+
images: string[] | null;
|
|
37
|
+
/** Body from the references or the video. Default `"new"`. */
|
|
38
|
+
body?: CastSwapTraitSource;
|
|
39
|
+
/** Outfit from the references or the video. Default `"new"`. */
|
|
40
|
+
outfit?: CastSwapTraitSource;
|
|
41
|
+
/** Hairstyle and haircut from the references or the video. Default `"new"`. */
|
|
42
|
+
hair?: CastSwapTraitSource;
|
|
43
|
+
}
|
|
44
|
+
/** The place the video happens in. */
|
|
45
|
+
interface CastSwapLocationRole {
|
|
46
|
+
kind: "location";
|
|
47
|
+
/** How the place is named. Default `"the setting"`. */
|
|
48
|
+
name?: string;
|
|
49
|
+
/** 0–3 images of ONE place. Empty or `null` keeps the original place. */
|
|
50
|
+
images: string[] | null;
|
|
51
|
+
}
|
|
52
|
+
type CastSwapRole = CastSwapPersonRole | CastSwapLocationRole;
|
|
53
|
+
/** The body of `POST /v1/cast-swap` and `POST /v1/cast-swap/estimate`. */
|
|
54
|
+
interface CastSwapParams {
|
|
55
|
+
/** The source clip, 4–30 seconds. */
|
|
56
|
+
videoUrl: string;
|
|
57
|
+
/**
|
|
58
|
+
* Who and what to swap: at most 6 person roles and at most 1 location role.
|
|
59
|
+
* A role with no images is skipped (that person or place stays as in the
|
|
60
|
+
* video). At least one role with images, or a `postPrompt`, is required.
|
|
61
|
+
*/
|
|
62
|
+
roles: CastSwapRole[];
|
|
63
|
+
/**
|
|
64
|
+
* Extra instructions in your own words, at most 4,000 characters. Mention a
|
|
65
|
+
* role as `{role:N}`, where N is its 1-based position in `roles`
|
|
66
|
+
* (`{role:1}` is `roles[0]`; empty roles count).
|
|
67
|
+
*
|
|
68
|
+
* The route answers 400, before charging, for an N outside 1..`roles.length`,
|
|
69
|
+
* for a raw `{image:` / `{video:` / `{audio:` token in the post prompt or a
|
|
70
|
+
* role's `name`, for a clip outside 4–30 s, and for a preview past the clip's
|
|
71
|
+
* end (`previewStart + 4` > its length).
|
|
72
|
+
*/
|
|
73
|
+
postPrompt?: string;
|
|
74
|
+
/** `true` runs on 4 seconds of the clip, starting at `previewStart`: a cheap check of the roles and choices. */
|
|
75
|
+
preview?: boolean;
|
|
76
|
+
/** Where the preview starts, in seconds. Default 0. */
|
|
77
|
+
previewStart?: number;
|
|
78
|
+
/** Default `"draft"`, the only value accepted today. */
|
|
79
|
+
quality?: "draft";
|
|
80
|
+
/** A generation session to file the result in. */
|
|
81
|
+
sessionId?: string;
|
|
82
|
+
/** The client app that sent the run (stored on the job as `input_data.origin`). */
|
|
83
|
+
origin?: string;
|
|
84
|
+
}
|
|
85
|
+
/** What a run would cost, in credits. */
|
|
86
|
+
interface CastSwapEstimate {
|
|
87
|
+
/** The quote in credits: `breakdown.castSwap + breakdown.seedance`. */
|
|
88
|
+
totalCredits: number;
|
|
89
|
+
/** `castSwap`: the run itself; `seedance`: the video model it calls. */
|
|
90
|
+
breakdown: {
|
|
91
|
+
castSwap: number;
|
|
92
|
+
seedance: number;
|
|
93
|
+
};
|
|
94
|
+
/** `true` when the video is made at Auto length: the final charge is expected to come out lower than this quote. */
|
|
95
|
+
settlesLower: boolean;
|
|
96
|
+
}
|
|
97
|
+
/** Per-call options for {@link CastSwapResource.run}. */
|
|
98
|
+
interface CastSwapRunOptions {
|
|
99
|
+
/**
|
|
100
|
+
* Sent as the `Idempotency-Key` header, unchanged (the SDK checks nothing;
|
|
101
|
+
* an empty string sends no header, like no key).
|
|
102
|
+
* The server takes 8–200 characters and answers 400 for any other length.
|
|
103
|
+
* Reuse the same value when retrying the same run: within about 10 s the
|
|
104
|
+
* repeat answers 200 `{ jobId, deduped: true }`, later 202 with the first
|
|
105
|
+
* run's `jobId`. Nothing new is started or charged.
|
|
106
|
+
*/
|
|
107
|
+
idempotencyKey?: string;
|
|
108
|
+
}
|
|
109
|
+
declare class CastSwapResource {
|
|
110
|
+
private client;
|
|
111
|
+
constructor(client: NodaroClientCore);
|
|
112
|
+
/**
|
|
113
|
+
* Start a Cast Swap run (`POST /v1/cast-swap`, 202 `{ jobId }`). Returns the
|
|
114
|
+
* job to follow. With `options.idempotencyKey` (sent as the
|
|
115
|
+
* `Idempotency-Key` header; 8–200 characters, else 400) a repeat with the
|
|
116
|
+
* same key within about 10 s answers 200 `{ jobId, deduped: true }`, a later
|
|
117
|
+
* one 202 with the first run's `jobId`; nothing new starts.
|
|
118
|
+
*/
|
|
119
|
+
run(params: CastSwapParams, options?: CastSwapRunOptions): Promise<{
|
|
120
|
+
jobId: string;
|
|
121
|
+
deduped?: boolean;
|
|
122
|
+
}>;
|
|
123
|
+
/** Quote a run before starting it (`POST /v1/cast-swap/estimate`); spends nothing. */
|
|
124
|
+
estimate(params: CastSwapParams): Promise<CastSwapEstimate>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { type CastSwapEstimate, type CastSwapLocationRole, type CastSwapParams, type CastSwapPersonRole, CastSwapResource, type CastSwapRole, type CastSwapRunOptions, type CastSwapTraitSource };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"cast-swap.js"}
|
|
@@ -4,7 +4,7 @@ import { EntityStyle, CharacterAspectRatio, CharacterAttachColumn } from '@nodar
|
|
|
4
4
|
export { CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, CharacterAspectRatio, EntityStyle } from '@nodaro/shared/entities';
|
|
5
5
|
import { TtsProvider } from '@nodaro/shared/models';
|
|
6
6
|
import { N as NodaroClientCore } from '../developer-apps-zSQXWmEG.cjs';
|
|
7
|
-
import { l as GenerationSessionParams } from '../nodes-
|
|
7
|
+
import { l as GenerationSessionParams } from '../nodes-CTujw6Qd.cjs';
|
|
8
8
|
import '@nodaro/shared/apps';
|
|
9
9
|
import '@nodaro/shared/organizations';
|
|
10
10
|
import '@nodaro/shared/types';
|
|
@@ -4,7 +4,7 @@ import { EntityStyle, CharacterAspectRatio, CharacterAttachColumn } from '@nodar
|
|
|
4
4
|
export { CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, CharacterAspectRatio, EntityStyle } from '@nodaro/shared/entities';
|
|
5
5
|
import { TtsProvider } from '@nodaro/shared/models';
|
|
6
6
|
import { N as NodaroClientCore } from '../developer-apps-zSQXWmEG.js';
|
|
7
|
-
import { l as GenerationSessionParams } from '../nodes-
|
|
7
|
+
import { l as GenerationSessionParams } from '../nodes-D2tbtzt7.js';
|
|
8
8
|
import '@nodaro/shared/apps';
|
|
9
9
|
import '@nodaro/shared/organizations';
|
|
10
10
|
import '@nodaro/shared/types';
|
package/dist/entries/client.cjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCFY6XXOT_cjs = require('../chunk-CFY6XXOT.cjs');
|
|
4
|
+
require('../chunk-R63TTR35.cjs');
|
|
4
5
|
require('../chunk-3B47IHB3.cjs');
|
|
5
6
|
require('../chunk-VGWOIWRQ.cjs');
|
|
6
7
|
require('../chunk-LKH5M44B.cjs');
|
|
8
|
+
require('../chunk-YDRXBRW2.cjs');
|
|
7
9
|
require('../chunk-PEMLIAPZ.cjs');
|
|
8
10
|
require('../chunk-MBFUMWI5.cjs');
|
|
9
11
|
require('../chunk-U4T3Z3K7.cjs');
|
|
@@ -11,7 +13,7 @@ require('../chunk-5ALNFATQ.cjs');
|
|
|
11
13
|
require('../chunk-BRV7Z4GD.cjs');
|
|
12
14
|
require('../chunk-ZQQABQMH.cjs');
|
|
13
15
|
require('../chunk-W5VHATSR.cjs');
|
|
14
|
-
require('../chunk-
|
|
16
|
+
require('../chunk-NBVARNVA.cjs');
|
|
15
17
|
require('../chunk-OSX2GVZ2.cjs');
|
|
16
18
|
require('../chunk-COCKKMNP.cjs');
|
|
17
19
|
require('../chunk-LAWYFC4G.cjs');
|
|
@@ -19,60 +21,59 @@ require('../chunk-KGKCAGRD.cjs');
|
|
|
19
21
|
require('../chunk-KXEWTYS4.cjs');
|
|
20
22
|
require('../chunk-GB6C5OEZ.cjs');
|
|
21
23
|
require('../chunk-SYVNY3AH.cjs');
|
|
22
|
-
require('../chunk-
|
|
24
|
+
require('../chunk-OXQKE5EG.cjs');
|
|
23
25
|
require('../chunk-7QOCWJKD.cjs');
|
|
24
26
|
require('../chunk-ZCWKX4V6.cjs');
|
|
25
27
|
require('../chunk-34PU2DAT.cjs');
|
|
26
|
-
require('../chunk-
|
|
28
|
+
require('../chunk-EAGD6NEE.cjs');
|
|
27
29
|
require('../chunk-GVIFLUYZ.cjs');
|
|
28
30
|
require('../chunk-CR5E2SF3.cjs');
|
|
29
31
|
require('../chunk-J5LGGCAS.cjs');
|
|
30
|
-
require('../chunk-
|
|
32
|
+
require('../chunk-RHJRLXKY.cjs');
|
|
31
33
|
require('../chunk-SBV5MWEL.cjs');
|
|
32
34
|
require('../chunk-WUKIJJG2.cjs');
|
|
33
35
|
require('../chunk-3QBH2VE2.cjs');
|
|
34
36
|
require('../chunk-2DZWWIJ4.cjs');
|
|
35
37
|
require('../chunk-SS3B6PHT.cjs');
|
|
36
38
|
require('../chunk-MQ74AKA2.cjs');
|
|
37
|
-
require('../chunk-
|
|
39
|
+
require('../chunk-WK4VXPPZ.cjs');
|
|
38
40
|
require('../chunk-43FVH6LJ.cjs');
|
|
39
41
|
require('../chunk-YFS2LMG4.cjs');
|
|
40
42
|
require('../chunk-NLQQHJ25.cjs');
|
|
41
43
|
require('../chunk-KNMW722T.cjs');
|
|
42
|
-
var
|
|
44
|
+
var chunk5MTCKWKA_cjs = require('../chunk-5MTCKWKA.cjs');
|
|
45
|
+
require('../chunk-N6GLZOE4.cjs');
|
|
43
46
|
require('../chunk-HGCVWOGK.cjs');
|
|
44
47
|
require('../chunk-GB724HW2.cjs');
|
|
45
48
|
require('../chunk-A3S55XGF.cjs');
|
|
46
|
-
require('../chunk-RHJRLXKY.cjs');
|
|
47
|
-
require('../chunk-N6GLZOE4.cjs');
|
|
48
49
|
require('../chunk-DKEYSJCE.cjs');
|
|
49
50
|
require('../chunk-GA4LZZKQ.cjs');
|
|
50
51
|
require('../chunk-NGKODS3J.cjs');
|
|
52
|
+
require('../chunk-GVBSOZDI.cjs');
|
|
51
53
|
require('../chunk-BPWUWUZ3.cjs');
|
|
52
54
|
require('../chunk-HAKYPZLB.cjs');
|
|
53
|
-
require('../chunk-WK4VXPPZ.cjs');
|
|
54
55
|
|
|
55
56
|
|
|
56
57
|
|
|
57
58
|
Object.defineProperty(exports, "NodaroClient", {
|
|
58
59
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkCFY6XXOT_cjs.NodaroClient; }
|
|
60
61
|
});
|
|
61
62
|
Object.defineProperty(exports, "createClient", {
|
|
62
63
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkCFY6XXOT_cjs.createClient; }
|
|
64
65
|
});
|
|
65
66
|
Object.defineProperty(exports, "CallbackAuth", {
|
|
66
67
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunk5MTCKWKA_cjs.CallbackAuth; }
|
|
68
69
|
});
|
|
69
70
|
Object.defineProperty(exports, "StaticTokenAuth", {
|
|
70
71
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunk5MTCKWKA_cjs.StaticTokenAuth; }
|
|
72
73
|
});
|
|
73
74
|
Object.defineProperty(exports, "supabaseAuth", {
|
|
74
75
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunk5MTCKWKA_cjs.supabaseAuth; }
|
|
76
77
|
});
|
|
77
78
|
//# sourceMappingURL=client.cjs.map
|
|
78
79
|
//# sourceMappingURL=client.cjs.map
|
|
@@ -4,7 +4,7 @@ import { SessionsResource } from './sessions.cjs';
|
|
|
4
4
|
import { JobsResource } from './jobs.cjs';
|
|
5
5
|
import { VideoProResource } from './video-pro.cjs';
|
|
6
6
|
import { ExecutionsResource } from './executions.cjs';
|
|
7
|
-
import { t as NodesResource } from '../nodes-
|
|
7
|
+
import { t as NodesResource } from '../nodes-CTujw6Qd.cjs';
|
|
8
8
|
import { Scene3DResource } from './scene3d.cjs';
|
|
9
9
|
import { N as NodaroClientCore, h as DeveloperAppsResource, a as ClientOptions } from '../developer-apps-zSQXWmEG.cjs';
|
|
10
10
|
export { A as Auth, C as CallbackAuth, b as ConnectedApp, S as StaticTokenAuth, i as UserIdentity, s as supabaseAuth } from '../developer-apps-zSQXWmEG.cjs';
|
|
@@ -38,6 +38,7 @@ import { CatalogsResource } from './catalogs.cjs';
|
|
|
38
38
|
import { ModelsResource } from './models.cjs';
|
|
39
39
|
import { ShotsResource } from './shots.cjs';
|
|
40
40
|
import { RecastResource } from './recast.cjs';
|
|
41
|
+
import { CastSwapResource } from './cast-swap.cjs';
|
|
41
42
|
import { StudioResource } from './studio.cjs';
|
|
42
43
|
import { CopilotResource } from './copilot.cjs';
|
|
43
44
|
import { CommunityResource } from './community.cjs';
|
|
@@ -119,6 +120,8 @@ declare class NodaroClient extends NodaroClientCore {
|
|
|
119
120
|
readonly models: ModelsResource;
|
|
120
121
|
readonly shots: ShotsResource;
|
|
121
122
|
readonly recast: RecastResource;
|
|
123
|
+
/** Cast Swap: replace the people and/or location in a short video (Cloud). */
|
|
124
|
+
readonly castSwap: CastSwapResource;
|
|
122
125
|
readonly studio: StudioResource;
|
|
123
126
|
readonly copilot: CopilotResource;
|
|
124
127
|
readonly community: CommunityResource;
|
package/dist/entries/client.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { SessionsResource } from './sessions.js';
|
|
|
4
4
|
import { JobsResource } from './jobs.js';
|
|
5
5
|
import { VideoProResource } from './video-pro.js';
|
|
6
6
|
import { ExecutionsResource } from './executions.js';
|
|
7
|
-
import { t as NodesResource } from '../nodes-
|
|
7
|
+
import { t as NodesResource } from '../nodes-D2tbtzt7.js';
|
|
8
8
|
import { Scene3DResource } from './scene3d.js';
|
|
9
9
|
import { N as NodaroClientCore, h as DeveloperAppsResource, a as ClientOptions } from '../developer-apps-zSQXWmEG.js';
|
|
10
10
|
export { A as Auth, C as CallbackAuth, b as ConnectedApp, S as StaticTokenAuth, i as UserIdentity, s as supabaseAuth } from '../developer-apps-zSQXWmEG.js';
|
|
@@ -38,6 +38,7 @@ import { CatalogsResource } from './catalogs.js';
|
|
|
38
38
|
import { ModelsResource } from './models.js';
|
|
39
39
|
import { ShotsResource } from './shots.js';
|
|
40
40
|
import { RecastResource } from './recast.js';
|
|
41
|
+
import { CastSwapResource } from './cast-swap.js';
|
|
41
42
|
import { StudioResource } from './studio.js';
|
|
42
43
|
import { CopilotResource } from './copilot.js';
|
|
43
44
|
import { CommunityResource } from './community.js';
|
|
@@ -119,6 +120,8 @@ declare class NodaroClient extends NodaroClientCore {
|
|
|
119
120
|
readonly models: ModelsResource;
|
|
120
121
|
readonly shots: ShotsResource;
|
|
121
122
|
readonly recast: RecastResource;
|
|
123
|
+
/** Cast Swap: replace the people and/or location in a short video (Cloud). */
|
|
124
|
+
readonly castSwap: CastSwapResource;
|
|
122
125
|
readonly studio: StudioResource;
|
|
123
126
|
readonly copilot: CopilotResource;
|
|
124
127
|
readonly community: CommunityResource;
|
package/dist/entries/client.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export { NodaroClient, createClient } from '../chunk-
|
|
1
|
+
export { NodaroClient, createClient } from '../chunk-CWH642B2.js';
|
|
2
|
+
import '../chunk-T7N7DFQJ.js';
|
|
2
3
|
import '../chunk-YN6CBIIB.js';
|
|
3
4
|
import '../chunk-ZXJQSFIA.js';
|
|
4
5
|
import '../chunk-Z5GLY4R3.js';
|
|
6
|
+
import '../chunk-NNHWH7ER.js';
|
|
5
7
|
import '../chunk-Y6VDCZPB.js';
|
|
6
8
|
import '../chunk-WVFAQBS7.js';
|
|
7
9
|
import '../chunk-VV4TZG5S.js';
|
|
@@ -9,7 +11,7 @@ import '../chunk-6OGGJQVA.js';
|
|
|
9
11
|
import '../chunk-DPSMVOM3.js';
|
|
10
12
|
import '../chunk-T3SYREY4.js';
|
|
11
13
|
import '../chunk-ERLXU47J.js';
|
|
12
|
-
import '../chunk-
|
|
14
|
+
import '../chunk-WEQWU2IC.js';
|
|
13
15
|
import '../chunk-BLA44UCM.js';
|
|
14
16
|
import '../chunk-K4RQOSJH.js';
|
|
15
17
|
import '../chunk-H7VQTG4M.js';
|
|
@@ -17,37 +19,36 @@ import '../chunk-E2ZXHS6E.js';
|
|
|
17
19
|
import '../chunk-AJVSMNPZ.js';
|
|
18
20
|
import '../chunk-IHKIYVZQ.js';
|
|
19
21
|
import '../chunk-NCCBS6GU.js';
|
|
20
|
-
import '../chunk-
|
|
22
|
+
import '../chunk-4NLVBYMW.js';
|
|
21
23
|
import '../chunk-Y6V6CBY5.js';
|
|
22
24
|
import '../chunk-YVU2M7MI.js';
|
|
23
25
|
import '../chunk-JTAW54UM.js';
|
|
24
|
-
import '../chunk-
|
|
26
|
+
import '../chunk-4JKI6JRC.js';
|
|
25
27
|
import '../chunk-Z7LGWNI7.js';
|
|
26
28
|
import '../chunk-7LSFG2AF.js';
|
|
27
29
|
import '../chunk-ALSLZG3U.js';
|
|
28
|
-
import '../chunk-
|
|
30
|
+
import '../chunk-5A7J24LN.js';
|
|
29
31
|
import '../chunk-Z3ZKFI2M.js';
|
|
30
32
|
import '../chunk-JDEZHITT.js';
|
|
31
33
|
import '../chunk-E5BM4BLO.js';
|
|
32
34
|
import '../chunk-P6E4QDJN.js';
|
|
33
35
|
import '../chunk-E37CVHWW.js';
|
|
34
36
|
import '../chunk-TVENC6PH.js';
|
|
35
|
-
import '../chunk-
|
|
37
|
+
import '../chunk-4WRDR4GN.js';
|
|
36
38
|
import '../chunk-SFB4YLCS.js';
|
|
37
39
|
import '../chunk-BU5A6K4C.js';
|
|
38
40
|
import '../chunk-I6CXC345.js';
|
|
39
41
|
import '../chunk-JMOKD6ZP.js';
|
|
40
|
-
export { CallbackAuth, StaticTokenAuth, supabaseAuth } from '../chunk-
|
|
42
|
+
export { CallbackAuth, StaticTokenAuth, supabaseAuth } from '../chunk-VFMWBW2Q.js';
|
|
43
|
+
import '../chunk-JGS6YBDW.js';
|
|
41
44
|
import '../chunk-CK3AMMSC.js';
|
|
42
45
|
import '../chunk-4CXB7RA6.js';
|
|
43
46
|
import '../chunk-65E3JBFZ.js';
|
|
44
|
-
import '../chunk-5A7J24LN.js';
|
|
45
|
-
import '../chunk-JGS6YBDW.js';
|
|
46
47
|
import '../chunk-53SXNN3A.js';
|
|
47
48
|
import '../chunk-3QFTP5P5.js';
|
|
48
49
|
import '../chunk-J4WFSKY6.js';
|
|
50
|
+
import '../chunk-GDXS4EJ5.js';
|
|
49
51
|
import '../chunk-KG4R454Z.js';
|
|
50
52
|
import '../chunk-EJSGJDZY.js';
|
|
51
|
-
import '../chunk-4WRDR4GN.js';
|
|
52
53
|
//# sourceMappingURL=client.js.map
|
|
53
54
|
//# sourceMappingURL=client.js.map
|