@joai/sdk 9.0.1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +37 -4
- package/dist/index.mjs +55 -3
- 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, 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, 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, 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, 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, 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, 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";
|
|
3
3
|
import { WarpChainName, WarpClient, WarpLocale, WarpText, WarpWalletProvider } from "@joai/warps";
|
|
4
4
|
|
|
5
5
|
//#region src/resources/agents.d.ts
|
|
@@ -1252,6 +1252,25 @@ declare class LoyaltyResource {
|
|
|
1252
1252
|
}>>;
|
|
1253
1253
|
}
|
|
1254
1254
|
//#endregion
|
|
1255
|
+
//#region src/resources/installs.d.ts
|
|
1256
|
+
declare class InstallsResource {
|
|
1257
|
+
private readonly http;
|
|
1258
|
+
constructor(http: IHttpService);
|
|
1259
|
+
/** Team-manager listing of device installs (includes anonymous). */
|
|
1260
|
+
list(params?: {
|
|
1261
|
+
pushStatus?: Install['pushStatus'];
|
|
1262
|
+
perPage?: number;
|
|
1263
|
+
page?: number;
|
|
1264
|
+
q?: string;
|
|
1265
|
+
}): Promise<_$_joai_core0.IAppResponse<Install[]>>;
|
|
1266
|
+
/** Upsert a device install for the current team (`X-Team`). Works anonymously or signed-in. */
|
|
1267
|
+
register(data: InstallRegisterPayload): Promise<_$_joai_core0.IAppResponse<Install>>;
|
|
1268
|
+
/** Attach the signed-in user (and their contact, when present) to an existing install. */
|
|
1269
|
+
claim(data: InstallClaimPayload): Promise<_$_joai_core0.IAppResponse<Install>>;
|
|
1270
|
+
/** Mark push as opted out / unavailable for this provider device ref. */
|
|
1271
|
+
optOut(data: InstallOptOutPayload): Promise<_$_joai_core0.IAppResponse<Install>>;
|
|
1272
|
+
}
|
|
1273
|
+
//#endregion
|
|
1255
1274
|
//#region src/resources/store.d.ts
|
|
1256
1275
|
declare class StoreResource {
|
|
1257
1276
|
private readonly http;
|
|
@@ -1971,6 +1990,7 @@ declare class CampaignsResource {
|
|
|
1971
1990
|
}): Promise<_$_joai_core0.IAppResponse<CampaignRecipient[]>>;
|
|
1972
1991
|
retry(id: string, payload?: {
|
|
1973
1992
|
contactIds?: string[];
|
|
1993
|
+
installIds?: string[];
|
|
1974
1994
|
}): Promise<_$_joai_core0.IAppResponse<{
|
|
1975
1995
|
retried: number;
|
|
1976
1996
|
}>>;
|
|
@@ -1983,8 +2003,11 @@ declare class CampaignsResource {
|
|
|
1983
2003
|
scheduledAt?: string;
|
|
1984
2004
|
}): Promise<_$_joai_core0.IAppResponse<Campaign>>;
|
|
1985
2005
|
sendTest(id: string, payload: {
|
|
1986
|
-
contactId
|
|
2006
|
+
contactId?: string;
|
|
2007
|
+
installId?: string;
|
|
1987
2008
|
}): Promise<_$_joai_core0.IAppResponse<void>>;
|
|
2009
|
+
/** Test-send current form fields without creating a campaign. */
|
|
2010
|
+
sendTestDraft(payload: CampaignSendTestDraftPayload): Promise<_$_joai_core0.IAppResponse<void>>;
|
|
1988
2011
|
cancelSchedule(id: string): Promise<_$_joai_core0.IAppResponse<Campaign>>;
|
|
1989
2012
|
cancel(id: string): Promise<_$_joai_core0.IAppResponse<Campaign>>;
|
|
1990
2013
|
archive(id: string): Promise<_$_joai_core0.IAppResponse<Campaign>>;
|
|
@@ -2027,6 +2050,11 @@ declare class SegmentsResource {
|
|
|
2027
2050
|
page?: number;
|
|
2028
2051
|
perPage?: number;
|
|
2029
2052
|
}): Promise<_$_joai_core0.IAppResponse<Contact[]>>;
|
|
2053
|
+
/** Device members for install-only segments (includes anonymous). */
|
|
2054
|
+
installs(id: string, params?: {
|
|
2055
|
+
page?: number;
|
|
2056
|
+
perPage?: number;
|
|
2057
|
+
}): Promise<_$_joai_core0.IAppResponse<Install[]>>;
|
|
2030
2058
|
}
|
|
2031
2059
|
//#endregion
|
|
2032
2060
|
//#region src/resources/updates.d.ts
|
|
@@ -2087,6 +2115,10 @@ declare class UpgradesResource {
|
|
|
2087
2115
|
}
|
|
2088
2116
|
//#endregion
|
|
2089
2117
|
//#region src/resources/users.d.ts
|
|
2118
|
+
type DeleteUserParams = {
|
|
2119
|
+
type: 'contact';
|
|
2120
|
+
team: string;
|
|
2121
|
+
};
|
|
2090
2122
|
declare class UsersResource {
|
|
2091
2123
|
private readonly http;
|
|
2092
2124
|
constructor(http: IHttpService);
|
|
@@ -2099,7 +2131,7 @@ declare class UsersResource {
|
|
|
2099
2131
|
updateMe(name: string, timezone: string): Promise<_$_joai_core0.IAppResponse<UserPrivate>>;
|
|
2100
2132
|
updateEmail(email: string): Promise<_$_joai_core0.IAppResponse<UserPrivate>>;
|
|
2101
2133
|
resendEmailVerification(): Promise<_$_joai_core0.IAppResponse<UserPrivate>>;
|
|
2102
|
-
|
|
2134
|
+
delete(params?: DeleteUserParams): Promise<_$_joai_core0.IAppResponse<void>>;
|
|
2103
2135
|
getAffiliate(code: string): Promise<_$_joai_core0.IAppResponse<Affiliate>>;
|
|
2104
2136
|
getAffiliateTiers(): Promise<_$_joai_core0.IAppResponse<AffiliateTier[]>>;
|
|
2105
2137
|
storeAffiliate(name: string, email: string, application: string): Promise<_$_joai_core0.IAppResponse<void>>;
|
|
@@ -2342,6 +2374,7 @@ declare class JoAiClient {
|
|
|
2342
2374
|
readonly items: ItemsResource;
|
|
2343
2375
|
readonly links: LinksResource;
|
|
2344
2376
|
readonly loyalty: LoyaltyResource;
|
|
2377
|
+
readonly installs: InstallsResource;
|
|
2345
2378
|
readonly store: StoreResource;
|
|
2346
2379
|
readonly media: MediaResource;
|
|
2347
2380
|
readonly metrics: MetricsResource;
|
|
@@ -2453,4 +2486,4 @@ declare class DistributionResource {
|
|
|
2453
2486
|
private fetchDistribution;
|
|
2454
2487
|
}
|
|
2455
2488
|
//#endregion
|
|
2456
|
-
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, DeskResource, DistributionResource, DocumentsResource, ElementsResource, EntitiesResource, FlowsResource, 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, 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 };
|
|
2489
|
+
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, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -620,6 +620,11 @@ async function placeGuestCheckoutOrder(options) {
|
|
|
620
620
|
accessToken,
|
|
621
621
|
paymentUrl: null
|
|
622
622
|
};
|
|
623
|
+
if (order.data.status !== "pending") return {
|
|
624
|
+
order: order.data,
|
|
625
|
+
accessToken,
|
|
626
|
+
paymentUrl: null
|
|
627
|
+
};
|
|
623
628
|
if (!accessToken) throw new GuestCheckoutError("payment_failed");
|
|
624
629
|
const payment = await options.client.orders.pay(order.data.id, void 0, accessToken);
|
|
625
630
|
if (!payment.ok || !payment.data?.url) return {
|
|
@@ -1847,6 +1852,35 @@ var LoyaltyResource = class {
|
|
|
1847
1852
|
}
|
|
1848
1853
|
};
|
|
1849
1854
|
//#endregion
|
|
1855
|
+
//#region src/resources/installs.ts
|
|
1856
|
+
var InstallsResource = class {
|
|
1857
|
+
constructor(http) {
|
|
1858
|
+
this.http = http;
|
|
1859
|
+
}
|
|
1860
|
+
/** Team-manager listing of device installs (includes anonymous). */
|
|
1861
|
+
list(params) {
|
|
1862
|
+
const search = new URLSearchParams();
|
|
1863
|
+
if (params?.pushStatus) search.set("pushStatus", params.pushStatus);
|
|
1864
|
+
if (params?.perPage) search.set("perPage", String(params.perPage));
|
|
1865
|
+
if (params?.page) search.set("page", String(params.page));
|
|
1866
|
+
if (params?.q?.trim()) search.set("q", params.q.trim());
|
|
1867
|
+
const query = search.toString();
|
|
1868
|
+
return this.http.get(`installs${query ? `?${query}` : ""}`);
|
|
1869
|
+
}
|
|
1870
|
+
/** Upsert a device install for the current team (`X-Team`). Works anonymously or signed-in. */
|
|
1871
|
+
register(data) {
|
|
1872
|
+
return this.http.post("installs", data);
|
|
1873
|
+
}
|
|
1874
|
+
/** Attach the signed-in user (and their contact, when present) to an existing install. */
|
|
1875
|
+
claim(data) {
|
|
1876
|
+
return this.http.post("installs/claim", data);
|
|
1877
|
+
}
|
|
1878
|
+
/** Mark push as opted out / unavailable for this provider device ref. */
|
|
1879
|
+
optOut(data) {
|
|
1880
|
+
return this.http.post("installs/opt-out", data);
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1883
|
+
//#endregion
|
|
1850
1884
|
//#region src/resources/store.ts
|
|
1851
1885
|
var StoreResource = class {
|
|
1852
1886
|
constructor(http) {
|
|
@@ -2866,6 +2900,10 @@ var CampaignsResource = class {
|
|
|
2866
2900
|
sendTest(id, payload) {
|
|
2867
2901
|
return this.http.post(`campaigns/${id}/send-test`, payload);
|
|
2868
2902
|
}
|
|
2903
|
+
/** Test-send current form fields without creating a campaign. */
|
|
2904
|
+
sendTestDraft(payload) {
|
|
2905
|
+
return this.http.post("campaigns/send-test", payload);
|
|
2906
|
+
}
|
|
2869
2907
|
cancelSchedule(id) {
|
|
2870
2908
|
return this.http.post(`campaigns/${id}/cancel-schedule`);
|
|
2871
2909
|
}
|
|
@@ -2966,6 +3004,14 @@ var SegmentsResource = class {
|
|
|
2966
3004
|
const query = search.toString();
|
|
2967
3005
|
return this.http.get(`segments/${id}/contacts${query ? `?${query}` : ""}`);
|
|
2968
3006
|
}
|
|
3007
|
+
/** Device members for install-only segments (includes anonymous). */
|
|
3008
|
+
installs(id, params) {
|
|
3009
|
+
const search = new URLSearchParams();
|
|
3010
|
+
if (params?.page != null) search.set("page", String(params.page));
|
|
3011
|
+
if (params?.perPage != null) search.set("perPage", String(params.perPage));
|
|
3012
|
+
const query = search.toString();
|
|
3013
|
+
return this.http.get(`segments/${id}/installs${query ? `?${query}` : ""}`);
|
|
3014
|
+
}
|
|
2969
3015
|
};
|
|
2970
3016
|
//#endregion
|
|
2971
3017
|
//#region src/resources/updates.ts
|
|
@@ -3113,8 +3159,13 @@ var UsersResource = class {
|
|
|
3113
3159
|
resendEmailVerification() {
|
|
3114
3160
|
return this.http.post("me/resend-email-verification");
|
|
3115
3161
|
}
|
|
3116
|
-
|
|
3117
|
-
return this.http.
|
|
3162
|
+
delete(params) {
|
|
3163
|
+
if (!params) return this.http.delete("me");
|
|
3164
|
+
const query = new URLSearchParams({
|
|
3165
|
+
type: params.type,
|
|
3166
|
+
team: params.team
|
|
3167
|
+
});
|
|
3168
|
+
return this.http.delete(`me?${query.toString()}`);
|
|
3118
3169
|
}
|
|
3119
3170
|
getAffiliate(code) {
|
|
3120
3171
|
return this.http.get(`affiliates/${code}`);
|
|
@@ -3560,6 +3611,7 @@ var JoAiClient = class {
|
|
|
3560
3611
|
this.items = new ItemsResource(this.http);
|
|
3561
3612
|
this.links = new LinksResource(this.http);
|
|
3562
3613
|
this.loyalty = new LoyaltyResource(this.http);
|
|
3614
|
+
this.installs = new InstallsResource(this.http);
|
|
3563
3615
|
this.store = new StoreResource(this.http);
|
|
3564
3616
|
this.media = new MediaResource(this.http);
|
|
3565
3617
|
this.metrics = new MetricsResource(this.http);
|
|
@@ -3707,4 +3759,4 @@ var DistributionResource = class {
|
|
|
3707
3759
|
}
|
|
3708
3760
|
};
|
|
3709
3761
|
//#endregion
|
|
3710
|
-
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, FulfillmentsResource, GoalsResource, GuestCheckoutError, GuestCouponError, HooksResource, IngestionsResource, InquiriesResource, 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 };
|
|
3762
|
+
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, 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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joai/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.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.0
|
|
38
|
+
"@joai/core": "^5.1.0",
|
|
39
39
|
"@joai/warps": "*"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@joai/core": "^5.0
|
|
42
|
+
"@joai/core": "^5.1.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"tsdown": "^0.21.0",
|