@arbol-ai/sdk 4.0.0 → 5.0.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.
Files changed (230) hide show
  1. package/README.md +15 -3
  2. package/dist/agenda/appointments/client.d.ts +165 -52
  3. package/dist/agenda/appointments/client.js +19 -11
  4. package/dist/agenda/appointments/index.d.ts +1 -1
  5. package/dist/agenda/availability/client.d.ts +11 -72
  6. package/dist/agenda/availability/client.js +5 -14
  7. package/dist/agenda/availability/index.d.ts +1 -1
  8. package/dist/agenda/bookingLocations/client.d.ts +51 -0
  9. package/dist/agenda/bookingLocations/client.js +19 -0
  10. package/dist/agenda/bookingLocations/index.d.ts +4 -0
  11. package/dist/agenda/bookingLocations/index.js +4 -0
  12. package/dist/agenda/bookingOfferings/client.d.ts +82 -0
  13. package/dist/agenda/bookingOfferings/client.js +18 -0
  14. package/dist/agenda/bookingOfferings/index.d.ts +5 -0
  15. package/dist/agenda/bookingOfferings/index.js +4 -0
  16. package/dist/agenda/bookingOfferings/models.d.ts +92 -0
  17. package/dist/agenda/bookingOfferings/models.js +3 -0
  18. package/dist/agenda/bookingRequirements/client.d.ts +118 -0
  19. package/dist/agenda/bookingRequirements/client.js +18 -0
  20. package/dist/agenda/bookingRequirements/index.d.ts +4 -0
  21. package/dist/agenda/bookingRequirements/index.js +4 -0
  22. package/dist/agenda/bookingSlots/client.d.ts +78 -0
  23. package/dist/agenda/bookingSlots/client.js +19 -0
  24. package/dist/agenda/bookingSlots/index.d.ts +4 -0
  25. package/dist/agenda/bookingSlots/index.js +4 -0
  26. package/dist/agenda/bookings/client.d.ts +44 -375
  27. package/dist/agenda/bookings/client.js +10 -52
  28. package/dist/agenda/bookings/index.d.ts +2 -2
  29. package/dist/agenda/bookings/models.d.ts +0 -92
  30. package/dist/agenda/client.d.ts +14 -0
  31. package/dist/agenda/client.js +35 -0
  32. package/dist/agenda/firstAvailability/client.d.ts +74 -0
  33. package/dist/agenda/firstAvailability/client.js +19 -0
  34. package/dist/agenda/firstAvailability/index.d.ts +5 -0
  35. package/dist/agenda/firstAvailability/index.js +4 -0
  36. package/dist/agenda/firstAvailability/models.d.ts +31 -0
  37. package/dist/agenda/firstAvailability/models.js +7 -0
  38. package/dist/agenda/index.d.ts +1 -1
  39. package/dist/agenda/models.d.ts +19 -94
  40. package/dist/agenda/models.js +0 -3
  41. package/dist/agenda/nearestBookingSlots/client.d.ts +93 -0
  42. package/dist/agenda/nearestBookingSlots/client.js +19 -0
  43. package/dist/agenda/nearestBookingSlots/index.d.ts +5 -0
  44. package/dist/agenda/nearestBookingSlots/index.js +4 -0
  45. package/dist/agenda/nearestBookingSlots/models.d.ts +38 -0
  46. package/dist/agenda/nearestBookingSlots/models.js +7 -0
  47. package/dist/agenda/offerings/client.d.ts +2 -2
  48. package/dist/agenda/offerings/client.js +1 -1
  49. package/dist/agenda/resourceSchedules/client.d.ts +75 -0
  50. package/dist/agenda/resourceSchedules/client.js +19 -0
  51. package/dist/agenda/resourceSchedules/index.d.ts +4 -0
  52. package/dist/agenda/resourceSchedules/index.js +4 -0
  53. package/dist/agenda/resources/client.d.ts +2 -2
  54. package/dist/agenda/resources/client.js +1 -1
  55. package/dist/agenda/scheduleRules/client.d.ts +125 -85
  56. package/dist/agenda/scheduleRules/client.js +17 -16
  57. package/dist/agenda/scheduleRules/index.d.ts +2 -1
  58. package/dist/agenda/scheduleRules/models.d.ts +33 -0
  59. package/dist/agenda/scheduleRules/models.js +6 -0
  60. package/dist/agenda/services/client.d.ts +2 -2
  61. package/dist/agenda/services/client.js +1 -1
  62. package/dist/agenda/waitlist/client.d.ts +40 -29
  63. package/dist/agenda/waitlist/client.js +4 -4
  64. package/dist/agenda/waitlist/index.d.ts +1 -1
  65. package/dist/agenda/waitlist/models.d.ts +17 -0
  66. package/dist/agenda/waitlist/models.js +4 -1
  67. package/dist/axxa/authorizations/client.d.ts +3 -35
  68. package/dist/axxa/authorizations/client.js +1 -1
  69. package/dist/axxa/authorizations/index.d.ts +1 -0
  70. package/dist/axxa/authorizations/models.d.ts +112 -0
  71. package/dist/axxa/authorizations/models.js +3 -0
  72. package/dist/axxa/connections/client.d.ts +19 -45
  73. package/dist/axxa/connections/client.js +10 -11
  74. package/dist/axxa/connections/index.d.ts +1 -0
  75. package/dist/axxa/connections/models.d.ts +269 -0
  76. package/dist/axxa/connections/models.js +3 -0
  77. package/dist/axxa/eligibility/client.d.ts +3 -25
  78. package/dist/axxa/eligibility/client.js +1 -1
  79. package/dist/axxa/eligibility/index.d.ts +1 -0
  80. package/dist/axxa/eligibility/models.d.ts +102 -0
  81. package/dist/axxa/eligibility/models.js +3 -0
  82. package/dist/axxa/index.d.ts +1 -1
  83. package/dist/axxa/models.d.ts +243 -168
  84. package/dist/axxa/provider/client.d.ts +5 -11
  85. package/dist/axxa/provider/client.js +1 -1
  86. package/dist/axxa/provider/index.d.ts +1 -0
  87. package/dist/axxa/provider/models.d.ts +87 -0
  88. package/dist/axxa/provider/models.js +3 -0
  89. package/dist/gmedic/agendaServices/client.d.ts +13 -9
  90. package/dist/gmedic/agendaServices/client.js +2 -2
  91. package/dist/gmedic/agendaServices/index.d.ts +1 -1
  92. package/dist/gmedic/agendaServices/models.d.ts +53 -1
  93. package/dist/gmedic/agendas/client.d.ts +16 -9
  94. package/dist/gmedic/agendas/client.js +2 -2
  95. package/dist/gmedic/agendas/index.d.ts +1 -1
  96. package/dist/gmedic/agendas/models.d.ts +53 -1
  97. package/dist/gmedic/appointments/client.d.ts +34 -241
  98. package/dist/gmedic/appointments/client.js +12 -10
  99. package/dist/gmedic/appointments/index.d.ts +1 -1
  100. package/dist/gmedic/appointments/models.d.ts +518 -1
  101. package/dist/gmedic/appointments/models.js +28 -2
  102. package/dist/gmedic/availability/client.d.ts +24 -10
  103. package/dist/gmedic/availability/client.js +4 -3
  104. package/dist/gmedic/availability/index.d.ts +1 -1
  105. package/dist/gmedic/availability/models.d.ts +57 -1
  106. package/dist/gmedic/availability/models.js +7 -1
  107. package/dist/gmedic/availableDays/client.d.ts +11 -8
  108. package/dist/gmedic/availableDays/client.js +1 -1
  109. package/dist/gmedic/availableDays/index.d.ts +1 -1
  110. package/dist/gmedic/availableDays/models.d.ts +53 -1
  111. package/dist/gmedic/branchOffices/client.d.ts +13 -9
  112. package/dist/gmedic/branchOffices/client.js +2 -2
  113. package/dist/gmedic/branchOffices/index.d.ts +1 -1
  114. package/dist/gmedic/branchOffices/models.d.ts +58 -1
  115. package/dist/gmedic/connections/client.d.ts +19 -42
  116. package/dist/gmedic/connections/client.js +10 -11
  117. package/dist/gmedic/connections/index.d.ts +1 -0
  118. package/dist/gmedic/connections/models.d.ts +162 -0
  119. package/dist/gmedic/connections/models.js +3 -0
  120. package/dist/gmedic/dictionaryEntries/client.d.ts +20 -10
  121. package/dist/gmedic/dictionaryEntries/client.js +2 -2
  122. package/dist/gmedic/dictionaryEntries/index.d.ts +1 -1
  123. package/dist/gmedic/dictionaryEntries/models.d.ts +53 -1
  124. package/dist/gmedic/healthPartners/client.d.ts +19 -9
  125. package/dist/gmedic/healthPartners/client.js +2 -2
  126. package/dist/gmedic/healthPartners/index.d.ts +1 -1
  127. package/dist/gmedic/healthPartners/models.d.ts +53 -1
  128. package/dist/gmedic/healthPromotionEntities/client.d.ts +20 -10
  129. package/dist/gmedic/healthPromotionEntities/client.js +2 -2
  130. package/dist/gmedic/healthPromotionEntities/index.d.ts +1 -1
  131. package/dist/gmedic/healthPromotionEntities/models.d.ts +53 -1
  132. package/dist/gmedic/index.d.ts +1 -1
  133. package/dist/gmedic/laboralRiskManagers/client.d.ts +20 -10
  134. package/dist/gmedic/laboralRiskManagers/client.js +2 -2
  135. package/dist/gmedic/laboralRiskManagers/index.d.ts +1 -1
  136. package/dist/gmedic/laboralRiskManagers/models.d.ts +53 -1
  137. package/dist/gmedic/models.d.ts +194 -133
  138. package/dist/gmedic/occupations/client.d.ts +19 -9
  139. package/dist/gmedic/occupations/client.js +2 -2
  140. package/dist/gmedic/occupations/index.d.ts +1 -1
  141. package/dist/gmedic/occupations/models.d.ts +53 -1
  142. package/dist/gmedic/patientNotes/client.d.ts +25 -55
  143. package/dist/gmedic/patientNotes/client.js +5 -5
  144. package/dist/gmedic/patientNotes/index.d.ts +1 -1
  145. package/dist/gmedic/patientNotes/models.d.ts +232 -1
  146. package/dist/gmedic/patients/client.d.ts +40 -359
  147. package/dist/gmedic/patients/client.js +13 -5
  148. package/dist/gmedic/patients/index.d.ts +2 -2
  149. package/dist/gmedic/patients/models.d.ts +795 -1
  150. package/dist/gmedic/services/client.d.ts +22 -16
  151. package/dist/gmedic/services/client.js +2 -2
  152. package/dist/gmedic/services/index.d.ts +1 -1
  153. package/dist/gmedic/services/models.d.ts +53 -3
  154. package/dist/gmedic/sessionPackages/client.d.ts +21 -58
  155. package/dist/gmedic/sessionPackages/client.js +5 -5
  156. package/dist/gmedic/sessionPackages/index.d.ts +1 -1
  157. package/dist/gmedic/sessionPackages/models.d.ts +183 -1
  158. package/dist/index.d.ts +1 -1
  159. package/dist/models.d.ts +61 -0
  160. package/dist/models.js +6 -0
  161. package/dist/nuevaEps/affiliations/client.js +1 -1
  162. package/dist/nuevaEps/affiliations/models.d.ts +3 -1
  163. package/dist/nuevaEps/connections/client.d.ts +9 -9
  164. package/dist/nuevaEps/connections/client.js +9 -9
  165. package/dist/nuevaEps/connections/index.d.ts +1 -1
  166. package/dist/nuevaEps/connections/models.d.ts +1 -47
  167. package/dist/nuevaEps/connections/models.js +1 -8
  168. package/dist/sura/affiliations/client.d.ts +3 -35
  169. package/dist/sura/affiliations/client.js +6 -6
  170. package/dist/sura/affiliations/index.d.ts +1 -0
  171. package/dist/sura/affiliations/models.d.ts +71 -0
  172. package/dist/sura/affiliations/models.js +8 -0
  173. package/dist/sura/appointments/client.d.ts +27 -327
  174. package/dist/sura/appointments/client.js +15 -21
  175. package/dist/sura/appointments/index.d.ts +2 -1
  176. package/dist/sura/appointments/models.d.ts +310 -0
  177. package/dist/sura/appointments/models.js +22 -0
  178. package/dist/sura/authorizations/client.d.ts +3 -43
  179. package/dist/sura/authorizations/client.js +6 -6
  180. package/dist/sura/authorizations/index.d.ts +1 -0
  181. package/dist/sura/authorizations/models.d.ts +79 -0
  182. package/dist/sura/authorizations/models.js +8 -0
  183. package/dist/sura/availability/client.d.ts +4 -68
  184. package/dist/sura/availability/client.js +9 -9
  185. package/dist/sura/availability/index.d.ts +2 -1
  186. package/dist/sura/availability/models.d.ts +103 -0
  187. package/dist/sura/availability/models.js +8 -0
  188. package/dist/sura/bookingOptions/client.d.ts +35 -0
  189. package/dist/sura/bookingOptions/client.js +19 -0
  190. package/dist/sura/bookingOptions/index.d.ts +5 -0
  191. package/dist/sura/bookingOptions/index.js +4 -0
  192. package/dist/sura/bookingOptions/models.d.ts +143 -0
  193. package/dist/sura/bookingOptions/models.js +8 -0
  194. package/dist/sura/client.d.ts +2 -0
  195. package/dist/sura/client.js +5 -0
  196. package/dist/sura/connections/client.d.ts +20 -98
  197. package/dist/sura/connections/client.js +10 -10
  198. package/dist/sura/connections/index.d.ts +1 -1
  199. package/dist/sura/connections/models.d.ts +102 -1
  200. package/dist/sura/connections/models.js +6 -0
  201. package/dist/sura/copays/client.d.ts +4 -40
  202. package/dist/sura/copays/client.js +9 -9
  203. package/dist/sura/copays/index.d.ts +2 -1
  204. package/dist/sura/copays/models.d.ts +75 -0
  205. package/dist/sura/copays/models.js +8 -0
  206. package/dist/sura/index.d.ts +1 -1
  207. package/dist/sura/models.d.ts +204 -148
  208. package/dist/sura/models.js +20 -1
  209. package/dist/sura/operations/client.d.ts +2 -7
  210. package/dist/sura/operations/client.js +4 -4
  211. package/dist/sura/operations/index.d.ts +1 -0
  212. package/dist/sura/operations/models.d.ts +43 -0
  213. package/dist/sura/operations/models.js +8 -0
  214. package/dist/sura/patients/client.d.ts +3 -40
  215. package/dist/sura/patients/client.js +6 -6
  216. package/dist/sura/patients/index.d.ts +1 -0
  217. package/dist/sura/patients/models.d.ts +76 -0
  218. package/dist/sura/patients/models.js +8 -0
  219. package/dist/sura/professionals/client.d.ts +7 -9
  220. package/dist/sura/professionals/client.js +3 -4
  221. package/dist/sura/professionals/index.d.ts +1 -1
  222. package/dist/sura/professionals/models.d.ts +40 -1
  223. package/dist/sura/services/client.d.ts +7 -8
  224. package/dist/sura/services/client.js +3 -4
  225. package/dist/sura/services/index.d.ts +1 -0
  226. package/dist/sura/services/models.d.ts +40 -0
  227. package/dist/sura/services/models.js +3 -0
  228. package/dist/visoft/index.d.ts +1 -1
  229. package/dist/visoft/models.d.ts +1 -16
  230. package/package.json +3 -3
