@joai/sdk 14.0.4 → 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, SiteUptime, 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>>;
@@ -2553,6 +2582,10 @@ declare class HooksResource {
2553
2582
  list(agentId: string): Promise<_$_joai_core0.IAppResponse<Hook$1[]>>;
2554
2583
  create(agentId: string, payload: CreateHookPayload$1): Promise<_$_joai_core0.IAppResponse<Hook$1>>;
2555
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
+ }>>;
2556
2589
  toggle(agentId: string, hookId: string): Promise<_$_joai_core0.IAppResponse<Hook$1>>;
2557
2590
  removeByHook(agentId: string, hookId: string): Promise<_$_joai_core0.IAppResponse<void>>;
2558
2591
  removeByWarp(agentId: string, warpIdentifier: string): Promise<_$_joai_core0.IAppResponse<void>>;
@@ -2579,6 +2612,7 @@ interface JoAiClientConfig {
2579
2612
  declare class JoAiClient {
2580
2613
  readonly http: IHttpService;
2581
2614
  private readonly env;
2615
+ private readonly config;
2582
2616
  isReady: boolean;
2583
2617
  hasApiToken: boolean;
2584
2618
  readonly agents: AgentsResource;
@@ -2660,6 +2694,8 @@ declare class JoAiClient {
2660
2694
  readonly hooks: HooksResource;
2661
2695
  readonly workspace: WorkspaceResource;
2662
2696
  constructor(config: JoAiClientConfig);
2697
+ /** Team-scoped client without mutating this instance. */
2698
+ withTeam(team?: string | null): JoAiClient;
2663
2699
  clearCache(): void;
2664
2700
  warps(locale?: WarpLocale, currentUrl?: string): WarpClient;
2665
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
  }
@@ -3678,6 +3727,9 @@ var HooksResource = class {
3678
3727
  sample(agentId, source) {
3679
3728
  return this.http.get(`hooks/sample?agent=${agentId}&source=${encodeURIComponent(source)}`);
3680
3729
  }
3730
+ secret(agentId, source) {
3731
+ return this.http.get(`agents/${agentId}/hooks/${encodeURIComponent(source)}/secret`);
3732
+ }
3681
3733
  toggle(agentId, hookId) {
3682
3734
  return this.http.post(`hooks/${hookId}/toggle?agent=${agentId}`);
3683
3735
  }
@@ -3850,10 +3902,11 @@ function toWarpEnv(env) {
3850
3902
  if (env === "testnet") return "testnet";
3851
3903
  return "mainnet";
3852
3904
  }
3853
- var JoAiClient = class {
3905
+ var JoAiClient = class JoAiClient {
3854
3906
  constructor(config) {
3855
3907
  this.isReady = true;
3856
3908
  this.hasApiToken = false;
3909
+ this.config = config;
3857
3910
  this.env = config.env ?? "mainnet";
3858
3911
  const apiBaseUrl = getApiBaseUrl(config.env ?? "mainnet");
3859
3912
  const headers = {};
@@ -3947,6 +4000,21 @@ var JoAiClient = class {
3947
4000
  this.hooks = new HooksResource(this.http);
3948
4001
  this.workspace = new WorkspaceResource(this.http);
3949
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
+ }
3950
4018
  clearCache() {
3951
4019
  if (this.http instanceof CachedHttpService) this.http.clearCache();
3952
4020
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/sdk",
3
- "version": "14.0.4",
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.10",
38
+ "@joai/core": "^5.4.11",
39
39
  "@joai/warps": "*"
40
40
  },
41
41
  "peerDependencies": {
42
- "@joai/core": "^5.4.10"
42
+ "@joai/core": "^5.4.11"
43
43
  },
44
44
  "devDependencies": {
45
45
  "tsdown": "^0.21.0",