@joai/sdk 12.0.4 → 12.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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _$_joai_core0 from "@joai/core";
2
- import { Address, AddressCreatePayload, AddressInput, AddressType, AddressUpdatePayload, Affiliate, AffiliateTier, Agent, AgentActionHistoryEntry, AgentPrivate, AgentSettings, AgentTrustedActionRule, AiCostsResponse, Alert, ApiToken, AppEnv, AppIngestion, AppendKvEntryResult, AppointmentAvailability, AppointmentBooking, AppointmentPolicy, AppointmentPolicyUpsert, AppointmentRequest, Artifact, ArtifactCreatePayload, ArtifactDeliverPayload, ArtifactDelivery, ArtifactDeliveryPreview, ArtifactStatus, ArtifactType, ArtifactUpdatePayload, AuthUser, AuthUser as AuthUser$1, Automation, AutomationActionInput, AutomationAudiencePreview, AutomationCreatePayload, AutomationEnrollment, AutomationStats, AutomationUpdatePayload, Blueprint, BlueprintSettings, BrandBackend, BrandSiteConfig, BrandSourceConfig, CalendarStatus, Campaign, CampaignAudiencePreview, CampaignAudiencePreviewPayload, CampaignCreatePayload, CampaignRecipient, CampaignRecipientStatus, CampaignSendTestDraftPayload, CampaignStats, CampaignUpdatePayload, Card, Cart, Cart as Cart$1, CartLine, ChangelogEntry, Character, CheckoutSnapshot, CheckoutSnapshot as CheckoutSnapshot$1, CheckoutSnapshotRequest, CommissionAgreement, Configuration, Contact, ContactActivity, ContactCreatePayload, ContactFormData, ContactRelation, ContactRelationPayload, ContactRelationUpdatePayload, Content, ContentVersion, Contract, ContractCategoryName, ContractVersion, Coupon, CouponCondition, CouponRestrictedItem, CreateContentInput, CreateHookPayload, CreateHookPayload as CreateHookPayload$1, CreateInboundHookPayload, CreateInternalHookPayload, CreateKvFieldPayload, CreateWarpLinkedHookPayload, CreateWebHookPayload, Document, EarnResponse, Element, ElementSpec, ElementVariation, EmbedStatus, Entity, Flow, FollowListParams, FollowPayload, Fulfillment, FulfillmentLocation, FulfillmentLocation as FulfillmentLocation$1, FulfillmentMethod, GamificationData, Goal, GoalCreatePayload, GuestBuyer, GuestBuyer as GuestBuyer$1, Hook, Hook as Hook$1, HookSample, HookSample as HookSample$1, HookTrigger, HookTriggerCondition, HookTriggerInput, IAppResponse, IHttpService, IRequestOptions, Inquiry, InquiryType, Install, InstallClaimPayload, InstallOptOutPayload, InstallRegisterPayload, Integration, IntegrationType, Intent, Item, ItemCreatePayload, ItemUpdatePayload, JsonValue, KvEntryPayload, KvField, KvFieldWithEntries, Link, LinkCreatePayload, LinkStats, LinkUpdatePayload, LinkVariation, LinkVariationBatchCreatePayload, LinkVariationCreatePayload, LoyaltyAccount, LoyaltyCollectPointInput, LoyaltyCollectResponse, LoyaltyJoinResponse, LoyaltyMember, LoyaltyProgram, LoyaltyPromotion, LoyaltyReward, LoyaltyTier, LoyaltyTransaction, LoyaltyWalletAccount, McpToolCall, Media, MediaAspectRatio, Meeting, MeetingJoinInfo, MeetingSpeakerAssignment, MeetingSummary, Memory, Message, MetricSource, MetricsResult, Mission, MissionCreatePayload, Notification, NotificationChannel, NotificationSetting, OfficeSnapshot, Order, Order as Order$1, OrderContext, OrderPriceMode, OrderPriceMode as OrderPriceMode$1, OrderStatus, OrderStatus as OrderStatus$1, OrderType, PaginatedResponse, Pass, PatchContentInput, PaymentAccount, PaymentAccountOnboarding, PaymentProvider, Plan, PlanFeature, Product, Product as Product$1, ProductDetailSection, ProductRelation, ProductVariation, ProgramSettings, Project, ProjectExportResponse, ProjectInputAssistIntent, ProjectInputAssistResponse, ProjectMutation, ProjectOutputPreset, ProjectOutputType, ProjectStudioHistoryEntry, Proposal, ProposalAction, ProposalPollOption, PublicFormResults, PurchaseResult, RampProviderInfo, Reactions, RedeemResponse, Reminder, Return, ReturnStatus, Room, RoomKind, Segment, SegmentCountPayload, SegmentCountResult, SegmentCreatePayload, Service, SetKvEntryResult, SharedSocialPost, ShippingCarrierOption, ShippingRate, ShippingRate as ShippingRate$1, ShippingZone, Shortcut, Site, SiteBrand, SiteType, Skill, SkillScopeValue, SocialAuthProvider, SocialBot, SocialPlatform, SocialPost, SocialPostConnection, SocialPostCreatePayload, SocialPostGenerateCaptionPayload, SocialPostGeneratedCaption, SocialPostPlatform, SocialPostStatus, SocialPostUpdatePayload, StampResponse, StoreAgent, StoreData, StorePriceTier, StorePurchaseResult, Subscription, Swarm, Tag, TagType, Task, TaxClass, Team, TeamAccessConfig, TeamCategory, TeamEarning, TeamEarningsBalance, TeamFeature, TeamFeatureUsage, TeamMember, TeamMeta, TeamOrderStats, TeamPayout, TeamPayoutAddress, TeamPrivate, TeamUsage, TerminalConnectionToken, TerminalPaymentIntent, ToggleKvFieldResult, TranslatableValue, Update, UpdateCreatePayload, UpdateRelation, UpdateStats, UpdateType, UpdateUpdatePayload, Upgrade, UpgradeStatus, UserPrivate, UserRole, UserSettings, VolumePrice, WarpBackend, WarpBackendStatus, WarpExecutionBackend, WebHookTriggerEvent, WorkspaceCloudFile, WorkspaceInfo, XIntegrationStatus } from "@joai/core";
2
+ import { Address, AddressCreatePayload, AddressInput, AddressType, AddressUpdatePayload, Affiliate, AffiliateTier, Agent, AgentActionHistoryEntry, AgentPrivate, AgentSettings, AgentTrustedActionRule, AiCostsResponse, Alert, AnalyticsConfiguration, ApiToken, AppEnv, AppIngestion, AppendKvEntryResult, AppointmentAvailability, AppointmentBooking, AppointmentPolicy, AppointmentPolicyUpsert, AppointmentRequest, Artifact, ArtifactCreatePayload, ArtifactDeliverPayload, ArtifactDelivery, ArtifactDeliveryPreview, ArtifactStatus, ArtifactType, ArtifactUpdatePayload, AuthUser, AuthUser as AuthUser$1, Automation, AutomationActionInput, AutomationAudiencePreview, AutomationCreatePayload, AutomationEnrollment, AutomationStats, AutomationUpdatePayload, Blueprint, BlueprintSettings, BrandBackend, BrandSiteConfig, BrandSourceConfig, CalendarFeed, CalendarFeedInput, CalendarFeedSyncResult, CalendarStatus, Campaign, CampaignAudiencePreview, CampaignAudiencePreviewPayload, CampaignCreatePayload, CampaignRecipient, CampaignRecipientStatus, CampaignSendTestDraftPayload, CampaignStats, CampaignUpdatePayload, Card, Cart, Cart as Cart$1, CartLine, ChangelogEntry, Character, CheckoutSnapshot, CheckoutSnapshot as CheckoutSnapshot$1, CheckoutSnapshotRequest, ClientProposal, CommissionAgreement, Configuration, Contact, ContactActivity, ContactCreatePayload, ContactFormData, ContactRelation, ContactRelationPayload, ContactRelationUpdatePayload, Content, ContentValue, ContentVersion, Contract, ContractCategoryName, ContractVersion, Coupon, CouponCondition, CouponRestrictedItem, CreateContentInput, CreateHookPayload, CreateHookPayload as CreateHookPayload$1, CreateInboundHookPayload, CreateInternalHookPayload, CreateKvFieldPayload, CreateWarpLinkedHookPayload, CreateWebHookPayload, Document, EarnResponse, Element, ElementSpec, ElementType, ElementVariation, EmbedStatus, Entity, Flow, FollowListParams, FollowPayload, Fulfillment, FulfillmentLocation, FulfillmentLocation as FulfillmentLocation$1, FulfillmentMethod, GamificationData, Goal, GoalCreatePayload, GuestBuyer, GuestBuyer as GuestBuyer$1, Hook, Hook as Hook$1, HookSample, HookSample as HookSample$1, HookTrigger, HookTriggerCondition, HookTriggerInput, IAppResponse, IHttpService, IRequestOptions, IdentifiedSiteEvent, Inquiry, InquiryType, Install, InstallClaimPayload, InstallOptOutPayload, InstallRegisterPayload, Integration, IntegrationType, Intent, Item, ItemCreatePayload, ItemUpdatePayload, JsonValue, KvEntryPayload, KvField, KvFieldWithEntries, Link, LinkCreatePayload, LinkStats, LinkUpdatePayload, LinkVariation, LinkVariationBatchCreatePayload, LinkVariationCreatePayload, LoyaltyAccount, LoyaltyCollectPointInput, LoyaltyCollectResponse, LoyaltyJoinResponse, LoyaltyMember, LoyaltyProgram, LoyaltyPromotion, LoyaltyReward, LoyaltyTier, LoyaltyTransaction, LoyaltyWalletAccount, McpToolCall, Media, MediaAspectRatio, Meeting, MeetingJoinInfo, MeetingSpeakerAssignment, MeetingSummary, Memory, Message, MetricSource, MetricsResult, Mission, MissionCreatePayload, Notification, NotificationChannel, NotificationSetting, OfficeSnapshot, Order, Order as Order$1, OrderContext, OrderPriceMode, OrderPriceMode as OrderPriceMode$1, OrderStatus, OrderStatus as OrderStatus$1, OrderType, PaginatedResponse, Pass, PatchContentInput, PaymentAccount, PaymentAccountOnboarding, PaymentProvider, Plan, PlanFeature, Product, Product as Product$1, ProductDetailSection, ProductRelation, ProductVariation, ProgramSettings, Project, ProjectExportResponse, ProjectInputAssistIntent, ProjectInputAssistResponse, ProjectMutation, ProjectOutputPreset, ProjectOutputType, ProjectStudioHistoryEntry, Proposal, ProposalAction, ProposalCreateInput, ProposalPollOption, PublicFormResults, PurchaseResult, RampProviderInfo, Reactions, RedeemResponse, Reminder, Return, ReturnStatus, Room, RoomKind, Segment, SegmentCountPayload, SegmentCountResult, SegmentCreatePayload, Service, SetKvEntryResult, SharedArtifact, SharedProposal, SharedSocialPost, ShippingCarrierOption, ShippingRate, ShippingRate as ShippingRate$1, ShippingZone, Shortcut, Site, SiteBrand, SiteType, Skill, SkillScopeValue, SocialAuthProvider, SocialBot, SocialPlatform, SocialPost, SocialPostConnection, SocialPostCreatePayload, SocialPostGenerateCaptionPayload, SocialPostGeneratedCaption, SocialPostPlatform, SocialPostScheduleSlot, SocialPostStatus, SocialPostUpdatePayload, StampResponse, StoreAgent, StoreData, StorePriceTier, StorePurchaseResult, Subscription, Swarm, Tag, TagType, Task, TaxClass, Team, TeamAccessConfig, TeamCategory, TeamEarning, TeamEarningsBalance, TeamFeature, TeamFeatureUsage, TeamMember, TeamMeta, TeamOrderStats, TeamPayout, TeamPayoutAddress, TeamPrivate, TeamUsage, TemplateMode, TemplateOverrides, TemplateSpec, TerminalConnectionToken, TerminalPaymentIntent, ToggleKvFieldResult, TranslatableValue, Update, UpdateCreatePayload, UpdateRelation, UpdateStats, UpdateType, UpdateUpdatePayload, Upgrade, UpgradeStatus, UserPrivate, UserRole, UserSettings, VolumePrice, WarpBackend, WarpBackendStatus, WarpExecutionBackend, WebHookTriggerEvent, WorkspaceCloudFile, WorkspaceInfo, XIntegrationStatus } from "@joai/core";
3
3
  import { WarpChainName, WarpClient, WarpLocale, WarpText, WarpWalletProvider } from "@joai/warps";