@@ -0,0 +1,38 @@
1
+ import type { PageInfo } from "../../models.js";
2
+ import { type AgendaSlot } from "../models.js";
3
+ export interface AgendaNearestSlotPage {
4
+ /**
5
+ * Earliest signed slots in global time order or grouped by offering,
6
+ * according to the requested grouping.
7
+ */
8
+ data: AgendaSlot[];
9
+ /**
10
+ * Instant when this response was assembled; not a validity guarantee for
11
+ * returned capacity.
12
+ */
13
+ generatedAt: string;
14
+ /**
15
+ * Continue first-availability search from this instant; null when the
16
+ * returned search has no continuation.
17
+ */
18
+ nextFrom: string | null;
19
+ /**
20
+ * Stable discriminator identifying the shape of this scheduling response.
21
+ */
22
+ object: "list";
23
+ /**
24
+ * Cursors at this page's first and last slot: nextCursor reads the slots
25
+ * after it, previousCursor (with direction backward) the ones before it.
26
+ * group offering answers one page.
27
+ */
28
+ pageInfo: PageInfo;
29
+ /**
30
+ * End instant of the availability window actually examined by this request.
31
+ */
32
+ searchedUntil: string;
33
+ /**
34
+ * True when the bounded search left eligible offerings or agendas unexamined.
35
+ */
36
+ truncatedOfferings: boolean;
37
+ }
38
+ export declare const AgendaNearestSlotPageCodec: import("../../_/codec.js").Codec;
@@ -0,0 +1,7 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { array, object } from "../../_/index.js";
4
+ import { AgendaSlotCodec } from "../models.js";
5
+ export const AgendaNearestSlotPageCodec = object([
6
+ ["data", null, array(() => AgendaSlotCodec)],
7
+ ]);
@@ -25,7 +25,7 @@ export interface Client {
25
25
  /**
26
26
  * Update Offering
27
27
  *
28
- * Update the offering named in the path using its expected version.
28
+ * Update the offering named by offeringId using its expected version.
29
29
  */
30
30
  update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
31
31
  }
