@kokimoki/app 1.11.1 → 1.13.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/kokimoki-client.d.ts +4 -0
- package/dist/kokimoki-client.js +14 -0
- package/dist/kokimoki.min.d.ts +4 -0
- package/dist/kokimoki.min.js +15 -1
- package/dist/kokimoki.min.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/kokimoki-client-refactored.d.ts +0 -68
- package/dist/kokimoki-client-refactored.js +0 -394
- package/dist/message-queue.d.ts +0 -8
- package/dist/message-queue.js +0 -19
- package/dist/synced-schema.d.ts +0 -59
- package/dist/synced-schema.js +0 -84
- package/dist/synced-store.d.ts +0 -7
- package/dist/synced-store.js +0 -9
- package/dist/synced-types.d.ts +0 -38
- package/dist/synced-types.js +0 -68
- package/dist/ws-message-type copy.d.ts +0 -6
- package/dist/ws-message-type copy.js +0 -7
|
@@ -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 {};
|
package/dist/kokimoki-client.js
CHANGED
|
@@ -711,4 +711,18 @@ 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
|
+
if (!res.ok) {
|
|
724
|
+
throw await res.json();
|
|
725
|
+
}
|
|
726
|
+
return await res.json();
|
|
727
|
+
}
|
|
714
728
|
}
|
package/dist/kokimoki.min.d.ts
CHANGED
|
@@ -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 {
|
package/dist/kokimoki.min.js
CHANGED
|
@@ -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.
|
|
489
|
+
const KOKIMOKI_APP_VERSION = "1.13.0";
|
|
490
490
|
|
|
491
491
|
/**
|
|
492
492
|
* Utility module to work with key-value stores.
|
|
@@ -14934,6 +14934,20 @@ 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
|
+
if (!res.ok) {
|
|
14947
|
+
throw await res.json();
|
|
14948
|
+
}
|
|
14949
|
+
return await res.json();
|
|
14950
|
+
}
|
|
14937
14951
|
}
|
|
14938
14952
|
|
|
14939
14953
|
export { KokimokiAwareness, KokimokiClient, KokimokiStore, RoomSubscription, RoomSubscriptionMode };
|