4
4
 
5
5
  //#region src/resources/agents.d.ts
@@ -498,6 +498,14 @@ declare class DeskResource {
498
498
  }
499
499
  //#endregion
500
500
  //#region src/resources/elements.d.ts
501
+ type ElementRenderPayload = {
502
+ values?: Record<string, ContentValue>;
503
+ mode?: TemplateMode;
504
+ };
505
+ type ElementRenderResult = {
506
+ imageBase64: string;
507
+ mimeType: string;
508
+ };
501
509
  declare class ElementsResource {
502
510
  private readonly http;
503
511
  constructor(http: IHttpService);
@@ -505,35 +513,40 @@ declare class ElementsResource {
505
513
  description?: string | null;
506
514
  imageUrl?: string | null;
507
515
  imageDataUrl?: string | null;
508
- }): Promise<_$_joai_core0.IAppResponse<ElementSpec>>;
516
+ type?: ElementType | null;
517
+ }): Promise<_$_joai_core0.IAppResponse<ElementSpec | TemplateSpec>>;
509
518
  list(team: string): Promise<_$_joai_core0.IAppResponse<Element[]>>;
510
519
  get(team: string, elementId: string): Promise<_$_joai_core0.IAppResponse<Element>>;
511
520
  create(team: string, payload: {
512
521
  name: string;
513
522
  type: string;
514
523
  description?: string | null;
515
- spec?: ElementSpec | null;
524
+ spec?: ElementSpec | TemplateSpec | null;
516
525
  media?: string[];
517
526
  }): Promise<_$_joai_core0.IAppResponse<Element>>;
