@joai/sdk 13.0.0 → 13.1.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 +128 -106
- package/dist/index.mjs +35 -8
- package/package.json +3 -3
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, 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, HashidInput, 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, ProposalPricing, 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";
|
|
2
|
+
import { Address, AddressCreatePayload, AddressInput, AddressInput as AddressInput$1, AddressType, AddressUpdatePayload, Affiliate, AffiliateTier, Agent, AgentActionHistoryEntry, AgentPrivate, AgentSettings, AgentTrustedActionRule, AiCostsResponse, Alert, AnalyticsConfiguration, ApiToken, AppEnv, AppEnv as AppEnv$1, AppIngestion, AppendKvEntryResult, AppointmentAvailability, AppointmentAvailabilitySlot, 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, CartItem, CartLine, ChangelogEntry, Character, CheckoutSnapshot, CheckoutSnapshot as CheckoutSnapshot$1, CheckoutSnapshotRequest, CheckoutSnapshotRequest as CheckoutSnapshotRequest$1, 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, HashidInput, HashidInput as HashidInput$1, Hook, Hook as Hook$1, HookSample, HookSample as HookSample$1, HookTrigger, HookTriggerCondition, HookTriggerInput, IAppResponse, IAppResponse as IAppResponse$1, 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, ProductDetailSection as ProductDetailSection$1, ProductDetailText, ProductRelation, ProductRelationType, ProductVariation, ProgramSettings, Project, ProjectExportResponse, ProjectInputAssistIntent, ProjectInputAssistResponse, ProjectMutation, ProjectOutputPreset, ProjectOutputType, ProjectStudioHistoryEntry, Proposal, ProposalAction, ProposalCreateInput, ProposalPollOption, ProposalPricing, 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, TranslatableValue as TranslatableValue$1, 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
|
|
@@ -60,15 +60,15 @@ type AddressQuery = {
|
|
|
60
60
|
declare class AddressesResource {
|
|
61
61
|
private readonly http;
|
|
62
62
|
constructor(http: IHttpService);
|
|
63
|
-
list(params?: AddressQuery): Promise<IAppResponse<Address[]>>;
|
|
64
|
-
get(params?: Omit<AddressQuery, 'type'>): Promise<IAppResponse<Address | null>>;
|
|
65
|
-
create(data: AddressCreatePayload): Promise<IAppResponse<Address>>;
|
|
66
|
-
update(id: string, data: AddressUpdatePayload): Promise<IAppResponse<Address>>;
|
|
67
|
-
delete(id: string): Promise<IAppResponse<void>>;
|
|
63
|
+
list(params?: AddressQuery): Promise<IAppResponse$1<Address[]>>;
|
|
64
|
+
get(params?: Omit<AddressQuery, 'type'>): Promise<IAppResponse$1<Address | null>>;
|
|
65
|
+
create(data: AddressCreatePayload): Promise<IAppResponse$1<Address>>;
|
|
66
|
+
update(id: string, data: AddressUpdatePayload): Promise<IAppResponse$1<Address>>;
|
|
67
|
+
delete(id: string): Promise<IAppResponse$1<void>>;
|
|
68
68
|
}
|
|
69
69
|
//#endregion
|
|
70
70
|
//#region src/commerce/checkout.d.ts
|
|
71
|
-
type PlaceCheckoutOrderRequest = CheckoutSnapshotRequest & {
|
|
71
|
+
type PlaceCheckoutOrderRequest = CheckoutSnapshotRequest$1 & {
|
|
72
72
|
guest?: GuestBuyer;
|
|
73
73
|
notes?: string;
|
|
74
74
|
scheduledAt?: string;
|
|
@@ -92,7 +92,7 @@ declare class CheckoutResource {
|
|
|
92
92
|
discount: number;
|
|
93
93
|
eligibleSubtotal: number;
|
|
94
94
|
}>>;
|
|
95
|
-
snapshot(team: string, data: CheckoutSnapshotRequest): Promise<_$_joai_core0.IAppResponse<_$_joai_core0.CheckoutSnapshot>>;
|
|
95
|
+
snapshot(team: string, data: CheckoutSnapshotRequest$1): Promise<_$_joai_core0.IAppResponse<_$_joai_core0.CheckoutSnapshot>>;
|
|
96
96
|
placeOrder(team: string, data: PlaceCheckoutOrderRequest): Promise<_$_joai_core0.IAppResponse<Order$1>>;
|
|
97
97
|
locations(team: string): Promise<_$_joai_core0.IAppResponse<FulfillmentLocation$1[]>>;
|
|
98
98
|
shippingRates(team: string, data: {
|
|
@@ -187,11 +187,11 @@ declare class ShippingResource {
|
|
|
187
187
|
constructor(http: IHttpService);
|
|
188
188
|
zones(team: string): Promise<_$_joai_core0.IAppResponse<ShippingZone[]>>;
|
|
189
189
|
createZone(team: string, data: ShippingZoneInput): Promise<_$_joai_core0.IAppResponse<ShippingZone>>;
|
|
190
|
-
updateZone(team: string, zoneId: HashidInput, data: ShippingZoneInput): Promise<_$_joai_core0.IAppResponse<ShippingZone>>;
|
|
191
|
-
deleteZone(team: string, zoneId: HashidInput): Promise<_$_joai_core0.IAppResponse<void>>;
|
|
192
|
-
createRate(team: string, zoneId: HashidInput, data: ShippingRateInput): Promise<_$_joai_core0.IAppResponse<ShippingRate$1>>;
|
|
193
|
-
updateRate(team: string, zoneId: HashidInput, rateId: HashidInput, data: ShippingRateInput): Promise<_$_joai_core0.IAppResponse<ShippingRate$1>>;
|
|
194
|
-
deleteRate(team: string, zoneId: HashidInput, rateId: HashidInput): Promise<_$_joai_core0.IAppResponse<void>>;
|
|
190
|
+
updateZone(team: string, zoneId: HashidInput$1, data: ShippingZoneInput): Promise<_$_joai_core0.IAppResponse<ShippingZone>>;
|
|
191
|
+
deleteZone(team: string, zoneId: HashidInput$1): Promise<_$_joai_core0.IAppResponse<void>>;
|
|
192
|
+
createRate(team: string, zoneId: HashidInput$1, data: ShippingRateInput): Promise<_$_joai_core0.IAppResponse<ShippingRate$1>>;
|
|
193
|
+
updateRate(team: string, zoneId: HashidInput$1, rateId: HashidInput$1, data: ShippingRateInput): Promise<_$_joai_core0.IAppResponse<ShippingRate$1>>;
|
|
194
|
+
deleteRate(team: string, zoneId: HashidInput$1, rateId: HashidInput$1): Promise<_$_joai_core0.IAppResponse<void>>;
|
|
195
195
|
locations(team: string): Promise<_$_joai_core0.IAppResponse<FulfillmentLocation$1[]>>;
|
|
196
196
|
createLocation(team: string, data: FulfillmentLocationInput): Promise<_$_joai_core0.IAppResponse<FulfillmentLocation$1>>;
|
|
197
197
|
updateLocation(team: string, locationId: string, data: FulfillmentLocationInput): Promise<_$_joai_core0.IAppResponse<FulfillmentLocation$1>>;
|
|
@@ -222,7 +222,7 @@ type GuestOrderAccess = {
|
|
|
222
222
|
type GuestCheckoutDraft<TCart = unknown> = {
|
|
223
223
|
cart: TCart;
|
|
224
224
|
fulfillmentMethod: FulfillmentMethod;
|
|
225
|
-
shippingRateId: HashidInput | null;
|
|
225
|
+
shippingRateId: HashidInput$1 | null;
|
|
226
226
|
fulfillmentLocationId: string | null;
|
|
227
227
|
couponCode?: string | null; /** Pickup appointment start (ISO-8601), required for pickup confirm. */
|
|
228
228
|
scheduledAt?: string | null; /** Bookable service slug when the shop has more than one. */
|
|
@@ -276,7 +276,7 @@ type GuestCheckoutCartItem = {
|
|
|
276
276
|
};
|
|
277
277
|
type GuestCheckoutState<TCart = GuestCheckoutCartItem[]> = GuestCheckoutDraft<TCart> & {
|
|
278
278
|
identity: GuestBuyer$1;
|
|
279
|
-
address: AddressInput;
|
|
279
|
+
address: AddressInput$1;
|
|
280
280
|
};
|
|
281
281
|
type GuestCheckoutErrorCode = 'empty_cart' | 'missing_identity' | 'missing_pickup_phone' | 'missing_scheduled_at' | 'incomplete_shipping_address' | 'pickup_unavailable' | 'missing_shipping_rate' | 'rates_failed' | 'snapshot_failed' | 'review_required' | 'terms_required' | 'review_expired' | 'order_failed' | 'payment_failed';
|
|
282
282
|
declare class GuestCheckoutError extends Error {
|
|
@@ -292,8 +292,8 @@ type GuestCheckoutClient = {
|
|
|
292
292
|
zipCode?: string;
|
|
293
293
|
};
|
|
294
294
|
items: GuestCheckoutCartItem[];
|
|
295
|
-
}): Promise<IAppResponse<ShippingRate$1[]>>;
|
|
296
|
-
snapshot(team: string, data: CheckoutSnapshotRequest): Promise<IAppResponse<CheckoutSnapshot$1>>;
|
|
295
|
+
}): Promise<IAppResponse$1<ShippingRate$1[]>>;
|
|
296
|
+
snapshot(team: string, data: CheckoutSnapshotRequest$1): Promise<IAppResponse$1<CheckoutSnapshot$1>>;
|
|
297
297
|
};
|
|
298
298
|
};
|
|
299
299
|
orders: {
|
|
@@ -307,8 +307,8 @@ type GuestCheckoutClient = {
|
|
|
307
307
|
scheduledAt?: string;
|
|
308
308
|
serviceSlug?: string;
|
|
309
309
|
sendConfirmation?: boolean;
|
|
310
|
-
}): Promise<IAppResponse<Order$1>>;
|
|
311
|
-
pay(id: string, provider?: PaymentProvider, accessToken?: string): Promise<IAppResponse<{
|
|
310
|
+
}): Promise<IAppResponse$1<Order$1>>;
|
|
311
|
+
pay(id: string, provider?: PaymentProvider, accessToken?: string): Promise<IAppResponse$1<{
|
|
312
312
|
url: string;
|
|
313
313
|
}>>;
|
|
314
314
|
};
|
|
@@ -324,7 +324,7 @@ declare const assertGuestPickupSlotReady: (state: GuestCheckoutState) => void;
|
|
|
324
324
|
declare const buildGuestCheckoutSnapshotRequest: (state: GuestCheckoutState, options?: {
|
|
325
325
|
shippingRates?: ShippingRate$1[];
|
|
326
326
|
pickupLocationIds?: string[];
|
|
327
|
-
}) => CheckoutSnapshotRequest;
|
|
327
|
+
}) => CheckoutSnapshotRequest$1;
|
|
328
328
|
type GuestCheckoutSnapshotResult = {
|
|
329
329
|
snapshot: CheckoutSnapshot$1 & {
|
|
330
330
|
accessToken: string;
|
|
@@ -392,7 +392,7 @@ type GuestCouponClient = {
|
|
|
392
392
|
validateCoupon(team: string, data: {
|
|
393
393
|
couponCode: string;
|
|
394
394
|
items: GuestCheckoutCartItem[];
|
|
395
|
-
}): Promise<IAppResponse<GuestCouponPreview>>;
|
|
395
|
+
}): Promise<IAppResponse$1<GuestCouponPreview>>;
|
|
396
396
|
};
|
|
397
397
|
};
|
|
398
398
|
};
|
|
@@ -608,39 +608,43 @@ type OpeningHoursFormatOptions = {
|
|
|
608
608
|
timeRangeSeparator?: string;
|
|
609
609
|
};
|
|
610
610
|
declare const formatOpeningHours: (availability: OpeningHoursAvailability, options?: OpeningHoursFormatOptions) => OpeningHoursEntry[];
|
|
611
|
+
type AppointmentAvailabilityParams = {
|
|
612
|
+
windowStart: string;
|
|
613
|
+
windowEnd: string;
|
|
614
|
+
durationMinutes: number;
|
|
615
|
+
timezone?: string;
|
|
616
|
+
limit?: number;
|
|
617
|
+
serviceSlug?: string;
|
|
618
|
+
quantity?: number;
|
|
619
|
+
};
|
|
620
|
+
type AppointmentBookData = {
|
|
621
|
+
title: string;
|
|
622
|
+
scheduledAt: string;
|
|
623
|
+
description?: string;
|
|
624
|
+
conferenceProvider?: string;
|
|
625
|
+
timezone?: string;
|
|
626
|
+
attendeeEmail?: string;
|
|
627
|
+
attendeeName?: string;
|
|
628
|
+
contactIds?: string[];
|
|
629
|
+
attendees?: {
|
|
630
|
+
email: string;
|
|
631
|
+
name?: string;
|
|
632
|
+
}[];
|
|
633
|
+
serviceSlug?: string;
|
|
634
|
+
appointmentRequestId?: string;
|
|
635
|
+
configuration?: Configuration;
|
|
636
|
+
quantity?: number;
|
|
637
|
+
};
|
|
611
638
|
declare class AppointmentsResource {
|
|
612
639
|
private readonly http;
|
|
613
640
|
private readonly config;
|
|
614
641
|
constructor(http: IHttpService, config: JoAiClientConfig);
|
|
615
642
|
getPolicy(): Promise<_$_joai_core0.IAppResponse<AppointmentPolicy | null>>;
|
|
616
643
|
upsertPolicy(data: AppointmentPolicyUpsert): Promise<_$_joai_core0.IAppResponse<AppointmentPolicy>>;
|
|
617
|
-
checkAvailability(agentUuid: string, params:
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
timezone?: string;
|
|
622
|
-
limit?: number;
|
|
623
|
-
serviceSlug?: string;
|
|
624
|
-
quantity?: number;
|
|
625
|
-
}): Promise<_$_joai_core0.IAppResponse<AppointmentAvailability>>;
|
|
626
|
-
book(agentUuid: string, data: {
|
|
627
|
-
title: string;
|
|
628
|
-
scheduledAt: string;
|
|
629
|
-
description?: string;
|
|
630
|
-
conferenceProvider?: string;
|
|
631
|
-
timezone?: string;
|
|
632
|
-
attendeeEmail?: string;
|
|
633
|
-
attendeeName?: string;
|
|
634
|
-
contactIds?: string[];
|
|
635
|
-
attendees?: {
|
|
636
|
-
email: string;
|
|
637
|
-
name?: string;
|
|
638
|
-
}[];
|
|
639
|
-
serviceSlug?: string;
|
|
640
|
-
appointmentRequestId?: string;
|
|
641
|
-
configuration?: Configuration;
|
|
642
|
-
quantity?: number;
|
|
643
|
-
}): Promise<_$_joai_core0.IAppResponse<AppointmentBooking>>;
|
|
644
|
+
checkAvailability(agentUuid: string, params: AppointmentAvailabilityParams): Promise<_$_joai_core0.IAppResponse<AppointmentAvailability>>;
|
|
645
|
+
checkStaffAvailability(agentUuid: string, params: AppointmentAvailabilityParams): Promise<_$_joai_core0.IAppResponse<AppointmentAvailability>>;
|
|
646
|
+
book(agentUuid: string, data: AppointmentBookData): Promise<_$_joai_core0.IAppResponse<AppointmentBooking>>;
|
|
647
|
+
bookAsStaff(agentUuid: string, data: AppointmentBookData): Promise<_$_joai_core0.IAppResponse<AppointmentBooking>>;
|
|
644
648
|
reschedule(agentUuid: string, meetingId: string, data: {
|
|
645
649
|
scheduledAt: string;
|
|
646
650
|
timezone?: string;
|
|
@@ -733,19 +737,19 @@ type AuthPortalSessionResponse = {
|
|
|
733
737
|
declare class AuthResource {
|
|
734
738
|
private http;
|
|
735
739
|
constructor(http: IHttpService);
|
|
736
|
-
sendCode(data: AuthSendCodeRequest): Promise<IAppResponse<void>>;
|
|
737
|
-
confirmCode(data: AuthConfirmCodeRequest): Promise<IAppResponse<AuthConfirmCodeResponse>>;
|
|
740
|
+
sendCode(data: AuthSendCodeRequest): Promise<IAppResponse$1<void>>;
|
|
741
|
+
confirmCode(data: AuthConfirmCodeRequest): Promise<IAppResponse$1<AuthConfirmCodeResponse>>;
|
|
738
742
|
/** Requests a magic link. `options.team` is the team slug used to brand the email. */
|
|
739
743
|
requestEmail(email: string, redirect?: string, options?: {
|
|
740
744
|
team?: string;
|
|
741
|
-
}): Promise<IAppResponse<AuthLoginResponse>>;
|
|
742
|
-
loginWithSocialAccessToken(provider: NativeSocialAuthProvider, accessToken: string): Promise<IAppResponse<AuthLoginResponse>>;
|
|
743
|
-
exchangeNativeSession(token: string): Promise<IAppResponse<AuthNativeSessionResponse>>;
|
|
744
|
-
me(): Promise<IAppResponse<AuthUser$1>>;
|
|
745
|
-
logout(): Promise<IAppResponse<void>>;
|
|
746
|
-
createApiToken(): Promise<IAppResponse<AuthApiTokenResponse>>;
|
|
747
|
-
createPortalSession(redirect: string): Promise<IAppResponse<AuthPortalSessionResponse>>;
|
|
748
|
-
verifyWallet(accessToken: string, withMobileApiToken?: boolean): Promise<IAppResponse<UserPrivate>>;
|
|
745
|
+
}): Promise<IAppResponse$1<AuthLoginResponse>>;
|
|
746
|
+
loginWithSocialAccessToken(provider: NativeSocialAuthProvider, accessToken: string): Promise<IAppResponse$1<AuthLoginResponse>>;
|
|
747
|
+
exchangeNativeSession(token: string): Promise<IAppResponse$1<AuthNativeSessionResponse>>;
|
|
748
|
+
me(): Promise<IAppResponse$1<AuthUser$1>>;
|
|
749
|
+
logout(): Promise<IAppResponse$1<void>>;
|
|
750
|
+
createApiToken(): Promise<IAppResponse$1<AuthApiTokenResponse>>;
|
|
751
|
+
createPortalSession(redirect: string): Promise<IAppResponse$1<AuthPortalSessionResponse>>;
|
|
752
|
+
verifyWallet(accessToken: string, withMobileApiToken?: boolean): Promise<IAppResponse$1<UserPrivate>>;
|
|
749
753
|
}
|
|
750
754
|
//#endregion
|
|
751
755
|
//#region src/resources/billing.d.ts
|
|
@@ -850,7 +854,7 @@ declare class CartsResource {
|
|
|
850
854
|
//#region src/resources/coupons.d.ts
|
|
851
855
|
type CouponPayload = {
|
|
852
856
|
code: string;
|
|
853
|
-
name?: TranslatableValue;
|
|
857
|
+
name?: TranslatableValue$1;
|
|
854
858
|
percent?: number | null;
|
|
855
859
|
amount?: number | null;
|
|
856
860
|
price?: number | null;
|
|
@@ -1402,7 +1406,7 @@ declare class MetricsResource {
|
|
|
1402
1406
|
declare class AnalyticsResource {
|
|
1403
1407
|
private readonly http;
|
|
1404
1408
|
private readonly env;
|
|
1405
|
-
constructor(http: IHttpService, env: AppEnv);
|
|
1409
|
+
constructor(http: IHttpService, env: AppEnv$1);
|
|
1406
1410
|
getConfiguration(siteKey: string): Promise<_$_joai_core0.IAppResponse<AnalyticsConfiguration>>;
|
|
1407
1411
|
getScriptSnippet(siteKey: string): string;
|
|
1408
1412
|
/** Records a CRM conversion for the caller's authenticated contact only. */
|
|
@@ -1551,9 +1555,9 @@ declare class OrdersResource {
|
|
|
1551
1555
|
snapshotAccessToken?: string;
|
|
1552
1556
|
billingAddressId?: string;
|
|
1553
1557
|
shippingAddressId?: string;
|
|
1554
|
-
billingAddress?: AddressInput;
|
|
1555
|
-
shippingAddress?: AddressInput;
|
|
1556
|
-
shippingRateId?: HashidInput;
|
|
1558
|
+
billingAddress?: AddressInput$1;
|
|
1559
|
+
shippingAddress?: AddressInput$1;
|
|
1560
|
+
shippingRateId?: HashidInput$1;
|
|
1557
1561
|
fulfillmentLocationId?: string;
|
|
1558
1562
|
idempotencyKey?: string;
|
|
1559
1563
|
guest?: {
|
|
@@ -1603,6 +1607,7 @@ declare class PersonaResource {
|
|
|
1603
1607
|
}
|
|
1604
1608
|
//#endregion
|
|
1605
1609
|
//#region src/resources/products.d.ts
|
|
1610
|
+
type ProductsSort = 'featured' | 'price_asc' | 'price_desc' | 'name';
|
|
1606
1611
|
type ProductsListParams = {
|
|
1607
1612
|
includePrivate?: boolean;
|
|
1608
1613
|
team?: string;
|
|
@@ -1610,43 +1615,60 @@ type ProductsListParams = {
|
|
|
1610
1615
|
perPage?: number;
|
|
1611
1616
|
search?: string;
|
|
1612
1617
|
category?: string;
|
|
1618
|
+
labels?: string[];
|
|
1619
|
+
minPrice?: number;
|
|
1620
|
+
maxPrice?: number;
|
|
1621
|
+
available?: boolean;
|
|
1622
|
+
sort?: ProductsSort;
|
|
1623
|
+
locale?: string;
|
|
1613
1624
|
all?: boolean;
|
|
1614
1625
|
};
|
|
1615
1626
|
type ProductCategories = {
|
|
1616
1627
|
categories: string[];
|
|
1617
1628
|
hasUntagged: boolean;
|
|
1618
1629
|
};
|
|
1630
|
+
type ProductFacets = {
|
|
1631
|
+
categories: string[];
|
|
1632
|
+
tags: string[];
|
|
1633
|
+
priceMin: number | null;
|
|
1634
|
+
priceMax: number | null;
|
|
1635
|
+
total: number;
|
|
1636
|
+
};
|
|
1619
1637
|
declare class ProductsResource {
|
|
1620
1638
|
private readonly http;
|
|
1621
1639
|
constructor(http: IHttpService);
|
|
1622
1640
|
list(params?: ProductsListParams): Promise<_$_joai_core0.IAppResponse<Product[]>>;
|
|
1623
1641
|
listAll(params?: Omit<ProductsListParams, 'page' | 'perPage' | 'all'>): Promise<_$_joai_core0.IAppResponse<Product[]>>;
|
|
1642
|
+
facets(params?: {
|
|
1643
|
+
team?: string;
|
|
1644
|
+
}): Promise<_$_joai_core0.IAppResponse<ProductFacets>>;
|
|
1645
|
+
private query;
|
|
1624
1646
|
categories(params?: {
|
|
1625
1647
|
team?: string;
|
|
1626
1648
|
}): Promise<_$_joai_core0.IAppResponse<ProductCategories>>;
|
|
1627
1649
|
get(id: string): Promise<_$_joai_core0.IAppResponse<Product>>;
|
|
1628
1650
|
getVariation(id: string): Promise<_$_joai_core0.IAppResponse<ProductVariation>>;
|
|
1629
1651
|
create(data: {
|
|
1630
|
-
name: TranslatableValue;
|
|
1652
|
+
name: TranslatableValue$1;
|
|
1631
1653
|
price?: number;
|
|
1632
|
-
unit?: TranslatableValue;
|
|
1654
|
+
unit?: TranslatableValue$1;
|
|
1633
1655
|
tags?: string[];
|
|
1634
|
-
description?: TranslatableValue | null;
|
|
1656
|
+
description?: TranslatableValue$1 | null;
|
|
1635
1657
|
virtual?: boolean;
|
|
1636
1658
|
public?: boolean;
|
|
1637
1659
|
taxClassId?: string | null;
|
|
1638
1660
|
meta?: {
|
|
1639
|
-
details?: ProductDetailSection[];
|
|
1661
|
+
details?: ProductDetailSection$1[];
|
|
1640
1662
|
};
|
|
1641
1663
|
}, teamSlug?: string): Promise<_$_joai_core0.IAppResponse<Product>>;
|
|
1642
1664
|
update(id: string, data: {
|
|
1643
|
-
name?: TranslatableValue;
|
|
1644
|
-
unit?: TranslatableValue | null;
|
|
1665
|
+
name?: TranslatableValue$1;
|
|
1666
|
+
unit?: TranslatableValue$1 | null;
|
|
1645
1667
|
tags?: string[] | null;
|
|
1646
|
-
description?: TranslatableValue | null;
|
|
1668
|
+
description?: TranslatableValue$1 | null;
|
|
1647
1669
|
settings?: Record<string, unknown> | null;
|
|
1648
1670
|
meta?: {
|
|
1649
|
-
details?: ProductDetailSection[];
|
|
1671
|
+
details?: ProductDetailSection$1[];
|
|
1650
1672
|
};
|
|
1651
1673
|
active?: boolean;
|
|
1652
1674
|
public?: boolean;
|
|
@@ -1656,13 +1678,13 @@ declare class ProductsResource {
|
|
|
1656
1678
|
}): Promise<_$_joai_core0.IAppResponse<Product>>;
|
|
1657
1679
|
delete(id: string): Promise<_$_joai_core0.IAppResponse<void>>;
|
|
1658
1680
|
createVariation(productSlug: string, data: {
|
|
1659
|
-
name: TranslatableValue;
|
|
1681
|
+
name: TranslatableValue$1;
|
|
1660
1682
|
sku: string;
|
|
1661
1683
|
price: number;
|
|
1662
1684
|
type?: string;
|
|
1663
1685
|
}): Promise<_$_joai_core0.IAppResponse<ProductVariation>>;
|
|
1664
1686
|
updateVariation(variationId: string, data: {
|
|
1665
|
-
name?: TranslatableValue;
|
|
1687
|
+
name?: TranslatableValue$1;
|
|
1666
1688
|
price?: number;
|
|
1667
1689
|
active?: boolean;
|
|
1668
1690
|
hidden?: boolean;
|
|
@@ -1788,10 +1810,10 @@ declare class ServicesResource {
|
|
|
1788
1810
|
listAll(params?: Omit<ServicesListParams, 'page' | 'perPage' | 'all'>): Promise<_$_joai_core0.IAppResponse<Service[]>>;
|
|
1789
1811
|
get(slug: string): Promise<_$_joai_core0.IAppResponse<Service>>;
|
|
1790
1812
|
store(team: string, data: {
|
|
1791
|
-
name: TranslatableValue;
|
|
1813
|
+
name: TranslatableValue$1;
|
|
1792
1814
|
price: number;
|
|
1793
1815
|
durationMinutes: number | null;
|
|
1794
|
-
description?: TranslatableValue | null;
|
|
1816
|
+
description?: TranslatableValue$1 | null;
|
|
1795
1817
|
digital?: boolean;
|
|
1796
1818
|
public?: boolean;
|
|
1797
1819
|
bookable?: boolean;
|
|
@@ -1846,7 +1868,7 @@ declare class SitesResource {
|
|
|
1846
1868
|
}): Promise<_$_joai_core0.IAppResponse<Site>>;
|
|
1847
1869
|
resolve(teamSlug: string, brandSlug?: string): Promise<_$_joai_core0.IAppResponse<Site>>;
|
|
1848
1870
|
resolveByDomain(domain: string): Promise<_$_joai_core0.IAppResponse<Site>>;
|
|
1849
|
-
update(siteId: HashidInput, data: {
|
|
1871
|
+
update(siteId: HashidInput$1, data: {
|
|
1850
1872
|
customDomain?: string | null;
|
|
1851
1873
|
enabled?: boolean;
|
|
1852
1874
|
modules?: string[];
|
|
@@ -1940,7 +1962,7 @@ declare class SubscriptionsResource {
|
|
|
1940
1962
|
updateDelivery(id: string, data: {
|
|
1941
1963
|
fulfillmentMethod: 'shipping' | 'pickup';
|
|
1942
1964
|
shippingAddressId?: string | null;
|
|
1943
|
-
shippingRateId?: HashidInput | null;
|
|
1965
|
+
shippingRateId?: HashidInput$1 | null;
|
|
1944
1966
|
fulfillmentLocationId?: string | null;
|
|
1945
1967
|
}): Promise<_$_joai_core0.IAppResponse<Subscription>>;
|
|
1946
1968
|
skip(id: string): Promise<_$_joai_core0.IAppResponse<Subscription>>;
|
|
@@ -1994,8 +2016,8 @@ type TeamInviteInfo = {
|
|
|
1994
2016
|
type TeamMutationPayload = {
|
|
1995
2017
|
name?: string;
|
|
1996
2018
|
slug?: string;
|
|
1997
|
-
description?: TranslatableValue | null;
|
|
1998
|
-
tagline?: TranslatableValue | null;
|
|
2019
|
+
description?: TranslatableValue$1 | null;
|
|
2020
|
+
tagline?: TranslatableValue$1 | null;
|
|
1999
2021
|
category?: TeamCategory;
|
|
2000
2022
|
public?: boolean;
|
|
2001
2023
|
tags?: string[];
|
|
@@ -2026,8 +2048,8 @@ declare class TeamsResource {
|
|
|
2026
2048
|
}): Promise<_$_joai_core0.IAppResponse<TeamPrivate>>;
|
|
2027
2049
|
delete(teamSlug: string): Promise<_$_joai_core0.IAppResponse<void>>;
|
|
2028
2050
|
update(teamSlug: string, data: TeamMutationPayload): Promise<_$_joai_core0.IAppResponse<TeamPrivate>>;
|
|
2029
|
-
updateDescription(teamSlug: string, description: TranslatableValue | null): Promise<_$_joai_core0.IAppResponse<TeamPrivate>>;
|
|
2030
|
-
updateTagline(teamSlug: string, tagline: TranslatableValue | null): Promise<_$_joai_core0.IAppResponse<TeamPrivate>>;
|
|
2051
|
+
updateDescription(teamSlug: string, description: TranslatableValue$1 | null): Promise<_$_joai_core0.IAppResponse<TeamPrivate>>;
|
|
2052
|
+
updateTagline(teamSlug: string, tagline: TranslatableValue$1 | null): Promise<_$_joai_core0.IAppResponse<TeamPrivate>>;
|
|
2031
2053
|
invite(teamSlug: string, payload: {
|
|
2032
2054
|
email: string;
|
|
2033
2055
|
role: UserRole;
|
|
@@ -2259,7 +2281,7 @@ type TranscriptionResponse = {
|
|
|
2259
2281
|
declare class VoiceResource {
|
|
2260
2282
|
private readonly http;
|
|
2261
2283
|
constructor(http: IHttpService);
|
|
2262
|
-
transcribe(teamSlug: string, audio: File, language?: string | null, prompt?: string | null): Promise<IAppResponse<TranscriptionResponse>>;
|
|
2284
|
+
transcribe(teamSlug: string, audio: File, language?: string | null, prompt?: string | null): Promise<IAppResponse$1<TranscriptionResponse>>;
|
|
2263
2285
|
}
|
|
2264
2286
|
//#endregion
|
|
2265
2287
|
//#region src/resources/wallets.d.ts
|
|
@@ -2335,8 +2357,8 @@ declare class WarpsResource {
|
|
|
2335
2357
|
create(data: {
|
|
2336
2358
|
brand?: string | null;
|
|
2337
2359
|
definition: WarpDefinition;
|
|
2338
|
-
title?: TranslatableValue;
|
|
2339
|
-
description?: TranslatableValue | null;
|
|
2360
|
+
title?: TranslatableValue$1;
|
|
2361
|
+
description?: TranslatableValue$1 | null;
|
|
2340
2362
|
extras?: Record<string, any> | null;
|
|
2341
2363
|
public?: boolean;
|
|
2342
2364
|
form?: boolean;
|
|
@@ -2346,8 +2368,8 @@ declare class WarpsResource {
|
|
|
2346
2368
|
}): Promise<_$_joai_core0.IAppResponse<BackendWarpCreateResponse>>;
|
|
2347
2369
|
update(identifier: string, data: {
|
|
2348
2370
|
name?: string;
|
|
2349
|
-
title?: TranslatableValue;
|
|
2350
|
-
description?: TranslatableValue | null;
|
|
2371
|
+
title?: TranslatableValue$1;
|
|
2372
|
+
description?: TranslatableValue$1 | null;
|
|
2351
2373
|
definition?: WarpDefinition;
|
|
2352
2374
|
extras?: Record<string, any> | null;
|
|
2353
2375
|
form?: boolean;
|
|
@@ -2444,7 +2466,7 @@ interface CacheConfig {
|
|
|
2444
2466
|
interface JoAiClientConfig {
|
|
2445
2467
|
apiToken?: string;
|
|
2446
2468
|
team?: string;
|
|
2447
|
-
env?: AppEnv;
|
|
2469
|
+
env?: AppEnv$1;
|
|
2448
2470
|
locale?: string;
|
|
2449
2471
|
agentAuthKey?: string;
|
|
2450
2472
|
cache?: CacheConfig;
|
|
@@ -2551,40 +2573,40 @@ declare class CachedHttpService implements IHttpService {
|
|
|
2551
2573
|
constructor(inner: IHttpService, overrides?: TtlMap, defaultTtl?: number);
|
|
2552
2574
|
get onNetworkError(): (error: Error) => void;
|
|
2553
2575
|
set onNetworkError(fn: (error: Error) => void);
|
|
2554
|
-
get onUnauthorized(): (response: IAppResponse<JsonValue>) => void;
|
|
2555
|
-
set onUnauthorized(fn: (response: IAppResponse<JsonValue>) => void);
|
|
2556
|
-
get onSuccessfulResponse(): (response: IAppResponse<JsonValue>) => void;
|
|
2557
|
-
set onSuccessfulResponse(fn: (response: IAppResponse<JsonValue>) => void);
|
|
2558
|
-
get onMaintenanceMode(): (response: IAppResponse<JsonValue>) => void;
|
|
2559
|
-
set onMaintenanceMode(fn: (response: IAppResponse<JsonValue>) => void);
|
|
2560
|
-
get onTooManyRequests(): (response: IAppResponse<JsonValue>) => void;
|
|
2561
|
-
set onTooManyRequests(fn: (response: IAppResponse<JsonValue>) => void);
|
|
2576
|
+
get onUnauthorized(): (response: IAppResponse$1<JsonValue>) => void;
|
|
2577
|
+
set onUnauthorized(fn: (response: IAppResponse$1<JsonValue>) => void);
|
|
2578
|
+
get onSuccessfulResponse(): (response: IAppResponse$1<JsonValue>) => void;
|
|
2579
|
+
set onSuccessfulResponse(fn: (response: IAppResponse$1<JsonValue>) => void);
|
|
2580
|
+
get onMaintenanceMode(): (response: IAppResponse$1<JsonValue>) => void;
|
|
2581
|
+
set onMaintenanceMode(fn: (response: IAppResponse$1<JsonValue>) => void);
|
|
2582
|
+
get onTooManyRequests(): (response: IAppResponse$1<JsonValue>) => void;
|
|
2583
|
+
set onTooManyRequests(fn: (response: IAppResponse$1<JsonValue>) => void);
|
|
2562
2584
|
clearCache(): void;
|
|
2563
|
-
get<T>(url: string, options?: IRequestOptions): Promise<IAppResponse<T>>;
|
|
2564
|
-
post<T>(url: string, data?: JsonValue | FormData, options?: IRequestOptions): Promise<IAppResponse<T>>;
|
|
2565
|
-
put<T>(url: string, data?: JsonValue | FormData, options?: IRequestOptions): Promise<IAppResponse<T>>;
|
|
2566
|
-
patch<T>(url: string, data?: JsonValue | FormData, options?: IRequestOptions): Promise<IAppResponse<T>>;
|
|
2567
|
-
delete<T>(url: string, options?: IRequestOptions): Promise<IAppResponse<T>>;
|
|
2585
|
+
get<T>(url: string, options?: IRequestOptions): Promise<IAppResponse$1<T>>;
|
|
2586
|
+
post<T>(url: string, data?: JsonValue | FormData, options?: IRequestOptions): Promise<IAppResponse$1<T>>;
|
|
2587
|
+
put<T>(url: string, data?: JsonValue | FormData, options?: IRequestOptions): Promise<IAppResponse$1<T>>;
|
|
2588
|
+
patch<T>(url: string, data?: JsonValue | FormData, options?: IRequestOptions): Promise<IAppResponse$1<T>>;
|
|
2589
|
+
delete<T>(url: string, options?: IRequestOptions): Promise<IAppResponse$1<T>>;
|
|
2568
2590
|
private mutate;
|
|
2569
2591
|
private bust;
|
|
2570
2592
|
}
|
|
2571
2593
|
//#endregion
|
|
2572
2594
|
//#region src/auth/portal.d.ts
|
|
2573
2595
|
declare const getAuthFragmentToken: (url: string) => string | null;
|
|
2574
|
-
declare const isPortalCallbackUrl: (url: string, env?: AppEnv) => boolean;
|
|
2575
|
-
declare const sanitizePortalCallbackUrl: (url: string | null | undefined, env?: AppEnv) => string | null;
|
|
2596
|
+
declare const isPortalCallbackUrl: (url: string, env?: AppEnv$1) => boolean;
|
|
2597
|
+
declare const sanitizePortalCallbackUrl: (url: string | null | undefined, env?: AppEnv$1) => string | null;
|
|
2576
2598
|
declare const isAllowedRedirectUrl: (redirect: string, allowedOrigins: string[]) => boolean;
|
|
2577
2599
|
declare const completePortalSession: (callbackUrl: string, fetcher?: typeof fetch) => Promise<boolean>;
|
|
2578
2600
|
type PortalClient = {
|
|
2579
2601
|
auth: {
|
|
2580
|
-
createPortalSession: (redirect: string) => Promise<IAppResponse<AuthPortalSessionResponse>>;
|
|
2602
|
+
createPortalSession: (redirect: string) => Promise<IAppResponse$1<AuthPortalSessionResponse>>;
|
|
2581
2603
|
};
|
|
2582
2604
|
};
|
|
2583
2605
|
type OpenPortalSessionOptions = {
|
|
2584
2606
|
client: PortalClient;
|
|
2585
2607
|
redirect: string;
|
|
2586
2608
|
allowedOrigins: string[];
|
|
2587
|
-
env?: AppEnv; /** @deprecated Unused — exchange happens via same-origin blade form after navigation. */
|
|
2609
|
+
env?: AppEnv$1; /** @deprecated Unused — exchange happens via same-origin blade form after navigation. */
|
|
2588
2610
|
fetcher?: typeof fetch; /** Receives the API callback URL (with fragment token), not the final portal redirect. */
|
|
2589
2611
|
onNavigate?: (callbackUrl: string) => void;
|
|
2590
2612
|
};
|
|
@@ -2598,8 +2620,8 @@ declare const openPortalSession: ({
|
|
|
2598
2620
|
//#endregion
|
|
2599
2621
|
//#region src/resources/distribution.d.ts
|
|
2600
2622
|
declare class DistributionResource {
|
|
2601
|
-
getBrandSiteConfig(env: AppEnv, brandSlug: string): Promise<BrandSiteConfig | null>;
|
|
2623
|
+
getBrandSiteConfig(env: AppEnv$1, brandSlug: string): Promise<BrandSiteConfig | null>;
|
|
2602
2624
|
private fetchDistribution;
|
|
2603
2625
|
}
|
|
2604
2626
|
//#endregion
|
|
2605
|
-
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 };
|
|
2627
|
+
export { type AddressInput, AddressesResource, AgentsResource, AlertsResource, AnalyticsResource, ApiTokensResource, type AppEnv, type AppointmentAvailabilitySlot, 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, type CartItem, CartsResource, ChangelogResource, CharactersResource, CheckoutResource, type CheckoutSnapshot, type CheckoutSnapshotRequest, 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 HashidInput, type Hook, type HookSample, type HookTrigger, type HookTriggerCondition, type HookTriggerInput, HooksResource, type IAppResponse, 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 ProductDetailSection, type ProductDetailText, type ProductFacets, type ProductRelationType, type ProductVariation, type ProductsListParams, ProductsResource, type ProductsSort, 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, type TranslatableValue, 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
|
@@ -1007,9 +1007,21 @@ var AppointmentsResource = class {
|
|
|
1007
1007
|
checkAvailability(agentUuid, params) {
|
|
1008
1008
|
return this.http.post(`agents/${agentUuid}/appointments/availability`, params);
|
|
1009
1009
|
}
|
|
1010
|
+
checkStaffAvailability(agentUuid, params) {
|
|
1011
|
+
return this.http.post(`teams/${this.config.team}/appointments/availability`, {
|
|
1012
|
+
agentUuid,
|
|
1013
|
+
...params
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1010
1016
|
book(agentUuid, data) {
|
|
1011
1017
|
return this.http.post(`agents/${agentUuid}/appointments/book`, data);
|
|
1012
1018
|
}
|
|
1019
|
+
bookAsStaff(agentUuid, data) {
|
|
1020
|
+
return this.http.post(`teams/${this.config.team}/appointments/book`, {
|
|
1021
|
+
agentUuid,
|
|
1022
|
+
...data
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1013
1025
|
reschedule(agentUuid, meetingId, data) {
|
|
1014
1026
|
return this.http.post(`agents/${agentUuid}/appointments/${meetingId}/reschedule`, data);
|
|
1015
1027
|
}
|
|
@@ -2357,6 +2369,22 @@ var ProductsResource = class {
|
|
|
2357
2369
|
}
|
|
2358
2370
|
list(params) {
|
|
2359
2371
|
let url = "products";
|
|
2372
|
+
const search = this.query(params);
|
|
2373
|
+
if (search.size) url += `?${search.toString()}`;
|
|
2374
|
+
return this.http.get(url);
|
|
2375
|
+
}
|
|
2376
|
+
listAll(params) {
|
|
2377
|
+
return this.list({
|
|
2378
|
+
...params,
|
|
2379
|
+
all: true
|
|
2380
|
+
});
|
|
2381
|
+
}
|
|
2382
|
+
facets(params) {
|
|
2383
|
+
let url = "products/facets";
|
|
2384
|
+
if (params?.team) url += `?team=${encodeURIComponent(params.team)}`;
|
|
2385
|
+
return this.http.get(url);
|
|
2386
|
+
}
|
|
2387
|
+
query(params) {
|
|
2360
2388
|
const search = new URLSearchParams();
|
|
2361
2389
|
if (params?.includePrivate) search.set("includePrivate", "1");
|
|
2362
2390
|
if (params?.team) search.set("team", params.team);
|
|
@@ -2367,14 +2395,13 @@ var ProductsResource = class {
|
|
|
2367
2395
|
}
|
|
2368
2396
|
if (params?.search) search.set("search", params.search);
|
|
2369
2397
|
if (params?.category) search.set("category", params.category);
|
|
2370
|
-
if (
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
});
|
|
2398
|
+
if (params?.labels?.length) search.set("label", params.labels.join(","));
|
|
2399
|
+
if (params?.minPrice !== void 0) search.set("minPrice", String(params.minPrice));
|
|
2400
|
+
if (params?.maxPrice !== void 0) search.set("maxPrice", String(params.maxPrice));
|
|
2401
|
+
if (params?.available !== void 0) search.set("available", params.available ? "1" : "0");
|
|
2402
|
+
if (params?.sort) search.set("sort", params.sort);
|
|
2403
|
+
if (params?.locale) search.set("locale", params.locale);
|
|
2404
|
+
return search;
|
|
2378
2405
|
}
|
|
2379
2406
|
categories(params) {
|
|
2380
2407
|
let url = "products/categories";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joai/sdk",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.1.0",
|
|
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.4.
|
|
38
|
+
"@joai/core": "^5.4.1",
|
|
39
39
|
"@joai/warps": "*"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@joai/core": "^5.4.
|
|
42
|
+
"@joai/core": "^5.4.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"tsdown": "^0.21.0",
|