@joai/core 2.3.0 → 3.0.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 CHANGED
@@ -7,15 +7,25 @@ type SocialAuthProvider = 'github' | 'apple' | 'google' | 'x' | 'telegram' | 'sl
7
7
  //#region src/config/types.d.ts
8
8
  type AppEnv = 'mainnet' | 'testnet' | 'devnet' | 'local';
9
9
  //#endregion
10
+ //#region src/auth/token.d.ts
11
+ /** One-time native/deep-link handoff param (exchanged for a Bearer via API). */
12
+ declare const AUTH_CODE_PARAM = "auth_code";
13
+ /** Login URL on the main app with a direct return URL (no mini-app callback). */
14
+ declare const getLoginUrl: (env: AppEnv, returnTo: string, branding?: {
15
+ team: string;
16
+ brand?: string;
17
+ }) => string;
18
+ //#endregion
10
19
  //#region src/config/urls.d.ts
11
20
  declare const getApiBaseUrl: (env: AppEnv) => string;
12
21
  declare const getCortexBaseUrl: (env: AppEnv) => "http://localhost:3010" | "https://devnet-cortex.joai.ai" | "https://testnet-cortex.joai.ai" | "https://cortex.joai.ai";
13
22
  declare const getAppBaseUrl: (env: AppEnv) => "http://app.joai--api.test:3004" | "https://devnet.joai.ai" | "https://testnet.joai.ai" | "https://joai.ai";
14
- declare const getFormsBaseUrl: (env: AppEnv) => "http://app.joai--api.test:3004" | "https://devnet-forms.joai.ai" | "https://testnet-forms.joai.ai" | "https://forms.joai.ai";
23
+ declare const getFormsBaseUrl: (env: AppEnv) => "http://forms.joai--api.test:3008" | "https://devnet-forms.joai.ai" | "https://testnet-forms.joai.ai" | "https://forms.joai.ai";
15
24
  declare const getDigestBaseUrl: (env: AppEnv) => "http://localhost:3005" | "https://devnet-digests.joai.ai" | "https://testnet-digests.joai.ai" | "https://digests.joai.ai";
16
25
  declare const getStoreBaseUrl: (env: AppEnv) => "http://localhost:3005" | "https://devnet-store.joai.ai" | "https://testnet-store.joai.ai" | "https://store.joai.ai";
17
26
  declare const getAgentsBaseUrl: (env: AppEnv) => "http://localhost:3007" | "https://devnet-agents.joai.ai" | "https://testnet-agents.joai.ai" | "https://agents.joai.ai";
18
27
  declare const getMcpServerAgentUrl: (env: AppEnv, agent: string) => string;
28
+ declare const getSitesBaseUrl: (env: AppEnv) => "http://sites.joai--api.test:3007" | "https://devnet-sites.joai.ai" | "https://testnet-sites.joai.ai" | "https://sites.joai.ai";
19
29
  declare const getSitesRootDomain: (env: AppEnv) => string;
20
30
  declare const getSiteUrl: (env: AppEnv, teamSlug: string, brandSlug: string) => string;
21
31
  //#endregion
@@ -543,7 +553,7 @@ type Contact = {
543
553
  nextFollowUpAt?: string | null;
544
554
  followUpNote?: string | null;
545
555
  };
