@joai/core 1.1.0 → 1.1.1
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 +105 -74
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -39,6 +39,7 @@ declare class HttpService implements IHttpService {
|
|
|
39
39
|
readonly authToken: string | null;
|
|
40
40
|
private readonly headers;
|
|
41
41
|
private readonly fetchFn;
|
|
42
|
+
private readonly csrfBaseUrl;
|
|
42
43
|
onNetworkError: (error: Error) => void;
|
|
43
44
|
onUnauthorized: (response: IAppResponse<any>) => void;
|
|
44
45
|
onSuccessfulResponse: (response: IAppResponse<any>) => void;
|
|
@@ -48,6 +49,7 @@ declare class HttpService implements IHttpService {
|
|
|
48
49
|
refererUrl?: string;
|
|
49
50
|
customFetch?: typeof globalThis.fetch;
|
|
50
51
|
headers?: Record<string, string>;
|
|
52
|
+
csrfBaseUrl?: string;
|
|
51
53
|
});
|
|
52
54
|
get: <T>(url: string, options?: IRequestOptions) => Promise<IAppResponse<T>>;
|
|
53
55
|
post: <T>(url: string, data?: any, options?: IRequestOptions) => Promise<IAppResponse<T>>;
|
|
@@ -151,7 +153,7 @@ type Flow = {
|
|
|
151
153
|
updatedAt: string;
|
|
152
154
|
steps: FlowStep[];
|
|
153
155
|
locales: WarpLocale[];
|
|
154
|
-
marketplace:
|
|
156
|
+
marketplace: StoreInfo;
|
|
155
157
|
screenshots: string[];
|
|
156
158
|
};
|
|
157
159
|
type FlowStep = {
|
|
@@ -877,7 +879,7 @@ type Skill = {
|
|
|
877
879
|
sourcePath: string | null;
|
|
878
880
|
scope?: SkillScopeValue;
|
|
879
881
|
active: boolean;
|
|
880
|
-
marketplace:
|
|
882
|
+
marketplace: StoreInfo;
|
|
881
883
|
createdAt: string;
|
|
882
884
|
media?: Media[];
|
|
883
885
|
screenshots: string[];
|
|
@@ -975,7 +977,7 @@ type Agent = {
|
|
|
975
977
|
avatar: string;
|
|
976
978
|
wallets: Wallet[];
|
|
977
979
|
settings: AgentSettings;
|
|
978
|
-
marketplace:
|
|
980
|
+
marketplace: StoreInfo;
|
|
979
981
|
character?: AgentCharacter | null;
|
|
980
982
|
room: Room;
|
|
981
983
|
role: string | null;
|
|
@@ -989,7 +991,7 @@ type AgentPrivate = {
|
|
|
989
991
|
avatar: string;
|
|
990
992
|
wallets: Wallet[];
|
|
991
993
|
settings: AgentSettings;
|
|
992
|
-
marketplace:
|
|
994
|
+
marketplace: StoreInfo;
|
|
993
995
|
password: string | null;
|
|
994
996
|
authKey: string | null;
|
|
995
997
|
secKey: string;
|
|
@@ -1013,6 +1015,11 @@ type AgentActionHistoryEntry = {
|
|
|
1013
1015
|
type AgentSimple = {
|
|
1014
1016
|
uuid: string;
|
|
1015
1017
|
name: string;
|
|
1018
|
+
avatar?: string | null;
|
|
1019
|
+
authKey?: string | null;
|
|
1020
|
+
team?: {
|
|
1021
|
+
slug: string;
|
|
1022
|
+
} | null;
|
|
1016
1023
|
};
|
|
1017
1024
|
type AgentWalletMode = 'local' | 'cloud' | 'external';
|
|
1018
1025
|
type AgentEngine = 'cortex' | 'openclaw';
|
|
@@ -1163,9 +1170,52 @@ type WarpSearchHit = {
|
|
|
1163
1170
|
brandLogo: string | Record<string, string> | null;
|
|
1164
1171
|
};
|
|
1165
1172
|
//#endregion
|
|
1166
|
-
//#region src/
|
|
1167
|
-
type
|
|
1168
|
-
type
|
|
1173
|
+
//#region src/store/types.d.ts
|
|
1174
|
+
type StoreVisibility = 'private' | 'team' | 'public';
|
|
1175
|
+
type StoreEntry = {
|
|
1176
|
+
value: number | string | boolean;
|
|
1177
|
+
label?: string;
|
|
1178
|
+
at: string;
|
|
1179
|
+
};
|
|
1180
|
+
type Store = {
|
|
1181
|
+
name: string;
|
|
1182
|
+
description: string;
|
|
1183
|
+
valueType: 'scalar' | 'series';
|
|
1184
|
+
unit?: string;
|
|
1185
|
+
visibility: StoreVisibility;
|
|
1186
|
+
entryCount: number;
|
|
1187
|
+
lastValue?: number | string | boolean;
|
|
1188
|
+
lastAt?: string;
|
|
1189
|
+
};
|
|
1190
|
+
type StoreWithEntries = {
|
|
1191
|
+
name: string;
|
|
1192
|
+
description: string;
|
|
1193
|
+
unit?: string;
|
|
1194
|
+
entries: StoreEntry[];
|
|
1195
|
+
};
|
|
1196
|
+
type StoreCreatePayload = {
|
|
1197
|
+
name: string;
|
|
1198
|
+
description?: string;
|
|
1199
|
+
valueType?: 'scalar' | 'series';
|
|
1200
|
+
unit?: string;
|
|
1201
|
+
visibility?: StoreVisibility;
|
|
1202
|
+
};
|
|
1203
|
+
type StoreEntryPayload = {
|
|
1204
|
+
storeName?: string;
|
|
1205
|
+
value: number | string | boolean;
|
|
1206
|
+
label?: string;
|
|
1207
|
+
};
|
|
1208
|
+
type StoreEntryResult = {
|
|
1209
|
+
name: string;
|
|
1210
|
+
entryCount: number;
|
|
1211
|
+
};
|
|
1212
|
+
type StoreToggleResult = {
|
|
1213
|
+
name: string;
|
|
1214
|
+
value: number | string | boolean;
|
|
1215
|
+
previous: number | string | boolean;
|
|
1216
|
+
};
|
|
1217
|
+
type StoreEntityType = 'skill' | 'flow' | 'blueprint' | 'agent' | 'service';
|
|
1218
|
+
type StorePricing = {
|
|
1169
1219
|
model: PricingModel;
|
|
1170
1220
|
amount: string;
|
|
1171
1221
|
currency: string;
|
|
@@ -1176,29 +1226,30 @@ type MarketplacePricing = {
|
|
|
1176
1226
|
trialDays?: number;
|
|
1177
1227
|
} | null;
|
|
1178
1228
|
};
|
|
1179
|
-
type
|
|
1229
|
+
type StoreInfo = {
|
|
1180
1230
|
price: number | null;
|
|
1181
1231
|
purchased: boolean;
|
|
1182
1232
|
uses: number;
|
|
1183
1233
|
public: boolean;
|
|
1184
|
-
pricing:
|
|
1234
|
+
pricing: StorePricing;
|
|
1185
1235
|
};
|
|
1186
|
-
type
|
|
1187
|
-
entityType:
|
|
1236
|
+
type StoreListing = {
|
|
1237
|
+
entityType: StoreEntityType;
|
|
1188
1238
|
entityId: string;
|
|
1189
1239
|
name: string;
|
|
1190
1240
|
description: string | null;
|
|
1191
|
-
pricing:
|
|
1241
|
+
pricing: StorePricing;
|
|
1192
1242
|
seller: {
|
|
1193
1243
|
team: string;
|
|
1194
1244
|
name: string;
|
|
1195
1245
|
wallet?: string | null;
|
|
1196
1246
|
};
|
|
1197
1247
|
};
|
|
1198
|
-
type
|
|
1248
|
+
type StoreAgent = {
|
|
1199
1249
|
uuid: string;
|
|
1200
1250
|
name: string;
|
|
1201
1251
|
description: string | null;
|
|
1252
|
+
public: boolean;
|
|
1202
1253
|
avatar: string | null;
|
|
1203
1254
|
wallets: {
|
|
1204
1255
|
address: string;
|
|
@@ -1208,12 +1259,15 @@ type MarketplaceAgent = {
|
|
|
1208
1259
|
name: string | null;
|
|
1209
1260
|
bio: string | null;
|
|
1210
1261
|
} | null;
|
|
1211
|
-
marketplace:
|
|
1262
|
+
marketplace: StoreInfo;
|
|
1212
1263
|
screenshots: string[];
|
|
1264
|
+
mcpEndpoint: string;
|
|
1265
|
+
a2aCard: string;
|
|
1266
|
+
blueprint: Blueprint | null;
|
|
1213
1267
|
};
|
|
1214
|
-
type
|
|
1268
|
+
type StoreItem = {
|
|
1215
1269
|
type: 'agent';
|
|
1216
|
-
item:
|
|
1270
|
+
item: StoreAgent;
|
|
1217
1271
|
} | {
|
|
1218
1272
|
type: 'blueprint';
|
|
1219
1273
|
item: Blueprint;
|
|
@@ -1224,37 +1278,59 @@ type MarketplaceItem = {
|
|
|
1224
1278
|
type: 'skill';
|
|
1225
1279
|
item: Skill;
|
|
1226
1280
|
};
|
|
1227
|
-
type
|
|
1281
|
+
type StoreData = {
|
|
1228
1282
|
blueprints: Blueprint[];
|
|
1229
1283
|
skills: Skill[];
|
|
1230
1284
|
flows: Flow[];
|
|
1231
1285
|
creators: BrandBackend[];
|
|
1232
|
-
agents:
|
|
1233
|
-
items:
|
|
1286
|
+
agents: StoreAgent[];
|
|
1287
|
+
items: StoreItem[];
|
|
1234
1288
|
};
|
|
1235
|
-
type
|
|
1289
|
+
type StorePriceTier = {
|
|
1236
1290
|
sku: string;
|
|
1237
1291
|
priceCents: number;
|
|
1238
1292
|
label: string;
|
|
1239
1293
|
};
|
|
1240
1294
|
/**
|
|
1241
1295
|
* Normalized representation of any marketplace entity for use in checkout flows.
|
|
1242
|
-
* All marketplace entities share a `.marketplace:
|
|
1296
|
+
* All marketplace entities share a `.marketplace: StoreInfo` property —
|
|
1243
1297
|
* combine that with the entity type and ID to construct this.
|
|
1244
1298
|
*/
|
|
1245
|
-
type
|
|
1246
|
-
entityType:
|
|
1299
|
+
type StoreCheckoutItem = {
|
|
1300
|
+
entityType: StoreEntityType;
|
|
1247
1301
|
entityId: string;
|
|
1248
1302
|
name: string;
|
|
1249
|
-
marketplace:
|
|
1303
|
+
marketplace: StoreInfo;
|
|
1250
1304
|
};
|
|
1251
|
-
type
|
|
1305
|
+
type StorePurchaseResult = {
|
|
1252
1306
|
purchased: boolean;
|
|
1253
1307
|
pricePaid: number;
|
|
1254
1308
|
entityType: string;
|
|
1255
1309
|
entityId: string;
|
|
1256
1310
|
paymentMethod: string;
|
|
1257
1311
|
};
|
|
1312
|
+
type TeamEarning = {
|
|
1313
|
+
id: string;
|
|
1314
|
+
amount: number;
|
|
1315
|
+
status: 'pending' | 'paid';
|
|
1316
|
+
orderId: string | null;
|
|
1317
|
+
createdAt: string;
|
|
1318
|
+
};
|
|
1319
|
+
type TeamEarningsBalance = {
|
|
1320
|
+
pendingCents: number;
|
|
1321
|
+
paidCents: number;
|
|
1322
|
+
totalCents: number;
|
|
1323
|
+
};
|
|
1324
|
+
type CommissionAgreement = {
|
|
1325
|
+
id: number;
|
|
1326
|
+
rate: number;
|
|
1327
|
+
status: string;
|
|
1328
|
+
recipientTeam: {
|
|
1329
|
+
name: string;
|
|
1330
|
+
slug: string;
|
|
1331
|
+
};
|
|
1332
|
+
createdAt: string;
|
|
1333
|
+
};
|
|
1258
1334
|
//#endregion
|
|
1259
1335
|
//#region src/blueprint/types.d.ts
|
|
1260
1336
|
type BlueprintTeam = {
|
|
@@ -1273,7 +1349,7 @@ type Blueprint = {
|
|
|
1273
1349
|
verified: boolean;
|
|
1274
1350
|
createdAt: string;
|
|
1275
1351
|
locales: WarpLocale[];
|
|
1276
|
-
marketplace:
|
|
1352
|
+
marketplace: StoreInfo;
|
|
1277
1353
|
tags: string[];
|
|
1278
1354
|
screenshots: string[];
|
|
1279
1355
|
};
|
|
@@ -2291,8 +2367,8 @@ type ContactViewable = {
|
|
|
2291
2367
|
address: string;
|
|
2292
2368
|
}[];
|
|
2293
2369
|
};
|
|
2294
|
-
type
|
|
2295
|
-
listing:
|
|
2370
|
+
type StorePurchasable = {
|
|
2371
|
+
listing: StoreListing;
|
|
2296
2372
|
paymentOptions: {
|
|
2297
2373
|
balance: boolean;
|
|
2298
2374
|
checkout: string | null;
|
|
@@ -3138,51 +3214,6 @@ type LoyaltyMember = {
|
|
|
3138
3214
|
updatedAt: string;
|
|
3139
3215
|
};
|
|
3140
3216
|
//#endregion
|
|
3141
|
-
//#region src/store/types.d.ts
|
|
3142
|
-
type StoreVisibility = 'private' | 'team' | 'public';
|
|
3143
|
-
type StoreEntry = {
|
|
3144
|
-
value: number | string | boolean;
|
|
3145
|
-
label?: string;
|
|
3146
|
-
at: string;
|
|
3147
|
-
};
|
|
3148
|
-
type Store = {
|
|
3149
|
-
name: string;
|
|
3150
|
-
description: string;
|
|
3151
|
-
valueType: 'scalar' | 'series';
|
|
3152
|
-
unit?: string;
|
|
3153
|
-
visibility: StoreVisibility;
|
|
3154
|
-
entryCount: number;
|
|
3155
|
-
lastValue?: number | string | boolean;
|
|
3156
|
-
lastAt?: string;
|
|
3157
|
-
};
|
|
3158
|
-
type StoreWithEntries = {
|
|
3159
|
-
name: string;
|
|
3160
|
-
description: string;
|
|
3161
|
-
unit?: string;
|
|
3162
|
-
entries: StoreEntry[];
|
|
3163
|
-
};
|
|
3164
|
-
type StoreCreatePayload = {
|
|
3165
|
-
name: string;
|
|
3166
|
-
description?: string;
|
|
3167
|
-
valueType?: 'scalar' | 'series';
|
|
3168
|
-
unit?: string;
|
|
3169
|
-
visibility?: StoreVisibility;
|
|
3170
|
-
};
|
|
3171
|
-
type StoreEntryPayload = {
|
|
3172
|
-
storeName?: string;
|
|
3173
|
-
value: number | string | boolean;
|
|
3174
|
-
label?: string;
|
|
3175
|
-
};
|
|
3176
|
-
type StoreEntryResult = {
|
|
3177
|
-
name: string;
|
|
3178
|
-
entryCount: number;
|
|
3179
|
-
};
|
|
3180
|
-
type StoreToggleResult = {
|
|
3181
|
-
name: string;
|
|
3182
|
-
value: number | string | boolean;
|
|
3183
|
-
previous: number | string | boolean;
|
|
3184
|
-
};
|
|
3185
|
-
//#endregion
|
|
3186
3217
|
//#region src/update/types.d.ts
|
|
3187
3218
|
type UpdateType = 'deal' | 'event' | 'update';
|
|
3188
3219
|
type UpdateStatus = 'draft' | 'published' | 'archived';
|
|
@@ -3451,4 +3482,4 @@ type CliSessionStatus = {
|
|
|
3451
3482
|
meta: CliSessionMeta | null;
|
|
3452
3483
|
};
|
|
3453
3484
|
//#endregion
|
|
3454
|
-
export { Achievement, ActivateAgentWebhookWarpPayload, Affiliate, AffiliateStatus, AffiliateTier, AffiliateTierName, Agent, AgentActionHistoryEntry, AgentCharacter, AgentDelegatable, AgentEngine, AgentExecuteHandler, AgentExecuteOptions, AgentGender, AgentMessageMeta, AgentMessageOptions, AgentPrivate, AgentSettings, AgentSimple, AgentWalletMode, AgentWebhookTrigger, AgentWebhookTriggerCondition, AgentWebhookTriggerInput, AgentWebhookWarp, AggregatedRoute, AiCostEntry, AiCostsResponse, AiCostsSummary, Alert, ApiToken, AppEnv, AppFile, AppFileType, AppIngestion, AppSubscription, AppointmentAvailability, AppointmentAvailabilityService, AppointmentAvailabilitySlot, AppointmentBooking, AppointmentBookingContext, AppointmentPolicy, AppointmentRequest, AppointmentSlot, AuthUser, 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, Configuration, Contact, ContactActivity, ContactActivityAuthor, ContactActivityType, ContactCreatePayload, ContactFormData, ContactViewable, Contract, ContractCategoryDisplayNames, ContractCategoryName, ContractCodeMetadata, ContractEntity, ContractOnNetwork, ContractVersion, ContractsAddressConfig, CortexExecuteOptions, Coupon, DefaultCodeMetadata, DemoFlow, DemoMessage, Desk, DeskItem, DeskItemRole, Document, EarnResponse, 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, JsonValue, Kyc, KycStatus, Link, LinkCreatePayload, LinkScanHistory, LinkStats, LinkUpdatePayload, LinkVariation, LinkVariationBatchCreatePayload, LinkVariationCreatePayload, LocalAgentWallet, LoyaltyAccount, LoyaltyMember, LoyaltyNextTier, LoyaltyProgram, LoyaltyPromotion, LoyaltyReward, LoyaltyStatus, LoyaltyTier, LoyaltyTierInfo, LoyaltyTransaction,
|
|
3485
|
+
export { Achievement, ActivateAgentWebhookWarpPayload, Affiliate, AffiliateStatus, AffiliateTier, AffiliateTierName, Agent, AgentActionHistoryEntry, AgentCharacter, AgentDelegatable, AgentEngine, AgentExecuteHandler, AgentExecuteOptions, AgentGender, AgentMessageMeta, AgentMessageOptions, AgentPrivate, AgentSettings, AgentSimple, AgentWalletMode, AgentWebhookTrigger, AgentWebhookTriggerCondition, AgentWebhookTriggerInput, AgentWebhookWarp, AggregatedRoute, AiCostEntry, AiCostsResponse, AiCostsSummary, Alert, ApiToken, AppEnv, AppFile, AppFileType, AppIngestion, AppSubscription, AppointmentAvailability, AppointmentAvailabilityService, AppointmentAvailabilitySlot, AppointmentBooking, AppointmentBookingContext, AppointmentPolicy, AppointmentRequest, AppointmentSlot, AuthUser, 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, CommissionAgreement, Configuration, Contact, ContactActivity, ContactActivityAuthor, ContactActivityType, ContactCreatePayload, ContactFormData, ContactViewable, Contract, ContractCategoryDisplayNames, ContractCategoryName, ContractCodeMetadata, ContractEntity, ContractOnNetwork, ContractVersion, ContractsAddressConfig, CortexExecuteOptions, Coupon, DefaultCodeMetadata, DemoFlow, DemoMessage, Desk, DeskItem, DeskItemRole, Document, EarnResponse, 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, JsonValue, Kyc, KycStatus, Link, LinkCreatePayload, LinkScanHistory, LinkStats, LinkUpdatePayload, LinkVariation, LinkVariationBatchCreatePayload, LinkVariationCreatePayload, LocalAgentWallet, LoyaltyAccount, LoyaltyMember, LoyaltyNextTier, LoyaltyProgram, LoyaltyPromotion, LoyaltyReward, LoyaltyStatus, LoyaltyTier, LoyaltyTierInfo, LoyaltyTransaction, McpToolCall, McpToolCallBroadcast, McpToolCallStatus, Media, MediaAttributes, MediaItems, MediaLibraryAttributes, MediaLibraryItems, MediaMime, Meeting, MeetingConferenceProvider, MeetingFeature, MeetingJoinInfo, MeetingJoinTeam, MeetingParticipant, MeetingSessionState, MeetingSpeakerAssignment, MeetingStatus, MeetingSummary, 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, OrderContext, OrderItem, OrderSource, OrderStatus, PaginatedResponse, PaymentAccount, PaymentAccountOnboarding, PaymentProvider, PayoutEntry, PeriodTypeLabels, PeriodTypeOptions, PermissionConfigType, PersonaQuestionable, Plan, PlanBenefit, PlanExtra, PlanFeature, PlanInterval, PolicyMethod, PolicySetting, PricingModel, Product, ProductDiscount, ProductMeta, ProductPieces, ProductRating, ProductRelation, ProductRelationType, ProductVariation, ProductVariationMeta, ProductVariationType, ProgramSettings, 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, RedeemResponse, 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, StoreAgent, StoreCheckoutItem, StoreCreatePayload, StoreData, StoreEntityType, StoreEntry, StoreEntryPayload, StoreEntryResult, StoreInfo, StoreItem, StoreListing, StorePriceTier, StorePricing, StorePurchasable, StorePurchaseResult, StoreToggleResult, StoreVisibility, StoreWithEntries, Streak, SubscriptionInterval, SubscriptionPlan, SubscriptionStatus, Swarm, Task, Team, TeamBrand, TeamCategory, TeamEarning, TeamEarningsBalance, TeamFeature, TeamFeatureUsage, TeamMember, TeamMeta, TeamPrivate, TeamSettings, TeamUsage, TerminalConnectionToken, TerminalPaymentIntent, Tier, TierFeature, TierName, TranscriptEntry, TranscriptionCorrection, TranscriptionResponse, TranslatableValue, Update, UpdateCreatePayload, UpdateRelation, UpdateStats, UpdateStatus, UpdateType, UpdateUpdatePayload, Upgrade, UpgradeSourceType, UpgradeStatus, 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, teamCategories, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
|
package/dist/index.mjs
CHANGED
|
@@ -96,7 +96,7 @@ var HttpService = class {
|
|
|
96
96
|
return response;
|
|
97
97
|
};
|
|
98
98
|
this.refreshCsrfToken = async () => {
|
|
99
|
-
await this.fetchFn(`${this.
|
|
99
|
+
await this.fetchFn(`${this.csrfBaseUrl}/sanctum/csrf-cookie`, {
|
|
100
100
|
method: "GET",
|
|
101
101
|
credentials: "include",
|
|
102
102
|
headers: {
|
|
@@ -156,6 +156,7 @@ var HttpService = class {
|
|
|
156
156
|
this.baseUrl = baseUrl;
|
|
157
157
|
this.authToken = authToken || null;
|
|
158
158
|
this.fetchFn = options?.customFetch ?? globalThis.fetch.bind(globalThis);
|
|
159
|
+
this.csrfBaseUrl = options?.csrfBaseUrl ?? baseUrl;
|
|
159
160
|
this.onNetworkError = () => {};
|
|
160
161
|
this.onSuccessfulResponse = () => {};
|
|
161
162
|
this.onUnauthorized = () => {};
|