@sogni-ai/sogni-client 5.27.0 → 5.28.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 +32 -0
- package/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/dist/Announcements/index.d.ts +36 -0
- package/dist/Announcements/index.js +59 -0
- package/dist/Announcements/index.js.map +1 -0
- package/dist/ApiClient/WebSocketClient/events.d.ts +62 -0
- package/dist/Projects/Job.d.ts +7 -7
- package/dist/Projects/Job.js +9 -9
- package/dist/Projects/Job.js.map +1 -1
- package/dist/Projects/index.js +8 -5
- package/dist/Projects/index.js.map +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist-esm/Announcements/index.js +54 -0
- package/dist-esm/Announcements/index.js.map +1 -0
- package/dist-esm/Projects/Job.js +9 -9
- package/dist-esm/Projects/Job.js.map +1 -1
- package/dist-esm/Projects/index.js +8 -5
- package/dist-esm/Projects/index.js.map +1 -1
- package/dist-esm/index.js +2 -0
- package/dist-esm/index.js.map +1 -1
- package/dist-esm/version.js +1 -1
- package/package.json +1 -1
- package/src/Announcements/index.ts +50 -0
- package/src/ApiClient/WebSocketClient/events.ts +64 -0
- package/src/Projects/Job.ts +9 -9
- package/src/Projects/index.ts +8 -5
- package/src/index.ts +13 -1
- package/src/version.ts +1 -1
package/src/index.ts
CHANGED
|
@@ -88,7 +88,7 @@ import type {
|
|
|
88
88
|
TrialEligibility,
|
|
89
89
|
TrialReasonCode
|
|
90
90
|
} from './Account/subscription.types.js';
|
|
91
|
-
import type { ToastMessage } from './ApiClient/WebSocketClient/events.js';
|
|
91
|
+
import type { AppAlert, AppAlertAction, ToastMessage } from './ApiClient/WebSocketClient/events.js';
|
|
92
92
|
import type DataEntity from './lib/DataEntity.js';
|
|
93
93
|
import {
|
|
94
94
|
ControlNetName,
|
|
@@ -184,6 +184,7 @@ import {
|
|
|
184
184
|
import StatsApi from './Stats/index.js';
|
|
185
185
|
// Replay records
|
|
186
186
|
import ReplayApi from './Replay/index.js';
|
|
187
|
+
import AnnouncementsApi from './Announcements/index.js';
|
|
187
188
|
import {
|
|
188
189
|
GetReplayRecordResult,
|
|
189
190
|
ListReplayRecordsOptions,
|
|
@@ -365,6 +366,8 @@ export type {
|
|
|
365
366
|
JobPreparation,
|
|
366
367
|
RawProject,
|
|
367
368
|
ToastMessage,
|
|
369
|
+
AppAlert,
|
|
370
|
+
AppAlertAction,
|
|
368
371
|
DataEntity,
|
|
369
372
|
InputMedia,
|
|
370
373
|
AgentAttributionMetadata,
|
|
@@ -533,6 +536,14 @@ export class SogniClient {
|
|
|
533
536
|
* identity.
|
|
534
537
|
*/
|
|
535
538
|
replay: ReplayApi;
|
|
539
|
+
/**
|
|
540
|
+
* Admin-authored in-app announcements (`/v1/announcements`). Live delivery is
|
|
541
|
+
* the `appAlert` socket event — opt in with
|
|
542
|
+
* `socketEventSubscriptions: { appAlert: true }`. This group covers the two
|
|
543
|
+
* moments the socket cannot: reading what is live at launch, and dismissing an
|
|
544
|
+
* announcement per account so it stays dismissed on every device.
|
|
545
|
+
*/
|
|
546
|
+
announcements: AnnouncementsApi;
|
|
536
547
|
|
|
537
548
|
apiClient: ApiClient;
|
|
538
549
|
|
|
@@ -543,6 +554,7 @@ export class SogniClient {
|
|
|
543
554
|
this.chat = new ChatApi(config, this.projects);
|
|
544
555
|
this.workflows = new CreativeWorkflowsApi(config);
|
|
545
556
|
this.replay = new ReplayApi(config);
|
|
557
|
+
this.announcements = new AnnouncementsApi(config);
|
|
546
558
|
|
|
547
559
|
this.apiClient = config.client;
|
|
548
560
|
}
|
package/src/version.ts
CHANGED