@nodaro/sdk 2.45.1 → 2.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-6NTKEXT5.js +3 -0
- package/dist/chunk-6NTKEXT5.js.map +1 -0
- package/dist/{chunk-34JMD6ZO.cjs → chunk-7LTVS75S.cjs} +36 -12
- package/dist/chunk-7LTVS75S.cjs.map +1 -0
- package/dist/{chunk-J6FHBQ4Z.cjs → chunk-DIF7A5OH.cjs} +2 -2
- package/dist/chunk-DIF7A5OH.cjs.map +1 -0
- package/dist/{chunk-3Y5TV37H.js → chunk-FCYN4N3M.js} +3 -3
- package/dist/{chunk-3Y5TV37H.js.map → chunk-FCYN4N3M.js.map} +1 -1
- package/dist/{chunk-55ZX6TE3.cjs → chunk-GDDV5U32.cjs} +6 -6
- package/dist/chunk-GDDV5U32.cjs.map +1 -0
- package/dist/{chunk-JB4GVP4Q.js → chunk-GW76IRQD.js} +2 -2
- package/dist/{chunk-JB4GVP4Q.js.map → chunk-GW76IRQD.js.map} +1 -1
- package/dist/{chunk-RQY2WJD3.js → chunk-I7AHLDXV.js} +13 -9
- package/dist/chunk-I7AHLDXV.js.map +1 -0
- package/dist/chunk-KBHDUHKM.js +21 -0
- package/dist/chunk-KBHDUHKM.js.map +1 -0
- package/dist/{chunk-WFWZBYBS.cjs → chunk-MYTMNPCP.cjs} +3 -3
- package/dist/{chunk-WFWZBYBS.cjs.map → chunk-MYTMNPCP.cjs.map} +1 -1
- package/dist/{chunk-A7HOOWKS.cjs → chunk-NP6KDFIJ.cjs} +19 -15
- package/dist/chunk-NP6KDFIJ.cjs.map +1 -0
- package/dist/{chunk-HKDIIFG2.js → chunk-OWG3XAHQ.js} +6 -6
- package/dist/chunk-OWG3XAHQ.js.map +1 -0
- package/dist/{chunk-6MQ2LTJZ.js → chunk-PQHZUWSL.js} +36 -12
- package/dist/chunk-PQHZUWSL.js.map +1 -0
- package/dist/{chunk-5IXZLQNT.cjs → chunk-TK2CEVSK.cjs} +2 -2
- package/dist/{chunk-5IXZLQNT.cjs.map → chunk-TK2CEVSK.cjs.map} +1 -1
- package/dist/chunk-UANHMQ3A.cjs +4 -0
- package/dist/chunk-UANHMQ3A.cjs.map +1 -0
- package/dist/{chunk-PEMLIAPZ.cjs → chunk-WMT7HEBZ.cjs} +40 -7
- package/dist/chunk-WMT7HEBZ.cjs.map +1 -0
- package/dist/{chunk-Y6VDCZPB.js → chunk-WS4ZQ4AA.js} +40 -7
- package/dist/chunk-WS4ZQ4AA.js.map +1 -0
- package/dist/{chunk-CKHCSZCV.js → chunk-XILR6TFO.js} +2 -2
- package/dist/chunk-XILR6TFO.js.map +1 -0
- package/dist/chunk-XKDVEQVD.cjs +23 -0
- package/dist/chunk-XKDVEQVD.cjs.map +1 -0
- package/dist/entries/cast-swap.cjs +2 -2
- package/dist/entries/cast-swap.d.cts +126 -146
- package/dist/entries/cast-swap.d.ts +126 -146
- package/dist/entries/cast-swap.js +1 -1
- package/dist/entries/characters.d.cts +1 -1
- package/dist/entries/characters.d.ts +1 -1
- package/dist/entries/client.cjs +14 -13
- package/dist/entries/client.d.cts +4 -1
- package/dist/entries/client.d.ts +4 -1
- package/dist/entries/client.js +9 -8
- package/dist/entries/core.cjs +5 -5
- package/dist/entries/core.js +1 -1
- package/dist/entries/creatures.d.cts +1 -1
- package/dist/entries/creatures.d.ts +1 -1
- package/dist/entries/jobs.cjs +2 -2
- package/dist/entries/jobs.d.cts +57 -8
- package/dist/entries/jobs.d.ts +57 -8
- package/dist/entries/jobs.js +1 -1
- package/dist/entries/locations.d.cts +1 -1
- package/dist/entries/locations.d.ts +1 -1
- package/dist/entries/nodes.cjs +2 -2
- package/dist/entries/nodes.d.cts +1 -1
- package/dist/entries/nodes.d.ts +1 -1
- package/dist/entries/nodes.js +1 -1
- package/dist/entries/objects.d.cts +1 -1
- package/dist/entries/objects.d.ts +1 -1
- package/dist/entries/scene3d.d.cts +2 -2
- package/dist/entries/scene3d.d.ts +2 -2
- package/dist/entries/sessions.cjs +2 -2
- package/dist/entries/sessions.d.cts +58 -8
- package/dist/entries/sessions.d.ts +58 -8
- package/dist/entries/sessions.js +1 -1
- package/dist/entries/trash.cjs +13 -0
- package/dist/entries/trash.cjs.map +1 -0
- package/dist/entries/trash.d.cts +71 -0
- package/dist/entries/trash.d.ts +71 -0
- package/dist/entries/trash.js +4 -0
- package/dist/entries/trash.js.map +1 -0
- package/dist/entries/trends.cjs +2 -2
- package/dist/entries/trends.d.cts +30 -21
- package/dist/entries/trends.d.ts +30 -21
- package/dist/entries/trends.js +1 -1
- package/dist/index.cjs +30 -24
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +11 -9
- package/dist/{nodes-MThDit8l.d.ts → nodes-C9j0PFto.d.ts} +11 -1
- package/dist/{nodes-Szl6HrZ_.d.cts → nodes-DGIefTze.d.cts} +11 -1
- package/package.json +7 -2
- package/dist/chunk-34JMD6ZO.cjs.map +0 -1
- package/dist/chunk-55ZX6TE3.cjs.map +0 -1
- package/dist/chunk-6MQ2LTJZ.js.map +0 -1
- package/dist/chunk-A7HOOWKS.cjs.map +0 -1
- package/dist/chunk-CKHCSZCV.js.map +0 -1
- package/dist/chunk-HKDIIFG2.js.map +0 -1
- package/dist/chunk-J6FHBQ4Z.cjs.map +0 -1
- package/dist/chunk-PEMLIAPZ.cjs.map +0 -1
- package/dist/chunk-RQY2WJD3.js.map +0 -1
- package/dist/chunk-Y6VDCZPB.js.map +0 -1
|
@@ -6,8 +6,8 @@ import '@nodaro/shared/organizations';
|
|
|
6
6
|
/**
|
|
7
7
|
* A generation session: one run of work in a creation tool (Create Image,
|
|
8
8
|
* Video, Music), optionally inside a project. Its project is fixed at
|
|
9
|
-
* creation — to get an item into another project,
|
|
10
|
-
* there.
|
|
9
|
+
* creation — to get an item into another project, move it into a session
|
|
10
|
+
* there ({@link SessionsResource.moveItems}) or import a copy of the link.
|
|
11
11
|
*/
|
|
12
12
|
interface GenerationSession {
|
|
13
13
|
id: string;
|
|
@@ -23,7 +23,12 @@ interface GenerationSession {
|
|
|
23
23
|
archivedAt: string | null;
|
|
24
24
|
/** The item picked as the session's cover (`update(id, { coverJobId })`); `null` = automatic. */
|
|
25
25
|
coverJobId: string | null;
|
|
26
|
+
/** Live items: not removed, and their job not deleted. */
|
|
26
27
|
itemCount: number;
|
|
28
|
+
/** Items removed from the session — its part of the Trash
|
|
29
|
+
* (`items(id, { removed: true })`, `client.trash.list()`). Absent from an
|
|
30
|
+
* older server. */
|
|
31
|
+
removedCount?: number;
|
|
27
32
|
/** Up to four image links: the cover's image first when one is set, then the
|
|
28
33
|
* newest completed items. */
|
|
29
34
|
previewUrls: string[];
|
|
@@ -44,7 +49,8 @@ interface UpdateSessionInput {
|
|
|
44
49
|
coverJobId?: string | null;
|
|
45
50
|
}
|
|
46
51
|
interface ListSessionsParams {
|
|
47
|
-
|
|
52
|
+
/** A project's id, or `"none"` for the sessions with no project. */
|
|
53
|
+
projectId?: string | "none";
|
|
48
54
|
tool?: string;
|
|
49
55
|
/** Archived sessions are left out unless this is true. */
|
|
50
56
|
includeArchived?: boolean;
|
|
@@ -57,6 +63,9 @@ interface ListSessionsParams {
|
|
|
57
63
|
interface SessionItem {
|
|
58
64
|
jobId: string;
|
|
59
65
|
addedAt: string;
|
|
66
|
+
/** When the item was removed from the session (it is in the Trash); `null`
|
|
67
|
+
* for a live item. Absent from an older server. */
|
|
68
|
+
removedAt?: string | null;
|
|
60
69
|
/** True when imported from elsewhere rather than born in this session. */
|
|
61
70
|
imported: boolean;
|
|
62
71
|
importedFrom: {
|
|
@@ -66,9 +75,18 @@ interface SessionItem {
|
|
|
66
75
|
job: Job;
|
|
67
76
|
}
|
|
68
77
|
interface ListSessionItemsParams {
|
|
78
|
+
/** `true`: the items removed from the session (its Trash), newest removal first. */
|
|
79
|
+
removed?: boolean;
|
|
69
80
|
limit?: number;
|
|
70
81
|
cursor?: string;
|
|
71
82
|
}
|
|
83
|
+
/** {@link SessionsResource.moveItems}' body. */
|
|
84
|
+
interface MoveSessionItemsInput {
|
|
85
|
+
/** Items of `fromSessionId` to move, up to 100. */
|
|
86
|
+
jobIds: string[];
|
|
87
|
+
/** The session they are in now. It keeps them as removed items, so the move can be undone from its Trash. */
|
|
88
|
+
fromSessionId: string;
|
|
89
|
+
}
|
|
72
90
|
interface SessionPage<T> {
|
|
73
91
|
data: T[];
|
|
74
92
|
/** Pass back as `cursor` for the next page; `null` on the last one. */
|
|
@@ -98,12 +116,18 @@ declare class SessionsResource {
|
|
|
98
116
|
delete(id: string): Promise<{
|
|
99
117
|
success: true;
|
|
100
118
|
}>;
|
|
101
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* The session's live items, born-in and imported, newest first — or, with
|
|
121
|
+
* `{ removed: true }`, the items removed from it (its part of the Trash),
|
|
122
|
+
* newest removal first. An item whose job was deleted is in neither: it is in
|
|
123
|
+
* `client.trash.list()` as the deleted job.
|
|
124
|
+
*/
|
|
102
125
|
items(id: string, params?: ListSessionItemsParams): Promise<SessionPage<SessionItem>>;
|
|
103
126
|
/**
|
|
104
127
|
* Import some of your own jobs into a session — a link, not a copy (up to 100
|
|
105
128
|
* a call). All-or-nothing: if any id is not one of your jobs, nothing is
|
|
106
|
-
* imported and the call fails with 404. Items already there are left as they
|
|
129
|
+
* imported and the call fails with 404. Items already there are left as they
|
|
130
|
+
* are; an item removed from the session comes back where it was.
|
|
107
131
|
*/
|
|
108
132
|
importItems(id: string, input: {
|
|
109
133
|
jobIds: string[];
|
|
@@ -113,10 +137,36 @@ declare class SessionsResource {
|
|
|
113
137
|
requested: number;
|
|
114
138
|
};
|
|
115
139
|
}>;
|
|
116
|
-
/**
|
|
117
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Remove one item from a session: it goes to the session's Trash until
|
|
142
|
+
* {@link restoreItem} brings it back or `{ forever: true }` deletes it for good
|
|
143
|
+
* — no automatic cleanup. Only the link moves: the job, and every other
|
|
144
|
+
* session holding it, stay; an item in no session shows in General
|
|
145
|
+
* (`client.jobs.list({ inSession: false })`). `forever` on an item that is
|
|
146
|
+
* not removed fails with a 409 `NodaroError` whose `code` is `"not_in_trash"`.
|
|
147
|
+
*/
|
|
148
|
+
removeItem(id: string, jobId: string, options?: {
|
|
149
|
+
forever?: boolean;
|
|
150
|
+
}): Promise<{
|
|
151
|
+
success: true;
|
|
152
|
+
}>;
|
|
153
|
+
/** Bring a removed item back into the session, where it was. An item that is not removed succeeds too. */
|
|
154
|
+
restoreItem(id: string, jobId: string): Promise<{
|
|
118
155
|
success: true;
|
|
119
156
|
}>;
|
|
157
|
+
/**
|
|
158
|
+
* Move items of another of your sessions into `targetId`, in one
|
|
159
|
+
* transaction: the target gets them (born-in stays born-in, else imported
|
|
160
|
+
* from the source), the source keeps them as removed items — so the move is
|
|
161
|
+
* undone with `restoreItem(fromSessionId, jobId)`. A session in another
|
|
162
|
+
* project is how an item moves to another project. All-or-nothing: if any id
|
|
163
|
+
* is not a live item of `fromSessionId`, nothing moves (404).
|
|
164
|
+
*/
|
|
165
|
+
moveItems(targetId: string, input: MoveSessionItemsInput): Promise<{
|
|
166
|
+
data: {
|
|
167
|
+
moved: number;
|
|
168
|
+
};
|
|
169
|
+
}>;
|
|
120
170
|
}
|
|
121
171
|
|
|
122
|
-
export { type CreateSessionInput, type GenerationSession, type ListSessionItemsParams, type ListSessionsParams, type SessionItem, type SessionPage, SessionsResource, type UpdateSessionInput };
|
|
172
|
+
export { type CreateSessionInput, type GenerationSession, type ListSessionItemsParams, type ListSessionsParams, type MoveSessionItemsInput, type SessionItem, type SessionPage, SessionsResource, type UpdateSessionInput };
|
package/dist/entries/sessions.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('../chunk-UANHMQ3A.cjs');
|
|
4
|
+
var chunkXKDVEQVD_cjs = require('../chunk-XKDVEQVD.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "TrashResource", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkXKDVEQVD_cjs.TrashResource; }
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=trash.cjs.map
|
|
13
|
+
//# sourceMappingURL=trash.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"trash.cjs"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { N as NodaroClientCore } from '../developer-apps-zSQXWmEG.cjs';
|
|
2
|
+
import { Job } from './jobs.cjs';
|
|
3
|
+
import '@nodaro/shared/apps';
|
|
4
|
+
import '@nodaro/shared/organizations';
|
|
5
|
+
|
|
6
|
+
/** The session a removed item was removed from. */
|
|
7
|
+
interface TrashSession {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string | null;
|
|
10
|
+
projectId: string | null;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* One entry of the Trash: an item removed from a session, or a deleted job.
|
|
14
|
+
* Narrow on `kind`.
|
|
15
|
+
*
|
|
16
|
+
* - `removed`: kept until restored (`client.sessions.restoreItem(session.id, job.id)`)
|
|
17
|
+
* or deleted for good (`client.sessions.removeItem(session.id, job.id, { forever: true })`).
|
|
18
|
+
* - `deleted`: kept until `purgeAt` (30 days after `deletedAt`), then deleted for
|
|
19
|
+
* good (a copy saved to the Library stays); restore with `client.jobs.restore(job.id)`, or delete
|
|
20
|
+
* now with `client.jobs.delete(job.id, { forever: true })`.
|
|
21
|
+
*
|
|
22
|
+
* A removed item whose job was also deleted is listed once, as the deleted job.
|
|
23
|
+
*/
|
|
24
|
+
type TrashEntry = {
|
|
25
|
+
kind: "removed";
|
|
26
|
+
removedAt: string;
|
|
27
|
+
session: TrashSession;
|
|
28
|
+
job: Job;
|
|
29
|
+
} | {
|
|
30
|
+
kind: "deleted";
|
|
31
|
+
deletedAt: string;
|
|
32
|
+
purgeAt: string;
|
|
33
|
+
job: Job;
|
|
34
|
+
};
|
|
35
|
+
interface ListTrashParams {
|
|
36
|
+
/**
|
|
37
|
+
* A project's id: its sessions' removed items, and deleted jobs a session of
|
|
38
|
+
* it held. `"none"`: the sessions with no project, and General.
|
|
39
|
+
*/
|
|
40
|
+
projectId?: string | "none";
|
|
41
|
+
/**
|
|
42
|
+
* A creation tool (e.g. `"create-image"`): what a session of that tool holds
|
|
43
|
+
* or held. A job no session ever held has no tool and is left out — filter by
|
|
44
|
+
* `type` alone to include it.
|
|
45
|
+
*/
|
|
46
|
+
tool?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The job's `input_data.type` (`"generate-image"`, …), like `client.jobs.list`.
|
|
49
|
+
* One value or several (up to 20). Every filter combines with AND.
|
|
50
|
+
*/
|
|
51
|
+
type?: string | readonly string[];
|
|
52
|
+
/** Page size, 1–100 (server default 50). */
|
|
53
|
+
limit?: number;
|
|
54
|
+
/** The previous page's `next`. */
|
|
55
|
+
cursor?: string;
|
|
56
|
+
}
|
|
57
|
+
interface TrashPage {
|
|
58
|
+
/** A page may hold fewer than `limit` entries and still carry a `next`; page on `next`. */
|
|
59
|
+
data: TrashEntry[];
|
|
60
|
+
/** Pass back as `cursor` for the next page; `null` on the last one. */
|
|
61
|
+
next: string | null;
|
|
62
|
+
}
|
|
63
|
+
/** Your Trash (`GET /v1/trash`): one entry beside General in a creation tool's sessions list. */
|
|
64
|
+
declare class TrashResource {
|
|
65
|
+
private client;
|
|
66
|
+
constructor(client: NodaroClientCore);
|
|
67
|
+
/** One newest-first page of the Trash, on your side of the workspace line. */
|
|
68
|
+
list(params?: ListTrashParams): Promise<TrashPage>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { type ListTrashParams, type TrashEntry, type TrashPage, TrashResource, type TrashSession };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { N as NodaroClientCore } from '../developer-apps-zSQXWmEG.js';
|
|
2
|
+
import { Job } from './jobs.js';
|
|
3
|
+
import '@nodaro/shared/apps';
|
|
4
|
+
import '@nodaro/shared/organizations';
|
|
5
|
+
|
|
6
|
+
/** The session a removed item was removed from. */
|
|
7
|
+
interface TrashSession {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string | null;
|
|
10
|
+
projectId: string | null;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* One entry of the Trash: an item removed from a session, or a deleted job.
|
|
14
|
+
* Narrow on `kind`.
|
|
15
|
+
*
|
|
16
|
+
* - `removed`: kept until restored (`client.sessions.restoreItem(session.id, job.id)`)
|
|
17
|
+
* or deleted for good (`client.sessions.removeItem(session.id, job.id, { forever: true })`).
|
|
18
|
+
* - `deleted`: kept until `purgeAt` (30 days after `deletedAt`), then deleted for
|
|
19
|
+
* good (a copy saved to the Library stays); restore with `client.jobs.restore(job.id)`, or delete
|
|
20
|
+
* now with `client.jobs.delete(job.id, { forever: true })`.
|
|
21
|
+
*
|
|
22
|
+
* A removed item whose job was also deleted is listed once, as the deleted job.
|
|
23
|
+
*/
|
|
24
|
+
type TrashEntry = {
|
|
25
|
+
kind: "removed";
|
|
26
|
+
removedAt: string;
|
|
27
|
+
session: TrashSession;
|
|
28
|
+
job: Job;
|
|
29
|
+
} | {
|
|
30
|
+
kind: "deleted";
|
|
31
|
+
deletedAt: string;
|
|
32
|
+
purgeAt: string;
|
|
33
|
+
job: Job;
|
|
34
|
+
};
|
|
35
|
+
interface ListTrashParams {
|
|
36
|
+
/**
|
|
37
|
+
* A project's id: its sessions' removed items, and deleted jobs a session of
|
|
38
|
+
* it held. `"none"`: the sessions with no project, and General.
|
|
39
|
+
*/
|
|
40
|
+
projectId?: string | "none";
|
|
41
|
+
/**
|
|
42
|
+
* A creation tool (e.g. `"create-image"`): what a session of that tool holds
|
|
43
|
+
* or held. A job no session ever held has no tool and is left out — filter by
|
|
44
|
+
* `type` alone to include it.
|
|
45
|
+
*/
|
|
46
|
+
tool?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The job's `input_data.type` (`"generate-image"`, …), like `client.jobs.list`.
|
|
49
|
+
* One value or several (up to 20). Every filter combines with AND.
|
|
50
|
+
*/
|
|
51
|
+
type?: string | readonly string[];
|
|
52
|
+
/** Page size, 1–100 (server default 50). */
|
|
53
|
+
limit?: number;
|
|
54
|
+
/** The previous page's `next`. */
|
|
55
|
+
cursor?: string;
|
|
56
|
+
}
|
|
57
|
+
interface TrashPage {
|
|
58
|
+
/** A page may hold fewer than `limit` entries and still carry a `next`; page on `next`. */
|
|
59
|
+
data: TrashEntry[];
|
|
60
|
+
/** Pass back as `cursor` for the next page; `null` on the last one. */
|
|
61
|
+
next: string | null;
|
|
62
|
+
}
|
|
63
|
+
/** Your Trash (`GET /v1/trash`): one entry beside General in a creation tool's sessions list. */
|
|
64
|
+
declare class TrashResource {
|
|
65
|
+
private client;
|
|
66
|
+
constructor(client: NodaroClientCore);
|
|
67
|
+
/** One newest-first page of the Trash, on your side of the workspace line. */
|
|
68
|
+
list(params?: ListTrashParams): Promise<TrashPage>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { type ListTrashParams, type TrashEntry, type TrashPage, TrashResource, type TrashSession };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"trash.js"}
|
package/dist/entries/trends.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../chunk-PG2GBS3K.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkDIF7A5OH_cjs = require('../chunk-DIF7A5OH.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "TrendsResource", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkDIF7A5OH_cjs.TrendsResource; }
|
|
11
11
|
});
|
|
12
12
|
//# sourceMappingURL=trends.cjs.map
|
|
13
13
|
//# sourceMappingURL=trends.cjs.map
|
|
@@ -23,8 +23,9 @@ interface TrendChips {
|
|
|
23
23
|
type TrendChipKey = keyof TrendChips;
|
|
24
24
|
type TrendResolution = "480p" | "720p" | "1080p";
|
|
25
25
|
/**
|
|
26
|
-
* The
|
|
27
|
-
*
|
|
26
|
+
* The engine a trend runs on, by its public id ({@link CastSwapEngine}):
|
|
27
|
+
* `"motion-pro"` (Nodaro Motion Pro) or `"motion-lite"` (Nodaro Motion Lite).
|
|
28
|
+
* The trend chooses it, never the person running it.
|
|
28
29
|
*/
|
|
29
30
|
type TrendEngine = CastSwapEngine;
|
|
30
31
|
/** A trend in the catalog (`list()`). Text is in the resolved locale. */
|
|
@@ -118,12 +119,14 @@ interface TrendDetail extends TrendCard {
|
|
|
118
119
|
* Absent only on a version without a display copy (and from an older server).
|
|
119
120
|
*/
|
|
120
121
|
original?: TrendOriginal;
|
|
121
|
-
/** The
|
|
122
|
+
/** The engine every run of this trend uses. Absent (an older server) = `"motion-pro"`. */
|
|
122
123
|
engine?: TrendEngine;
|
|
124
|
+
/** Its name to show: "Nodaro Motion Pro" or "Nodaro Motion Lite". Absent from an older server. */
|
|
125
|
+
engineName?: string;
|
|
123
126
|
/**
|
|
124
|
-
* The resolutions a run may ask for, the default first.
|
|
127
|
+
* The resolutions a run may ask for, the default first. Nodaro Motion Pro:
|
|
125
128
|
* `["480p", "720p", "1080p"]`, where 480p is a draft (show it as one);
|
|
126
|
-
*
|
|
129
|
+
* Nodaro Motion Lite: `["720p", "1080p"]`, no draft. Offer exactly these.
|
|
127
130
|
*/
|
|
128
131
|
resolutions: TrendResolution[];
|
|
129
132
|
slots: TrendDetailSlot[];
|
|
@@ -154,13 +157,13 @@ interface TrendRunRequest {
|
|
|
154
157
|
preview?: boolean;
|
|
155
158
|
/**
|
|
156
159
|
* One of the trend's {@link TrendDetail.resolutions}; default its first
|
|
157
|
-
* (`"480p"` on
|
|
160
|
+
* (`"480p"` on Nodaro Motion Pro, `"720p"` on Nodaro Motion Lite). Another answers 400
|
|
158
161
|
* `resolution_unsupported`.
|
|
159
162
|
*/
|
|
160
163
|
resolution?: TrendResolution;
|
|
161
164
|
/**
|
|
162
|
-
* A draft run, only at 480p on a
|
|
163
|
-
* 480p. `true` on a
|
|
165
|
+
* A draft run, only at 480p on a Nodaro Motion Pro trend. Default `true` at
|
|
166
|
+
* 480p. `true` on a Nodaro Motion Lite trend answers 400 `draft_unsupported`.
|
|
164
167
|
*/
|
|
165
168
|
draft?: boolean;
|
|
166
169
|
/**
|
|
@@ -172,9 +175,9 @@ interface TrendRunRequest {
|
|
|
172
175
|
projectId?: string;
|
|
173
176
|
/**
|
|
174
177
|
* A full run's own preview: the `jobId` of a completed preview run of this
|
|
175
|
-
* trend that you started. When
|
|
176
|
-
*
|
|
177
|
-
* includes it). Any other job is ignored, without an error. Must be a uuid
|
|
178
|
+
* trend that you started. When that preview needed the trend's retry (the
|
|
179
|
+
* clip refused at first), the full run is made that way from the start (the
|
|
180
|
+
* quote includes it). Any other job is ignored, without an error. Must be a uuid
|
|
178
181
|
* (else 400 `validation_error`).
|
|
179
182
|
*/
|
|
180
183
|
previewJobId?: string;
|
|
@@ -195,15 +198,19 @@ interface TrendEstimate {
|
|
|
195
198
|
/** What is reserved when the run starts; the run is charged what it actually costs. */
|
|
196
199
|
holdCredits: number;
|
|
197
200
|
/**
|
|
198
|
-
* The parts of the quote, by name
|
|
199
|
-
*
|
|
201
|
+
* The parts of the quote, by name, for display only: some are alternatives
|
|
202
|
+
* or sit outside the totals (`privacy`, the retry's, beside
|
|
203
|
+
* `privacyCredits`), so read `expectedCredits` and `holdCredits`, never
|
|
204
|
+
* their sum.
|
|
200
205
|
*/
|
|
201
206
|
breakdown: Record<string, number>;
|
|
202
207
|
/**
|
|
203
|
-
* Only
|
|
204
|
-
* charged if
|
|
205
|
-
*
|
|
208
|
+
* Only on a trend that retries a clip the video model refuses: the extra
|
|
209
|
+
* credits charged if that retry runs. Not included in `expectedCredits` or
|
|
210
|
+
* `holdCredits`. 0 (or absent) when there is nothing extra to charge.
|
|
206
211
|
*/
|
|
212
|
+
privacyCredits?: number;
|
|
213
|
+
/** @deprecated read {@link privacyCredits} (an older server answered this name). */
|
|
207
214
|
maskingCredits?: number;
|
|
208
215
|
}
|
|
209
216
|
/** Per-call options for {@link TrendsResource.run}. */
|
|
@@ -270,16 +277,18 @@ interface TrendRun {
|
|
|
270
277
|
preview: boolean;
|
|
271
278
|
resolution: string;
|
|
272
279
|
draft: boolean;
|
|
273
|
-
/** The
|
|
280
|
+
/** The engine the run was made on. Absent (an older server) = `"motion-pro"`. */
|
|
274
281
|
engine?: TrendEngine;
|
|
282
|
+
/** Its name to show: "Nodaro Motion Pro" or "Nodaro Motion Lite". Absent from an older server. */
|
|
283
|
+
engineName?: string;
|
|
275
284
|
/** The result, once completed. */
|
|
276
285
|
videoUrl: string | null;
|
|
277
286
|
posterUrl: string | null;
|
|
278
287
|
creditsCharged: number | null;
|
|
279
|
-
/** A Full Quality version: the job id of the run (a draft, or a
|
|
288
|
+
/** A Full Quality version: the job id of the run (a draft, or a Nodaro Motion Lite 720p run) it was made from. `null` for any other run. */
|
|
280
289
|
fullQualityOf: string | null;
|
|
281
290
|
/**
|
|
282
|
-
* A draft's (or
|
|
291
|
+
* A draft's (or Nodaro Motion Lite 720p run's) newest Full Quality try, if one was started: a pointer only,
|
|
283
292
|
* to know an upgrade exists and how it is going. Its video and charge are on
|
|
284
293
|
* that run, listed on its own (its `fullQualityOf` is this run's `jobId`) —
|
|
285
294
|
* read it there (`getRun(fullQuality.jobId)`). Older tries of the draft (a
|
|
@@ -291,8 +300,8 @@ interface TrendRun {
|
|
|
291
300
|
status: string;
|
|
292
301
|
} | null;
|
|
293
302
|
/**
|
|
294
|
-
* Until when a completed run can be redone in Full Quality — a
|
|
295
|
-
* draft (the same take at 1080p) or a
|
|
303
|
+
* Until when a completed run can be redone in Full Quality — a Nodaro Motion
|
|
304
|
+
* Pro draft (the same take at 1080p) or a Nodaro Motion Lite run at 720p (a new take at
|
|
296
305
|
* 1080p); `null` otherwise.
|
|
297
306
|
*/
|
|
298
307
|
fullQualityUntil: string | null;
|
package/dist/entries/trends.d.ts
CHANGED
|
@@ -23,8 +23,9 @@ interface TrendChips {
|
|
|
23
23
|
type TrendChipKey = keyof TrendChips;
|
|
24
24
|
type TrendResolution = "480p" | "720p" | "1080p";
|
|
25
25
|
/**
|
|
26
|
-
* The
|
|
27
|
-
*
|
|
26
|
+
* The engine a trend runs on, by its public id ({@link CastSwapEngine}):
|
|
27
|
+
* `"motion-pro"` (Nodaro Motion Pro) or `"motion-lite"` (Nodaro Motion Lite).
|
|
28
|
+
* The trend chooses it, never the person running it.
|
|
28
29
|
*/
|
|
29
30
|
type TrendEngine = CastSwapEngine;
|
|
30
31
|
/** A trend in the catalog (`list()`). Text is in the resolved locale. */
|
|
@@ -118,12 +119,14 @@ interface TrendDetail extends TrendCard {
|
|
|
118
119
|
* Absent only on a version without a display copy (and from an older server).
|
|
119
120
|
*/
|
|
120
121
|
original?: TrendOriginal;
|
|
121
|
-
/** The
|
|
122
|
+
/** The engine every run of this trend uses. Absent (an older server) = `"motion-pro"`. */
|
|
122
123
|
engine?: TrendEngine;
|
|
124
|
+
/** Its name to show: "Nodaro Motion Pro" or "Nodaro Motion Lite". Absent from an older server. */
|
|
125
|
+
engineName?: string;
|
|
123
126
|
/**
|
|
124
|
-
* The resolutions a run may ask for, the default first.
|
|
127
|
+
* The resolutions a run may ask for, the default first. Nodaro Motion Pro:
|
|
125
128
|
* `["480p", "720p", "1080p"]`, where 480p is a draft (show it as one);
|
|
126
|
-
*
|
|
129
|
+
* Nodaro Motion Lite: `["720p", "1080p"]`, no draft. Offer exactly these.
|
|
127
130
|
*/
|
|
128
131
|
resolutions: TrendResolution[];
|
|
129
132
|
slots: TrendDetailSlot[];
|
|
@@ -154,13 +157,13 @@ interface TrendRunRequest {
|
|
|
154
157
|
preview?: boolean;
|
|
155
158
|
/**
|
|
156
159
|
* One of the trend's {@link TrendDetail.resolutions}; default its first
|
|
157
|
-
* (`"480p"` on
|
|
160
|
+
* (`"480p"` on Nodaro Motion Pro, `"720p"` on Nodaro Motion Lite). Another answers 400
|
|
158
161
|
* `resolution_unsupported`.
|
|
159
162
|
*/
|
|
160
163
|
resolution?: TrendResolution;
|
|
161
164
|
/**
|
|
162
|
-
* A draft run, only at 480p on a
|
|
163
|
-
* 480p. `true` on a
|
|
165
|
+
* A draft run, only at 480p on a Nodaro Motion Pro trend. Default `true` at
|
|
166
|
+
* 480p. `true` on a Nodaro Motion Lite trend answers 400 `draft_unsupported`.
|
|
164
167
|
*/
|
|
165
168
|
draft?: boolean;
|
|
166
169
|
/**
|
|
@@ -172,9 +175,9 @@ interface TrendRunRequest {
|
|
|
172
175
|
projectId?: string;
|
|
173
176
|
/**
|
|
174
177
|
* A full run's own preview: the `jobId` of a completed preview run of this
|
|
175
|
-
* trend that you started. When
|
|
176
|
-
*
|
|
177
|
-
* includes it). Any other job is ignored, without an error. Must be a uuid
|
|
178
|
+
* trend that you started. When that preview needed the trend's retry (the
|
|
179
|
+
* clip refused at first), the full run is made that way from the start (the
|
|
180
|
+
* quote includes it). Any other job is ignored, without an error. Must be a uuid
|
|
178
181
|
* (else 400 `validation_error`).
|
|
179
182
|
*/
|
|
180
183
|
previewJobId?: string;
|
|
@@ -195,15 +198,19 @@ interface TrendEstimate {
|
|
|
195
198
|
/** What is reserved when the run starts; the run is charged what it actually costs. */
|
|
196
199
|
holdCredits: number;
|
|
197
200
|
/**
|
|
198
|
-
* The parts of the quote, by name
|
|
199
|
-
*
|
|
201
|
+
* The parts of the quote, by name, for display only: some are alternatives
|
|
202
|
+
* or sit outside the totals (`privacy`, the retry's, beside
|
|
203
|
+
* `privacyCredits`), so read `expectedCredits` and `holdCredits`, never
|
|
204
|
+
* their sum.
|
|
200
205
|
*/
|
|
201
206
|
breakdown: Record<string, number>;
|
|
202
207
|
/**
|
|
203
|
-
* Only
|
|
204
|
-
* charged if
|
|
205
|
-
*
|
|
208
|
+
* Only on a trend that retries a clip the video model refuses: the extra
|
|
209
|
+
* credits charged if that retry runs. Not included in `expectedCredits` or
|
|
210
|
+
* `holdCredits`. 0 (or absent) when there is nothing extra to charge.
|
|
206
211
|
*/
|
|
212
|
+
privacyCredits?: number;
|
|
213
|
+
/** @deprecated read {@link privacyCredits} (an older server answered this name). */
|
|
207
214
|
maskingCredits?: number;
|
|
208
215
|
}
|
|
209
216
|
/** Per-call options for {@link TrendsResource.run}. */
|
|
@@ -270,16 +277,18 @@ interface TrendRun {
|
|
|
270
277
|
preview: boolean;
|
|
271
278
|
resolution: string;
|
|
272
279
|
draft: boolean;
|
|
273
|
-
/** The
|
|
280
|
+
/** The engine the run was made on. Absent (an older server) = `"motion-pro"`. */
|
|
274
281
|
engine?: TrendEngine;
|
|
282
|
+
/** Its name to show: "Nodaro Motion Pro" or "Nodaro Motion Lite". Absent from an older server. */
|
|
283
|
+
engineName?: string;
|
|
275
284
|
/** The result, once completed. */
|
|
276
285
|
videoUrl: string | null;
|
|
277
286
|
posterUrl: string | null;
|
|
278
287
|
creditsCharged: number | null;
|
|
279
|
-
/** A Full Quality version: the job id of the run (a draft, or a
|
|
288
|
+
/** A Full Quality version: the job id of the run (a draft, or a Nodaro Motion Lite 720p run) it was made from. `null` for any other run. */
|
|
280
289
|
fullQualityOf: string | null;
|
|
281
290
|
/**
|
|
282
|
-
* A draft's (or
|
|
291
|
+
* A draft's (or Nodaro Motion Lite 720p run's) newest Full Quality try, if one was started: a pointer only,
|
|
283
292
|
* to know an upgrade exists and how it is going. Its video and charge are on
|
|
284
293
|
* that run, listed on its own (its `fullQualityOf` is this run's `jobId`) —
|
|
285
294
|
* read it there (`getRun(fullQuality.jobId)`). Older tries of the draft (a
|
|
@@ -291,8 +300,8 @@ interface TrendRun {
|
|
|
291
300
|
status: string;
|
|
292
301
|
} | null;
|
|
293
302
|
/**
|
|
294
|
-
* Until when a completed run can be redone in Full Quality — a
|
|
295
|
-
* draft (the same take at 1080p) or a
|
|
303
|
+
* Until when a completed run can be redone in Full Quality — a Nodaro Motion
|
|
304
|
+
* Pro draft (the same take at 1080p) or a Nodaro Motion Lite run at 720p (a new take at
|
|
296
305
|
* 1080p); `null` otherwise.
|
|
297
306
|
*/
|
|
298
307
|
fullQualityUntil: string | null;
|
package/dist/entries/trends.js
CHANGED