@arbol-ai/sdk 4.0.0 → 5.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/README.md +15 -3
- package/dist/agenda/appointments/client.d.ts +165 -52
- package/dist/agenda/appointments/client.js +19 -11
- package/dist/agenda/appointments/index.d.ts +1 -1
- package/dist/agenda/availability/client.d.ts +11 -72
- package/dist/agenda/availability/client.js +5 -14
- package/dist/agenda/availability/index.d.ts +1 -1
- package/dist/agenda/bookingLocations/client.d.ts +51 -0
- package/dist/agenda/bookingLocations/client.js +19 -0
- package/dist/agenda/bookingLocations/index.d.ts +4 -0
- package/dist/agenda/bookingLocations/index.js +4 -0
- package/dist/agenda/bookingOfferings/client.d.ts +82 -0
- package/dist/agenda/bookingOfferings/client.js +18 -0
- package/dist/agenda/bookingOfferings/index.d.ts +5 -0
- package/dist/agenda/bookingOfferings/index.js +4 -0
- package/dist/agenda/bookingOfferings/models.d.ts +92 -0
- package/dist/agenda/bookingOfferings/models.js +3 -0
- package/dist/agenda/bookingRequirements/client.d.ts +118 -0
- package/dist/agenda/bookingRequirements/client.js +18 -0
- package/dist/agenda/bookingRequirements/index.d.ts +4 -0
- package/dist/agenda/bookingRequirements/index.js +4 -0
- package/dist/agenda/bookingSlots/client.d.ts +78 -0
- package/dist/agenda/bookingSlots/client.js +19 -0
- package/dist/agenda/bookingSlots/index.d.ts +4 -0
- package/dist/agenda/bookingSlots/index.js +4 -0
- package/dist/agenda/bookings/client.d.ts +44 -375
- package/dist/agenda/bookings/client.js +10 -52
- package/dist/agenda/bookings/index.d.ts +2 -2
- package/dist/agenda/bookings/models.d.ts +0 -92
- package/dist/agenda/client.d.ts +14 -0
- package/dist/agenda/client.js +35 -0
- package/dist/agenda/firstAvailability/client.d.ts +74 -0
- package/dist/agenda/firstAvailability/client.js +19 -0
- package/dist/agenda/firstAvailability/index.d.ts +5 -0
- package/dist/agenda/firstAvailability/index.js +4 -0
- package/dist/agenda/firstAvailability/models.d.ts +31 -0
- package/dist/agenda/firstAvailability/models.js +7 -0
- package/dist/agenda/index.d.ts +1 -1
- package/dist/agenda/models.d.ts +19 -94
- package/dist/agenda/models.js +0 -3
- package/dist/agenda/nearestBookingSlots/client.d.ts +93 -0
- package/dist/agenda/nearestBookingSlots/client.js +19 -0
- package/dist/agenda/nearestBookingSlots/index.d.ts +5 -0
- package/dist/agenda/nearestBookingSlots/index.js +4 -0
- package/dist/agenda/nearestBookingSlots/models.d.ts +38 -0
- package/dist/agenda/nearestBookingSlots/models.js +7 -0
- package/dist/agenda/offerings/client.d.ts +2 -2
- package/dist/agenda/offerings/client.js +1 -1
- package/dist/agenda/resourceSchedules/client.d.ts +75 -0
- package/dist/agenda/resourceSchedules/client.js +19 -0
- package/dist/agenda/resourceSchedules/index.d.ts +4 -0
- package/dist/agenda/resourceSchedules/index.js +4 -0
- package/dist/agenda/resources/client.d.ts +2 -2
- package/dist/agenda/resources/client.js +1 -1
- package/dist/agenda/scheduleRules/client.d.ts +125 -85
- package/dist/agenda/scheduleRules/client.js +17 -16
- package/dist/agenda/scheduleRules/index.d.ts +2 -1
- package/dist/agenda/scheduleRules/models.d.ts +33 -0
- package/dist/agenda/scheduleRules/models.js +6 -0
- package/dist/agenda/services/client.d.ts +2 -2
- package/dist/agenda/services/client.js +1 -1
- package/dist/agenda/waitlist/client.d.ts +40 -29
- package/dist/agenda/waitlist/client.js +4 -4
- package/dist/agenda/waitlist/index.d.ts +1 -1
- package/dist/agenda/waitlist/models.d.ts +17 -0
- package/dist/agenda/waitlist/models.js +4 -1
- package/dist/axxa/authorizations/client.d.ts +3 -35
- package/dist/axxa/authorizations/client.js +1 -1
- package/dist/axxa/authorizations/index.d.ts +1 -0
- package/dist/axxa/authorizations/models.d.ts +112 -0
- package/dist/axxa/authorizations/models.js +3 -0
- package/dist/axxa/connections/client.d.ts +19 -45
- package/dist/axxa/connections/client.js +10 -11
- package/dist/axxa/connections/index.d.ts +1 -0
- package/dist/axxa/connections/models.d.ts +269 -0
- package/dist/axxa/connections/models.js +3 -0
- package/dist/axxa/eligibility/client.d.ts +3 -25
- package/dist/axxa/eligibility/client.js +1 -1
- package/dist/axxa/eligibility/index.d.ts +1 -0
- package/dist/axxa/eligibility/models.d.ts +102 -0
- package/dist/axxa/eligibility/models.js +3 -0
- package/dist/axxa/index.d.ts +1 -1
- package/dist/axxa/models.d.ts +243 -168
- package/dist/axxa/provider/client.d.ts +5 -11
- package/dist/axxa/provider/client.js +1 -1
- package/dist/axxa/provider/index.d.ts +1 -0
- package/dist/axxa/provider/models.d.ts +87 -0
- package/dist/axxa/provider/models.js +3 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +5 -0
- package/dist/gmedic/agendaServices/client.d.ts +13 -9
- package/dist/gmedic/agendaServices/client.js +2 -2
- package/dist/gmedic/agendaServices/index.d.ts +1 -1
- package/dist/gmedic/agendaServices/models.d.ts +53 -1
- package/dist/gmedic/agendas/client.d.ts +16 -9
- package/dist/gmedic/agendas/client.js +2 -2
- package/dist/gmedic/agendas/index.d.ts +1 -1
- package/dist/gmedic/agendas/models.d.ts +53 -1
- package/dist/gmedic/appointments/client.d.ts +34 -241
- package/dist/gmedic/appointments/client.js +12 -10
- package/dist/gmedic/appointments/index.d.ts +1 -1
- package/dist/gmedic/appointments/models.d.ts +518 -1
- package/dist/gmedic/appointments/models.js +28 -2
- package/dist/gmedic/availability/client.d.ts +24 -10
- package/dist/gmedic/availability/client.js +4 -3
- package/dist/gmedic/availability/index.d.ts +1 -1
- package/dist/gmedic/availability/models.d.ts +57 -1
- package/dist/gmedic/availability/models.js +7 -1
- package/dist/gmedic/availableDays/client.d.ts +11 -8
- package/dist/gmedic/availableDays/client.js +1 -1
- package/dist/gmedic/availableDays/index.d.ts +1 -1
- package/dist/gmedic/availableDays/models.d.ts +53 -1
- package/dist/gmedic/branchOffices/client.d.ts +13 -9
- package/dist/gmedic/branchOffices/client.js +2 -2
- package/dist/gmedic/branchOffices/index.d.ts +1 -1
- package/dist/gmedic/branchOffices/models.d.ts +58 -1
- package/dist/gmedic/connections/client.d.ts +19 -42
- package/dist/gmedic/connections/client.js +10 -11
- package/dist/gmedic/connections/index.d.ts +1 -0
- package/dist/gmedic/connections/models.d.ts +162 -0
- package/dist/gmedic/connections/models.js +3 -0
- package/dist/gmedic/dictionaryEntries/client.d.ts +20 -10
- package/dist/gmedic/dictionaryEntries/client.js +2 -2
- package/dist/gmedic/dictionaryEntries/index.d.ts +1 -1
- package/dist/gmedic/dictionaryEntries/models.d.ts +53 -1
- package/dist/gmedic/healthPartners/client.d.ts +19 -9
- package/dist/gmedic/healthPartners/client.js +2 -2
- package/dist/gmedic/healthPartners/index.d.ts +1 -1
- package/dist/gmedic/healthPartners/models.d.ts +53 -1
- package/dist/gmedic/healthPromotionEntities/client.d.ts +20 -10
- package/dist/gmedic/healthPromotionEntities/client.js +2 -2
- package/dist/gmedic/healthPromotionEntities/index.d.ts +1 -1
- package/dist/gmedic/healthPromotionEntities/models.d.ts +53 -1
- package/dist/gmedic/index.d.ts +1 -1
- package/dist/gmedic/laboralRiskManagers/client.d.ts +20 -10
- package/dist/gmedic/laboralRiskManagers/client.js +2 -2
- package/dist/gmedic/laboralRiskManagers/index.d.ts +1 -1
- package/dist/gmedic/laboralRiskManagers/models.d.ts +53 -1
- package/dist/gmedic/models.d.ts +194 -133
- package/dist/gmedic/occupations/client.d.ts +19 -9
- package/dist/gmedic/occupations/client.js +2 -2
- package/dist/gmedic/occupations/index.d.ts +1 -1
- package/dist/gmedic/occupations/models.d.ts +53 -1
- package/dist/gmedic/patientNotes/client.d.ts +25 -55
- package/dist/gmedic/patientNotes/client.js +5 -5
- package/dist/gmedic/patientNotes/index.d.ts +1 -1
- package/dist/gmedic/patientNotes/models.d.ts +232 -1
- package/dist/gmedic/patients/client.d.ts +40 -359
- package/dist/gmedic/patients/client.js +13 -5
- package/dist/gmedic/patients/index.d.ts +2 -2
- package/dist/gmedic/patients/models.d.ts +795 -1
- package/dist/gmedic/services/client.d.ts +22 -16
- package/dist/gmedic/services/client.js +2 -2
- package/dist/gmedic/services/index.d.ts +1 -1
- package/dist/gmedic/services/models.d.ts +53 -3
- package/dist/gmedic/sessionPackages/client.d.ts +21 -58
- package/dist/gmedic/sessionPackages/client.js +5 -5
- package/dist/gmedic/sessionPackages/index.d.ts +1 -1
- package/dist/gmedic/sessionPackages/models.d.ts +183 -1
- package/dist/index.d.ts +1 -1
- package/dist/models.d.ts +61 -0
- package/dist/models.js +6 -0
- package/dist/nuevaEps/affiliations/client.js +1 -1
- package/dist/nuevaEps/affiliations/models.d.ts +3 -1
- package/dist/nuevaEps/connections/client.d.ts +9 -9
- package/dist/nuevaEps/connections/client.js +9 -9
- package/dist/nuevaEps/connections/index.d.ts +1 -1
- package/dist/nuevaEps/connections/models.d.ts +1 -47
- package/dist/nuevaEps/connections/models.js +1 -8
- package/dist/saludTotal/client.d.ts +15 -0
- package/dist/saludTotal/client.js +20 -0
- package/dist/saludTotal/connections/client.d.ts +53 -0
- package/dist/saludTotal/connections/client.js +33 -0
- package/dist/saludTotal/connections/index.d.ts +5 -0
- package/dist/saludTotal/connections/index.js +4 -0
- package/dist/saludTotal/connections/models.d.ts +62 -0
- package/dist/saludTotal/connections/models.js +9 -0
- package/dist/saludTotal/index.d.ts +5 -0
- package/dist/saludTotal/index.js +4 -0
- package/dist/saludTotal/models.d.ts +37 -0
- package/dist/saludTotal/models.js +3 -0
- package/dist/saludTotal/portals/client.d.ts +35 -0
- package/dist/saludTotal/portals/client.js +18 -0
- package/dist/saludTotal/portals/index.d.ts +5 -0
- package/dist/saludTotal/portals/index.js +4 -0
- package/dist/saludTotal/portals/models.d.ts +30 -0
- package/dist/saludTotal/portals/models.js +3 -0
- package/dist/sura/affiliations/client.d.ts +3 -35
- package/dist/sura/affiliations/client.js +6 -6
- package/dist/sura/affiliations/index.d.ts +1 -0
- package/dist/sura/affiliations/models.d.ts +71 -0
- package/dist/sura/affiliations/models.js +8 -0
- package/dist/sura/appointments/client.d.ts +27 -327
- package/dist/sura/appointments/client.js +15 -21
- package/dist/sura/appointments/index.d.ts +2 -1
- package/dist/sura/appointments/models.d.ts +310 -0
- package/dist/sura/appointments/models.js +22 -0
- package/dist/sura/authorizations/client.d.ts +3 -43
- package/dist/sura/authorizations/client.js +6 -6
- package/dist/sura/authorizations/index.d.ts +1 -0
- package/dist/sura/authorizations/models.d.ts +79 -0
- package/dist/sura/authorizations/models.js +8 -0
- package/dist/sura/availability/client.d.ts +4 -68
- package/dist/sura/availability/client.js +9 -9
- package/dist/sura/availability/index.d.ts +2 -1
- package/dist/sura/availability/models.d.ts +103 -0
- package/dist/sura/availability/models.js +8 -0
- package/dist/sura/bookingOptions/client.d.ts +35 -0
- package/dist/sura/bookingOptions/client.js +19 -0
- package/dist/sura/bookingOptions/index.d.ts +5 -0
- package/dist/sura/bookingOptions/index.js +4 -0
- package/dist/sura/bookingOptions/models.d.ts +143 -0
- package/dist/sura/bookingOptions/models.js +8 -0
- package/dist/sura/client.d.ts +2 -0
- package/dist/sura/client.js +5 -0
- package/dist/sura/connections/client.d.ts +20 -98
- package/dist/sura/connections/client.js +10 -10
- package/dist/sura/connections/index.d.ts +1 -1
- package/dist/sura/connections/models.d.ts +102 -1
- package/dist/sura/connections/models.js +6 -0
- package/dist/sura/copays/client.d.ts +4 -40
- package/dist/sura/copays/client.js +9 -9
- package/dist/sura/copays/index.d.ts +2 -1
- package/dist/sura/copays/models.d.ts +75 -0
- package/dist/sura/copays/models.js +8 -0
- package/dist/sura/index.d.ts +1 -1
- package/dist/sura/models.d.ts +204 -148
- package/dist/sura/models.js +20 -1
- package/dist/sura/operations/client.d.ts +2 -7
- package/dist/sura/operations/client.js +4 -4
- package/dist/sura/operations/index.d.ts +1 -0
- package/dist/sura/operations/models.d.ts +43 -0
- package/dist/sura/operations/models.js +8 -0
- package/dist/sura/patients/client.d.ts +3 -40
- package/dist/sura/patients/client.js +6 -6
- package/dist/sura/patients/index.d.ts +1 -0
- package/dist/sura/patients/models.d.ts +76 -0
- package/dist/sura/patients/models.js +8 -0
- package/dist/sura/professionals/client.d.ts +7 -9
- package/dist/sura/professionals/client.js +3 -4
- package/dist/sura/professionals/index.d.ts +1 -1
- package/dist/sura/professionals/models.d.ts +40 -1
- package/dist/sura/services/client.d.ts +7 -8
- package/dist/sura/services/client.js +3 -4
- package/dist/sura/services/index.d.ts +1 -0
- package/dist/sura/services/models.d.ts +40 -0
- package/dist/sura/services/models.js +3 -0
- package/dist/visoft/index.d.ts +1 -1
- package/dist/visoft/models.d.ts +1 -16
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -133,11 +133,12 @@ Generate and Publish push and dispatch as the Arbol Bot GitHub App, so their com
|
|
|
133
133
|
organization secret `ARBOL_BOT_PRIVATE_KEY`, and the App installed with contents write access to this
|
|
134
134
|
repository and project-arbol-cli. npm publishing uses the organization secret `NPM_TOKEN`.
|
|
135
135
|
|
|
136
|
-
## Migrating
|
|
136
|
+
## Migrating to SDK 5
|
|
137
137
|
|
|
138
|
-
SDK
|
|
138
|
+
SDK 5 follows the current public owner contracts across the platform. Update
|
|
139
|
+
Account calls inherited from SDK 3:
|
|
139
140
|
|
|
140
|
-
| SDK 3 | SDK
|
|
141
|
+
| SDK 3 | SDK 5 |
|
|
141
142
|
| --- | --- |
|
|
142
143
|
| `account.organizations.current` | `account.organization.get` |
|
|
143
144
|
| `account.organizations.configure` | `account.organization.update` |
|
|
@@ -146,6 +147,17 @@ SDK 4 follows Account's current public contract. Update these calls:
|
|
|
146
147
|
| `account.usage.summary` | `account.usageSummary.get` |
|
|
147
148
|
| `account.invoices.document` | `account.invoiceDocuments.get` |
|
|
148
149
|
|
|
150
|
+
Agenda booking discovery now uses `bookingLocations.list`, `bookingOfferings.list`,
|
|
151
|
+
`bookingRequirements.get`, `bookingSlots.list` and `nearestBookingSlots.list`.
|
|
152
|
+
`bookings.lookup` replaces `bookings.list`; `firstAvailability.get` replaces
|
|
153
|
+
`availability.first`; `resourceSchedules.update` replaces `scheduleRules.replace`.
|
|
154
|
+
Schedule rules use separate `create` and `update` methods instead of `upsert`.
|
|
155
|
+
|
|
156
|
+
SURA uses `appointments.lookup`, `bookingOptions.lookup`, `availability.lookup`
|
|
157
|
+
and `copays.lookup` in place of `appointments.list`, `appointments.prepare`,
|
|
158
|
+
`availability.list` and `copays.list`. Lookups containing personal data use the
|
|
159
|
+
owner's current JSON request body. gMedic also exposes `patients.lookup`.
|
|
160
|
+
|
|
149
161
|
Account resource identifiers now use `apiKeyId`, `billingProfileId`, `invitationId`,
|
|
150
162
|
`invoiceId` and `memberId` in place of `id`, as the generated request types declare.
|
|
151
163
|
Connection create, update and delete are staff-user operations outside the public
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
-
import { type AgendaAppointment, type AgendaAppointmentIntakeInput, type
|
|
2
|
+
import { type AgendaAppointment, type AgendaAppointmentIntakeInput, type AgendaResponseMetadata } from "../models.js";
|
|
3
3
|
import { type AgendaAppointmentPage } from "./models.js";
|
|
4
4
|
export interface ClientOptions extends BaseClientOptions {
|
|
5
5
|
/**
|
|
@@ -8,6 +8,13 @@ export interface ClientOptions extends BaseClientOptions {
|
|
|
8
8
|
baseUrl: string;
|
|
9
9
|
}
|
|
10
10
|
export interface Client {
|
|
11
|
+
/**
|
|
12
|
+
* Change Appointment Status
|
|
13
|
+
*
|
|
14
|
+
* Apply an allowed appointment status transition using the expected version
|
|
15
|
+
* and record its attributed history.
|
|
16
|
+
*/
|
|
17
|
+
changeStatus(request: ChangeStatusRequest, options?: RequestOptions): Promise<ChangeStatusResponse>;
|
|
11
18
|
/**
|
|
12
19
|
* Create Appointment
|
|
13
20
|
*
|
|
@@ -25,8 +32,9 @@ export interface Client {
|
|
|
25
32
|
/**
|
|
26
33
|
* List Appointments
|
|
27
34
|
*
|
|
28
|
-
*
|
|
29
|
-
* keyset pagination.
|
|
35
|
+
* List the appointments in an appointment or creation window, filtered by the
|
|
36
|
+
* fields they match, using stable keyset pagination. To find a patient by
|
|
37
|
+
* name or document, search instead.
|
|
30
38
|
*/
|
|
31
39
|
list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
32
40
|
/**
|
|
@@ -37,15 +45,41 @@ export interface Client {
|
|
|
37
45
|
*/
|
|
38
46
|
reschedule(request: RescheduleRequest, options?: RequestOptions): Promise<RescheduleResponse>;
|
|
39
47
|
/**
|
|
40
|
-
*
|
|
48
|
+
* Search Appointments
|
|
41
49
|
*
|
|
42
|
-
*
|
|
43
|
-
* and
|
|
50
|
+
* Search appointments by patient name or document (q), or within the
|
|
51
|
+
* requested window and filters, using stable keyset pagination.
|
|
44
52
|
*/
|
|
45
|
-
|
|
53
|
+
search(request?: SearchRequest, options?: RequestOptions): Promise<SearchResponse>;
|
|
46
54
|
}
|
|
47
55
|
export declare function createClient(options: ClientOptions): Client;
|
|
48
56
|
export declare function bind(transport: Transport): Client;
|
|
57
|
+
export interface ChangeStatusRequest {
|
|
58
|
+
/**
|
|
59
|
+
* Organization-owned appointment identifier.
|
|
60
|
+
*/
|
|
61
|
+
appointmentId: string;
|
|
62
|
+
/**
|
|
63
|
+
* Version last read by the caller. The mutation fails if another writer has
|
|
64
|
+
* changed this record.
|
|
65
|
+
*/
|
|
66
|
+
expectedVersion: number;
|
|
67
|
+
/**
|
|
68
|
+
* Why: kept for a cancellation or a no-show, ignored otherwise.
|
|
69
|
+
*/
|
|
70
|
+
reason?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Current appointment lifecycle state; cancelled and completed appointments
|
|
73
|
+
* cannot regain capacity through a status change.
|
|
74
|
+
*/
|
|
75
|
+
status: "tentative" | "scheduled" | "confirmed" | "checked_in" | "completed" | "cancelled" | "no_show" | "unknown";
|
|
76
|
+
}
|
|
77
|
+
export interface ChangeStatusResponse {
|
|
78
|
+
data: AgendaAppointment;
|
|
79
|
+
error: null;
|
|
80
|
+
metadata: AgendaResponseMetadata;
|
|
81
|
+
success: true;
|
|
82
|
+
}
|
|
49
83
|
export interface CreateRequest {
|
|
50
84
|
/**
|
|
51
85
|
* Booking source recorded on the appointment; null when no channel was
|
|
@@ -76,7 +110,12 @@ export interface CreateRequest {
|
|
|
76
110
|
* Patient identity copied into the booking; null when no patient identity was
|
|
77
111
|
* supplied.
|
|
78
112
|
*/
|
|
79
|
-
patient?:
|
|
113
|
+
patient?: {
|
|
114
|
+
document?: string | null;
|
|
115
|
+
documentNumber?: string | null;
|
|
116
|
+
documentType?: string | null;
|
|
117
|
+
name: string;
|
|
118
|
+
} | null;
|
|
80
119
|
/**
|
|
81
120
|
* Patient-supplied date of birth (YYYY-MM-DD), stored on the record and
|
|
82
121
|
* checked against service age eligibility.
|
|
@@ -108,7 +147,7 @@ export interface GetRequest {
|
|
|
108
147
|
/**
|
|
109
148
|
* Organization-owned appointment identifier.
|
|
110
149
|
*/
|
|
111
|
-
|
|
150
|
+
appointmentId: string;
|
|
112
151
|
}
|
|
113
152
|
export interface GetResponse {
|
|
114
153
|
data: AgendaAppointment;
|
|
@@ -118,10 +157,22 @@ export interface GetResponse {
|
|
|
118
157
|
}
|
|
119
158
|
export interface ListRequest {
|
|
120
159
|
/**
|
|
121
|
-
*
|
|
122
|
-
* channel was never recorded.
|
|
160
|
+
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
123
161
|
*/
|
|
124
|
-
|
|
162
|
+
cursor?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Direction to traverse the stable keyset ordering from the supplied cursor.
|
|
165
|
+
*/
|
|
166
|
+
direction?: "forward" | "backward";
|
|
167
|
+
/**
|
|
168
|
+
* Maximum number of appointment records returned by one page; defaults to 25
|
|
169
|
+
* and cannot exceed 500.
|
|
170
|
+
*/
|
|
171
|
+
limit?: number;
|
|
172
|
+
/**
|
|
173
|
+
* Only appointments booked through this recorded channel.
|
|
174
|
+
*/
|
|
175
|
+
bookingChannel?: string;
|
|
125
176
|
/**
|
|
126
177
|
* Inclusive creation instant, independent of the appointment date. Pair with
|
|
127
178
|
* createdBefore; at most 93 days.
|
|
@@ -133,27 +184,14 @@ export interface ListRequest {
|
|
|
133
184
|
*/
|
|
134
185
|
createdBefore?: Temporal.Instant;
|
|
135
186
|
/**
|
|
136
|
-
*
|
|
137
|
-
*/
|
|
138
|
-
createdBy?: string | null;
|
|
139
|
-
/**
|
|
140
|
-
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
141
|
-
*/
|
|
142
|
-
cursor?: string;
|
|
143
|
-
/**
|
|
144
|
-
* Direction to traverse the stable keyset ordering from the supplied cursor.
|
|
187
|
+
* Only appointments booked by this principal reference.
|
|
145
188
|
*/
|
|
146
|
-
|
|
189
|
+
createdBy?: string;
|
|
147
190
|
/**
|
|
148
191
|
* Beginning of the appointment range; must be paired with to unless a patient
|
|
149
192
|
* search is supplied.
|
|
150
193
|
*/
|
|
151
194
|
from?: Temporal.Instant;
|
|
152
|
-
/**
|
|
153
|
-
* Maximum number of appointment records returned by one page; defaults to 25
|
|
154
|
-
* and cannot exceed 500.
|
|
155
|
-
*/
|
|
156
|
-
limit?: number;
|
|
157
195
|
/**
|
|
158
196
|
* Held on an agenda of this site, like `appointmentReport`.
|
|
159
197
|
*/
|
|
@@ -163,22 +201,17 @@ export interface ListRequest {
|
|
|
163
201
|
*/
|
|
164
202
|
order?: "desc" | "asc";
|
|
165
203
|
/**
|
|
166
|
-
*
|
|
204
|
+
* Only appointments whose intake names this payer.
|
|
167
205
|
*/
|
|
168
|
-
payer?: string
|
|
206
|
+
payer?: string;
|
|
169
207
|
/**
|
|
170
208
|
* Only appointments marked priority ("urgent"), or only the rest.
|
|
171
209
|
*/
|
|
172
210
|
priority?: "normal" | "urgent";
|
|
173
211
|
/**
|
|
174
|
-
*
|
|
175
|
-
* range.
|
|
176
|
-
*/
|
|
177
|
-
query?: string;
|
|
178
|
-
/**
|
|
179
|
-
* The reason given for a cancellation or no-show.
|
|
212
|
+
* Only appointments cancelled or missed for this recorded reason.
|
|
180
213
|
*/
|
|
181
|
-
reason?: string
|
|
214
|
+
reason?: string;
|
|
182
215
|
/**
|
|
183
216
|
* Only appointments assigned to this agenda in the authenticated
|
|
184
217
|
* organization.
|
|
@@ -202,9 +235,9 @@ export interface ListRequest {
|
|
|
202
235
|
*/
|
|
203
236
|
status?: ("tentative" | "scheduled" | "confirmed" | "checked_in" | "completed" | "cancelled" | "no_show" | "unknown")[] | "tentative" | "scheduled" | "confirmed" | "checked_in" | "completed" | "cancelled" | "no_show" | "unknown";
|
|
204
237
|
/**
|
|
205
|
-
*
|
|
238
|
+
* Only appointments whose latest status change this principal made.
|
|
206
239
|
*/
|
|
207
|
-
statusChangedBy?: string
|
|
240
|
+
statusChangedBy?: string;
|
|
208
241
|
/**
|
|
209
242
|
* End of the appointment range; must be paired with from.
|
|
210
243
|
*/
|
|
@@ -220,7 +253,7 @@ export interface RescheduleRequest {
|
|
|
220
253
|
/**
|
|
221
254
|
* Organization-owned appointment identifier.
|
|
222
255
|
*/
|
|
223
|
-
|
|
256
|
+
appointmentId: string;
|
|
224
257
|
/**
|
|
225
258
|
* Who moves it, as when booking: "agent" (the WhatsApp agent) may not move an
|
|
226
259
|
* appointment of a payer only the team books (`payer_staff_only`).
|
|
@@ -258,28 +291,108 @@ export interface RescheduleResponse {
|
|
|
258
291
|
metadata: AgendaResponseMetadata;
|
|
259
292
|
success: true;
|
|
260
293
|
}
|
|
261
|
-
export interface
|
|
294
|
+
export interface SearchRequest {
|
|
262
295
|
/**
|
|
263
|
-
*
|
|
296
|
+
* Filter the recorded booking channel; null selects appointments whose
|
|
297
|
+
* channel was never recorded.
|
|
264
298
|
*/
|
|
265
|
-
|
|
299
|
+
bookingChannel?: string | null;
|
|
266
300
|
/**
|
|
267
|
-
*
|
|
268
|
-
*
|
|
301
|
+
* Inclusive creation instant, independent of the appointment date. Pair with
|
|
302
|
+
* createdBefore; at most 93 days.
|
|
269
303
|
*/
|
|
270
|
-
|
|
304
|
+
createdAfter?: Temporal.Instant;
|
|
271
305
|
/**
|
|
272
|
-
*
|
|
306
|
+
* Exclusive creation instant. Use for appointments generated during a period,
|
|
307
|
+
* including future appointments.
|
|
273
308
|
*/
|
|
274
|
-
|
|
309
|
+
createdBefore?: Temporal.Instant;
|
|
275
310
|
/**
|
|
276
|
-
*
|
|
277
|
-
* cannot regain capacity through a status change.
|
|
311
|
+
* Principal reference of whoever booked it.
|
|
278
312
|
*/
|
|
279
|
-
|
|
313
|
+
createdBy?: string | null;
|
|
314
|
+
/**
|
|
315
|
+
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
316
|
+
*/
|
|
317
|
+
cursor?: string;
|
|
318
|
+
/**
|
|
319
|
+
* Direction to traverse the stable keyset ordering from the supplied cursor.
|
|
320
|
+
*/
|
|
321
|
+
direction?: "forward" | "backward";
|
|
322
|
+
/**
|
|
323
|
+
* Beginning of the appointment range; must be paired with to unless a patient
|
|
324
|
+
* search is supplied.
|
|
325
|
+
*/
|
|
326
|
+
from?: Temporal.Instant;
|
|
327
|
+
/**
|
|
328
|
+
* Maximum number of appointment records returned by one page; defaults to 25
|
|
329
|
+
* and cannot exceed 500.
|
|
330
|
+
*/
|
|
331
|
+
limit?: number;
|
|
332
|
+
/**
|
|
333
|
+
* Held on an agenda of this site, like `appointmentReport`.
|
|
334
|
+
*/
|
|
335
|
+
locationId?: string;
|
|
336
|
+
/**
|
|
337
|
+
* Ascending or descending order within the selected appointment sort key.
|
|
338
|
+
*/
|
|
339
|
+
order?: "desc" | "asc";
|
|
340
|
+
/**
|
|
341
|
+
* The payer's name as recorded in the intake.
|
|
342
|
+
*/
|
|
343
|
+
payer?: string | null;
|
|
344
|
+
/**
|
|
345
|
+
* Only appointments marked priority ("urgent"), or only the rest.
|
|
346
|
+
*/
|
|
347
|
+
priority?: "normal" | "urgent";
|
|
348
|
+
/**
|
|
349
|
+
* Patient name or document search text; provide this or a complete instant
|
|
350
|
+
* range.
|
|
351
|
+
*/
|
|
352
|
+
q?: string;
|
|
353
|
+
/**
|
|
354
|
+
* Deprecated: use `q`. Answered until 2027-01-28.
|
|
355
|
+
*
|
|
356
|
+
* @deprecated
|
|
357
|
+
*/
|
|
358
|
+
query?: string;
|
|
359
|
+
/**
|
|
360
|
+
* The reason given for a cancellation or no-show.
|
|
361
|
+
*/
|
|
362
|
+
reason?: string | null;
|
|
363
|
+
/**
|
|
364
|
+
* Only appointments assigned to this agenda in the authenticated
|
|
365
|
+
* organization.
|
|
366
|
+
*/
|
|
367
|
+
resourceId?: string;
|
|
368
|
+
/**
|
|
369
|
+
* Held on any of these agendas (at most 200).
|
|
370
|
+
*/
|
|
371
|
+
resourceIds?: string[];
|
|
372
|
+
/**
|
|
373
|
+
* Service identifier within the authenticated organization.
|
|
374
|
+
*/
|
|
375
|
+
serviceId?: string;
|
|
376
|
+
/**
|
|
377
|
+
* createdAt uses agenda overlap semantics; startsAt selects appointments
|
|
378
|
+
* beginning inside the report window.
|
|
379
|
+
*/
|
|
380
|
+
sort?: "createdAt" | "startsAt";
|
|
381
|
+
/**
|
|
382
|
+
* One status, or any of several.
|
|
383
|
+
*/
|
|
384
|
+
status?: ("tentative" | "scheduled" | "confirmed" | "checked_in" | "completed" | "cancelled" | "no_show" | "unknown")[] | "tentative" | "scheduled" | "confirmed" | "checked_in" | "completed" | "cancelled" | "no_show" | "unknown";
|
|
385
|
+
/**
|
|
386
|
+
* Principal reference of whoever made the latest status change.
|
|
387
|
+
*/
|
|
388
|
+
statusChangedBy?: string | null;
|
|
389
|
+
/**
|
|
390
|
+
* End of the appointment range; must be paired with from.
|
|
391
|
+
*/
|
|
392
|
+
to?: Temporal.Instant;
|
|
280
393
|
}
|
|
281
|
-
export interface
|
|
282
|
-
data:
|
|
394
|
+
export interface SearchResponse {
|
|
395
|
+
data: AgendaAppointmentPage;
|
|
283
396
|
error: null;
|
|
284
397
|
metadata: AgendaResponseMetadata;
|
|
285
398
|
success: true;
|
|
@@ -8,13 +8,21 @@ export function createClient(options) {
|
|
|
8
8
|
}
|
|
9
9
|
export function bind(transport) {
|
|
10
10
|
return {
|
|
11
|
+
changeStatus: (request, options) => transport.send(ChangeStatusOperation, request, options),
|
|
11
12
|
create: (request, options) => transport.send(CreateOperation, request, options),
|
|
12
13
|
get: (request, options) => transport.send(GetOperation, request, options),
|
|
13
14
|
list: (request, options) => transport.send(ListOperation, request, options),
|
|
14
15
|
reschedule: (request, options) => transport.send(RescheduleOperation, request, options),
|
|
15
|
-
|
|
16
|
+
search: (request, options) => transport.send(SearchOperation, request, options),
|
|
16
17
|
};
|
|
17
18
|
}
|
|
19
|
+
const ChangeStatusOperation = {
|
|
20
|
+
method: "POST",
|
|
21
|
+
route: "/v1/agenda/appointments/{appointmentId}/change-status",
|
|
22
|
+
body: "flat",
|
|
23
|
+
response: object([["data", null, () => AgendaAppointmentCodec]]),
|
|
24
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
25
|
+
};
|
|
18
26
|
const CreateOperation = {
|
|
19
27
|
method: "POST",
|
|
20
28
|
route: "/v1/agenda/appointments",
|
|
@@ -25,29 +33,29 @@ const CreateOperation = {
|
|
|
25
33
|
};
|
|
26
34
|
const GetOperation = {
|
|
27
35
|
method: "GET",
|
|
28
|
-
route: "/v1/agenda/appointments/{
|
|
36
|
+
route: "/v1/agenda/appointments/{appointmentId}",
|
|
29
37
|
response: object([["data", null, () => AgendaAppointmentCodec]]),
|
|
30
38
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
31
39
|
};
|
|
32
40
|
const ListOperation = {
|
|
33
|
-
method: "
|
|
34
|
-
route: "/v1/agenda/appointments
|
|
35
|
-
|
|
36
|
-
request: object([["createdAfter", null, instant], ["createdBefore", null, instant], ["from", null, instant], ["to", null, instant]]),
|
|
41
|
+
method: "GET",
|
|
42
|
+
route: "/v1/agenda/appointments",
|
|
43
|
+
query: { cursor: "cursor", direction: "direction", limit: "limit", bookingChannel: "bookingChannel", createdAfter: "createdAfter", createdBefore: "createdBefore", createdBy: "createdBy", from: "from", locationId: "locationId", order: "order", payer: "payer", priority: "priority", reason: "reason", resourceId: "resourceId", resourceIds: "resourceIds", serviceId: "serviceId", sort: "sort", status: "status", statusChangedBy: "statusChangedBy", to: "to" },
|
|
37
44
|
response: object([["data", null, () => AgendaAppointmentPageCodec]]),
|
|
38
45
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
39
46
|
};
|
|
40
47
|
const RescheduleOperation = {
|
|
41
48
|
method: "POST",
|
|
42
|
-
route: "/v1/agenda/appointments/{
|
|
49
|
+
route: "/v1/agenda/appointments/{appointmentId}/reschedule",
|
|
43
50
|
body: "flat",
|
|
44
51
|
response: object([["data", null, () => AgendaAppointmentCodec]]),
|
|
45
52
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
46
53
|
};
|
|
47
|
-
const
|
|
48
|
-
method: "
|
|
49
|
-
route: "/v1/agenda/appointments/
|
|
54
|
+
const SearchOperation = {
|
|
55
|
+
method: "POST",
|
|
56
|
+
route: "/v1/agenda/appointments/search",
|
|
50
57
|
body: "flat",
|
|
51
|
-
|
|
58
|
+
request: object([["createdAfter", null, instant], ["createdBefore", null, instant], ["from", null, instant], ["to", null, instant]]),
|
|
59
|
+
response: object([["data", null, () => AgendaAppointmentPageCodec]]),
|
|
52
60
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
53
61
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ApiError } from "../../_/index.js";
|
|
2
2
|
export type { RequestOptions } from "../../_/index.js";
|
|
3
3
|
export { createClient } from "./client.js";
|
|
4
|
-
export type { Client, ClientOptions, CreateRequest, CreateResponse, GetRequest, GetResponse, ListRequest, ListResponse, RescheduleRequest, RescheduleResponse,
|
|
4
|
+
export type { Client, ClientOptions, ChangeStatusRequest, ChangeStatusResponse, CreateRequest, CreateResponse, GetRequest, GetResponse, ListRequest, ListResponse, RescheduleRequest, RescheduleResponse, SearchRequest, SearchResponse, } from "./client.js";
|
|
5
5
|
export type { AgendaAppointmentPage } from "./models.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type AgendaResponseMetadata, type AgendaSlotPage } from "../models.js";
|
|
3
3
|
export interface ClientOptions extends BaseClientOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The URL the paths of the API are relative to.
|
|
@@ -7,13 +7,6 @@ export interface ClientOptions extends BaseClientOptions {
|
|
|
7
7
|
baseUrl: string;
|
|
8
8
|
}
|
|
9
9
|
export interface Client {
|
|
10
|
-
/**
|
|
11
|
-
* Get First Available
|
|
12
|
-
*
|
|
13
|
-
* Find the earliest bookable slots for a service across eligible agendas,
|
|
14
|
-
* with a bounded search horizon and continuation.
|
|
15
|
-
*/
|
|
16
|
-
first(request: FirstRequest, options?: RequestOptions): Promise<FirstResponse>;
|
|
17
10
|
/**
|
|
18
11
|
* Get Availability
|
|
19
12
|
*
|
|
@@ -24,66 +17,7 @@ export interface Client {
|
|
|
24
17
|
}
|
|
25
18
|
export declare function createClient(options: ClientOptions): Client;
|
|
26
19
|
export declare function bind(transport: Transport): Client;
|
|
27
|
-
export interface FirstRequest {
|
|
28
|
-
/**
|
|
29
|
-
* Service identifier within the authenticated organization.
|
|
30
|
-
*/
|
|
31
|
-
serviceId: string;
|
|
32
|
-
/**
|
|
33
|
-
* Maximum number of days to search; omission uses the service booking
|
|
34
|
-
* horizon.
|
|
35
|
-
*/
|
|
36
|
-
days?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Requested visible appointment duration in minutes; admitted only when the
|
|
39
|
-
* organization permits the override.
|
|
40
|
-
*/
|
|
41
|
-
durationMinutes?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Earliest instant to examine; omission starts the availability search at the
|
|
44
|
-
* current time.
|
|
45
|
-
*/
|
|
46
|
-
from?: Temporal.Instant;
|
|
47
|
-
/**
|
|
48
|
-
* A study length in minutes among those its agendas offer; only agendas
|
|
49
|
-
* offering it are searched, at that length.
|
|
50
|
-
*/
|
|
51
|
-
occupationMinutes?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Group first availability globally by time or return a separate
|
|
54
|
-
* earliest-slot set for each offering.
|
|
55
|
-
*/
|
|
56
|
-
group?: "time" | "offering";
|
|
57
|
-
/**
|
|
58
|
-
* Maximum returned slots overall or per offering according to group; defaults
|
|
59
|
-
* to 20 and cannot exceed 50.
|
|
60
|
-
*/
|
|
61
|
-
limit?: number;
|
|
62
|
-
/**
|
|
63
|
-
* Limit appointments to agendas associated with the selected site.
|
|
64
|
-
*/
|
|
65
|
-
locationId?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Agenda identifier within the authenticated organization.
|
|
68
|
-
*/
|
|
69
|
-
resourceId?: string;
|
|
70
|
-
/**
|
|
71
|
-
* IANA timezone used to interpret local dates and agenda working hours.
|
|
72
|
-
*/
|
|
73
|
-
timezone: string;
|
|
74
|
-
}
|
|
75
|
-
export interface FirstResponse {
|
|
76
|
-
data: AgendaFirstAvailability;
|
|
77
|
-
error: null;
|
|
78
|
-
metadata: AgendaResponseMetadata;
|
|
79
|
-
success: true;
|
|
80
|
-
}
|
|
81
20
|
export interface ListRequest {
|
|
82
|
-
/**
|
|
83
|
-
* Required service offering whose available signed slots are searched within
|
|
84
|
-
* the requested interval.
|
|
85
|
-
*/
|
|
86
|
-
offeringId: string;
|
|
87
21
|
/**
|
|
88
22
|
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
89
23
|
*/
|
|
@@ -92,6 +26,11 @@ export interface ListRequest {
|
|
|
92
26
|
* Direction to traverse the stable keyset ordering from the supplied cursor.
|
|
93
27
|
*/
|
|
94
28
|
direction?: "forward" | "backward";
|
|
29
|
+
/**
|
|
30
|
+
* Maximum items returned in one page. Defaults to 25; larger reads require
|
|
31
|
+
* another cursor.
|
|
32
|
+
*/
|
|
33
|
+
limit?: number;
|
|
95
34
|
/**
|
|
96
35
|
* Requested visible appointment duration in minutes; admitted only when the
|
|
97
36
|
* organization permits the override.
|
|
@@ -106,17 +45,17 @@ export interface ListRequest {
|
|
|
106
45
|
* Inclusive beginning of the requested instant range.
|
|
107
46
|
*/
|
|
108
47
|
from: Temporal.Instant;
|
|
109
|
-
/**
|
|
110
|
-
* Maximum items returned in one page. Defaults to 25; larger reads require
|
|
111
|
-
* another cursor.
|
|
112
|
-
*/
|
|
113
|
-
limit?: number;
|
|
114
48
|
/**
|
|
115
49
|
* A study length in minutes among those the offering offers
|
|
116
50
|
* (occupationMinutes and studyOptions), booked in that length’s arrival
|
|
117
51
|
* hours; absent: its usual length.
|
|
118
52
|
*/
|
|
119
53
|
occupationMinutes?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Required service offering whose available signed slots are searched within
|
|
56
|
+
* the requested interval.
|
|
57
|
+
*/
|
|
58
|
+
offeringId: string;
|
|
120
59
|
/**
|
|
121
60
|
* Preferred agendas considered first while satisfying the offering resource
|
|
122
61
|
* requirements.
|
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
import { Transport,
|
|
4
|
-
import {
|
|
3
|
+
import { Transport, object, } from "../../_/index.js";
|
|
4
|
+
import { AgendaSlotPageCodec, } from "../models.js";
|
|
5
5
|
export function createClient(options) {
|
|
6
6
|
return bind(new Transport(options));
|
|
7
7
|
}
|
|
8
8
|
export function bind(transport) {
|
|
9
9
|
return {
|
|
10
|
-
first: (request, options) => transport.send(FirstOperation, request, options),
|
|
11
10
|
list: (request, options) => transport.send(ListOperation, request, options),
|
|
12
11
|
};
|
|
13
12
|
}
|
|
14
|
-
const FirstOperation = {
|
|
15
|
-
method: "GET",
|
|
16
|
-
route: "/v1/agenda/services/{serviceId}/availability/first",
|
|
17
|
-
query: { days: "days", durationMinutes: "durationMinutes", from: "from", occupationMinutes: "occupationMinutes", group: "group", limit: "limit", locationId: "locationId", resourceId: "resourceId", timezone: "timezone" },
|
|
18
|
-
response: object([["data", null, () => AgendaFirstAvailabilityCodec]]),
|
|
19
|
-
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
20
|
-
};
|
|
21
13
|
const ListOperation = {
|
|
22
|
-
method: "
|
|
23
|
-
route: "/v1/agenda/
|
|
24
|
-
|
|
25
|
-
request: object([["from", null, instant], ["to", null, instant]]),
|
|
14
|
+
method: "GET",
|
|
15
|
+
route: "/v1/agenda/availability",
|
|
16
|
+
query: { cursor: "cursor", direction: "direction", limit: "limit", durationMinutes: "durationMinutes", excludeAppointmentId: "excludeAppointmentId", from: "from", occupationMinutes: "occupationMinutes", offeringId: "offeringId", preferredResourceIds: "preferredResourceIds", timezone: "timezone", to: "to" },
|
|
26
17
|
response: object([["data", null, () => AgendaSlotPageCodec]]),
|
|
27
18
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
28
19
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ApiError } from "../../_/index.js";
|
|
2
2
|
export type { RequestOptions } from "../../_/index.js";
|
|
3
3
|
export { createClient } from "./client.js";
|
|
4
|
-
export type { Client, ClientOptions,
|
|
4
|
+
export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
+
import { type AgendaLocationPage, type AgendaResponseMetadata } from "../models.js";
|
|
3
|
+
export interface ClientOptions extends BaseClientOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The URL the paths of the API are relative to.
|
|
6
|
+
*/
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Client {
|
|
10
|
+
/**
|
|
11
|
+
* List sites
|
|
12
|
+
*
|
|
13
|
+
* List the organization's sites (sedes), a page at a time: follow
|
|
14
|
+
* pageInfo.nextCursor for more. Pass a site's id as locationId to
|
|
15
|
+
* find_first_available to search only its agendas.
|
|
16
|
+
*/
|
|
17
|
+
list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
18
|
+
}
|
|
19
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
20
|
+
export declare function bind(transport: Transport): Client;
|
|
21
|
+
export interface ListRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
24
|
+
*/
|
|
25
|
+
cursor?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Direction to traverse the stable keyset ordering from the supplied cursor.
|
|
28
|
+
*/
|
|
29
|
+
direction?: "forward" | "backward";
|
|
30
|
+
/**
|
|
31
|
+
* Maximum items returned in one page. Defaults to 25; larger reads require
|
|
32
|
+
* another cursor.
|
|
33
|
+
*/
|
|
34
|
+
limit?: number;
|
|
35
|
+
/**
|
|
36
|
+
* The conversation's channel, set by the platform. It changes nothing in
|
|
37
|
+
* Agenda; omit it.
|
|
38
|
+
*/
|
|
39
|
+
channel?: "voice" | "whatsapp" | "web";
|
|
40
|
+
/**
|
|
41
|
+
* The platform's id for the organization's Agenda, set by the platform. An
|
|
42
|
+
* organization has one Agenda, so it selects nothing; omit it.
|
|
43
|
+
*/
|
|
44
|
+
connectionId?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ListResponse {
|
|
47
|
+
data: AgendaLocationPage;
|
|
48
|
+
error: null;
|
|
49
|
+
metadata: AgendaResponseMetadata;
|
|
50
|
+
success: true;
|
|
51
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { Transport, object, } from "../../_/index.js";
|
|
4
|
+
import { AgendaLocationPageCodec, } from "../models.js";
|
|
5
|
+
export function createClient(options) {
|
|
6
|
+
return bind(new Transport(options));
|
|
7
|
+
}
|
|
8
|
+
export function bind(transport) {
|
|
9
|
+
return {
|
|
10
|
+
list: (request, options) => transport.send(ListOperation, request, options),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const ListOperation = {
|
|
14
|
+
method: "GET",
|
|
15
|
+
route: "/v1/agenda/booking-locations",
|
|
16
|
+
query: { cursor: "cursor", direction: "direction", limit: "limit", channel: "channel", connectionId: "connectionId" },
|
|
17
|
+
response: object([["data", null, () => AgendaLocationPageCodec]]),
|
|
18
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "426": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
|
+
};
|