@joai/sdk 4.2.2 → 4.2.3
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/index.d.mts +9 -4
- package/dist/index.mjs +6 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -783,6 +783,7 @@ type Media = {
|
|
|
783
783
|
library: MediaLibraryAttributes;
|
|
784
784
|
tags?: string[];
|
|
785
785
|
copyright?: string | null;
|
|
786
|
+
aiGenerated?: boolean;
|
|
786
787
|
}; //#endregion
|
|
787
788
|
//#region src/billing/types.d.ts
|
|
788
789
|
type TranslatableValue = Partial<Record<WarpLocale, string>>;
|
|
@@ -1329,7 +1330,6 @@ type WarpExtras = {
|
|
|
1329
1330
|
faq?: Record<string, WarpExtrasFaq[]>;
|
|
1330
1331
|
notification?: {
|
|
1331
1332
|
enabled?: boolean;
|
|
1332
|
-
contact?: string | null;
|
|
1333
1333
|
};
|
|
1334
1334
|
optIn?: {
|
|
1335
1335
|
enabled?: boolean;
|
|
@@ -1387,7 +1387,7 @@ type BrandSourceConfig = {
|
|
|
1387
1387
|
contract?: string;
|
|
1388
1388
|
endpoints?: string[];
|
|
1389
1389
|
};
|
|
1390
|
-
type BrandIntegrationProvider = 'claude' | 'codex' | 'cursor' | 'openai';
|
|
1390
|
+
type BrandIntegrationProvider = 'claude' | 'codex' | 'cursor' | 'openai' | 'grok';
|
|
1391
1391
|
type BrandIntegrationAction = {
|
|
1392
1392
|
type: 'copy' | 'link' | 'deeplink';
|
|
1393
1393
|
label: string;
|
|
@@ -1626,12 +1626,13 @@ type Service = {
|
|
|
1626
1626
|
slug: string;
|
|
1627
1627
|
name: TranslatableValue;
|
|
1628
1628
|
price: number;
|
|
1629
|
-
durationMinutes: number;
|
|
1629
|
+
durationMinutes: number | null;
|
|
1630
1630
|
tags?: string[] | null;
|
|
1631
1631
|
description: TranslatableValue | null;
|
|
1632
1632
|
active: boolean;
|
|
1633
1633
|
digital: boolean;
|
|
1634
1634
|
public: boolean;
|
|
1635
|
+
bookable: boolean;
|
|
1635
1636
|
settings?: Record<string, unknown> | null;
|
|
1636
1637
|
createdAt: string;
|
|
1637
1638
|
updatedAt: string;
|
|
@@ -4053,6 +4054,7 @@ declare class MediaResource {
|
|
|
4053
4054
|
label?: string;
|
|
4054
4055
|
tags?: string[];
|
|
4055
4056
|
copyright?: string;
|
|
4057
|
+
aiGenerated?: boolean;
|
|
4056
4058
|
}): Promise<IAppResponse<Media>>;
|
|
4057
4059
|
list(team: string, params?: {
|
|
4058
4060
|
page?: number;
|
|
@@ -4063,6 +4065,7 @@ declare class MediaResource {
|
|
|
4063
4065
|
update(team: string, mediaId: string, data: {
|
|
4064
4066
|
name: string;
|
|
4065
4067
|
copyright?: string | null;
|
|
4068
|
+
aiGenerated?: boolean;
|
|
4066
4069
|
}): Promise<IAppResponse<Media>>;
|
|
4067
4070
|
updateTags(team: string, mediaId: string, tags: string[]): Promise<IAppResponse<Media>>;
|
|
4068
4071
|
/** Download the stored bytes of a media item as a File (used to re-edit existing images). */
|
|
@@ -4373,10 +4376,11 @@ declare class ServicesResource {
|
|
|
4373
4376
|
description?: TranslatableValue | null;
|
|
4374
4377
|
digital?: boolean;
|
|
4375
4378
|
public?: boolean;
|
|
4379
|
+
bookable?: boolean;
|
|
4376
4380
|
pricingModel?: string;
|
|
4377
4381
|
settings?: Record<string, unknown> | null;
|
|
4378
4382
|
}): Promise<IAppResponse<Service>>;
|
|
4379
|
-
update(id: string, data: Partial<Pick<Service, 'name' | 'price' | 'description' | 'active' | 'digital' | 'public'>> & {
|
|
4383
|
+
update(id: string, data: Partial<Pick<Service, 'name' | 'price' | 'description' | 'active' | 'digital' | 'public' | 'bookable'>> & {
|
|
4380
4384
|
durationMinutes?: number | null;
|
|
4381
4385
|
settings?: Record<string, unknown> | null;
|
|
4382
4386
|
}): Promise<IAppResponse<Service>>;
|
|
@@ -4881,6 +4885,7 @@ interface JoAiClientConfig {
|
|
|
4881
4885
|
agentAuthKey?: string;
|
|
4882
4886
|
cache?: CacheConfig;
|
|
4883
4887
|
buildSecret?: string;
|
|
4888
|
+
customFetch?: typeof globalThis.fetch;
|
|
4884
4889
|
}
|
|
4885
4890
|
declare class JoAiClient {
|
|
4886
4891
|
readonly http: IHttpService;
|
package/dist/index.mjs
CHANGED
|
@@ -1615,7 +1615,7 @@ var MediaResource = class {
|
|
|
1615
1615
|
return this.http.get(`media/public${qs ? "?" + qs : ""}`);
|
|
1616
1616
|
}
|
|
1617
1617
|
upload(data) {
|
|
1618
|
-
const { team, file, fileUrl, fileName, mimeType, type, aspect, label, tags, copyright } = data;
|
|
1618
|
+
const { team, file, fileUrl, fileName, mimeType, type, aspect, label, tags, copyright, aiGenerated } = data;
|
|
1619
1619
|
if (file) {
|
|
1620
1620
|
const formData = new FormData();
|
|
1621
1621
|
formData.append("file", file, file.name);
|
|
@@ -1624,6 +1624,7 @@ var MediaResource = class {
|
|
|
1624
1624
|
if (label) formData.append("label", label);
|
|
1625
1625
|
if (tags) tags.forEach((t) => formData.append("tags[]", t));
|
|
1626
1626
|
if (copyright) formData.append("copyright", copyright);
|
|
1627
|
+
if (aiGenerated) formData.append("aiGenerated", "1");
|
|
1627
1628
|
return this.http.post("media", formData, { headers: { "X-Team": team } });
|
|
1628
1629
|
}
|
|
1629
1630
|
return this.http.post("media", {
|
|
@@ -1634,7 +1635,8 @@ var MediaResource = class {
|
|
|
1634
1635
|
aspect,
|
|
1635
1636
|
label,
|
|
1636
1637
|
tags,
|
|
1637
|
-
copyright
|
|
1638
|
+
copyright,
|
|
1639
|
+
aiGenerated
|
|
1638
1640
|
}, { headers: { "X-Team": team } });
|
|
1639
1641
|
}
|
|
1640
1642
|
list(team, params) {
|
|
@@ -2928,7 +2930,8 @@ var JoAiClient = class {
|
|
|
2928
2930
|
if (config.buildSecret) headers["X-Build-Secret"] = config.buildSecret;
|
|
2929
2931
|
const http = new HttpService(`${apiBaseUrl}/v1`, void 0, config.apiToken, {
|
|
2930
2932
|
headers,
|
|
2931
|
-
csrfBaseUrl: apiBaseUrl
|
|
2933
|
+
csrfBaseUrl: apiBaseUrl,
|
|
2934
|
+
customFetch: config.customFetch
|
|
2932
2935
|
});
|
|
2933
2936
|
const cache = config.cache;
|
|
2934
2937
|
this.http = cache?.enabled !== false ? new CachedHttpService(http, cache?.overrides, cache?.defaultTtl) : http;
|