@@ -136,7 +136,7 @@ export interface UpdateRequest {
136
136
  * Stable off-prefixed Scheduling record identifier; ownership is checked in
137
137
  * the authenticated organization.
138
138
  */
139
- id: string;
139
+ offeringId: string;
140
140
  /**
141
141
  * Farthest number of days ahead that this offering can be booked.
142
142
  */
@@ -28,7 +28,7 @@ const ListOperation = {
28
28
  };
29
29
  const UpdateOperation = {
30
30
  method: "PATCH",
31
- route: "/v1/agenda/offerings/{id}",
31
+ route: "/v1/agenda/offerings/{offeringId}",
32
32
  body: "flat",
33
33
  response: object([["data", null, () => AgendaOfferingCodec]]),
34
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 },
@@ -0,0 +1,75 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import 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
+ * Update Resource Schedule
12
+ *
13
+ * Update an agenda’s hours as one complete set of working rules, replaced
14
+ * atomically, naming the rules last read (expectedRules); a rule left out of
15
+ * the set is removed.
16
+ */
17
+ update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
18
+ }
19
+ export declare function createClient(options: ClientOptions): Client;
20
+ export declare function bind(transport: Transport): Client;
21
+ export interface UpdateRequest {
22
+ /**
23
+ * Stable srs-prefixed Scheduling record identifier; ownership is checked in
24
+ * the authenticated organization.
25
+ */
26
+ resourceId: string;
27
+ /**
28
+ * Identifiers and versions of the complete schedule loaded by the editor;
29
+ * concurrent changes reject the replacement.
30
+ */
31
+ expectedRules: {
32
+ id: string;
33
+ version: number;
34
+ }[];
35
+ /**
36
+ * Schedule bands or profile policy rules owned by this configuration.
37
+ */
38
+ rules: {
39
+ date?: Temporal.PlainDate | null;
40
+ effectiveFrom?: Temporal.PlainDate | null;
41
+ effectiveTo?: Temporal.PlainDate | null;
42
+ endTime?: string;
43
+ from?: string;
44
+ kind: "weekly" | "date_override" | "time_off" | "block";
45
+ startTime?: string;
46
+ to?: string;
47
+ weekdays?: number[];
48
+ }[];
49
+ }
50
+ export interface UpdateResponse {
51
+ data: {
52
+ data: {
53
+ date: Temporal.PlainDate | null;
54
+ effectiveFrom: Temporal.PlainDate | null;
55
+ effectiveTo: Temporal.PlainDate | null;
56
+ endTime: string;
57
+ from: string;
58
+ id: string;
59
+ kind: "weekly" | "date_override" | "time_off" | "block";
60
+ object: "scheduling.schedule_rule";
61
+ resourceId: string;
62
+ schemaVersion: 1;
63
+ startTime: string;
64
+ timezone: string;
65
+ to: string;
66
+ updatedAt: Temporal.Instant;
67
+ version: number;
68
+ weekdays: number[];
69
+ }[];
70
+ object: "list";
71
+ };
72
+ error: null;
73
+ metadata: AgendaResponseMetadata;
74
+ success: true;
75
+ }
@@ -0,0 +1,19 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, array, date, instant, object, } from "../../_/index.js";
4
+ export function createClient(options) {
5
+ return bind(new Transport(options));
6
+ }
7
+ export function bind(transport) {
8
+ return {
9
+ update: (request, options) => transport.send(UpdateOperation, request, options),
10
+ };
11
+ }
12
+ const UpdateOperation = {
13
+ method: "PATCH",
14
+ route: "/v1/agenda/resource-schedules/{resourceId}",
15
+ body: "flat",
16
+ request: object([["rules", null, array(object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date]]))]]),
17
+ response: object([["data", null, object([["data", null, array(object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date], ["updatedAt", null, instant]]))]])]]),
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
+ };
@@ -0,0 +1,4 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, UpdateRequest, UpdateResponse, } from "./client.js";
@@ -0,0 +1,4 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export { ApiError } from "../../_/index.js";
4
+ export { createClient } from "./client.js";
@@ -25,7 +25,7 @@ export interface Client {
25
25
  /**
26
26
  * Update Resource
27
27
  *
28
- * Update the agenda named in the path using its expected version.
28
+ * Update the agenda named by resourceId using its expected version.
29
29
  */
30
30
  update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
31
31
  }
