@nodaro/sdk 1.12.0 → 1.13.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 +42 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +180 -1
- package/dist/index.d.ts +180 -1
- package/dist/index.js +41 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -237,6 +237,15 @@ interface Job {
|
|
|
237
237
|
created_at: string;
|
|
238
238
|
started_at: string | null;
|
|
239
239
|
completed_at: string | null;
|
|
240
|
+
/**
|
|
241
|
+
* Provenance: which kind of caller created the job — one of
|
|
242
|
+
* `"internal" | "mcp" | "app" | "cli" | "sdk" | "extension" | "web" | "api"`.
|
|
243
|
+
* `source_detail` narrows it (origin host, `extension/<name>` label,
|
|
244
|
+
* `sdk/<version>`, MCP client name, developer-app id). Descriptive only;
|
|
245
|
+
* lets a library view label or filter media by origin.
|
|
246
|
+
*/
|
|
247
|
+
source?: string | null;
|
|
248
|
+
source_detail?: string | null;
|
|
240
249
|
}
|
|
241
250
|
interface CancelJobResult {
|
|
242
251
|
success: true;
|
|
@@ -4171,6 +4180,16 @@ interface LibraryAsset {
|
|
|
4171
4180
|
readonly isLibraryItem: boolean;
|
|
4172
4181
|
/** How the asset entered storage (e.g. "manual_upload" | "generated"). */
|
|
4173
4182
|
readonly uploadSource: string;
|
|
4183
|
+
/**
|
|
4184
|
+
* WHICH SURFACE the media came from — `"internal" | "mcp" | "app" | "cli" |
|
|
4185
|
+
* "sdk" | "extension" | "web" | "api"`. Distinct from `uploadSource`, which
|
|
4186
|
+
* says how it entered storage (uploaded vs generated), not who was calling.
|
|
4187
|
+
* `null` on assets created before origin tracking existed — render as
|
|
4188
|
+
* "unknown", don't infer.
|
|
4189
|
+
*/
|
|
4190
|
+
readonly source: string | null;
|
|
4191
|
+
/** Specific identity within `source` (origin host, `extension/<name>`, `sdk/<version>`, MCP client, app id). */
|
|
4192
|
+
readonly sourceDetail: string | null;
|
|
4174
4193
|
readonly createdAt: string;
|
|
4175
4194
|
}
|
|
4176
4195
|
interface ListLibraryParams {
|
|
@@ -4189,6 +4208,13 @@ interface ListLibraryParams {
|
|
|
4189
4208
|
* Media Library picker).
|
|
4190
4209
|
*/
|
|
4191
4210
|
readonly owned?: boolean;
|
|
4211
|
+
/**
|
|
4212
|
+
* Filter to media that originated from one surface (see
|
|
4213
|
+
* {@link LibraryAsset.source}) — e.g. `"extension"` for everything a
|
|
4214
|
+
* browser extension produced. Assets predating origin tracking have a null
|
|
4215
|
+
* source and match no value, so they appear only when this is omitted.
|
|
4216
|
+
*/
|
|
4217
|
+
readonly source?: "internal" | "mcp" | "app" | "cli" | "sdk" | "extension" | "web" | "api";
|
|
4192
4218
|
}
|
|
4193
4219
|
interface ListLibraryResult {
|
|
4194
4220
|
readonly data: LibraryAsset[];
|
|
@@ -4429,6 +4455,151 @@ declare class CommunityResource {
|
|
|
4429
4455
|
}>;
|
|
4430
4456
|
}
|
|
4431
4457
|
|
|
4458
|
+
/**
|
|
4459
|
+
* Workflow-template marketplace — the PUBLIC-BY-DESIGN surfaces only:
|
|
4460
|
+
* browse cards, a single template with its full snapshot, and the free
|
|
4461
|
+
* clone-into-my-project action. Creator/admin surfaces (publish, mine,
|
|
4462
|
+
* favorites, metadata patch, tutorial flags) are deliberately NOT part of
|
|
4463
|
+
* the public SDK contract; first-party apps reach them via
|
|
4464
|
+
* `client.request()`.
|
|
4465
|
+
*/
|
|
4466
|
+
/** Card returned by the marketplace browse (no snapshot payload). */
|
|
4467
|
+
interface TemplateBrowseCard {
|
|
4468
|
+
id: string;
|
|
4469
|
+
slug: string;
|
|
4470
|
+
name: string;
|
|
4471
|
+
description: string | null;
|
|
4472
|
+
estimatedCredits: number;
|
|
4473
|
+
category: string;
|
|
4474
|
+
outputTypes: string[];
|
|
4475
|
+
tags: string[];
|
|
4476
|
+
nodeTypesUsed: string[];
|
|
4477
|
+
providersUsed: string[];
|
|
4478
|
+
nodeCount: number;
|
|
4479
|
+
complexity: string;
|
|
4480
|
+
previewMediaUrl: string | null;
|
|
4481
|
+
previewMediaType: "image" | "video" | null;
|
|
4482
|
+
creatorId: string;
|
|
4483
|
+
creatorDisplayName: string | null;
|
|
4484
|
+
cloneCount: number;
|
|
4485
|
+
favoriteCount: number;
|
|
4486
|
+
createdAt: string;
|
|
4487
|
+
}
|
|
4488
|
+
type TemplateSort = "newest" | "popular" | "most-favorited";
|
|
4489
|
+
interface BrowseTemplatesParams {
|
|
4490
|
+
/** Opaque cursor from the previous page's `nextCursor`. */
|
|
4491
|
+
cursor?: string;
|
|
4492
|
+
limit?: number;
|
|
4493
|
+
category?: string;
|
|
4494
|
+
outputType?: string;
|
|
4495
|
+
tag?: string;
|
|
4496
|
+
/** Full-text search over name/description/tags. */
|
|
4497
|
+
search?: string;
|
|
4498
|
+
sort?: TemplateSort;
|
|
4499
|
+
/** Only templates using this node type. */
|
|
4500
|
+
nodeType?: string;
|
|
4501
|
+
/** Only templates using this provider/model id. */
|
|
4502
|
+
provider?: string;
|
|
4503
|
+
complexity?: string;
|
|
4504
|
+
}
|
|
4505
|
+
interface BrowseTemplatesResult {
|
|
4506
|
+
data: TemplateBrowseCard[];
|
|
4507
|
+
/** Pass back as `cursor` to fetch the next page; `null` on the last page. */
|
|
4508
|
+
nextCursor: string | null;
|
|
4509
|
+
}
|
|
4510
|
+
/**
|
|
4511
|
+
* A single public template (`GET /v1/templates/:slug`) — the browse-card
|
|
4512
|
+
* fields plus the full workflow snapshot the viewer/clone consume. The route
|
|
4513
|
+
* returns the whole camelCased row, so additional columns may appear beyond
|
|
4514
|
+
* the ones typed here; the index signature keeps them reachable without
|
|
4515
|
+
* casting.
|
|
4516
|
+
*/
|
|
4517
|
+
interface Template extends TemplateBrowseCard {
|
|
4518
|
+
markdownDescription: string | null;
|
|
4519
|
+
/** React Flow node snapshots (generic node JSON, execution data stripped on clone). */
|
|
4520
|
+
snapshotNodes: unknown[];
|
|
4521
|
+
snapshotEdges: unknown[];
|
|
4522
|
+
snapshotSettings: Record<string, unknown>;
|
|
4523
|
+
/** Channels the template is listed in (e.g. "marketplace", "tutorial"). */
|
|
4524
|
+
listedIn: string[];
|
|
4525
|
+
readonly [key: string]: unknown;
|
|
4526
|
+
}
|
|
4527
|
+
interface CloneTemplateParams {
|
|
4528
|
+
/** Target project (must belong to the caller). */
|
|
4529
|
+
projectId: string;
|
|
4530
|
+
/** Optional name for the cloned workflow; defaults to the template's name. */
|
|
4531
|
+
name?: string;
|
|
4532
|
+
}
|
|
4533
|
+
interface CloneTemplateResult {
|
|
4534
|
+
workflowId: string;
|
|
4535
|
+
projectId: string;
|
|
4536
|
+
}
|
|
4537
|
+
declare class TemplatesResource {
|
|
4538
|
+
private client;
|
|
4539
|
+
constructor(client: NodaroClient);
|
|
4540
|
+
/** Browse the public template marketplace (cursor-paginated, no auth required). */
|
|
4541
|
+
browse(params?: BrowseTemplatesParams): Promise<BrowseTemplatesResult>;
|
|
4542
|
+
/** Fetch one public template by slug, including its full workflow snapshot. */
|
|
4543
|
+
get(slug: string): Promise<Template>;
|
|
4544
|
+
/** Clone a template into one of the caller's projects. Free — no credits charged. */
|
|
4545
|
+
clone(slug: string, params: CloneTemplateParams): Promise<CloneTemplateResult>;
|
|
4546
|
+
}
|
|
4547
|
+
|
|
4548
|
+
/**
|
|
4549
|
+
* Public tutorials directory (`GET /v1/tutorials`) — video tutorials and
|
|
4550
|
+
* flow (template) tutorials, pre-grouped under the shared category taxonomy.
|
|
4551
|
+
* Read-only by design; curation is an admin surface outside the public SDK.
|
|
4552
|
+
*/
|
|
4553
|
+
interface TutorialVideoItem {
|
|
4554
|
+
id: string;
|
|
4555
|
+
type: "video";
|
|
4556
|
+
title: string;
|
|
4557
|
+
description: string | null;
|
|
4558
|
+
videoUrl: string;
|
|
4559
|
+
thumbnailUrl: string | null;
|
|
4560
|
+
categoryId: string;
|
|
4561
|
+
sortOrder: number;
|
|
4562
|
+
createdAt: string;
|
|
4563
|
+
updatedAt: string;
|
|
4564
|
+
}
|
|
4565
|
+
/** A workflow template surfaced as a tutorial; `slug` feeds `client.templates`. */
|
|
4566
|
+
interface TutorialFlowItem {
|
|
4567
|
+
id: string;
|
|
4568
|
+
type: "flow";
|
|
4569
|
+
templateId: string;
|
|
4570
|
+
slug: string | null;
|
|
4571
|
+
title: string;
|
|
4572
|
+
description: string | null;
|
|
4573
|
+
markdownDescription: string | null;
|
|
4574
|
+
previewMediaUrl: string | null;
|
|
4575
|
+
previewMediaType: "image" | "video" | null;
|
|
4576
|
+
complexity: string;
|
|
4577
|
+
estimatedCredits: number;
|
|
4578
|
+
nodeTypesUsed: string[];
|
|
4579
|
+
providersUsed: string[];
|
|
4580
|
+
nodeCount: number;
|
|
4581
|
+
categoryId: string;
|
|
4582
|
+
tutorialSortOrder: number;
|
|
4583
|
+
workflowId: string;
|
|
4584
|
+
createdAt: string;
|
|
4585
|
+
}
|
|
4586
|
+
interface TutorialCategory {
|
|
4587
|
+
id: string;
|
|
4588
|
+
name: string;
|
|
4589
|
+
slug: string;
|
|
4590
|
+
sortOrder: number;
|
|
4591
|
+
videos: TutorialVideoItem[];
|
|
4592
|
+
flows: TutorialFlowItem[];
|
|
4593
|
+
}
|
|
4594
|
+
declare class TutorialsResource {
|
|
4595
|
+
private client;
|
|
4596
|
+
constructor(client: NodaroClient);
|
|
4597
|
+
/** All enabled tutorial categories with their videos and flow tutorials. Public. */
|
|
4598
|
+
list(): Promise<{
|
|
4599
|
+
categories: TutorialCategory[];
|
|
4600
|
+
}>;
|
|
4601
|
+
}
|
|
4602
|
+
|
|
4432
4603
|
interface ClientOptions {
|
|
4433
4604
|
/** Backend base URL, e.g. "https://nodaro.example.com" or empty string for same-origin. */
|
|
4434
4605
|
baseUrl: string;
|
|
@@ -4469,6 +4640,12 @@ interface UserIdentity {
|
|
|
4469
4640
|
readonly avatarUrl: string | null;
|
|
4470
4641
|
/** Subscription tier (e.g. "free", "pro"). */
|
|
4471
4642
|
readonly tier: string;
|
|
4643
|
+
/**
|
|
4644
|
+
* Whether the user holds an admin role. DESCRIPTIVE only — use it to decide
|
|
4645
|
+
* whether to render admin surfaces without capability-probing an admin
|
|
4646
|
+
* endpoint; every admin API stays enforced server-side regardless.
|
|
4647
|
+
*/
|
|
4648
|
+
readonly isAdmin: boolean;
|
|
4472
4649
|
}
|
|
4473
4650
|
declare class NodaroClient {
|
|
4474
4651
|
readonly baseUrl: string;
|
|
@@ -4511,6 +4688,8 @@ declare class NodaroClient {
|
|
|
4511
4688
|
readonly presets: PresetsResource;
|
|
4512
4689
|
readonly pickerCatalogs: PickerCatalogsResource;
|
|
4513
4690
|
readonly community: CommunityResource;
|
|
4691
|
+
readonly templates: TemplatesResource;
|
|
4692
|
+
readonly tutorials: TutorialsResource;
|
|
4514
4693
|
constructor(opts: ClientOptions);
|
|
4515
4694
|
request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
|
|
4516
4695
|
/**
|
|
@@ -4612,4 +4791,4 @@ interface ApiErrorBody {
|
|
|
4612
4791
|
}
|
|
4613
4792
|
declare function throwFromResponse(status: number, body: ApiErrorBody): never;
|
|
4614
4793
|
|
|
4615
|
-
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, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, CommunityResource, type ContinueVideoProResult, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateProjectInput, 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 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 ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, MediaResource, type ModelCostsResult, 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 ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, 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 };
|
|
4794
|
+
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 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 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 ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, MediaResource, type ModelCostsResult, 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 ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, 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 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -237,6 +237,15 @@ interface Job {
|
|
|
237
237
|
created_at: string;
|
|
238
238
|
started_at: string | null;
|
|
239
239
|
completed_at: string | null;
|
|
240
|
+
/**
|
|
241
|
+
* Provenance: which kind of caller created the job — one of
|
|
242
|
+
* `"internal" | "mcp" | "app" | "cli" | "sdk" | "extension" | "web" | "api"`.
|
|
243
|
+
* `source_detail` narrows it (origin host, `extension/<name>` label,
|
|
244
|
+
* `sdk/<version>`, MCP client name, developer-app id). Descriptive only;
|
|
245
|
+
* lets a library view label or filter media by origin.
|
|
246
|
+
*/
|
|
247
|
+
source?: string | null;
|
|
248
|
+
source_detail?: string | null;
|
|
240
249
|
}
|
|
241
250
|
interface CancelJobResult {
|
|
242
251
|
success: true;
|
|
@@ -4171,6 +4180,16 @@ interface LibraryAsset {
|
|
|
4171
4180
|
readonly isLibraryItem: boolean;
|
|
4172
4181
|
/** How the asset entered storage (e.g. "manual_upload" | "generated"). */
|
|
4173
4182
|
readonly uploadSource: string;
|
|
4183
|
+
/**
|
|
4184
|
+
* WHICH SURFACE the media came from — `"internal" | "mcp" | "app" | "cli" |
|
|
4185
|
+
* "sdk" | "extension" | "web" | "api"`. Distinct from `uploadSource`, which
|
|
4186
|
+
* says how it entered storage (uploaded vs generated), not who was calling.
|
|
4187
|
+
* `null` on assets created before origin tracking existed — render as
|
|
4188
|
+
* "unknown", don't infer.
|
|
4189
|
+
*/
|
|
4190
|
+
readonly source: string | null;
|
|
4191
|
+
/** Specific identity within `source` (origin host, `extension/<name>`, `sdk/<version>`, MCP client, app id). */
|
|
4192
|
+
readonly sourceDetail: string | null;
|
|
4174
4193
|
readonly createdAt: string;
|
|
4175
4194
|
}
|
|
4176
4195
|
interface ListLibraryParams {
|
|
@@ -4189,6 +4208,13 @@ interface ListLibraryParams {
|
|
|
4189
4208
|
* Media Library picker).
|
|
4190
4209
|
*/
|
|
4191
4210
|
readonly owned?: boolean;
|
|
4211
|
+
/**
|
|
4212
|
+
* Filter to media that originated from one surface (see
|
|
4213
|
+
* {@link LibraryAsset.source}) — e.g. `"extension"` for everything a
|
|
4214
|
+
* browser extension produced. Assets predating origin tracking have a null
|
|
4215
|
+
* source and match no value, so they appear only when this is omitted.
|
|
4216
|
+
*/
|
|
4217
|
+
readonly source?: "internal" | "mcp" | "app" | "cli" | "sdk" | "extension" | "web" | "api";
|
|
4192
4218
|
}
|
|
4193
4219
|
interface ListLibraryResult {
|
|
4194
4220
|
readonly data: LibraryAsset[];
|
|
@@ -4429,6 +4455,151 @@ declare class CommunityResource {
|
|
|
4429
4455
|
}>;
|
|
4430
4456
|
}
|
|
4431
4457
|
|
|
4458
|
+
/**
|
|
4459
|
+
* Workflow-template marketplace — the PUBLIC-BY-DESIGN surfaces only:
|
|
4460
|
+
* browse cards, a single template with its full snapshot, and the free
|
|
4461
|
+
* clone-into-my-project action. Creator/admin surfaces (publish, mine,
|
|
4462
|
+
* favorites, metadata patch, tutorial flags) are deliberately NOT part of
|
|
4463
|
+
* the public SDK contract; first-party apps reach them via
|
|
4464
|
+
* `client.request()`.
|
|
4465
|
+
*/
|
|
4466
|
+
/** Card returned by the marketplace browse (no snapshot payload). */
|
|
4467
|
+
interface TemplateBrowseCard {
|
|
4468
|
+
id: string;
|
|
4469
|
+
slug: string;
|
|
4470
|
+
name: string;
|
|
4471
|
+
description: string | null;
|
|
4472
|
+
estimatedCredits: number;
|
|
4473
|
+
category: string;
|
|
4474
|
+
outputTypes: string[];
|
|
4475
|
+
tags: string[];
|
|
4476
|
+
nodeTypesUsed: string[];
|
|
4477
|
+
providersUsed: string[];
|
|
4478
|
+
nodeCount: number;
|
|
4479
|
+
complexity: string;
|
|
4480
|
+
previewMediaUrl: string | null;
|
|
4481
|
+
previewMediaType: "image" | "video" | null;
|
|
4482
|
+
creatorId: string;
|
|
4483
|
+
creatorDisplayName: string | null;
|
|
4484
|
+
cloneCount: number;
|
|
4485
|
+
favoriteCount: number;
|
|
4486
|
+
createdAt: string;
|
|
4487
|
+
}
|
|
4488
|
+
type TemplateSort = "newest" | "popular" | "most-favorited";
|
|
4489
|
+
interface BrowseTemplatesParams {
|
|
4490
|
+
/** Opaque cursor from the previous page's `nextCursor`. */
|
|
4491
|
+
cursor?: string;
|
|
4492
|
+
limit?: number;
|
|
4493
|
+
category?: string;
|
|
4494
|
+
outputType?: string;
|
|
4495
|
+
tag?: string;
|
|
4496
|
+
/** Full-text search over name/description/tags. */
|
|
4497
|
+
search?: string;
|
|
4498
|
+
sort?: TemplateSort;
|
|
4499
|
+
/** Only templates using this node type. */
|
|
4500
|
+
nodeType?: string;
|
|
4501
|
+
/** Only templates using this provider/model id. */
|
|
4502
|
+
provider?: string;
|
|
4503
|
+
complexity?: string;
|
|
4504
|
+
}
|
|
4505
|
+
interface BrowseTemplatesResult {
|
|
4506
|
+
data: TemplateBrowseCard[];
|
|
4507
|
+
/** Pass back as `cursor` to fetch the next page; `null` on the last page. */
|
|
4508
|
+
nextCursor: string | null;
|
|
4509
|
+
}
|
|
4510
|
+
/**
|
|
4511
|
+
* A single public template (`GET /v1/templates/:slug`) — the browse-card
|
|
4512
|
+
* fields plus the full workflow snapshot the viewer/clone consume. The route
|
|
4513
|
+
* returns the whole camelCased row, so additional columns may appear beyond
|
|
4514
|
+
* the ones typed here; the index signature keeps them reachable without
|
|
4515
|
+
* casting.
|
|
4516
|
+
*/
|
|
4517
|
+
interface Template extends TemplateBrowseCard {
|
|
4518
|
+
markdownDescription: string | null;
|
|
4519
|
+
/** React Flow node snapshots (generic node JSON, execution data stripped on clone). */
|
|
4520
|
+
snapshotNodes: unknown[];
|
|
4521
|
+
snapshotEdges: unknown[];
|
|
4522
|
+
snapshotSettings: Record<string, unknown>;
|
|
4523
|
+
/** Channels the template is listed in (e.g. "marketplace", "tutorial"). */
|
|
4524
|
+
listedIn: string[];
|
|
4525
|
+
readonly [key: string]: unknown;
|
|
4526
|
+
}
|
|
4527
|
+
interface CloneTemplateParams {
|
|
4528
|
+
/** Target project (must belong to the caller). */
|
|
4529
|
+
projectId: string;
|
|
4530
|
+
/** Optional name for the cloned workflow; defaults to the template's name. */
|
|
4531
|
+
name?: string;
|
|
4532
|
+
}
|
|
4533
|
+
interface CloneTemplateResult {
|
|
4534
|
+
workflowId: string;
|
|
4535
|
+
projectId: string;
|
|
4536
|
+
}
|
|
4537
|
+
declare class TemplatesResource {
|
|
4538
|
+
private client;
|
|
4539
|
+
constructor(client: NodaroClient);
|
|
4540
|
+
/** Browse the public template marketplace (cursor-paginated, no auth required). */
|
|
4541
|
+
browse(params?: BrowseTemplatesParams): Promise<BrowseTemplatesResult>;
|
|
4542
|
+
/** Fetch one public template by slug, including its full workflow snapshot. */
|
|
4543
|
+
get(slug: string): Promise<Template>;
|
|
4544
|
+
/** Clone a template into one of the caller's projects. Free — no credits charged. */
|
|
4545
|
+
clone(slug: string, params: CloneTemplateParams): Promise<CloneTemplateResult>;
|
|
4546
|
+
}
|
|
4547
|
+
|
|
4548
|
+
/**
|
|
4549
|
+
* Public tutorials directory (`GET /v1/tutorials`) — video tutorials and
|
|
4550
|
+
* flow (template) tutorials, pre-grouped under the shared category taxonomy.
|
|
4551
|
+
* Read-only by design; curation is an admin surface outside the public SDK.
|
|
4552
|
+
*/
|
|
4553
|
+
interface TutorialVideoItem {
|
|
4554
|
+
id: string;
|
|
4555
|
+
type: "video";
|
|
4556
|
+
title: string;
|
|
4557
|
+
description: string | null;
|
|
4558
|
+
videoUrl: string;
|
|
4559
|
+
thumbnailUrl: string | null;
|
|
4560
|
+
categoryId: string;
|
|
4561
|
+
sortOrder: number;
|
|
4562
|
+
createdAt: string;
|
|
4563
|
+
updatedAt: string;
|
|
4564
|
+
}
|
|
4565
|
+
/** A workflow template surfaced as a tutorial; `slug` feeds `client.templates`. */
|
|
4566
|
+
interface TutorialFlowItem {
|
|
4567
|
+
id: string;
|
|
4568
|
+
type: "flow";
|
|
4569
|
+
templateId: string;
|
|
4570
|
+
slug: string | null;
|
|
4571
|
+
title: string;
|
|
4572
|
+
description: string | null;
|
|
4573
|
+
markdownDescription: string | null;
|
|
4574
|
+
previewMediaUrl: string | null;
|
|
4575
|
+
previewMediaType: "image" | "video" | null;
|
|
4576
|
+
complexity: string;
|
|
4577
|
+
estimatedCredits: number;
|
|
4578
|
+
nodeTypesUsed: string[];
|
|
4579
|
+
providersUsed: string[];
|
|
4580
|
+
nodeCount: number;
|
|
4581
|
+
categoryId: string;
|
|
4582
|
+
tutorialSortOrder: number;
|
|
4583
|
+
workflowId: string;
|
|
4584
|
+
createdAt: string;
|
|
4585
|
+
}
|
|
4586
|
+
interface TutorialCategory {
|
|
4587
|
+
id: string;
|
|
4588
|
+
name: string;
|
|
4589
|
+
slug: string;
|
|
4590
|
+
sortOrder: number;
|
|
4591
|
+
videos: TutorialVideoItem[];
|
|
4592
|
+
flows: TutorialFlowItem[];
|
|
4593
|
+
}
|
|
4594
|
+
declare class TutorialsResource {
|
|
4595
|
+
private client;
|
|
4596
|
+
constructor(client: NodaroClient);
|
|
4597
|
+
/** All enabled tutorial categories with their videos and flow tutorials. Public. */
|
|
4598
|
+
list(): Promise<{
|
|
4599
|
+
categories: TutorialCategory[];
|
|
4600
|
+
}>;
|
|
4601
|
+
}
|
|
4602
|
+
|
|
4432
4603
|
interface ClientOptions {
|
|
4433
4604
|
/** Backend base URL, e.g. "https://nodaro.example.com" or empty string for same-origin. */
|
|
4434
4605
|
baseUrl: string;
|
|
@@ -4469,6 +4640,12 @@ interface UserIdentity {
|
|
|
4469
4640
|
readonly avatarUrl: string | null;
|
|
4470
4641
|
/** Subscription tier (e.g. "free", "pro"). */
|
|
4471
4642
|
readonly tier: string;
|
|
4643
|
+
/**
|
|
4644
|
+
* Whether the user holds an admin role. DESCRIPTIVE only — use it to decide
|
|
4645
|
+
* whether to render admin surfaces without capability-probing an admin
|
|
4646
|
+
* endpoint; every admin API stays enforced server-side regardless.
|
|
4647
|
+
*/
|
|
4648
|
+
readonly isAdmin: boolean;
|
|
4472
4649
|
}
|
|
4473
4650
|
declare class NodaroClient {
|
|
4474
4651
|
readonly baseUrl: string;
|
|
@@ -4511,6 +4688,8 @@ declare class NodaroClient {
|
|
|
4511
4688
|
readonly presets: PresetsResource;
|
|
4512
4689
|
readonly pickerCatalogs: PickerCatalogsResource;
|
|
4513
4690
|
readonly community: CommunityResource;
|
|
4691
|
+
readonly templates: TemplatesResource;
|
|
4692
|
+
readonly tutorials: TutorialsResource;
|
|
4514
4693
|
constructor(opts: ClientOptions);
|
|
4515
4694
|
request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
|
|
4516
4695
|
/**
|
|
@@ -4612,4 +4791,4 @@ interface ApiErrorBody {
|
|
|
4612
4791
|
}
|
|
4613
4792
|
declare function throwFromResponse(status: number, body: ApiErrorBody): never;
|
|
4614
4793
|
|
|
4615
|
-
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, CREATURE_ASSET_TYPES, CallbackAuth, type CancelExecutionParams, type CancelJobResult, type Character, type CharacterDetail, type CharacterUsage, CharactersResource, type ChatStageResult, type ChatTurn, type ClientOptions, CommunityResource, type ContinueVideoProResult, type CreateCreatureInput, type CreateDeveloperAppInput, type CreateDeveloperAppResult, type CreateLocationInput, type CreateObjectInput, type CreateProjectInput, 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 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 ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, MediaResource, type ModelCostsResult, 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 ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, StaticTokenAuth, type StopVideoProResult, StorageExceededError, type StructuredReferenceParams, UnauthorizedError, type UpdateCreatureInput, type UpdateCreatureResult, type UpdateDeveloperAppInput, type UpdateLocationInput, type UpdateLocationResult, type UpdateObjectInput, type UpdateObjectResult, type UpdateProjectInput, 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 };
|
|
4794
|
+
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 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 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 ListCreaturesParams, type ListExecutionsForWorkflowParams, type ListExecutionsPage, type ListLibraryParams, type ListLibraryResult, type ListLocationsParams, type ListObjectsParams, type ListWorkflowsParams, type Location, type LocationDetail, type LocationReferencePhoto, type LocationReferencePhotoKind, LocationsResource, MediaResource, type ModelCostsResult, 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 ReduceInput, ReduceResource, type ReduceResult, type ReferencePhoto, type ReferencePhotoKind, type RotateSecretResult, type RunAndWaitOptions, type RunManyResult, type RunNodeResult, type RunWorkflowParams, type RunWorkflowResult, 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 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 };
|
package/dist/index.js
CHANGED
|
@@ -1932,6 +1932,7 @@ var LibraryResource = class {
|
|
|
1932
1932
|
if (params.limit !== void 0) qs.set("limit", String(params.limit));
|
|
1933
1933
|
if (params.cursor) qs.set("cursor", params.cursor);
|
|
1934
1934
|
if (params.owned !== void 0) qs.set("owned", String(params.owned));
|
|
1935
|
+
if (params.source) qs.set("source", params.source);
|
|
1935
1936
|
const query = qs.toString();
|
|
1936
1937
|
return this.client.request("GET", `/v1/library${query ? `?${query}` : ""}`);
|
|
1937
1938
|
}
|
|
@@ -2116,8 +2117,42 @@ var CommunityResource = class {
|
|
|
2116
2117
|
}
|
|
2117
2118
|
};
|
|
2118
2119
|
|
|
2120
|
+
// src/resources/templates.ts
|
|
2121
|
+
var TemplatesResource = class {
|
|
2122
|
+
constructor(client) {
|
|
2123
|
+
this.client = client;
|
|
2124
|
+
}
|
|
2125
|
+
client;
|
|
2126
|
+
/** Browse the public template marketplace (cursor-paginated, no auth required). */
|
|
2127
|
+
browse(params = {}) {
|
|
2128
|
+
return this.client.request("GET", "/v1/templates/browse", { query: { ...params } });
|
|
2129
|
+
}
|
|
2130
|
+
/** Fetch one public template by slug, including its full workflow snapshot. */
|
|
2131
|
+
get(slug) {
|
|
2132
|
+
return this.client.request("GET", `/v1/templates/${encodeURIComponent(slug)}`);
|
|
2133
|
+
}
|
|
2134
|
+
/** Clone a template into one of the caller's projects. Free — no credits charged. */
|
|
2135
|
+
clone(slug, params) {
|
|
2136
|
+
return this.client.request("POST", `/v1/templates/${encodeURIComponent(slug)}/clone`, {
|
|
2137
|
+
body: params
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2140
|
+
};
|
|
2141
|
+
|
|
2142
|
+
// src/resources/tutorials.ts
|
|
2143
|
+
var TutorialsResource = class {
|
|
2144
|
+
constructor(client) {
|
|
2145
|
+
this.client = client;
|
|
2146
|
+
}
|
|
2147
|
+
client;
|
|
2148
|
+
/** All enabled tutorial categories with their videos and flow tutorials. Public. */
|
|
2149
|
+
list() {
|
|
2150
|
+
return this.client.request("GET", "/v1/tutorials");
|
|
2151
|
+
}
|
|
2152
|
+
};
|
|
2153
|
+
|
|
2119
2154
|
// src/client.ts
|
|
2120
|
-
var SDK_VERSION = "1.
|
|
2155
|
+
var SDK_VERSION = "1.13.0" ;
|
|
2121
2156
|
var CLIENT_HEADER = "X-Nodaro-Client";
|
|
2122
2157
|
var isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
2123
2158
|
var NodaroClient = class {
|
|
@@ -2163,6 +2198,8 @@ var NodaroClient = class {
|
|
|
2163
2198
|
presets;
|
|
2164
2199
|
pickerCatalogs;
|
|
2165
2200
|
community;
|
|
2201
|
+
templates;
|
|
2202
|
+
tutorials;
|
|
2166
2203
|
constructor(opts) {
|
|
2167
2204
|
this.baseUrl = opts.baseUrl.replace(/\/$/, "");
|
|
2168
2205
|
this.auth = opts.auth;
|
|
@@ -2195,6 +2232,8 @@ var NodaroClient = class {
|
|
|
2195
2232
|
this.presets = new PresetsResource(this);
|
|
2196
2233
|
this.pickerCatalogs = new PickerCatalogsResource(this);
|
|
2197
2234
|
this.community = new CommunityResource(this);
|
|
2235
|
+
this.templates = new TemplatesResource(this);
|
|
2236
|
+
this.tutorials = new TutorialsResource(this);
|
|
2198
2237
|
}
|
|
2199
2238
|
async request(method, path, options = {}) {
|
|
2200
2239
|
const url = this.buildUrl(path, options.query);
|
|
@@ -2287,6 +2326,6 @@ function supabaseAuth(supabase) {
|
|
|
2287
2326
|
};
|
|
2288
2327
|
}
|
|
2289
2328
|
|
|
2290
|
-
export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CharactersResource, CommunityResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobFailedError, JobTimeoutError, JobsResource, LibraryResource, LocationsResource, MediaResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, ReduceResource, StaticTokenAuth, StorageExceededError, UnauthorizedError, UploadsResource, VideoProResource, VoicesResource, WorkflowConflictError, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
|
|
2329
|
+
export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CharactersResource, CommunityResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobFailedError, JobTimeoutError, JobsResource, LibraryResource, LocationsResource, MediaResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, ReduceResource, StaticTokenAuth, StorageExceededError, TemplatesResource, TutorialsResource, UnauthorizedError, UploadsResource, VideoProResource, VoicesResource, WorkflowConflictError, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
|
|
2291
2330
|
//# sourceMappingURL=index.js.map
|
|
2292
2331
|
//# sourceMappingURL=index.js.map
|