@arbol-ai/sdk 2.3.0 → 2.5.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/agenda/appointments/client.d.ts +10 -0
- package/dist/agenda/appointments/client.js +1 -1
- package/dist/agenda/client.d.ts +2 -0
- package/dist/agenda/client.js +5 -0
- package/dist/agenda/offerings/client.d.ts +145 -1
- package/dist/agenda/offerings/client.js +17 -1
- package/dist/agenda/offerings/index.d.ts +1 -1
- package/dist/agenda/resources/client.d.ts +110 -1
- package/dist/agenda/resources/client.js +17 -1
- package/dist/agenda/resources/index.d.ts +1 -1
- package/dist/agenda/scheduleRules/client.d.ts +188 -0
- package/dist/agenda/scheduleRules/client.js +36 -0
- package/dist/agenda/scheduleRules/index.d.ts +4 -0
- package/dist/agenda/scheduleRules/index.js +4 -0
- package/dist/agenda/services/client.d.ts +81 -1
- package/dist/agenda/services/client.js +17 -1
- package/dist/agenda/services/index.d.ts +1 -1
- package/dist/raiz/channels/client.d.ts +14 -8
- package/dist/raiz/channels/index.d.ts +1 -1
- package/dist/raiz/channels/models.d.ts +179 -7
- package/dist/raiz/models.d.ts +14 -0
- package/dist/raiz/organization/index.d.ts +1 -1
- package/dist/raiz/organization/models.d.ts +2 -2
- package/dist/raiz/reports/client.d.ts +29 -19
- package/dist/raiz/reports/models.d.ts +19 -0
- package/dist/raiz/reports/models.js +1 -1
- package/package.json +3 -3
|
@@ -123,6 +123,16 @@ export interface ListRequest {
|
|
|
123
123
|
* channel was never recorded.
|
|
124
124
|
*/
|
|
125
125
|
bookingChannel?: string | null;
|
|
126
|
+
/**
|
|
127
|
+
* Inclusive creation instant, independent of the appointment date. Pair with
|
|
128
|
+
* createdBefore; at most 93 days.
|
|
129
|
+
*/
|
|
130
|
+
createdAfter?: Temporal.Instant;
|
|
131
|
+
/**
|
|
132
|
+
* Exclusive creation instant. Use for appointments generated during a period,
|
|
133
|
+
* including future appointments.
|
|
134
|
+
*/
|
|
135
|
+
createdBefore?: Temporal.Instant;
|
|
126
136
|
/**
|
|
127
137
|
* Principal reference of whoever booked it.
|
|
128
138
|
*/
|
|
@@ -33,7 +33,7 @@ const ListOperation = {
|
|
|
33
33
|
method: "POST",
|
|
34
34
|
route: "/v1/agenda/appointments/search",
|
|
35
35
|
body: "flat",
|
|
36
|
-
request: object([["from", null, instant], ["to", null, instant]]),
|
|
36
|
+
request: object([["createdAfter", null, instant], ["createdBefore", null, instant], ["from", null, instant], ["to", null, instant]]),
|
|
37
37
|
response: object([["data", null, () => AgendaAppointmentPageCodec]]),
|
|
38
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 },
|
|
39
39
|
};
|
package/dist/agenda/client.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { type Client as BookingsClient } from "./bookings/client.js";
|
|
|
5
5
|
import { type Client as LocationsClient } from "./locations/client.js";
|
|
6
6
|
import { type Client as OfferingsClient } from "./offerings/client.js";
|
|
7
7
|
import { type Client as ResourcesClient } from "./resources/client.js";
|
|
8
|
+
import { type Client as ScheduleRulesClient } from "./scheduleRules/client.js";
|
|
8
9
|
import { type Client as ServicesClient } from "./services/client.js";
|
|
9
10
|
import { type Client as WaitlistClient } from "./waitlist/client.js";
|
|
10
11
|
export interface ClientOptions extends BaseClientOptions {
|
|
@@ -20,6 +21,7 @@ export interface Client {
|
|
|
20
21
|
readonly locations: LocationsClient;
|
|
21
22
|
readonly offerings: OfferingsClient;
|
|
22
23
|
readonly resources: ResourcesClient;
|
|
24
|
+
readonly scheduleRules: ScheduleRulesClient;
|
|
23
25
|
readonly services: ServicesClient;
|
|
24
26
|
readonly waitlist: WaitlistClient;
|
|
25
27
|
}
|
package/dist/agenda/client.js
CHANGED
|
@@ -7,6 +7,7 @@ import { bind as bindBookings, } from "./bookings/client.js";
|
|
|
7
7
|
import { bind as bindLocations, } from "./locations/client.js";
|
|
8
8
|
import { bind as bindOfferings, } from "./offerings/client.js";
|
|
9
9
|
import { bind as bindResources, } from "./resources/client.js";
|
|
10
|
+
import { bind as bindScheduleRules, } from "./scheduleRules/client.js";
|
|
10
11
|
import { bind as bindServices, } from "./services/client.js";
|
|
11
12
|
import { bind as bindWaitlist, } from "./waitlist/client.js";
|
|
12
13
|
export function createClient(options) {
|
|
@@ -19,6 +20,7 @@ export function bind(transport) {
|
|
|
19
20
|
let locationsClient;
|
|
20
21
|
let offeringsClient;
|
|
21
22
|
let resourcesClient;
|
|
23
|
+
let scheduleRulesClient;
|
|
22
24
|
let servicesClient;
|
|
23
25
|
let waitlistClient;
|
|
24
26
|
return {
|
|
@@ -40,6 +42,9 @@ export function bind(transport) {
|
|
|
40
42
|
get resources() {
|
|
41
43
|
return (resourcesClient ??= bindResources(transport));
|
|
42
44
|
},
|
|
45
|
+
get scheduleRules() {
|
|
46
|
+
return (scheduleRulesClient ??= bindScheduleRules(transport));
|
|
47
|
+
},
|
|
43
48
|
get services() {
|
|
44
49
|
return (servicesClient ??= bindServices(transport));
|
|
45
50
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
2
|
import type { ResponseMetadata } from "../../models.js";
|
|
3
|
-
import { type AgendaOfferingPage } from "./models.js";
|
|
3
|
+
import { type AgendaOffering, type AgendaOfferingPage } from "./models.js";
|
|
4
4
|
export interface ClientOptions extends BaseClientOptions {
|
|
5
5
|
/**
|
|
6
6
|
* The URL the paths of the API are relative to.
|
|
@@ -8,6 +8,13 @@ export interface ClientOptions extends BaseClientOptions {
|
|
|
8
8
|
baseUrl: string;
|
|
9
9
|
}
|
|
10
10
|
export interface Client {
|
|
11
|
+
/**
|
|
12
|
+
* Create Offering
|
|
13
|
+
*
|
|
14
|
+
* Attach a service to an agenda with its scheduling requirements, duration,
|
|
15
|
+
* eligibility and intake policy.
|
|
16
|
+
*/
|
|
17
|
+
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
11
18
|
/**
|
|
12
19
|
* List Offerings
|
|
13
20
|
*
|
|
@@ -15,9 +22,83 @@ export interface Client {
|
|
|
15
22
|
* active-state filters.
|
|
16
23
|
*/
|
|
17
24
|
list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Update Offering
|
|
27
|
+
*
|
|
28
|
+
* Update the offering named in the path using its expected version.
|
|
29
|
+
*/
|
|
30
|
+
update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
|
|
18
31
|
}
|
|
19
32
|
export declare function createClient(options: ClientOptions): Client;
|
|
20
33
|
export declare function bind(transport: Transport): Client;
|
|
34
|
+
export interface CreateRequest {
|
|
35
|
+
/**
|
|
36
|
+
* Farthest number of days ahead that this offering can be booked.
|
|
37
|
+
*/
|
|
38
|
+
bookingHorizonDays?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Resource occupation added after the visible appointment, in minutes.
|
|
41
|
+
*/
|
|
42
|
+
bufferAfterMinutes?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Resource occupation added before the visible appointment, in minutes.
|
|
45
|
+
*/
|
|
46
|
+
bufferBeforeMinutes?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Maximum concurrent units this resource or offering can accept.
|
|
49
|
+
*/
|
|
50
|
+
capacity?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Bounded JSON configuration owned by this catalog record, including
|
|
53
|
+
* supported domain settings.
|
|
54
|
+
*/
|
|
55
|
+
details?: {
|
|
56
|
+
[key: string]: unknown;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Visible appointment duration for this offering, in minutes; resource
|
|
60
|
+
* buffers apply separately.
|
|
61
|
+
*/
|
|
62
|
+
durationMinutes: number;
|
|
63
|
+
/**
|
|
64
|
+
* Minimum advance notice in minutes before this offering can be booked.
|
|
65
|
+
*/
|
|
66
|
+
minNoticeMinutes?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Display name of this catalog or configuration record.
|
|
69
|
+
*/
|
|
70
|
+
name: string;
|
|
71
|
+
/**
|
|
72
|
+
* Resource kinds, quantities and explicit alternatives needed by this
|
|
73
|
+
* offering.
|
|
74
|
+
*/
|
|
75
|
+
resourceRequirements?: {
|
|
76
|
+
alternatives?: string[];
|
|
77
|
+
kind: "practitioner" | "assistant" | "room" | "chair" | "equipment" | "location" | "team" | "generic";
|
|
78
|
+
quantity?: number;
|
|
79
|
+
required?: boolean;
|
|
80
|
+
}[];
|
|
81
|
+
/**
|
|
82
|
+
* Stable svc-prefixed Scheduling record identifier; ownership is checked in
|
|
83
|
+
* the authenticated organization.
|
|
84
|
+
*/
|
|
85
|
+
serviceId: string;
|
|
86
|
+
/**
|
|
87
|
+
* Minute spacing between candidate appointment start times.
|
|
88
|
+
*/
|
|
89
|
+
slotIntervalMinutes?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Lifecycle state controlling whether this record remains available to its
|
|
92
|
+
* domain consumers.
|
|
93
|
+
*/
|
|
94
|
+
status?: "active" | "inactive";
|
|
95
|
+
}
|
|
96
|
+
export interface CreateResponse {
|
|
97
|
+
data: AgendaOffering;
|
|
98
|
+
error: null;
|
|
99
|
+
metadata: ResponseMetadata;
|
|
100
|
+
success: true;
|
|
101
|
+
}
|
|
21
102
|
export interface ListRequest {
|
|
22
103
|
/**
|
|
23
104
|
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
@@ -49,3 +130,66 @@ export interface ListResponse {
|
|
|
49
130
|
metadata: ResponseMetadata;
|
|
50
131
|
success: true;
|
|
51
132
|
}
|
|
133
|
+
export interface UpdateRequest {
|
|
134
|
+
/**
|
|
135
|
+
* Stable off-prefixed Scheduling record identifier; ownership is checked in
|
|
136
|
+
* the authenticated organization.
|
|
137
|
+
*/
|
|
138
|
+
id: string;
|
|
139
|
+
/**
|
|
140
|
+
* Farthest number of days ahead that this offering can be booked.
|
|
141
|
+
*/
|
|
142
|
+
bookingHorizonDays?: number;
|
|
143
|
+
/**
|
|
144
|
+
* Resource occupation added after the visible appointment, in minutes.
|
|
145
|
+
*/
|
|
146
|
+
bufferAfterMinutes?: number;
|
|
147
|
+
/**
|
|
148
|
+
* Resource occupation added before the visible appointment, in minutes.
|
|
149
|
+
*/
|
|
150
|
+
bufferBeforeMinutes?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Maximum concurrent units this resource or offering can accept.
|
|
153
|
+
*/
|
|
154
|
+
capacity?: number;
|
|
155
|
+
/**
|
|
156
|
+
* Bounded JSON configuration owned by this catalog record, including
|
|
157
|
+
* supported domain settings.
|
|
158
|
+
*/
|
|
159
|
+
details?: {
|
|
160
|
+
[key: string]: unknown;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Visible appointment duration for this offering, in minutes; resource
|
|
164
|
+
* buffers apply separately.
|
|
165
|
+
*/
|
|
166
|
+
durationMinutes?: number;
|
|
167
|
+
/**
|
|
168
|
+
* Version last read by the caller. The mutation fails if another writer has
|
|
169
|
+
* changed this record.
|
|
170
|
+
*/
|
|
171
|
+
expectedVersion: number;
|
|
172
|
+
/**
|
|
173
|
+
* Minimum advance notice in minutes before this offering can be booked.
|
|
174
|
+
*/
|
|
175
|
+
minNoticeMinutes?: number;
|
|
176
|
+
/**
|
|
177
|
+
* Display name of this catalog or configuration record.
|
|
178
|
+
*/
|
|
179
|
+
name?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Minute spacing between candidate appointment start times.
|
|
182
|
+
*/
|
|
183
|
+
slotIntervalMinutes?: number;
|
|
184
|
+
/**
|
|
185
|
+
* Lifecycle state controlling whether this record remains available to its
|
|
186
|
+
* domain consumers.
|
|
187
|
+
*/
|
|
188
|
+
status?: "active" | "inactive";
|
|
189
|
+
}
|
|
190
|
+
export interface UpdateResponse {
|
|
191
|
+
data: AgendaOffering;
|
|
192
|
+
error: null;
|
|
193
|
+
metadata: ResponseMetadata;
|
|
194
|
+
success: true;
|
|
195
|
+
}
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
import { Transport, object, } from "../../_/index.js";
|
|
4
|
-
import { AgendaOfferingPageCodec } from "./models.js";
|
|
4
|
+
import { AgendaOfferingCodec, AgendaOfferingPageCodec, } 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
|
+
create: (request, options) => transport.send(CreateOperation, request, options),
|
|
10
11
|
list: (request, options) => transport.send(ListOperation, request, options),
|
|
12
|
+
update: (request, options) => transport.send(UpdateOperation, request, options),
|
|
11
13
|
};
|
|
12
14
|
}
|
|
15
|
+
const CreateOperation = {
|
|
16
|
+
method: "POST",
|
|
17
|
+
route: "/v1/agenda/offerings",
|
|
18
|
+
body: "flat",
|
|
19
|
+
response: object([["data", null, () => AgendaOfferingCodec]]),
|
|
20
|
+
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 },
|
|
21
|
+
};
|
|
13
22
|
const ListOperation = {
|
|
14
23
|
method: "GET",
|
|
15
24
|
route: "/v1/agenda/offerings",
|
|
@@ -17,3 +26,10 @@ const ListOperation = {
|
|
|
17
26
|
response: object([["data", null, () => AgendaOfferingPageCodec]]),
|
|
18
27
|
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
28
|
};
|
|
29
|
+
const UpdateOperation = {
|
|
30
|
+
method: "PATCH",
|
|
31
|
+
route: "/v1/agenda/offerings/{id}",
|
|
32
|
+
body: "flat",
|
|
33
|
+
response: object([["data", null, () => AgendaOfferingCodec]]),
|
|
34
|
+
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 },
|
|
35
|
+
};
|
|
@@ -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, ListRequest, ListResponse, } from "./client.js";
|
|
4
|
+
export type { Client, ClientOptions, CreateRequest, CreateResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
|
|
5
5
|
export type { AgendaOffering, AgendaOfferingPage, } from "./models.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
2
|
import type { ResponseMetadata } from "../../models.js";
|
|
3
|
-
import { type AgendaResourcePage } from "./models.js";
|
|
3
|
+
import { type AgendaResource, type AgendaResourcePage } from "./models.js";
|
|
4
4
|
export interface ClientOptions extends BaseClientOptions {
|
|
5
5
|
/**
|
|
6
6
|
* The URL the paths of the API are relative to.
|
|
@@ -8,6 +8,13 @@ export interface ClientOptions extends BaseClientOptions {
|
|
|
8
8
|
baseUrl: string;
|
|
9
9
|
}
|
|
10
10
|
export interface Client {
|
|
11
|
+
/**
|
|
12
|
+
* Create Resource
|
|
13
|
+
*
|
|
14
|
+
* Create a professional, room or equipment agenda with its capacity and
|
|
15
|
+
* booking policy.
|
|
16
|
+
*/
|
|
17
|
+
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
11
18
|
/**
|
|
12
19
|
* List Resources
|
|
13
20
|
*
|
|
@@ -15,9 +22,58 @@ export interface Client {
|
|
|
15
22
|
* pagination.
|
|
16
23
|
*/
|
|
17
24
|
list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Update Resource
|
|
27
|
+
*
|
|
28
|
+
* Update the agenda named in the path using its expected version.
|
|
29
|
+
*/
|
|
30
|
+
update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
|
|
18
31
|
}
|
|
19
32
|
export declare function createClient(options: ClientOptions): Client;
|
|
20
33
|
export declare function bind(transport: Transport): Client;
|
|
34
|
+
export interface CreateRequest {
|
|
35
|
+
/**
|
|
36
|
+
* Maximum simultaneous capacity units available on this resource; each
|
|
37
|
+
* booking consumes its declared share.
|
|
38
|
+
*/
|
|
39
|
+
capacity?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Bounded JSON configuration owned by this catalog record, including
|
|
42
|
+
* supported domain settings.
|
|
43
|
+
*/
|
|
44
|
+
details?: {
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Resource category used to match booking requirements, such as practitioner,
|
|
49
|
+
* room or equipment.
|
|
50
|
+
*/
|
|
51
|
+
kind: "practitioner" | "assistant" | "room" | "chair" | "equipment" | "location" | "team" | "generic";
|
|
52
|
+
/**
|
|
53
|
+
* Clinic site associated with this record; null means it is not tied to a
|
|
54
|
+
* site.
|
|
55
|
+
*/
|
|
56
|
+
locationId?: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* Display name of this catalog or configuration record.
|
|
59
|
+
*/
|
|
60
|
+
name: string;
|
|
61
|
+
/**
|
|
62
|
+
* Lifecycle state controlling whether this record remains available to its
|
|
63
|
+
* domain consumers.
|
|
64
|
+
*/
|
|
65
|
+
status?: "active" | "inactive";
|
|
66
|
+
/**
|
|
67
|
+
* IANA timezone used to interpret the record’s local dates and time bands.
|
|
68
|
+
*/
|
|
69
|
+
timezone: string;
|
|
70
|
+
}
|
|
71
|
+
export interface CreateResponse {
|
|
72
|
+
data: AgendaResource;
|
|
73
|
+
error: null;
|
|
74
|
+
metadata: ResponseMetadata;
|
|
75
|
+
success: true;
|
|
76
|
+
}
|
|
21
77
|
export interface ListRequest {
|
|
22
78
|
/**
|
|
23
79
|
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
@@ -48,3 +104,56 @@ export interface ListResponse {
|
|
|
48
104
|
metadata: ResponseMetadata;
|
|
49
105
|
success: true;
|
|
50
106
|
}
|
|
107
|
+
export interface UpdateRequest {
|
|
108
|
+
/**
|
|
109
|
+
* Stable srs-prefixed Scheduling record identifier; ownership is checked in
|
|
110
|
+
* the authenticated organization.
|
|
111
|
+
*/
|
|
112
|
+
id: string;
|
|
113
|
+
/**
|
|
114
|
+
* Maximum simultaneous capacity units available on this resource; each
|
|
115
|
+
* booking consumes its declared share.
|
|
116
|
+
*/
|
|
117
|
+
capacity?: number;
|
|
118
|
+
/**
|
|
119
|
+
* Bounded JSON configuration owned by this catalog record, including
|
|
120
|
+
* supported domain settings.
|
|
121
|
+
*/
|
|
122
|
+
details?: {
|
|
123
|
+
[key: string]: unknown;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Version last read by the caller. The mutation fails if another writer has
|
|
127
|
+
* changed this record.
|
|
128
|
+
*/
|
|
129
|
+
expectedVersion: number;
|
|
130
|
+
/**
|
|
131
|
+
* Resource category used to match booking requirements, such as practitioner,
|
|
132
|
+
* room or equipment.
|
|
133
|
+
*/
|
|
134
|
+
kind?: "practitioner" | "assistant" | "room" | "chair" | "equipment" | "location" | "team" | "generic";
|
|
135
|
+
/**
|
|
136
|
+
* Clinic site associated with this record; null means it is not tied to a
|
|
137
|
+
* site.
|
|
138
|
+
*/
|
|
139
|
+
locationId?: string | null;
|
|
140
|
+
/**
|
|
141
|
+
* Display name of this catalog or configuration record.
|
|
142
|
+
*/
|
|
143
|
+
name?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Lifecycle state controlling whether this record remains available to its
|
|
146
|
+
* domain consumers.
|
|
147
|
+
*/
|
|
148
|
+
status?: "active" | "inactive";
|
|
149
|
+
/**
|
|
150
|
+
* IANA timezone used to interpret the record’s local dates and time bands.
|
|
151
|
+
*/
|
|
152
|
+
timezone?: string;
|
|
153
|
+
}
|
|
154
|
+
export interface UpdateResponse {
|
|
155
|
+
data: AgendaResource;
|
|
156
|
+
error: null;
|
|
157
|
+
metadata: ResponseMetadata;
|
|
158
|
+
success: true;
|
|
159
|
+
}
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
import { Transport, object, } from "../../_/index.js";
|
|
4
|
-
import { AgendaResourcePageCodec } from "./models.js";
|
|
4
|
+
import { AgendaResourceCodec, AgendaResourcePageCodec, } 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
|
+
create: (request, options) => transport.send(CreateOperation, request, options),
|
|
10
11
|
list: (request, options) => transport.send(ListOperation, request, options),
|
|
12
|
+
update: (request, options) => transport.send(UpdateOperation, request, options),
|
|
11
13
|
};
|
|
12
14
|
}
|
|
15
|
+
const CreateOperation = {
|
|
16
|
+
method: "POST",
|
|
17
|
+
route: "/v1/agenda/resources",
|
|
18
|
+
body: "flat",
|
|
19
|
+
response: object([["data", null, () => AgendaResourceCodec]]),
|
|
20
|
+
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 },
|
|
21
|
+
};
|
|
13
22
|
const ListOperation = {
|
|
14
23
|
method: "GET",
|
|
15
24
|
route: "/v1/agenda/resources",
|
|
@@ -17,3 +26,10 @@ const ListOperation = {
|
|
|
17
26
|
response: object([["data", null, () => AgendaResourcePageCodec]]),
|
|
18
27
|
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
28
|
};
|
|
29
|
+
const UpdateOperation = {
|
|
30
|
+
method: "PATCH",
|
|
31
|
+
route: "/v1/agenda/resources/{id}",
|
|
32
|
+
body: "flat",
|
|
33
|
+
response: object([["data", null, () => AgendaResourceCodec]]),
|
|
34
|
+
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 },
|
|
35
|
+
};
|
|
@@ -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, ListRequest, ListResponse, } from "./client.js";
|
|
4
|
+
export type { Client, ClientOptions, CreateRequest, CreateResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
|
|
5
5
|
export type { AgendaResource, AgendaResourcePage, } from "./models.js";
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
+
import type { ResponseMetadata } 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 Schedule Rules
|
|
12
|
+
*
|
|
13
|
+
* Read the agenda’s weekly bands and dated overrides in its local timezone.
|
|
14
|
+
*/
|
|
15
|
+
list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Replace Schedule Rules
|
|
18
|
+
*
|
|
19
|
+
* Replace the agenda’s complete working-rule set atomically using its
|
|
20
|
+
* expected resource version.
|
|
21
|
+
*/
|
|
22
|
+
replace(request: ReplaceRequest, options?: RequestOptions): Promise<ReplaceResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Upsert Schedule Rule
|
|
25
|
+
*
|
|
26
|
+
* Write one working rule for the agenda using the expected resource version.
|
|
27
|
+
*/
|
|
28
|
+
upsert(request: UpsertRequest, options?: RequestOptions): Promise<UpsertResponse>;
|
|
29
|
+
}
|
|
30
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
31
|
+
export declare function bind(transport: Transport): Client;
|
|
32
|
+
export interface ListRequest {
|
|
33
|
+
/**
|
|
34
|
+
* Scheduling resource addressed by this request or associated with this
|
|
35
|
+
* record.
|
|
36
|
+
*/
|
|
37
|
+
resourceId?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface ListResponse {
|
|
40
|
+
data: {
|
|
41
|
+
data: {
|
|
42
|
+
date: Temporal.PlainDate | null;
|
|
43
|
+
effectiveFrom: Temporal.PlainDate | null;
|
|
44
|
+
effectiveTo: Temporal.PlainDate | null;
|
|
45
|
+
endTime: string;
|
|
46
|
+
id: string;
|
|
47
|
+
kind: "weekly" | "date_override" | "time_off" | "block";
|
|
48
|
+
object: "scheduling.schedule_rule";
|
|
49
|
+
resourceId: string;
|
|
50
|
+
schemaVersion: 1;
|
|
51
|
+
startTime: string;
|
|
52
|
+
timezone: string;
|
|
53
|
+
updatedAt: Temporal.Instant;
|
|
54
|
+
version: number;
|
|
55
|
+
weekdays: number[];
|
|
56
|
+
}[];
|
|
57
|
+
object: "list";
|
|
58
|
+
};
|
|
59
|
+
error: null;
|
|
60
|
+
metadata: ResponseMetadata;
|
|
61
|
+
success: true;
|
|
62
|
+
}
|
|
63
|
+
export interface ReplaceRequest {
|
|
64
|
+
/**
|
|
65
|
+
* Stable srs-prefixed Scheduling record identifier; ownership is checked in
|
|
66
|
+
* the authenticated organization.
|
|
67
|
+
*/
|
|
68
|
+
resourceId: string;
|
|
69
|
+
/**
|
|
70
|
+
* Identifiers and versions of the complete schedule loaded by the editor;
|
|
71
|
+
* concurrent changes reject the replacement.
|
|
72
|
+
*/
|
|
73
|
+
expectedRules: {
|
|
74
|
+
id: string;
|
|
75
|
+
version: number;
|
|
76
|
+
}[];
|
|
77
|
+
/**
|
|
78
|
+
* Schedule bands or profile policy rules owned by this configuration.
|
|
79
|
+
*/
|
|
80
|
+
rules: {
|
|
81
|
+
date?: Temporal.PlainDate | null;
|
|
82
|
+
effectiveFrom?: Temporal.PlainDate | null;
|
|
83
|
+
effectiveTo?: Temporal.PlainDate | null;
|
|
84
|
+
endTime: string;
|
|
85
|
+
kind: "weekly" | "date_override" | "time_off" | "block";
|
|
86
|
+
startTime: string;
|
|
87
|
+
weekdays?: number[];
|
|
88
|
+
}[];
|
|
89
|
+
}
|
|
90
|
+
export interface ReplaceResponse {
|
|
91
|
+
data: {
|
|
92
|
+
data: {
|
|
93
|
+
date: Temporal.PlainDate | null;
|
|
94
|
+
effectiveFrom: Temporal.PlainDate | null;
|
|
95
|
+
effectiveTo: Temporal.PlainDate | null;
|
|
96
|
+
endTime: string;
|
|
97
|
+
id: string;
|
|
98
|
+
kind: "weekly" | "date_override" | "time_off" | "block";
|
|
99
|
+
object: "scheduling.schedule_rule";
|
|
100
|
+
resourceId: string;
|
|
101
|
+
schemaVersion: 1;
|
|
102
|
+
startTime: string;
|
|
103
|
+
timezone: string;
|
|
104
|
+
updatedAt: Temporal.Instant;
|
|
105
|
+
version: number;
|
|
106
|
+
weekdays: number[];
|
|
107
|
+
}[];
|
|
108
|
+
object: "list";
|
|
109
|
+
};
|
|
110
|
+
error: null;
|
|
111
|
+
metadata: ResponseMetadata;
|
|
112
|
+
success: true;
|
|
113
|
+
}
|
|
114
|
+
export interface UpsertRequest {
|
|
115
|
+
/**
|
|
116
|
+
* Scheduling resource addressed by this request or associated with this
|
|
117
|
+
* record.
|
|
118
|
+
*/
|
|
119
|
+
resourceId: string;
|
|
120
|
+
/**
|
|
121
|
+
* Specific local calendar date for a dated band or closure; null for a weekly
|
|
122
|
+
* band.
|
|
123
|
+
*/
|
|
124
|
+
date?: Temporal.PlainDate | null;
|
|
125
|
+
/**
|
|
126
|
+
* First local date on which this weekly band applies; null means no lower
|
|
127
|
+
* date bound.
|
|
128
|
+
*/
|
|
129
|
+
effectiveFrom?: Temporal.PlainDate | null;
|
|
130
|
+
/**
|
|
131
|
+
* Last local date on which this weekly band applies; null means no upper date
|
|
132
|
+
* bound.
|
|
133
|
+
*/
|
|
134
|
+
effectiveTo?: Temporal.PlainDate | null;
|
|
135
|
+
/**
|
|
136
|
+
* End of this local time band in HH:MM, interpreted in its resource’s
|
|
137
|
+
* timezone.
|
|
138
|
+
*/
|
|
139
|
+
endTime: string;
|
|
140
|
+
/**
|
|
141
|
+
* Version last read by the caller. The mutation fails if another writer has
|
|
142
|
+
* changed this record.
|
|
143
|
+
*/
|
|
144
|
+
expectedVersion?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Identifier of the record addressed or returned by this schema.
|
|
147
|
+
*/
|
|
148
|
+
id?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Declared domain kind of this record or configuration element.
|
|
151
|
+
*/
|
|
152
|
+
kind: "weekly" | "date_override" | "time_off" | "block";
|
|
153
|
+
/**
|
|
154
|
+
* Start of this local time band in HH:MM, interpreted in its resource’s
|
|
155
|
+
* timezone.
|
|
156
|
+
*/
|
|
157
|
+
startTime: string;
|
|
158
|
+
/**
|
|
159
|
+
* IANA timezone used to interpret the record’s local dates and time bands.
|
|
160
|
+
*/
|
|
161
|
+
timezone: string;
|
|
162
|
+
/**
|
|
163
|
+
* Local weekdays on which a weekly band applies, numbered Sunday 0 through
|
|
164
|
+
* Saturday 6.
|
|
165
|
+
*/
|
|
166
|
+
weekdays?: number[];
|
|
167
|
+
}
|
|
168
|
+
export interface UpsertResponse {
|
|
169
|
+
data: {
|
|
170
|
+
date: Temporal.PlainDate | null;
|
|
171
|
+
effectiveFrom: Temporal.PlainDate | null;
|
|
172
|
+
effectiveTo: Temporal.PlainDate | null;
|
|
173
|
+
endTime: string;
|
|
174
|
+
id: string;
|
|
175
|
+
kind: "weekly" | "date_override" | "time_off" | "block";
|
|
176
|
+
object: "scheduling.schedule_rule";
|
|
177
|
+
resourceId: string;
|
|
178
|
+
schemaVersion: 1;
|
|
179
|
+
startTime: string;
|
|
180
|
+
timezone: string;
|
|
181
|
+
updatedAt: Temporal.Instant;
|
|
182
|
+
version: number;
|
|
183
|
+
weekdays: number[];
|
|
184
|
+
};
|
|
185
|
+
error: null;
|
|
186
|
+
metadata: ResponseMetadata;
|
|
187
|
+
success: true;
|
|
188
|
+
}
|