@@ -109,7 +109,7 @@ export interface UpdateRequest {
109
109
  * Stable srs-prefixed Scheduling record identifier; ownership is checked in
110
110
  * the authenticated organization.
111
111
  */
112
- id: string;
112
+ resourceId: string;
113
113
  /**
114
114
  * Maximum simultaneous capacity units available on this resource; each
115
115
  * booking consumes its declared share.
@@ -28,7 +28,7 @@ const ListOperation = {
28
28
  };
29
29
  const UpdateOperation = {
30
30
  method: "PATCH",
31
- route: "/v1/agenda/resources/{id}",
31
+ route: "/v1/agenda/resources/{resourceId}",
32
32
  body: "flat",
33
33
  response: object([["data", null, () => AgendaResourceCodec]]),
34
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 },
@@ -1,5 +1,6 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
2
  import type { AgendaResponseMetadata } from "../models.js";
3
+ import { type AgendaScheduleRulePage } from "./models.js";
3
4
  export interface ClientOptions extends BaseClientOptions {
4
5
  /**
5
6
  * The URL the paths of the API are relative to.
@@ -8,115 +9,140 @@ export interface ClientOptions extends BaseClientOptions {
8
9
  }
9
10
  export interface Client {
10
11
  /**
11
- * List Schedule Rules
12
+ * Create Schedule Rule
12
13
  *
13
- * Read the agenda’s weekly bands and dated overrides in its local timezone.
14
+ * Add one working rule to an agenda: a weekly band, a dated override, time
15
+ * off or a block, with its window as from and to in the agenda’s timezone.
14
16
  */
15
- list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
17
+ create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
16
18
  /**
17
- * Replace Schedule Rules
19
+ * List Schedule Rules
18
20
  *
19
- * Replace the agenda’s complete working-rule set atomically using its
20
- * expected resource version.
21
+ * Read the agenda’s weekly bands and dated overrides in its local timezone,
22
+ * by agenda then start, a page at a time.
21
23
  */
22
- replace(request: ReplaceRequest, options?: RequestOptions): Promise<ReplaceResponse>;
24
+ list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
23
25
  /**
24
- * Upsert Schedule Rule
26
+ * Update Schedule Rule
25
27
  *
26
- * Write one working rule for the agenda using the expected resource version.
28
+ * Rewrite one of an agenda’s working rules, named by scheduleRuleId, with the
29
+ * version last read (expectedVersion). A rule stays on its agenda.
27
30
  */
28
- upsert(request: UpsertRequest, options?: RequestOptions): Promise<UpsertResponse>;
31
+ update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
29
32
  }
