@joai/core 0.11.0 → 0.12.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 +2 -1
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1105,6 +1105,7 @@ declare const sanitizeAlphanumeric: (val: string) => string;
|
|
|
1105
1105
|
declare const sanitizeNumeric: (val: string) => string;
|
|
1106
1106
|
declare const toNameInitials: (name?: string) => string;
|
|
1107
1107
|
declare const toPreviewText: (text: string, maxChars?: number) => string;
|
|
1108
|
+
declare const localize: (value: Record<string, string> | null | undefined, locale?: string) => string;
|
|
1108
1109
|
//#endregion
|
|
1109
1110
|
//#region src/helpers/number.d.ts
|
|
1110
1111
|
declare const abbreviateNumber: (val: number) => string | number;
|
|
@@ -2984,4 +2985,4 @@ type CliSessionStatus = {
|
|
|
2984
2985
|
meta: CliSessionMeta | null;
|
|
2985
2986
|
};
|
|
2986
2987
|
//#endregion
|
|
2987
|
-
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, BillingAddress, Blueprint, BlueprintOnboardingStep, BlueprintRedirect, BlueprintSettings, BlueprintShortcut, BlueprintTask, BlueprintTeam, BoardSummaryViewable, BookmarkEntry, BrandBackend, BrandIntegration, BrandIntegrationAction, BrandIntegrationProvider, BrandSearchHit, BrandSiteConfig, BrandSourceConfig, Budget, ByokProviderConfig, ByokProviderName, ByokProviders, CalendarProvider, CalendarStatus, Card, 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, 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, OrderItem, OrderStatus, PaymentProvider, PayoutEntry, PeriodTypeLabels, PeriodTypeOptions, PermissionConfigType, PersonaQuestionable, Plan, PlanBenefit, PlanExtra, PlanFeature, PlanInterval, PolicyMethod, PolicySetting, PricingModel, Product, ProductDiscount, ProductPieces, ProductRating, ProductRelation, ProductRelationType, ProductVariation, 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, 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, getMarketplaceBaseUrl, getMcpServerAgentUrl, getSiteUrl, getSitesRootDomain, getWarpScreenshotUrl, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
|
|
2988
|
+
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, BillingAddress, Blueprint, BlueprintOnboardingStep, BlueprintRedirect, BlueprintSettings, BlueprintShortcut, BlueprintTask, BlueprintTeam, BoardSummaryViewable, BookmarkEntry, BrandBackend, BrandIntegration, BrandIntegrationAction, BrandIntegrationProvider, BrandSearchHit, BrandSiteConfig, BrandSourceConfig, Budget, ByokProviderConfig, ByokProviderName, ByokProviders, CalendarProvider, CalendarStatus, Card, 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, 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, OrderItem, OrderStatus, PaymentProvider, PayoutEntry, PeriodTypeLabels, PeriodTypeOptions, PermissionConfigType, PersonaQuestionable, Plan, PlanBenefit, PlanExtra, PlanFeature, PlanInterval, PolicyMethod, PolicySetting, PricingModel, Product, ProductDiscount, ProductPieces, ProductRating, ProductRelation, ProductRelationType, ProductVariation, 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, 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, getMarketplaceBaseUrl, getMcpServerAgentUrl, getSiteUrl, getSitesRootDomain, getWarpScreenshotUrl, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, localize, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
|
package/dist/index.mjs
CHANGED
|
@@ -176,6 +176,10 @@ const toPreviewText = (text, maxChars = 100) => {
|
|
|
176
176
|
sanitized = sanitized.length > maxChars ? sanitized.substring(0, sanitized.lastIndexOf(" ", maxChars)) + "..." : sanitized;
|
|
177
177
|
return sanitized;
|
|
178
178
|
};
|
|
179
|
+
const localize = (value, locale) => {
|
|
180
|
+
if (!value) return "";
|
|
181
|
+
return value[locale ?? "en"] ?? value["en"] ?? Object.values(value)[0] ?? "";
|
|
182
|
+
};
|
|
179
183
|
//#endregion
|
|
180
184
|
//#region src/helpers/number.ts
|
|
181
185
|
const abbreviateNumber = (val) => {
|
|
@@ -350,4 +354,4 @@ const SkillScope = {
|
|
|
350
354
|
Team: "team"
|
|
351
355
|
};
|
|
352
356
|
//#endregion
|
|
353
|
-
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, getMarketplaceBaseUrl, getMcpServerAgentUrl, getSiteUrl, getSitesRootDomain, getWarpScreenshotUrl, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
|
|
357
|
+
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, getMarketplaceBaseUrl, getMcpServerAgentUrl, getSiteUrl, getSitesRootDomain, getWarpScreenshotUrl, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, localize, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
|