@nodaro/sdk 1.16.0 → 1.17.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.js CHANGED
@@ -169,7 +169,8 @@ var WorkflowsResource = class {
169
169
  { body: input }
170
170
  );
171
171
  }
172
- /** Delete a workflow. Returns `{ success: true }`. */
172
+ /** Delete a workflow. Returns `{ success: true }`. Throws `NotFoundError`
173
+ * when the id doesn't exist or isn't yours (the delete is not silent). */
173
174
  delete(id) {
174
175
  return this.client.request("DELETE", `/v1/workflows/${encodeURIComponent(id)}`);
175
176
  }
@@ -464,7 +465,8 @@ var DeveloperAppsResource = class {
464
465
  { body: input }
465
466
  );
466
467
  }
467
- /** Delete a developer app. Returns `{ success: true }`. */
468
+ /** Delete a developer app. Returns `{ success: true }`. Throws
469
+ * `NotFoundError` when the id doesn't exist or isn't yours. */
468
470
  delete(id) {
469
471
  return this.client.request(
470
472
  "DELETE",
@@ -2041,6 +2043,91 @@ var ModelsResource = class {
2041
2043
  }
2042
2044
  };
2043
2045
 
2046
+ // src/resources/shots.ts
2047
+ var ShotsResource = class {
2048
+ constructor(client) {
2049
+ this.client = client;
2050
+ }
2051
+ client;
2052
+ /** Create a shot record. Returns the new shot's id — an unguessable
2053
+ * capability string that doubles as the share-link path segment. */
2054
+ create(input = {}) {
2055
+ return this.client.request("POST", "/v1/shots", { body: input });
2056
+ }
2057
+ /** Read a shot. Public shots are readable by anyone holding the id;
2058
+ * private shots resolve only for their owner (404 otherwise). */
2059
+ get(id) {
2060
+ return this.client.request("GET", `/v1/shots/${encodeURIComponent(id)}`);
2061
+ }
2062
+ /** Update an owned shot (any subset of fields, e.g. a visibility toggle). */
2063
+ update(id, input) {
2064
+ return this.client.request("PATCH", `/v1/shots/${encodeURIComponent(id)}`, { body: input });
2065
+ }
2066
+ /** Delete an owned shot. */
2067
+ async delete(id) {
2068
+ await this.client.request("DELETE", `/v1/shots/${encodeURIComponent(id)}`);
2069
+ }
2070
+ };
2071
+
2072
+ // src/resources/recast.ts
2073
+ var RecastResource = class {
2074
+ constructor(client) {
2075
+ this.client = client;
2076
+ }
2077
+ client;
2078
+ // ── Authored-script lane (all three endpoints are free) ────────────────
2079
+ /** The generated authoring guide (markdown): document contract, enum
2080
+ * vocabularies, bounds, audio rules, and a validated worked example. */
2081
+ async authoringSkill() {
2082
+ const res = await this.client.request(
2083
+ "GET",
2084
+ "/v1/video-analysis/authoring-skill"
2085
+ );
2086
+ return res.markdown ?? "";
2087
+ }
2088
+ /** FREE validation of an authored script. Loop until `valid: true`. */
2089
+ validateScript(script) {
2090
+ return this.client.request("POST", "/v1/video-analysis/import/validate", {
2091
+ body: { script }
2092
+ });
2093
+ }
2094
+ /**
2095
+ * Import a VALIDATED authored script as a completed analysis job.
2096
+ * `rightsAttested: true` is required (403 otherwise) — authored recasts
2097
+ * render Faithful, exactly as written, so only import work you own.
2098
+ */
2099
+ importScript(script, opts) {
2100
+ return this.client.request("POST", "/v1/video-analysis/import", {
2101
+ body: { script, rightsAttested: opts.rightsAttested }
2102
+ });
2103
+ }
2104
+ // ── Run lane ───────────────────────────────────────────────────────────
2105
+ /** Quote a run (credits) before buying the plan. */
2106
+ estimate(input) {
2107
+ return this.client.request("POST", "/v1/recast/estimate", { body: input });
2108
+ }
2109
+ /** Create a run (buys the plan). Returns `{ recastId }`. */
2110
+ create(input) {
2111
+ return this.client.request("POST", "/v1/recast", { body: input });
2112
+ }
2113
+ /** Poll the run — status plus any pending interactive step. */
2114
+ get(recastId) {
2115
+ return this.client.request("GET", `/v1/recast/${encodeURIComponent(recastId)}`);
2116
+ }
2117
+ /** Start rendering a `planned` run. Idempotent server-side. */
2118
+ start(recastId, opts = {}) {
2119
+ return this.client.request("POST", `/v1/recast/${encodeURIComponent(recastId)}/start`, {
2120
+ body: opts
2121
+ });
2122
+ }
2123
+ /** Answer a pending interactive gate (the pick itself is free). */
2124
+ resolveGate(recastId, input) {
2125
+ return this.client.request("POST", `/v1/recast/${encodeURIComponent(recastId)}/select`, {
2126
+ body: input
2127
+ });
2128
+ }
2129
+ };
2130
+
2044
2131
  // src/resources/community.ts
2045
2132
  var CommunityResource = class {
2046
2133
  constructor(client) {
@@ -2194,7 +2281,7 @@ var TutorialsResource = class {
2194
2281
  };
2195
2282
 
2196
2283
  // src/client.ts
2197
- var SDK_VERSION = "1.16.0" ;
2284
+ var SDK_VERSION = "1.17.0" ;
2198
2285
  var CLIENT_HEADER = "X-Nodaro-Client";
2199
2286
  var isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined";
2200
2287
  var NodaroClient = class {
@@ -2240,6 +2327,8 @@ var NodaroClient = class {
2240
2327
  presets;
2241
2328
  pickerCatalogs;
2242
2329
  models;
2330
+ shots;
2331
+ recast;
2243
2332
  community;
2244
2333
  templates;
2245
2334
  tutorials;
@@ -2275,6 +2364,8 @@ var NodaroClient = class {
2275
2364
  this.presets = new PresetsResource(this);
2276
2365
  this.pickerCatalogs = new PickerCatalogsResource(this);
2277
2366
  this.models = new ModelsResource(this);
2367
+ this.shots = new ShotsResource(this);
2368
+ this.recast = new RecastResource(this);
2278
2369
  this.community = new CommunityResource(this);
2279
2370
  this.templates = new TemplatesResource(this);
2280
2371
  this.tutorials = new TutorialsResource(this);
@@ -2370,6 +2461,6 @@ function supabaseAuth(supabase) {
2370
2461
  };
2371
2462
  }
2372
2463
 
2373
- export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CharactersResource, CommunityResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobFailedError, JobTimeoutError, JobsResource, LibraryResource, LocationsResource, MediaResource, ModelsResource, 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 };
2464
+ export { AppsResource, AudioResource, CREATURE_ASSET_TYPES, CallbackAuth, CharactersResource, CommunityResource, CreaturesResource, CreditsResource, DeveloperAppsResource, ExecutionsResource, ForbiddenError, InsufficientCreditsError, JobAbortedError, JobFailedError, JobTimeoutError, JobsResource, LibraryResource, LocationsResource, MediaResource, ModelsResource, NodaroClient, NodaroError, NodesResource, NotFoundError, OAuthResource, ObjectsResource, PickerCatalogsResource, PipelinesResource, PresetsResource, ProjectsResource, PromptHelperResource, RateLimitedError, RecastResource, ReduceResource, ShotsResource, StaticTokenAuth, StorageExceededError, TemplatesResource, TutorialsResource, UnauthorizedError, UploadsResource, VideoProResource, VoicesResource, WorkflowConflictError, WorkflowsResource, buildPersonSeedPrompt, createClient, supabaseAuth, throwFromResponse };
2374
2465
  //# sourceMappingURL=index.js.map
2375
2466
  //# sourceMappingURL=index.js.map