30
33
  export declare function createClient(options: ClientOptions): Client;
31
34
  export declare function bind(transport: Transport): Client;
32
- export interface ListRequest {
35
+ export interface CreateRequest {
36
+ /**
37
+ * Specific local calendar date for a dated band or closure; null for a weekly
38
+ * band.
39
+ */
40
+ date?: Temporal.PlainDate | null;
41
+ /**
42
+ * First local date on which this weekly band applies; null means no lower
43
+ * date bound.
44
+ */
45
+ effectiveFrom?: Temporal.PlainDate | null;
46
+ /**
47
+ * Last local date on which this weekly band applies; null means no upper date
48
+ * bound.
49
+ */
50
+ effectiveTo?: Temporal.PlainDate | null;
51
+ /**
52
+ * Deprecated: use `to`. Answered until 2027-01-28.
53
+ *
54
+ * @deprecated
55
+ */
56
+ endTime?: string;
57
+ /**
58
+ * Start of this local time band in HH:MM, interpreted in its resource’s
59
+ * timezone.
60
+ */
61
+ from?: string;
62
+ /**
63
+ * Declared domain kind of this record or configuration element.
64
+ */
65
+ kind: "weekly" | "date_override" | "time_off" | "block";
33
66
  /**
34
67
  * Scheduling resource addressed by this request or associated with this
35
68
  * record.
36
69
  */
37
- resourceId?: string;
70
+ resourceId: string;
71
+ /**
72
+ * Deprecated: use `from`. Answered until 2027-01-28.
73
+ *
74
+ * @deprecated
75
+ */
76
+ startTime?: string;
77
+ /**
78
+ * IANA timezone used to interpret the record’s local dates and time bands.
79
+ */
80
+ timezone: string;
81
+ /**
82
+ * End of this local time band in HH:MM, interpreted in its resource’s
83
+ * timezone.
84
+ */
85
+ to?: string;
86
+ /**
87
+ * Local weekdays on which a weekly band applies, numbered Sunday 0 through
88
+ * Saturday 6.
89
+ */
90
+ weekdays?: number[];
38
91
  }
39
- export interface ListResponse {
92
+ export interface CreateResponse {
40
93
  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";
94
+ date: Temporal.PlainDate | null;
95
+ effectiveFrom: Temporal.PlainDate | null;
96
+ effectiveTo: Temporal.PlainDate | null;
97
+ endTime: string;
98
+ from: string;
99
+ id: string;
100
+ kind: "weekly" | "date_override" | "time_off" | "block";
101
+ object: "scheduling.schedule_rule";
102
+ resourceId: string;
103
+ schemaVersion: 1;
104
+ startTime: string;
105
+ timezone: string;
106
+ to: string;
107
+ updatedAt: Temporal.Instant;
108
+ version: number;
109
+ weekdays: number[];
58
110
  };
59
111
  error: null;
60
112
  metadata: AgendaResponseMetadata;
61
113
  success: true;
62
114
  }
63
- export interface ReplaceRequest {
115
+ export interface ListRequest {
64
116
  /**
65
- * Stable srs-prefixed Scheduling record identifier; ownership is checked in
66
- * the authenticated organization.
117
+ * Opaque cursor returned by pageInfo; omit it to request the first page.
67
118
  */
68
- resourceId: string;
119
+ cursor?: string;
69
120
  /**
70
- * Identifiers and versions of the complete schedule loaded by the editor;
71
- * concurrent changes reject the replacement.
121
+ * Direction to traverse the stable keyset ordering from the supplied cursor.
72
122
  */
73
- expectedRules: {
74
- id: string;
75
- version: number;
76
- }[];
123
+ direction?: "forward" | "backward";
77
124
  /**
78
- * Schedule bands or profile policy rules owned by this configuration.
125
+ * Maximum items returned in one page. Defaults to 25; larger reads require
126
+ * another cursor.
79
127
  */
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
- }[];
128
+ limit?: number;
129
+ /**
130
+ * Scheduling resource addressed by this request or associated with this
131
+ * record.
132
+ */
133
+ resourceId?: string;
89
134
  }
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
- };
135
+ export interface ListResponse {
136
+ data: AgendaScheduleRulePage;
110
137
  error: null;
111
138
  metadata: AgendaResponseMetadata;
112
139
  success: true;
113
140
  }