546
- type ContactActivityType = 'note' | 'call' | 'meeting' | 'task' | 'update' | 'custom' | 'form' | 'loyalty';
556
+ type ContactActivityType = 'note' | 'call' | 'meeting' | 'task' | 'update' | 'custom' | 'form' | 'loyalty' | 'follow_up';
547
557
  type ContactActivityAuthor = {
548
558
  name: string;
549
559
  imageUrl: string | null;
@@ -668,7 +678,7 @@ type MollieTerminalPaymentResult = {
668
678
  failureReason?: string | null;
669
679
  signature?: string | null;
670
680
  };
671
- 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' | 'tap-to-pay';
681
+ 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' | 'phone-call' | 'phone-number' | 'custom-domain' | 'contacts' | 'links' | 'store-fee-rate' | 'store-fee-rate-physical' | 'tap-to-pay';
672
682
  type PlanBenefit = {
673
683
  label: Partial<Record<WarpLocale, string>>;
674
684
  tip?: Partial<Record<WarpLocale, string>>;
@@ -694,7 +704,7 @@ type Plan = {
694
704
  resource: 'plan';
695
705
  id: string;
696
706
  sku: string;
697
- name: TranslatableValue;
707
+ name: string;
698
708
  description: Partial<Record<WarpLocale, string>>;
699
709
  price: number;
700
710
  priceDisplay: string;
@@ -831,7 +841,7 @@ type OrderItem = {
831
841
  name: string;
832
842
  quantity: number;
833
843
  unitPrice: number;
834
- type: 'product-variation' | 'service';
844
+ type: 'product-variation' | 'service' | 'coupon';
835
845
  digital?: boolean | null;
836
846
  sellerTeamId?: string | null;
837
847
  };
@@ -865,6 +875,7 @@ type Order = {
865
875
  notes: string | null;
866
876
  configuration?: OrderConfigurationItem[];
867
877
  items: OrderItem[];
878
+ coupon?: Coupon | null;
868
879
  plan: Plan | null;
869
880
  user: UserPrivate | null;
870
881
  team: TeamPrivate | null;
@@ -906,6 +917,7 @@ type Coupon = {
906
917
  amount: number | null;
907
918
  percent: number | null;
908
919
  price: number | null;
920
+ discount?: number;
909
921
  condition: CouponCondition;
910
922
  restrictedItems: CouponRestrictedItem[];
911
923
  usesLeft: number | null;
@@ -971,7 +983,7 @@ type Skill = {
971
983
  };
972
984
  //#endregion
973
985
  //#region src/integration/types.d.ts
974
- type IntegrationType = 'none' | 'webhook' | 'api-token' | 'telegram' | 'slack' | 'whatsapp' | 'twilio' | 'sms' | 'n8n' | 'apple-health' | 'mcp' | 'x' | 'email' | 'calendar' | 'embed' | 'discord' | 'github' | 'push' | 'sentry' | 'readwise';
986
+ type IntegrationType = 'none' | 'webhook' | 'api-token' | 'telegram' | 'slack' | 'whatsapp' | 'whatsapp-personal' | 'twilio' | 'sms' | 'n8n' | 'apple-health' | 'mcp' | 'x' | 'xchat' | 'instagram' | 'grok' | 'email' | 'calendar' | 'embed' | 'discord' | 'github' | 'push' | 'sentry' | 'readwise';
975
987
  type IntegrationDetails = {
976
988
  type: IntegrationType;
977
989
  name: string;
@@ -985,8 +997,16 @@ type IntegrationDetails = {
985
997
  type IntegrationMeta = {
986
998
  handle?: string;
987
999
  provider?: EmailProvider | null;
1000
+ hookSource?: string;
988
1001
  [key: string]: unknown;
989
1002
  };
1003
+ type IntegrationConnectionDetails = IntegrationDetails & {
1004
+ phoneNumberId?: string;
1005
+ phoneNumber?: string;
1006
+ webhookUrl?: string;
1007
+ webhookSecret?: string;
1008
+ webhookSecretKey?: string;
1009
+ };
990
1010
  type Integration = {
991
1011
  id: string;
992
1012
  type: IntegrationType;
@@ -995,9 +1015,9 @@ type Integration = {
995
1015
  configured: boolean;
996
1016
  createdAt: string;
997
1017
  meta?: IntegrationMeta;
998
- details?: IntegrationDetails;
1018
+ details?: IntegrationConnectionDetails;
999
1019
  };
1000
- type SocialPlatform = 'telegram' | 'slack' | 'whatsapp' | 'sms' | 'discord' | 'github';
1020
+ type SocialPlatform = 'telegram' | 'slack' | 'whatsapp' | 'sms' | 'discord' | 'github' | 'xchat' | 'instagram';
1001
1021
  type SocialBot = {
1002
1022
  name: string;
1003
1023
  createdAt: string;
@@ -1266,6 +1286,10 @@ type WarpExecutionBackend = {
1266
1286
  agent: AgentSimple | null;
1267
1287
  createdAt: string;
1268
1288
  };
1289
+ type PublicFormResults = {
1290
+ total: number;
1291
+ fields: Record<string, Record<string, number>>;
1292
+ };
1269
1293
  type BrandSourceConfig = {
1270
1294
  type: string;
1271
1295
  chain?: string;
@@ -1344,49 +1368,6 @@ type WarpSearchHit = {
1344
1368
  };
1345
1369
  //#endregion
1346
1370
  //#region src/store/types.d.ts
1347
- type StoreVisibility = 'private' | 'team' | 'public';
1348
- type StoreEntry = {
1349
- value: number | string | boolean;
1350
- label?: string;
1351
- at: string;
1352
- };
1353
- type Store = {
1354
- name: string;
1355
- description: string;
1356
- valueType: 'scalar' | 'series';
1357
- unit?: string;
1358
- visibility: StoreVisibility;
1359
- entryCount: number;
1360
- lastValue?: number | string | boolean;
1361
- lastAt?: string;
1362
- };
1363
- type StoreWithEntries = {
1364
- name: string;
1365
- description: string;
1366
- unit?: string;
1367
- entries: StoreEntry[];
1368
- };
1369
- type StoreCreatePayload = {
1370
- name: string;
1371
- description?: string;
1372
- valueType?: 'scalar' | 'series';
1373
- unit?: string;
1374
- visibility?: StoreVisibility;
1375
- };
1376
- type StoreEntryPayload = {
1377
- storeName?: string;
1378
- value: number | string | boolean;
1379
- label?: string;
1380
- };
1381
- type StoreEntryResult = {
1382
- name: string;
1383
- entryCount: number;
1384
- };
1385
- type StoreToggleResult = {
1386
- name: string;
1387
- value: number | string | boolean;
1388
- previous: number | string | boolean;
1389
- };
1390
1371
  type StoreEntityType = 'skill' | 'flow' | 'blueprint' | 'agent' | 'service';
1391
1372
  type StorePricing = {
1392
1373
  model: PricingModel;
@@ -1784,6 +1765,8 @@ type AppointmentPolicy = {
1784
1765
  conferenceEnabled: boolean | null;
1785
1766
  serviceSelectionEnabled?: boolean | null;
1786
1767
  paymentEnabled?: boolean | null;
1768
+ bookingCapacity?: number | null;
1769
+ bookingCapacityUnit?: 'booking' | 'person' | null;
1787
1770
  requireApproval?: boolean | null;
1788
1771
  sync?: AppointmentPolicySync | null;
1789
1772
  agent?: Agent | null;
@@ -1812,6 +1795,7 @@ type AppointmentBooking = {
1812
1795
  attendeeEmail: string | null;
1813
1796
  attendeeName: string | null;
1814
1797
  configuration?: Configuration;
1798
+ quantity?: number;
1815
1799
  };
1816
1800
  type AppointmentRequest = {
1817
1801
  id: string;
@@ -2160,6 +2144,7 @@ type Item = {
2160
2144
  };
2161
2145
  type ItemCreatePayload = {
2162
2146
  title: string;
2147
+ source?: 'user' | 'api';
2163
2148
  description?: string;
2164
2149
  priority?: ItemPriority;
2165
2150
  tags?: string[];
@@ -2183,6 +2168,50 @@ type ItemUpdatePayload = {
2183
2168
  assignedToIds?: string[];
2184
2169
  };
2185
2170
  //#endregion
2171
+ //#region src/kv/types.d.ts
2172
+ type KvValue = number | string | boolean;
2173
+ type KvEntry = {
2174
+ value: KvValue;
2175
+ label?: string | null;
2176
+ at: string;
2177
+ };
2178
+ type KvField = {
2179
+ name: string;
2180
+ description: string | null;
2181
+ valueType: 'scalar' | 'series';
2182
+ unit: string | null;
2183
+ entryCount: number;
2184
+ lastValue?: KvValue | null;
2185
+ lastAt?: string | null;
2186
+ };
2187
+ type KvFieldWithEntries = Pick<KvField, 'name' | 'description' | 'unit'> & {
2188
+ entries: KvEntry[];
2189
+ nextCursor: string | null;
2190
+ };
2191
+ type CreateKvFieldPayload = {
2192
+ name: string;
2193
+ description?: string;
2194
+ valueType?: 'scalar' | 'series';
2195
+ unit?: string;
2196
+ };
2197
+ type KvEntryPayload = {
2198
+ field?: string;
2199
+ value: KvValue;
2200
+ label?: string;
2201
+ };
2202
+ type SetKvEntryResult = KvEntry & {
2203
+ name: string;
2204
+ };
2205
+ type AppendKvEntryResult = {
2206
+ name: string;
2207
+ entryCount: number;
2208
+ };
2209
+ type ToggleKvFieldResult = {
2210
+ name: string;
2211
+ value: KvValue;
2212
+ previous: KvValue | null;
2213
+ };
2214
+ //#endregion
2186
2215
  //#region src/marketing/types.d.ts
2187
2216
  type SubscriptionPlan = {
2188
2217
  name: string;
@@ -3652,7 +3681,17 @@ type CreateWebHookPayload = {
3652
3681
  type CreateWarpLinkedHookPayload = {
3653
3682
  warpIdentifier: string;
3654
3683
  };
3655
- type CreateHookPayload = CreateInternalHookPayload | CreateWebHookPayload | CreateWarpLinkedHookPayload;
3684
+ type CreateInboundHookPayload = {
3685
+ source: string;
3686
+ warpIdentifier: string;
3687
+ trigger?: HookTrigger;
3688
+ };
3689
+ type CreateHookPayload = CreateInternalHookPayload | CreateWebHookPayload | CreateWarpLinkedHookPayload | CreateInboundHookPayload;
3690
+ type HookSample = {
3691
+ source: string;
3692
+ payload: Record<string, unknown> | null;
3693
+ recordedAt: string | null;
3694
+ };
3656
3695
  //#endregion
3657
3696
  //#region src/workspace/types.d.ts
3658
3697
  type WorkspaceInfo = {
@@ -3742,4 +3781,4 @@ type CliSessionStatus = {
3742
3781
  meta: CliSessionMeta | null;
3743
3782
  };
3744
3783
  //#endregion
3745
- export { Achievement, Affiliate, AffiliateStatus, AffiliateTier, AffiliateTierName, Agent, AgentActionHistoryEntry, AgentCharacter, AgentDelegatable, AgentEngine, AgentExecuteHandler, AgentExecuteOptions, AgentGender, AgentMessageMeta, AgentMessageOptions, AgentPrivate, AgentSettings, AgentSimple, AgentWalletMode, AggregatedRoute, AiCostEntry, AiCostsResponse, AiCostsSummary, Alert, ApiToken, AppEnv, AppFile, AppFileType, AppIngestion, AppSubscription, AppointmentAvailability, AppointmentAvailabilityService, AppointmentAvailabilitySlot, AppointmentBooking, AppointmentBookingContext, AppointmentPolicy, AppointmentPolicySync, 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, Campaign, CampaignApproval, CampaignCategory, CampaignChannel, CampaignCreatePayload, CampaignStats, CampaignStatus, CampaignUpdatePayload, Card, Cart, CartItem, Challenge, Challenges, ChangelogEntry, Character, ChatClientAction, ChatClientThought, ChatStreamData, ChatStreamEventType, CliSessionMeta, CliSessionStatus, CommissionAgreement, Configuration, Contact, ContactActivity, ContactActivityAuthor, ContactActivityType, ContactConsent, ContactConsentStatus, ContactCreatePayload, ContactFormData, ContactHealth, ContactViewable, Contract, ContractCategoryDisplayNames, ContractCategoryName, ContractCodeMetadata, ContractEntity, ContractOnNetwork, ContractVersion, ContractsAddressConfig, CortexExecuteOptions, Coupon, CouponCondition, CouponRestrictedItem, CouponRestrictedItemType, CreateHookPayload, CreateInternalHookPayload, CreateWarpLinkedHookPayload, CreateWebHookPayload, 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, Hook, HookTrigger, HookTriggerCondition, HookTriggerInput, HttpService, IAppResponse, IHttpService, IRequestOptions, IngestionSourceType, IngestionStatus, Inquiry, InquiryStatus, InquiryType, Integration, IntegrationDetails, IntegrationMeta, 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, MediaAspectRatio, MediaAttributes, MediaItems, MediaLibraryAttributes, 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, MollieTerminalPaymentResult, 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, OrderType, PaginatedResponse, Pass, 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, Segment, SegmentCondition, SegmentConditionType, SegmentCountPayload, SegmentCountResult, SegmentCreatePayload, SegmentGroup, SendableActivityUpdate, SendableAgentAction, SendableAgentMessage, SendableAgentThought, SendableMedia, SendableUserMessage, Service, Shortcut, Site, SiteAgent, SiteBrand, SiteRoute, SiteTeam, Skill, SkillMediaBindingRole, SkillMediaBindingRoleValue, SkillScope, SkillScopeValue, SkillType, SkillTypeValue, SocialAuthProvider, SocialBot, SocialPlatform, StampResponse, Store, StoreAgent, StoreCheckoutItem, StoreCreatePayload, StoreData, StoreEntityType, StoreEntry, StoreEntryPayload, StoreEntryResult, StoreInfo, StoreItem, StoreListing, StorePriceTier, StorePricing, StorePurchasable, StorePurchaseResult, StoreToggleResult, StoreVisibility, StoreWithEntries, Streak, SubscriptionInterval, SubscriptionPlan, SubscriptionStatus, Swarm, Tag, TagType, Task, Team, TeamBrand, TeamCategory, TeamEarning, TeamEarningsBalance, TeamFeature, TeamFeatureUsage, TeamMember, TeamMeta, TeamPayout, TeamPayoutAddress, TeamPlace, 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, WarpBackendStatus, WarpBatchItem, WarpBatchable, WarpCloudExecutable, WarpCreateable, WarpExecutable, WarpExecutionBackend, WarpExtras, WarpExtrasFaq, WarpInputable, WarpScreenshotVariant, WarpSearchHit, WarpSelectable, WarpSelectableDetails, WarpSuggestion, WarpTestable, WarpViewable, 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 };
3784
+ export { AUTH_CODE_PARAM, Achievement, Affiliate, AffiliateStatus, AffiliateTier, AffiliateTierName, Agent, AgentActionHistoryEntry, AgentCharacter, AgentDelegatable, AgentEngine, AgentExecuteHandler, AgentExecuteOptions, AgentGender, AgentMessageMeta, AgentMessageOptions, AgentPrivate, AgentSettings, AgentSimple, AgentWalletMode, AggregatedRoute, AiCostEntry, AiCostsResponse, AiCostsSummary, Alert, ApiToken, AppEnv, AppFile, AppFileType, AppIngestion, AppSubscription, AppendKvEntryResult, AppointmentAvailability, AppointmentAvailabilityService, AppointmentAvailabilitySlot, AppointmentBooking, AppointmentBookingContext, AppointmentPolicy, AppointmentPolicySync, 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, Campaign, CampaignApproval, CampaignCategory, CampaignChannel, CampaignCreatePayload, CampaignStats, CampaignStatus, CampaignUpdatePayload, Card, Cart, CartItem, Challenge, Challenges, ChangelogEntry, Character, ChatClientAction, ChatClientThought, ChatStreamData, ChatStreamEventType, CliSessionMeta, CliSessionStatus, CommissionAgreement, Configuration, Contact, ContactActivity, ContactActivityAuthor, ContactActivityType, ContactConsent, ContactConsentStatus, ContactCreatePayload, ContactFormData, ContactHealth, ContactViewable, Contract, ContractCategoryDisplayNames, ContractCategoryName, ContractCodeMetadata, ContractEntity, ContractOnNetwork, ContractVersion, ContractsAddressConfig, CortexExecuteOptions, Coupon, CouponCondition, CouponRestrictedItem, CouponRestrictedItemType, CreateHookPayload, CreateInboundHookPayload, CreateInternalHookPayload, CreateKvFieldPayload, CreateWarpLinkedHookPayload, CreateWebHookPayload, 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, Hook, HookSample, HookTrigger, HookTriggerCondition, HookTriggerInput, HttpService, IAppResponse, IHttpService, IRequestOptions, IngestionSourceType, IngestionStatus, Inquiry, InquiryStatus, InquiryType, Integration, IntegrationConnectionDetails, IntegrationDetails, IntegrationMeta, IntegrationType, Intent, Item, ItemCreatePayload, ItemExecutionStatus, ItemPriority, ItemStatus, ItemUpdatePayload, ItemViewable, JoaiUrls, JsonValue, KvEntry, KvEntryPayload, KvField, KvFieldWithEntries, KvValue, 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, MediaAspectRatio, MediaAttributes, MediaItems, MediaLibraryAttributes, 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, MollieTerminalPaymentResult, 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, OrderType, PaginatedResponse, Pass, 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, PublicFormResults, PurchaseOptions, PurchaseResult, RampProvider, RampProviderInfo, Reactions, RecentExperience, RedeemResponse, Reminder, Room, RoomId, RoomKind, ScInfo, SchedulePreset, SecretAuthorizable, SecretSettable, Segment, SegmentCondition, SegmentConditionType, SegmentCountPayload, SegmentCountResult, SegmentCreatePayload, SegmentGroup, SendableActivityUpdate, SendableAgentAction, SendableAgentMessage, SendableAgentThought, SendableMedia, SendableUserMessage, Service, SetKvEntryResult, Shortcut, Site, SiteAgent, SiteBrand, SiteRoute, SiteTeam, Skill, SkillMediaBindingRole, SkillMediaBindingRoleValue, SkillScope, SkillScopeValue, SkillType, SkillTypeValue, SocialAuthProvider, SocialBot, SocialPlatform, StampResponse, StoreAgent, StoreCheckoutItem, StoreData, StoreEntityType, StoreInfo, StoreItem, StoreListing, StorePriceTier, StorePricing, StorePurchasable, StorePurchaseResult, Streak, SubscriptionInterval, SubscriptionPlan, SubscriptionStatus, Swarm, Tag, TagType, Task, Team, TeamBrand, TeamCategory, TeamEarning, TeamEarningsBalance, TeamFeature, TeamFeatureUsage, TeamMember, TeamMeta, TeamPayout, TeamPayoutAddress, TeamPlace, TeamPrivate, TeamSettings, TeamUsage, TerminalConnectionToken, TerminalPaymentIntent, Tier, TierFeature, TierName, ToggleKvFieldResult, 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, WarpBackendStatus, WarpBatchItem, WarpBatchable, WarpCloudExecutable, WarpCreateable, WarpExecutable, WarpExecutionBackend, WarpExtras, WarpExtrasFaq, WarpInputable, WarpScreenshotVariant, WarpSearchHit, WarpSelectable, WarpSelectableDetails, WarpSuggestion, WarpTestable, WarpViewable, WebHookTriggerEvent, WorkspaceCloudFile, WorkspaceContext, WorkspaceInfo, WorkspaceSettings, XIntegrationStatus, abbreviateNumber, getAgentsBaseUrl, getApiBaseUrl, getAppBaseUrl, getAssetAppLogoUrl, getAssetChainLogoUrl, getAssetPartnerLogoUrl, getAssetTokenLogoUrl, getAssetWalletLogoUrl, getCortexBaseUrl, getDigestBaseUrl, getFormsBaseUrl, getLoginUrl, getMcpServerAgentUrl, getSiteUrl, getSitesBaseUrl, getSitesRootDomain, getStoreBaseUrl, getWarpScreenshotUrl, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, localize, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, teamCategories, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
package/dist/index.mjs CHANGED
@@ -19,7 +19,7 @@ const getAppBaseUrl = (env) => {
19
19
  return "https://joai.ai";
20
20
  };
21
21
  const getFormsBaseUrl = (env) => {
22
- if (env === "local") return "http://app.joai--api.test:3004";
22
+ if (env === "local") return "http://forms.joai--api.test:3008";
23
23
  if (env === "devnet") return "https://devnet-forms.joai.ai";
24
24
  if (env === "testnet") return "https://testnet-forms.joai.ai";
25
25
  return "https://forms.joai.ai";
@@ -43,6 +43,12 @@ const getAgentsBaseUrl = (env) => {
43
43
  return "https://agents.joai.ai";
44
44
  };
45
45
  const getMcpServerAgentUrl = (env, agent) => `${toSubdomainBaseUrl(env, "cortex")}/mcp/agents/${agent}`;
46
+ const getSitesBaseUrl = (env) => {
47
+ if (env === "local") return "http://sites.joai--api.test:3007";
48
+ if (env === "devnet") return "https://devnet-sites.joai.ai";
49
+ if (env === "testnet") return "https://testnet-sites.joai.ai";
50
+ return "https://sites.joai.ai";
51
+ };
46
52
  const getSitesRootDomain = (env) => {
47
53
  if (env === "local") return "sites.joai--api.test";
48
54
  if (env === "devnet") return "devnet-sites.joai.ai";
@@ -51,6 +57,19 @@ const getSitesRootDomain = (env) => {
51
57
  };
52
58
  const getSiteUrl = (env, teamSlug, brandSlug) => `https://${getSitesRootDomain(env)}/${teamSlug}/${brandSlug}`;
53
59
  //#endregion
60
+ //#region src/auth/token.ts
61
+ /** One-time native/deep-link handoff param (exchanged for a Bearer via API). */
62
+ const AUTH_CODE_PARAM = "auth_code";
63
+ /** Login URL on the main app with a direct return URL (no mini-app callback). */
64
+ const getLoginUrl = (env, returnTo, branding) => {
65
+ const params = new URLSearchParams({ redirect: returnTo });
66
+ if (branding) {
67
+ params.set("team", branding.team);
68
+ if (branding.brand) params.set("brand", branding.brand);
69
+ }
70
+ return `${getAppBaseUrl(env)}/login?${params}`;
71
+ };
72
+ //#endregion
54
73
  //#region src/config/constants.ts
55
74
  const JoaiUrls = {
56
75
  TelegramGroup: "https://telegram.joai.ai",
@@ -377,4 +396,4 @@ const teamCategories = [
377
396
  "leisure-tourism"
378
397
  ];
379
398
  //#endregion
380
- export { ContractCategoryDisplayNames, DefaultCodeMetadata, HttpService, JoaiUrls, OG_IMAGE_CONFIG, OG_IMAGE_HEIGHT, OG_IMAGE_WIDTH, OgImageColors, PeriodTypeLabels, PeriodTypeOptions, SkillMediaBindingRole, SkillScope, SkillType, 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 };
399
+ export { AUTH_CODE_PARAM, ContractCategoryDisplayNames, DefaultCodeMetadata, HttpService, JoaiUrls, OG_IMAGE_CONFIG, OG_IMAGE_HEIGHT, OG_IMAGE_WIDTH, OgImageColors, PeriodTypeLabels, PeriodTypeOptions, SkillMediaBindingRole, SkillScope, SkillType, abbreviateNumber, getAgentsBaseUrl, getApiBaseUrl, getAppBaseUrl, getAssetAppLogoUrl, getAssetChainLogoUrl, getAssetPartnerLogoUrl, getAssetTokenLogoUrl, getAssetWalletLogoUrl, getCortexBaseUrl, getDigestBaseUrl, getFormsBaseUrl, getLoginUrl, getMcpServerAgentUrl, getSiteUrl, getSitesBaseUrl, getSitesRootDomain, getStoreBaseUrl, getWarpScreenshotUrl, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, localize, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, teamCategories, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/core",
3
- "version": "2.3.0",
3
+ "version": "3.0.0",
4
4
  "description": "JoAi shared types, HTTP service, and config",
5
5
  "license": "MIT",
6
6
  "type": "module",