@joai/sdk 0.16.0 → 0.17.1

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
@@ -138,6 +138,15 @@ type Wallet = {
138
138
  privateKey?: string;
139
139
  mnemonic?: string;
140
140
  };
141
+ type User = {
142
+ id: string;
143
+ name: string;
144
+ address: string;
145
+ balance: number | null;
146
+ hasProfileImage: boolean;
147
+ profileImageUrl: string;
148
+ swarmRole: string | null;
149
+ };
141
150
  //#endregion
142
151
  //#region src/billing/types.d.ts
143
152
  type TranslatableValue = Partial<Record<WarpLocale, string>>;
@@ -157,6 +166,39 @@ type AppSubscription = {
157
166
  createdAt: string;
158
167
  updatedAt: string;
159
168
  };
169
+ type PaymentProvider = 'xmoney' | 'lemonsqueezy' | 'stripe' | 'apple' | 'google' | 'blockchain' | 'offline';
170
+ type PlanFeature = 'general' | 'messages' | 'team-members' | 'teams' | 'support' | 'agent' | 'auto-mode' | 'cloud-sync' | 'wallet-cloud' | 'wallet-cloud-premium' | 'wallet-multi' | 'cards' | 'alerts' | 'advanced-commands' | 'tasks' | 'integrations' | 'message-history' | 'memory' | 'documents' | 'voice-input' | 'voice-live' | 'image-gen' | 'video-gen' | 'openclaw' | 'skills' | 'items' | 'context-length' | 'workspace-storage' | 'ingestions' | 'agent-email' | 'streak-freezes' | 'byok' | 'mcp' | 'phone-call' | 'phone-number' | 'custom-domain' | 'contacts' | 'links' | 'store-fee-rate' | 'store-fee-rate-physical';
171
+ type PlanBenefit = {
172
+ label: Partial<Record<WarpLocale, string>>;
173
+ tip?: Partial<Record<WarpLocale, string>>;
174
+ secondary?: boolean;
175
+ };
176
+ type PlanExtra = {
177
+ amount: number;
178
+ price: number;
179
+ unitName: string;
180
+ };
181
+ type PlanInterval = 'weekly' | 'monthly' | 'yearly' | 'lifetime';
182
+ type Plan = {
183
+ resource: 'plan';
184
+ sku: string;
185
+ name: TranslatableValue;
186
+ description: Partial<Record<WarpLocale, string>>;
187
+ price: number;
188
+ priceDisplay: string;
189
+ interval: PlanInterval;
190
+ intervalDisplay: PlanInterval;
191
+ features: PlanFeature[];
192
+ benefits: Record<PlanFeature, PlanBenefit>;
193
+ limits: Record<PlanFeature, string>;
194
+ extras: Record<PlanFeature, PlanExtra>;
195
+ meta: {
196
+ appleProductId: string | null;
197
+ googleProductId: string | null;
198
+ trialPeriodDays: number;
199
+ isLifetime: boolean;
200
+ };
201
+ };
160
202
  type ProductRating = {
161
203
  average: number;
162
204
  count: number;
@@ -341,6 +383,38 @@ type TeamBrand = {
341
383
  invoiceZip?: string;
342
384
  invoiceCountry?: string;
343
385
  };
386
+ type TeamPrivate = {
387
+ slug: string;
388
+ name: string;
389
+ personal: boolean;
390
+ description: TranslatableValue | null;
391
+ tagline: TranslatableValue | null;
392
+ balance: number;
393
+ locale: WarpLocale;
394
+ timezone: string;
395
+ logo: string | null;
396
+ cover: string | null;
397
+ subscription: {
398
+ premium: boolean;
399
+ lifetime: boolean;
400
+ plan: Plan;
401
+ provider: PaymentProvider | null;
402
+ payer: User | null;
403
+ gracePeriod: boolean;
404
+ autoRenew: boolean;
405
+ uncapped: boolean;
406
+ cycleEndsAt: string | null;
407
+ resetsAt: string | null;
408
+ startedAt: string | null;
409
+ renewedAt: string | null;
410
+ expiresAt: string | null;
411
+ };
412
+ meta: TeamMeta;
413
+ branding: TeamBrand;
414
+ category?: TeamCategory;
415
+ createdAt: string;
416
+ justCreated: boolean;
417
+ };
344
418
  type ByokProviderConfig = {
345
419
  apiKey?: string;
346
420
  accessKey?: string;
@@ -871,13 +945,14 @@ type Contact = {
871
945
  locale?: string | null;
872
946
  props?: Record<string, string> | null;
873
947
  };
948
+ type ContactActivityType = 'note' | 'call' | 'meeting' | 'task' | 'update' | 'custom' | 'form';
874
949
  type ContactActivityAuthor = {
875
950
  name: string;
876
951
  imageUrl: string | null;
877
952
  };
878
953
  type ContactActivity = {
879
954
  id: string;
880
- type: 'note' | 'call' | 'meeting' | 'email' | 'task' | 'update' | 'custom';
955
+ type: ContactActivityType;
881
956
  description: string | null;
882
957
  meta: Record<string, any> | null;
883
958
  agentName: string | null;
@@ -1151,6 +1226,7 @@ type StoreToggleResult = {
1151
1226
  //#region src/update/types.d.ts
1152
1227
  type UpdateType = 'deal' | 'event' | 'update';
1153
1228
  type UpdateStatus = 'draft' | 'published' | 'archived';
1229
+ type UpdateRelation = 'team';
1154
1230
  type Update = {
1155
1231
  id: string;
1156
1232
  type: UpdateType;
@@ -1409,6 +1485,7 @@ declare class ContactsResource {
1409
1485
  constructor(http: IHttpService);
1410
1486
  list(params?: {
1411
1487
  search?: string;
1488
+ page?: number;
1412
1489
  }): Promise<IAppResponse<{
1413
1490
  data: Contact[];
1414
1491
  }>>;
@@ -1535,12 +1612,18 @@ declare class MemoriesResource {
1535
1612
  constructor(http: IHttpService);
1536
1613
  list(params?: {
1537
1614
  search?: string;
1615
+ contactId?: string;
1538
1616
  }): Promise<IAppResponse<{
1539
1617
  data: Memory[];
1540
1618
  }>>;
1541
1619
  add(payload: {
1542
1620
  agentId: string;
1543
1621
  content: string;
1622
+ contactId?: string;
1623
+ }): Promise<IAppResponse<Memory>>;
1624
+ update(id: string, data: {
1625
+ name: string;
1626
+ content: string;
1544
1627
  }): Promise<IAppResponse<Memory>>;
1545
1628
  delete(id: string): Promise<IAppResponse<unknown>>;
1546
1629
  }
@@ -1647,6 +1730,9 @@ declare class TeamsResource {
1647
1730
  email: string;
1648
1731
  role: 'owner' | 'admin' | 'member';
1649
1732
  }): Promise<IAppResponse<unknown>>;
1733
+ updateLogo(teamSlug: string, logo: MediaLibraryItems): Promise<IAppResponse<TeamPrivate>>;
1734
+ updateCover(teamSlug: string, cover: MediaLibraryItems): Promise<IAppResponse<TeamPrivate>>;
1735
+ updateSetting(teamSlug: string, key: string, value: boolean | string | number | object | null): Promise<IAppResponse<TeamPrivate>>;
1650
1736
  }
1651
1737
  //#endregion
1652
1738
  //#region src/resources/stores.d.ts
@@ -1676,12 +1762,14 @@ declare class UpdatesResource {
1676
1762
  listPublic(params?: {
1677
1763
  type?: string;
1678
1764
  tags?: string;
1765
+ with?: UpdateRelation[];
1679
1766
  }): Promise<IAppResponse<{
1680
1767
  data: Update[];
1681
1768
  }>>;
1682
1769
  list(params?: {
1683
1770
  type?: UpdateType;
1684
1771
  active?: boolean;
1772
+ with?: UpdateRelation[];
1685
1773
  }): Promise<IAppResponse<{
1686
1774
  data: Update[];
1687
1775
  }>>;
package/dist/index.mjs CHANGED
@@ -431,6 +431,7 @@ var ContactsResource = class {
431
431
  list(params) {
432
432
  const query = new URLSearchParams();
433
433
  if (params?.search) query.set("search", params.search);
434
+ if (params?.page) query.set("page", String(params.page));
434
435
  const qs = query.toString();
435
436
  return this.http.get(`contacts${qs ? "?" + qs : ""}`);
436
437
  }
@@ -611,12 +612,16 @@ var MemoriesResource = class {
611
612
  list(params) {
612
613
  const query = new URLSearchParams();
613
614
  if (params?.search) query.set("search", params.search);
615
+ if (params?.contactId) query.set("contactId", params.contactId);
614
616
  const qs = query.toString();
615
617
  return this.http.get(`memories${qs ? "?" + qs : ""}`);
616
618
  }
617
619
  add(payload) {
618
620
  return this.http.post("memories", payload);
619
621
  }
622
+ update(id, data) {
623
+ return this.http.put(`memories/${id}`, data);
624
+ }
620
625
  delete(id) {
621
626
  return this.http.delete(`memories/${id}`);
622
627
  }
@@ -731,6 +736,15 @@ var TeamsResource = class {
731
736
  invite(teamSlug, payload) {
732
737
  return this.http.post(`teams/${teamSlug}/invitations`, payload);
733
738
  }
739
+ updateLogo(teamSlug, logo) {
740
+ return this.http.post(`teams/${teamSlug}/logo`, { logo });
741
+ }
742
+ updateCover(teamSlug, cover) {
743
+ return this.http.post(`teams/${teamSlug}/cover`, { cover });
744
+ }
745
+ updateSetting(teamSlug, key, value) {
746
+ return this.http.put(`teams/${teamSlug}/settings/${key}`, { value });
747
+ }
734
748
  };
735
749
  //#endregion
736
750
  //#region src/resources/stores.ts
@@ -776,6 +790,7 @@ var UpdatesResource = class {
776
790
  const query = new URLSearchParams();
777
791
  if (params?.type) query.set("type", params.type);
778
792
  if (params?.tags) query.set("tags", params.tags);
793
+ if (params?.with?.length) query.set("with", params.with.join(","));
779
794
  const qs = query.toString();
780
795
  return this.http.get(`updates/public${qs ? "?" + qs : ""}`);
781
796
  }
@@ -783,6 +798,7 @@ var UpdatesResource = class {
783
798
  const query = new URLSearchParams();
784
799
  if (params?.type) query.set("type", params.type);
785
800
  if (params?.active != null) query.set("active", String(params.active));
801
+ if (params?.with?.length) query.set("with", params.with.join(","));
786
802
  const qs = query.toString();
787
803
  return this.http.get(`updates${qs ? "?" + qs : ""}`);
788
804
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/sdk",
3
- "version": "0.16.0",
3
+ "version": "0.17.1",
4
4
  "description": "JoAi public API SDK — build with your AI agents",
5
5
  "license": "MIT",
6
6
  "type": "module",