@nodaro/sdk 1.13.1 → 1.15.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 +46 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +127 -5
- package/dist/index.d.ts +127 -5
- package/dist/index.js +46 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -592,12 +592,29 @@ var CharactersResource = class {
|
|
|
592
592
|
* pass `archived: true` to fetch soft-deleted rows for an "archive" view.
|
|
593
593
|
* When `projectId` is set, only characters belonging to that project are
|
|
594
594
|
* returned.
|
|
595
|
+
*
|
|
596
|
+
* Cursor-paginated: a response carrying a non-null `nextCursor` means more
|
|
597
|
+
* rows exist. Pass it back as `cursor` to fetch the next page, and keep going
|
|
598
|
+
* until `nextCursor` is `null` — a single call returns at most `limit` rows
|
|
599
|
+
* (default 100), so treating one call as "all characters" silently truncates
|
|
600
|
+
* the list for anyone past that count.
|
|
601
|
+
*
|
|
602
|
+
* ```ts
|
|
603
|
+
* const all: Character[] = []
|
|
604
|
+
* let cursor: string | undefined
|
|
605
|
+
* do {
|
|
606
|
+
* const page = await client.characters.list({ cursor })
|
|
607
|
+
* all.push(...page.characters)
|
|
608
|
+
* cursor = page.nextCursor ?? undefined
|
|
609
|
+
* } while (cursor)
|
|
610
|
+
* ```
|
|
595
611
|
*/
|
|
596
612
|
list(params = {}) {
|
|
597
613
|
const query = {};
|
|
598
614
|
if (params.projectId) query.projectId = params.projectId;
|
|
599
615
|
if (params.archived) query.archived = "true";
|
|
600
616
|
if (params.limit !== void 0) query.limit = String(params.limit);
|
|
617
|
+
if (params.cursor) query.cursor = params.cursor;
|
|
601
618
|
return this.client.request("GET", "/v1/characters", { query });
|
|
602
619
|
}
|
|
603
620
|
/**
|
|
@@ -1986,6 +2003,11 @@ var PickerCatalogsResource = class {
|
|
|
1986
2003
|
list() {
|
|
1987
2004
|
return this.client.request("GET", "/v1/picker-catalogs");
|
|
1988
2005
|
}
|
|
2006
|
+
/** Fill pickers from a free-text description (Cine "AI Fill"): returns the
|
|
2007
|
+
* same pickerJson shape as describe-to-picker, keyed by picker node type. */
|
|
2008
|
+
analyzeText(params) {
|
|
2009
|
+
return this.client.request("POST", "/v1/text-to-picker", { body: params });
|
|
2010
|
+
}
|
|
1989
2011
|
/** Get one picker's catalog of valid values. */
|
|
1990
2012
|
get(nodeType, opts = {}) {
|
|
1991
2013
|
const qs = new URLSearchParams();
|
|
@@ -2000,6 +2022,26 @@ var PickerCatalogsResource = class {
|
|
|
2000
2022
|
}
|
|
2001
2023
|
};
|
|
2002
2024
|
|
|
2025
|
+
// src/resources/models.ts
|
|
2026
|
+
var ModelsResource = class {
|
|
2027
|
+
constructor(client) {
|
|
2028
|
+
this.client = client;
|
|
2029
|
+
}
|
|
2030
|
+
client;
|
|
2031
|
+
/** Browse the models available on this instance — capability sheets,
|
|
2032
|
+
* per-variant credit pricing, prompt tips, and the `doctrineCovered`
|
|
2033
|
+
* truth flag. Public endpoint; cached 5 minutes. */
|
|
2034
|
+
list(opts = {}) {
|
|
2035
|
+
const qs = new URLSearchParams();
|
|
2036
|
+
if (opts.kind) qs.set("kind", opts.kind);
|
|
2037
|
+
if (opts.mode) qs.set("mode", opts.mode);
|
|
2038
|
+
if (opts.family) qs.set("family", opts.family);
|
|
2039
|
+
if (opts.featuredOnly) qs.set("featuredOnly", "true");
|
|
2040
|
+
const query = qs.toString();
|
|
2041
|
+
return this.client.request("GET", `/v1/models${query ? `?${query}` : ""}`);
|
|
2042
|
+
}
|
|
2043
|
+
};
|
|
2044
|
+
|
|
2003
2045
|
// src/resources/community.ts
|
|
2004
2046
|
var CommunityResource = class {
|
|
2005
2047
|
constructor(client) {
|
|
@@ -2153,7 +2195,7 @@ var TutorialsResource = class {
|
|
|
2153
2195
|
};
|
|
2154
2196
|
|
|
2155
2197
|
// src/client.ts
|
|
2156
|
-
var SDK_VERSION = "1.
|
|
2198
|
+
var SDK_VERSION = "1.15.0" ;
|
|
2157
2199
|
var CLIENT_HEADER = "X-Nodaro-Client";
|
|
2158
2200
|
var isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
2159
2201
|
var NodaroClient = class {
|
|
@@ -2198,6 +2240,7 @@ var NodaroClient = class {
|
|
|
2198
2240
|
library;
|
|
2199
2241
|
presets;
|
|
2200
2242
|
pickerCatalogs;
|
|
2243
|
+
models;
|
|
2201
2244
|
community;
|
|
2202
2245
|
templates;
|
|
2203
2246
|
tutorials;
|
|
@@ -2232,6 +2275,7 @@ var NodaroClient = class {
|
|
|
2232
2275
|
this.library = new LibraryResource(this);
|
|
2233
2276
|
this.presets = new PresetsResource(this);
|
|
2234
2277
|
this.pickerCatalogs = new PickerCatalogsResource(this);
|
|
2278
|
+
this.models = new ModelsResource(this);
|
|
2235
2279
|
this.community = new CommunityResource(this);
|
|
2236
2280
|
this.templates = new TemplatesResource(this);
|
|
2237
2281
|
this.tutorials = new TutorialsResource(this);
|
|
@@ -2414,6 +2458,7 @@ exports.JobsResource = JobsResource;
|
|
|
2414
2458
|
exports.LibraryResource = LibraryResource;
|
|
2415
2459
|
exports.LocationsResource = LocationsResource;
|
|
2416
2460
|
exports.MediaResource = MediaResource;
|
|
2461
|
+
exports.ModelsResource = ModelsResource;
|
|
2417
2462
|
exports.NodaroClient = NodaroClient;
|
|
2418
2463
|
exports.NodaroError = NodaroError;
|
|
2419
2464
|
exports.NodesResource = NodesResource;
|