@joai/sdk 14.0.3 → 14.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 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, 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";
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, ProposalItemInput, ProposalItemUpdateInput, 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, SiteUptime, Skill, SkillScopeValue, SnmInventoryImportResult, 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
@@ -21,8 +21,16 @@ declare class AgentsResource {
21
21
  delete(uuid: string): Promise<_$_joai_core0.IAppResponse<void>>;
22
22
  updatePassword(uuid: string, password: string): Promise<_$_joai_core0.IAppResponse<void>>;
23
23
  storePassword(uuid: string, password: string): Promise<_$_joai_core0.IAppResponse<AgentPrivate>>;
24
+ verifyPassword(uuid: string, password: string): Promise<_$_joai_core0.IAppResponse<{
25
+ valid: boolean;
26
+ }>>;
27
+ walletKey(uuid: string): Promise<_$_joai_core0.IAppResponse<{
28
+ secKey: string;
29
+ }>>;
24
30
  updateSetting<K extends keyof AgentSettings>(uuid: string, key: K, value: AgentSettings[K]): Promise<_$_joai_core0.IAppResponse<AgentPrivate>>;
25
31
  updateMeta(uuid: string, key: string, value: unknown): Promise<_$_joai_core0.IAppResponse<AgentPrivate>>;
32
+ cloneVoice(uuid: string, name: string, samples: File[], description?: string): Promise<_$_joai_core0.IAppResponse<AgentPrivate>>;
33
+ deleteVoice(uuid: string): Promise<_$_joai_core0.IAppResponse<AgentPrivate>>;
26
34
  publish(uuid: string): Promise<_$_joai_core0.IAppResponse<AgentPrivate>>;
27
35
  unpublish(uuid: string): Promise<_$_joai_core0.IAppResponse<AgentPrivate>>;
28
36
  moveToTeam(uuid: string, teamSlug: string): Promise<_$_joai_core0.IAppResponse<AgentPrivate>>;
@@ -1219,6 +1227,8 @@ declare class IntegrationsResource {
1219
1227
  deleteCalendarFeed(id: string): Promise<_$_joai_core0.IAppResponse<void>>;
1220
1228
  syncCalendarFeed(id: string): Promise<_$_joai_core0.IAppResponse<CalendarFeedSyncResult>>;
1221
1229
  setup(type: IntegrationType, agent: string, data?: Record<string, unknown>): Promise<_$_joai_core0.IAppResponse<Integration>>;
1230
+ uploadSnmInventory(agent: string, file: File, syncAt?: string): Promise<_$_joai_core0.IAppResponse<SnmInventoryImportResult>>;
1231
+ rotateSnmKey(agent: string): Promise<_$_joai_core0.IAppResponse<Integration>>;
1222
1232
  }
1223
1233
  //#endregion
1224
1234
  //#region src/resources/intents.d.ts
@@ -1520,6 +1530,14 @@ declare class MemoriesResource {
1520
1530
  }
1521
1531
  //#endregion
1522
1532
  //#region src/resources/messages.d.ts
1533
+ type PendingMediaImport = {
1534
+ provider: string;
1535
+ agentId: string;
1536
+ roomId: string;
1537
+ messageId: string;
1538
+ action: string;
1539
+ content: string;
1540
+ };
1523
1541
  type PendingApprovalMessage = Message & {
1524
1542
  team?: {
1525
1543
  slug: string;
@@ -1538,6 +1556,7 @@ declare class MessagesResource {
1538
1556
  search(team: string, search: string): Promise<_$_joai_core0.IAppResponse<Message[]>>;
1539
1557
  delete(messageId: string): Promise<_$_joai_core0.IAppResponse<void>>;
1540
1558
  pendingApprovals(teams: string[]): Promise<_$_joai_core0.IAppResponse<PendingApprovalMessage[]>>;
1559
+ pendingMediaImports(team: string): Promise<_$_joai_core0.IAppResponse<PendingMediaImport[]>>;
1541
1560
  generateAudio(messageId: string): Promise<_$_joai_core0.IAppResponse<{
1542
1561
  audioUrl: string;
1543
1562
  }>>;
@@ -1830,6 +1849,7 @@ declare class ProjectsResource {
1830
1849
  type ProposalListParams = {
1831
1850
  page?: number;
1832
1851
  perPage?: number;
1852
+ includeArchived?: boolean;
1833
1853
  };
1834
1854
  /**
1835
1855
  * Team-scoped proposal endpoints. Create the client with `createClient({ team })`
@@ -1843,6 +1863,15 @@ declare class ProposalsResource {
1843
1863
  get(id: string): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
1844
1864
  create(data: ProposalCreateInput): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
1845
1865
  update(id: string, data: ProposalUpdateInput): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
1866
+ delete(id: string): Promise<_$_joai_core0.IAppResponse<{
1867
+ deleted: boolean;
1868
+ }>>;
1869
+ archive(id: string): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
1870
+ publish(id: string): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
1871
+ setItems(id: string, items: ProposalItemInput[]): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
1872
+ addItem(id: string, item: ProposalItemInput): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
1873
+ updateItem(id: string, itemId: string, data: ProposalItemUpdateInput): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
1874
+ removeItem(id: string, itemId: string): Promise<_$_joai_core0.IAppResponse<ClientProposal>>;
1846
1875
  getShared(slug: string, password?: string): Promise<_$_joai_core0.IAppResponse<SharedProposal>>;
1847
1876
  pricing(slug: string, password: string | undefined, itemIds: string[]): Promise<_$_joai_core0.IAppResponse<ProposalPricing>>;
1848
1877
  confirm(slug: string, password: string | undefined, itemIds: string[]): Promise<_$_joai_core0.IAppResponse<SharedProposal>>;
@@ -1963,6 +1992,7 @@ declare class SitesResource {
1963
1992
  }): Promise<_$_joai_core0.IAppResponse<Site>>;
1964
1993
  resolve(teamSlug: string, brandSlug?: string): Promise<_$_joai_core0.IAppResponse<Site>>;
1965
1994
  resolveByDomain(domain: string): Promise<_$_joai_core0.IAppResponse<Site>>;
1995
+ uptime(siteId: HashidInput$1): Promise<_$_joai_core0.IAppResponse<SiteUptime>>;
1966
1996
  update(siteId: HashidInput$1, data: {
1967
1997
  customDomain?: string | null;
1968
1998
  enabled?: boolean;
@@ -1976,7 +2006,9 @@ declare class SitesResource {
1976
2006
  metricsResource?: string | null;
1977
2007
  analyticsDomains?: string[];
1978
2008
  monthlyReport?: boolean;
2009
+ uptime?: boolean;
1979
2010
  }): Promise<_$_joai_core0.IAppResponse<Site>>;
2011
+ delete(siteId: HashidInput$1): Promise<_$_joai_core0.IAppResponse<void>>;
1980
2012
  }
1981
2013
  //#endregion
1982
2014
  //#region src/resources/skills.d.ts
@@ -2294,7 +2326,9 @@ declare class UpdatesResource {
2294
2326
  page?: number;
2295
2327
  perPage?: number;
2296
2328
  upcoming?: boolean;
2297
- past?: boolean;
2329
+ past?: boolean; /** Only updates whose end date is after this ISO datetime. Filters on ends_at and excludes updates without an end date. */
2330
+ endsAfter?: string; /** Only updates whose end date is before this ISO datetime. Filters on ends_at and excludes updates without an end date. */
2331
+ endsBefore?: string;
2298
2332
  }): Promise<_$_joai_core0.IAppResponse<Update[]>>;
2299
2333
  /** Fetch by hashid or slug. Public for published updates when `team` is set (header or param). */
2300
2334
  get(id: string, params?: {
@@ -2456,6 +2490,7 @@ declare class WarpsResource {
2456
2490
  title?: TranslatableValue$1;
2457
2491
  description?: TranslatableValue$1 | null;
2458
2492
  extras?: Record<string, any> | null;
2493
+ notify?: string[] | null;
2459
2494
  public?: boolean;
2460
2495
  form?: boolean;
2461
2496
  store?: boolean;
@@ -2468,6 +2503,7 @@ declare class WarpsResource {
2468
2503
  description?: TranslatableValue$1 | null;
2469
2504
  definition?: WarpDefinition;
2470
2505
  extras?: Record<string, any> | null;
2506
+ notify?: string[] | null;
2471
2507
  form?: boolean;
2472
2508
  store?: boolean;
2473
2509
  agent?: string | null;
@@ -2546,6 +2582,10 @@ declare class HooksResource {
2546
2582
  list(agentId: string): Promise<_$_joai_core0.IAppResponse<Hook$1[]>>;
2547
2583
  create(agentId: string, payload: CreateHookPayload$1): Promise<_$_joai_core0.IAppResponse<Hook$1>>;
2548
2584
  sample(agentId: string, source: string): Promise<_$_joai_core0.IAppResponse<HookSample$1>>;
2585
+ secret(agentId: string, source: string): Promise<_$_joai_core0.IAppResponse<{
2586
+ source: string;
2587
+ secret: string;
2588
+ }>>;
2549
2589
  toggle(agentId: string, hookId: string): Promise<_$_joai_core0.IAppResponse<Hook$1>>;
2550
2590
  removeByHook(agentId: string, hookId: string): Promise<_$_joai_core0.IAppResponse<void>>;
2551
2591
  removeByWarp(agentId: string, warpIdentifier: string): Promise<_$_joai_core0.IAppResponse<void>>;
@@ -2572,6 +2612,7 @@ interface JoAiClientConfig {
2572
2612
  declare class JoAiClient {
2573
2613
  readonly http: IHttpService;
2574
2614
  private readonly env;
2615
+ private readonly config;
2575
2616
  isReady: boolean;
2576
2617
  hasApiToken: boolean;
2577
2618
  readonly agents: AgentsResource;
@@ -2653,6 +2694,8 @@ declare class JoAiClient {
2653
2694
  readonly hooks: HooksResource;
2654
2695
  readonly workspace: WorkspaceResource;
2655
2696
  constructor(config: JoAiClientConfig);
2697
+ /** Team-scoped client without mutating this instance. */
2698
+ withTeam(team?: string | null): JoAiClient;
2656
2699
  clearCache(): void;
2657
2700
  warps(locale?: WarpLocale, currentUrl?: string): WarpClient;
2658
2701
  }
package/dist/index.mjs CHANGED
@@ -34,12 +34,28 @@ var AgentsResource = class {
34
34
  storePassword(uuid, password) {
35
35
  return this.http.post(`agents/${uuid}/password`, { password });
36
36
  }
37
+ verifyPassword(uuid, password) {
38
+ return this.http.post(`agents/${uuid}/password/verify`, { password });
39
+ }
40
+ walletKey(uuid) {
41
+ return this.http.get(`agents/${uuid}/wallet-key`);
42
+ }
37
43
  updateSetting(uuid, key, value) {
38
44
  return this.http.put(`agents/${uuid}/settings/${key}`, { value });
39
45
  }
40
46
  updateMeta(uuid, key, value) {
41
47
  return this.http.put(`agents/${uuid}/meta/${key}`, { value });
42
48
  }
49
+ cloneVoice(uuid, name, samples, description) {
50
+ const formData = new FormData();
51
+ formData.append("name", name);
52
+ if (description) formData.append("description", description);
53
+ samples.forEach((sample) => formData.append("samples[]", sample, sample.name));
54
+ return this.http.post(`agents/${uuid}/voice/clone`, formData, { isJson: false });
55
+ }
56
+ deleteVoice(uuid) {
57
+ return this.http.delete(`agents/${uuid}/voice/clone`);
58
+ }
43
59
  publish(uuid) {
44
60
  return this.http.post(`agents/${uuid}/publish`, {});
45
61
  }
@@ -1768,6 +1784,14 @@ var IntegrationsResource = class {
1768
1784
  setup(type, agent, data) {
1769
1785
  return this.http.post(`integrations/${type}/${agent}/setup`, data ?? {});
1770
1786
  }
1787
+ uploadSnmInventory(agent, file, syncAt = (/* @__PURE__ */ new Date()).toISOString()) {
1788
+ const form = new FormData();
1789
+ form.append("file", file);
1790
+ return this.http.post(`integrations/snm/${agent}/inventory/upload`, form, { headers: { "X-SNM-Sync-At": syncAt } });
1791
+ }
1792
+ rotateSnmKey(agent) {
1793
+ return this.http.post(`integrations/snm/${agent}/rotate-key`);
1794
+ }
1771
1795
  };
1772
1796
  //#endregion
1773
1797
  //#region src/resources/intents.ts
@@ -2256,6 +2280,9 @@ var MessagesResource = class {
2256
2280
  teams.forEach((t) => params.append("teams[]", t));
2257
2281
  return this.http.get(`messages/pending-approvals?${params.toString()}`);
2258
2282
  }
2283
+ pendingMediaImports(team) {
2284
+ return this.http.get(`media-imports/pending?team=${encodeURIComponent(team)}`, { headers: { "X-Team": team } });
2285
+ }
2259
2286
  generateAudio(messageId) {
2260
2287
  return this.http.post(`messages/${messageId}/audio`, {});
2261
2288
  }
@@ -2570,6 +2597,7 @@ var ProposalsResource = class {
2570
2597
  const query = new URLSearchParams();
2571
2598
  if (params?.page != null) query.set("page", String(params.page));
2572
2599
  if (params?.perPage != null) query.set("perPage", String(params.perPage));
2600
+ if (params?.includeArchived != null) query.set("includeArchived", String(params.includeArchived));
2573
2601
  const qs = query.toString();
2574
2602
  return this.http.get(`proposals${qs ? `?${qs}` : ""}`);
2575
2603
  }
@@ -2585,6 +2613,27 @@ var ProposalsResource = class {
2585
2613
  update(id, data) {
2586
2614
  return this.http.put(`proposals/${id}`, data);
2587
2615
  }
2616
+ delete(id) {
2617
+ return this.http.delete(`proposals/${id}`);
2618
+ }
2619
+ archive(id) {
2620
+ return this.http.post(`proposals/${id}/archive`);
2621
+ }
2622
+ publish(id) {
2623
+ return this.http.post(`proposals/${id}/publish`);
2624
+ }
2625
+ setItems(id, items) {
2626
+ return this.http.put(`proposals/${id}/items`, { items });
2627
+ }
2628
+ addItem(id, item) {
2629
+ return this.http.post(`proposals/${id}/items`, item);
2630
+ }
2631
+ updateItem(id, itemId, data) {
2632
+ return this.http.put(`proposals/${id}/items/${itemId}`, data);
2633
+ }
2634
+ removeItem(id, itemId) {
2635
+ return this.http.delete(`proposals/${id}/items/${itemId}`);
2636
+ }
2588
2637
  getShared(slug, password) {
2589
2638
  return this.http.get(`proposals/shared/${encodeURIComponent(slug)}`, access(password));
2590
2639
  }
@@ -2755,9 +2804,15 @@ var SitesResource = class {
2755
2804
  resolveByDomain(domain) {
2756
2805
  return this.http.get(`sites/resolve?domain=${encodeURIComponent(domain)}`);
2757
2806
  }
2807
+ uptime(siteId) {
2808
+ return this.http.get(`sites/${siteId}/uptime`);
2809
+ }
2758
2810
  update(siteId, data) {
2759
2811
  return this.http.put(`sites/${siteId}`, data);
2760
2812
  }
2813
+ delete(siteId) {
2814
+ return this.http.delete(`sites/${siteId}`);
2815
+ }
2761
2816
  };
2762
2817
  //#endregion
2763
2818
  //#region src/resources/skills.ts
@@ -3285,6 +3340,8 @@ var UpdatesResource = class {
3285
3340
  if (params?.perPage != null) query.set("perPage", String(params.perPage));
3286
3341
  if (params?.upcoming) query.set("filter[upcoming]", "1");
3287
3342
  if (params?.past) query.set("filter[past]", "1");
3343
+ if (params?.endsAfter) query.set("filter[ends_after]", params.endsAfter);
3344
+ if (params?.endsBefore) query.set("filter[ends_before]", params.endsBefore);
3288
3345
  const qs = query.toString();
3289
3346
  return this.http.get(`updates${qs ? "?" + qs : ""}`);
3290
3347
  }
@@ -3670,6 +3727,9 @@ var HooksResource = class {
3670
3727
  sample(agentId, source) {
3671
3728
  return this.http.get(`hooks/sample?agent=${agentId}&source=${encodeURIComponent(source)}`);
3672
3729
  }
3730
+ secret(agentId, source) {
3731
+ return this.http.get(`agents/${agentId}/hooks/${encodeURIComponent(source)}/secret`);
3732
+ }
3673
3733
  toggle(agentId, hookId) {
3674
3734
  return this.http.post(`hooks/${hookId}/toggle?agent=${agentId}`);
3675
3735
  }
@@ -3842,10 +3902,11 @@ function toWarpEnv(env) {
3842
3902
  if (env === "testnet") return "testnet";
3843
3903
  return "mainnet";
3844
3904
  }
3845
- var JoAiClient = class {
3905
+ var JoAiClient = class JoAiClient {
3846
3906
  constructor(config) {
3847
3907
  this.isReady = true;
3848
3908
  this.hasApiToken = false;
3909
+ this.config = config;
3849
3910
  this.env = config.env ?? "mainnet";
3850
3911
  const apiBaseUrl = getApiBaseUrl(config.env ?? "mainnet");
3851
3912
  const headers = {};
@@ -3939,6 +4000,21 @@ var JoAiClient = class {
3939
4000
  this.hooks = new HooksResource(this.http);
3940
4001
  this.workspace = new WorkspaceResource(this.http);
3941
4002
  }
4003
+ /** Team-scoped client without mutating this instance. */
4004
+ withTeam(team) {
4005
+ const client = new JoAiClient({
4006
+ ...this.config,
4007
+ team: team ?? void 0
4008
+ });
4009
+ client.isReady = this.isReady;
4010
+ client.hasApiToken = this.hasApiToken;
4011
+ client.http.onNetworkError = this.http.onNetworkError;
4012
+ client.http.onUnauthorized = this.http.onUnauthorized;
4013
+ client.http.onSuccessfulResponse = this.http.onSuccessfulResponse;
4014
+ client.http.onMaintenanceMode = this.http.onMaintenanceMode;
4015
+ client.http.onTooManyRequests = this.http.onTooManyRequests;
4016
+ return client;
4017
+ }
3942
4018
  clearCache() {
3943
4019
  if (this.http instanceof CachedHttpService) this.http.clearCache();
3944
4020
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/sdk",
3
- "version": "14.0.3",
3
+ "version": "14.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.9",
38
+ "@joai/core": "^5.4.11",
39
39
  "@joai/warps": "*"
40
40
  },
41
41
  "peerDependencies": {
42
- "@joai/core": "^5.4.9"
42
+ "@joai/core": "^5.4.11"
43
43
  },
44
44
  "devDependencies": {
45
45
  "tsdown": "^0.21.0",