114
- export interface UpsertRequest {
141
+ export interface UpdateRequest {
115
142
  /**
116
- * Scheduling resource addressed by this request or associated with this
117
- * record.
143
+ * The rule to update.
118
144
  */
119
- resourceId: string;
145
+ scheduleRuleId: string;
120
146
  /**
121
147
  * Specific local calendar date for a dated band or closure; null for a weekly
122
148
  * band.
@@ -133,44 +159,57 @@ export interface UpsertRequest {
133
159
  */
134
160
  effectiveTo?: Temporal.PlainDate | null;
135
161
  /**
136
- * End of this local time band in HH:MM, interpreted in its resource’s
137
- * timezone.
162
+ * Deprecated: use `to`. Answered until 2027-01-28.
163
+ *
164
+ * @deprecated
138
165
  */
139
- endTime: string;
166
+ endTime?: string;
140
167
  /**
141
- * Version last read by the caller. The mutation fails if another writer has
142
- * changed this record.
168
+ * Version last read by the caller. The update fails if another writer has
169
+ * changed the rule since.
143
170
  */
144
171
  expectedVersion?: number;
145
172
  /**
146
- * Identifier of the record addressed or returned by this schema.
173
+ * Start of this local time band in HH:MM, interpreted in its resource’s
174
+ * timezone.
147
175
  */
148
- id?: string;
176
+ from?: string;
149
177
  /**
150
178
  * Declared domain kind of this record or configuration element.
151
179
  */
152
180
  kind: "weekly" | "date_override" | "time_off" | "block";
153
181
  /**
154
- * Start of this local time band in HH:MM, interpreted in its resource’s
155
- * timezone.
182
+ * The rule's agenda. A rule cannot move to another agenda.
183
+ */
184
+ resourceId?: string;
185
+ /**
186
+ * Deprecated: use `from`. Answered until 2027-01-28.
187
+ *
188
+ * @deprecated
156
189
  */
157
- startTime: string;
190
+ startTime?: string;
158
191
  /**
159
192
  * IANA timezone used to interpret the record’s local dates and time bands.
160
193
  */
161
194
  timezone: string;
195
+ /**
196
+ * End of this local time band in HH:MM, interpreted in its resource’s
197
+ * timezone.
198
+ */
199
+ to?: string;
162
200
  /**
163
201
  * Local weekdays on which a weekly band applies, numbered Sunday 0 through
164
202
  * Saturday 6.
165
203
  */
166
204
  weekdays?: number[];
167
205
  }
168
- export interface UpsertResponse {
206
+ export interface UpdateResponse {
169
207
  data: {
170
208
  date: Temporal.PlainDate | null;
171
209
  effectiveFrom: Temporal.PlainDate | null;
172
210
  effectiveTo: Temporal.PlainDate | null;
173
211
  endTime: string;
212
+ from: string;
174
213
  id: string;
175
214
  kind: "weekly" | "date_override" | "time_off" | "block";
176
215
  object: "scheduling.schedule_rule";
@@ -178,6 +217,7 @@ export interface UpsertResponse {
178
217
  schemaVersion: 1;
179
218
  startTime: string;
180
219
  timezone: string;
220
+ to: string;
181
221
  updatedAt: Temporal.Instant;
182
222
  version: number;
183
223
  weekdays: number[];
@@ -1,34 +1,35 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { Transport, array, date, instant, object, } from "../../_/index.js";
3
+ import { Transport, date, instant, object, } from "../../_/index.js";
4
+ import { AgendaScheduleRulePageCodec, } from "./models.js";
4
5
  export function createClient(options) {
5
6
  return bind(new Transport(options));
6
7
  }
7
8
  export function bind(transport) {
8
9
  return {
10
+ create: (request, options) => transport.send(CreateOperation, request, options),
9
11
  list: (request, options) => transport.send(ListOperation, request, options),
10
- replace: (request, options) => transport.send(ReplaceOperation, request, options),
11
- upsert: (request, options) => transport.send(UpsertOperation, request, options),
12
+ update: (request, options) => transport.send(UpdateOperation, request, options),
12
13
  };
13
14
  }
14
- const ListOperation = {
15
- method: "GET",
15
+ const CreateOperation = {
16
+ method: "POST",
16
17
  route: "/v1/agenda/schedule-rules",
17
- query: { resourceId: "resourceId" },
18
- response: object([["data", null, object([["data", null, array(object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date], ["updatedAt", null, instant]]))]])]]),
18
+ body: "flat",
19
+ request: object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date]]),
20
+ response: object([["data", null, object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date], ["updatedAt", null, instant]])]]),
19
21
  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
