@kokimoki/app 1.16.2 → 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.
@@ -145,5 +145,12 @@ export declare class KokimokiClient<ClientContextT = any> extends KokimokiClient
145
145
  * Use AI to apply prompt to an image
146
146
  */
147
147
  transformImage(baseImageUrl: string, prompt: string, tags?: string[]): Promise<Upload>;
148
+ /**
149
+ * Load app config - optionally translated to any language
150
+ */
151
+ getConfig<T>(language?: string): Promise<{
152
+ status: "processing" | "failed" | "completed";
153
+ config: T;
154
+ }>;
148
155
  }
149
156
  export {};
@@ -744,4 +744,17 @@ export class KokimokiClient extends EventEmitter {
744
744
  }
745
745
  return await res.json();
746
746
  }
747
+ /**
748
+ * Load app config - optionally translated to any language
749
+ */
750
+ async getConfig(language = "") {
751
+ const res = await fetch(`${this._apiUrl}/app/config?language=${encodeURIComponent(language)}`, {
752
+ headers: this.apiHeaders,
753
+ });
754
+ if (!res.ok) {
755
+ throw await res.json();
756
+ }
757
+ const { status, config } = await res.json();
758
+ return { status, config };
759
+ }
747
760
  }
@@ -219,6 +219,13 @@ declare class KokimokiClient<ClientContextT = any> extends KokimokiClient_base {
219
219
  * Use AI to apply prompt to an image
220
220
  */
221
221
  transformImage(baseImageUrl: string, prompt: string, tags?: string[]): Promise<Upload>;
222
+ /**
223
+ * Load app config - optionally translated to any language
224
+ */
225
+ getConfig<T>(language?: string): Promise<{
226
+ status: "processing" | "failed" | "completed";
227
+ config: T;
228
+ }>;
222
229
  }
223
230
 
224
231
  declare class RoomSubscription {
@@ -486,7 +486,7 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
486
486
  var eventsExports = events.exports;
487
487
  var EventEmitter$1 = /*@__PURE__*/getDefaultExportFromCjs(eventsExports);
488
488
 
489
- const KOKIMOKI_APP_VERSION = "1.16.1";
489
+ const KOKIMOKI_APP_VERSION = "1.17.0";
490
490
 
491
491
  /**
492
492
  * Utility module to work with key-value stores.
@@ -15596,6 +15596,19 @@ class KokimokiClient extends EventEmitter$1 {
15596
15596
  }
15597
15597
  return await res.json();
15598
15598
  }
15599
+ /**
15600
+ * Load app config - optionally translated to any language
15601
+ */
15602
+ async getConfig(language = "") {
15603
+ const res = await fetch(`${this._apiUrl}/app/config?language=${encodeURIComponent(language)}`, {
15604
+ headers: this.apiHeaders,
15605
+ });
15606
+ if (!res.ok) {
15607
+ throw await res.json();
15608
+ }
15609
+ const { status, config } = await res.json();
15610
+ return { status, config };
15611
+ }
15599
15612
  }
15600
15613
 
15601
15614
  export { KokimokiAwareness, KokimokiClient, KokimokiStore, RoomSubscription, RoomSubscriptionMode };