@arbol-ai/sdk 2.19.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/README.md +19 -1
  2. package/dist/client.d.ts +4 -0
  3. package/dist/client.js +10 -0
  4. package/dist/index.d.ts +1 -1
  5. package/dist/models.d.ts +396 -0
  6. package/dist/models.js +5 -1
  7. package/dist/nuevaEps/affiliations/models.d.ts +6 -5
  8. package/dist/nuevaEps/connections/models.d.ts +18 -18
  9. package/dist/nuevaEps/index.d.ts +1 -1
  10. package/dist/nuevaEps/models.d.ts +16 -232
  11. package/dist/{visoft/tools → orsovision/agencies}/client.d.ts +13 -19
  12. package/dist/{visoft/tools → orsovision/agencies}/client.js +2 -2
  13. package/dist/orsovision/agencies/index.d.ts +5 -0
  14. package/dist/orsovision/agencies/models.d.ts +107 -0
  15. package/dist/orsovision/appointments/client.d.ts +39 -0
  16. package/dist/orsovision/appointments/client.js +29 -0
  17. package/dist/orsovision/appointments/index.d.ts +5 -0
  18. package/dist/orsovision/appointments/models.d.ts +206 -0
  19. package/dist/orsovision/appointments/models.js +9 -0
  20. package/dist/orsovision/availability/client.d.ts +32 -0
  21. package/dist/orsovision/availability/client.js +19 -0
  22. package/dist/orsovision/availability/index.d.ts +5 -0
  23. package/dist/orsovision/availability/models.d.ts +239 -0
  24. package/dist/orsovision/availability/models.js +15 -0
  25. package/dist/orsovision/client.d.ts +27 -0
  26. package/dist/orsovision/client.js +50 -0
  27. package/dist/orsovision/clinic/client.d.ts +34 -0
  28. package/dist/{visoft/specialtyRules → orsovision/clinic}/client.js +3 -3
  29. package/dist/orsovision/clinic/index.d.ts +5 -0
  30. package/dist/orsovision/clinic/models.d.ts +89 -0
  31. package/dist/orsovision/contracts/client.d.ts +69 -0
  32. package/dist/orsovision/contracts/client.js +18 -0
  33. package/dist/orsovision/contracts/index.d.ts +5 -0
  34. package/dist/orsovision/contracts/models.d.ts +108 -0
  35. package/dist/orsovision/index.d.ts +5 -0
  36. package/dist/orsovision/index.js +4 -0
  37. package/dist/orsovision/models.d.ts +227 -0
  38. package/dist/orsovision/patients/client.d.ts +52 -0
  39. package/dist/orsovision/patients/client.js +34 -0
  40. package/dist/orsovision/patients/index.d.ts +5 -0
  41. package/dist/orsovision/patients/models.d.ts +297 -0
  42. package/dist/orsovision/patients/models.js +3 -0
  43. package/dist/orsovision/services/client.d.ts +74 -0
  44. package/dist/orsovision/services/client.js +18 -0
  45. package/dist/orsovision/services/index.d.ts +5 -0
  46. package/dist/orsovision/services/index.js +4 -0
  47. package/dist/orsovision/services/models.d.ts +105 -0
  48. package/dist/orsovision/services/models.js +3 -0
  49. package/dist/orsovision/tools/client.d.ts +44 -0
  50. package/dist/{raiz/roles → orsovision/tools}/client.js +3 -3
  51. package/dist/orsovision/tools/index.d.ts +5 -0
  52. package/dist/orsovision/tools/index.js +4 -0
  53. package/dist/orsovision/tools/models.d.ts +101 -0
  54. package/dist/orsovision/tools/models.js +3 -0
  55. package/dist/raiz/agents/client.js +3 -4
  56. package/dist/raiz/agents/models.d.ts +1 -0
  57. package/dist/raiz/bulletins/client.d.ts +4 -1
  58. package/dist/raiz/bulletins/client.js +5 -6
  59. package/dist/raiz/campaigns/client.d.ts +6 -5
  60. package/dist/raiz/campaigns/client.js +4 -4
  61. package/dist/raiz/channels/client.d.ts +19 -5
  62. package/dist/raiz/channels/client.js +9 -9
  63. package/dist/raiz/client.d.ts +0 -4
  64. package/dist/raiz/client.js +0 -10
  65. package/dist/raiz/contacts/client.js +4 -4
  66. package/dist/raiz/conversations/client.d.ts +7 -4
  67. package/dist/raiz/conversations/client.js +6 -6
  68. package/dist/raiz/definitions/client.d.ts +4 -4
  69. package/dist/raiz/definitions/client.js +3 -4
  70. package/dist/raiz/evalCases/client.d.ts +13 -12
  71. package/dist/raiz/evalCases/client.js +2 -2
  72. package/dist/raiz/evalRuns/client.d.ts +7 -4
  73. package/dist/raiz/evalRuns/client.js +2 -3
  74. package/dist/raiz/evalRuns/models.d.ts +7 -1
  75. package/dist/raiz/facts/client.js +2 -2
  76. package/dist/raiz/knowledge/client.d.ts +17 -11
  77. package/dist/raiz/knowledge/client.js +4 -4
  78. package/dist/raiz/models.d.ts +0 -42
  79. package/dist/raiz/organization/client.d.ts +38 -42
  80. package/dist/raiz/organization/client.js +11 -12
  81. package/dist/raiz/organization/index.d.ts +1 -1
  82. package/dist/raiz/organization/models.d.ts +0 -10
  83. package/dist/raiz/profiles/client.d.ts +4 -4
  84. package/dist/raiz/profiles/client.js +3 -4
  85. package/dist/raiz/reports/client.d.ts +3 -3
  86. package/dist/raiz/reports/client.js +2 -2
  87. package/dist/raiz/reports/index.d.ts +1 -1
  88. package/dist/raiz/suppressions/client.js +1 -1
  89. package/dist/raiz/tasks/client.d.ts +6 -0
  90. package/dist/raiz/tasks/client.js +5 -6
  91. package/dist/raiz/templates/client.d.ts +2 -1
  92. package/dist/raiz/templates/client.js +1 -1
  93. package/dist/somos/appointments/client.d.ts +40 -0
  94. package/dist/somos/appointments/client.js +29 -0
  95. package/dist/somos/appointments/index.d.ts +5 -0
  96. package/dist/somos/appointments/index.js +4 -0
  97. package/dist/somos/appointments/models.d.ts +301 -0
  98. package/dist/somos/appointments/models.js +9 -0
  99. package/dist/somos/availability/client.d.ts +33 -0
  100. package/dist/somos/availability/client.js +19 -0
  101. package/dist/somos/availability/index.d.ts +5 -0
  102. package/dist/somos/availability/index.js +4 -0
  103. package/dist/somos/availability/models.d.ts +340 -0
  104. package/dist/somos/availability/models.js +15 -0
  105. package/dist/somos/client.d.ts +29 -0
  106. package/dist/somos/client.js +55 -0
  107. package/dist/somos/clinic/client.d.ts +33 -0
  108. package/dist/somos/clinic/client.js +18 -0
  109. package/dist/somos/clinic/index.d.ts +5 -0
  110. package/dist/somos/clinic/index.js +4 -0
  111. package/dist/somos/clinic/models.d.ts +89 -0
  112. package/dist/somos/clinic/models.js +3 -0
  113. package/dist/somos/contracts/client.d.ts +74 -0
  114. package/dist/somos/contracts/client.js +18 -0
  115. package/dist/somos/contracts/index.d.ts +5 -0
  116. package/dist/somos/contracts/index.js +4 -0
  117. package/dist/somos/contracts/models.d.ts +107 -0
  118. package/dist/somos/contracts/models.js +3 -0
  119. package/dist/somos/groups/client.d.ts +67 -0
  120. package/dist/{visoft → somos}/groups/client.js +2 -2
  121. package/dist/somos/groups/index.d.ts +5 -0
  122. package/dist/somos/groups/index.js +4 -0
  123. package/dist/somos/groups/models.d.ts +117 -0
  124. package/dist/somos/groups/models.js +3 -0
  125. package/dist/somos/index.d.ts +5 -0
  126. package/dist/somos/index.js +4 -0
  127. package/dist/somos/models.d.ts +227 -0
  128. package/dist/somos/models.js +3 -0
  129. package/dist/somos/patients/client.d.ts +51 -0
  130. package/dist/somos/patients/client.js +34 -0
  131. package/dist/somos/patients/index.d.ts +5 -0
  132. package/dist/somos/patients/index.js +4 -0
  133. package/dist/somos/patients/models.d.ts +327 -0
  134. package/dist/somos/patients/models.js +3 -0
  135. package/dist/somos/services/client.d.ts +117 -0
  136. package/dist/somos/services/client.js +26 -0
  137. package/dist/somos/services/index.d.ts +5 -0
  138. package/dist/somos/services/index.js +4 -0
  139. package/dist/somos/services/models.d.ts +272 -0
  140. package/dist/somos/services/models.js +3 -0
  141. package/dist/somos/specialtyRules/client.d.ts +44 -0
  142. package/dist/somos/specialtyRules/client.js +18 -0
  143. package/dist/somos/specialtyRules/index.d.ts +5 -0
  144. package/dist/somos/specialtyRules/index.js +4 -0
  145. package/dist/somos/specialtyRules/models.d.ts +54 -0
  146. package/dist/somos/specialtyRules/models.js +3 -0
  147. package/dist/{raiz/roles → somos/tools}/client.d.ts +14 -12
  148. package/dist/{visoft/agencies → somos/tools}/client.js +3 -3
  149. package/dist/somos/tools/index.d.ts +5 -0
  150. package/dist/somos/tools/index.js +4 -0
  151. package/dist/somos/tools/models.d.ts +101 -0
  152. package/dist/somos/tools/models.js +3 -0
  153. package/dist/visoft/appointments/client.d.ts +20 -194
  154. package/dist/visoft/appointments/client.js +5 -4
  155. package/dist/visoft/appointments/index.d.ts +1 -0
  156. package/dist/visoft/appointments/models.d.ts +391 -0
  157. package/dist/visoft/appointments/models.js +15 -0
  158. package/dist/visoft/availability/client.d.ts +10 -164
  159. package/dist/visoft/availability/client.js +9 -9
  160. package/dist/visoft/availability/index.d.ts +2 -2
  161. package/dist/visoft/availability/models.d.ts +154 -64
  162. package/dist/visoft/availability/models.js +10 -8
  163. package/dist/visoft/client.d.ts +6 -8
  164. package/dist/visoft/client.js +15 -20
  165. package/dist/visoft/clinic/client.d.ts +30 -0
  166. package/dist/visoft/clinic/client.js +18 -0
  167. package/dist/visoft/{specialtyRules → clinic}/index.d.ts +1 -0
  168. package/dist/visoft/clinic/index.js +4 -0
  169. package/dist/visoft/clinic/models.d.ts +13 -0
  170. package/dist/visoft/clinic/models.js +3 -0
  171. package/dist/visoft/clinics/client.d.ts +2 -31
  172. package/dist/visoft/clinics/client.js +1 -8
  173. package/dist/visoft/clinics/index.d.ts +2 -2
  174. package/dist/visoft/clinics/models.d.ts +13 -24
  175. package/dist/visoft/connections/client.d.ts +17 -74
  176. package/dist/visoft/connections/client.js +10 -11
  177. package/dist/visoft/connections/index.d.ts +1 -1
  178. package/dist/visoft/connections/models.d.ts +93 -1
  179. package/dist/visoft/connections/models.js +6 -0
  180. package/dist/visoft/contracts/client.d.ts +14 -49
  181. package/dist/visoft/contracts/client.js +2 -2
  182. package/dist/visoft/contracts/index.d.ts +1 -1
  183. package/dist/visoft/contracts/models.d.ts +43 -7
  184. package/dist/visoft/index.d.ts +1 -1
  185. package/dist/visoft/models.d.ts +311 -139
  186. package/dist/visoft/patients/client.d.ts +24 -264
  187. package/dist/visoft/patients/client.js +7 -6
  188. package/dist/visoft/patients/index.d.ts +1 -0
  189. package/dist/visoft/patients/models.d.ts +737 -0
  190. package/dist/visoft/patients/models.js +15 -0
  191. package/dist/visoft/professionals/client.d.ts +56 -0
  192. package/dist/visoft/professionals/client.js +18 -0
  193. package/dist/visoft/professionals/index.d.ts +5 -0
  194. package/dist/visoft/professionals/index.js +4 -0
  195. package/dist/visoft/professionals/models.d.ts +54 -0
  196. package/dist/visoft/professionals/models.js +3 -0
  197. package/dist/visoft/serviceCatalogs/client.d.ts +45 -0
  198. package/dist/visoft/serviceCatalogs/client.js +18 -0
  199. package/dist/visoft/serviceCatalogs/index.d.ts +5 -0
  200. package/dist/visoft/serviceCatalogs/index.js +4 -0
  201. package/dist/visoft/serviceCatalogs/models.d.ts +68 -0
  202. package/dist/visoft/serviceCatalogs/models.js +3 -0
  203. package/dist/visoft/services/client.d.ts +25 -61
  204. package/dist/visoft/services/client.js +2 -2
  205. package/dist/visoft/services/index.d.ts +1 -1
  206. package/dist/visoft/services/models.d.ts +52 -15
  207. package/package.json +9 -3
  208. package/dist/raiz/members/client.d.ts +0 -102
  209. package/dist/raiz/members/client.js +0 -35
  210. package/dist/raiz/members/index.d.ts +0 -5
  211. package/dist/raiz/members/models.d.ts +0 -48
  212. package/dist/raiz/members/models.js +0 -10
  213. package/dist/raiz/roles/index.d.ts +0 -5
  214. package/dist/raiz/roles/models.d.ts +0 -32
  215. package/dist/visoft/agencies/client.d.ts +0 -58
  216. package/dist/visoft/agencies/index.d.ts +0 -5
  217. package/dist/visoft/agencies/models.d.ts +0 -29
  218. package/dist/visoft/groups/client.d.ts +0 -69
  219. package/dist/visoft/groups/index.d.ts +0 -5
  220. package/dist/visoft/groups/models.d.ts +0 -39
  221. package/dist/visoft/specialtyRules/client.d.ts +0 -50
  222. package/dist/visoft/tools/index.d.ts +0 -5
  223. package/dist/visoft/tools/models.d.ts +0 -37
  224. /package/dist/{raiz/members → orsovision/agencies}/index.js +0 -0
  225. /package/dist/{raiz/roles → orsovision/agencies}/models.js +0 -0
  226. /package/dist/{raiz/roles → orsovision/appointments}/index.js +0 -0
  227. /package/dist/{visoft/agencies → orsovision/availability}/index.js +0 -0
  228. /package/dist/{visoft/groups → orsovision/clinic}/index.js +0 -0
  229. /package/dist/{visoft/agencies → orsovision/clinic}/models.js +0 -0
  230. /package/dist/{visoft/specialtyRules → orsovision/contracts}/index.js +0 -0
  231. /package/dist/{visoft/groups → orsovision/contracts}/models.js +0 -0
  232. /package/dist/{visoft/tools → orsovision}/models.js +0 -0
  233. /package/dist/{visoft/tools → orsovision/patients}/index.js +0 -0
