@joai/sdk 13.0.0 → 13.0.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
@@ -608,39 +608,43 @@ type OpeningHoursFormatOptions = {
608
608
  timeRangeSeparator?: string;
609
609
  };
610
610
  declare const formatOpeningHours: (availability: OpeningHoursAvailability, options?: OpeningHoursFormatOptions) => OpeningHoursEntry[];
611
+ type AppointmentAvailabilityParams = {
612
+ windowStart: string;
613
+ windowEnd: string;
614
+ durationMinutes: number;
615
+ timezone?: string;
616
+ limit?: number;
617
+ serviceSlug?: string;
618
+ quantity?: number;
619
+ };
620
+ type AppointmentBookData = {
621
+ title: string;
622
+ scheduledAt: string;
623
+ description?: string;
624
+ conferenceProvider?: string;
625
+ timezone?: string;
626
+ attendeeEmail?: string;
627
+ attendeeName?: string;
628
+ contactIds?: string[];
629
+ attendees?: {
630
+ email: string;
631
+ name?: string;
632
+ }[];
633
+ serviceSlug?: string;
634
+ appointmentRequestId?: string;
635
+ configuration?: Configuration;
636
+ quantity?: number;
637
+ };
611
638
  declare class AppointmentsResource {
612
639
  private readonly http;
613
640
  private readonly config;
614
641
  constructor(http: IHttpService, config: JoAiClientConfig);
615
642
  getPolicy(): Promise<_$_joai_core0.IAppResponse<AppointmentPolicy | null>>;
616
643
  upsertPolicy(data: AppointmentPolicyUpsert): Promise<_$_joai_core0.IAppResponse<AppointmentPolicy>>;
617
- checkAvailability(agentUuid: string, params: {
618
- windowStart: string;
619
- windowEnd: string;
620
- durationMinutes: number;
621
- timezone?: string;
622
- limit?: number;
623
- serviceSlug?: string;
624
- quantity?: number;
625
- }): Promise<_$_joai_core0.IAppResponse<AppointmentAvailability>>;
626
- book(agentUuid: string, data: {
627
- title: string;
628
- scheduledAt: string;
629
- description?: string;
630
- conferenceProvider?: string;
631
- timezone?: string;
632
- attendeeEmail?: string;
633
- attendeeName?: string;
634
- contactIds?: string[];
635
- attendees?: {
636
- email: string;
637
- name?: string;
638
- }[];
639
- serviceSlug?: string;
640
- appointmentRequestId?: string;
641
- configuration?: Configuration;
642
- quantity?: number;
643
- }): Promise<_$_joai_core0.IAppResponse<AppointmentBooking>>;
644
+ checkAvailability(agentUuid: string, params: AppointmentAvailabilityParams): Promise<_$_joai_core0.IAppResponse<AppointmentAvailability>>;
645
+ checkStaffAvailability(agentUuid: string, params: AppointmentAvailabilityParams): Promise<_$_joai_core0.IAppResponse<AppointmentAvailability>>;
646
+ book(agentUuid: string, data: AppointmentBookData): Promise<_$_joai_core0.IAppResponse<AppointmentBooking>>;
647
+ bookAsStaff(agentUuid: string, data: AppointmentBookData): Promise<_$_joai_core0.IAppResponse<AppointmentBooking>>;
644
648
  reschedule(agentUuid: string, meetingId: string, data: {
645
649
  scheduledAt: string;
646
650
  timezone?: string;
package/dist/index.mjs CHANGED
@@ -1007,9 +1007,21 @@ var AppointmentsResource = class {
1007
1007
  checkAvailability(agentUuid, params) {
1008
1008
  return this.http.post(`agents/${agentUuid}/appointments/availability`, params);
1009
1009
  }
1010
+ checkStaffAvailability(agentUuid, params) {
1011
+ return this.http.post(`teams/${this.config.team}/appointments/availability`, {
1012
+ agentUuid,
1013
+ ...params
1014
+ });
1015
+ }
1010
1016
  book(agentUuid, data) {
1011
1017
  return this.http.post(`agents/${agentUuid}/appointments/book`, data);
1012
1018
  }
1019
+ bookAsStaff(agentUuid, data) {
1020
+ return this.http.post(`teams/${this.config.team}/appointments/book`, {
1021
+ agentUuid,
1022
+ ...data
1023
+ });
1024
+ }
1013
1025
  reschedule(agentUuid, meetingId, data) {
1014
1026
  return this.http.post(`agents/${agentUuid}/appointments/${meetingId}/reschedule`, data);
1015
1027
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/sdk",
3
- "version": "13.0.0",
3
+ "version": "13.0.1",
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.0",
38
+ "@joai/core": "^5.4.1",
39
39
  "@joai/warps": "*"
40
40
  },
41
41
  "peerDependencies": {
42
- "@joai/core": "^5.4.0"
42
+ "@joai/core": "^5.4.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "tsdown": "^0.21.0",