518
527
  update(team: string, elementId: string, payload: {
519
528
  name?: string;
520
529
  type?: string;
521
530
  description?: string | null;
522
- spec?: ElementSpec | null;
531
+ spec?: ElementSpec | TemplateSpec | null;
523
532
  media?: string[];
524
533
  }): Promise<_$_joai_core0.IAppResponse<Element>>;
525
534
  delete(team: string, elementId: string): Promise<_$_joai_core0.IAppResponse<void>>;
526
535
  generateVariation(team: string, elementId: string, payload?: {
527
536
  label?: string | null;
528
- overrides?: ElementSpec | null;
537
+ overrides?: ElementSpec | TemplateOverrides | null;
529
538
  aspectRatio?: string | null;
539
+ mode?: TemplateMode;
530
540
  }): Promise<_$_joai_core0.IAppResponse<ElementVariation>>;
531
541
  updateVariation(team: string, elementId: string, variationId: string, payload: {
532
542
  label?: string | null;
533
- overrides?: ElementSpec | null;
543
+ overrides?: ElementSpec | TemplateOverrides | null;
534
544
  model?: string | null;
535
545
  aspectRatio?: string | null;
546
+ mode?: TemplateMode;
536
547
  }): Promise<_$_joai_core0.IAppResponse<ElementVariation>>;
548
+ render(team: string, elementId: string, payload: ElementRenderPayload): Promise<_$_joai_core0.IAppResponse<ElementRenderResult>>;
549
+ renderVariation(team: string, elementId: string, variationId: string, payload: ElementRenderPayload): Promise<_$_joai_core0.IAppResponse<ElementRenderResult>>;
537
550
  deleteVariation(team: string, elementId: string, variationId: string): Promise<_$_joai_core0.IAppResponse<void>>;