@@ -9,16 +9,6 @@ export interface ClientOptions extends BaseClientOptions {
9
9
  baseUrl: string;
10
10
  }
11
11
  export interface Client {
12
- /**
13
- * Update the organization
14
- *
15
- * Change the organization's name, default language, time zone or settings.
16
- * Settings merge: an omitted setting stays and `null` returns it to its
17
- * default; `notifications.recipients` is replaced as a whole. Fails with
18
- * TIME_ZONE_UNKNOWN when the time zone is not a valid IANA zone (for example
19
- * `America/Bogota`).
20
- */
21
- configure(request?: ConfigureRequest, options?: RequestOptions): Promise<ConfigureResponse>;
22
12
  /**
23
13
  * Get the organization
24
14
  *
@@ -28,10 +18,9 @@ export interface Client {
28
18
  * conversation or fails in it, and the daily report.
29
19
  * capabilities.managedVoiceOutbound reports whether the shared outbound line
30
20
  * is configured; settings.channels.managedVoiceOutboundEnabled is the
31
- * organization's separate permission to use it. With `expand=applications`,
32
- * also which Arbol applications (Agenda, Ámbar, Account) you can open in it.
21
+ * organization's separate permission to use it.
33
22
  */
34
- current(request?: CurrentRequest, options?: RequestOptions): Promise<CurrentResponse>;
23
+ get(request?: GetRequest, options?: RequestOptions): Promise<GetResponse>;
35
24
  /**
36
25
  * Send the daily report now
37
26
  *
@@ -44,10 +33,44 @@ export interface Client {
44
33
  * way.
45
34
  */
46
35
  sendDailyReport(request: SendDailyReportRequest, options?: RequestOptions): Promise<SendDailyReportResponse>;
36
+ /**
37
+ * Update the organization
38
+ *
39
+ * Change the organization's name, default language, time zone or settings.
40
+ * Settings merge: an omitted setting stays and `null` returns it to its
41
+ * default; `notifications.recipients` is replaced as a whole. Fails with
42
+ * TIME_ZONE_UNKNOWN when the time zone is not a valid IANA zone (for example
43
+ * `America/Bogota`).
44
+ */
45
+ update(request?: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
47
46
  }
48
47
  export declare function createClient(options: ClientOptions): Client;
49
48
  export declare function bind(transport: Transport): Client;
50
- export interface ConfigureRequest {
49
+ export interface GetRequest {
50
+ }
51
+ export interface GetResponse {
52
+ data: RaizOrganization;
53
+ error: null;
54
+ metadata: ResponseMetadata;
55
+ success: true;
56
+ }
57
+ export interface SendDailyReportRequest {
58
+ body: {
59
+ [key: string]: unknown;
60
+ };
61
+ }
62
+ export interface SendDailyReportResponse {
63
+ data: {
64
+ endsAt: Temporal.Instant;
65
+ recipients: number;
66
+ requestedAt: Temporal.Instant;
67
+ until: Temporal.Instant;
68
+ };
69
+ error: null;
70
+ metadata: ResponseMetadata;
71
+ success: true;
72
+ }
73
+ export interface UpdateRequest {
51
74
  /**
52
75
  * BCP 47 language tag.
53
76
  */
@@ -83,36 +106,9 @@ export interface ConfigureRequest {
83
106
  */
84
107
  timeZone?: string;
85
108
  }
86
- export interface ConfigureResponse {
87
- data: RaizOrganization;
88
- error: null;
89
- metadata: ResponseMetadata;
90
- success: true;
91
- }
92
- export interface CurrentRequest {
93
- /**
94
- * Related data to include, comma-separated: `applications`.
95
- */
96
- expand?: string;
97
- }
98
- export interface CurrentResponse {
109
+ export interface UpdateResponse {
99
110
  data: RaizOrganization;
100
111
  error: null;
101
112
  metadata: ResponseMetadata;
102
113
  success: true;
103
114
  }
104
- export interface SendDailyReportRequest {
105
- body: {
106
- [key: string]: unknown;
107
- };
108
- }
109
- export interface SendDailyReportResponse {
110
- data: {
111
- recipients: number;
112
- requestedAt: Temporal.Instant;
113
- until: Temporal.Instant;
114
- };
115
- error: null;
116
- metadata: ResponseMetadata;
117
- success: true;
118
- }
@@ -7,22 +7,14 @@ export function createClient(options) {
7
7
  }
8
8
  export function bind(transport) {
9
9
  return {
10
- configure: (request, options) => transport.send(ConfigureOperation, request, options),
11
- current: (request, options) => transport.send(CurrentOperation, request, options),
10
+ get: (request, options) => transport.send(GetOperation, request, options),
12
11
  sendDailyReport: (request, options) => transport.send(SendDailyReportOperation, request, options),
12
+ update: (request, options) => transport.send(UpdateOperation, request, options),
13
13
  };
14
14
  }
15
- const ConfigureOperation = {
16
- method: "PATCH",
17
- route: "/v1/raiz/organization/update",
18
- body: "flat",
19
- response: object([["data", null, () => RaizOrganizationCodec]]),
20
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
21
- };
22
- const CurrentOperation = {
15
+ const GetOperation = {
23
16
  method: "GET",
24
17
  route: "/v1/raiz/organization",
25
- query: { expand: "expand" },
26
18
  response: object([["data", null, () => RaizOrganizationCodec]]),
27
19
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
28
20
  };
@@ -30,6 +22,13 @@ const SendDailyReportOperation = {
30
22
  method: "POST",
31
23
  route: "/v1/raiz/organization/send-daily-report",
32
24
  body: "nested",
33
- response: object([["data", null, object([["requestedAt", null, instant], ["until", null, instant]])]]),
25
+ response: object([["data", null, object([["endsAt", null, instant], ["requestedAt", null, instant], ["until", null, instant]])]]),
34
26
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
35
27
  };
28
+ const UpdateOperation = {
29
+ method: "PATCH",
30
+ route: "/v1/raiz/organization",
31
+ body: "flat",
32
+ response: object([["data", null, () => RaizOrganizationCodec]]),
33
+ errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
34
+ };
@@ -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, ConfigureRequest, ConfigureResponse, CurrentRequest, CurrentResponse, SendDailyReportRequest, SendDailyReportResponse, } from "./client.js";
4
+ export type { Client, ClientOptions, GetRequest, GetResponse, SendDailyReportRequest, SendDailyReportResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
5
  export type { OrganizationId, RaizOrganization, } from "./models.js";
@@ -1,16 +1,6 @@
1
1
  import type { RaizEmailAddress } from "../models.js";
2
2
  export type OrganizationId = string;
3
3
  export interface RaizOrganization {
4
- /**
5
- * With `expand=applications`: Arbol's applications and whether you open each
6
- * in this organization, as Account decides. Empty for a machine token, which
7
- * opens none.
8
- */
9
- applications?: {
10
- enabled: boolean;
11
- id: "raiz" | "agenda" | "ambar" | "account";
12
- opens: boolean;
13
- }[];
14
4
  capabilities: {
15
5
  managedVoiceOutbound: boolean;
16
6
  };
@@ -127,6 +127,10 @@ export interface ListResponse {
127
127
  success: true;
128
128
  }
129
129
  export interface UpdateRequest {
130
+ /**
131
+ * Communication profile id.
132
+ */
133
+ profileId: string;
130
134
  /**
131
135
  * Agent id.
132
136
  */
@@ -156,10 +160,6 @@ export interface UpdateRequest {
156
160
  * What the profile is for, as people read it.
157
161
  */
158
162
  name?: string;
159
- /**
160
- * Communication profile id.
161
- */
162
- profileId: string;
163
163
  /**
164
164
  * The approved template that opens every conversation. WhatsApp allows a
165
165
  * business to start a conversation only with one.
@@ -15,15 +15,14 @@ export function bind(transport) {
15
15
  }
16
16
  const CreateOperation = {
17
17
  method: "POST",
18
- route: "/v1/raiz/profiles/create",
18
+ route: "/v1/raiz/profiles",
19
19
  body: "flat",
20
20
  response: object([["data", null, () => RaizProfileCodec]]),
21
21
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
22
22
  };
23
23
  const GetOperation = {
24
24
  method: "GET",
25
- route: "/v1/raiz/profiles/get",
26
- query: { profileId: "profileId" },
25
+ route: "/v1/raiz/profiles/{profileId}",
27
26
  response: object([["data", null, () => RaizProfileCodec]]),
28
27
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
29
28
  };
@@ -36,7 +35,7 @@ const ListOperation = {
36
35
  };
37
36
  const UpdateOperation = {
38
37
  method: "PATCH",
39
- route: "/v1/raiz/profiles/update",
38
+ route: "/v1/raiz/profiles/{profileId}",
40
39
  body: "flat",
41
40
  response: object([["data", null, () => RaizProfileCodec]]),
42
41
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -32,11 +32,11 @@ export interface Client {
32
32
  * these are historical receipts, not the provider's current appointment
33
33
  * status.
34
34
  */
35
- current(request: CurrentRequest, options?: RequestOptions): Promise<CurrentResponse>;
35
+ get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
36
36
  }
37
37
  export declare function createClient(options: ClientOptions): Client;
38
38
  export declare function bind(transport: Transport): Client;
39
- export interface CurrentRequest {
39
+ export interface GetRequest {
40
40
  /**
41
41
  * Agent id.
42
42
  */
@@ -81,7 +81,7 @@ export interface CurrentRequest {
81
81
  */
82
82
  to?: Temporal.PlainDate;
83
83
  }
84
- export interface CurrentResponse {
84
+ export interface GetResponse {
85
85
  data: RaizReport;
86
86
  error: null;
87
87
  metadata: ResponseMetadata;
@@ -7,10 +7,10 @@ export function createClient(options) {
7
7
  }
8
8
  export function bind(transport) {
9
9
  return {
10
- current: (request, options) => transport.send(CurrentOperation, request, options),
10
+ get: (request, options) => transport.send(GetOperation, request, options),
11
11
  };
12
12
  }
13
- const CurrentOperation = {
13
+ const GetOperation = {
14
14
  method: "GET",
15
15
  route: "/v1/raiz/reports",
16
16
  query: { agentId: "agentId", campaignId: "campaignId", channelType: "channelType", definitionId: "definitionId", from: "from", name: "name", to: "to" },
@@ -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, CurrentRequest, CurrentResponse, } from "./client.js";
4
+ export type { Client, ClientOptions, GetRequest, GetResponse, } from "./client.js";
5
5
  export type { RaizReport } from "./models.js";
@@ -13,7 +13,7 @@ export function bind(transport) {
13
13
  }
14
14
  const CreateOperation = {
15
15
  method: "POST",
16
- route: "/v1/raiz/suppressions/create",
16
+ route: "/v1/raiz/suppressions",
17
17
  body: "flat",
18
18
  response: object([["data", null, () => RaizSuppressionCodec]]),
19
19
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -57,6 +57,9 @@ export interface CancelRequest {
57
57
  * Task id.
58
58
  */
59
59
  taskId: string;
60
+ body: {
61
+ [key: string]: unknown;
62
+ };
60
63
  }
61
64
  export interface CancelResponse {
62
65
  data: RaizTask;
@@ -107,6 +110,9 @@ export interface RetryRequest {
107
110
  * Task id.
108
111
  */
109
112
  taskId: string;
113
+ body: {
114
+ [key: string]: unknown;
115
+ };
110
116
  }
111
117
  export interface RetryResponse {
112
118
  data: RaizTask;
@@ -16,15 +16,14 @@ export function bind(transport) {
16
16
  }
17
17
  const CancelOperation = {
18
18
  method: "POST",
19
- route: "/v1/raiz/tasks/cancel",
20
- body: "flat",
19
+ route: "/v1/raiz/tasks/{taskId}/cancel",
20
+ body: "nested",
21
21
  response: object([["data", null, () => RaizTaskCodec]]),
22
22
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
23
23
  };
24
24
  const GetOperation = {
25
25
  method: "GET",
26
- route: "/v1/raiz/tasks/get",
27
- query: { taskId: "taskId" },
26
+ route: "/v1/raiz/tasks/{taskId}",
28
27
  response: object([["data", null, () => RaizTaskCodec]]),
29
28
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
30
29
  };
@@ -37,8 +36,8 @@ const ListOperation = {
37
36
  };
38
37
  const RetryOperation = {
39
38
  method: "POST",
40
- route: "/v1/raiz/tasks/retry",
41
- body: "flat",
39
+ route: "/v1/raiz/tasks/{taskId}/retry",
40
+ body: "nested",
42
41
  response: object([["data", null, () => RaizTaskCodec]]),
43
42
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
44
43
  };
@@ -54,7 +54,8 @@ export interface CreateRequest {
54
54
  type: "url";
55
55
  url: string;
56
56
  } | {
57
- phoneNumber: RaizPhoneNumber;
57
+ phone?: RaizPhoneNumber;
58
+ phoneNumber?: RaizPhoneNumber;
58
59
  text: string;
59
60
  type: "phone_number";
60
61
  })[];
@@ -12,7 +12,7 @@ export function bind(transport) {
12
12
  }
13
13
  const CreateOperation = {
14
14
  method: "POST",
15
- route: "/v1/raiz/templates/create",
15
+ route: "/v1/raiz/templates",
16
16
  body: "flat",
17
17
  request: object([["header", null, union([object([["example", null, object([["data", null, bytes]])]]), object([["example", null, object([["data", null, bytes]])]]), object([["example", null, object([["data", null, bytes]])]])])]]),
18
18
  response: null,
@@ -0,0 +1,40 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { SomosToolResultResponse } from "../models.js";
3
+ import { type SomosCancelAppointmentBody, type SomosCreateAppointmentBody } from "./models.js";
4
+ export interface ClientOptions extends BaseClientOptions {
5
+ /**
6
+ * The URL the paths of the API are relative to.
7
+ */
8
+ baseUrl: string;
9
+ }
10
+ export interface Client {
11
+ /**
12
+ * Cancel an appointment
13
+ *
14
+ * Cancel one exact future appointment, only after the person explicitly
15
+ * confirmed it, with the cancellation reference from a fresh patient lookup.
16
+ * The clinic requires two hours of notice. Never repeat a cancellation whose
17
+ * outcome is unknown. Somos Salud's tool pack sets this tool's rules,
18
+ * parameters and accepted values (somos.tools.list answers them), and every
19
+ * call is checked against them.
20
+ */
21
+ cancel(request: CancelRequest, options?: RequestOptions): Promise<CancelResponse>;
22
+ /**
23
+ * Book an appointment
24
+ *
25
+ * Book one slot somos.availability.lookup returned, only after the person
26
+ * explicitly confirmed that exact appointment. Pass its reference unchanged.
27
+ * A service the clinic books with a companion is booked with it, in
28
+ * consecutive slots, in this one call. Never repeat a booking whose outcome
29
+ * is unknown. Somos Salud's tool pack sets this tool's rules, parameters and
30
+ * accepted values (somos.tools.list answers them), and every call is checked
31
+ * against them.
32
+ */
33
+ create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
34
+ }
35
+ export declare function createClient(options: ClientOptions): Client;
36
+ export declare function bind(transport: Transport): Client;
37
+ export type CancelRequest = SomosCancelAppointmentBody;
38
+ export type CancelResponse = SomosToolResultResponse;
39
+ export type CreateRequest = SomosCreateAppointmentBody;
40
+ export type CreateResponse = SomosToolResultResponse;
@@ -0,0 +1,29 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ import { SomosCancelAppointmentBodyCodec, SomosCreateAppointmentBodyCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ cancel: (request, options) => transport.send(CancelOperation, request, options),
11
+ create: (request, options) => transport.send(CreateOperation, request, options),
12
+ };
13
+ }
14
+ const CancelOperation = {
15
+ method: "POST",
16
+ route: "/v1/somos/appointments/cancel",
17
+ body: "flat",
18
+ request: SomosCancelAppointmentBodyCodec,
19
+ response: null,
20
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
21
+ };
22
+ const CreateOperation = {
23
+ method: "POST",
24
+ route: "/v1/somos/appointments",
25
+ body: "flat",
26
+ request: SomosCreateAppointmentBodyCodec,
27
+ response: null,
28
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
29
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, CancelRequest, CancelResponse, CreateRequest, CreateResponse, } from "./client.js";
5
+ export type { SomosCancelAppointmentBadGatewayError, SomosCancelAppointmentBody, SomosCancelAppointmentConflictError, SomosCancelAppointmentConflictFailure, SomosCancelAppointmentNotFoundError, SomosCancelAppointmentNotFoundFailure, SomosCancelAppointmentServiceUnavailableError, SomosCancelAppointmentServiceUnavailableFailure, SomosCreateAppointmentBadGatewayError, SomosCreateAppointmentBody, SomosCreateAppointmentConflictError, SomosCreateAppointmentConflictFailure, SomosCreateAppointmentNotFoundError, SomosCreateAppointmentNotFoundFailure, SomosCreateAppointmentServiceUnavailableError, SomosCreateAppointmentServiceUnavailableFailure, } from "./models.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";