@nodaro/sdk 1.17.0 → 1.20.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/index.cjs +377 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +631 -9
- package/dist/index.d.ts +631 -9
- package/dist/index.js +373 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GenericNode, GenericEdge, WorkflowExport, ConnectedReference, TtsProvider, EntityStyle, CharacterAspectRatio, CharacterAttachColumn, LocationAssetType, LocationAttachColumn, SurroundDirection, ObjectAssetType, ObjectAttachColumn, ObjectAspectRatio, CreatureAttachColumn, PipelineInput, PipelineStatus, PipelineMode, PipelineStageName, SubGateName, ChatEnabledStage, ProposedChange, ReduceStrategyId, ReduceMeta, Voice, VoiceLibraryParams, VoiceLibraryResponse, VoiceClone, AudioFxPreset, BrowseCommunityParams, BrowseCommunityResult, CommunityCard, CommunityFullDetail, CommunityEntityType, CloneListingResult, FavoriteListingResult, CommunityReportReason, ReportListingResult, PublishListingParams, PublishListingResult, SharedListing } from '@nodaro/shared';
|
|
2
|
-
export { AudioFxPreset, BrowseCommunityParams, BrowseCommunityResult, CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ATTACH_COLUMNS, CharacterAspectRatio, CloneListingResult, CommunityCard, CommunityEntityType, CommunityReportReason, CommunitySort, ConnectedReference, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn, EntityStyle, FavoriteListingResult, GenericEdge, GenericNode, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationAssetType, LocationAttachColumn, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn, PipelineStageName, PublishListingParams, PublishListingResult, ReduceMeta, ReduceStrategyId, ReportListingResult, SURROUND_DIRECTIONS, SharedListing, SharedVoice, SurroundDirection, Voice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse, WorkflowExport, WorkflowExportCharacter, WorkflowExportLocation, WorkflowExportObject } from '@nodaro/shared';
|
|
1
|
+
import { CollaboratorRole, GenericNode, GenericEdge, WorkflowExport, WorkflowImportReport, WorkflowVisibility, ConnectedReference, TtsProvider, EntityStyle, CharacterAspectRatio, CharacterAttachColumn, LocationAssetType, LocationAttachColumn, SurroundDirection, ObjectAssetType, ObjectAttachColumn, ObjectAspectRatio, CreatureAttachColumn, PipelineInput, PipelineStatus, PipelineMode, PipelineStageName, SubGateName, ChatEnabledStage, ProposedChange, ReduceStrategyId, ReduceMeta, Voice, VoiceLibraryParams, VoiceLibraryResponse, VoiceClone, AudioFxPreset, BrowseCommunityParams, BrowseCommunityResult, CommunityCard, CommunityFullDetail, CommunityEntityType, CloneListingResult, FavoriteListingResult, CommunityReportReason, ReportListingResult, PublishListingParams, PublishListingResult, SharedListing, OrganizationView, OrgKind, OrgSettings, OrgPage, OrgMemberView, MemberStatus, WorkspaceRole, InvitationDelivery, InvitationState, InvitationView, InvitationPreview, OrgAuditEntry, WorkspaceSummary, WorkspaceView, WorkspaceSettings, WorkspaceMemberView, JoinCodeView, MeOrganizations } from '@nodaro/shared';
|
|
2
|
+
export { AudioFxPreset, BrowseCommunityParams, BrowseCommunityResult, CHARACTER_ASPECT_DEFAULTS, CHARACTER_ASPECT_OPTIONS, CHARACTER_STYLES, OBJECT_ASPECT_DEFAULTS as CREATURE_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS as CREATURE_ASPECT_OPTIONS, CREATURE_ATTACH_COLUMNS, CharacterAspectRatio, CloneListingResult, CommunityCard, CommunityEntityType, CommunityReportReason, CommunitySort, ConnectedReference, ObjectAspectRatio as CreatureAspectRatio, CreatureAttachColumn, EntityStyle, FavoriteListingResult, GenericEdge, GenericNode, InvitationDelivery, InvitationPreview, InvitationState, InvitationView, JoinCodeView, LOCATION_ASSET_TYPES, LOCATION_ATTACH_COLUMNS, LocationAssetType, LocationAttachColumn, MeOrganizations, MemberStatus, OBJECT_ASPECT_DEFAULTS, OBJECT_ASPECT_OPTIONS, OBJECT_ASSET_TYPES, OBJECT_ATTACH_COLUMNS, ObjectAspectRatio, ObjectAssetType, ObjectAttachColumn, OrgAuditEntry, OrgErrorCode, OrgKind, OrgMemberView, OrgPage, OrgRole, OrgSettings, OrgStatus, OrganizationSummary, OrganizationView, PipelineStageName, PublishListingParams, PublishListingResult, ReduceMeta, ReduceStrategyId, ReportListingResult, SURROUND_DIRECTIONS, SharedListing, SharedVoice, SurroundDirection, Voice, VoiceClone, VoiceLibraryParams, VoiceLibraryResponse, WORKSPACE_HEADER, WorkflowExport, WorkflowExportCharacter, WorkflowExportLocation, WorkflowExportObject, WorkspaceMemberView, WorkspaceRole, WorkspaceSettings, WorkspaceSummary, WorkspaceView } from '@nodaro/shared';
|
|
3
3
|
import { PersonValue, WizardNodeContext, WizardQuestion, WizardSelection, RecommendedModel, FactoryPreset } from '@nodaro/prompts';
|
|
4
4
|
export { PEOPLE, PERSON_DIMENSION_LABELS, PERSON_DIMENSION_ORDER, PersonValue, RecommendedModel, WizardNodeContext, WizardOption, WizardQuestion, WizardSelection, buildPersonHints } from '@nodaro/prompts';
|
|
5
5
|
|
|
@@ -109,8 +109,68 @@ interface RunWorkflowResult {
|
|
|
109
109
|
executionId: string;
|
|
110
110
|
status: "pending" | "running";
|
|
111
111
|
}
|
|
112
|
+
/** A person granted access to a workflow. Email is never returned (privacy). */
|
|
113
|
+
interface Collaborator {
|
|
114
|
+
userId: string;
|
|
115
|
+
name?: string | null;
|
|
116
|
+
avatar?: string | null;
|
|
117
|
+
role: CollaboratorRole;
|
|
118
|
+
}
|
|
119
|
+
interface AddCollaboratorInput {
|
|
120
|
+
/** Provide exactly one of `userId` or `email`. */
|
|
121
|
+
userId?: string;
|
|
122
|
+
email?: string;
|
|
123
|
+
role: CollaboratorRole;
|
|
124
|
+
}
|
|
125
|
+
/** A workflow someone else shared with you, plus the role you hold on it. */
|
|
126
|
+
interface SharedWorkflow extends Workflow {
|
|
127
|
+
grantedRole: CollaboratorRole;
|
|
128
|
+
}
|
|
129
|
+
/** A grant dropped because a move took the workflow out of the workspace the
|
|
130
|
+
* access came from. */
|
|
131
|
+
interface DroppedCollaborator {
|
|
132
|
+
userId: string;
|
|
133
|
+
name: string | null;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The people a workflow is shared with — reached as `client.workflows.collaborators`.
|
|
137
|
+
* All four endpoints are served by the organizations feature and exist only when
|
|
138
|
+
* it is enabled server-side; against an install without it they 404
|
|
139
|
+
* (→ `NotFoundError`). The active workspace travels on the request like every
|
|
140
|
+
* other call, so a workspace admin's grants apply automatically.
|
|
141
|
+
*/
|
|
142
|
+
declare class WorkflowCollaboratorsResource {
|
|
143
|
+
private client;
|
|
144
|
+
constructor(client: NodaroClient);
|
|
145
|
+
/** List a workflow's collaborators (id, name, avatar, role — never email). */
|
|
146
|
+
list(workflowId: string): Promise<{
|
|
147
|
+
data: Collaborator[];
|
|
148
|
+
}>;
|
|
149
|
+
/** Add a collaborator by `userId` OR `email` (exactly one), at the given role. */
|
|
150
|
+
add(workflowId: string, input: AddCollaboratorInput): Promise<{
|
|
151
|
+
data: {
|
|
152
|
+
userId: string;
|
|
153
|
+
role: CollaboratorRole;
|
|
154
|
+
};
|
|
155
|
+
}>;
|
|
156
|
+
/** Change a collaborator's role. */
|
|
157
|
+
update(workflowId: string, userId: string, input: {
|
|
158
|
+
role: CollaboratorRole;
|
|
159
|
+
}): Promise<{
|
|
160
|
+
data: {
|
|
161
|
+
userId: string;
|
|
162
|
+
role: CollaboratorRole;
|
|
163
|
+
};
|
|
164
|
+
}>;
|
|
165
|
+
/** Remove a collaborator — or yourself. Returns `{ success: true }`. */
|
|
166
|
+
remove(workflowId: string, userId: string): Promise<{
|
|
167
|
+
success: true;
|
|
168
|
+
}>;
|
|
169
|
+
}
|
|
112
170
|
declare class WorkflowsResource {
|
|
113
171
|
private client;
|
|
172
|
+
/** The people this workflow is shared with. See {@link WorkflowCollaboratorsResource}. */
|
|
173
|
+
readonly collaborators: WorkflowCollaboratorsResource;
|
|
114
174
|
constructor(client: NodaroClient);
|
|
115
175
|
/** List workflows for a project. Returns metadata only — `nodes`/`edges` are not included. */
|
|
116
176
|
list(params: ListWorkflowsParams): Promise<{
|
|
@@ -163,11 +223,45 @@ declare class WorkflowsResource {
|
|
|
163
223
|
/**
|
|
164
224
|
* Import a `WorkflowExport` bundle into the specified project.
|
|
165
225
|
* Re-creates any bundled assets (characters, objects, locations) under your account.
|
|
226
|
+
* Media the bundle references on other hosts is copied onto this instance's
|
|
227
|
+
* storage where reachable; `importReport` says what was copied, what could
|
|
228
|
+
* not be reached, and what was skipped (and why).
|
|
166
229
|
*/
|
|
167
230
|
import(input: WorkflowExport & {
|
|
168
231
|
projectId: string;
|
|
169
232
|
}): Promise<{
|
|
170
233
|
data: Workflow;
|
|
234
|
+
importReport?: WorkflowImportReport;
|
|
235
|
+
}>;
|
|
236
|
+
/**
|
|
237
|
+
* Set a workflow's visibility — `"private"` (creator + explicit collaborators)
|
|
238
|
+
* or `"workspace"` (everyone in its workspace). Only the creator or a workspace
|
|
239
|
+
* admin may change it; anyone else gets HTTP 403. Thin wrapper over `update()`:
|
|
240
|
+
* the visibility lever lives on `PATCH /v1/workflows/:id`.
|
|
241
|
+
*/
|
|
242
|
+
setVisibility(id: string, visibility: WorkflowVisibility): Promise<{
|
|
243
|
+
data: Workflow;
|
|
244
|
+
}>;
|
|
245
|
+
/**
|
|
246
|
+
* Move a workflow to another project (`POST /v1/workflows/:id/move`); its folder
|
|
247
|
+
* is cleared. When the move takes the workflow out of a workspace, collaborator
|
|
248
|
+
* grants that came from that workspace are dropped and returned as
|
|
249
|
+
* `droppedCollaborators`.
|
|
250
|
+
*/
|
|
251
|
+
move(id: string, params: {
|
|
252
|
+
projectId: string;
|
|
253
|
+
}): Promise<{
|
|
254
|
+
data: Workflow;
|
|
255
|
+
droppedCollaborators: DroppedCollaborator[];
|
|
256
|
+
}>;
|
|
257
|
+
/**
|
|
258
|
+
* Workflows other people shared with you (`GET /v1/workflows/shared-with-me`) —
|
|
259
|
+
* grants on work that is NOT in a workspace you belong to (workspace work already
|
|
260
|
+
* shows in that workspace's own lists). Each carries the `grantedRole` you hold.
|
|
261
|
+
* Empty when the organizations feature is off server-side.
|
|
262
|
+
*/
|
|
263
|
+
sharedWithMe(): Promise<{
|
|
264
|
+
data: SharedWorkflow[];
|
|
171
265
|
}>;
|
|
172
266
|
}
|
|
173
267
|
|
|
@@ -223,7 +317,8 @@ type JobStatus = "pending" | "queued" | "processing" | "completed" | "failed" |
|
|
|
223
317
|
* Sensitive fields stripped server-side for non-admin callers:
|
|
224
318
|
* `provider`, `provider_cost`, `display_cost`, `credits_actual`. USD
|
|
225
319
|
* pricing is admin-only across api/sdk/mcp — non-admin consumers see
|
|
226
|
-
* only the `credits` abstraction.
|
|
320
|
+
* only the `credits` abstraction. Server-only nested job data (including
|
|
321
|
+
* Recast's private remux base) is stripped for every caller, including admins.
|
|
227
322
|
*/
|
|
228
323
|
interface Job {
|
|
229
324
|
id: string;
|
|
@@ -254,8 +349,9 @@ interface CancelJobResult {
|
|
|
254
349
|
}
|
|
255
350
|
/**
|
|
256
351
|
* Lean job status returned by `GET /v1/jobs/:id/status`. Skips the
|
|
257
|
-
* `input_data` JSONB
|
|
258
|
-
*
|
|
352
|
+
* `input_data` JSONB and cost/timestamp columns. Its `output_data` still goes
|
|
353
|
+
* through the server-only nested-field redaction. Intended for poll loops that
|
|
354
|
+
* only need progress/output/error.
|
|
259
355
|
*/
|
|
260
356
|
interface JobStatusResult {
|
|
261
357
|
id: string;
|
|
@@ -1726,6 +1822,14 @@ interface UpdateLocationResult {
|
|
|
1726
1822
|
interface ListLocationsParams {
|
|
1727
1823
|
/** When true, return archived locations instead of active ones. */
|
|
1728
1824
|
archived?: boolean;
|
|
1825
|
+
/**
|
|
1826
|
+
* Max rows to return (cap 500). OPT-IN: omitted, the server returns the
|
|
1827
|
+
* full legacy listing with no `nextCursor`; supplied, the response is one
|
|
1828
|
+
* page plus `nextCursor` — keep passing it back until it is `null`.
|
|
1829
|
+
*/
|
|
1830
|
+
limit?: number;
|
|
1831
|
+
/** Opaque cursor from a prior page's `nextCursor` (fetches the next page). */
|
|
1832
|
+
cursor?: string;
|
|
1729
1833
|
}
|
|
1730
1834
|
/**
|
|
1731
1835
|
* Input for `client.locations.generate()` — fires the
|
|
@@ -1920,6 +2024,7 @@ declare class LocationsResource {
|
|
|
1920
2024
|
*/
|
|
1921
2025
|
list(params?: ListLocationsParams): Promise<{
|
|
1922
2026
|
locations: Location[];
|
|
2027
|
+
nextCursor?: string | null;
|
|
1923
2028
|
}>;
|
|
1924
2029
|
/**
|
|
1925
2030
|
* Convenience wrapper for `list({ archived: true })`. Returns soft-deleted
|
|
@@ -1930,6 +2035,7 @@ declare class LocationsResource {
|
|
|
1930
2035
|
*/
|
|
1931
2036
|
listArchived(params?: Omit<ListLocationsParams, "archived">): Promise<{
|
|
1932
2037
|
locations: Location[];
|
|
2038
|
+
nextCursor?: string | null;
|
|
1933
2039
|
}>;
|
|
1934
2040
|
/**
|
|
1935
2041
|
* Fetch a single location including in-flight asset job state. Soft-deleted
|
|
@@ -2267,6 +2373,14 @@ interface ListObjectsParams {
|
|
|
2267
2373
|
archived?: boolean;
|
|
2268
2374
|
/** Optional project filter — server-scoped to the caller's user. */
|
|
2269
2375
|
projectId?: string;
|
|
2376
|
+
/**
|
|
2377
|
+
* Max rows to return (cap 500). OPT-IN: omitted, the server returns the
|
|
2378
|
+
* full legacy listing with no `nextCursor`; supplied, the response is one
|
|
2379
|
+
* page plus `nextCursor` — keep passing it back until it is `null`.
|
|
2380
|
+
*/
|
|
2381
|
+
limit?: number;
|
|
2382
|
+
/** Opaque cursor from a prior page's `nextCursor` (fetches the next page). */
|
|
2383
|
+
cursor?: string;
|
|
2270
2384
|
}
|
|
2271
2385
|
/**
|
|
2272
2386
|
* Input for `client.objects.generate()` — fires the
|
|
@@ -2422,6 +2536,7 @@ declare class ObjectsResource {
|
|
|
2422
2536
|
*/
|
|
2423
2537
|
list(params?: ListObjectsParams): Promise<{
|
|
2424
2538
|
objects: Object$1[];
|
|
2539
|
+
nextCursor?: string | null;
|
|
2425
2540
|
}>;
|
|
2426
2541
|
/**
|
|
2427
2542
|
* Convenience wrapper for `list({ archived: true })`. Returns soft-deleted
|
|
@@ -2432,6 +2547,7 @@ declare class ObjectsResource {
|
|
|
2432
2547
|
*/
|
|
2433
2548
|
listArchived(params?: Omit<ListObjectsParams, "archived">): Promise<{
|
|
2434
2549
|
objects: Object$1[];
|
|
2550
|
+
nextCursor?: string | null;
|
|
2435
2551
|
}>;
|
|
2436
2552
|
/**
|
|
2437
2553
|
* Fetch a single object including in-flight asset job state. Soft-deleted
|
|
@@ -2821,6 +2937,14 @@ interface ListCreaturesParams {
|
|
|
2821
2937
|
archived?: boolean;
|
|
2822
2938
|
/** Optional project filter — server-scoped to the caller's user. */
|
|
2823
2939
|
projectId?: string;
|
|
2940
|
+
/**
|
|
2941
|
+
* Max rows to return (cap 500). OPT-IN: omitted, the server returns the
|
|
2942
|
+
* full legacy listing with no `nextCursor`; supplied, the response is one
|
|
2943
|
+
* page plus `nextCursor` — keep passing it back until it is `null`.
|
|
2944
|
+
*/
|
|
2945
|
+
limit?: number;
|
|
2946
|
+
/** Opaque cursor from a prior page's `nextCursor` (fetches the next page). */
|
|
2947
|
+
cursor?: string;
|
|
2824
2948
|
}
|
|
2825
2949
|
/**
|
|
2826
2950
|
* Input for `client.creatures.generate()` — fires the
|
|
@@ -2977,6 +3101,7 @@ declare class CreaturesResource {
|
|
|
2977
3101
|
*/
|
|
2978
3102
|
list(params?: ListCreaturesParams): Promise<{
|
|
2979
3103
|
creatures: Creature[];
|
|
3104
|
+
nextCursor?: string | null;
|
|
2980
3105
|
}>;
|
|
2981
3106
|
/**
|
|
2982
3107
|
* Convenience wrapper for `list({ archived: true })`. Returns soft-deleted
|
|
@@ -2987,6 +3112,7 @@ declare class CreaturesResource {
|
|
|
2987
3112
|
*/
|
|
2988
3113
|
listArchived(params?: Omit<ListCreaturesParams, "archived">): Promise<{
|
|
2989
3114
|
creatures: Creature[];
|
|
3115
|
+
nextCursor?: string | null;
|
|
2990
3116
|
}>;
|
|
2991
3117
|
/**
|
|
2992
3118
|
* Fetch a single creature including in-flight asset job state. Soft-deleted
|
|
@@ -3981,6 +4107,54 @@ declare class MediaResource {
|
|
|
3981
4107
|
}): Promise<{
|
|
3982
4108
|
jobId: string;
|
|
3983
4109
|
}>;
|
|
4110
|
+
/**
|
|
4111
|
+
* Turn one still image + one audio track into an MP4
|
|
4112
|
+
* (`POST /v1/still-to-video`) — locally rendered (FFmpeg), no AI model,
|
|
4113
|
+
* zero credits. The output duration IS the audio's duration; there is no
|
|
4114
|
+
* duration field. Optional `motion` animates the still (zoom / pan /
|
|
4115
|
+
* ken-burns) at `intensity` 1–10. `fit: "contain"` letterboxes with
|
|
4116
|
+
* `padColor` instead of cropping. Poll `jobs.get(jobId)`.
|
|
4117
|
+
*/
|
|
4118
|
+
stillToVideo(input: {
|
|
4119
|
+
imageUrl: string;
|
|
4120
|
+
audioUrl: string;
|
|
4121
|
+
motion?: "none" | "zoom-in" | "zoom-out" | "pan-left" | "pan-right" | "ken-burns";
|
|
4122
|
+
intensity?: number;
|
|
4123
|
+
resolution?: "720p" | "1080p" | "4K";
|
|
4124
|
+
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3";
|
|
4125
|
+
fps?: 24 | 30;
|
|
4126
|
+
fit?: "cover" | "contain";
|
|
4127
|
+
padColor?: string;
|
|
4128
|
+
}): Promise<{
|
|
4129
|
+
jobId: string;
|
|
4130
|
+
}>;
|
|
4131
|
+
/**
|
|
4132
|
+
* Turn 2–100 images + one optional audio track into an MP4 slideshow
|
|
4133
|
+
* (`POST /v1/slideshow`) — locally rendered (FFmpeg), zero credits. With
|
|
4134
|
+
* audio, the output duration IS the audio's duration (equal split unless
|
|
4135
|
+
* `imageDurations` pins rows — null entries = auto; mismatched pinned sums
|
|
4136
|
+
* scale proportionally and the factor is disclosed in the job output).
|
|
4137
|
+
* Without audio: N × `perImageDuration`, silent output. Transitions
|
|
4138
|
+
* consume the outgoing slide, so totals stay exact. For a single image use
|
|
4139
|
+
* `stillToVideo`. Poll `jobs.get(jobId)`.
|
|
4140
|
+
*/
|
|
4141
|
+
slideshow(input: {
|
|
4142
|
+
imageUrls: string[];
|
|
4143
|
+
audioUrl?: string;
|
|
4144
|
+
imageDurations?: Array<number | null>;
|
|
4145
|
+
perImageDuration?: number;
|
|
4146
|
+
transition?: string;
|
|
4147
|
+
transitionDuration?: number;
|
|
4148
|
+
motion?: "none" | "zoom-in" | "zoom-out" | "ken-burns" | "alternate";
|
|
4149
|
+
intensity?: number;
|
|
4150
|
+
resolution?: "720p" | "1080p" | "4K";
|
|
4151
|
+
aspectRatio?: "16:9" | "9:16" | "1:1" | "4:3";
|
|
4152
|
+
fps?: 24 | 30;
|
|
4153
|
+
fit?: "cover" | "contain";
|
|
4154
|
+
padColor?: string;
|
|
4155
|
+
}): Promise<{
|
|
4156
|
+
jobId: string;
|
|
4157
|
+
}>;
|
|
3984
4158
|
/**
|
|
3985
4159
|
* Probe a social video's metadata (`POST /v1/video-metadata`) — duration,
|
|
3986
4160
|
* dimensions, title, live status — WITHOUT downloading it. A direct read, not a
|
|
@@ -4361,6 +4535,13 @@ interface PickerOption {
|
|
|
4361
4535
|
category?: string;
|
|
4362
4536
|
/** The prompt fragment this id injects downstream. Present only when detail="full". */
|
|
4363
4537
|
promptHint?: string;
|
|
4538
|
+
/**
|
|
4539
|
+
* Short professional term injected by compact hint mode; `label` is for
|
|
4540
|
+
* display. Present at BOTH detail levels — a thin client renders `label`
|
|
4541
|
+
* and injects `term`. Empty for a no-op ("auto"/"none") entry that injects
|
|
4542
|
+
* nothing.
|
|
4543
|
+
*/
|
|
4544
|
+
term?: string;
|
|
4364
4545
|
icon?: string;
|
|
4365
4546
|
}
|
|
4366
4547
|
interface PickerDimension {
|
|
@@ -4395,7 +4576,7 @@ interface PickerCatalogSummary {
|
|
|
4395
4576
|
optionCount: number;
|
|
4396
4577
|
}
|
|
4397
4578
|
interface GetPickerCatalogOptions {
|
|
4398
|
-
/** "compact" (default) = id, label, category, icon; "full" additionally includes description + promptHint. */
|
|
4579
|
+
/** "compact" (default) = id, label, category, term, icon; "full" additionally includes description + promptHint. */
|
|
4399
4580
|
detail?: "compact" | "full";
|
|
4400
4581
|
/** single-dim: filter to one category. */
|
|
4401
4582
|
category?: string;
|
|
@@ -4452,6 +4633,58 @@ declare class PickerCatalogsResource {
|
|
|
4452
4633
|
}>;
|
|
4453
4634
|
}
|
|
4454
4635
|
|
|
4636
|
+
/**
|
|
4637
|
+
* Catalog projection types. Mirror `@nodaro/shared`'s `ProjectedCatalog` so the
|
|
4638
|
+
* SDK stays dependency-free (same convention as `picker-catalogs.ts`). Tag-free
|
|
4639
|
+
* by design — the deferred `CatalogPolicy` never crosses the wire.
|
|
4640
|
+
*/
|
|
4641
|
+
interface ProjectedCatalogOption {
|
|
4642
|
+
id: string;
|
|
4643
|
+
label: string;
|
|
4644
|
+
description?: string;
|
|
4645
|
+
category?: string;
|
|
4646
|
+
/** The prompt fragment this id injects downstream. Present only when detail="full". */
|
|
4647
|
+
promptHint?: string;
|
|
4648
|
+
/**
|
|
4649
|
+
* Short professional term injected by compact hint mode; `label` is for
|
|
4650
|
+
* display. Present at BOTH detail levels — a thin client renders `label`
|
|
4651
|
+
* and injects `term`. Empty for a no-op ("auto"/"none") entry that injects
|
|
4652
|
+
* nothing.
|
|
4653
|
+
*/
|
|
4654
|
+
term?: string;
|
|
4655
|
+
icon?: string;
|
|
4656
|
+
}
|
|
4657
|
+
interface ProjectedCatalogDimension {
|
|
4658
|
+
field: string;
|
|
4659
|
+
label: string;
|
|
4660
|
+
options: ProjectedCatalogOption[];
|
|
4661
|
+
}
|
|
4662
|
+
interface ProjectedCatalog {
|
|
4663
|
+
nodeType: string;
|
|
4664
|
+
label: string;
|
|
4665
|
+
catalogId: string;
|
|
4666
|
+
kind: "single" | "multi";
|
|
4667
|
+
valueField?: string;
|
|
4668
|
+
defaultValue?: string;
|
|
4669
|
+
categoryOrder?: string[];
|
|
4670
|
+
categoryLabels?: Record<string, string>;
|
|
4671
|
+
detail: "compact" | "full";
|
|
4672
|
+
options?: ProjectedCatalogOption[];
|
|
4673
|
+
fields?: string[];
|
|
4674
|
+
dimensions?: ProjectedCatalogDimension[];
|
|
4675
|
+
}
|
|
4676
|
+
declare class CatalogsResource {
|
|
4677
|
+
private client;
|
|
4678
|
+
constructor(client: NodaroClient);
|
|
4679
|
+
/** Every catalog, projected & pack-composed (honors the deployment's
|
|
4680
|
+
* registered vendored packs). Cached publicly 5 min. */
|
|
4681
|
+
list(opts?: {
|
|
4682
|
+
detail?: "compact" | "full";
|
|
4683
|
+
}): Promise<{
|
|
4684
|
+
data: ProjectedCatalog[];
|
|
4685
|
+
}>;
|
|
4686
|
+
}
|
|
4687
|
+
|
|
4455
4688
|
/**
|
|
4456
4689
|
* Model-catalog types. Mirrors the backend's `GET /v1/models` projection
|
|
4457
4690
|
* (itself shared with the MCP `list_models` tool) so the SDK stays
|
|
@@ -4651,10 +4884,109 @@ interface RecastEstimate {
|
|
|
4651
4884
|
breakdown?: Record<string, number>;
|
|
4652
4885
|
[key: string]: unknown;
|
|
4653
4886
|
}
|
|
4887
|
+
type RecastAudioLayerName = "music" | "video";
|
|
4888
|
+
interface RecastAudioMixControl {
|
|
4889
|
+
/** Linear gain percentage. The server rounds and clamps this to 0–200. */
|
|
4890
|
+
gain: number;
|
|
4891
|
+
/** A muted lane has an effective wire gain of zero. */
|
|
4892
|
+
muted: boolean;
|
|
4893
|
+
}
|
|
4894
|
+
/** Complete desired controls for the logical lanes addressed by an operation. */
|
|
4895
|
+
interface RecastAudioMix {
|
|
4896
|
+
music?: RecastAudioMixControl;
|
|
4897
|
+
video?: RecastAudioMixControl;
|
|
4898
|
+
}
|
|
4899
|
+
interface RecastAudioManifestV1 {
|
|
4900
|
+
version: 1;
|
|
4901
|
+
/** Opaque server-minted identity of the currently published audio delivery. */
|
|
4902
|
+
revision: string;
|
|
4903
|
+
mode: "bed" | "replace";
|
|
4904
|
+
/** Logical layers in the delivery, including layers whose preview derivative failed. */
|
|
4905
|
+
present: {
|
|
4906
|
+
music?: true;
|
|
4907
|
+
video?: true;
|
|
4908
|
+
};
|
|
4909
|
+
/** Browser-ready, CORS-enabled audio-only derivatives. */
|
|
4910
|
+
layers: {
|
|
4911
|
+
music?: {
|
|
4912
|
+
url: string;
|
|
4913
|
+
};
|
|
4914
|
+
video?: {
|
|
4915
|
+
url: string;
|
|
4916
|
+
};
|
|
4917
|
+
};
|
|
4918
|
+
/** Effective integer gain percentages baked into the current `resultUrl`. */
|
|
4919
|
+
bakedEffectiveGain: {
|
|
4920
|
+
music?: number;
|
|
4921
|
+
video?: number;
|
|
4922
|
+
};
|
|
4923
|
+
/** Present only while a paid audio operation is genuinely live. */
|
|
4924
|
+
pendingRescore?: {
|
|
4925
|
+
jobId: string;
|
|
4926
|
+
requestId: string;
|
|
4927
|
+
state: "pending" | "running";
|
|
4928
|
+
expectedAudioRevision: string;
|
|
4929
|
+
requestedEffectiveGain: {
|
|
4930
|
+
music?: number;
|
|
4931
|
+
video?: number;
|
|
4932
|
+
};
|
|
4933
|
+
};
|
|
4934
|
+
}
|
|
4935
|
+
interface RecastAudioSectionReplacement {
|
|
4936
|
+
index: number;
|
|
4937
|
+
brief: string;
|
|
4938
|
+
}
|
|
4939
|
+
/** Exactly one replacement lane may be combined with a mix. */
|
|
4940
|
+
type RecastRescoreReplacement = {
|
|
4941
|
+
audioUrl: string;
|
|
4942
|
+
sections?: never;
|
|
4943
|
+
} | {
|
|
4944
|
+
sections: RecastAudioSectionReplacement[];
|
|
4945
|
+
audioUrl?: never;
|
|
4946
|
+
};
|
|
4947
|
+
type RecastNoReplacement = {
|
|
4948
|
+
audioUrl?: never;
|
|
4949
|
+
sections?: never;
|
|
4950
|
+
};
|
|
4951
|
+
/** A mix, one Music replacement, or a replacement and its complete desired mix. */
|
|
4952
|
+
type RecastRescoreOperation = ({
|
|
4953
|
+
mix: RecastAudioMix;
|
|
4954
|
+
} & (RecastRescoreReplacement | RecastNoReplacement)) | (RecastRescoreReplacement & {
|
|
4955
|
+
mix?: RecastAudioMix;
|
|
4956
|
+
});
|
|
4957
|
+
/** Free quote input. `requestId` is deliberately absent because quoting has no side effects. */
|
|
4958
|
+
type EstimateRecastRescoreInput = RecastRescoreOperation & {
|
|
4959
|
+
expectedAudioRevision: string;
|
|
4960
|
+
};
|
|
4961
|
+
/** Revision-safe paid operation. Reuse `requestId` only for transport retries. */
|
|
4962
|
+
type RecastRescoreRequestV2 = EstimateRecastRescoreInput & {
|
|
4963
|
+
requestId: string;
|
|
4964
|
+
};
|
|
4965
|
+
interface RecastRescoreQuote {
|
|
4966
|
+
credits: number;
|
|
4967
|
+
audioRevision: string;
|
|
4968
|
+
noOp: boolean;
|
|
4969
|
+
}
|
|
4970
|
+
type RecastRescoreResponse = {
|
|
4971
|
+
recastId: string;
|
|
4972
|
+
jobId: string;
|
|
4973
|
+
noOp?: false;
|
|
4974
|
+
} | {
|
|
4975
|
+
recastId: string;
|
|
4976
|
+
noOp: true;
|
|
4977
|
+
audioRevision: string;
|
|
4978
|
+
};
|
|
4654
4979
|
/** Run snapshot — `status` plus, on interactive runs, the pending step. */
|
|
4655
4980
|
interface RecastRunSnapshot {
|
|
4656
4981
|
status: string;
|
|
4657
4982
|
interactive?: Record<string, unknown>;
|
|
4983
|
+
/** Presence of `audioLayers: 1` opts a client into the revisioned audio contract. */
|
|
4984
|
+
capabilities?: {
|
|
4985
|
+
audioLayers?: 1;
|
|
4986
|
+
[key: string]: unknown;
|
|
4987
|
+
};
|
|
4988
|
+
/** Server-authored manifest for the selected completed take. */
|
|
4989
|
+
audio?: RecastAudioManifestV1;
|
|
4658
4990
|
[key: string]: unknown;
|
|
4659
4991
|
}
|
|
4660
4992
|
interface ResolveRecastGateInput {
|
|
@@ -4698,6 +5030,10 @@ declare class RecastResource {
|
|
|
4698
5030
|
}>;
|
|
4699
5031
|
/** Poll the run — status plus any pending interactive step. */
|
|
4700
5032
|
get(recastId: string): Promise<RecastRunSnapshot>;
|
|
5033
|
+
/** Quote a revisioned Music replacement and/or complete desired mix. Free. */
|
|
5034
|
+
estimateRescore(recastId: string, input: EstimateRecastRescoreInput): Promise<RecastRescoreQuote>;
|
|
5035
|
+
/** Apply a quoted audio operation. Reuse its request id only for a transport retry. */
|
|
5036
|
+
rescore(recastId: string, input: RecastRescoreRequestV2): Promise<RecastRescoreResponse>;
|
|
4701
5037
|
/** Start rendering a `planned` run. Idempotent server-side. */
|
|
4702
5038
|
start(recastId: string, opts?: {
|
|
4703
5039
|
segmentSec?: number;
|
|
@@ -4935,6 +5271,254 @@ declare class TutorialsResource {
|
|
|
4935
5271
|
}>;
|
|
4936
5272
|
}
|
|
4937
5273
|
|
|
5274
|
+
/**
|
|
5275
|
+
* Organizations, their members, and the invitations that fill them.
|
|
5276
|
+
*
|
|
5277
|
+
* Every shape here comes from `@nodaro/shared` rather than being restated:
|
|
5278
|
+
* the app, the CLI and this SDK all read the same wire, and a shape written
|
|
5279
|
+
* out three times is one that drifts in two of them.
|
|
5280
|
+
*
|
|
5281
|
+
* Nothing in this file decides anything. Whether a caller may invite, remove
|
|
5282
|
+
* or rename is the server's answer, delivered as a typed error code, and an
|
|
5283
|
+
* SDK that guessed would be wrong the first time a setting changed.
|
|
5284
|
+
*/
|
|
5285
|
+
interface CreateOrgInput {
|
|
5286
|
+
name: string;
|
|
5287
|
+
kind: OrgKind;
|
|
5288
|
+
/** Derived from the name when omitted; the server resolves collisions. */
|
|
5289
|
+
slug?: string;
|
|
5290
|
+
acceptTerms?: boolean;
|
|
5291
|
+
settings?: OrgSettings;
|
|
5292
|
+
}
|
|
5293
|
+
interface InviteInput {
|
|
5294
|
+
emails: string[];
|
|
5295
|
+
orgRole?: "admin" | "member";
|
|
5296
|
+
/** Also places the invitee in this workspace on accept. */
|
|
5297
|
+
workspaceId?: string;
|
|
5298
|
+
workspaceRole?: WorkspaceRole;
|
|
5299
|
+
}
|
|
5300
|
+
interface ListInvitationsOptions {
|
|
5301
|
+
status?: InvitationState;
|
|
5302
|
+
workspaceId?: string;
|
|
5303
|
+
cursor?: string;
|
|
5304
|
+
limit?: number;
|
|
5305
|
+
}
|
|
5306
|
+
declare class OrganizationsResource {
|
|
5307
|
+
private client;
|
|
5308
|
+
constructor(client: NodaroClient);
|
|
5309
|
+
/** The organizations this account belongs to. */
|
|
5310
|
+
list(): Promise<{
|
|
5311
|
+
data: OrganizationView[];
|
|
5312
|
+
}>;
|
|
5313
|
+
get(id: string): Promise<{
|
|
5314
|
+
data: OrganizationView;
|
|
5315
|
+
}>;
|
|
5316
|
+
/**
|
|
5317
|
+
* Create an organization. On instances that require it, `acceptTerms` must
|
|
5318
|
+
* be true or the server answers `terms_required` — the SDK does not decide
|
|
5319
|
+
* whether terms apply, because only the instance knows.
|
|
5320
|
+
*
|
|
5321
|
+
* A new organization may come back `pending`: some instances hold new
|
|
5322
|
+
* organizations for a platform admin to approve, and a pending one grants
|
|
5323
|
+
* nothing until it is active.
|
|
5324
|
+
*/
|
|
5325
|
+
create(input: CreateOrgInput): Promise<{
|
|
5326
|
+
data: OrganizationView;
|
|
5327
|
+
}>;
|
|
5328
|
+
update(id: string, input: {
|
|
5329
|
+
name?: string;
|
|
5330
|
+
settings?: OrgSettings;
|
|
5331
|
+
}): Promise<{
|
|
5332
|
+
data: OrganizationView;
|
|
5333
|
+
}>;
|
|
5334
|
+
/** Soft-delete. The organization stops granting context; nothing is destroyed. */
|
|
5335
|
+
delete(id: string): Promise<{
|
|
5336
|
+
data: {
|
|
5337
|
+
id: string;
|
|
5338
|
+
status: string;
|
|
5339
|
+
};
|
|
5340
|
+
}>;
|
|
5341
|
+
/** Hand the organization to another member. The caller becomes an admin. */
|
|
5342
|
+
transferOwnership(id: string, userId: string): Promise<{
|
|
5343
|
+
data: {
|
|
5344
|
+
orgId: string;
|
|
5345
|
+
ownerUserId: string;
|
|
5346
|
+
};
|
|
5347
|
+
}>;
|
|
5348
|
+
/** Leave. An owner cannot — transfer ownership first (`owner_cannot_leave`). */
|
|
5349
|
+
leave(id: string): Promise<{
|
|
5350
|
+
data: {
|
|
5351
|
+
orgId: string;
|
|
5352
|
+
left: boolean;
|
|
5353
|
+
};
|
|
5354
|
+
}>;
|
|
5355
|
+
listMembers(orgId: string, opts?: {
|
|
5356
|
+
cursor?: string;
|
|
5357
|
+
limit?: number;
|
|
5358
|
+
}): Promise<OrgPage<OrgMemberView>>;
|
|
5359
|
+
updateMember(orgId: string, userId: string, input: {
|
|
5360
|
+
role?: "admin" | "member";
|
|
5361
|
+
status?: MemberStatus;
|
|
5362
|
+
}): Promise<{
|
|
5363
|
+
data: OrgMemberView;
|
|
5364
|
+
}>;
|
|
5365
|
+
removeMember(orgId: string, userId: string): Promise<{
|
|
5366
|
+
data: {
|
|
5367
|
+
removed: boolean;
|
|
5368
|
+
};
|
|
5369
|
+
}>;
|
|
5370
|
+
/**
|
|
5371
|
+
* Invite by email. Returns ONE ROW PER ADDRESS, and a row whose `status` is
|
|
5372
|
+
* not `sent` carries a `link` instead.
|
|
5373
|
+
*
|
|
5374
|
+
* Surface that link. An install with no mail provider — every fresh
|
|
5375
|
+
* self-host — delivers nothing, and an integration that reports "invited"
|
|
5376
|
+
* without showing the link creates invitations nobody can ever reach.
|
|
5377
|
+
*/
|
|
5378
|
+
invite(orgId: string, input: InviteInput): Promise<{
|
|
5379
|
+
data: InvitationDelivery[];
|
|
5380
|
+
}>;
|
|
5381
|
+
listInvitations(orgId: string, opts?: ListInvitationsOptions): Promise<OrgPage<InvitationView>>;
|
|
5382
|
+
revokeInvitation(id: string): Promise<{
|
|
5383
|
+
data: {
|
|
5384
|
+
id: string;
|
|
5385
|
+
revoked: boolean;
|
|
5386
|
+
};
|
|
5387
|
+
}>;
|
|
5388
|
+
resendInvitation(id: string): Promise<{
|
|
5389
|
+
data: InvitationDelivery & {
|
|
5390
|
+
id: string;
|
|
5391
|
+
};
|
|
5392
|
+
}>;
|
|
5393
|
+
/**
|
|
5394
|
+
* What an invitee sees before signing in — the one organization read that
|
|
5395
|
+
* needs no token, so it works while the recipient is still signed out.
|
|
5396
|
+
*/
|
|
5397
|
+
previewInvitation(token: string): Promise<{
|
|
5398
|
+
data: InvitationPreview;
|
|
5399
|
+
}>;
|
|
5400
|
+
/** Accept. Requires an authenticated caller whose email matches the invite. */
|
|
5401
|
+
acceptInvitation(token: string): Promise<{
|
|
5402
|
+
data: {
|
|
5403
|
+
orgId: string;
|
|
5404
|
+
workspaceId: string | null;
|
|
5405
|
+
};
|
|
5406
|
+
}>;
|
|
5407
|
+
/**
|
|
5408
|
+
* The organization's audit log, newest first. Owner and admins only, and
|
|
5409
|
+
* readable while the organization is suspended — the record of what
|
|
5410
|
+
* happened is exactly what someone needs when things have gone wrong.
|
|
5411
|
+
*/
|
|
5412
|
+
audit(orgId: string, opts?: {
|
|
5413
|
+
cursor?: string;
|
|
5414
|
+
limit?: number;
|
|
5415
|
+
}): Promise<OrgPage<OrgAuditEntry>>;
|
|
5416
|
+
}
|
|
5417
|
+
|
|
5418
|
+
/**
|
|
5419
|
+
* Workspaces — the inner tenancy axis, where work actually lives.
|
|
5420
|
+
*
|
|
5421
|
+
* Selecting a workspace and belonging to one are different things, and this
|
|
5422
|
+
* resource is only about the second. Use {@link NodaroClient.withWorkspace}
|
|
5423
|
+
* to decide which workspace a REQUEST acts in; these methods read and change
|
|
5424
|
+
* the workspaces themselves.
|
|
5425
|
+
*/
|
|
5426
|
+
interface CreateWorkspaceInput {
|
|
5427
|
+
name: string;
|
|
5428
|
+
slug?: string;
|
|
5429
|
+
description?: string;
|
|
5430
|
+
settings?: WorkspaceSettings;
|
|
5431
|
+
}
|
|
5432
|
+
declare class WorkspacesResource {
|
|
5433
|
+
private client;
|
|
5434
|
+
constructor(client: NodaroClient);
|
|
5435
|
+
/**
|
|
5436
|
+
* Every workspace this account belongs to, across all its organizations.
|
|
5437
|
+
*
|
|
5438
|
+
* An identity read: a stale workspace binding cannot lock a caller out of
|
|
5439
|
+
* it, which is what makes it safe to call when a selection has gone bad.
|
|
5440
|
+
*
|
|
5441
|
+
* Byte-for-byte the list `GET /v1/me` carries, so a client reconciles
|
|
5442
|
+
* against one truth rather than two. That is why these are SUMMARIES —
|
|
5443
|
+
* enough to render a switcher, not the full view; use {@link get} for that.
|
|
5444
|
+
*/
|
|
5445
|
+
list(): Promise<{
|
|
5446
|
+
data: WorkspaceSummary[];
|
|
5447
|
+
lastWorkspaceId: string | null;
|
|
5448
|
+
}>;
|
|
5449
|
+
listForOrg(orgId: string, opts?: {
|
|
5450
|
+
includeArchived?: boolean;
|
|
5451
|
+
}): Promise<{
|
|
5452
|
+
data: WorkspaceView[];
|
|
5453
|
+
}>;
|
|
5454
|
+
get(id: string): Promise<{
|
|
5455
|
+
data: WorkspaceView;
|
|
5456
|
+
}>;
|
|
5457
|
+
create(orgId: string, input: CreateWorkspaceInput): Promise<{
|
|
5458
|
+
data: WorkspaceView;
|
|
5459
|
+
}>;
|
|
5460
|
+
update(id: string, input: {
|
|
5461
|
+
name?: string;
|
|
5462
|
+
description?: string | null;
|
|
5463
|
+
settings?: WorkspaceSettings;
|
|
5464
|
+
}): Promise<{
|
|
5465
|
+
data: WorkspaceView;
|
|
5466
|
+
}>;
|
|
5467
|
+
/**
|
|
5468
|
+
* Archive or restore. Archiving is REVERSIBLE and destroys nothing: the
|
|
5469
|
+
* workspace stops accepting new work and stays fully readable, which is
|
|
5470
|
+
* what a finished class term needs and a delete would not survive.
|
|
5471
|
+
*/
|
|
5472
|
+
setArchived(id: string, archived: boolean): Promise<{
|
|
5473
|
+
data: WorkspaceView;
|
|
5474
|
+
}>;
|
|
5475
|
+
listMembers(id: string, opts?: {
|
|
5476
|
+
cursor?: string;
|
|
5477
|
+
limit?: number;
|
|
5478
|
+
}): Promise<OrgPage<WorkspaceMemberView>>;
|
|
5479
|
+
/** Add someone who is ALREADY in the organization. To bring in a new person, invite them. */
|
|
5480
|
+
addMember(id: string, input: {
|
|
5481
|
+
userId: string;
|
|
5482
|
+
role: WorkspaceRole;
|
|
5483
|
+
}): Promise<{
|
|
5484
|
+
data: WorkspaceMemberView;
|
|
5485
|
+
}>;
|
|
5486
|
+
updateMember(id: string, userId: string, input: {
|
|
5487
|
+
role?: WorkspaceRole;
|
|
5488
|
+
status?: MemberStatus;
|
|
5489
|
+
creditCap?: number | null;
|
|
5490
|
+
}): Promise<{
|
|
5491
|
+
data: WorkspaceMemberView;
|
|
5492
|
+
}>;
|
|
5493
|
+
removeMember(id: string, userId: string): Promise<{
|
|
5494
|
+
data: {
|
|
5495
|
+
removed: boolean;
|
|
5496
|
+
};
|
|
5497
|
+
}>;
|
|
5498
|
+
/** The workspace's join code, or `null` if none has been created. Admins only. */
|
|
5499
|
+
getJoinCode(id: string): Promise<{
|
|
5500
|
+
data: JoinCodeView | null;
|
|
5501
|
+
}>;
|
|
5502
|
+
/**
|
|
5503
|
+
* Rotate, enable or disable the code. Rotating invalidates the old one
|
|
5504
|
+
* immediately — that is the point of it, and anyone still holding a link
|
|
5505
|
+
* with the old code will be refused.
|
|
5506
|
+
*/
|
|
5507
|
+
actOnJoinCode(id: string, action: "rotate" | "enable" | "disable"): Promise<{
|
|
5508
|
+
data: JoinCodeView;
|
|
5509
|
+
}>;
|
|
5510
|
+
/**
|
|
5511
|
+
* Join by code. Another way IN, so a stale workspace binding must not block
|
|
5512
|
+
* it — the server treats this as an identity route for that reason.
|
|
5513
|
+
*/
|
|
5514
|
+
join(code: string): Promise<{
|
|
5515
|
+
data: {
|
|
5516
|
+
orgId: string;
|
|
5517
|
+
workspaceId: string;
|
|
5518
|
+
};
|
|
5519
|
+
}>;
|
|
5520
|
+
}
|
|
5521
|
+
|
|
4938
5522
|
interface ClientOptions {
|
|
4939
5523
|
/** Backend base URL, e.g. "https://nodaro.example.com" or empty string for same-origin. */
|
|
4940
5524
|
baseUrl: string;
|
|
@@ -4952,6 +5536,19 @@ interface ClientOptions {
|
|
|
4952
5536
|
* surfaces could never be told apart.
|
|
4953
5537
|
*/
|
|
4954
5538
|
clientLabel?: string;
|
|
5539
|
+
/**
|
|
5540
|
+
* The workspace every request acts in — sent as `X-Nodaro-Workspace`.
|
|
5541
|
+
*
|
|
5542
|
+
* It selects which workspace a LIST reads from and where a CREATE lands.
|
|
5543
|
+
* It never authorizes: reading, updating, deleting or running an
|
|
5544
|
+
* identified object is decided by that object's own workspace, so a
|
|
5545
|
+
* forgotten header cannot hide work and a forged one cannot reach anyone
|
|
5546
|
+
* else's. Omit it to work in the caller's personal space.
|
|
5547
|
+
*
|
|
5548
|
+
* Prefer {@link NodaroClient.withWorkspace} for anything short-lived — one
|
|
5549
|
+
* client per workspace, no shared mutable selection to get wrong.
|
|
5550
|
+
*/
|
|
5551
|
+
workspaceId?: string;
|
|
4955
5552
|
}
|
|
4956
5553
|
interface RequestOptions {
|
|
4957
5554
|
body?: unknown;
|
|
@@ -5022,20 +5619,45 @@ declare class NodaroClient {
|
|
|
5022
5619
|
readonly library: LibraryResource;
|
|
5023
5620
|
readonly presets: PresetsResource;
|
|
5024
5621
|
readonly pickerCatalogs: PickerCatalogsResource;
|
|
5622
|
+
readonly catalogs: CatalogsResource;
|
|
5025
5623
|
readonly models: ModelsResource;
|
|
5026
5624
|
readonly shots: ShotsResource;
|
|
5027
5625
|
readonly recast: RecastResource;
|
|
5028
5626
|
readonly community: CommunityResource;
|
|
5029
5627
|
readonly templates: TemplatesResource;
|
|
5030
5628
|
readonly tutorials: TutorialsResource;
|
|
5629
|
+
readonly organizations: OrganizationsResource;
|
|
5630
|
+
readonly workspaces: WorkspacesResource;
|
|
5631
|
+
/** The workspace this client acts in; undefined = the personal space. */
|
|
5632
|
+
readonly workspaceId: string | undefined;
|
|
5031
5633
|
constructor(opts: ClientOptions);
|
|
5634
|
+
/**
|
|
5635
|
+
* A client that acts in `workspaceId`, sharing this one's auth and config.
|
|
5636
|
+
*
|
|
5637
|
+
* A NEW client rather than a setter, deliberately. A mutable selection is
|
|
5638
|
+
* the bug this whole axis exists to prevent: two concurrent operations
|
|
5639
|
+
* against one client would race over which workspace they were in, and the
|
|
5640
|
+
* loser would create work in the wrong place with nothing failing. A
|
|
5641
|
+
* per-workspace client cannot be raced.
|
|
5642
|
+
*
|
|
5643
|
+
* Pass `null` for the personal space.
|
|
5644
|
+
*/
|
|
5645
|
+
withWorkspace(workspaceId: string | null): NodaroClient;
|
|
5032
5646
|
request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
|
|
5033
5647
|
/**
|
|
5034
5648
|
* `GET /v1/me` → the authenticated user's identity (see {@link UserIdentity}).
|
|
5035
5649
|
* Unwraps the `{ data }` envelope. Throws `UnauthorizedError` (401) when the
|
|
5036
5650
|
* token is missing/invalid, and the SDK's other typed errors as usual.
|
|
5037
|
-
|
|
5038
|
-
|
|
5651
|
+
*
|
|
5652
|
+
* On an instance with organizations it also carries what the caller belongs
|
|
5653
|
+
* to. THREE states, and collapsing them is wrong in a way users feel: the
|
|
5654
|
+
* organization fields ABSENT means this instance has no organizations at
|
|
5655
|
+
* all; present and empty means the account belongs to none; and
|
|
5656
|
+
* `organizationsUnavailable` means the lookup failed — keep whatever
|
|
5657
|
+
* selection you already had rather than concluding the person was removed
|
|
5658
|
+
* from everything.
|
|
5659
|
+
*/
|
|
5660
|
+
me(): Promise<UserIdentity & MeOrganizations>;
|
|
5039
5661
|
private buildUrl;
|
|
5040
5662
|
}
|
|
5041
5663
|
/** Factory function — preferred entry point. */
|
|
@@ -5129,4 +5751,4 @@ interface ApiErrorBody {
|
|
|
5129
5751
|
}
|
|
5130
5752
|
declare function throwFromResponse(status: number, body: ApiErrorBody): never;
|
|
5131
5753
|
|
|
5132
|
-
export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, AudioResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, type BrowseTemplatesParams, type BrowseTemplatesResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, type CloneTemplateParams, type CloneTemplateResult, CommunityResource, type ContinueVideoProResult, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateProjectInput, type CreateRecastInput, type CreateShotInput, type CreateWorkflowInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, CreaturesResource, CreditsResource, type DeleteAppRunResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DubbingInput, type DuplicateCharacterInput, type EnhanceInput, type EstimateRecastInput, type ExchangeCodeInput, type ExecutionStatus, type ExecutionTriggerType, ExecutionsResource, type FactoryPresetsResult, ForbiddenError, type GenerateAssetInput, type GenerateCharacterInput, type GenerateCharacterResult, type GenerateCreatureAssetInput, type GenerateCreatureAssetResult, type GenerateCreatureInput, type GenerateCreatureMotionInput, type GenerateCreatureMotionResult, type GenerateCreatureResult, type GenerateImageParams, type GenerateInput, type GenerateLocationAssetInput, type GenerateLocationInput, type GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, InsufficientCreditsError, type Job, JobAbortedError, JobFailedError, type JobStatus, type JobStatusResult, JobTimeoutError, JobsResource, type LibraryAsset, LibraryResource, type ListAppRunsParams, type ListAppsParams, type ListAppsResult, type ListCharactersParams, type ListCharactersResult, type ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListModelsOptions, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, MediaResource, type ModelCostsResult, type ModelSummary, type ModelsListResult, ModelsResource, NodaroClient, NodaroError, type NodeCategory, type NodeDescriptor, type NodeExecutionState, type NodeInputField, type NodeInputSchema, type NodeJobOutput, type NodePreset, type NodePresetGroup, NodesResource, NotFoundError, type OAuthAppInfo, OAuthResource, type Object$1 as Object, type ObjectCategory, type ObjectDetail, type ObjectReferencePhoto, type ObjectReferencePhotoKind, ObjectsResource, type OutputType, type PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, PresetsResource, type Project, ProjectsResource, PromptHelperResource, type PromptResult, type PublishedApp, type PublishedAppDetail, RateLimitedError, type RecaptionCreatureResult, type RecaptionLocationResult, type RecaptionObjectResult, type RecaptionResult, type RecastEstimate, RecastResource, type RecastRunSnapshot, type RecastScriptImportResult, type RecastScriptValidation, type RecastScriptValidationError, type ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type ResolveRecastGateInput, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, type Shot, type ShotEntityRef, type ShotMode, ShotsResource, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, type Template, type TemplateBrowseCard, type TemplateSort, TemplatesResource, type TutorialCategory, type TutorialFlowItem, type TutorialVideoItem, TutorialsResource, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, type UpdateShotInput, type UpdateWorkflowInput, type UploadResult, UploadsResource, type UpsertCharacterInput, type UpsertCharacterResult, type UpsertCreatureInput, type UpsertCreatureResult, type UpsertObjectInput, type UpsertObjectResult, type UserBalance, type UserIdentity, type VcpAnalysis, type VcpAnalysisSpeaker, type VcpAnalyzeInput, type VcpExportInput, type VcpExportTrack, type VideoMetadata, VideoProResource, type VoiceChangerProInput, type VoiceChangerProVoice, type VoiceDesignInput, type VoiceRemixInput, VoicesResource, type Workflow, WorkflowConflictError, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
|
|
5754
|
+
export { type AccessTokenResponse, type AnalyzeInput, type AnalyzeResult, type AppRun, type AppRunResult, type ApplyChatProposalResult, type ApproveCreatureMainImageResult, type ApproveMainImageResult, type ApproveObjectMainImageResult, type ApprovePortraitResult, AppsResource, AudioResource, type Auth, type BranchPipelineInput, type BranchPipelineResult, type BrowseTemplatesParams, type BrowseTemplatesResult, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, CatalogsResource, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, type CloneTemplateParams, type CloneTemplateResult, CommunityResource, type ContinueVideoProResult, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateOrgInput, type CreateProjectInput, type CreateRecastInput, type CreateShotInput, type CreateWorkflowInput, type CreateWorkspaceInput, type Creature, type CreatureAssetType, type CreatureDetail, type CreatureReferencePhoto, type CreatureReferencePhotoKind, CreaturesResource, CreditsResource, type DeleteAppRunResult, type DeveloperApp, type DeveloperAppScope, type DeveloperAppStatus, DeveloperAppsResource, type DownloadVideoProgress, type DubbingInput, type DuplicateCharacterInput, type EnhanceInput, type EstimateRecastInput, type EstimateRecastRescoreInput, type ExchangeCodeInput, type ExecutionStatus, type ExecutionTriggerType, ExecutionsResource, type FactoryPresetsResult, ForbiddenError, type GenerateAssetInput, type GenerateCharacterInput, type GenerateCharacterResult, type GenerateCreatureAssetInput, type GenerateCreatureAssetResult, type GenerateCreatureInput, type GenerateCreatureMotionInput, type GenerateCreatureMotionResult, type GenerateCreatureResult, type GenerateImageParams, type GenerateInput, type GenerateLocationAssetInput, type GenerateLocationInput, type GenerateLocationResult, type GenerateMotionInput, type GenerateObjectAssetInput, type GenerateObjectAssetResult, type GenerateObjectInput, type GenerateObjectMotionInput, type GenerateObjectMotionResult, type GenerateObjectResult, type GenerateSurroundContinuationInput, type GenerateVideoParams, type GetPickerCatalogOptions, InsufficientCreditsError, type InviteInput, type Job, JobAbortedError, JobFailedError, type JobStatus, type JobStatusResult, JobTimeoutError, JobsResource, type LibraryAsset, LibraryResource, type ListAppRunsParams, type ListAppsParams, type ListAppsResult, type ListCharactersParams, type ListCharactersResult, type ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListInvitationsOptions, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListModelsOptions, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, MediaResource, type ModelCostsResult, type ModelSummary, type ModelsListResult, ModelsResource, NodaroClient, NodaroError, type NodeCategory, type NodeDescriptor, type NodeExecutionState, type NodeInputField, type NodeInputSchema, type NodeJobOutput, type NodePreset, type NodePresetGroup, NodesResource, NotFoundError, type OAuthAppInfo, OAuthResource, type Object$1 as Object, type ObjectCategory, type ObjectDetail, type ObjectReferencePhoto, type ObjectReferencePhotoKind, ObjectsResource, OrganizationsResource, type OutputType, type PickerCatalog, type PickerCatalogSummary, PickerCatalogsResource, type PickerDimension, type PickerOption, PipelinesResource, PresetsResource, type Project, type ProjectedCatalog, type ProjectedCatalogDimension, type ProjectedCatalogOption, ProjectsResource, PromptHelperResource, type PromptResult, type PublishedApp, type PublishedAppDetail, RateLimitedError, type RecaptionCreatureResult, type RecaptionLocationResult, type RecaptionObjectResult, type RecaptionResult, type RecastAudioLayerName, type RecastAudioManifestV1, type RecastAudioMix, type RecastAudioMixControl, type RecastAudioSectionReplacement, type RecastEstimate, type RecastRescoreOperation, type RecastRescoreQuote, type RecastRescoreReplacement, type RecastRescoreRequestV2, type RecastRescoreResponse, RecastResource, type RecastRunSnapshot, type RecastScriptImportResult, type RecastScriptValidation, type RecastScriptValidationError, type ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type ResolveRecastGateInput, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, type Shot, type ShotEntityRef, type ShotMode, ShotsResource, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, type Template, type TemplateBrowseCard, type TemplateSort, TemplatesResource, type TutorialCategory, type TutorialFlowItem, type TutorialVideoItem, TutorialsResource, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, type UpdateShotInput, type UpdateWorkflowInput, type UploadResult, UploadsResource, type UpsertCharacterInput, type UpsertCharacterResult, type UpsertCreatureInput, type UpsertCreatureResult, type UpsertObjectInput, type UpsertObjectResult, type UserBalance, type UserIdentity, type VcpAnalysis, type VcpAnalysisSpeaker, type VcpAnalyzeInput, type VcpExportInput, type VcpExportTrack, type VideoMetadata, VideoProResource, type VoiceChangerProInput, type VoiceChangerProVoice, type VoiceDesignInput, type VoiceRemixInput, VoicesResource, type Workflow, WorkflowConflictError, type WorkflowExecution, type WorkflowExecutionSummary, WorkflowsResource, WorkspacesResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
|