@joai/core 4.0.0 → 4.2.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 +209 -18
- package/dist/index.mjs +28 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -8,8 +8,8 @@ type SocialAuthProvider = 'github' | 'apple' | 'google' | 'x' | 'telegram' | 'sl
|
|
|
8
8
|
type AppEnv = 'mainnet' | 'testnet' | 'devnet' | 'local';
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/auth/token.d.ts
|
|
11
|
-
/** One-time native/deep-link handoff
|
|
12
|
-
declare const
|
|
11
|
+
/** One-time native/deep-link handoff fragment key (exchanged for a Bearer via POST). */
|
|
12
|
+
declare const NATIVE_AUTH_TOKEN_PARAM = "token";
|
|
13
13
|
/** Login URL on the main app with a direct return URL (no mini-app callback). */
|
|
14
14
|
declare const getLoginUrl: (env: AppEnv, returnTo: string, branding?: {
|
|
15
15
|
team: string;
|
|
@@ -234,7 +234,6 @@ type UserPrivate = {
|
|
|
234
234
|
socials: UserSocialAccount[];
|
|
235
235
|
justCreated: boolean;
|
|
236
236
|
affiliate: Affiliate | null;
|
|
237
|
-
billingAddress: BillingAddress | null;
|
|
238
237
|
betaRestricted: boolean;
|
|
239
238
|
kyc?: Kyc | null;
|
|
240
239
|
settings: UserSettings;
|
|
@@ -306,6 +305,28 @@ type AffiliateStatus = 'pending' | 'approved' | 'rejected' | 'suspended' | 'demo
|
|
|
306
305
|
//#region src/team/constants.d.ts
|
|
307
306
|
declare const teamCategories: readonly ["general", "food-drink", "retail", "beauty-wellness", "health", "sports-fitness", "trades-services", "professional-services", "education-culture", "clubs-organizations", "leisure-tourism"];
|
|
308
307
|
//#endregion
|
|
308
|
+
//#region src/team/apps.d.ts
|
|
309
|
+
declare const NativeApps: {
|
|
310
|
+
readonly Board: "board";
|
|
311
|
+
readonly Shop: "shop";
|
|
312
|
+
readonly SmartLinks: "smart-links";
|
|
313
|
+
readonly Contacts: "contacts";
|
|
314
|
+
readonly Forms: "forms";
|
|
315
|
+
readonly Appointments: "appointments";
|
|
316
|
+
readonly Workspace: "workspace";
|
|
317
|
+
readonly Meeting: "meeting";
|
|
318
|
+
readonly VoiceDictation: "voice-dictation";
|
|
319
|
+
readonly Heartbeats: "heartbeats";
|
|
320
|
+
readonly Wallets: "wallets";
|
|
321
|
+
readonly Campaigns: "campaigns";
|
|
322
|
+
readonly News: "news";
|
|
323
|
+
readonly Sites: "sites";
|
|
324
|
+
readonly Contracts: "contracts";
|
|
325
|
+
};
|
|
326
|
+
type NativeApp = (typeof NativeApps)[keyof typeof NativeApps];
|
|
327
|
+
declare const nativeAppSlugs: NativeApp[];
|
|
328
|
+
declare const isNativeApp: (value: unknown) => value is NativeApp;
|
|
329
|
+
//#endregion
|
|
309
330
|
//#region src/team/types.d.ts
|
|
310
331
|
type TeamCategory = (typeof teamCategories)[number];
|
|
311
332
|
type TeamFeature = 'shop' | 'appointments';
|
|
@@ -331,7 +352,9 @@ type TeamMeta = {
|
|
|
331
352
|
'stock.enabled'?: boolean;
|
|
332
353
|
contactPropertyMaskWarp?: string;
|
|
333
354
|
branding?: TeamBrand | null;
|
|
334
|
-
settings: Record<string, unknown
|
|
355
|
+
settings: Record<string, unknown> & {
|
|
356
|
+
apps?: NativeApp[];
|
|
357
|
+
};
|
|
335
358
|
};
|
|
336
359
|
type TeamPlace = {
|
|
337
360
|
provider: 'google';
|
|
@@ -501,6 +524,162 @@ type AiCostsResponse = {
|
|
|
501
524
|
};
|
|
502
525
|
};
|
|
503
526
|
//#endregion
|
|
527
|
+
//#region src/address/types.d.ts
|
|
528
|
+
type AddressType = 'shipping' | 'billing';
|
|
529
|
+
type Address = {
|
|
530
|
+
id: string;
|
|
531
|
+
type: AddressType;
|
|
532
|
+
name: string;
|
|
533
|
+
company: string | null;
|
|
534
|
+
addressOne: string;
|
|
535
|
+
addressTwo: string | null;
|
|
536
|
+
city: string;
|
|
537
|
+
state: string | null;
|
|
538
|
+
zipCode: string;
|
|
539
|
+
country: string;
|
|
540
|
+
phone: string | null;
|
|
541
|
+
isDefault: boolean;
|
|
542
|
+
business: boolean;
|
|
543
|
+
vatId: string | null;
|
|
544
|
+
isEU: boolean;
|
|
545
|
+
isEEA: boolean;
|
|
546
|
+
};
|
|
547
|
+
type AddressSnapshot = Pick<Address, 'name' | 'company' | 'addressOne' | 'addressTwo' | 'city' | 'state' | 'zipCode' | 'country' | 'phone' | 'business' | 'vatId'>;
|
|
548
|
+
type AddressInput = {
|
|
549
|
+
name: string;
|
|
550
|
+
addressOne: string;
|
|
551
|
+
city: string;
|
|
552
|
+
zipCode: string;
|
|
553
|
+
country: string;
|
|
554
|
+
type?: AddressType;
|
|
555
|
+
company?: string | null;
|
|
556
|
+
addressTwo?: string | null;
|
|
557
|
+
state?: string | null;
|
|
558
|
+
phone?: string | null;
|
|
559
|
+
business?: boolean;
|
|
560
|
+
vatId?: string | null;
|
|
561
|
+
};
|
|
562
|
+
type AddressCreatePayload = {
|
|
563
|
+
name: string;
|
|
564
|
+
country: string;
|
|
565
|
+
type?: AddressType;
|
|
566
|
+
email?: string | null;
|
|
567
|
+
company?: string | null;
|
|
568
|
+
addressOne?: string | null;
|
|
569
|
+
addressTwo?: string | null;
|
|
570
|
+
city?: string | null;
|
|
571
|
+
state?: string | null;
|
|
572
|
+
zipCode?: string | null;
|
|
573
|
+
vatId?: string | null;
|
|
574
|
+
phone?: string | null;
|
|
575
|
+
isDefault?: boolean;
|
|
576
|
+
contact?: string;
|
|
577
|
+
team?: string;
|
|
578
|
+
};
|
|
579
|
+
type AddressUpdatePayload = Partial<Omit<AddressCreatePayload, 'contact' | 'team'>>;
|
|
580
|
+
//#endregion
|
|
581
|
+
//#region src/commerce/types.d.ts
|
|
582
|
+
type FulfillmentMethod = 'shipping' | 'pickup';
|
|
583
|
+
type ShippingRate = {
|
|
584
|
+
id: number;
|
|
585
|
+
name: string;
|
|
586
|
+
price: number;
|
|
587
|
+
fee?: number;
|
|
588
|
+
freeShippingThreshold?: number | null;
|
|
589
|
+
minOrderValue?: number | null;
|
|
590
|
+
maxOrderValue?: number | null;
|
|
591
|
+
minWeight?: number | null;
|
|
592
|
+
maxWeight?: number | null;
|
|
593
|
+
estimatedMinDays?: number | null;
|
|
594
|
+
estimatedMaxDays?: number | null;
|
|
595
|
+
active?: boolean;
|
|
596
|
+
position?: number;
|
|
597
|
+
};
|
|
598
|
+
type CheckoutSnapshot = {
|
|
599
|
+
id: string;
|
|
600
|
+
fulfillmentMethod: FulfillmentMethod;
|
|
601
|
+
totals: {
|
|
602
|
+
subtotal: number;
|
|
603
|
+
shippingFee: number;
|
|
604
|
+
total: number;
|
|
605
|
+
};
|
|
606
|
+
expiresAt: string;
|
|
607
|
+
accessToken?: string | null;
|
|
608
|
+
};
|
|
609
|
+
type CheckoutSnapshotRequest = {
|
|
610
|
+
fulfillmentMethod: FulfillmentMethod;
|
|
611
|
+
items: {
|
|
612
|
+
id: string;
|
|
613
|
+
type: 'product' | 'service' | 'coupon';
|
|
614
|
+
quantity: number;
|
|
615
|
+
}[];
|
|
616
|
+
billingAddressId?: number | null;
|
|
617
|
+
shippingAddressId?: number | null;
|
|
618
|
+
billingAddress?: AddressInput;
|
|
619
|
+
shippingAddress?: AddressInput;
|
|
620
|
+
shippingRateId?: number | null;
|
|
621
|
+
fulfillmentLocationId?: number | null;
|
|
622
|
+
};
|
|
623
|
+
type ShippingZone = {
|
|
624
|
+
id: number;
|
|
625
|
+
name: string;
|
|
626
|
+
countries: string[];
|
|
627
|
+
postal_code_rules: string[] | null;
|
|
628
|
+
active: boolean;
|
|
629
|
+
position: number;
|
|
630
|
+
rates: ShippingRate[];
|
|
631
|
+
};
|
|
632
|
+
type FulfillmentLocation = {
|
|
633
|
+
id: number;
|
|
634
|
+
name: string;
|
|
635
|
+
address_id: number | null;
|
|
636
|
+
address: Address | null;
|
|
637
|
+
instructions: string | null;
|
|
638
|
+
active: boolean;
|
|
639
|
+
};
|
|
640
|
+
type FulfillmentStatus = 'pending' | 'ready_for_pickup' | 'shipped' | 'delivered' | 'cancelled';
|
|
641
|
+
type Fulfillment = {
|
|
642
|
+
id: string;
|
|
643
|
+
orderId: number;
|
|
644
|
+
method: FulfillmentMethod;
|
|
645
|
+
status: FulfillmentStatus;
|
|
646
|
+
carrierCode: string | null;
|
|
647
|
+
trackingNumber: string | null;
|
|
648
|
+
trackingUrl: string | null;
|
|
649
|
+
items: {
|
|
650
|
+
orderItemId: number;
|
|
651
|
+
quantity: number;
|
|
652
|
+
}[];
|
|
653
|
+
shippedAt: string | null;
|
|
654
|
+
readyForPickupAt: string | null;
|
|
655
|
+
deliveredAt: string | null;
|
|
656
|
+
};
|
|
657
|
+
type ReturnStatus = 'requested' | 'approved' | 'rejected' | 'received' | 'closed';
|
|
658
|
+
type Return = {
|
|
659
|
+
id: string;
|
|
660
|
+
orderId: number;
|
|
661
|
+
status: ReturnStatus;
|
|
662
|
+
reason: string;
|
|
663
|
+
merchantNote: string | null;
|
|
664
|
+
items: {
|
|
665
|
+
orderItemId: number;
|
|
666
|
+
quantity: number;
|
|
667
|
+
condition: string | null;
|
|
668
|
+
}[];
|
|
669
|
+
refundAmount: number | null;
|
|
670
|
+
};
|
|
671
|
+
type SubscriptionDelivery = {
|
|
672
|
+
fulfillmentMethod: FulfillmentMethod | null;
|
|
673
|
+
nextOrderAt: string | null;
|
|
674
|
+
pausedAt: string | null;
|
|
675
|
+
shippingAddress?: AddressSnapshot | null;
|
|
676
|
+
shippingRate?: Pick<ShippingRate, 'name' | 'price'> | null;
|
|
677
|
+
fulfillmentLocation?: {
|
|
678
|
+
name: string;
|
|
679
|
+
instructions: string | null;
|
|
680
|
+
} | null;
|
|
681
|
+
};
|
|
682
|
+
//#endregion
|
|
504
683
|
//#region src/json/types.d.ts
|
|
505
684
|
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
506
685
|
[key: string]: JsonValue;
|
|
@@ -630,7 +809,7 @@ type OrderType = 'order' | 'quote';
|
|
|
630
809
|
type SubscriptionStatus = 'active' | 'canceled' | 'past_due' | 'pending';
|
|
631
810
|
type SubscriptionInterval = 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly';
|
|
632
811
|
type PricingModel = 'free' | 'one-time' | 'weekly' | 'biweekly' | 'monthly' | 'quarterly' | 'yearly' | 'per-run';
|
|
633
|
-
type
|
|
812
|
+
type Subscription = {
|
|
634
813
|
id: string;
|
|
635
814
|
orderId: string;
|
|
636
815
|
teamId: string;
|
|
@@ -643,6 +822,7 @@ type AppSubscription = {
|
|
|
643
822
|
meta: Record<string, JsonValue> | null;
|
|
644
823
|
createdAt: string;
|
|
645
824
|
updatedAt: string;
|
|
825
|
+
delivery?: SubscriptionDelivery | null;
|
|
646
826
|
};
|
|
647
827
|
type PaymentProvider = 'xmoney' | 'lemonsqueezy' | 'stripe' | 'stripe-connect' | 'mollie' | 'mollie-connect' | 'apple' | 'google' | 'blockchain' | 'offline';
|
|
648
828
|
type PaymentAccount = {
|
|
@@ -689,16 +869,6 @@ type PlanExtra = {
|
|
|
689
869
|
price: number;
|
|
690
870
|
unitName: string;
|
|
691
871
|
};
|
|
692
|
-
type BillingAddress = {
|
|
693
|
-
name: string;
|
|
694
|
-
addressOne: string | null;
|
|
695
|
-
city: string | null;
|
|
696
|
-
state: string | null;
|
|
697
|
-
zipCode: string | null;
|
|
698
|
-
country: string;
|
|
699
|
-
vatId: string | null;
|
|
700
|
-
isEU: boolean;
|
|
701
|
-
};
|
|
702
872
|
type PlanInterval = 'weekly' | 'monthly' | 'yearly' | 'lifetime';
|
|
703
873
|
type Plan = {
|
|
704
874
|
resource: 'plan';
|
|
@@ -873,6 +1043,17 @@ type Order = {
|
|
|
873
1043
|
paymentMode: string | null;
|
|
874
1044
|
linkVariationId: string | null;
|
|
875
1045
|
notes: string | null;
|
|
1046
|
+
fulfillmentMethod?: FulfillmentMethod | null;
|
|
1047
|
+
address?: AddressSnapshot | null;
|
|
1048
|
+
shippingAddress?: AddressSnapshot | null;
|
|
1049
|
+
shippingRate?: Pick<ShippingRate, 'name' | 'price' | 'estimatedMinDays' | 'estimatedMaxDays'> | null;
|
|
1050
|
+
fulfillmentLocation?: {
|
|
1051
|
+
name: string;
|
|
1052
|
+
instructions?: string | null;
|
|
1053
|
+
} | null;
|
|
1054
|
+
shippingFee?: number;
|
|
1055
|
+
fulfillments?: Fulfillment[];
|
|
1056
|
+
subscription?: Subscription | null;
|
|
876
1057
|
configuration?: OrderConfigurationItem[];
|
|
877
1058
|
items: OrderItem[];
|
|
878
1059
|
coupon?: Coupon | null;
|
|
@@ -934,7 +1115,7 @@ type PurchaseResult = {
|
|
|
934
1115
|
};
|
|
935
1116
|
type PurchaseOptions = {
|
|
936
1117
|
forceProvider?: PaymentProvider;
|
|
937
|
-
billingAddress?:
|
|
1118
|
+
billingAddress?: AddressSnapshot | null;
|
|
938
1119
|
meta?: Record<string, string>;
|
|
939
1120
|
};
|
|
940
1121
|
//#endregion
|
|
@@ -1673,7 +1854,8 @@ type Meeting = {
|
|
|
1673
1854
|
captureMode: 'desktop_local' | null;
|
|
1674
1855
|
transcriptUrl: string | null;
|
|
1675
1856
|
summaryUrl: string | null;
|
|
1676
|
-
participants?: MeetingParticipant[];
|
|
1857
|
+
participants?: MeetingParticipant[]; /** The customer associated with an appointment booking, when available. */
|
|
1858
|
+
contact?: Contact | null;
|
|
1677
1859
|
speakerAssignments?: MeetingSpeakerAssignment[] | null;
|
|
1678
1860
|
scheduledAt: string | null;
|
|
1679
1861
|
calendarEventId: number | null;
|
|
@@ -1768,6 +1950,7 @@ type AppointmentPolicy = {
|
|
|
1768
1950
|
bookingCapacity?: number | null;
|
|
1769
1951
|
bookingCapacityUnit?: 'booking' | 'person' | null;
|
|
1770
1952
|
requireApproval?: boolean | null;
|
|
1953
|
+
notificationEmail?: string | null;
|
|
1771
1954
|
sync?: AppointmentPolicySync | null;
|
|
1772
1955
|
agent?: Agent | null;
|
|
1773
1956
|
agentUuid?: string | null;
|
|
@@ -1818,6 +2001,14 @@ type AppointmentRequest = {
|
|
|
1818
2001
|
createdAt: string;
|
|
1819
2002
|
};
|
|
1820
2003
|
//#endregion
|
|
2004
|
+
//#region src/commerce/helpers.d.ts
|
|
2005
|
+
type CartLine = {
|
|
2006
|
+
price: number;
|
|
2007
|
+
quantity: number;
|
|
2008
|
+
};
|
|
2009
|
+
declare const cartLineTotal: <T extends CartLine>(items: T[]) => number;
|
|
2010
|
+
declare const isCompleteAddressInput: (address: Pick<AddressInput, "name" | "addressOne" | "city" | "zipCode" | "country">) => boolean;
|
|
2011
|
+
//#endregion
|
|
1821
2012
|
//#region src/budget/types.d.ts
|
|
1822
2013
|
type Budget = {
|
|
1823
2014
|
id: number;
|
|
@@ -3780,4 +3971,4 @@ type CliSessionStatus = {
|
|
|
3780
3971
|
meta: CliSessionMeta | null;
|
|
3781
3972
|
};
|
|
3782
3973
|
//#endregion
|
|
3783
|
-
export {
|
|
3974
|
+
export { Achievement, Address, AddressCreatePayload, AddressInput, AddressSnapshot, AddressType, AddressUpdatePayload, 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, AppendKvEntryResult, AppointmentAvailability, AppointmentAvailabilityService, AppointmentAvailabilitySlot, AppointmentBooking, AppointmentBookingContext, AppointmentPolicy, AppointmentPolicySync, AppointmentRequest, AppointmentSlot, AuthUser, 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, CartLine, Challenge, Challenges, ChangelogEntry, Character, ChatClientAction, ChatClientThought, ChatStreamData, ChatStreamEventType, CheckoutSnapshot, CheckoutSnapshotRequest, 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, Fulfillment, FulfillmentLocation, FulfillmentMethod, FulfillmentStatus, 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, NATIVE_AUTH_TOKEN_PARAM, NativeApp, NativeApps, 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, Return, ReturnStatus, Room, RoomId, RoomKind, ScInfo, SchedulePreset, SecretAuthorizable, SecretSettable, Segment, SegmentCondition, SegmentConditionType, SegmentCountPayload, SegmentCountResult, SegmentCreatePayload, SegmentGroup, SendableActivityUpdate, SendableAgentAction, SendableAgentMessage, SendableAgentThought, SendableMedia, SendableUserMessage, Service, SetKvEntryResult, ShippingRate, ShippingZone, 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, Subscription, SubscriptionDelivery, 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, cartLineTotal, getAgentsBaseUrl, getApiBaseUrl, getAppBaseUrl, getAssetAppLogoUrl, getAssetChainLogoUrl, getAssetPartnerLogoUrl, getAssetTokenLogoUrl, getAssetWalletLogoUrl, getCortexBaseUrl, getDigestBaseUrl, getFormsBaseUrl, getLoginUrl, getMcpServerAgentUrl, getSiteUrl, getSitesBaseUrl, getSitesRootDomain, getStoreBaseUrl, getWarpScreenshotUrl, isCompleteAddressInput, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, isNativeApp, localize, nativeAppSlugs, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, teamCategories, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
|
package/dist/index.mjs
CHANGED
|
@@ -58,8 +58,8 @@ const getSitesRootDomain = (env) => {
|
|
|
58
58
|
const getSiteUrl = (env, teamSlug, brandSlug) => `https://${getSitesRootDomain(env)}/${teamSlug}/${brandSlug}`;
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/auth/token.ts
|
|
61
|
-
/** One-time native/deep-link handoff
|
|
62
|
-
const
|
|
61
|
+
/** One-time native/deep-link handoff fragment key (exchanged for a Bearer via POST). */
|
|
62
|
+
const NATIVE_AUTH_TOKEN_PARAM = "token";
|
|
63
63
|
/** Login URL on the main app with a direct return URL (no mini-app callback). */
|
|
64
64
|
const getLoginUrl = (env, returnTo, branding) => {
|
|
65
65
|
const params = new URLSearchParams({ redirect: returnTo });
|
|
@@ -282,6 +282,10 @@ function resolveWarpText(text, locale = "en") {
|
|
|
282
282
|
return text[locale] ?? text.en ?? Object.values(text)[0] ?? "";
|
|
283
283
|
}
|
|
284
284
|
//#endregion
|
|
285
|
+
//#region src/commerce/helpers.ts
|
|
286
|
+
const cartLineTotal = (items) => items.reduce((total, item) => total + item.price * item.quantity, 0);
|
|
287
|
+
const isCompleteAddressInput = (address) => Boolean(address.name.trim() && address.addressOne.trim() && address.city.trim() && address.zipCode.trim() && address.country.trim());
|
|
288
|
+
//#endregion
|
|
285
289
|
//#region src/budget/types.ts
|
|
286
290
|
const PeriodTypeLabels = {
|
|
287
291
|
0: "One-time",
|
|
@@ -396,4 +400,25 @@ const teamCategories = [
|
|
|
396
400
|
"leisure-tourism"
|
|
397
401
|
];
|
|
398
402
|
//#endregion
|
|
399
|
-
|
|
403
|
+
//#region src/team/apps.ts
|
|
404
|
+
const NativeApps = {
|
|
405
|
+
Board: "board",
|
|
406
|
+
Shop: "shop",
|
|
407
|
+
SmartLinks: "smart-links",
|
|
408
|
+
Contacts: "contacts",
|
|
409
|
+
Forms: "forms",
|
|
410
|
+
Appointments: "appointments",
|
|
411
|
+
Workspace: "workspace",
|
|
412
|
+
Meeting: "meeting",
|
|
413
|
+
VoiceDictation: "voice-dictation",
|
|
414
|
+
Heartbeats: "heartbeats",
|
|
415
|
+
Wallets: "wallets",
|
|
416
|
+
Campaigns: "campaigns",
|
|
417
|
+
News: "news",
|
|
418
|
+
Sites: "sites",
|
|
419
|
+
Contracts: "contracts"
|
|
420
|
+
};
|
|
421
|
+
const nativeAppSlugs = Object.values(NativeApps);
|
|
422
|
+
const isNativeApp = (value) => typeof value === "string" && nativeAppSlugs.includes(value);
|
|
423
|
+
//#endregion
|
|
424
|
+
export { ContractCategoryDisplayNames, DefaultCodeMetadata, HttpService, JoaiUrls, NATIVE_AUTH_TOKEN_PARAM, NativeApps, OG_IMAGE_CONFIG, OG_IMAGE_HEIGHT, OG_IMAGE_WIDTH, OgImageColors, PeriodTypeLabels, PeriodTypeOptions, SkillMediaBindingRole, SkillScope, SkillType, abbreviateNumber, cartLineTotal, getAgentsBaseUrl, getApiBaseUrl, getAppBaseUrl, getAssetAppLogoUrl, getAssetChainLogoUrl, getAssetPartnerLogoUrl, getAssetTokenLogoUrl, getAssetWalletLogoUrl, getCortexBaseUrl, getDigestBaseUrl, getFormsBaseUrl, getLoginUrl, getMcpServerAgentUrl, getSiteUrl, getSitesBaseUrl, getSitesRootDomain, getStoreBaseUrl, getWarpScreenshotUrl, isCompleteAddressInput, isFileFormatAudio, isFileFormatImage, isFileFormatVideo, isNativeApp, localize, nativeAppSlugs, ogImageUrl, resolveWarpText, sanitizeAlphanumeric, sanitizeNumeric, teamCategories, toCurrencyDisplay, toHexEncodedNonce, toNameInitials, toNftId, toPreviewText, withRetry };
|