@joai/sdk 13.1.3 → 14.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 +71 -5
- package/dist/index.mjs +53 -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, 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, ProductVariationExternalReference, ProductVariationExternalSource, ProgramSettings, Project, ProjectExportResponse, ProjectInputAssistIntent, ProjectInputAssistResponse, ProjectMutation, ProjectOutputPreset, ProjectOutputType, ProjectStudioHistoryEntry, Proposal, ProposalAction, ProposalCreateInput, ProposalPollOption, ProposalPricing, ProposalUpdateInput, 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, TeamSubscriptionStats, 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";
|
|
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, ProductVariationExternalReference, ProductVariationExternalSource, ProgramSettings, Project, ProjectExportResponse, ProjectInputAssistIntent, ProjectInputAssistResponse, ProjectMutation, ProjectOutputPreset, ProjectOutputType, ProjectStudioHistoryEntry, Proposal, ProposalAction, ProposalCreateInput, ProposalPollOption, ProposalPricing, ProposalStats, ProposalUpdateInput, 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, TeamSubscriptionStats, 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
|
|
@@ -53,6 +53,59 @@ declare class AgentsResource {
|
|
|
53
53
|
}>>;
|
|
54
54
|
}
|
|
55
55
|
//#endregion
|
|
56
|
+
//#region src/resources/audit-logs.d.ts
|
|
57
|
+
type AuditLogEvent = {
|
|
58
|
+
id: number;
|
|
59
|
+
correlationId: string;
|
|
60
|
+
action: string;
|
|
61
|
+
event: string;
|
|
62
|
+
subjectType: string | null;
|
|
63
|
+
subjectId: string | null;
|
|
64
|
+
userId: number | null;
|
|
65
|
+
userName: string | null;
|
|
66
|
+
agentId: string | null;
|
|
67
|
+
approvedByUserId: number | null;
|
|
68
|
+
approvedByUserName: string | null;
|
|
69
|
+
approvalId: string | null;
|
|
70
|
+
warpExecutionId: string | null;
|
|
71
|
+
source: string;
|
|
72
|
+
metadata: Record<string, unknown> | null;
|
|
73
|
+
ip: string | null;
|
|
74
|
+
userAgent: string | null;
|
|
75
|
+
createdAt: string;
|
|
76
|
+
};
|
|
77
|
+
type AuditLogListParams = {
|
|
78
|
+
action?: string;
|
|
79
|
+
event?: string;
|
|
80
|
+
source?: string;
|
|
81
|
+
userId?: number;
|
|
82
|
+
agentId?: string;
|
|
83
|
+
from?: string;
|
|
84
|
+
to?: string;
|
|
85
|
+
page?: number;
|
|
86
|
+
perPage?: number;
|
|
87
|
+
};
|
|
88
|
+
declare class AuditLogsResource {
|
|
89
|
+
private readonly http;
|
|
90
|
+
constructor(http: IHttpService);
|
|
91
|
+
list(params?: AuditLogListParams): Promise<_$_joai_core0.IAppResponse<AuditLogEvent[]>>;
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/resources/exports.d.ts
|
|
95
|
+
type CatalogExportResource = 'products' | 'services' | 'orders';
|
|
96
|
+
type CatalogExportFormat = 'csv' | 'xlsx' | 'json';
|
|
97
|
+
type CatalogExportRequest = {
|
|
98
|
+
resource: CatalogExportResource;
|
|
99
|
+
format: CatalogExportFormat;
|
|
100
|
+
filters?: Record<string, string | number | boolean>;
|
|
101
|
+
};
|
|
102
|
+
/** Binary catalog export download. The filename is available on `response.original.headers`. */
|
|
103
|
+
declare class ExportsResource {
|
|
104
|
+
private readonly http;
|
|
105
|
+
constructor(http: IHttpService);
|
|
106
|
+
catalog(input: CatalogExportRequest): Promise<_$_joai_core0.IAppResponse<Blob>>;
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
56
109
|
//#region src/address/addresses.d.ts
|
|
57
110
|
type AddressQuery = {
|
|
58
111
|
contact?: string;
|
|
@@ -1763,12 +1816,22 @@ declare class ProjectsResource {
|
|
|
1763
1816
|
}
|
|
1764
1817
|
//#endregion
|
|
1765
1818
|
//#region src/resources/proposals.d.ts
|
|
1819
|
+
type ProposalListParams = {
|
|
1820
|
+
page?: number;
|
|
1821
|
+
perPage?: number;
|
|
1822
|
+
};
|
|
1823
|
+
/**
|
|
1824
|
+
* Team-scoped proposal endpoints. Create the client with `createClient({ team })`
|
|
1825
|
+
* so the team travels as the default `X-Team` header.
|
|
1826
|
+
*/
|
|
1766
1827
|
declare class ProposalsResource {
|
|
1767
1828
|
private readonly http;
|
|
1768
1829
|
constructor(http: IHttpService);
|
|
1769
|
-
list(
|
|
1770
|
-
|
|
1771
|
-
|
|
1830
|
+
list(params?: ProposalListParams): Promise<_$_joai_core0.IAppResponse<ClientProposal[]>>;
|
|
1831
|
+
stats(): Promise<_$_joai_core0.IAppResponse<ProposalStats>>;
|
|
1832
|
+
get(id: string): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
|
|
1833
|
+
create(data: ProposalCreateInput): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
|
|
1834
|
+
update(id: string, data: ProposalUpdateInput): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
|
|
1772
1835
|
getShared(slug: string, password?: string): Promise<_$_joai_core0.IAppResponse<SharedProposal>>;
|
|
1773
1836
|
pricing(slug: string, password: string | undefined, itemIds: string[]): Promise<_$_joai_core0.IAppResponse<ProposalPricing>>;
|
|
1774
1837
|
confirm(slug: string, password: string | undefined, itemIds: string[]): Promise<_$_joai_core0.IAppResponse<SharedProposal>>;
|
|
@@ -2501,6 +2564,8 @@ declare class JoAiClient {
|
|
|
2501
2564
|
isReady: boolean;
|
|
2502
2565
|
hasApiToken: boolean;
|
|
2503
2566
|
readonly agents: AgentsResource;
|
|
2567
|
+
readonly auditLogs: AuditLogsResource;
|
|
2568
|
+
readonly exports: ExportsResource;
|
|
2504
2569
|
readonly addresses: AddressesResource;
|
|
2505
2570
|
readonly commerce: CommerceResource;
|
|
2506
2571
|
readonly alerts: AlertsResource;
|
|
@@ -2609,6 +2674,7 @@ declare class CachedHttpService implements IHttpService {
|
|
|
2609
2674
|
put<T>(url: string, data?: JsonValue | FormData, options?: IRequestOptions): Promise<IAppResponse$1<T>>;
|
|
2610
2675
|
patch<T>(url: string, data?: JsonValue | FormData, options?: IRequestOptions): Promise<IAppResponse$1<T>>;
|
|
2611
2676
|
delete<T>(url: string, options?: IRequestOptions): Promise<IAppResponse$1<T>>;
|
|
2677
|
+
download<T = Blob>(url: string, data?: any, options?: IRequestOptions): Promise<IAppResponse$1<T>>;
|
|
2612
2678
|
private mutate;
|
|
2613
2679
|
private bust;
|
|
2614
2680
|
}
|
|
@@ -2646,4 +2712,4 @@ declare class DistributionResource {
|
|
|
2646
2712
|
private fetchDistribution;
|
|
2647
2713
|
}
|
|
2648
2714
|
//#endregion
|
|
2649
|
-
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 };
|
|
2715
|
+
export { type AddressInput, AddressesResource, AgentsResource, AlertsResource, AnalyticsResource, ApiTokensResource, type AppEnv, type AppointmentAvailabilitySlot, AppointmentsResource, type AttachedMedia, type AuditLogEvent, type AuditLogListParams, AuditLogsResource, 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, type CatalogExportFormat, type CatalogExportRequest, type CatalogExportResource, 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, ExportsResource, 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, type ProposalListParams, 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
|
@@ -100,6 +100,30 @@ var AgentsResource = class {
|
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
//#endregion
|
|
103
|
+
//#region src/resources/audit-logs.ts
|
|
104
|
+
var AuditLogsResource = class {
|
|
105
|
+
constructor(http) {
|
|
106
|
+
this.http = http;
|
|
107
|
+
}
|
|
108
|
+
list(params = {}) {
|
|
109
|
+
const query = new URLSearchParams();
|
|
110
|
+
for (const [key, value] of Object.entries(params)) if (value !== void 0 && value !== "") query.set(key, String(value));
|
|
111
|
+
const qs = query.toString();
|
|
112
|
+
return this.http.get(`audit-logs${qs ? `?${qs}` : ""}`);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/resources/exports.ts
|
|
117
|
+
/** Binary catalog export download. The filename is available on `response.original.headers`. */
|
|
118
|
+
var ExportsResource = class {
|
|
119
|
+
constructor(http) {
|
|
120
|
+
this.http = http;
|
|
121
|
+
}
|
|
122
|
+
catalog(input) {
|
|
123
|
+
return this.http.download("exports/catalog", input);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
//#endregion
|
|
103
127
|
//#region src/address/addresses.ts
|
|
104
128
|
var AddressesResource = class {
|
|
105
129
|
constructor(http) {
|
|
@@ -2518,18 +2542,32 @@ var ProjectsResource = class {
|
|
|
2518
2542
|
//#endregion
|
|
2519
2543
|
//#region src/resources/proposals.ts
|
|
2520
2544
|
const access = (password) => password ? { headers: { "X-Proposal-Password": password } } : void 0;
|
|
2545
|
+
/**
|
|
2546
|
+
* Team-scoped proposal endpoints. Create the client with `createClient({ team })`
|
|
2547
|
+
* so the team travels as the default `X-Team` header.
|
|
2548
|
+
*/
|
|
2521
2549
|
var ProposalsResource = class {
|
|
2522
2550
|
constructor(http) {
|
|
2523
2551
|
this.http = http;
|
|
2524
2552
|
}
|
|
2525
|
-
list(
|
|
2526
|
-
|
|
2553
|
+
list(params) {
|
|
2554
|
+
const query = new URLSearchParams();
|
|
2555
|
+
if (params?.page != null) query.set("page", String(params.page));
|
|
2556
|
+
if (params?.perPage != null) query.set("perPage", String(params.perPage));
|
|
2557
|
+
const qs = query.toString();
|
|
2558
|
+
return this.http.get(`proposals${qs ? `?${qs}` : ""}`);
|
|
2527
2559
|
}
|
|
2528
|
-
|
|
2529
|
-
return this.http.
|
|
2560
|
+
stats() {
|
|
2561
|
+
return this.http.get("proposals/stats");
|
|
2562
|
+
}
|
|
2563
|
+
get(id) {
|
|
2564
|
+
return this.http.get(`proposals/${id}`);
|
|
2530
2565
|
}
|
|
2531
|
-
|
|
2532
|
-
return this.http.
|
|
2566
|
+
create(data) {
|
|
2567
|
+
return this.http.post("proposals", data);
|
|
2568
|
+
}
|
|
2569
|
+
update(id, data) {
|
|
2570
|
+
return this.http.put(`proposals/${id}`, data);
|
|
2533
2571
|
}
|
|
2534
2572
|
getShared(slug, password) {
|
|
2535
2573
|
return this.http.get(`proposals/shared/${encodeURIComponent(slug)}`, access(password));
|
|
@@ -3677,7 +3715,9 @@ const DEFAULTS = {
|
|
|
3677
3715
|
};
|
|
3678
3716
|
const RELATED_PREFIXES = {
|
|
3679
3717
|
content: ["contents"],
|
|
3680
|
-
contents: ["content"]
|
|
3718
|
+
contents: ["content"],
|
|
3719
|
+
returns: ["orders"],
|
|
3720
|
+
orders: ["returns"]
|
|
3681
3721
|
};
|
|
3682
3722
|
function getTtl(url, ttlMap, defaultTtl) {
|
|
3683
3723
|
for (const [prefix, ttl] of Object.entries(ttlMap)) if (url.startsWith(prefix) || url.startsWith(`/${prefix}`)) return ttl;
|
|
@@ -3755,6 +3795,9 @@ var CachedHttpService = class {
|
|
|
3755
3795
|
async delete(url, options) {
|
|
3756
3796
|
return this.mutate(getUrlPrefix(url), () => this.inner.delete(url, options));
|
|
3757
3797
|
}
|
|
3798
|
+
async download(url, data, options) {
|
|
3799
|
+
return this.inner.download(url, data, options);
|
|
3800
|
+
}
|
|
3758
3801
|
async mutate(prefix, request) {
|
|
3759
3802
|
this.bust(prefix);
|
|
3760
3803
|
try {
|
|
@@ -3795,6 +3838,8 @@ var JoAiClient = class {
|
|
|
3795
3838
|
const cache = config.cache;
|
|
3796
3839
|
this.http = cache?.enabled !== false ? new CachedHttpService(http, cache?.overrides, cache?.defaultTtl) : http;
|
|
3797
3840
|
this.agents = new AgentsResource(this.http);
|
|
3841
|
+
this.auditLogs = new AuditLogsResource(this.http);
|
|
3842
|
+
this.exports = new ExportsResource(this.http);
|
|
3798
3843
|
this.addresses = new AddressesResource(this.http);
|
|
3799
3844
|
this.commerce = new CommerceResource(this.http);
|
|
3800
3845
|
this.alerts = new AlertsResource(this.http);
|
|
@@ -3976,4 +4021,4 @@ var DistributionResource = class {
|
|
|
3976
4021
|
}
|
|
3977
4022
|
};
|
|
3978
4023
|
//#endregion
|
|
3979
|
-
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 };
|
|
4024
|
+
export { AddressesResource, AgentsResource, AlertsResource, AnalyticsResource, ApiTokensResource, AppointmentsResource, AuditLogsResource, AuthResource, AutomationsResource, BillingResource, BlueprintsResource, CachedHttpService, CampaignsResource, CardsResource, CartsResource, ChangelogResource, CharactersResource, CheckoutResource, CommerceResource, ContactsResource, ContentResource, ContractsResource, DeskResource, DistributionResource, DocumentsResource, ElementsResource, EntitiesResource, ExportsResource, 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": "
|
|
3
|
+
"version": "14.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.4.
|
|
38
|
+
"@joai/core": "^5.4.6",
|
|
39
39
|
"@joai/warps": "*"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@joai/core": "^5.4.
|
|
42
|
+
"@joai/core": "^5.4.6"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"tsdown": "^0.21.0",
|