@kokimoki/app 1.11.1 → 1.12.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.
@@ -131,5 +131,9 @@ export declare class KokimokiClient<ClientContextT = any> extends KokimokiClient
131
131
  sendWebhook<T>(event: string, data: T): Promise<{
132
132
  jobId: string;
133
133
  }>;
134
+ /**
135
+ * Use AI to apply prompt to an image
136
+ */
137
+ transformImage(baseImageUrl: string, prompt: string, tags?: string[]): Promise<Upload>;
134
138
  }
135
139
  export {};
@@ -711,4 +711,15 @@ export class KokimokiClient extends EventEmitter {
711
711
  });
712
712
  return await res.json();
713
713
  }
714
+ /**
715
+ * Use AI to apply prompt to an image
716
+ */
717
+ async transformImage(baseImageUrl, prompt, tags = []) {
718
+ const res = await fetch(`${this._apiUrl}/ai/images`, {
719
+ method: "POST",
720
+ headers: this.apiHeaders,
721
+ body: JSON.stringify({ baseImageUrl, prompt, tags }),
722
+ });
723
+ return await res.json();
724
+ }
714
725
  }
@@ -202,6 +202,10 @@ declare class KokimokiClient<ClientContextT = any> extends KokimokiClient_base {
202
202
  sendWebhook<T>(event: string, data: T): Promise<{
203
203
  jobId: string;
204
204
  }>;
205
+ /**
206
+ * Use AI to apply prompt to an image
207
+ */
208
+ transformImage(baseImageUrl: string, prompt: string, tags?: string[]): Promise<Upload>;
205
209
  }
206
210
 
207
211
  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.11.1";
489
+ const KOKIMOKI_APP_VERSION = "1.12.0";
490
490
 
491
491
  /**
492
492
  * Utility module to work with key-value stores.
@@ -14934,6 +14934,17 @@ class KokimokiClient extends EventEmitter$1 {
14934
14934
  });
14935
14935
  return await res.json();
14936
14936
  }
14937
+ /**
14938
+ * Use AI to apply prompt to an image
14939
+ */
14940
+ async transformImage(baseImageUrl, prompt, tags = []) {
14941
+ const res = await fetch(`${this._apiUrl}/ai/images`, {
14942
+ method: "POST",
14943
+ headers: this.apiHeaders,
14944
+ body: JSON.stringify({ baseImageUrl, prompt, tags }),
14945
+ });
14946
+ return await res.json();
14947
+ }
14937
14948
  }
14938
14949
 
14939
14950
  export { KokimokiAwareness, KokimokiClient, KokimokiStore, RoomSubscription, RoomSubscriptionMode };