@sogni-ai/sogni-client 5.82.0 → 5.83.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/AGENTS.md +2 -0
- package/CHANGELOG.md +7 -0
- package/README.md +26 -1
- package/dist/Changelog/index.d.ts +28 -0
- package/dist/Changelog/index.js +81 -0
- package/dist/Changelog/index.js.map +1 -0
- package/dist/Changelog/types.d.ts +83 -0
- package/dist/Changelog/types.js +3 -0
- package/dist/Changelog/types.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist-esm/Changelog/index.js +76 -0
- package/dist-esm/Changelog/index.js.map +1 -0
- package/dist-esm/Changelog/types.js +2 -0
- package/dist-esm/Changelog/types.js.map +1 -0
- package/dist-esm/index.js +2 -0
- package/dist-esm/index.js.map +1 -1
- package/dist-esm/version.js +1 -1
- package/llms-full.txt +37 -1
- package/llms.txt +15 -1
- package/package.json +4 -3
- package/src/Changelog/index.ts +75 -0
- package/src/Changelog/types.ts +96 -0
- package/src/index.ts +18 -0
- package/src/version.ts +1 -1
package/AGENTS.md
CHANGED
|
@@ -135,6 +135,8 @@ Generated artifacts:
|
|
|
135
135
|
- `workflows.{start, list, get, events, streamEvents, resume, reseed, cancel}`
|
|
136
136
|
- `workflows.templates.{list, get, create, update, delete, fork}`
|
|
137
137
|
- `replay: ReplayApi` - RunRecord write/list/get via `/v1/replay/records`
|
|
138
|
+
- `changelog: ChangelogApi` - Public platform changelog via `/v1/changelog`, no sign-in needed
|
|
139
|
+
- `changelog.{list, get, products}`
|
|
138
140
|
- `apiClient: ApiClient` - Internal REST + WebSocket communication
|
|
139
141
|
|
|
140
142
|
### Core Entity Hierarchy
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [5.83.0](https://github.com/Sogni-AI/sogni-client/compare/v5.82.0...v5.83.0) (2026-11-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **changelog:** add sogni.changelog to read the public Sogni changelog ([68a264a](https://github.com/Sogni-AI/sogni-client/commit/68a264a2255e13af7b554b13eddea49b9bb223d3))
|
|
7
|
+
|
|
1
8
|
# [5.82.0](https://github.com/Sogni-AI/sogni-client/compare/v5.81.0...v5.82.0) (2026-11-13)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -228,7 +228,8 @@ const sogni = await SogniClient.createInstance({
|
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
Socket-backed project generation and chat completions are unavailable in REST-only mode. Hosted
|
|
231
|
-
chat, durable workflows, replay records, announcements, and account REST
|
|
231
|
+
chat, durable workflows, replay records, announcements, the platform changelog, and account REST
|
|
232
|
+
APIs remain available.
|
|
232
233
|
|
|
233
234
|
### Connection metadata and event subscriptions
|
|
234
235
|
|
|
@@ -1911,6 +1912,30 @@ async function startWithRetry(params, attempts = 5) {
|
|
|
1911
1912
|
|
|
1912
1913
|
See `examples/workflow_creative_agent_workflows.mjs` for start/list/get/events/stream/cancel coverage. The underlying REST endpoints remain documented in the [LLM API durable workflows reference](https://github.com/Sogni-AI/sogni-api/blob/main/docs/llm-api.md#durable-creative-agent-workflows).
|
|
1913
1914
|
|
|
1915
|
+
## Platform changelog
|
|
1916
|
+
|
|
1917
|
+
`sogni.changelog` reads Sogni's public changelog: what changed for artists, developers and worker operators. These reads need no sign-in, so a REST-only client without an API key can make them:
|
|
1918
|
+
|
|
1919
|
+
```javascript
|
|
1920
|
+
const sogni = await SogniClient.createInstance({ disableSocket: true });
|
|
1921
|
+
|
|
1922
|
+
const filters = { audience: 'developer', since: '2026-11-01' };
|
|
1923
|
+
const { entries, nextCursor } = await sogni.changelog.list(filters);
|
|
1924
|
+
for (const entry of entries) console.log(entry.publishedAt, entry.title, entry.url);
|
|
1925
|
+
|
|
1926
|
+
// The next page takes the same filters plus the cursor; nextCursor is null on the last page.
|
|
1927
|
+
const older = nextCursor ? await sogni.changelog.list({ ...filters, cursor: nextCursor }) : null;
|
|
1928
|
+
|
|
1929
|
+
const entry = await sogni.changelog.get(entries[0].id);
|
|
1930
|
+
const products = await sogni.changelog.products(); // [{ id, label, audiences }]
|
|
1931
|
+
```
|
|
1932
|
+
|
|
1933
|
+
- `list(options)` returns `{ entries, nextCursor }`, newest first. `audience` (`artist`, `developer`, `worker`), `product` (ids from `products()`) and `type` (`new`, `improved`, `fixed`, `release`, `deprecated`, `removed`, `notice`) take one value or an array. `since` (inclusive) and `until` (exclusive) take an ISO 8601 date or a date-time with a zone. `actionRequired: true` lists only entries you need to act on. `limit` defaults to 50; the API returns at most 100.
|
|
1934
|
+
- `get(id)` returns one entry. An id with no published entry throws `ApiError` with `status` 404 and `payload.errorCode` 204.
|
|
1935
|
+
- For a deprecation or removal, `effectiveAt` is the day the old behavior stops working.
|
|
1936
|
+
|
|
1937
|
+
Responses can be up to five minutes old, so poll no more often than that. The [Changelog API reference](https://docs.sogni.ai/api-reference/changelog/) has the full contract, including the JSON Feed and Atom feeds.
|
|
1938
|
+
|
|
1914
1939
|
## Code Examples
|
|
1915
1940
|
|
|
1916
1941
|
### Hosted World Builds (server-side)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import ApiGroup from '../ApiGroup.js';
|
|
2
|
+
import type { ChangelogEntry, ChangelogProduct, ListChangelogOptions, ListChangelogResult } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* The public Sogni changelog (`/v1/changelog`): what changed on Sogni for
|
|
5
|
+
* artists, developers and worker operators.
|
|
6
|
+
*
|
|
7
|
+
* These reads need no sign-in, so they work on a client that is not
|
|
8
|
+
* authenticated. Responses may be up to five minutes old; poll no more often
|
|
9
|
+
* than that. A refused request throws `ApiError` with the API's status and
|
|
10
|
+
* message.
|
|
11
|
+
*
|
|
12
|
+
* Full contract: https://docs.sogni.ai/api-reference/changelog/
|
|
13
|
+
*/
|
|
14
|
+
declare class ChangelogApi extends ApiGroup {
|
|
15
|
+
/**
|
|
16
|
+
* One page of published entries, newest first. Pass the returned
|
|
17
|
+
* `nextCursor` as `cursor`, with the same filters, for the next page.
|
|
18
|
+
*/
|
|
19
|
+
list(options?: ListChangelogOptions): Promise<ListChangelogResult>;
|
|
20
|
+
/**
|
|
21
|
+
* One published entry by its id. An id with no published entry throws
|
|
22
|
+
* `ApiError` with status `404` and `payload.errorCode` `204`.
|
|
23
|
+
*/
|
|
24
|
+
get(id: string): Promise<ChangelogEntry>;
|
|
25
|
+
/** The products entries can name, in display order. */
|
|
26
|
+
products(): Promise<ChangelogProduct[]>;
|
|
27
|
+
}
|
|
28
|
+
export default ChangelogApi;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const ApiGroup_js_1 = __importDefault(require("../ApiGroup.js"));
|
|
16
|
+
const index_js_1 = require("../ApiClient/index.js");
|
|
17
|
+
function joined(value) {
|
|
18
|
+
return Array.isArray(value) ? value.join(',') : value;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The public Sogni changelog (`/v1/changelog`): what changed on Sogni for
|
|
22
|
+
* artists, developers and worker operators.
|
|
23
|
+
*
|
|
24
|
+
* These reads need no sign-in, so they work on a client that is not
|
|
25
|
+
* authenticated. Responses may be up to five minutes old; poll no more often
|
|
26
|
+
* than that. A refused request throws `ApiError` with the API's status and
|
|
27
|
+
* message.
|
|
28
|
+
*
|
|
29
|
+
* Full contract: https://docs.sogni.ai/api-reference/changelog/
|
|
30
|
+
*/
|
|
31
|
+
class ChangelogApi extends ApiGroup_js_1.default {
|
|
32
|
+
/**
|
|
33
|
+
* One page of published entries, newest first. Pass the returned
|
|
34
|
+
* `nextCursor` as `cursor`, with the same filters, for the next page.
|
|
35
|
+
*/
|
|
36
|
+
list() {
|
|
37
|
+
return __awaiter(this, arguments, void 0, function* (options = {}) {
|
|
38
|
+
const res = yield this.client.rest.get('/v1/changelog', {
|
|
39
|
+
audience: joined(options.audience),
|
|
40
|
+
product: joined(options.product),
|
|
41
|
+
type: joined(options.type),
|
|
42
|
+
since: options.since,
|
|
43
|
+
until: options.until,
|
|
44
|
+
actionRequired: options.actionRequired ? 'true' : undefined,
|
|
45
|
+
limit: options.limit,
|
|
46
|
+
cursor: options.cursor
|
|
47
|
+
});
|
|
48
|
+
return res.data;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* One published entry by its id. An id with no published entry throws
|
|
53
|
+
* `ApiError` with status `404` and `payload.errorCode` `204`.
|
|
54
|
+
*/
|
|
55
|
+
get(id) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
var _a;
|
|
58
|
+
const res = yield this.client.rest.get(`/v1/changelog/${encodeURIComponent(id)}`);
|
|
59
|
+
const entry = (_a = res.data) === null || _a === void 0 ? void 0 : _a.entry;
|
|
60
|
+
if (!entry) {
|
|
61
|
+
// An empty id requests the list itself, and `products` or `feed.json` the
|
|
62
|
+
// product list or the feed; none of them is an entry.
|
|
63
|
+
throw new index_js_1.ApiError(404, {
|
|
64
|
+
status: 'error',
|
|
65
|
+
message: 'Changelog entry not found',
|
|
66
|
+
errorCode: 204
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return entry;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/** The products entries can name, in display order. */
|
|
73
|
+
products() {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const res = yield this.client.rest.get('/v1/changelog/products');
|
|
76
|
+
return res.data.products;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.default = ChangelogApi;
|
|
81
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Changelog/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iEAAsC;AACtC,oDAA8D;AAQ9D,SAAS,MAAM,CAAC,KAAoC;IAClD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACxD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,YAAa,SAAQ,qBAAQ;IACjC;;;OAGG;IACG,IAAI;6DAAC,UAAgC,EAAE;YAC3C,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAmC,eAAe,EAAE;gBACxF,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;gBAClC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;gBAChC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;gBAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,cAAc,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;gBAC3D,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,MAAM,EAAE,OAAO,CAAC,MAAM;aACvB,CAAC,CAAC;YACH,OAAO,GAAG,CAAC,IAAI,CAAC;QAClB,CAAC;KAAA;IAED;;;OAGG;IACG,GAAG,CAAC,EAAU;;;YAClB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CACpC,iBAAiB,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAC1C,CAAC;YACF,MAAM,KAAK,GAAG,MAAA,GAAG,CAAC,IAAI,0CAAE,KAAK,CAAC;YAC9B,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,0EAA0E;gBAC1E,sDAAsD;gBACtD,MAAM,IAAI,mBAAQ,CAAC,GAAG,EAAE;oBACtB,MAAM,EAAE,OAAO;oBACf,OAAO,EAAE,2BAA2B;oBACpC,SAAS,EAAE,GAAG;iBACf,CAAC,CAAC;YACL,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;KAAA;IAED,uDAAuD;IACjD,QAAQ;;YACZ,MAAM,GAAG,GACP,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CACxB,wBAAwB,CACzB,CAAC;YACJ,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC3B,CAAC;KAAA;CACF;AAED,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/** Who a changelog entry is for. */
|
|
2
|
+
export type ChangelogAudience = 'artist' | 'developer' | 'worker';
|
|
3
|
+
/**
|
|
4
|
+
* The kind of change. Every entry has exactly one:
|
|
5
|
+
* - `new`: something you could not do before
|
|
6
|
+
* - `improved`: a change to something that already worked
|
|
7
|
+
* - `fixed`: a fix
|
|
8
|
+
* - `release`: a versioned release, such as a worker or SDK version
|
|
9
|
+
* - `deprecated`: still works, until `effectiveAt`
|
|
10
|
+
* - `removed`: no longer available
|
|
11
|
+
* - `notice`: anything else you should know
|
|
12
|
+
*/
|
|
13
|
+
export type ChangelogEntryType = 'new' | 'improved' | 'fixed' | 'release' | 'deprecated' | 'removed' | 'notice';
|
|
14
|
+
/** A page related to a changelog entry. */
|
|
15
|
+
export interface ChangelogLink {
|
|
16
|
+
label: string;
|
|
17
|
+
url: string;
|
|
18
|
+
}
|
|
19
|
+
/** One published changelog entry. Times are ISO 8601 UTC strings. */
|
|
20
|
+
export interface ChangelogEntry {
|
|
21
|
+
/** Permanent identifier. It does not change once the entry is published. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** The entry's page on sogni.ai. */
|
|
24
|
+
url: string;
|
|
25
|
+
title: string;
|
|
26
|
+
/** Short summary in plain text. */
|
|
27
|
+
summary: string;
|
|
28
|
+
/** The full text in Markdown. */
|
|
29
|
+
bodyMarkdown: string | null;
|
|
30
|
+
type: ChangelogEntryType;
|
|
31
|
+
audiences: ChangelogAudience[];
|
|
32
|
+
/** Product ids, as listed by `changelog.products()`. */
|
|
33
|
+
products: string[];
|
|
34
|
+
/** The product version the change shipped in. */
|
|
35
|
+
version: string | null;
|
|
36
|
+
links: ChangelogLink[];
|
|
37
|
+
/** `true` when you need to change something, such as for a model retirement. */
|
|
38
|
+
actionRequired: boolean;
|
|
39
|
+
/** When the change takes effect. For a deprecation or removal, the day the old behavior stops working. */
|
|
40
|
+
effectiveAt: string | null;
|
|
41
|
+
/** When the entry was published. Lists sort and filter on it. */
|
|
42
|
+
publishedAt: string;
|
|
43
|
+
/** When any public field of the entry last changed. */
|
|
44
|
+
updatedAt: string;
|
|
45
|
+
}
|
|
46
|
+
/** A product that changelog entries can name. */
|
|
47
|
+
export interface ChangelogProduct {
|
|
48
|
+
/** The id to use with the `product` filter. */
|
|
49
|
+
id: string;
|
|
50
|
+
/** Display name. */
|
|
51
|
+
label: string;
|
|
52
|
+
audiences: ChangelogAudience[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Filters and paging for `changelog.list()`. Every field is optional. An entry
|
|
56
|
+
* must match every filter given; a filter given several values matches entries
|
|
57
|
+
* that have any of them (at most 20 values per filter).
|
|
58
|
+
*/
|
|
59
|
+
export interface ListChangelogOptions {
|
|
60
|
+
audience?: ChangelogAudience | ChangelogAudience[];
|
|
61
|
+
/** Product ids from `changelog.products()`. */
|
|
62
|
+
product?: string | string[];
|
|
63
|
+
type?: ChangelogEntryType | ChangelogEntryType[];
|
|
64
|
+
/**
|
|
65
|
+
* Entries published at or after this time: an ISO 8601 date (`'2026-11-01'`,
|
|
66
|
+
* read as midnight UTC) or a date-time with a zone (`'2026-11-01T17:00:00Z'`).
|
|
67
|
+
*/
|
|
68
|
+
since?: string;
|
|
69
|
+
/** Entries published before this time, in the same format as `since`. */
|
|
70
|
+
until?: string;
|
|
71
|
+
/** `true` lists only the entries you need to act on. */
|
|
72
|
+
actionRequired?: boolean;
|
|
73
|
+
/** Entries per page. The API defaults to 50 and returns at most 100. */
|
|
74
|
+
limit?: number;
|
|
75
|
+
/** The previous page's `nextCursor`. Send the same filters with it. */
|
|
76
|
+
cursor?: string;
|
|
77
|
+
}
|
|
78
|
+
/** One page of changelog entries, newest first. */
|
|
79
|
+
export interface ListChangelogResult {
|
|
80
|
+
entries: ChangelogEntry[];
|
|
81
|
+
/** Pass as `cursor` to get the next page. `null` on the last page. */
|
|
82
|
+
nextCursor: string | null;
|
|
83
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/Changelog/types.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ import StatsApi from './Stats/index.js';
|
|
|
41
41
|
import ReplayApi from './Replay/index.js';
|
|
42
42
|
import WorldsApi from './Worlds/index.js';
|
|
43
43
|
import AnnouncementsApi from './Announcements/index.js';
|
|
44
|
+
import ChangelogApi from './Changelog/index.js';
|
|
44
45
|
import MediaEncryptionApi from './MediaEncryption/index.js';
|
|
45
46
|
import { MediaEncryptionError } from './lib/mediaEncryption/index.js';
|
|
46
47
|
import { GetReplayRecordResult, ListReplayRecordsOptions, ListReplayRecordsResult, ReplayRecordSummary, ReplayRequestOptions, ReplayWriteResult, RunRecord } from './Replay/types.js';
|
|
@@ -229,6 +230,13 @@ export declare class SogniClient {
|
|
|
229
230
|
* announcement per account so it stays dismissed on every device.
|
|
230
231
|
*/
|
|
231
232
|
announcements: AnnouncementsApi;
|
|
233
|
+
/**
|
|
234
|
+
* The public Sogni changelog (`/v1/changelog`): what changed for artists,
|
|
235
|
+
* developers and worker operators. `changelog.list(options)` reads one page
|
|
236
|
+
* of entries with filters and a cursor, `changelog.get(id)` one entry, and
|
|
237
|
+
* `changelog.products()` the products entries can name. No sign-in needed.
|
|
238
|
+
*/
|
|
239
|
+
changelog: ChangelogApi;
|
|
232
240
|
/**
|
|
233
241
|
* Optional media encryption: read encrypted results, video and
|
|
234
242
|
* audio. Create the client with `mediaEncryption: 'auto'` to encrypt every
|
|
@@ -269,5 +277,6 @@ export declare class SogniClient {
|
|
|
269
277
|
static createInstance(config: SogniClientConfig | RestOnlySogniClientConfig): Promise<SogniClient>;
|
|
270
278
|
}
|
|
271
279
|
export type { ConfirmWorldBuildCostParams, ListWorldBuildsOptions, ReviewWorldBuildTaskParams, StartWorldBuildParams, StreamWorldBuildEventsOptions, WorldBuildAction, WorldBuildCostLine, WorldBuildCostPreview, WorldBuildEvent, WorldBuildHotspotInput, WorldBuildHotspotKind, WorldBuildRecord, WorldBuildStatus, WorldBuildTask, WorldBuildTaskSelection, WorldBuildTaskStep, WorldBuildWaiting, WorldBuildWaitingReason } from './Worlds/types.js';
|
|
280
|
+
export type { ChangelogAudience, ChangelogEntry, ChangelogEntryType, ChangelogLink, ChangelogProduct, ListChangelogOptions, ListChangelogResult } from './Changelog/types.js';
|
|
272
281
|
export { getGptImageGifLayouts, getGptImageGifFrameBounds, getGptImageGifSheet, resolveGptImageGifSize } from './lib/gptImageGif.js';
|
|
273
282
|
export type { TwoFactorProof, TwoFactorStatus } from './Account/index.js';
|
package/dist/index.js
CHANGED
|
@@ -127,10 +127,11 @@ const index_js_9 = __importDefault(require("./Replay/index.js"));
|
|
|
127
127
|
exports.ReplayApi = index_js_9.default;
|
|
128
128
|
const index_js_10 = __importDefault(require("./Worlds/index.js"));
|
|
129
129
|
const index_js_11 = __importDefault(require("./Announcements/index.js"));
|
|
130
|
-
const index_js_12 = __importDefault(require("./
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
const index_js_12 = __importDefault(require("./Changelog/index.js"));
|
|
131
|
+
const index_js_13 = __importDefault(require("./MediaEncryption/index.js"));
|
|
132
|
+
exports.MediaEncryptionApi = index_js_13.default;
|
|
133
|
+
const index_js_14 = require("./lib/mediaEncryption/index.js");
|
|
134
|
+
Object.defineProperty(exports, "MediaEncryptionError", { enumerable: true, get: function () { return index_js_14.MediaEncryptionError; } });
|
|
134
135
|
// Base Types
|
|
135
136
|
const ErrorData_js_1 = require("./types/ErrorData.js");
|
|
136
137
|
Object.defineProperty(exports, "ACCOUNT_RESTORABLE_ERROR_CODE", { enumerable: true, get: function () { return ErrorData_js_1.ACCOUNT_RESTORABLE_ERROR_CODE; } });
|
|
@@ -142,12 +143,12 @@ const isModelConsentRequiredError_js_1 = __importDefault(require("./lib/isModelC
|
|
|
142
143
|
exports.isModelConsentRequiredError = isModelConsentRequiredError_js_1.default;
|
|
143
144
|
const isSubscriptionLimitError_js_1 = __importDefault(require("./lib/isSubscriptionLimitError.js"));
|
|
144
145
|
exports.isSubscriptionLimitError = isSubscriptionLimitError_js_1.default;
|
|
145
|
-
const
|
|
146
|
-
Object.defineProperty(exports, "ApiKeyAuthManager", { enumerable: true, get: function () { return
|
|
146
|
+
const index_js_15 = require("./lib/AuthManager/index.js");
|
|
147
|
+
Object.defineProperty(exports, "ApiKeyAuthManager", { enumerable: true, get: function () { return index_js_15.ApiKeyAuthManager; } });
|
|
147
148
|
class SogniClient {
|
|
148
149
|
constructor(config) {
|
|
149
150
|
this.account = new index_js_1.default(config);
|
|
150
|
-
this.mediaEncryption = new
|
|
151
|
+
this.mediaEncryption = new index_js_13.default(config);
|
|
151
152
|
this.projects = new index_js_4.default(config, this.mediaEncryption);
|
|
152
153
|
// An API-key session learns its address from the socket's authenticated
|
|
153
154
|
// frame; before that arrives, `me()` answers it.
|
|
@@ -158,6 +159,7 @@ class SogniClient {
|
|
|
158
159
|
this.worlds = new index_js_10.default(config);
|
|
159
160
|
this.replay = new index_js_9.default(config);
|
|
160
161
|
this.announcements = new index_js_11.default(config);
|
|
162
|
+
this.changelog = new index_js_12.default(config);
|
|
161
163
|
this.apiClient = config.client;
|
|
162
164
|
}
|
|
163
165
|
get currentAccount() {
|
|
@@ -171,7 +173,7 @@ class SogniClient {
|
|
|
171
173
|
setTokens(tokens) {
|
|
172
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
173
175
|
const auth = this.apiClient.auth;
|
|
174
|
-
if (!(auth instanceof
|
|
176
|
+
if (!(auth instanceof index_js_15.TokenAuthManager)) {
|
|
175
177
|
throw new Error('setTokens can only be used with token authentication');
|
|
176
178
|
}
|
|
177
179
|
yield auth.authenticate(tokens);
|
|
@@ -186,7 +188,7 @@ class SogniClient {
|
|
|
186
188
|
checkAuth() {
|
|
187
189
|
return __awaiter(this, void 0, void 0, function* () {
|
|
188
190
|
const auth = this.apiClient.auth;
|
|
189
|
-
if (!(auth instanceof
|
|
191
|
+
if (!(auth instanceof index_js_15.CookieAuthManager)) {
|
|
190
192
|
throw Error('This method should only be called when using cookie auth');
|
|
191
193
|
}
|
|
192
194
|
const initialSession = auth.sessionVersion;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iFAAwF;AAA/E,oJAAA,OAA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AAM,CAAC,sBAAsB,KAAK,KAAK;aAChE,CAAC,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,yBAAY,CAAC;gBAC9B,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,UAAU;gBAC9C,OAAO,EAAE,GAAG;gBACZ,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;aACtC,CAAC,CAAC;YACH,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YAExD,6CAA6C;YAC7C,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;gBAClB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAyB,CAAC;gBAC9C,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACzC,CAAC;YAED,OAAO,WAAW,CAAC;QACrB,CAAC;KAAA;CACF;AAxND,kCAwNC;AA+BD,uDAK8B;AAJ5B,uHAAA,qBAAqB,OAAA;AACrB,2HAAA,yBAAyB,OAAA;AACzB,qHAAA,mBAAmB,OAAA;AACnB,wHAAA,sBAAsB,OAAA"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "5.
|
|
1
|
+
export declare const LIB_VERSION = "5.83.0";
|
package/dist/version.js
CHANGED
|
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LIB_VERSION = void 0;
|
|
4
4
|
// AUTO-GENERATED by scripts/generate-version.mjs — do not edit.
|
|
5
5
|
// Source of truth: package.json version.
|
|
6
|
-
exports.LIB_VERSION = '5.
|
|
6
|
+
exports.LIB_VERSION = '5.83.0';
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import ApiGroup from '../ApiGroup.js';
|
|
11
|
+
import { ApiError } from '../ApiClient/index.js';
|
|
12
|
+
function joined(value) {
|
|
13
|
+
return Array.isArray(value) ? value.join(',') : value;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The public Sogni changelog (`/v1/changelog`): what changed on Sogni for
|
|
17
|
+
* artists, developers and worker operators.
|
|
18
|
+
*
|
|
19
|
+
* These reads need no sign-in, so they work on a client that is not
|
|
20
|
+
* authenticated. Responses may be up to five minutes old; poll no more often
|
|
21
|
+
* than that. A refused request throws `ApiError` with the API's status and
|
|
22
|
+
* message.
|
|
23
|
+
*
|
|
24
|
+
* Full contract: https://docs.sogni.ai/api-reference/changelog/
|
|
25
|
+
*/
|
|
26
|
+
class ChangelogApi extends ApiGroup {
|
|
27
|
+
/**
|
|
28
|
+
* One page of published entries, newest first. Pass the returned
|
|
29
|
+
* `nextCursor` as `cursor`, with the same filters, for the next page.
|
|
30
|
+
*/
|
|
31
|
+
list() {
|
|
32
|
+
return __awaiter(this, arguments, void 0, function* (options = {}) {
|
|
33
|
+
const res = yield this.client.rest.get('/v1/changelog', {
|
|
34
|
+
audience: joined(options.audience),
|
|
35
|
+
product: joined(options.product),
|
|
36
|
+
type: joined(options.type),
|
|
37
|
+
since: options.since,
|
|
38
|
+
until: options.until,
|
|
39
|
+
actionRequired: options.actionRequired ? 'true' : undefined,
|
|
40
|
+
limit: options.limit,
|
|
41
|
+
cursor: options.cursor
|
|
42
|
+
});
|
|
43
|
+
return res.data;
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* One published entry by its id. An id with no published entry throws
|
|
48
|
+
* `ApiError` with status `404` and `payload.errorCode` `204`.
|
|
49
|
+
*/
|
|
50
|
+
get(id) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
var _a;
|
|
53
|
+
const res = yield this.client.rest.get(`/v1/changelog/${encodeURIComponent(id)}`);
|
|
54
|
+
const entry = (_a = res.data) === null || _a === void 0 ? void 0 : _a.entry;
|
|
55
|
+
if (!entry) {
|
|
56
|
+
// An empty id requests the list itself, and `products` or `feed.json` the
|
|
57
|
+
// product list or the feed; none of them is an entry.
|
|
58
|
+
throw new ApiError(404, {
|
|
59
|
+
status: 'error',
|
|
60
|
+
message: 'Changelog entry not found',
|
|
61
|
+
errorCode: 204
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return entry;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/** The products entries can name, in display order. */
|
|
68
|
+
products() {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const res = yield this.client.rest.get('/v1/changelog/products');
|
|
71
|
+
return res.data.products;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export default ChangelogApi;
|
|
76
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Changelog/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAe,MAAM,uBAAuB,CAAC;AAQ9D,SAAS,MAAM,CAAC,KAAoC;IAClD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,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AuD;IACjD,QAAQ;;YACZ,MAAM,GAAG,GACP,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CACxB,wBAAwB,CACzB,CAAC;YACJ,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC3B,CAAC;KAAA;CACF;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/Changelog/types.ts"],"names":[],"mappings":""}
|
package/dist-esm/index.js
CHANGED
|
@@ -39,6 +39,7 @@ import StatsApi from './Stats/index.js';
|
|
|
39
39
|
import ReplayApi from './Replay/index.js';
|
|
40
40
|
import WorldsApi from './Worlds/index.js';
|
|
41
41
|
import AnnouncementsApi from './Announcements/index.js';
|
|
42
|
+
import ChangelogApi from './Changelog/index.js';
|
|
42
43
|
import MediaEncryptionApi from './MediaEncryption/index.js';
|
|
43
44
|
import { MediaEncryptionError } from './lib/mediaEncryption/index.js';
|
|
44
45
|
// Base Types
|
|
@@ -61,6 +62,7 @@ export class SogniClient {
|
|
|
61
62
|
this.worlds = new WorldsApi(config);
|
|
62
63
|
this.replay = new ReplayApi(config);
|
|
63
64
|
this.announcements = new AnnouncementsApi(config);
|
|
65
|
+
this.changelog = new ChangelogApi(config);
|
|
64
66
|
this.apiClient = config.client;
|
|
65
67
|
}
|
|
66
68
|
get currentAccount() {
|
package/dist-esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACxF,cAAc;AACd,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAC5C,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,YAAY;AACZ,OAAO,SAAS,EAAE,EAAE,QAAQ,EAAe,MAAM,sBAAsB,CAAC;AAi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M,sBAAsB,CAAC"}
|
package/dist-esm/version.js
CHANGED
package/llms-full.txt
CHANGED
|
@@ -64,7 +64,7 @@ PACKAGE SHAPE:
|
|
|
64
64
|
- ESM: `dist-esm/index.js`
|
|
65
65
|
- TypeScript declarations: `dist/index.d.ts`
|
|
66
66
|
- Public root class: `SogniClient`
|
|
67
|
-
- Public namespaces: `account`, `projects`, `chat`, `workflows`, `replay`, `stats`, `apiClient`
|
|
67
|
+
- Public namespaces: `account`, `projects`, `chat`, `workflows`, `replay`, `stats`, `changelog`, `apiClient`
|
|
68
68
|
- Commonly used methods: `sogni.chat.completions.create()`, `sogni.projects.estimateCost()`, `sogni.projects.estimateVideoCost()`, `sogni.projects.estimateAudioCost()`, `sogni.workflows.start()`
|
|
69
69
|
|
|
70
70
|
================================================================================ 2. QUICK START EXAMPLES
|
|
@@ -198,6 +198,42 @@ reloads. Calling `randomUUID()` every time the process starts creates a new appl
|
|
|
198
198
|
every run. For REST-only usage, pass `disableSocket: true`; `appId` is optional and the client opens
|
|
199
199
|
no artist WebSocket.
|
|
200
200
|
|
|
201
|
+
PLATFORM CHANGELOG (NO SIGN-IN):
|
|
202
|
+
|
|
203
|
+
`sogni.changelog` reads Sogni's public changelog: what changed for artists, developers and worker
|
|
204
|
+
operators. It works on a client that is not signed in.
|
|
205
|
+
|
|
206
|
+
```javascript
|
|
207
|
+
const sogni = await SogniClient.createInstance({ disableSocket: true });
|
|
208
|
+
|
|
209
|
+
// One page, newest first: { entries, nextCursor }.
|
|
210
|
+
const filters = { audience: 'developer', type: ['release', 'deprecated'], since: '2026-11-01' };
|
|
211
|
+
const page = await sogni.changelog.list(filters);
|
|
212
|
+
// The next page takes the same filters plus the cursor; nextCursor is null on the last page.
|
|
213
|
+
const older = page.nextCursor
|
|
214
|
+
? await sogni.changelog.list({ ...filters, cursor: page.nextCursor })
|
|
215
|
+
: null;
|
|
216
|
+
|
|
217
|
+
const entry = await sogni.changelog.get(page.entries[0].id);
|
|
218
|
+
const products = await sogni.changelog.products(); // [{ id, label, audiences }]
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
- `list()` filters: `audience` (`artist` | `developer` | `worker`), `product` (ids from
|
|
222
|
+
`products()`), `type` (`new` | `improved` | `fixed` | `release` | `deprecated` | `removed` |
|
|
223
|
+
`notice`), each one value or an array (an entry matches any of them, and must match every filter
|
|
224
|
+
given); `since` (inclusive) and `until` (exclusive) as an ISO 8601 date (`2026-11-01`, midnight
|
|
225
|
+
UTC) or a date-time with a zone; `actionRequired: true` for only the entries you need to act on;
|
|
226
|
+
`limit` (default 50, at most 100); `cursor`.
|
|
227
|
+
- Entry fields: `id`, `url`, `title`, `summary`, `bodyMarkdown`, `type`, `audiences`, `products`,
|
|
228
|
+
`version`, `links` (`{ label, url }`), `actionRequired`, `effectiveAt`, `publishedAt`,
|
|
229
|
+
`updatedAt`. Times are ISO 8601 UTC strings. For a deprecation or removal, `effectiveAt` is the
|
|
230
|
+
day the old behavior stops working.
|
|
231
|
+
- `get(id)` with an id that has no published entry throws `ApiError` with `status` 404 and
|
|
232
|
+
`payload.errorCode` 204. Invalid filters throw `ApiError` 400 with the API's message.
|
|
233
|
+
- Responses can be up to five minutes old; poll no more often than that.
|
|
234
|
+
- Types: `ChangelogEntry`, `ChangelogEntryType`, `ChangelogAudience`, `ChangelogLink`,
|
|
235
|
+
`ChangelogProduct`, `ListChangelogOptions`, `ListChangelogResult`.
|
|
236
|
+
|
|
201
237
|
API KEY VS USERNAME/PASSWORD:
|
|
202
238
|
|
|
203
239
|
- API key: Pass `apiKey` to `createInstance()`. Auto-authenticates via WebSocket
|
package/llms.txt
CHANGED
|
@@ -119,12 +119,26 @@ await sogni.account.login(username, password);
|
|
|
119
119
|
- **API key**: Pass `apiKey` to `createInstance()`. Auto-authenticates via WebSocket. No `login()` call needed. Most REST API calls (balance, profile, etc.) available. Sensitive operations (withdrawals, staking, 2FA) not available.
|
|
120
120
|
- **Username/password**: Call `sogni.account.login()` after creating instance. Full REST API access.
|
|
121
121
|
- **Restoring a deleted account at sign-in**: when the account can be restored, `login()` throws an `ApiError` with `payload.errorCode === ACCOUNT_RESTORABLE_ERROR_CODE` (196) and `details.deletedAt` (Unix seconds). After the person confirms, call `login()` again with the same arguments plus the option, e.g. `login(username, password, rememberMe, appSource, { restoreDeletedAccount: true })`, to restore it and sign in.
|
|
122
|
-
- **REST-only**: Pass `disableSocket: true`; `appId` is then optional and no artist WebSocket is opened. Use this for hosted chat, durable workflows, replay, announcements, and account REST APIs.
|
|
122
|
+
- **REST-only**: Pass `disableSocket: true`; `appId` is then optional and no artist WebSocket is opened. Use this for hosted chat, durable workflows, replay, announcements, the platform changelog, and account REST APIs.
|
|
123
123
|
|
|
124
124
|
Generate an `appId` once per application installation and persist it across restarts or page
|
|
125
125
|
reloads. Calling `randomUUID()` each time the process starts creates a different application
|
|
126
126
|
identity on every run.
|
|
127
127
|
|
|
128
|
+
### Platform Changelog (no sign-in)
|
|
129
|
+
|
|
130
|
+
`sogni.changelog` reads the public changelog of what changed for artists, developers and worker operators. It works on a client that is not signed in.
|
|
131
|
+
|
|
132
|
+
```javascript
|
|
133
|
+
const sogni = await SogniClient.createInstance({ disableSocket: true });
|
|
134
|
+
const { entries, nextCursor } = await sogni.changelog.list({ audience: 'developer', limit: 20 });
|
|
135
|
+
// Next page: the same filters plus { cursor: nextCursor }; nextCursor is null on the last page.
|
|
136
|
+
const entry = await sogni.changelog.get(entries[0].id); // unknown id: ApiError, status 404, payload.errorCode 204
|
|
137
|
+
const products = await sogni.changelog.products(); // [{ id, label, audiences }]
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`list()` filters: `audience` (`artist` | `developer` | `worker`), `product` (ids from `products()`), `type` (`new` | `improved` | `fixed` | `release` | `deprecated` | `removed` | `notice`), each one value or an array; `since` (inclusive) / `until` (exclusive) as ISO 8601 dates or date-times with a zone; `actionRequired: true`; `limit` (default 50, max 100); `cursor`. Entries: `id`, `url`, `title`, `summary`, `bodyMarkdown`, `type`, `audiences`, `products`, `version`, `links`, `actionRequired`, `effectiveAt`, `publishedAt`, `updatedAt` (times are ISO strings). Poll no more often than every five minutes.
|
|
141
|
+
|
|
128
142
|
### Subscription Entitlements
|
|
129
143
|
|
|
130
144
|
Current queue explanations arrive through `sogni.projects.on('queueChanged', ({ projectId, waitingReason, jobWaitingReasons }) => ...)` and the same `Project` getters. Display `waitingReason.message` as plain text. The complete per-result list uses zero-based `jobIndex`, with optional `imgID` assigned later; removed entries clear old reasons. Prefer these current server details to the legacy worker-only `queueStatus` estimate. A partially running batch can still have queued results. Supported servers stream these details automatically; `{ projectQueue: false }` opts out, and a subscription reset disables the stream. Older servers provide no explanation. A waiting Unlimited plan project on Fast can also carry `Project.payAsYouGo` (`{ available: true, costInSpark, coveredByPremiumSpark }` or `null`, also on `queueChanged`); nothing is charged until the owner calls `sogni.projects.switchToPremiumSpark(projectId)`, which resolves `switched` (charged once), `refused` (this request costs nothing: a debit the server had already started is cancelled, and the balance can take a moment to show it, so say "won't be charged" rather than "weren't charged"; `reason` explains) or `unknown` (`timeout`, `not_found`, `session_changed`, `unrecognized_reply`: the payment may have been made). Asking again is safe and never charges twice: it answers `switched` if the earlier request switched, a refusal from the server if it costs nothing, or `unknown` again; while it stays unknown, check the member's Spark history or the creation's result rather than assuming either way. A `not_sent` refusal comes from the SDK itself: that request never left the client and says nothing about the earlier one.
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "5.
|
|
6
|
+
"version": "5.83.0",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22"
|
|
9
9
|
},
|
|
@@ -141,7 +141,8 @@
|
|
|
141
141
|
"test:large-data-uri": "npm run build && node scripts/check-large-data-uri.cjs",
|
|
142
142
|
"test:world-builds": "npm run build && node scripts/check-world-builds.cjs",
|
|
143
143
|
"test:gpt-image-26": "npm run build && node scripts/check-gpt-image-26.cjs",
|
|
144
|
-
"test:two-factor": "npm run build && node scripts/check-two-factor.cjs"
|
|
144
|
+
"test:two-factor": "npm run build && node scripts/check-two-factor.cjs",
|
|
145
|
+
"test:changelog": "npm run build && node scripts/check-changelog-api.cjs"
|
|
145
146
|
},
|
|
146
147
|
"repository": {
|
|
147
148
|
"type": "git",
|
|
@@ -155,7 +156,7 @@
|
|
|
155
156
|
"homepage": "https://github.com/Sogni-AI/sogni-client#readme",
|
|
156
157
|
"dependencies": {
|
|
157
158
|
"@simplewebauthn/browser": "14.0.0",
|
|
158
|
-
"@sogni-ai/sogni-protocol": "1.0.0-alpha.
|
|
159
|
+
"@sogni-ai/sogni-protocol": "1.0.0-alpha.61",
|
|
159
160
|
"@types/js-cookie": "^3.0.6",
|
|
160
161
|
"@types/lodash": "^4.17.23",
|
|
161
162
|
"@types/ws": "^8.5.13",
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import ApiGroup from '../ApiGroup.js';
|
|
2
|
+
import { ApiError, ApiResponse } from '../ApiClient/index.js';
|
|
3
|
+
import type {
|
|
4
|
+
ChangelogEntry,
|
|
5
|
+
ChangelogProduct,
|
|
6
|
+
ListChangelogOptions,
|
|
7
|
+
ListChangelogResult
|
|
8
|
+
} from './types.js';
|
|
9
|
+
|
|
10
|
+
function joined(value: string | string[] | undefined): string | undefined {
|
|
11
|
+
return Array.isArray(value) ? value.join(',') : value;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The public Sogni changelog (`/v1/changelog`): what changed on Sogni for
|
|
16
|
+
* artists, developers and worker operators.
|
|
17
|
+
*
|
|
18
|
+
* These reads need no sign-in, so they work on a client that is not
|
|
19
|
+
* authenticated. Responses may be up to five minutes old; poll no more often
|
|
20
|
+
* than that. A refused request throws `ApiError` with the API's status and
|
|
21
|
+
* message.
|
|
22
|
+
*
|
|
23
|
+
* Full contract: https://docs.sogni.ai/api-reference/changelog/
|
|
24
|
+
*/
|
|
25
|
+
class ChangelogApi extends ApiGroup {
|
|
26
|
+
/**
|
|
27
|
+
* One page of published entries, newest first. Pass the returned
|
|
28
|
+
* `nextCursor` as `cursor`, with the same filters, for the next page.
|
|
29
|
+
*/
|
|
30
|
+
async list(options: ListChangelogOptions = {}): Promise<ListChangelogResult> {
|
|
31
|
+
const res = await this.client.rest.get<ApiResponse<ListChangelogResult>>('/v1/changelog', {
|
|
32
|
+
audience: joined(options.audience),
|
|
33
|
+
product: joined(options.product),
|
|
34
|
+
type: joined(options.type),
|
|
35
|
+
since: options.since,
|
|
36
|
+
until: options.until,
|
|
37
|
+
actionRequired: options.actionRequired ? 'true' : undefined,
|
|
38
|
+
limit: options.limit,
|
|
39
|
+
cursor: options.cursor
|
|
40
|
+
});
|
|
41
|
+
return res.data;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* One published entry by its id. An id with no published entry throws
|
|
46
|
+
* `ApiError` with status `404` and `payload.errorCode` `204`.
|
|
47
|
+
*/
|
|
48
|
+
async get(id: string): Promise<ChangelogEntry> {
|
|
49
|
+
const res = await this.client.rest.get<ApiResponse<{ entry?: ChangelogEntry }>>(
|
|
50
|
+
`/v1/changelog/${encodeURIComponent(id)}`
|
|
51
|
+
);
|
|
52
|
+
const entry = res.data?.entry;
|
|
53
|
+
if (!entry) {
|
|
54
|
+
// An empty id requests the list itself, and `products` or `feed.json` the
|
|
55
|
+
// product list or the feed; none of them is an entry.
|
|
56
|
+
throw new ApiError(404, {
|
|
57
|
+
status: 'error',
|
|
58
|
+
message: 'Changelog entry not found',
|
|
59
|
+
errorCode: 204
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return entry;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** The products entries can name, in display order. */
|
|
66
|
+
async products(): Promise<ChangelogProduct[]> {
|
|
67
|
+
const res =
|
|
68
|
+
await this.client.rest.get<ApiResponse<{ products: ChangelogProduct[] }>>(
|
|
69
|
+
'/v1/changelog/products'
|
|
70
|
+
);
|
|
71
|
+
return res.data.products;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default ChangelogApi;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/** Who a changelog entry is for. */
|
|
2
|
+
export type ChangelogAudience = 'artist' | 'developer' | 'worker';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The kind of change. Every entry has exactly one:
|
|
6
|
+
* - `new`: something you could not do before
|
|
7
|
+
* - `improved`: a change to something that already worked
|
|
8
|
+
* - `fixed`: a fix
|
|
9
|
+
* - `release`: a versioned release, such as a worker or SDK version
|
|
10
|
+
* - `deprecated`: still works, until `effectiveAt`
|
|
11
|
+
* - `removed`: no longer available
|
|
12
|
+
* - `notice`: anything else you should know
|
|
13
|
+
*/
|
|
14
|
+
export type ChangelogEntryType =
|
|
15
|
+
| 'new'
|
|
16
|
+
| 'improved'
|
|
17
|
+
| 'fixed'
|
|
18
|
+
| 'release'
|
|
19
|
+
| 'deprecated'
|
|
20
|
+
| 'removed'
|
|
21
|
+
| 'notice';
|
|
22
|
+
|
|
23
|
+
/** A page related to a changelog entry. */
|
|
24
|
+
export interface ChangelogLink {
|
|
25
|
+
label: string;
|
|
26
|
+
url: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** One published changelog entry. Times are ISO 8601 UTC strings. */
|
|
30
|
+
export interface ChangelogEntry {
|
|
31
|
+
/** Permanent identifier. It does not change once the entry is published. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** The entry's page on sogni.ai. */
|
|
34
|
+
url: string;
|
|
35
|
+
title: string;
|
|
36
|
+
/** Short summary in plain text. */
|
|
37
|
+
summary: string;
|
|
38
|
+
/** The full text in Markdown. */
|
|
39
|
+
bodyMarkdown: string | null;
|
|
40
|
+
type: ChangelogEntryType;
|
|
41
|
+
audiences: ChangelogAudience[];
|
|
42
|
+
/** Product ids, as listed by `changelog.products()`. */
|
|
43
|
+
products: string[];
|
|
44
|
+
/** The product version the change shipped in. */
|
|
45
|
+
version: string | null;
|
|
46
|
+
links: ChangelogLink[];
|
|
47
|
+
/** `true` when you need to change something, such as for a model retirement. */
|
|
48
|
+
actionRequired: boolean;
|
|
49
|
+
/** When the change takes effect. For a deprecation or removal, the day the old behavior stops working. */
|
|
50
|
+
effectiveAt: string | null;
|
|
51
|
+
/** When the entry was published. Lists sort and filter on it. */
|
|
52
|
+
publishedAt: string;
|
|
53
|
+
/** When any public field of the entry last changed. */
|
|
54
|
+
updatedAt: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** A product that changelog entries can name. */
|
|
58
|
+
export interface ChangelogProduct {
|
|
59
|
+
/** The id to use with the `product` filter. */
|
|
60
|
+
id: string;
|
|
61
|
+
/** Display name. */
|
|
62
|
+
label: string;
|
|
63
|
+
audiences: ChangelogAudience[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Filters and paging for `changelog.list()`. Every field is optional. An entry
|
|
68
|
+
* must match every filter given; a filter given several values matches entries
|
|
69
|
+
* that have any of them (at most 20 values per filter).
|
|
70
|
+
*/
|
|
71
|
+
export interface ListChangelogOptions {
|
|
72
|
+
audience?: ChangelogAudience | ChangelogAudience[];
|
|
73
|
+
/** Product ids from `changelog.products()`. */
|
|
74
|
+
product?: string | string[];
|
|
75
|
+
type?: ChangelogEntryType | ChangelogEntryType[];
|
|
76
|
+
/**
|
|
77
|
+
* Entries published at or after this time: an ISO 8601 date (`'2026-11-01'`,
|
|
78
|
+
* read as midnight UTC) or a date-time with a zone (`'2026-11-01T17:00:00Z'`).
|
|
79
|
+
*/
|
|
80
|
+
since?: string;
|
|
81
|
+
/** Entries published before this time, in the same format as `since`. */
|
|
82
|
+
until?: string;
|
|
83
|
+
/** `true` lists only the entries you need to act on. */
|
|
84
|
+
actionRequired?: boolean;
|
|
85
|
+
/** Entries per page. The API defaults to 50 and returns at most 100. */
|
|
86
|
+
limit?: number;
|
|
87
|
+
/** The previous page's `nextCursor`. Send the same filters with it. */
|
|
88
|
+
cursor?: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** One page of changelog entries, newest first. */
|
|
92
|
+
export interface ListChangelogResult {
|
|
93
|
+
entries: ChangelogEntry[];
|
|
94
|
+
/** Pass as `cursor` to get the next page. `null` on the last page. */
|
|
95
|
+
nextCursor: string | null;
|
|
96
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -278,6 +278,7 @@ import StatsApi from './Stats/index.js';
|
|
|
278
278
|
import ReplayApi from './Replay/index.js';
|
|
279
279
|
import WorldsApi from './Worlds/index.js';
|
|
280
280
|
import AnnouncementsApi from './Announcements/index.js';
|
|
281
|
+
import ChangelogApi from './Changelog/index.js';
|
|
281
282
|
import MediaEncryptionApi from './MediaEncryption/index.js';
|
|
282
283
|
import { MediaEncryptionError } from './lib/mediaEncryption/index.js';
|
|
283
284
|
import {
|
|
@@ -779,6 +780,13 @@ export class SogniClient {
|
|
|
779
780
|
* announcement per account so it stays dismissed on every device.
|
|
780
781
|
*/
|
|
781
782
|
announcements: AnnouncementsApi;
|
|
783
|
+
/**
|
|
784
|
+
* The public Sogni changelog (`/v1/changelog`): what changed for artists,
|
|
785
|
+
* developers and worker operators. `changelog.list(options)` reads one page
|
|
786
|
+
* of entries with filters and a cursor, `changelog.get(id)` one entry, and
|
|
787
|
+
* `changelog.products()` the products entries can name. No sign-in needed.
|
|
788
|
+
*/
|
|
789
|
+
changelog: ChangelogApi;
|
|
782
790
|
/**
|
|
783
791
|
* Optional media encryption: read encrypted results, video and
|
|
784
792
|
* audio. Create the client with `mediaEncryption: 'auto'` to encrypt every
|
|
@@ -804,6 +812,7 @@ export class SogniClient {
|
|
|
804
812
|
this.worlds = new WorldsApi(config);
|
|
805
813
|
this.replay = new ReplayApi(config);
|
|
806
814
|
this.announcements = new AnnouncementsApi(config);
|
|
815
|
+
this.changelog = new ChangelogApi(config);
|
|
807
816
|
|
|
808
817
|
this.apiClient = config.client;
|
|
809
818
|
}
|
|
@@ -965,6 +974,15 @@ export type {
|
|
|
965
974
|
WorldBuildWaiting,
|
|
966
975
|
WorldBuildWaitingReason
|
|
967
976
|
} from './Worlds/types.js';
|
|
977
|
+
export type {
|
|
978
|
+
ChangelogAudience,
|
|
979
|
+
ChangelogEntry,
|
|
980
|
+
ChangelogEntryType,
|
|
981
|
+
ChangelogLink,
|
|
982
|
+
ChangelogProduct,
|
|
983
|
+
ListChangelogOptions,
|
|
984
|
+
ListChangelogResult
|
|
985
|
+
} from './Changelog/types.js';
|
|
968
986
|
|
|
969
987
|
export {
|
|
970
988
|
getGptImageGifLayouts,
|
package/src/version.ts
CHANGED