@joai/core 0.16.0 → 0.18.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/index.d.mts +141 -90
- package/dist/react/index.d.mts +1 -0
- package/dist/react/index.mjs +29 -7
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -294,7 +294,7 @@ type AppSubscription = {
|
|
|
294
294
|
updatedAt: string;
|
|
295
295
|
};
|
|
296
296
|
type PaymentProvider = 'xmoney' | 'lemonsqueezy' | 'stripe' | 'apple' | 'google' | 'blockchain' | 'offline';
|
|
297
|
-
type PlanFeature = 'general' | 'messages' | 'team-members' | 'teams' | 'support' | 'agent' | 'auto-mode' | 'cloud-sync' | 'wallet-cloud' | 'wallet-cloud-premium' | 'wallet-multi' | 'cards' | 'alerts' | 'advanced-commands' | 'tasks' | 'integrations' | 'message-history' | 'memory' | 'documents' | 'voice-input' | 'voice-live' | 'image-gen' | 'video-gen' | 'openclaw' | 'skills' | 'items' | 'context-length' | 'workspace-storage' | 'ingestions' | 'agent-email' | 'streak-freezes' | 'byok' | 'mcp' | 'phone-call' | 'phone-number' | 'custom-domain' | 'contacts' | 'links' | '
|
|
297
|
+
type PlanFeature = 'general' | 'messages' | 'team-members' | 'teams' | 'support' | 'agent' | 'auto-mode' | 'cloud-sync' | 'wallet-cloud' | 'wallet-cloud-premium' | 'wallet-multi' | 'cards' | 'alerts' | 'advanced-commands' | 'tasks' | 'integrations' | 'message-history' | 'memory' | 'documents' | 'voice-input' | 'voice-live' | 'image-gen' | 'video-gen' | 'openclaw' | 'skills' | 'items' | 'context-length' | 'workspace-storage' | 'ingestions' | 'agent-email' | 'streak-freezes' | 'byok' | 'mcp' | 'phone-call' | 'phone-number' | 'custom-domain' | 'contacts' | 'links' | 'store-fee-rate' | 'store-fee-rate-physical';
|
|
298
298
|
type PlanBenefit = {
|
|
299
299
|
label: Partial<Record<WarpLocale, string>>;
|
|
300
300
|
tip?: Partial<Record<WarpLocale, string>>;
|
|
@@ -517,11 +517,30 @@ type PurchaseOptions = {
|
|
|
517
517
|
};
|
|
518
518
|
//#endregion
|
|
519
519
|
//#region src/team/types.d.ts
|
|
520
|
+
type TeamCategory = 'general' | 'appointment' | 'restaurant' | 'service' | 'fitness' | 'beauty' | 'consultation';
|
|
521
|
+
type TeamFeature = 'shop' | 'appointments';
|
|
520
522
|
type TeamMember = User & {
|
|
521
523
|
role: UserRole | null;
|
|
522
524
|
roleAcceptedAt: string | null;
|
|
523
525
|
email: string | null;
|
|
524
526
|
};
|
|
527
|
+
type TeamMeta = {
|
|
528
|
+
'extra.messages'?: number;
|
|
529
|
+
'limit.spending'?: number | null;
|
|
530
|
+
'currency'?: string;
|
|
531
|
+
'extra.usage.enabled'?: boolean;
|
|
532
|
+
'auto.reload.enabled'?: boolean;
|
|
533
|
+
'auto.reload.threshold_cents'?: number | null;
|
|
534
|
+
'auto.reload.amount_cents'?: number | null;
|
|
535
|
+
'llm.provider'?: 'openai' | 'anthropic' | 'google' | 'xai' | null;
|
|
536
|
+
'byok.providers'?: ByokProviders | null;
|
|
537
|
+
'board.auto.enabled'?: boolean;
|
|
538
|
+
'payments.online'?: boolean;
|
|
539
|
+
'payments.coupons'?: boolean;
|
|
540
|
+
'stock.enabled'?: boolean;
|
|
541
|
+
'branding'?: TeamBrand | null;
|
|
542
|
+
settings: Record<string, unknown>;
|
|
543
|
+
};
|
|
525
544
|
type Team = {
|
|
526
545
|
slug: string;
|
|
527
546
|
name: string;
|
|
@@ -529,7 +548,9 @@ type Team = {
|
|
|
529
548
|
description: TranslatableValue | null;
|
|
530
549
|
locale: WarpLocale;
|
|
531
550
|
timezone: string;
|
|
532
|
-
|
|
551
|
+
meta?: TeamMeta;
|
|
552
|
+
features?: TeamFeature[];
|
|
553
|
+
cover?: string | null;
|
|
533
554
|
logo: string | null;
|
|
534
555
|
tagline?: TranslatableValue | null;
|
|
535
556
|
public: boolean;
|
|
@@ -576,8 +597,9 @@ type TeamPrivate = {
|
|
|
576
597
|
renewedAt: string | null;
|
|
577
598
|
expiresAt: string | null;
|
|
578
599
|
};
|
|
579
|
-
|
|
600
|
+
meta: TeamMeta;
|
|
580
601
|
branding: TeamBrand;
|
|
602
|
+
category?: TeamCategory;
|
|
581
603
|
createdAt: string;
|
|
582
604
|
justCreated: boolean;
|
|
583
605
|
};
|
|
@@ -607,6 +629,7 @@ type TeamSettings = {
|
|
|
607
629
|
'board.auto.enabled'?: boolean;
|
|
608
630
|
'payments.online'?: boolean;
|
|
609
631
|
'payments.coupons'?: boolean;
|
|
632
|
+
'stock.enabled'?: boolean;
|
|
610
633
|
'branding'?: TeamBrand | null;
|
|
611
634
|
};
|
|
612
635
|
type TeamUsage = Partial<Record<PlanFeature, TeamFeatureUsage>> & {
|
|
@@ -744,7 +767,7 @@ type Skill = {
|
|
|
744
767
|
};
|
|
745
768
|
//#endregion
|
|
746
769
|
//#region src/integration/types.d.ts
|
|
747
|
-
type IntegrationType = 'none' | 'webhook' | 'api-token' | 'telegram' | 'slack' | 'whatsapp' | 'twilio' | 'n8n' | '
|
|
770
|
+
type IntegrationType = 'none' | 'webhook' | 'api-token' | 'telegram' | 'slack' | 'whatsapp' | 'twilio' | 'n8n' | 'apple-health' | 'mcp' | 'x' | 'email' | 'calendar' | 'embed' | 'discord' | 'github' | 'sentry' | 'readwise';
|
|
748
771
|
type IntegrationDetails = {
|
|
749
772
|
type: IntegrationType;
|
|
750
773
|
name: string;
|
|
@@ -1218,9 +1241,17 @@ type Alert = {
|
|
|
1218
1241
|
type ApiToken = {
|
|
1219
1242
|
id: number;
|
|
1220
1243
|
name: string;
|
|
1244
|
+
teams: Team[];
|
|
1221
1245
|
createdAt: string;
|
|
1222
1246
|
token?: string;
|
|
1223
1247
|
};
|
|
1248
|
+
type PaginatedResponse<T> = {
|
|
1249
|
+
data: T[];
|
|
1250
|
+
current_page: number;
|
|
1251
|
+
per_page: number;
|
|
1252
|
+
total: number;
|
|
1253
|
+
last_page: number;
|
|
1254
|
+
};
|
|
1224
1255
|
//#endregion
|
|
1225
1256
|
//#region src/service/types.d.ts
|
|
1226
1257
|
type Service = {
|
|
@@ -1230,15 +1261,98 @@ type Service = {
|
|
|
1230
1261
|
price: number;
|
|
1231
1262
|
durationMinutes: number;
|
|
1232
1263
|
tags?: string[] | null;
|
|
1233
|
-
category: string | null;
|
|
1234
1264
|
description: TranslatableValue | null;
|
|
1235
1265
|
active: boolean;
|
|
1236
1266
|
digital: boolean;
|
|
1237
1267
|
public: boolean;
|
|
1268
|
+
settings?: Record<string, unknown> | null;
|
|
1238
1269
|
createdAt: string;
|
|
1239
1270
|
updatedAt: string;
|
|
1240
1271
|
};
|
|
1241
1272
|
//#endregion
|
|
1273
|
+
//#region src/meeting/types.d.ts
|
|
1274
|
+
type MeetingSessionState = 'idle' | 'listening' | 'ended';
|
|
1275
|
+
type TranscriptEntry = {
|
|
1276
|
+
id: string;
|
|
1277
|
+
text: string;
|
|
1278
|
+
isFinal: boolean;
|
|
1279
|
+
timestamp: number;
|
|
1280
|
+
speakerId?: number;
|
|
1281
|
+
speakerName?: string;
|
|
1282
|
+
};
|
|
1283
|
+
type BookmarkEntry = {
|
|
1284
|
+
id: string;
|
|
1285
|
+
timestamp: number;
|
|
1286
|
+
transcriptEntryId: string;
|
|
1287
|
+
};
|
|
1288
|
+
type MeetingParticipant = {
|
|
1289
|
+
name: string | null;
|
|
1290
|
+
profileImageUrl: string | null;
|
|
1291
|
+
};
|
|
1292
|
+
type MeetingSpeakerAssignment = {
|
|
1293
|
+
speakerId: number;
|
|
1294
|
+
name: string;
|
|
1295
|
+
contactId: string | null;
|
|
1296
|
+
};
|
|
1297
|
+
type Meeting = {
|
|
1298
|
+
id: string;
|
|
1299
|
+
code: string;
|
|
1300
|
+
name: string | null;
|
|
1301
|
+
room: Room | null;
|
|
1302
|
+
inviteUrl: string;
|
|
1303
|
+
status: MeetingStatus;
|
|
1304
|
+
conferenceProvider: MeetingConferenceProvider | null;
|
|
1305
|
+
conferenceUrl: string | null;
|
|
1306
|
+
conferenceExternalId: string | null;
|
|
1307
|
+
captureMode: 'desktop_local' | null;
|
|
1308
|
+
transcriptUrl: string | null;
|
|
1309
|
+
summaryUrl: string | null;
|
|
1310
|
+
participants?: MeetingParticipant[];
|
|
1311
|
+
speakerAssignments?: MeetingSpeakerAssignment[] | null;
|
|
1312
|
+
configuration?: Record<string, WarpNativeValue>;
|
|
1313
|
+
scheduledAt: string | null;
|
|
1314
|
+
calendarEventId: number | null;
|
|
1315
|
+
startedAt: string | null;
|
|
1316
|
+
endedAt: string | null;
|
|
1317
|
+
createdAt: string;
|
|
1318
|
+
};
|
|
1319
|
+
type MeetingStatus = 'active' | 'completed' | 'analyzed' | 'scheduled' | 'cancelled';
|
|
1320
|
+
type MeetingConferenceProvider = 'google_meet' | 'teams' | 'zoom';
|
|
1321
|
+
type MeetingFeature = 'transcription' | 'summary' | 'insights' | 'actions';
|
|
1322
|
+
type MeetingJoinTeam = {
|
|
1323
|
+
name: string;
|
|
1324
|
+
logo: string | null;
|
|
1325
|
+
};
|
|
1326
|
+
type MeetingJoinInfo = {
|
|
1327
|
+
id: string;
|
|
1328
|
+
code: string;
|
|
1329
|
+
name: string | null;
|
|
1330
|
+
inviteUrl: string;
|
|
1331
|
+
agentName: string;
|
|
1332
|
+
team: MeetingJoinTeam;
|
|
1333
|
+
status: MeetingStatus;
|
|
1334
|
+
isPhysical: boolean;
|
|
1335
|
+
scheduledAt: string | null;
|
|
1336
|
+
scheduledEndAt: string | null;
|
|
1337
|
+
timezone: string;
|
|
1338
|
+
conferenceUrl: string | null;
|
|
1339
|
+
conferenceProvider: MeetingConferenceProvider | null;
|
|
1340
|
+
endedAt: string | null;
|
|
1341
|
+
canCancel: boolean;
|
|
1342
|
+
features: Record<MeetingFeature, boolean>;
|
|
1343
|
+
};
|
|
1344
|
+
type MeetingTranscriptEntry = {
|
|
1345
|
+
speaker: 'user' | 'agent';
|
|
1346
|
+
text: string;
|
|
1347
|
+
timestamp: string;
|
|
1348
|
+
};
|
|
1349
|
+
type MeetingUsage = {
|
|
1350
|
+
current: number;
|
|
1351
|
+
limit: number;
|
|
1352
|
+
reached: boolean;
|
|
1353
|
+
remainingWords: number | null;
|
|
1354
|
+
};
|
|
1355
|
+
//#endregion
|
|
1242
1356
|
//#region src/appointment/types.d.ts
|
|
1243
1357
|
type AppointmentSlot = {
|
|
1244
1358
|
start: string;
|
|
@@ -1258,7 +1372,6 @@ type AppointmentAvailabilitySlot = {
|
|
|
1258
1372
|
serviceSlug: string | null;
|
|
1259
1373
|
};
|
|
1260
1374
|
type AppointmentAvailability = {
|
|
1261
|
-
connected: boolean;
|
|
1262
1375
|
timezone: string;
|
|
1263
1376
|
service: AppointmentAvailabilityService | null;
|
|
1264
1377
|
slots: AppointmentAvailabilitySlot[];
|
|
@@ -1277,7 +1390,9 @@ type AppointmentPolicy = {
|
|
|
1277
1390
|
holidays: string[] | null;
|
|
1278
1391
|
conferenceEnabled: boolean | null;
|
|
1279
1392
|
serviceSelectionEnabled?: boolean | null;
|
|
1280
|
-
|
|
1393
|
+
paymentEnabled?: boolean | null;
|
|
1394
|
+
requireApproval?: boolean | null;
|
|
1395
|
+
agent?: Agent | null;
|
|
1281
1396
|
};
|
|
1282
1397
|
type AppointmentBookingContext = {
|
|
1283
1398
|
resolved: AppointmentPolicy | null;
|
|
@@ -1301,6 +1416,7 @@ type AppointmentBooking = {
|
|
|
1301
1416
|
status: string;
|
|
1302
1417
|
attendeeEmail: string | null;
|
|
1303
1418
|
attendeeName: string | null;
|
|
1419
|
+
configuration?: Record<string, WarpNativeValue>;
|
|
1304
1420
|
};
|
|
1305
1421
|
type AppointmentRequest = {
|
|
1306
1422
|
id: string;
|
|
@@ -1316,6 +1432,10 @@ type AppointmentRequest = {
|
|
|
1316
1432
|
start: string;
|
|
1317
1433
|
end: string;
|
|
1318
1434
|
}[] | null;
|
|
1435
|
+
configuration?: Record<string, WarpNativeValue>;
|
|
1436
|
+
service?: Service | null;
|
|
1437
|
+
meeting?: Meeting | null;
|
|
1438
|
+
agent?: Agent | null;
|
|
1319
1439
|
createdAt: string;
|
|
1320
1440
|
};
|
|
1321
1441
|
//#endregion
|
|
@@ -1767,88 +1887,6 @@ type McpToolCallBroadcast = {
|
|
|
1767
1887
|
createdAt: string;
|
|
1768
1888
|
};
|
|
1769
1889
|
//#endregion
|
|
1770
|
-
//#region src/meeting/types.d.ts
|
|
1771
|
-
type MeetingSessionState = 'idle' | 'listening' | 'ended';
|
|
1772
|
-
type TranscriptEntry = {
|
|
1773
|
-
id: string;
|
|
1774
|
-
text: string;
|
|
1775
|
-
isFinal: boolean;
|
|
1776
|
-
timestamp: number;
|
|
1777
|
-
speakerId?: number;
|
|
1778
|
-
speakerName?: string;
|
|
1779
|
-
};
|
|
1780
|
-
type BookmarkEntry = {
|
|
1781
|
-
id: string;
|
|
1782
|
-
timestamp: number;
|
|
1783
|
-
transcriptEntryId: string;
|
|
1784
|
-
};
|
|
1785
|
-
type MeetingParticipant = {
|
|
1786
|
-
name: string | null;
|
|
1787
|
-
profileImageUrl: string | null;
|
|
1788
|
-
};
|
|
1789
|
-
type MeetingSpeakerAssignment = {
|
|
1790
|
-
speakerId: number;
|
|
1791
|
-
name: string;
|
|
1792
|
-
contactId: string | null;
|
|
1793
|
-
};
|
|
1794
|
-
type Meeting = {
|
|
1795
|
-
id: string;
|
|
1796
|
-
code: string;
|
|
1797
|
-
name: string | null;
|
|
1798
|
-
room: Room | null;
|
|
1799
|
-
inviteUrl: string;
|
|
1800
|
-
status: MeetingStatus;
|
|
1801
|
-
conferenceProvider: MeetingConferenceProvider | null;
|
|
1802
|
-
conferenceUrl: string | null;
|
|
1803
|
-
conferenceExternalId: string | null;
|
|
1804
|
-
captureMode: 'desktop_local' | null;
|
|
1805
|
-
transcriptUrl: string | null;
|
|
1806
|
-
summaryUrl: string | null;
|
|
1807
|
-
participants?: MeetingParticipant[];
|
|
1808
|
-
speakerAssignments?: MeetingSpeakerAssignment[] | null;
|
|
1809
|
-
scheduledAt: string | null;
|
|
1810
|
-
calendarEventId: number | null;
|
|
1811
|
-
startedAt: string | null;
|
|
1812
|
-
endedAt: string | null;
|
|
1813
|
-
createdAt: string;
|
|
1814
|
-
};
|
|
1815
|
-
type MeetingStatus = 'active' | 'completed' | 'analyzed' | 'scheduled' | 'cancelled';
|
|
1816
|
-
type MeetingConferenceProvider = 'google_meet' | 'teams' | 'zoom';
|
|
1817
|
-
type MeetingFeature = 'transcription' | 'summary' | 'insights' | 'actions';
|
|
1818
|
-
type MeetingJoinTeam = {
|
|
1819
|
-
name: string;
|
|
1820
|
-
logo: string | null;
|
|
1821
|
-
};
|
|
1822
|
-
type MeetingJoinInfo = {
|
|
1823
|
-
id: string;
|
|
1824
|
-
code: string;
|
|
1825
|
-
name: string | null;
|
|
1826
|
-
inviteUrl: string;
|
|
1827
|
-
agentName: string;
|
|
1828
|
-
team: MeetingJoinTeam;
|
|
1829
|
-
status: MeetingStatus;
|
|
1830
|
-
isPhysical: boolean;
|
|
1831
|
-
scheduledAt: string | null;
|
|
1832
|
-
scheduledEndAt: string | null;
|
|
1833
|
-
timezone: string;
|
|
1834
|
-
conferenceUrl: string | null;
|
|
1835
|
-
conferenceProvider: MeetingConferenceProvider | null;
|
|
1836
|
-
endedAt: string | null;
|
|
1837
|
-
canCancel: boolean;
|
|
1838
|
-
features: Record<MeetingFeature, boolean>;
|
|
1839
|
-
};
|
|
1840
|
-
type MeetingTranscriptEntry = {
|
|
1841
|
-
speaker: 'user' | 'agent';
|
|
1842
|
-
text: string;
|
|
1843
|
-
timestamp: string;
|
|
1844
|
-
};
|
|
1845
|
-
type MeetingUsage = {
|
|
1846
|
-
current: number;
|
|
1847
|
-
limit: number;
|
|
1848
|
-
reached: boolean;
|
|
1849
|
-
remainingWords: number | null;
|
|
1850
|
-
};
|
|
1851
|
-
//#endregion
|
|
1852
1890
|
//#region src/memory/types.d.ts
|
|
1853
1891
|
type Memory = {
|
|
1854
1892
|
id: string;
|
|
@@ -2943,6 +2981,7 @@ type Update = {
|
|
|
2943
2981
|
title: string;
|
|
2944
2982
|
body: string | null;
|
|
2945
2983
|
imageUrl: string | null;
|
|
2984
|
+
media: Media[];
|
|
2946
2985
|
linkUrl: string | null;
|
|
2947
2986
|
startsAt: string | null;
|
|
2948
2987
|
endsAt: string | null;
|
|
@@ -2954,12 +2993,24 @@ type UpdateCreatePayload = {
|
|
|
2954
2993
|
type: UpdateType;
|
|
2955
2994
|
body?: string;
|
|
2956
2995
|
imageUrl?: string;
|
|
2996
|
+
media?: MediaLibraryItems;
|
|
2957
2997
|
linkUrl?: string;
|
|
2958
2998
|
startsAt?: string;
|
|
2959
2999
|
endsAt?: string;
|
|
2960
3000
|
status?: UpdateStatus;
|
|
2961
3001
|
};
|
|
2962
3002
|
type UpdateUpdatePayload = Partial<UpdateCreatePayload>;
|
|
3003
|
+
type UpdateStats = {
|
|
3004
|
+
totalUpdates: number;
|
|
3005
|
+
activeUpdates: number;
|
|
3006
|
+
dealsCount: number;
|
|
3007
|
+
eventsCount: number;
|
|
3008
|
+
newsCount: number;
|
|
3009
|
+
publishedCount: number;
|
|
3010
|
+
draftCount: number;
|
|
3011
|
+
archivedCount: number;
|
|
3012
|
+
creationHistory: number[];
|
|
3013
|
+
};
|
|
2963
3014
|
//#endregion
|
|
2964
3015
|
//#region src/swarm/types.d.ts
|
|
2965
3016
|
type Swarm = {
|
|
@@ -3137,4 +3188,4 @@ type CliSessionStatus = {
|
|
|
3137
3188
|
meta: CliSessionMeta | null;
|
|
3138
3189
|
};
|
|
3139
3190
|
//#endregion
|
|
3140
|
-
export { Achievement, Affiliate, AffiliateStatus, AffiliateTier, AffiliateTierName, Agent, AgentActionHistoryEntry, AgentCharacter, AgentDelegatable, AgentEngine, AgentExecuteHandler, AgentExecuteOptions, AgentGender, AgentMessageMeta, AgentMessageOptions, AgentPrivate, AgentSettings, AgentSimple, AgentWalletMode, AgentWebhookWarp, AggregatedRoute, AiCostEntry, AiCostsResponse, AiCostsSummary, Alert, ApiToken, AppEnv, AppFile, AppFileType, AppIngestion, AppSubscription, AppointmentAvailability, AppointmentAvailabilityService, AppointmentAvailabilitySlot, AppointmentBooking, AppointmentBookingContext, AppointmentPolicy, AppointmentRequest, AppointmentSlot, BillingAddress, Blueprint, BlueprintOnboardingStep, BlueprintRedirect, BlueprintSettings, BlueprintShortcut, BlueprintTask, BlueprintTeam, BoardSummaryViewable, BookmarkEntry, BrandBackend, BrandIntegration, BrandIntegrationAction, BrandIntegrationProvider, BrandSearchHit, BrandSiteConfig, BrandSourceConfig, Budget, ByokProviderConfig, ByokProviderName, ByokProviders, CalendarProvider, CalendarStatus, Card, Cart, CartItem, Challenge, Challenges, ChangelogEntry, Character, ChatClientAction, ChatClientThought, ChatStreamData, ChatStreamEventType, CliSessionMeta, CliSessionStatus, Contact, ContactActivity, ContactActivityAuthor, ContactFormData, ContactViewable, Contract, ContractCategoryDisplayNames, ContractCategoryName, ContractCodeMetadata, ContractEntity, ContractOnNetwork, ContractVersion, ContractsAddressConfig, CortexExecuteOptions, Coupon, DefaultCodeMetadata, DemoFlow, DemoMessage, Desk, DeskItem, DeskItemRole, Document, Earning, Element, ElementSpec, ElementType, ElementVariation, EmailProvider, EmbedStatus, EncryptionStatus, Entity, EntityDirectExecuteRequest, EntityProposable, EntitySignable, EntityTemplate, Experience, FileInfo, FileMetadata, Flow, FlowCategory, FlowInputMapping, FlowStatus, FlowStep, GamificationData, GamificationEventType, Goal, GoalCreatePayload, GoalPriority, GoalProgressViewable, GoalStatus, HintOptions, HintPosition, HttpService, IAppResponse, IHttpService, IRequestOptions, IngestionSourceType, IngestionStatus, Inquiry, InquiryStatus, InquiryType, Integration, IntegrationDetails, IntegrationType, Intent, Item, ItemCreatePayload, ItemExecutionStatus, ItemPriority, ItemStatus, ItemUpdatePayload, ItemViewable, JoaiUrls, Kyc, KycStatus, Link, LinkCreatePayload, LinkStats, LinkUpdatePayload, LocalAgentWallet, MarketplaceAgent, MarketplaceCheckoutItem, MarketplaceData, MarketplaceEntityType, MarketplaceInfo, MarketplaceItem, MarketplaceListing, MarketplacePriceTier, MarketplacePricing, MarketplacePurchasable, MarketplacePurchaseResult, McpToolCall, McpToolCallBroadcast, McpToolCallStatus, Media, MediaAttributes, MediaItems, MediaLibraryAttributes, MediaLibraryItems, MediaMime, Meeting, MeetingConferenceProvider, MeetingFeature, MeetingJoinInfo, MeetingJoinTeam, MeetingParticipant, MeetingSessionState, MeetingSpeakerAssignment, MeetingStatus, MeetingTranscriptEntry, MeetingUsage, Memory, Message, MessageId, MessageRole, Milestone, MilestoneType, Mission, MissionBudget, MissionCreatePayload, MissionPlan, MissionPriority, MissionSchedule, MissionStatus, MissionViewable, MultimodalContent, MultimodalFile, Notification, NotificationAction, NotificationAgent, NotificationChannel, NotificationSetting, OG_IMAGE_CONFIG, OG_IMAGE_HEIGHT, OG_IMAGE_WIDTH, OfficeAgent, OfficeEntity, OfficeEntityKind, OfficeLiveOverrides, OfficeMember, OfficeSnapshot, OfficeStatus, OfficeStatusFilter, OfficeTypeFilter, OgImageColors, OgImageParams, OgImageType, Order, OrderConfigurationItem, OrderItem, OrderStatus, PaymentProvider, PayoutEntry, PeriodTypeLabels, PeriodTypeOptions, PermissionConfigType, PersonaQuestionable, Plan, PlanBenefit, PlanExtra, PlanFeature, PlanInterval, PolicyMethod, PolicySetting, PricingModel, Product, ProductConfiguration, ProductDiscount, ProductMeta, ProductPieces, ProductRating, ProductRelation, ProductRelationType, ProductVariation, ProductVariationMeta, ProductVariationType, Project, ProjectAspectRatio, ProjectAssembly, ProjectCaptionStyle, ProjectClipCandidate, ProjectClips, ProjectExport, ProjectExportAsset, ProjectExportResponse, ProjectImages, ProjectInputAssistIntent, ProjectInputAssistResponse, ProjectMutation, ProjectOutputPreset, ProjectOutputType, ProjectPlan, ProjectRender, ProjectRenderMode, ProjectSelectedClip, ProjectShot, ProjectSoundtrack, ProjectSourceMedia, ProjectStatus, ProjectStudioHistoryEntry, ProjectStudioQuestion, ProjectStudioResponse, ProjectStudioStage, ProjectStudioState, ProjectStudioSummary, ProjectStyleDirection, ProjectTranscript, ProjectTranscriptSegment, Proposal, ProposalAction, ProposalActionPayment, ProposalActionPaymentSerializable, ProposalActionSerializable, ProposalPollOption, ProposalStatus, PurchaseOptions, PurchaseResult, RampProvider, RampProviderInfo, Reactions, RecentExperience, Reminder, Room, RoomId, RoomKind, ScInfo, SchedulePreset, SecretAuthorizable, SecretSettable, SendableActivityUpdate, SendableAgentAction, SendableAgentMessage, SendableAgentThought, SendableMedia, SendableUserMessage, Service, Shortcut, Site, SiteAgent, SiteBrand, SiteRoute, SiteTeam, Skill, SkillMediaBindingRole, SkillMediaBindingRoleValue, SkillScope, SkillScopeValue, SkillType, SkillTypeValue, SocialAuthProvider, SocialBot, SocialPlatform, Store, StoreCreatePayload, StoreEntry, StoreEntryPayload, StoreEntryResult, StoreToggleResult, StoreVisibility, StoreWithEntries, Streak, SubscriptionInterval, SubscriptionPlan, SubscriptionStatus, Swarm, Task, Team, TeamBrand, TeamFeatureUsage, TeamMember, TeamPrivate, TeamSettings, TeamUsage, Tier, TierFeature, TierName, TranscriptEntry, TranscriptionCorrection, TranscriptionResponse, TranslatableValue, Update, UpdateCreatePayload, UpdateStatus, UpdateType, UpdateUpdatePayload, User, UserInterest, UserMode, UserPrivate, UserRole, UserSettings, UserSocialAccount, UserStats, VolumePrice, Wallet, WalletList, WarpApprovable, WarpBackend, WarpBackendCategory, WarpBackendStatus, WarpBatchItem, WarpBatchable, WarpCloudExecutable, WarpCreateable, WarpExecutable, WarpExtras, WarpExtrasFaq, WarpInputable, WarpScreenshotVariant, WarpSearchHit, WarpSelectable, WarpSelectableDetails, WarpSuggestion, WarpTestable, WarpViewable, Webhook, WebhookTriggerEvent, WorkspaceCloudFile, WorkspaceContext, WorkspaceInfo, WorkspaceSettings, XIntegrationStatus, abbreviateNumber, getAgentsBaseUrl, getApiBaseUrl, getAppBaseUrl, getAssetAppLogoUrl, getAssetChainLogoUrl, getAssetPartnerLogoUrl, getAssetTokenLogoUrl, getAssetWalletLogoUrl, getCortexBaseUrl, getDigestBaseUrl, getFormsBaseUrl, getMcpServerAgentUrl, getSiteUrl, getSitesRootDomain, getStoreBaseUrl, getWarpScreenshotUrl, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, localize, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
|
|
3191
|
+
export { Achievement, Affiliate, AffiliateStatus, AffiliateTier, AffiliateTierName, Agent, AgentActionHistoryEntry, AgentCharacter, AgentDelegatable, AgentEngine, AgentExecuteHandler, AgentExecuteOptions, AgentGender, AgentMessageMeta, AgentMessageOptions, AgentPrivate, AgentSettings, AgentSimple, AgentWalletMode, AgentWebhookWarp, AggregatedRoute, AiCostEntry, AiCostsResponse, AiCostsSummary, Alert, ApiToken, AppEnv, AppFile, AppFileType, AppIngestion, AppSubscription, AppointmentAvailability, AppointmentAvailabilityService, AppointmentAvailabilitySlot, AppointmentBooking, AppointmentBookingContext, AppointmentPolicy, AppointmentRequest, AppointmentSlot, BillingAddress, Blueprint, BlueprintOnboardingStep, BlueprintRedirect, BlueprintSettings, BlueprintShortcut, BlueprintTask, BlueprintTeam, BoardSummaryViewable, BookmarkEntry, BrandBackend, BrandIntegration, BrandIntegrationAction, BrandIntegrationProvider, BrandSearchHit, BrandSiteConfig, BrandSourceConfig, Budget, ByokProviderConfig, ByokProviderName, ByokProviders, CalendarProvider, CalendarStatus, Card, Cart, CartItem, Challenge, Challenges, ChangelogEntry, Character, ChatClientAction, ChatClientThought, ChatStreamData, ChatStreamEventType, CliSessionMeta, CliSessionStatus, Contact, ContactActivity, ContactActivityAuthor, ContactFormData, ContactViewable, Contract, ContractCategoryDisplayNames, ContractCategoryName, ContractCodeMetadata, ContractEntity, ContractOnNetwork, ContractVersion, ContractsAddressConfig, CortexExecuteOptions, Coupon, DefaultCodeMetadata, DemoFlow, DemoMessage, Desk, DeskItem, DeskItemRole, Document, Earning, Element, ElementSpec, ElementType, ElementVariation, EmailProvider, EmbedStatus, EncryptionStatus, Entity, EntityDirectExecuteRequest, EntityProposable, EntitySignable, EntityTemplate, Experience, FileInfo, FileMetadata, Flow, FlowCategory, FlowInputMapping, FlowStatus, FlowStep, GamificationData, GamificationEventType, Goal, GoalCreatePayload, GoalPriority, GoalProgressViewable, GoalStatus, HintOptions, HintPosition, HttpService, IAppResponse, IHttpService, IRequestOptions, IngestionSourceType, IngestionStatus, Inquiry, InquiryStatus, InquiryType, Integration, IntegrationDetails, IntegrationType, Intent, Item, ItemCreatePayload, ItemExecutionStatus, ItemPriority, ItemStatus, ItemUpdatePayload, ItemViewable, JoaiUrls, Kyc, KycStatus, Link, LinkCreatePayload, LinkStats, LinkUpdatePayload, LocalAgentWallet, MarketplaceAgent, MarketplaceCheckoutItem, MarketplaceData, MarketplaceEntityType, MarketplaceInfo, MarketplaceItem, MarketplaceListing, MarketplacePriceTier, MarketplacePricing, MarketplacePurchasable, MarketplacePurchaseResult, McpToolCall, McpToolCallBroadcast, McpToolCallStatus, Media, MediaAttributes, MediaItems, MediaLibraryAttributes, MediaLibraryItems, MediaMime, Meeting, MeetingConferenceProvider, MeetingFeature, MeetingJoinInfo, MeetingJoinTeam, MeetingParticipant, MeetingSessionState, MeetingSpeakerAssignment, MeetingStatus, MeetingTranscriptEntry, MeetingUsage, Memory, Message, MessageId, MessageRole, Milestone, MilestoneType, Mission, MissionBudget, MissionCreatePayload, MissionPlan, MissionPriority, MissionSchedule, MissionStatus, MissionViewable, MultimodalContent, MultimodalFile, Notification, NotificationAction, NotificationAgent, NotificationChannel, NotificationSetting, OG_IMAGE_CONFIG, OG_IMAGE_HEIGHT, OG_IMAGE_WIDTH, OfficeAgent, OfficeEntity, OfficeEntityKind, OfficeLiveOverrides, OfficeMember, OfficeSnapshot, OfficeStatus, OfficeStatusFilter, OfficeTypeFilter, OgImageColors, OgImageParams, OgImageType, Order, OrderConfigurationItem, OrderItem, OrderStatus, PaginatedResponse, PaymentProvider, PayoutEntry, PeriodTypeLabels, PeriodTypeOptions, PermissionConfigType, PersonaQuestionable, Plan, PlanBenefit, PlanExtra, PlanFeature, PlanInterval, PolicyMethod, PolicySetting, PricingModel, Product, ProductConfiguration, ProductDiscount, ProductMeta, ProductPieces, ProductRating, ProductRelation, ProductRelationType, ProductVariation, ProductVariationMeta, ProductVariationType, Project, ProjectAspectRatio, ProjectAssembly, ProjectCaptionStyle, ProjectClipCandidate, ProjectClips, ProjectExport, ProjectExportAsset, ProjectExportResponse, ProjectImages, ProjectInputAssistIntent, ProjectInputAssistResponse, ProjectMutation, ProjectOutputPreset, ProjectOutputType, ProjectPlan, ProjectRender, ProjectRenderMode, ProjectSelectedClip, ProjectShot, ProjectSoundtrack, ProjectSourceMedia, ProjectStatus, ProjectStudioHistoryEntry, ProjectStudioQuestion, ProjectStudioResponse, ProjectStudioStage, ProjectStudioState, ProjectStudioSummary, ProjectStyleDirection, ProjectTranscript, ProjectTranscriptSegment, Proposal, ProposalAction, ProposalActionPayment, ProposalActionPaymentSerializable, ProposalActionSerializable, ProposalPollOption, ProposalStatus, PurchaseOptions, PurchaseResult, RampProvider, RampProviderInfo, Reactions, RecentExperience, Reminder, Room, RoomId, RoomKind, ScInfo, SchedulePreset, SecretAuthorizable, SecretSettable, SendableActivityUpdate, SendableAgentAction, SendableAgentMessage, SendableAgentThought, SendableMedia, SendableUserMessage, Service, Shortcut, Site, SiteAgent, SiteBrand, SiteRoute, SiteTeam, Skill, SkillMediaBindingRole, SkillMediaBindingRoleValue, SkillScope, SkillScopeValue, SkillType, SkillTypeValue, SocialAuthProvider, SocialBot, SocialPlatform, Store, StoreCreatePayload, StoreEntry, StoreEntryPayload, StoreEntryResult, StoreToggleResult, StoreVisibility, StoreWithEntries, Streak, SubscriptionInterval, SubscriptionPlan, SubscriptionStatus, Swarm, Task, Team, TeamBrand, TeamCategory, TeamFeature, TeamFeatureUsage, TeamMember, TeamMeta, TeamPrivate, TeamSettings, TeamUsage, Tier, TierFeature, TierName, TranscriptEntry, TranscriptionCorrection, TranscriptionResponse, TranslatableValue, Update, UpdateCreatePayload, UpdateStats, UpdateStatus, UpdateType, UpdateUpdatePayload, User, UserInterest, UserMode, UserPrivate, UserRole, UserSettings, UserSocialAccount, UserStats, VolumePrice, Wallet, WalletList, WarpApprovable, WarpBackend, WarpBackendCategory, WarpBackendStatus, WarpBatchItem, WarpBatchable, WarpCloudExecutable, WarpCreateable, WarpExecutable, WarpExtras, WarpExtrasFaq, WarpInputable, WarpScreenshotVariant, WarpSearchHit, WarpSelectable, WarpSelectableDetails, WarpSuggestion, WarpTestable, WarpViewable, Webhook, WebhookTriggerEvent, WorkspaceCloudFile, WorkspaceContext, WorkspaceInfo, WorkspaceSettings, XIntegrationStatus, abbreviateNumber, getAgentsBaseUrl, getApiBaseUrl, getAppBaseUrl, getAssetAppLogoUrl, getAssetChainLogoUrl, getAssetPartnerLogoUrl, getAssetTokenLogoUrl, getAssetWalletLogoUrl, getCortexBaseUrl, getDigestBaseUrl, getFormsBaseUrl, getMcpServerAgentUrl, getSiteUrl, getSitesRootDomain, getStoreBaseUrl, getWarpScreenshotUrl, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, localize, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
|
package/dist/react/index.d.mts
CHANGED
|
@@ -98,6 +98,7 @@ declare function useEmbedChat({
|
|
|
98
98
|
roomId: string | null;
|
|
99
99
|
setRoomId: react.Dispatch<react.SetStateAction<string | null>>;
|
|
100
100
|
send: (message: string) => Promise<void>;
|
|
101
|
+
connectionError: boolean;
|
|
101
102
|
};
|
|
102
103
|
//#endregion
|
|
103
104
|
export { EmbedChatInput, EmbedChatItem, EmbedChatList, StreamDataHandler, clearRoom, getOrCreateGuestId, loadRoom, openEventSourceStream, saveRoom, useEmbedChat };
|
package/dist/react/index.mjs
CHANGED
|
@@ -159,18 +159,22 @@ function EmbedChatInput({ onSend, disabled, placeholder = "Type a message...", m
|
|
|
159
159
|
}
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region src/react/use-embed-chat.ts
|
|
162
|
+
const RESPONSE_TIMEOUT_MS = 3e4;
|
|
162
163
|
function useEmbedChat({ agentUuid, http, cortexBaseUrl, guestId, roomStorageKey, enabled = true, extraPayload }) {
|
|
163
164
|
const [items, setItems] = useState([]);
|
|
164
165
|
const [sending, setSending] = useState(false);
|
|
165
166
|
const [awaitingResponse, setAwaitingResponse] = useState(false);
|
|
166
167
|
const [roomId, setRoomId] = useState(null);
|
|
168
|
+
const [connectionError, setConnectionError] = useState(false);
|
|
167
169
|
const roomIdRef = useRef(null);
|
|
168
170
|
roomIdRef.current = roomId;
|
|
169
171
|
const extraPayloadRef = useRef(extraPayload);
|
|
170
172
|
extraPayloadRef.current = extraPayload;
|
|
171
173
|
useEffect(() => {
|
|
172
174
|
if (!roomId) return;
|
|
175
|
+
setConnectionError(false);
|
|
173
176
|
return openEventSourceStream(`${cortexBaseUrl}/agents/stream/${roomId}`, (raw) => {
|
|
177
|
+
setConnectionError(false);
|
|
174
178
|
const data = raw;
|
|
175
179
|
if (data.type === "response:chunk") {
|
|
176
180
|
setAwaitingResponse(false);
|
|
@@ -206,12 +210,27 @@ function useEmbedChat({ agentUuid, http, cortexBaseUrl, guestId, roomStorageKey,
|
|
|
206
210
|
});
|
|
207
211
|
return updated;
|
|
208
212
|
});
|
|
209
|
-
} else if (data.type === "complete")
|
|
210
|
-
|
|
211
|
-
streaming
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
} else if (data.type === "complete") {
|
|
214
|
+
setAwaitingResponse(false);
|
|
215
|
+
setItems((prev) => prev.map((item) => item.streaming ? {
|
|
216
|
+
...item,
|
|
217
|
+
streaming: false
|
|
218
|
+
} : item));
|
|
219
|
+
}
|
|
220
|
+
}, { onConnectionError: () => setConnectionError(true) });
|
|
214
221
|
}, [roomId, cortexBaseUrl]);
|
|
222
|
+
useEffect(() => {
|
|
223
|
+
if (!awaitingResponse) return;
|
|
224
|
+
const timer = setTimeout(() => {
|
|
225
|
+
setAwaitingResponse(false);
|
|
226
|
+
setItems((prev) => [...prev, {
|
|
227
|
+
content: "Response timed out. Please try again.",
|
|
228
|
+
byUser: false,
|
|
229
|
+
error: true
|
|
230
|
+
}]);
|
|
231
|
+
}, RESPONSE_TIMEOUT_MS);
|
|
232
|
+
return () => clearTimeout(timer);
|
|
233
|
+
}, [awaitingResponse]);
|
|
215
234
|
return {
|
|
216
235
|
items,
|
|
217
236
|
setItems,
|
|
@@ -226,6 +245,7 @@ function useEmbedChat({ agentUuid, http, cortexBaseUrl, guestId, roomStorageKey,
|
|
|
226
245
|
byUser: true
|
|
227
246
|
}]);
|
|
228
247
|
setSending(true);
|
|
248
|
+
setConnectionError(false);
|
|
229
249
|
try {
|
|
230
250
|
const res = await http.post(`integrations/embed/${agentUuid}/execute`, {
|
|
231
251
|
message,
|
|
@@ -233,8 +253,9 @@ function useEmbedChat({ agentUuid, http, cortexBaseUrl, guestId, roomStorageKey,
|
|
|
233
253
|
...extraPayloadRef.current
|
|
234
254
|
});
|
|
235
255
|
if (!res.ok) {
|
|
256
|
+
const msg = res.data && typeof res.data === "object" && "message" in res.data ? res.data.message : "Something went wrong. Please try again.";
|
|
236
257
|
setItems((prev) => [...prev, {
|
|
237
|
-
content:
|
|
258
|
+
content: msg,
|
|
238
259
|
byUser: false,
|
|
239
260
|
error: true
|
|
240
261
|
}]);
|
|
@@ -262,7 +283,8 @@ function useEmbedChat({ agentUuid, http, cortexBaseUrl, guestId, roomStorageKey,
|
|
|
262
283
|
http,
|
|
263
284
|
guestId,
|
|
264
285
|
roomStorageKey
|
|
265
|
-
])
|
|
286
|
+
]),
|
|
287
|
+
connectionError
|
|
266
288
|
};
|
|
267
289
|
}
|
|
268
290
|
//#endregion
|