@joai/sdk 0.15.0 → 0.15.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
@@ -288,9 +288,24 @@ type Coupon = {
288
288
  percent: number;
289
289
  expiresAt: string | null;
290
290
  };
291
- //#endregion
292
- //#region src/team/types.d.ts
293
291
  type TeamFeature = 'shop' | 'appointments';
292
+ type TeamMeta = {
293
+ 'extra.messages'?: number;
294
+ 'limit.spending'?: number | null;
295
+ 'currency'?: string;
296
+ 'extra.usage.enabled'?: boolean;
297
+ 'auto.reload.enabled'?: boolean;
298
+ 'auto.reload.threshold_cents'?: number | null;
299
+ 'auto.reload.amount_cents'?: number | null;
300
+ 'llm.provider'?: 'openai' | 'anthropic' | 'google' | 'xai' | null;
301
+ 'byok.providers'?: ByokProviders | null;
302
+ 'board.auto.enabled'?: boolean;
303
+ 'payments.online'?: boolean;
304
+ 'payments.coupons'?: boolean;
305
+ 'stock.enabled'?: boolean;
306
+ 'branding'?: TeamBrand | null;
307
+ settings: Record<string, unknown>;
308
+ };
294
309
  type Team = {
295
310
  slug: string;
296
311
  name: string;
@@ -298,7 +313,7 @@ type Team = {
298
313
  description: TranslatableValue | null;
299
314
  locale: WarpLocale;
300
315
  timezone: string;
301
- settings?: TeamSettings;
316
+ meta?: TeamMeta;
302
317
  features?: TeamFeature[];
303
318
  cover?: string | null;
304
319
  logo: string | null;
@@ -334,22 +349,6 @@ type ByokProviders = {
334
349
  xai?: ByokProviderConfig;
335
350
  klingai?: ByokProviderConfig;
336
351
  };
337
- type TeamSettings = {
338
- 'extra.messages': number;
339
- 'limit.spending': number | null;
340
- 'currency': string;
341
- 'extra.usage.enabled'?: boolean;
342
- 'auto.reload.enabled'?: boolean;
343
- 'auto.reload.threshold_cents'?: number | null;
344
- 'auto.reload.amount_cents'?: number | null;
345
- 'llm.provider'?: 'openai' | 'anthropic' | 'google' | 'xai' | null;
346
- 'byok.providers'?: ByokProviders | null;
347
- 'board.auto.enabled'?: boolean;
348
- 'payments.online'?: boolean;
349
- 'payments.coupons'?: boolean;
350
- 'stock.enabled'?: boolean;
351
- 'branding'?: TeamBrand | null;
352
- };
353
352
  //#endregion
354
353
  //#region src/flow/types.d.ts
355
354
  type FlowCategory = 'none' | 'defi' | 'nft' | 'social' | 'devtools' | 'productivity' | 'trading' | 'portfolio';
@@ -410,7 +409,7 @@ type Skill = {
410
409
  screenshots: string[];
411
410
  }; //#endregion
412
411
  //#region src/integration/types.d.ts
413
- type IntegrationType = 'none' | 'webhook' | 'api-token' | 'telegram' | 'slack' | 'whatsapp' | 'twilio' | 'n8n' | 'ai-nexus' | 'apple-health' | 'mcp' | 'x' | 'email' | 'calendar' | 'embed' | 'discord' | 'github' | 'sentry' | 'readwise';
412
+ type IntegrationType = 'none' | 'webhook' | 'api-token' | 'telegram' | 'slack' | 'whatsapp' | 'twilio' | 'n8n' | 'apple-health' | 'mcp' | 'x' | 'email' | 'calendar' | 'embed' | 'discord' | 'github' | 'sentry' | 'readwise';
414
413
  type IntegrationDetails = {
415
414
  type: IntegrationType;
416
415
  name: string;
@@ -447,6 +446,25 @@ type Room = {
447
446
  integration: Integration | null;
448
447
  }; //#endregion
449
448
  //#region src/agent/types.d.ts
449
+ type AgentCharacter = {
450
+ name: string | null;
451
+ system: string | null;
452
+ bio: string | null;
453
+ };
454
+ type Agent = {
455
+ uuid: string;
456
+ name: string;
457
+ description: string;
458
+ avatar: string;
459
+ wallets: Wallet[];
460
+ settings: AgentSettings;
461
+ marketplace: MarketplaceInfo;
462
+ character?: AgentCharacter | null;
463
+ room: Room;
464
+ role: string | null;
465
+ blueprint: Blueprint | null;
466
+ team: string;
467
+ };
450
468
  type AgentPrivate = {
451
469
  uuid: string;
452
470
  name: string;
@@ -679,7 +697,13 @@ type BlueprintShortcut = {
679
697
  chat: boolean;
680
698
  }; //#endregion
681
699
  //#region src/helpers/string.d.ts
682
- //#endregion
700
+ type PaginatedResponse<T> = {
701
+ data: T[];
702
+ current_page: number;
703
+ per_page: number;
704
+ total: number;
705
+ last_page: number;
706
+ }; //#endregion
683
707
  //#region src/service/types.d.ts
684
708
  type Service = {
685
709
  id: string;
@@ -692,10 +716,67 @@ type Service = {
692
716
  active: boolean;
693
717
  digital: boolean;
694
718
  public: boolean;
719
+ settings?: Record<string, unknown> | null;
695
720
  createdAt: string;
696
721
  updatedAt: string;
697
722
  }; //#endregion
698
- //#region src/appointment/types.d.ts
723
+ //#region src/meeting/types.d.ts
724
+ type MeetingParticipant = {
725
+ name: string | null;
726
+ profileImageUrl: string | null;
727
+ };
728
+ type MeetingSpeakerAssignment = {
729
+ speakerId: number;
730
+ name: string;
731
+ contactId: string | null;
732
+ };
733
+ type Meeting = {
734
+ id: string;
735
+ code: string;
736
+ name: string | null;
737
+ room: Room | null;
738
+ inviteUrl: string;
739
+ status: MeetingStatus;
740
+ conferenceProvider: MeetingConferenceProvider | null;
741
+ conferenceUrl: string | null;
742
+ conferenceExternalId: string | null;
743
+ captureMode: 'desktop_local' | null;
744
+ transcriptUrl: string | null;
745
+ summaryUrl: string | null;
746
+ participants?: MeetingParticipant[];
747
+ speakerAssignments?: MeetingSpeakerAssignment[] | null;
748
+ configuration?: Record<string, WarpNativeValue>;
749
+ scheduledAt: string | null;
750
+ calendarEventId: number | null;
751
+ startedAt: string | null;
752
+ endedAt: string | null;
753
+ createdAt: string;
754
+ };
755
+ type MeetingStatus = 'active' | 'completed' | 'analyzed' | 'scheduled' | 'cancelled';
756
+ type MeetingConferenceProvider = 'google_meet' | 'teams' | 'zoom';
757
+ type MeetingFeature = 'transcription' | 'summary' | 'insights' | 'actions';
758
+ type MeetingJoinTeam = {
759
+ name: string;
760
+ logo: string | null;
761
+ };
762
+ type MeetingJoinInfo = {
763
+ id: string;
764
+ code: string;
765
+ name: string | null;
766
+ inviteUrl: string;
767
+ agentName: string;
768
+ team: MeetingJoinTeam;
769
+ status: MeetingStatus;
770
+ isPhysical: boolean;
771
+ scheduledAt: string | null;
772
+ scheduledEndAt: string | null;
773
+ timezone: string;
774
+ conferenceUrl: string | null;
775
+ conferenceProvider: MeetingConferenceProvider | null;
776
+ endedAt: string | null;
777
+ canCancel: boolean;
778
+ features: Record<MeetingFeature, boolean>;
779
+ };
699
780
  type AppointmentAvailabilityService = {
700
781
  slug: string;
701
782
  name: string | null;
@@ -709,7 +790,6 @@ type AppointmentAvailabilitySlot = {
709
790
  serviceSlug: string | null;
710
791
  };
711
792
  type AppointmentAvailability = {
712
- connected: boolean;
713
793
  timezone: string;
714
794
  service: AppointmentAvailabilityService | null;
715
795
  slots: AppointmentAvailabilitySlot[];
@@ -729,6 +809,8 @@ type AppointmentPolicy = {
729
809
  conferenceEnabled: boolean | null;
730
810
  serviceSelectionEnabled?: boolean | null;
731
811
  paymentEnabled?: boolean | null;
812
+ requireApproval?: boolean | null;
813
+ agent?: Agent | null;
732
814
  };
733
815
  type AppointmentBooking = {
734
816
  id: string;
@@ -742,6 +824,7 @@ type AppointmentBooking = {
742
824
  status: string;
743
825
  attendeeEmail: string | null;
744
826
  attendeeName: string | null;
827
+ configuration?: Record<string, WarpNativeValue>;
745
828
  };
746
829
  type AppointmentRequest = {
747
830
  id: string;
@@ -757,6 +840,10 @@ type AppointmentRequest = {
757
840
  start: string;
758
841
  end: string;
759
842
  }[] | null;
843
+ configuration?: Record<string, WarpNativeValue>;
844
+ service?: Service | null;
845
+ meeting?: Meeting | null;
846
+ agent?: Agent | null;
760
847
  createdAt: string;
761
848
  }; //#endregion
762
849
  //#region src/budget/types.d.ts
@@ -874,31 +961,6 @@ type ItemCreatePayload = {
874
961
  contactIds?: string[];
875
962
  assignedToIds?: string[];
876
963
  };
877
- type MeetingStatus = 'active' | 'completed' | 'analyzed' | 'scheduled' | 'cancelled';
878
- type MeetingConferenceProvider = 'google_meet' | 'teams' | 'zoom';
879
- type MeetingFeature = 'transcription' | 'summary' | 'insights' | 'actions';
880
- type MeetingJoinTeam = {
881
- name: string;
882
- logo: string | null;
883
- };
884
- type MeetingJoinInfo = {
885
- id: string;
886
- code: string;
887
- name: string | null;
888
- inviteUrl: string;
889
- agentName: string;
890
- team: MeetingJoinTeam;
891
- status: MeetingStatus;
892
- isPhysical: boolean;
893
- scheduledAt: string | null;
894
- scheduledEndAt: string | null;
895
- timezone: string;
896
- conferenceUrl: string | null;
897
- conferenceProvider: MeetingConferenceProvider | null;
898
- endedAt: string | null;
899
- canCancel: boolean;
900
- features: Record<MeetingFeature, boolean>;
901
- };
902
964
  //#endregion
903
965
  //#region src/memory/types.d.ts
904
966
  type Memory = {
@@ -1115,6 +1177,7 @@ declare class AppointmentsResource {
1115
1177
  }[];
1116
1178
  serviceSlug?: string;
1117
1179
  appointmentRequestId?: string;
1180
+ configuration?: Record<string, WarpNativeValue>;
1118
1181
  }): Promise<IAppResponse<AppointmentBooking>>;
1119
1182
  reschedule(agentUuid: string, meetingId: string, data: {
1120
1183
  scheduledAt: string;
@@ -1123,7 +1186,7 @@ declare class AppointmentsResource {
1123
1186
  cancel(agentUuid: string, meetingId: string, data?: {
1124
1187
  reason?: string;
1125
1188
  }): Promise<IAppResponse<AppointmentBooking>>;
1126
- listRequests(agentUuid: string): Promise<IAppResponse<AppointmentRequest[]>>;
1189
+ listRequests(agentUuid?: string): Promise<IAppResponse<AppointmentRequest[]>>;
1127
1190
  createRequest(agentUuid: string, data: {
1128
1191
  title: string;
1129
1192
  requesterName?: string;
@@ -1138,6 +1201,7 @@ declare class AppointmentsResource {
1138
1201
  end: string;
1139
1202
  }[];
1140
1203
  serviceSlug?: string;
1204
+ configuration?: Record<string, WarpNativeValue>;
1141
1205
  }): Promise<IAppResponse<AppointmentRequest>>;
1142
1206
  updateRequest(agentUuid: string, requestId: string, data: {
1143
1207
  status?: string;
@@ -1291,10 +1355,18 @@ declare class ContactsResource {
1291
1355
  update(id: string, data: ContactFormData): Promise<IAppResponse<Contact>>;
1292
1356
  delete(id: string): Promise<IAppResponse<unknown>>;
1293
1357
  listActivities(id: string): Promise<IAppResponse<ContactActivity[]>>;
1358
+ getTimeline<T = Record<string, unknown>>(id: string, page?: number): Promise<IAppResponse<PaginatedResponse<T>>>;
1294
1359
  addActivity(id: string, data: {
1295
1360
  type: ContactActivity['type'];
1296
1361
  description?: string;
1362
+ meta?: Record<string, unknown>;
1363
+ }): Promise<IAppResponse<ContactActivity>>;
1364
+ updateActivity(id: string, activityId: string, data: {
1365
+ type?: ContactActivity['type'];
1366
+ description?: string | null;
1367
+ meta?: Record<string, unknown> | null;
1297
1368
  }): Promise<IAppResponse<ContactActivity>>;
1369
+ deleteActivity(id: string, activityId: string): Promise<IAppResponse<unknown>>;
1298
1370
  }
1299
1371
  //#endregion
1300
1372
  //#region src/resources/documents.d.ts
@@ -1331,8 +1403,21 @@ declare class GoalsResource {
1331
1403
  //#region src/resources/meetings.d.ts
1332
1404
  declare class MeetingsResource {
1333
1405
  private readonly http;
1334
- constructor(http: IHttpService);
1406
+ private readonly config;
1407
+ constructor(http: IHttpService, config: JoAiClientConfig);
1408
+ listUpcoming(): Promise<IAppResponse<Meeting[]>>;
1409
+ get(id: string): Promise<IAppResponse<Meeting>>;
1410
+ getSummary(id: string): Promise<IAppResponse<{
1411
+ content: string;
1412
+ }>>;
1335
1413
  join(code: string): Promise<IAppResponse<MeetingJoinInfo>>;
1414
+ cancel(code: string): Promise<IAppResponse<Meeting>>;
1415
+ share(id: string, recipients: {
1416
+ name: string;
1417
+ email: string;
1418
+ }[]): Promise<IAppResponse<unknown>>;
1419
+ update(id: string, name: string | null, notify?: boolean, speakers?: MeetingSpeakerAssignment[]): Promise<IAppResponse<Meeting>>;
1420
+ finalize(id: string, notify: boolean): Promise<IAppResponse<unknown>>;
1336
1421
  }
1337
1422
  //#endregion
1338
1423
  //#region src/resources/media.d.ts
@@ -1518,6 +1603,12 @@ declare class StoresResource {
1518
1603
  declare class UpdatesResource {
1519
1604
  private readonly http;
1520
1605
  constructor(http: IHttpService);
1606
+ listPublic(params?: {
1607
+ type?: string;
1608
+ tags?: string;
1609
+ }): Promise<IAppResponse<{
1610
+ data: Update[];
1611
+ }>>;
1521
1612
  list(params?: {
1522
1613
  type?: UpdateType;
1523
1614
  active?: boolean;
@@ -1682,4 +1773,4 @@ declare class DistributionResource {
1682
1773
  private fetchDistribution;
1683
1774
  }
1684
1775
  //#endregion
1685
- export { AppointmentsResource, AuthResource, type AuthSendCodeRequest, type AuthVerifyResponse, type BackendWarp, type BackendWarpBrand, BlueprintsResource, type CacheConfig, CachedHttpService, CartsResource, DistributionResource, FlowsResource, IngestionsResource, JoAiClient, type JoAiClientConfig, MarketplaceResource, MeetingsResource, type Order, OrdersResource, type Product, type ProductVariation, ProductsResource, ServicesResource, SitesResource, SkillsResource, StoresResource, SubscriptionsResource, WarpsResource, createClient };
1776
+ export { AppointmentsResource, AuthResource, type AuthSendCodeRequest, type AuthVerifyResponse, type BackendWarp, type BackendWarpBrand, BlueprintsResource, type CacheConfig, CachedHttpService, CartsResource, ContactsResource, DistributionResource, FlowsResource, IngestionsResource, JoAiClient, type JoAiClientConfig, MarketplaceResource, MeetingsResource, type Order, OrdersResource, type Product, type ProductVariation, ProductsResource, ServicesResource, SitesResource, SkillsResource, StoresResource, SubscriptionsResource, WarpsResource, createClient };
package/dist/index.mjs CHANGED
@@ -135,7 +135,8 @@ var AppointmentsResource = class {
135
135
  return this.http.post(`agents/${agentUuid}/appointments/${meetingId}/cancel`, data ?? {});
136
136
  }
137
137
  listRequests(agentUuid) {
138
- return this.http.get(`agents/${agentUuid}/appointment-requests`);
138
+ const params = agentUuid ? `?agent=${encodeURIComponent(agentUuid)}` : "";
139
+ return this.http.get(`teams/${this.config.team}/appointment-requests${params}`);
139
140
  }
140
141
  createRequest(agentUuid, data) {
141
142
  return this.http.post(`agents/${agentUuid}/appointment-requests`, data);
@@ -204,10 +205,10 @@ var CartsResource = class {
204
205
  this.http = http;
205
206
  }
206
207
  get() {
207
- return this.http.get("v1/cart");
208
+ return this.http.get("cart");
208
209
  }
209
210
  add(type, id, quantity = 1, configuration) {
210
- return this.http.post("v1/cart/add", {
211
+ return this.http.post("cart/add", {
211
212
  id,
212
213
  type,
213
214
  quantity,
@@ -215,23 +216,23 @@ var CartsResource = class {
215
216
  });
216
217
  }
217
218
  remove(type, id) {
218
- return this.http.post("v1/cart/remove", {
219
+ return this.http.post("cart/remove", {
219
220
  id,
220
221
  type
221
222
  });
222
223
  }
223
224
  updateQuantity(type, id, quantity) {
224
- return this.http.post("v1/cart/quantity", {
225
+ return this.http.post("cart/quantity", {
225
226
  id,
226
227
  type,
227
228
  quantity
228
229
  });
229
230
  }
230
231
  clear() {
231
- return this.http.post("v1/cart/clear");
232
+ return this.http.post("cart/clear");
232
233
  }
233
234
  applyCoupon(code) {
234
- return this.http.post("v1/cart/coupon", { code });
235
+ return this.http.post("cart/coupon", { code });
235
236
  }
236
237
  };
237
238
  //#endregion
@@ -371,9 +372,18 @@ var ContactsResource = class {
371
372
  listActivities(id) {
372
373
  return this.http.get(`contacts/${id}/activities`);
373
374
  }
375
+ getTimeline(id, page = 1) {
376
+ return this.http.get(`contacts/${id}/timeline?page=${page}`);
377
+ }
374
378
  addActivity(id, data) {
375
379
  return this.http.post(`contacts/${id}/activities`, data);
376
380
  }
381
+ updateActivity(id, activityId, data) {
382
+ return this.http.put(`contacts/${id}/activities/${activityId}`, data);
383
+ }
384
+ deleteActivity(id, activityId) {
385
+ return this.http.delete(`contacts/${id}/activities/${activityId}`);
386
+ }
377
387
  };
378
388
  //#endregion
379
389
  //#region src/resources/documents.ts
@@ -418,12 +428,38 @@ var GoalsResource = class {
418
428
  //#endregion
419
429
  //#region src/resources/meetings.ts
420
430
  var MeetingsResource = class {
421
- constructor(http) {
431
+ constructor(http, config) {
422
432
  this.http = http;
433
+ this.config = config;
434
+ }
435
+ listUpcoming() {
436
+ return this.http.get(`teams/${this.config.team}/meetings/upcoming`);
437
+ }
438
+ get(id) {
439
+ return this.http.get(`meetings/${id}`);
440
+ }
441
+ getSummary(id) {
442
+ return this.http.get(`meetings/${id}/summary`);
423
443
  }
424
444
  join(code) {
425
445
  return this.http.get(`meetings/join/${code}`);
426
446
  }
447
+ cancel(code) {
448
+ return this.http.post(`meetings/cancel/${code}`, {});
449
+ }
450
+ share(id, recipients) {
451
+ return this.http.post(`meetings/${id}/share`, { recipients });
452
+ }
453
+ update(id, name, notify, speakers) {
454
+ return this.http.put(`meetings/${id}`, {
455
+ name,
456
+ ...notify !== void 0 && { notify },
457
+ ...speakers !== void 0 && { speakers }
458
+ });
459
+ }
460
+ finalize(id, notify) {
461
+ return this.http.post(`meetings/${id}/finalize`, { notify });
462
+ }
427
463
  };
428
464
  //#endregion
429
465
  //#region src/resources/media.ts
@@ -650,6 +686,13 @@ var UpdatesResource = class {
650
686
  constructor(http) {
651
687
  this.http = http;
652
688
  }
689
+ listPublic(params) {
690
+ const query = new URLSearchParams();
691
+ if (params?.type) query.set("type", params.type);
692
+ if (params?.tags) query.set("tags", params.tags);
693
+ const qs = query.toString();
694
+ return this.http.get(`updates/public${qs ? "?" + qs : ""}`);
695
+ }
653
696
  list(params) {
654
697
  const query = new URLSearchParams();
655
698
  if (params?.type) query.set("type", params.type);
@@ -881,7 +924,7 @@ var JoAiClient = class {
881
924
  this.reminders = new RemindersResource(this.http);
882
925
  this.sites = new SitesResource(this.http);
883
926
  this.documents = new DocumentsResource(this.http);
884
- this.meetings = new MeetingsResource(this.http);
927
+ this.meetings = new MeetingsResource(this.http, config);
885
928
  this.media = new MediaResource(this.http);
886
929
  this.stores = new StoresResource(this.http);
887
930
  this.products = new ProductsResource(this.http);
@@ -936,4 +979,4 @@ var DistributionResource = class {
936
979
  }
937
980
  };
938
981
  //#endregion
939
- export { AppointmentsResource, AuthResource, BlueprintsResource, CachedHttpService, CartsResource, DistributionResource, FlowsResource, IngestionsResource, JoAiClient, MarketplaceResource, MeetingsResource, OrdersResource, ProductsResource, ServicesResource, SitesResource, SkillsResource, StoresResource, SubscriptionsResource, WarpsResource, createClient };
982
+ export { AppointmentsResource, AuthResource, BlueprintsResource, CachedHttpService, CartsResource, ContactsResource, DistributionResource, FlowsResource, IngestionsResource, JoAiClient, MarketplaceResource, MeetingsResource, OrdersResource, ProductsResource, ServicesResource, SitesResource, SkillsResource, StoresResource, SubscriptionsResource, WarpsResource, createClient };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/sdk",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "JoAi public API SDK — build with your AI agents",
5
5
  "license": "MIT",
6
6
  "type": "module",