22
  };
21
- const ReplaceOperation = {
22
- method: "POST",
23
- route: "/v1/agenda/resources/{resourceId}/schedule-rules/replace",
24
- body: "flat",
25
- request: object([["rules", null, array(object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date]]))]]),
26
- response: object([["data", null, object([["data", null, array(object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date], ["updatedAt", null, instant]]))]])]]),
23
+ const ListOperation = {
24
+ method: "GET",
25
+ route: "/v1/agenda/schedule-rules",
26
+ query: { cursor: "cursor", direction: "direction", limit: "limit", resourceId: "resourceId" },
27
+ response: object([["data", null, () => AgendaScheduleRulePageCodec]]),
27
28
  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
29
  };
29
- const UpsertOperation = {
30
- method: "POST",
31
- route: "/v1/agenda/resources/{resourceId}/schedule-rules",
30
+ const UpdateOperation = {
31
+ method: "PATCH",
32
+ route: "/v1/agenda/schedule-rules/{scheduleRuleId}",
32
33
  body: "flat",
33
34
  request: object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date]]),
34
35
  response: object([["data", null, object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date], ["updatedAt", null, instant]])]]),
@@ -1,4 +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, ReplaceRequest, ReplaceResponse, UpsertRequest, UpsertResponse, } from "./client.js";
4
+ export type { Client, ClientOptions, CreateRequest, CreateResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
+ export type { AgendaScheduleRulePage } from "./models.js";
@@ -0,0 +1,33 @@
1
+ import type { PageInfo } from "../../models.js";
2
+ export interface AgendaScheduleRulePage {
3
+ /**
4
+ * Items admitted by this resource contract within the verified organization.
5
+ */
6
+ data: {
7
+ date: Temporal.PlainDate | null;
8
+ effectiveFrom: Temporal.PlainDate | null;
9
+ effectiveTo: Temporal.PlainDate | null;
10
+ endTime: string;
11
+ from: string;
12
+ id: string;
13
+ kind: "weekly" | "date_override" | "time_off" | "block";
14
+ object: "scheduling.schedule_rule";
15
+ resourceId: string;
16
+ schemaVersion: 1;
17
+ startTime: string;
18
+ timezone: string;
19
+ to: string;
20
+ updatedAt: Temporal.Instant;
21
+ version: number;
22
+ weekdays: number[];
23
+ }[];
24
+ /**
25
+ * Discriminator for a resource list response.
26
+ */
27
+ object: "list";
28
+ /**
29
+ * Opaque navigation cursors for this page’s stable keyset order.
30
+ */
31
+ pageInfo: PageInfo;
32
+ }
33
+ export declare const AgendaScheduleRulePageCodec: import("../../_/codec.js").Codec;
@@ -0,0 +1,6 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { array, date, instant, object } from "../../_/index.js";
4
+ export const AgendaScheduleRulePageCodec = object([
5
+ ["data", null, array(object([["date", null, date], ["effectiveFrom", null, date], ["effectiveTo", null, date], ["updatedAt", null, instant]]))],
6
+ ]);
@@ -23,7 +23,7 @@ export interface Client {
23
23
  /**
24
24
  * Update Service
25
25
  *
26
- * Update the service named in the path using its expected version.
26
+ * Update the service named by serviceId using its expected version.
27
27
  */
28
28
  update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
29
29
  }
@@ -89,7 +89,7 @@ export interface UpdateRequest {
89
89
  * Stable svc-prefixed Scheduling record identifier; ownership is checked in
90
90
  * the authenticated organization.
91
91
  */
92
- id: string;
92
+ serviceId: string;
93
93
  /**
94
94
  * Default appointment duration for this service, in minutes. Each offering
95
95
  * can specify its own duration.
@@ -28,7 +28,7 @@ const ListOperation = {
28
28
  };
29
29
  const UpdateOperation = {
30
30
  method: "PATCH",
31
- route: "/v1/agenda/services/{id}",
31
+ route: "/v1/agenda/services/{serviceId}",
32
32
  body: "flat",
33
33
  response: object([["data", null, () => AgendaServiceCodec]]),
34
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 },