538
551
  regenerateVariation(team: string, elementId: string, variationId: string): Promise<_$_joai_core0.IAppResponse<{
539
552
  status: string;
@@ -722,7 +735,10 @@ declare class AuthResource {
722
735
  constructor(http: IHttpService);
723
736
  sendCode(data: AuthSendCodeRequest): Promise<IAppResponse<void>>;
724
737
  confirmCode(data: AuthConfirmCodeRequest): Promise<IAppResponse<AuthConfirmCodeResponse>>;
725
- requestEmail(email: string, redirect?: string): Promise<IAppResponse<AuthLoginResponse>>;
738
+ /** Requests a magic link. `options.team` is the team slug used to brand the email. */
739
+ requestEmail(email: string, redirect?: string, options?: {
740
+ team?: string;
741
+ }): Promise<IAppResponse<AuthLoginResponse>>;
726
742
  loginWithSocialAccessToken(provider: NativeSocialAuthProvider, accessToken: string): Promise<IAppResponse<AuthLoginResponse>>;
727
743
  exchangeNativeSession(token: string): Promise<IAppResponse<AuthNativeSessionResponse>>;
728
744
  me(): Promise<IAppResponse<AuthUser$1>>;
@@ -751,6 +767,15 @@ declare class BillingResource {
751
767
  payOrder(id: string, provider?: PaymentProvider, accessToken?: string): Promise<_$_joai_core0.IAppResponse<{
752
768
  url: string;
753
769
  }>>;
770
+ checkout(input: {
771
+ team: string;
772
+ provider: PaymentProvider;
773
+ sku: string;
774
+ quantity?: number;
775
+ fresh?: boolean;
776
+ }): Promise<_$_joai_core0.IAppResponse<{
777
+ url: string;
778
+ }>>;
754
779
  deleteOrder(id: string): Promise<_$_joai_core0.IAppResponse<void>>;
755
780
  paymentAccount(team: string, provider: PaymentProvider): Promise<_$_joai_core0.IAppResponse<PaymentAccount>>;
756
781
  createPaymentAccountOnboarding(team: string, provider: PaymentProvider): Promise<_$_joai_core0.IAppResponse<PaymentAccountOnboarding>>;
@@ -874,6 +899,7 @@ declare class ContactsResource {
874
899
  create(payload: ContactCreatePayload): Promise<_$_joai_core0.IAppResponse<Contact>>;
875
900
  update(id: string, data: ContactFormData): Promise<_$_joai_core0.IAppResponse<Contact>>;
876
901
  delete(id: string): Promise<_$_joai_core0.IAppResponse<void>>;
902
+ merge(id: string, intoId: string): Promise<_$_joai_core0.IAppResponse<Contact>>;
877
903
  listActivities(id: string): Promise<_$_joai_core0.IAppResponse<ContactActivity[]>>;
878
904
  getTimeline<T = Record<string, JsonValue>>(id: string, page?: number): Promise<_$_joai_core0.IAppResponse<PaginatedResponse<T>>>;
879
905
  addActivity(id: string, data: {
@@ -1117,6 +1143,11 @@ declare class IntegrationsResource {
1117
1143
  confirmDevicePush(agent: string, eventIds: number[]): Promise<_$_joai_core0.IAppResponse<{
1118
1144
  confirmed: boolean;
1119
1145
  }>>;
1146
+ listCalendarFeeds(): Promise<_$_joai_core0.IAppResponse<CalendarFeed[]>>;
1147
+ createCalendarFeed(data: CalendarFeedInput): Promise<_$_joai_core0.IAppResponse<CalendarFeed>>;
1148
+ updateCalendarFeed(id: string, data: Partial<CalendarFeedInput>): Promise<_$_joai_core0.IAppResponse<CalendarFeed>>;
1149
+ deleteCalendarFeed(id: string): Promise<_$_joai_core0.IAppResponse<void>>;
1150
+ syncCalendarFeed(id: string): Promise<_$_joai_core0.IAppResponse<CalendarFeedSyncResult>>;
1120
1151
  setup(type: IntegrationType, agent: string, data?: Record<string, unknown>): Promise<_$_joai_core0.IAppResponse<Integration>>;
1121
1152
  }
1122
1153
  //#endregion
@@ -1256,7 +1287,7 @@ declare class LoyaltyResource {
1256
1287
  }): Promise<_$_joai_core0.IAppResponse<LoyaltyPromotion>>;
1257
1288
  deletePromotion(id: string): Promise<_$_joai_core0.IAppResponse<void>>;
1258
1289
  enroll(contactId: string): Promise<_$_joai_core0.IAppResponse<LoyaltyAccount>>;
1259
- getAccount(contactId: string): Promise<_$_joai_core0.IAppResponse<LoyaltyAccount>>;
1290
+ getAccount(contactId: string): Promise<_$_joai_core0.IAppResponse<LoyaltyAccount | null>>;
1260
1291
  stamp(contactId: string): Promise<_$_joai_core0.IAppResponse<StampResponse>>;
1261
1292
  earn(contactId: string, context?: {
1262
1293
  spendCents?: number;
@@ -1367,6 +1398,17 @@ declare class MetricsResource {
1367
1398
  query(params: MetricsQuery): Promise<_$_joai_core0.IAppResponse<MetricsResult>>;
1368
1399
  }
1369
1400
  //#endregion
1401
+ //#region src/resources/analytics.d.ts
1402
+ declare class AnalyticsResource {
1403
+ private readonly http;
1404
+ private readonly env;
1405
+ constructor(http: IHttpService, env: AppEnv);
1406
+ getConfiguration(siteKey: string): Promise<_$_joai_core0.IAppResponse<AnalyticsConfiguration>>;
1407
+ getScriptSnippet(siteKey: string): string;
1408
+ /** Records a CRM conversion for the caller's authenticated contact only. */
1409
+ recordEvent(siteId: string, data: IdentifiedSiteEvent): Promise<_$_joai_core0.IAppResponse<ContactActivity>>;
1410
+ }
1411
+ //#endregion
1370
1412
  //#region src/resources/meetings.d.ts
1371
1413
  declare class MeetingsResource {
1372
1414
  private readonly http;
@@ -1561,14 +1603,29 @@ declare class PersonaResource {
1561
1603
  }
1562
1604
  //#endregion
1563
1605
  //#region src/resources/products.d.ts
1606
+ type ProductsListParams = {
1607
+ includePrivate?: boolean;
1608
+ team?: string;
1609
+ page?: number;
1610
+ perPage?: number;
1611
+ search?: string;
1612
+ category?: string;
1613
+ all?: boolean;
1614
+ };
1615
+ type ProductCategories = {
1616
+ categories: string[];
1617
+ hasUntagged: boolean;
1618
+ };
1564
1619
  declare class ProductsResource {
1565
1620
  private readonly http;
1566
1621
  constructor(http: IHttpService);
1567
- list(params?: {
1568
- includePrivate?: boolean;
1622
+ list(params?: ProductsListParams): Promise<_$_joai_core0.IAppResponse<Product[]>>;
1623
+ listAll(params?: Omit<ProductsListParams, 'page' | 'perPage' | 'all'>): Promise<_$_joai_core0.IAppResponse<Product[]>>;
1624
+ categories(params?: {
1569
1625
  team?: string;
1570
- }): Promise<_$_joai_core0.IAppResponse<Product[]>>;
1626
+ }): Promise<_$_joai_core0.IAppResponse<ProductCategories>>;
1571
1627
  get(id: string): Promise<_$_joai_core0.IAppResponse<Product>>;
1628
+ getVariation(id: string): Promise<_$_joai_core0.IAppResponse<ProductVariation>>;
1572
1629
  create(data: {
1573
1630
  name: TranslatableValue;
1574
1631
  price?: number;
@@ -1663,6 +1720,16 @@ declare class ProjectsResource {
1663
1720
  exportProject(team: string, agent: string, projectId: string): Promise<_$_joai_core0.IAppResponse<ProjectExportResponse>>;
1664
1721
  }
1665
1722
  //#endregion
1723
+ //#region src/resources/proposals.d.ts
1724
+ declare class ProposalsResource {
1725
+ private readonly http;
1726
+ constructor(http: IHttpService);
1727
+ list(team: string): Promise<_$_joai_core0.IAppResponse<ClientProposal[]>>;
1728
+ create(team: string, data: ProposalCreateInput): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
1729
+ getShared(slug: string, password?: string): Promise<_$_joai_core0.IAppResponse<SharedProposal>>;
1730
+ confirm(slug: string, password: string | undefined, itemIds: string[]): Promise<_$_joai_core0.IAppResponse<SharedProposal>>;
1731
+ }
1732
+ //#endregion
1666
1733
  //#region src/resources/reminders.d.ts
1667
1734
  declare class RemindersResource {
1668
1735
  private readonly http;
@@ -1704,12 +1771,20 @@ declare class RoomsResource {
1704
1771
  }
1705
1772
  //#endregion
1706
1773
  //#region src/resources/services.d.ts
1774
+ type ServicesListParams = {
1775
+ includePrivate?: boolean;
1776
+ page?: number;
1777
+ perPage?: number;
1778
+ search?: string;
1779
+ tags?: string;
1780
+ bookable?: boolean;
1781
+ all?: boolean;
1782
+ };
1707
1783
  declare class ServicesResource {
1708
1784
  private readonly http;
1709
1785
  constructor(http: IHttpService);
1710
- list(params?: {
1711
- includePrivate?: boolean;
1712
- }): Promise<_$_joai_core0.IAppResponse<Service[]>>;
1786
+ list(params?: ServicesListParams): Promise<_$_joai_core0.IAppResponse<Service[]>>;
1787
+ listAll(params?: Omit<ServicesListParams, 'page' | 'perPage' | 'all'>): Promise<_$_joai_core0.IAppResponse<Service[]>>;
1713
1788
  get(slug: string): Promise<_$_joai_core0.IAppResponse<Service>>;
1714
1789
  store(team: string, data: {
1715
1790
  name: TranslatableValue;
@@ -1760,8 +1835,9 @@ declare class SitesResource {
1760
1835
  url?: string | null;
1761
1836
  type?: SiteType;
1762
1837
  contactId?: string | null;
1763
- metricsSource?: string | null;
1838
+ metricsSource?: MetricSource | null;
1764
1839
  metricsResource?: string | null;
1840
+ analyticsDomains?: string[];
1765
1841
  monthlyReport?: boolean;
1766
1842
  }): Promise<_$_joai_core0.IAppResponse<Site>>;
1767
1843
  provision(teamSlug: string, brandSlug: string, data?: {
@@ -1773,12 +1849,14 @@ declare class SitesResource {
1773
1849
  customDomain?: string | null;
1774
1850
  enabled?: boolean;
1775
1851
  modules?: string[];
1852
+ settings?: Record<string, unknown>;
1776
1853
  name?: string | null;
1777
1854
  url?: string | null;
1778
1855
  type?: SiteType;
1779
1856
  contactId?: string | null;
1780
- metricsSource?: string | null;
1857
+ metricsSource?: MetricSource | null;
1781
1858
  metricsResource?: string | null;
1859
+ analyticsDomains?: string[];
1782
1860
  monthlyReport?: boolean;
1783
1861
  }): Promise<_$_joai_core0.IAppResponse<Site>>;
1784
1862
  }
@@ -1991,6 +2069,7 @@ declare class ArtifactsResource {
1991
2069
  constructor(http: IHttpService);
1992
2070
  list(params?: ArtifactListParams): Promise<_$_joai_core0.IAppResponse<Artifact[]>>;
1993
2071
  get(id: string): Promise<_$_joai_core0.IAppResponse<Artifact>>;
2072
+ getShared(id: string, password?: string): Promise<_$_joai_core0.IAppResponse<SharedArtifact>>;
1994
2073
  create(payload: ArtifactCreatePayload): Promise<_$_joai_core0.IAppResponse<Artifact>>;
1995
2074
  update(id: string, payload: ArtifactUpdatePayload): Promise<_$_joai_core0.IAppResponse<Artifact>>;
1996
2075
  delete(id: string): Promise<_$_joai_core0.IAppResponse<void>>;
@@ -2114,6 +2193,11 @@ declare class SocialPostsResource {
2114
2193
  constructor(http: IHttpService);
2115
2194
  connections(): Promise<_$_joai_core0.IAppResponse<SocialPostConnection[]>>;
2116
2195
  generateCaption(payload: SocialPostGenerateCaptionPayload): Promise<_$_joai_core0.IAppResponse<SocialPostGeneratedCaption>>;
2196
+ bestTimes(params?: {
2197
+ platform?: SocialPostPlatform;
2198
+ accountId?: string | null;
2199
+ limit?: number;
2200
+ }): Promise<_$_joai_core0.IAppResponse<SocialPostScheduleSlot[]>>;
2117
2201
  list(params?: {
2118
2202
  status?: SocialPostStatus;
2119
2203
  platform?: SocialPostPlatform;
@@ -2159,6 +2243,7 @@ declare class UsersResource {
2159
2243
  updateEmail(email: string): Promise<_$_joai_core0.IAppResponse<UserPrivate>>;
2160
2244
  resendEmailVerification(): Promise<_$_joai_core0.IAppResponse<UserPrivate>>;
2161
2245
  delete(params?: DeleteUserParams): Promise<_$_joai_core0.IAppResponse<void>>;
2246
+ disconnectSocial(provider: string): Promise<_$_joai_core0.IAppResponse<UserPrivate>>;
2162
2247
  getAffiliate(code: string): Promise<_$_joai_core0.IAppResponse<Affiliate>>;
2163
2248
  getAffiliateTiers(): Promise<_$_joai_core0.IAppResponse<AffiliateTier[]>>;
2164
2249
  storeAffiliate(name: string, email: string, application: string): Promise<_$_joai_core0.IAppResponse<void>>;
@@ -2406,6 +2491,7 @@ declare class JoAiClient {
2406
2491
  readonly store: StoreResource;
2407
2492
  readonly media: MediaResource;
2408
2493
  readonly metrics: MetricsResource;
2494
+ readonly analytics: AnalyticsResource;
2409
2495
  readonly meetings: MeetingsResource;
2410
2496
  readonly memories: MemoriesResource;
2411
2497
  readonly messages: MessagesResource;
@@ -2418,6 +2504,7 @@ declare class JoAiClient {
2418
2504
  readonly privateWarps: WarpsResource;
2419
2505
  readonly products: ProductsResource;
2420
2506
  readonly projects: ProjectsResource;
2507
+ readonly proposals: ProposalsResource;
2421
2508
  readonly reminders: RemindersResource;
2422
2509
  readonly rooms: RoomsResource;
2423
2510
  readonly secrets: SecretsResource;
@@ -2514,4 +2601,4 @@ declare class DistributionResource {
2514
2601
  private fetchDistribution;
2515
2602
  }
2516
2603
  //#endregion
2517
- export { AddressesResource, AgentsResource, AlertsResource, ApiTokensResource, AppointmentsResource, type AttachedMedia, type AuthConfirmCodeRequest, type AuthConfirmCodeResponse, type AuthNativeSessionResponse, type AuthPortalSessionResponse, AuthResource, type AuthSendCodeRequest, type AuthUser, AutomationsResource, type BackendWarp, type BackendWarpBrand, BillingResource, BlueprintsResource, type CacheConfig, CachedHttpService, CampaignsResource, CardsResource, type Cart, CartsResource, ChangelogResource, CharactersResource, CheckoutResource, type CheckoutSnapshot, CommerceResource, ContactsResource, ContentResource, ContractsResource, type CreateEmptyGuestCheckoutOptions, type CreateHookPayload, type CreateInboundHookPayload, type CreateInternalHookPayload, type CreateWarpLinkedHookPayload, type CreateWebHookPayload, type DeleteUserParams, DeskResource, DistributionResource, DocumentsResource, ElementsResource, EntitiesResource, FlowsResource, FollowsResource, type FulfillmentLocation, type FulfillmentLocationInput, FulfillmentsResource, GoalsResource, type GuestBuyer, type GuestCartAmounts, type GuestCheckoutCartItem, type GuestCheckoutClient, type GuestCheckoutDraft, GuestCheckoutError, type GuestCheckoutErrorCode, type GuestCheckoutSnapshotResult, type GuestCheckoutState, type GuestCommerceStorage, type GuestCommerceStorageOptions, type GuestCouponClient, GuestCouponError, type GuestCouponErrorCode, type GuestCouponPreview, type GuestOrderAccess, type Hook, type HookSample, type HookTrigger, type HookTriggerCondition, type HookTriggerInput, HooksResource, IngestionsResource, InquiriesResource, InstallsResource, IntegrationsResource, IntentsResource, type ItemListParams, ItemsResource, JoAiClient, type JoAiClientConfig, KvResource, LinksResource, LoyaltyResource, McpResource, type MediaUploadType, MeetingsResource, MemoriesResource, MessagesResource, MetricsResource, MissionsResource, NotificationsResource, OfficeResource, type OpenPortalSessionOptions, type OpeningHoursEntry, type OpeningHoursFormatOptions, type Order, type OrderPriceMode, type OrderStatus, OrdersResource, PersonaResource, type PlaceCheckoutOrderRequest, type PlaceGuestCheckoutOrderResult, type Product, type ProductVariation, ProductsResource, ProjectsResource, type RecentlyViewedStorage, type RecentlyViewedStorageOptions, RemindersResource, ReturnsResource, type RevalidateGuestCouponResult, SegmentsResource, ServicesResource, type ShippingRate, type ShippingRateInput, ShippingResource, type ShippingZoneInput, ShortcutsResource, SitesResource, SkillsResource, SocialPostsResource, StatsResource, StoreResource, SubscriptionsResource, SwarmsResource, TagsResource, TasksResource, type TaxClassInput, TaxClassesResource, type TeamInviteInfo, TeamsResource, UpdatesResource, UpgradesResource, UsersResource, VoiceResource, WalletsResource, WarpsResource, type WebHookTriggerEvent, WorkspaceResource, assertGuestCheckoutReady, assertGuestPickupSlotReady, buildGuestCheckoutSnapshotRequest, buildGuestOrderReturnUrl, completePortalSession, createClient, createEmptyGuestCheckoutState, createGuestCheckoutSnapshot, createGuestCommerceStorage, createRecentlyViewedStorage, formatOpeningHours, formatPickupSlotLabel, getAuthFragmentToken, getRecentlyViewedSlugs, guestCartAmounts, guestCouponMessageFromErrors, isAllowedRedirectUrl, isGuestCheckoutError, isGuestCouponError, isPortalCallbackUrl, openPortalSession, placeGuestCheckoutOrder, readGuestOrderReturnAccess, revalidateGuestCoupon, sanitizePortalCallbackUrl, stripGuestOrderReturnToken, toGuestCheckoutDraft, trackRecentlyViewed, validateGuestCoupon };
2604
+ export { AddressesResource, AgentsResource, AlertsResource, AnalyticsResource, ApiTokensResource, AppointmentsResource, type AttachedMedia, type AuthConfirmCodeRequest, type AuthConfirmCodeResponse, type AuthNativeSessionResponse, type AuthPortalSessionResponse, AuthResource, type AuthSendCodeRequest, type AuthUser, AutomationsResource, type BackendWarp, type BackendWarpBrand, BillingResource, BlueprintsResource, type CacheConfig, CachedHttpService, CampaignsResource, CardsResource, type Cart, CartsResource, ChangelogResource, CharactersResource, CheckoutResource, type CheckoutSnapshot, CommerceResource, ContactsResource, ContentResource, ContractsResource, type CreateEmptyGuestCheckoutOptions, type CreateHookPayload, type CreateInboundHookPayload, type CreateInternalHookPayload, type CreateWarpLinkedHookPayload, type CreateWebHookPayload, type DeleteUserParams, DeskResource, DistributionResource, DocumentsResource, ElementsResource, EntitiesResource, FlowsResource, FollowsResource, type FulfillmentLocation, type FulfillmentLocationInput, FulfillmentsResource, GoalsResource, type GuestBuyer, type GuestCartAmounts, type GuestCheckoutCartItem, type GuestCheckoutClient, type GuestCheckoutDraft, GuestCheckoutError, type GuestCheckoutErrorCode, type GuestCheckoutSnapshotResult, type GuestCheckoutState, type GuestCommerceStorage, type GuestCommerceStorageOptions, type GuestCouponClient, GuestCouponError, type GuestCouponErrorCode, type GuestCouponPreview, type GuestOrderAccess, type Hook, type HookSample, type HookTrigger, type HookTriggerCondition, type HookTriggerInput, HooksResource, IngestionsResource, InquiriesResource, InstallsResource, IntegrationsResource, IntentsResource, type ItemListParams, ItemsResource, JoAiClient, type JoAiClientConfig, KvResource, LinksResource, LoyaltyResource, McpResource, type MediaUploadType, MeetingsResource, MemoriesResource, MessagesResource, MetricsResource, MissionsResource, NotificationsResource, OfficeResource, type OpenPortalSessionOptions, type OpeningHoursEntry, type OpeningHoursFormatOptions, type Order, type OrderPriceMode, type OrderStatus, OrdersResource, PersonaResource, type PlaceCheckoutOrderRequest, type PlaceGuestCheckoutOrderResult, type Product, type ProductCategories, type ProductVariation, type ProductsListParams, ProductsResource, ProjectsResource, ProposalsResource, type RecentlyViewedStorage, type RecentlyViewedStorageOptions, RemindersResource, ReturnsResource, type RevalidateGuestCouponResult, SegmentsResource, type ServicesListParams, ServicesResource, type ShippingRate, type ShippingRateInput, ShippingResource, type ShippingZoneInput, ShortcutsResource, SitesResource, SkillsResource, SocialPostsResource, StatsResource, StoreResource, SubscriptionsResource, SwarmsResource, TagsResource, TasksResource, type TaxClassInput, TaxClassesResource, type TeamInviteInfo, TeamsResource, UpdatesResource, UpgradesResource, UsersResource, VoiceResource, WalletsResource, WarpsResource, type WebHookTriggerEvent, WorkspaceResource, assertGuestCheckoutReady, assertGuestPickupSlotReady, buildGuestCheckoutSnapshotRequest, buildGuestOrderReturnUrl, completePortalSession, createClient, createEmptyGuestCheckoutState, createGuestCheckoutSnapshot, createGuestCommerceStorage, createRecentlyViewedStorage, formatOpeningHours, formatPickupSlotLabel, getAuthFragmentToken, getRecentlyViewedSlugs, guestCartAmounts, guestCouponMessageFromErrors, isAllowedRedirectUrl, isGuestCheckoutError, isGuestCouponError, isPortalCallbackUrl, openPortalSession, placeGuestCheckoutOrder, readGuestOrderReturnAccess, revalidateGuestCoupon, sanitizePortalCallbackUrl, stripGuestOrderReturnToken, toGuestCheckoutDraft, trackRecentlyViewed, validateGuestCoupon };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { HttpService, cartLineTotal, cartPayableTotal, firstValidationMessage, getApiBaseUrl, isCompleteAddressInput, validationMessageFor } from "@joai/core";
1
+ import { HttpService, cartLineTotal, cartPayableTotal, firstValidationMessage, getApiBaseUrl, getCortexBaseUrl, isCompleteAddressInput, validationMessageFor } from "@joai/core";
2
2
  import { WarpClient } from "@joai/warps";
3
3
  //#region src/resources/agents.ts
4
4
  var AgentsResource = class {
@@ -851,6 +851,12 @@ var ElementsResource = class {
851
851
  updateVariation(team, elementId, variationId, payload) {
852
852
  return this.http.put(`teams/${team}/elements/${elementId}/variations/${variationId}`, payload);
853
853
  }
854
+ render(team, elementId, payload) {
855
+ return this.http.post(`teams/${team}/elements/${elementId}/render`, payload);
856
+ }
857
+ renderVariation(team, elementId, variationId, payload) {
858
+ return this.http.post(`teams/${team}/elements/${elementId}/variations/${variationId}/render`, payload);
859
+ }
854
860
  deleteVariation(team, elementId, variationId) {
855
861
  return this.http.delete(`teams/${team}/elements/${elementId}/variations/${variationId}`);
856
862
  }
@@ -1067,10 +1073,12 @@ var AuthResource = class {
1067
1073
  confirmCode(data) {
1068
1074
  return this.http.post("auth/confirm-code", data);
1069
1075
  }
1070
- requestEmail(email, redirect) {
1076
+ /** Requests a magic link. `options.team` is the team slug used to brand the email. */
1077
+ requestEmail(email, redirect, options) {
1071
1078
  return this.http.post("auth/email/request", {
1072
1079
  email,
1073
- redirect
1080
+ redirect,
1081
+ ...options?.team ? { team: options.team } : {}
1074
1082
  });
1075
1083
  }
1076
1084
  loginWithSocialAccessToken(provider, accessToken) {
@@ -1123,6 +1131,10 @@ var BillingResource = class {
1123
1131
  payOrder(id, provider, accessToken) {
1124
1132
  return this.http.post(`orders/${id}/pay`, provider ? { provider } : {}, orderAccessHeaders$1(accessToken));
1125
1133
  }
1134
+ checkout(input) {
1135
+ const { team, ...payload } = input;
1136
+ return this.http.post("billing/checkout", payload, { headers: { "X-Team": team } });
1137
+ }
1126
1138
  deleteOrder(id) {
1127
1139
  return this.http.delete(`orders/${id}`);
1128
1140
  }
@@ -1337,6 +1349,9 @@ var ContactsResource = class {
1337
1349
  delete(id) {
1338
1350
  return this.http.delete(`contacts/${id}`);
1339
1351
  }
1352
+ merge(id, intoId) {
1353
+ return this.http.post(`contacts/${id}/merge`, { intoId });
1354
+ }
1340
1355
  listActivities(id) {
1341
1356
  return this.http.get(`contacts/${id}/activities`);
1342
1357
  }
@@ -1679,6 +1694,21 @@ var IntegrationsResource = class {
1679
1694
  confirmDevicePush(agent, eventIds) {
1680
1695
  return this.http.post("integrations/calendar/" + agent + "/confirm-push", { eventIds });
1681
1696
  }
1697
+ listCalendarFeeds() {
1698
+ return this.http.get("calendar/feeds");
1699
+ }
1700
+ createCalendarFeed(data) {
1701
+ return this.http.post("calendar/feeds", data);
1702
+ }
1703
+ updateCalendarFeed(id, data) {
1704
+ return this.http.patch("calendar/feeds/" + id, data);
1705
+ }
1706
+ deleteCalendarFeed(id) {
1707
+ return this.http.delete("calendar/feeds/" + id);
1708
+ }
1709
+ syncCalendarFeed(id) {
1710
+ return this.http.post("calendar/feeds/" + id + "/sync");
1711
+ }
1682
1712
  setup(type, agent, data) {
1683
1713
  return this.http.post(`integrations/${type}/${agent}/setup`, data ?? {});
1684
1714
  }
@@ -2073,6 +2103,24 @@ var MetricsResource = class {
2073
2103
  }
2074
2104
  };
2075
2105
  //#endregion
2106
+ //#region src/resources/analytics.ts
2107
+ var AnalyticsResource = class {
2108
+ constructor(http, env) {
2109
+ this.http = http;
2110
+ this.env = env;
2111
+ }
2112
+ getConfiguration(siteKey) {
2113
+ return this.http.get(`sites/analytics-config?key=${encodeURIComponent(siteKey)}`);
2114
+ }
2115
+ getScriptSnippet(siteKey) {
2116
+ return `<script async src="${getCortexBaseUrl(this.env)}/analytics/tracker.js" data-site="${siteKey}"><\/script>`;
2117
+ }
2118
+ /** Records a CRM conversion for the caller's authenticated contact only. */
2119
+ recordEvent(siteId, data) {
2120
+ return this.http.post(`sites/${siteId}/analytics/contact-events`, data);
2121
+ }
2122
+ };
2123
+ //#endregion
2076
2124
  //#region src/resources/meetings.ts
2077
2125
  var MeetingsResource = class {
2078
2126
  constructor(http, config) {
@@ -2312,12 +2360,33 @@ var ProductsResource = class {
2312
2360
  const search = new URLSearchParams();
2313
2361
  if (params?.includePrivate) search.set("includePrivate", "1");
2314
2362
  if (params?.team) search.set("team", params.team);
2363
+ if (params?.all) search.set("all", "1");
2364
+ else {
2365
+ if (params?.page) search.set("page", String(params.page));
2366
+ if (params?.perPage) search.set("perPage", String(params.perPage));
2367
+ }
2368
+ if (params?.search) search.set("search", params.search);
2369
+ if (params?.category) search.set("category", params.category);
2315
2370
  if (search.size) url += `?${search.toString()}`;
2316
2371
  return this.http.get(url);
2317
2372
  }
2373
+ listAll(params) {
2374
+ return this.list({
2375
+ ...params,
2376
+ all: true
2377
+ });
2378
+ }
2379
+ categories(params) {
2380
+ let url = "products/categories";
2381
+ if (params?.team) url += `?team=${encodeURIComponent(params.team)}`;
2382
+ return this.http.get(url);
2383
+ }
2318
2384
  get(id) {
2319
2385
  return this.http.get(`products/${id}`);
2320
2386
  }
2387
+ getVariation(id) {
2388
+ return this.http.get(`products/variations/${id}`);
2389
+ }
2321
2390
  create(data, teamSlug) {
2322
2391
  const url = teamSlug ? `products?team=${teamSlug}` : "products";
2323
2392
  return this.http.post(url, data);
@@ -2394,6 +2463,26 @@ var ProjectsResource = class {
2394
2463
  }
2395
2464
  };
2396
2465
  //#endregion
2466
+ //#region src/resources/proposals.ts
2467
+ const access = (password) => password ? { headers: { "X-Proposal-Password": password } } : void 0;
2468
+ var ProposalsResource = class {
2469
+ constructor(http) {
2470
+ this.http = http;
2471
+ }
2472
+ list(team) {
2473
+ return this.http.get("proposals", { headers: { "X-Team": team } });
2474
+ }
2475
+ create(team, data) {
2476
+ return this.http.post("proposals", data, { headers: { "X-Team": team } });
2477
+ }
2478
+ getShared(slug, password) {
2479
+ return this.http.get(`proposals/shared/${encodeURIComponent(slug)}`, access(password));
2480
+ }
2481
+ confirm(slug, password, itemIds) {
2482
+ return this.http.post(`proposals/shared/${encodeURIComponent(slug)}/confirm`, { itemIds }, access(password));
2483
+ }
2484
+ };
2485
+ //#endregion
2397
2486
  //#region src/resources/reminders.ts
2398
2487
  var RemindersResource = class {
2399
2488
  constructor(http) {
@@ -2458,9 +2547,25 @@ var ServicesResource = class {
2458
2547
  }
2459
2548
  list(params) {
2460
2549
  let url = "services";
2461
- if (params?.includePrivate) url += "?includePrivate=1";
2550
+ const search = new URLSearchParams();
2551
+ if (params?.includePrivate) search.set("includePrivate", "1");
2552
+ if (params?.all) search.set("all", "1");
2553
+ else {
2554
+ if (params?.page) search.set("page", String(params.page));
2555
+ if (params?.perPage) search.set("perPage", String(params.perPage));
2556
+ }
2557
+ if (params?.search) search.set("search", params.search);
2558
+ if (params?.tags) search.set("tags", params.tags);
2559
+ if (params?.bookable != null) search.set("bookable", params.bookable ? "1" : "0");
2560
+ if (search.size) url += `?${search.toString()}`;
2462
2561
  return this.http.get(url);
2463
2562
  }
2563
+ listAll(params) {
2564
+ return this.list({
2565
+ ...params,
2566
+ all: true
2567
+ });
2568
+ }
2464
2569
  get(slug) {
2465
2570
  return this.http.get(`services/${slug}`);
2466
2571
  }
@@ -2864,6 +2969,9 @@ var ArtifactsResource = class {
2864
2969
  get(id) {
2865
2970
  return this.http.get(`artifacts/${id}`);
2866
2971
  }
2972
+ getShared(id, password) {
2973
+ return this.http.get(`artifacts/shared/${encodeURIComponent(id)}`, { headers: password ? { "X-Artifact-Password": password } : void 0 });
2974
+ }
2867
2975
  create(payload) {
2868
2976
  return this.http.post("artifacts", payload);
2869
2977
  }
@@ -3096,6 +3204,14 @@ var SocialPostsResource = class {
3096
3204
  generateCaption(payload) {
3097
3205
  return this.http.post("social-posts/generate-caption", payload);
3098
3206
  }
3207
+ bestTimes(params) {
3208
+ const query = new URLSearchParams();
3209
+ if (params?.platform) query.set("platform", params.platform);
3210
+ if (params?.accountId) query.set("accountId", params.accountId);
3211
+ if (params?.limit) query.set("limit", String(params.limit));
3212
+ const qs = query.toString();
3213
+ return this.http.get(`social-posts/best-times${qs ? "?" + qs : ""}`);
3214
+ }
3099
3215
  list(params) {
3100
3216
  const query = new URLSearchParams();
3101
3217
  if (params?.status) query.set("status", params.status);
@@ -3200,6 +3316,9 @@ var UsersResource = class {
3200
3316
  });
3201
3317
  return this.http.delete(`me?${query.toString()}`);
3202
3318
  }
3319
+ disconnectSocial(provider) {
3320
+ return this.http.delete(`me/socials/${provider}`);
3321
+ }
3203
3322
  getAffiliate(code) {
3204
3323
  return this.http.get(`affiliates/${code}`);
3205
3324
  }
@@ -3360,7 +3479,7 @@ var WarpsResource = class {
3360
3479
  return this.http.post(`warps/${identifier}/install`, {});
3361
3480
  }
3362
3481
  sync(tx) {
3363
- return this.http.post("warps/sync", { tx });
3482
+ return this.http.post("warps/sync/alias", { tx });
3364
3483
  }
3365
3484
  listBrands(locale, options) {
3366
3485
  const params = new URLSearchParams();
@@ -3649,6 +3768,7 @@ var JoAiClient = class {
3649
3768
  this.store = new StoreResource(this.http);
3650
3769
  this.media = new MediaResource(this.http);
3651
3770
  this.metrics = new MetricsResource(this.http);
3771
+ this.analytics = new AnalyticsResource(this.http, config.env ?? "mainnet");
3652
3772
  this.meetings = new MeetingsResource(this.http, config);
3653
3773
  this.memories = new MemoriesResource(this.http);
3654
3774
  this.messages = new MessagesResource(this.http);
@@ -3661,6 +3781,7 @@ var JoAiClient = class {
3661
3781
  this.privateWarps = new WarpsResource(this.http);
3662
3782
  this.products = new ProductsResource(this.http);
3663
3783
  this.projects = new ProjectsResource(this.http);
3784
+ this.proposals = new ProposalsResource(this.http);
3664
3785
  this.reminders = new RemindersResource(this.http);
3665
3786
  this.rooms = new RoomsResource(this.http);
3666
3787
  this.secrets = new SecretsResource(this.http);
@@ -3793,4 +3914,4 @@ var DistributionResource = class {
3793
3914
  }
3794
3915
  };
3795
3916
  //#endregion
3796
- export { AddressesResource, AgentsResource, AlertsResource, ApiTokensResource, AppointmentsResource, AuthResource, AutomationsResource, BillingResource, BlueprintsResource, CachedHttpService, CampaignsResource, CardsResource, CartsResource, ChangelogResource, CharactersResource, CheckoutResource, CommerceResource, ContactsResource, ContentResource, ContractsResource, DeskResource, DistributionResource, DocumentsResource, ElementsResource, EntitiesResource, FlowsResource, FollowsResource, FulfillmentsResource, GoalsResource, GuestCheckoutError, GuestCouponError, HooksResource, IngestionsResource, InquiriesResource, InstallsResource, IntegrationsResource, IntentsResource, ItemsResource, JoAiClient, KvResource, LinksResource, LoyaltyResource, McpResource, MeetingsResource, MemoriesResource, MessagesResource, MetricsResource, MissionsResource, NotificationsResource, OfficeResource, OrdersResource, PersonaResource, ProductsResource, ProjectsResource, RemindersResource, ReturnsResource, SegmentsResource, ServicesResource, ShippingResource, ShortcutsResource, SitesResource, SkillsResource, SocialPostsResource, StatsResource, StoreResource, SubscriptionsResource, SwarmsResource, TagsResource, TasksResource, TaxClassesResource, TeamsResource, UpdatesResource, UpgradesResource, UsersResource, VoiceResource, WalletsResource, WarpsResource, WorkspaceResource, assertGuestCheckoutReady, assertGuestPickupSlotReady, buildGuestCheckoutSnapshotRequest, buildGuestOrderReturnUrl, completePortalSession, createClient, createEmptyGuestCheckoutState, createGuestCheckoutSnapshot, createGuestCommerceStorage, createRecentlyViewedStorage, formatOpeningHours, formatPickupSlotLabel, getAuthFragmentToken, getRecentlyViewedSlugs, guestCartAmounts, guestCouponMessageFromErrors, isAllowedRedirectUrl, isGuestCheckoutError, isGuestCouponError, isPortalCallbackUrl, openPortalSession, placeGuestCheckoutOrder, readGuestOrderReturnAccess, revalidateGuestCoupon, sanitizePortalCallbackUrl, stripGuestOrderReturnToken, toGuestCheckoutDraft, trackRecentlyViewed, validateGuestCoupon };
3917
+ export { AddressesResource, AgentsResource, AlertsResource, AnalyticsResource, ApiTokensResource, AppointmentsResource, AuthResource, AutomationsResource, BillingResource, BlueprintsResource, CachedHttpService, CampaignsResource, CardsResource, CartsResource, ChangelogResource, CharactersResource, CheckoutResource, CommerceResource, ContactsResource, ContentResource, ContractsResource, DeskResource, DistributionResource, DocumentsResource, ElementsResource, EntitiesResource, FlowsResource, FollowsResource, FulfillmentsResource, GoalsResource, GuestCheckoutError, GuestCouponError, HooksResource, IngestionsResource, InquiriesResource, InstallsResource, IntegrationsResource, IntentsResource, ItemsResource, JoAiClient, KvResource, LinksResource, LoyaltyResource, McpResource, MeetingsResource, MemoriesResource, MessagesResource, MetricsResource, MissionsResource, NotificationsResource, OfficeResource, OrdersResource, PersonaResource, ProductsResource, ProjectsResource, ProposalsResource, RemindersResource, ReturnsResource, SegmentsResource, ServicesResource, ShippingResource, ShortcutsResource, SitesResource, SkillsResource, SocialPostsResource, StatsResource, StoreResource, SubscriptionsResource, SwarmsResource, TagsResource, TasksResource, TaxClassesResource, TeamsResource, UpdatesResource, UpgradesResource, UsersResource, VoiceResource, WalletsResource, WarpsResource, WorkspaceResource, assertGuestCheckoutReady, assertGuestPickupSlotReady, buildGuestCheckoutSnapshotRequest, buildGuestOrderReturnUrl, completePortalSession, createClient, createEmptyGuestCheckoutState, createGuestCheckoutSnapshot, createGuestCommerceStorage, createRecentlyViewedStorage, formatOpeningHours, formatPickupSlotLabel, getAuthFragmentToken, getRecentlyViewedSlugs, guestCartAmounts, guestCouponMessageFromErrors, isAllowedRedirectUrl, isGuestCheckoutError, isGuestCouponError, isPortalCallbackUrl, openPortalSession, placeGuestCheckoutOrder, readGuestOrderReturnAccess, revalidateGuestCoupon, sanitizePortalCallbackUrl, stripGuestOrderReturnToken, toGuestCheckoutDraft, trackRecentlyViewed, validateGuestCoupon };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/sdk",
3
- "version": "12.0.4",
3
+ "version": "12.1.1",
4
4
  "description": "JoAi public API SDK — build with your AI agents",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,11 +35,11 @@
35
35
  "test": "jest --config jest.config.js"
36
36
  },
37
37
  "dependencies": {
38
- "@joai/core": "^5.3.4",
38
+ "@joai/core": "^5.3.6",
39
39
  "@joai/warps": "*"
40
40
  },
41
41
  "peerDependencies": {
42
- "@joai/core": "^5.3.4"
42
+ "@joai/core": "^5.3.6"
43
43
  },
44
44
  "devDependencies": {
45
45
  "tsdown": "^0.21.0",