@arbol-ai/sdk 2.18.0 → 3.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 (207) 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/models.d.ts +1 -0
  56. package/dist/raiz/client.d.ts +0 -4
  57. package/dist/raiz/client.js +0 -10
  58. package/dist/raiz/conversations/client.d.ts +7 -3
  59. package/dist/raiz/conversations/index.d.ts +1 -1
  60. package/dist/raiz/conversations/models.d.ts +22 -0
  61. package/dist/raiz/organization/client.d.ts +40 -40
  62. package/dist/raiz/organization/client.js +10 -10
  63. package/dist/raiz/organization/index.d.ts +1 -1
  64. package/dist/raiz/reports/client.d.ts +3 -3
  65. package/dist/raiz/reports/client.js +2 -2
  66. package/dist/raiz/reports/index.d.ts +1 -1
  67. package/dist/somos/appointments/client.d.ts +40 -0
  68. package/dist/somos/appointments/client.js +29 -0
  69. package/dist/somos/appointments/index.d.ts +5 -0
  70. package/dist/somos/appointments/index.js +4 -0
  71. package/dist/somos/appointments/models.d.ts +301 -0
  72. package/dist/somos/appointments/models.js +9 -0
  73. package/dist/somos/availability/client.d.ts +33 -0
  74. package/dist/somos/availability/client.js +19 -0
  75. package/dist/somos/availability/index.d.ts +5 -0
  76. package/dist/somos/availability/index.js +4 -0
  77. package/dist/somos/availability/models.d.ts +340 -0
  78. package/dist/somos/availability/models.js +15 -0
  79. package/dist/somos/client.d.ts +29 -0
  80. package/dist/somos/client.js +55 -0
  81. package/dist/somos/clinic/client.d.ts +33 -0
  82. package/dist/somos/clinic/client.js +18 -0
  83. package/dist/somos/clinic/index.d.ts +5 -0
  84. package/dist/somos/clinic/index.js +4 -0
  85. package/dist/somos/clinic/models.d.ts +89 -0
  86. package/dist/somos/clinic/models.js +3 -0
  87. package/dist/somos/contracts/client.d.ts +74 -0
  88. package/dist/somos/contracts/client.js +18 -0
  89. package/dist/somos/contracts/index.d.ts +5 -0
  90. package/dist/somos/contracts/index.js +4 -0
  91. package/dist/somos/contracts/models.d.ts +107 -0
  92. package/dist/somos/contracts/models.js +3 -0
  93. package/dist/somos/groups/client.d.ts +67 -0
  94. package/dist/{visoft → somos}/groups/client.js +2 -2
  95. package/dist/somos/groups/index.d.ts +5 -0
  96. package/dist/somos/groups/index.js +4 -0
  97. package/dist/somos/groups/models.d.ts +117 -0
  98. package/dist/somos/groups/models.js +3 -0
  99. package/dist/somos/index.d.ts +5 -0
  100. package/dist/somos/index.js +4 -0
  101. package/dist/somos/models.d.ts +227 -0
  102. package/dist/somos/models.js +3 -0
  103. package/dist/somos/patients/client.d.ts +51 -0
  104. package/dist/somos/patients/client.js +34 -0
  105. package/dist/somos/patients/index.d.ts +5 -0
  106. package/dist/somos/patients/index.js +4 -0
  107. package/dist/somos/patients/models.d.ts +327 -0
  108. package/dist/somos/patients/models.js +3 -0
  109. package/dist/somos/services/client.d.ts +117 -0
  110. package/dist/somos/services/client.js +26 -0
  111. package/dist/somos/services/index.d.ts +5 -0
  112. package/dist/somos/services/index.js +4 -0
  113. package/dist/somos/services/models.d.ts +272 -0
  114. package/dist/somos/services/models.js +3 -0
  115. package/dist/somos/specialtyRules/client.d.ts +44 -0
  116. package/dist/somos/specialtyRules/client.js +18 -0
  117. package/dist/somos/specialtyRules/index.d.ts +5 -0
  118. package/dist/somos/specialtyRules/index.js +4 -0
  119. package/dist/somos/specialtyRules/models.d.ts +54 -0
  120. package/dist/somos/specialtyRules/models.js +3 -0
  121. package/dist/{raiz/roles → somos/tools}/client.d.ts +14 -12
  122. package/dist/{visoft/agencies → somos/tools}/client.js +3 -3
  123. package/dist/somos/tools/index.d.ts +5 -0
  124. package/dist/somos/tools/index.js +4 -0
  125. package/dist/somos/tools/models.d.ts +101 -0
  126. package/dist/somos/tools/models.js +3 -0
  127. package/dist/visoft/appointments/client.d.ts +20 -194
  128. package/dist/visoft/appointments/client.js +5 -4
  129. package/dist/visoft/appointments/index.d.ts +1 -0
  130. package/dist/visoft/appointments/models.d.ts +391 -0
  131. package/dist/visoft/appointments/models.js +15 -0
  132. package/dist/visoft/availability/client.d.ts +10 -164
  133. package/dist/visoft/availability/client.js +9 -9
  134. package/dist/visoft/availability/index.d.ts +2 -2
  135. package/dist/visoft/availability/models.d.ts +154 -64
  136. package/dist/visoft/availability/models.js +10 -8
  137. package/dist/visoft/client.d.ts +6 -8
  138. package/dist/visoft/client.js +15 -20
  139. package/dist/visoft/clinic/client.d.ts +30 -0
  140. package/dist/visoft/clinic/client.js +18 -0
  141. package/dist/visoft/{specialtyRules → clinic}/index.d.ts +1 -0
  142. package/dist/visoft/clinic/index.js +4 -0
  143. package/dist/visoft/clinic/models.d.ts +13 -0
  144. package/dist/visoft/clinic/models.js +3 -0
  145. package/dist/visoft/clinics/client.d.ts +2 -31
  146. package/dist/visoft/clinics/client.js +1 -8
  147. package/dist/visoft/clinics/index.d.ts +2 -2
  148. package/dist/visoft/clinics/models.d.ts +13 -24
  149. package/dist/visoft/connections/client.d.ts +17 -74
  150. package/dist/visoft/connections/client.js +10 -11
  151. package/dist/visoft/connections/index.d.ts +1 -1
  152. package/dist/visoft/connections/models.d.ts +93 -1
  153. package/dist/visoft/connections/models.js +6 -0
  154. package/dist/visoft/contracts/client.d.ts +14 -49
  155. package/dist/visoft/contracts/client.js +2 -2
  156. package/dist/visoft/contracts/index.d.ts +1 -1
  157. package/dist/visoft/contracts/models.d.ts +43 -7
  158. package/dist/visoft/index.d.ts +1 -1
  159. package/dist/visoft/models.d.ts +311 -139
  160. package/dist/visoft/patients/client.d.ts +24 -264
  161. package/dist/visoft/patients/client.js +7 -6
  162. package/dist/visoft/patients/index.d.ts +1 -0
  163. package/dist/visoft/patients/models.d.ts +737 -0
  164. package/dist/visoft/patients/models.js +15 -0
  165. package/dist/visoft/professionals/client.d.ts +56 -0
  166. package/dist/visoft/professionals/client.js +18 -0
  167. package/dist/visoft/professionals/index.d.ts +5 -0
  168. package/dist/visoft/professionals/index.js +4 -0
  169. package/dist/visoft/professionals/models.d.ts +54 -0
  170. package/dist/visoft/professionals/models.js +3 -0
  171. package/dist/visoft/serviceCatalogs/client.d.ts +45 -0
  172. package/dist/visoft/serviceCatalogs/client.js +18 -0
  173. package/dist/visoft/serviceCatalogs/index.d.ts +5 -0
  174. package/dist/visoft/serviceCatalogs/index.js +4 -0
  175. package/dist/visoft/serviceCatalogs/models.d.ts +68 -0
  176. package/dist/visoft/serviceCatalogs/models.js +3 -0
  177. package/dist/visoft/services/client.d.ts +25 -61
  178. package/dist/visoft/services/client.js +2 -2
  179. package/dist/visoft/services/index.d.ts +1 -1
  180. package/dist/visoft/services/models.d.ts +52 -15
  181. package/package.json +9 -3
  182. package/dist/raiz/members/client.d.ts +0 -102
  183. package/dist/raiz/members/client.js +0 -35
  184. package/dist/raiz/members/index.d.ts +0 -5
  185. package/dist/raiz/members/models.d.ts +0 -48
  186. package/dist/raiz/members/models.js +0 -10
  187. package/dist/raiz/roles/index.d.ts +0 -5
  188. package/dist/raiz/roles/models.d.ts +0 -32
  189. package/dist/visoft/agencies/client.d.ts +0 -58
  190. package/dist/visoft/agencies/index.d.ts +0 -5
  191. package/dist/visoft/agencies/models.d.ts +0 -29
  192. package/dist/visoft/groups/client.d.ts +0 -69
  193. package/dist/visoft/groups/index.d.ts +0 -5
  194. package/dist/visoft/groups/models.d.ts +0 -39
  195. package/dist/visoft/specialtyRules/client.d.ts +0 -50
  196. package/dist/visoft/tools/index.d.ts +0 -5
  197. package/dist/visoft/tools/models.d.ts +0 -37
  198. /package/dist/{raiz/members → orsovision/agencies}/index.js +0 -0
  199. /package/dist/{raiz/roles → orsovision/agencies}/models.js +0 -0
  200. /package/dist/{raiz/roles → orsovision/appointments}/index.js +0 -0
  201. /package/dist/{visoft/agencies → orsovision/availability}/index.js +0 -0
  202. /package/dist/{visoft/groups → orsovision/clinic}/index.js +0 -0
  203. /package/dist/{visoft/agencies → orsovision/clinic}/models.js +0 -0
  204. /package/dist/{visoft/specialtyRules → orsovision/contracts}/index.js +0 -0
  205. /package/dist/{visoft/groups → orsovision/contracts}/models.js +0 -0
  206. /package/dist/{visoft/tools → orsovision}/models.js +0 -0
  207. /package/dist/{visoft/tools → orsovision/patients}/index.js +0 -0
@@ -0,0 +1,18 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ export function createClient(options) {
5
+ return bind(new Transport(options));
6
+ }
7
+ export function bind(transport) {
8
+ return {
9
+ get: (request, options) => transport.send(GetOperation, request, options),
10
+ };
11
+ }
12
+ const GetOperation = {
13
+ method: "GET",
14
+ route: "/v1/visoft/clinic",
15
+ query: { connectionId: "connectionId" },
16
+ response: null,
17
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "429": true, "500": true, "502": true, "503": true, "504": true },
18
+ };
@@ -2,3 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, GetRequest, GetResponse, } from "./client.js";
5
+ export type { VisoftClinicResponse } 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";
@@ -0,0 +1,13 @@
1
+ import type { VisoftClinic, VisoftResponseMetadata } from "../models.js";
2
+ /**
3
+ * A successful answer.
4
+ */
5
+ export interface VisoftClinicResponse {
6
+ data: VisoftClinic;
7
+ error: null;
8
+ /**
9
+ * What every answer carries besides its data or error.
10
+ */
11
+ metadata: VisoftResponseMetadata;
12
+ success: true;
13
+ }
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { ResponseMetadata } from "../../models.js";
3
- import type { VisoftClinic, VisoftClinicPage } from "./models.js";
2
+ import type { VisoftClinicPageResponse } from "./models.js";
4
3
  export interface ClientOptions extends BaseClientOptions {
5
4
  /**
6
5
  * The URL the paths of the API are relative to.
@@ -8,17 +7,6 @@ export interface ClientOptions extends BaseClientOptions {
8
7
  baseUrl: string;
9
8
  }
10
9
  export interface Client {
11
- /**
12
- * Get a connection's clinic
13
- *
14
- * The clinic a connection signs in to: its name, its SIIPS address, its
15
- * timezone (every date and time the clinical operations answer is local to
16
- * it) and the version of its tool definitions (visoft.tools.list). An Agent
17
- * reads it first in a conversation, to know the clinic and its time. Another
18
- * organization's connection answers NOT_FOUND. Contains no patient data and
19
- * performs no clinical login.
20
- */
21
- get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
22
10
  /**
23
11
  * List the Visoft clinics
24
12
  *
@@ -31,18 +19,6 @@ export interface Client {
31
19
  }
32
20
  export declare function createClient(options: ClientOptions): Client;
33
21
  export declare function bind(transport: Transport): Client;
34
- export interface GetRequest {
35
- /**
36
- * The connection whose clinic to read.
37
- */
38
- connectionId: string;
39
- }
40
- export interface GetResponse {
41
- data: VisoftClinic;
42
- error: null;
43
- metadata: ResponseMetadata;
44
- success: true;
45
- }
46
22
  export interface ListRequest {
47
23
  /**
48
24
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -58,9 +34,4 @@ export interface ListRequest {
58
34
  */
59
35
  limit?: number;
60
36
  }
61
- export interface ListResponse {
62
- data: VisoftClinicPage;
63
- error: null;
64
- metadata: ResponseMetadata;
65
- success: true;
66
- }
37
+ export type ListResponse = VisoftClinicPageResponse;
@@ -6,20 +6,13 @@ export function createClient(options) {
6
6
  }
7
7
  export function bind(transport) {
8
8
  return {
9
- get: (request, options) => transport.send(GetOperation, request, options),
10
9
  list: (request, options) => transport.send(ListOperation, request, options),
11
10
  };
12
11
  }
13
- const GetOperation = {
14
- method: "GET",
15
- route: "/v1/visoft/clinics/{connectionId}",
16
- response: null,
17
- 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 },
18
- };
19
12
  const ListOperation = {
20
13
  method: "GET",
21
14
  route: "/v1/visoft/clinics",
22
15
  query: { cursor: "cursor", direction: "direction", limit: "limit" },
23
16
  response: null,
24
- 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 },
17
+ errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
25
18
  };
@@ -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, GetRequest, GetResponse, ListRequest, ListResponse, } from "./client.js";
5
- export type { VisoftClinic, VisoftClinicPage, } from "./models.js";
4
+ export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
5
+ export type { VisoftClinicPage, VisoftClinicPageResponse, } from "./models.js";
@@ -1,28 +1,5 @@
1
1
  import type { PageInfo } from "../../models.js";
2
- export interface VisoftClinic {
3
- /**
4
- * The clinic's SIIPS address.
5
- */
6
- clinicalSystem: string;
7
- /**
8
- * The clinic, as a connection names it (`clinicId`).
9
- */
10
- id: string;
11
- /**
12
- * The clinic's name.
13
- */
14
- name: string;
15
- /**
16
- * The clinic's IANA timezone: every date and time the clinical operations
17
- * answer is local to it.
18
- */
19
- timezone: string;
20
- /**
21
- * The version of the clinic's tool definitions (visoft.tools.list): it
22
- * changes whenever a tool's parameters or instructions do.
23
- */
24
- toolsVersion: number;
25
- }
2
+ import type { VisoftClinic, VisoftResponseMetadata } from "../models.js";
26
3
  export interface VisoftClinicPage {
27
4
  /**
28
5
  * Items admitted by this resource contract within the verified organization.
@@ -37,3 +14,15 @@ export interface VisoftClinicPage {
37
14
  */
38
15
  pageInfo: PageInfo;
39
16
  }
17
+ /**
18
+ * A successful answer.
19
+ */
20
+ export interface VisoftClinicPageResponse {
21
+ data: VisoftClinicPage;
22
+ error: null;
23
+ /**
24
+ * What every answer carries besides its data or error.
25
+ */
26
+ metadata: VisoftResponseMetadata;
27
+ success: true;
28
+ }
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { DeletedObject, ResponseMetadata } from "../../models.js";
3
- import { type VisoftConnection, type VisoftConnectionPage } from "./models.js";
2
+ import { type VisoftConnectionPageResponse, type VisoftConnectionResponse, type VisoftDeletedObjectResponse, type VisoftVerifyConnectionBody, type VisoftVerifyConnectionResultResponse } from "./models.js";
4
3
  export interface ClientOptions extends BaseClientOptions {
5
4
  /**
6
5
  * The URL the paths of the API are relative to.
@@ -11,18 +10,19 @@ export interface Client {
11
10
  /**
12
11
  * Remove a Visoft connection
13
12
  *
14
- * Remove what Visoft holds for one of the organization's connections: its
15
- * record, its SIIPS session and its cache. Account calls this before it
16
- * forgets the connection. A connection Visoft holds nothing for answers
17
- * NOT_FOUND.
13
+ * Remove what Visoft holds for one of the organization's connections, by its
14
+ * connectionId: its record, its SIIPS session and its cache. Account calls
15
+ * this before it forgets the connection. A connection Visoft holds nothing
16
+ * for answers CONNECTION_NOT_FOUND.
18
17
  */
19
18
  delete(request: DeleteRequest, options?: RequestOptions): Promise<DeleteResponse>;
20
19
  /**
21
20
  * Get a Visoft connection
22
21
  *
23
- * One of the organization's Visoft connections: its status, its clinic, the
24
- * masked username and when SIIPS last accepted its login. Never a credential.
25
- * A connection the organization does not have answers NOT_FOUND.
22
+ * One of the organization's Visoft connections, by its connectionId: its
23
+ * status, its clinic, the masked username and when SIIPS last accepted its
24
+ * login. Never a credential. A connection the organization does not have
25
+ * answers CONNECTION_NOT_FOUND.
26
26
  */
27
27
  get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
28
28
  /**
@@ -53,32 +53,16 @@ export interface DeleteRequest {
53
53
  /**
54
54
  * The connection's id, as Account lists it (con_…).
55
55
  */
56
- id: string;
57
- body: {
58
- [key: string]: unknown;
59
- };
60
- }
61
- export interface DeleteResponse {
62
- data: DeletedObject;
63
- error: null;
64
- metadata: ResponseMetadata;
65
- success: true;
56
+ connectionId: string;
66
57
  }
58
+ export type DeleteResponse = VisoftDeletedObjectResponse;
67
59
  export interface GetRequest {
68
60
  /**
69
61
  * The connection's id, as Account lists it (con_…).
70
62
  */
71
- id: string;
72
- }
73
- export interface GetResponse {
74
- /**
75
- * One of the organization's Visoft connections. Never a credential.
76
- */
77
- data: VisoftConnection;
78
- error: null;
79
- metadata: ResponseMetadata;
80
- success: true;
63
+ connectionId: string;
81
64
  }
65
+ export type GetResponse = VisoftConnectionResponse;
82
66
  export interface ListRequest {
83
67
  /**
84
68
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -94,52 +78,11 @@ export interface ListRequest {
94
78
  */
95
79
  limit?: number;
96
80
  }
97
- export interface ListResponse {
98
- data: VisoftConnectionPage;
99
- error: null;
100
- metadata: ResponseMetadata;
101
- success: true;
102
- }
103
- export interface VerifyRequest {
81
+ export type ListResponse = VisoftConnectionPageResponse;
82
+ export type VerifyRequest = {
104
83
  /**
105
84
  * The connection's id, as Account lists it (con_…).
106
85
  */
107
86
  connectionId: string;
108
- /**
109
- * The clinic whose SIIPS the login belongs to, as visoft.clinics.list names
110
- * it.
111
- */
112
- clinicId: string;
113
- /**
114
- * The connection's name in Account.
115
- */
116
- name: string;
117
- /**
118
- * Its password, exactly as typed.
119
- */
120
- password: string;
121
- /**
122
- * The username the clinic's team signs in to SIIPS with. Surrounding spaces
123
- * are ignored.
124
- */
125
- username: string;
126
- }
127
- export interface VerifyResponse {
128
- /**
129
- * active: SIIPS accepted the login, whose session Visoft keeps for the
130
- * connection; Account seals the credentials now. rejected: nothing was
131
- * stored.
132
- */
133
- data: {
134
- stateRef: string;
135
- status: "active";
136
- summary: string;
137
- username: string;
138
- } | {
139
- errorCode: "CREDENTIALS_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_SESSION_CONFLICT";
140
- status: "rejected";
141
- };
142
- error: null;
143
- metadata: ResponseMetadata;
144
- success: true;
145
- }
87
+ } & VisoftVerifyConnectionBody;
88
+ export type VerifyResponse = VisoftVerifyConnectionResultResponse;
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { Transport, object, } from "../../_/index.js";
4
- import { VisoftConnectionCodec, VisoftConnectionPageCodec, } from "./models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { VisoftConnectionPageResponseCodec, VisoftConnectionResponseCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -15,28 +15,27 @@ export function bind(transport) {
15
15
  }
16
16
  const DeleteOperation = {
17
17
  method: "DELETE",
18
- route: "/v1/visoft/connections/{id}",
19
- body: "nested",
18
+ route: "/v1/visoft/connections/{connectionId}",
20
19
  response: null,
21
- 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 },
20
+ errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
22
21
  };
23
22
  const GetOperation = {
24
23
  method: "GET",
25
- route: "/v1/visoft/connections/{id}",
26
- response: object([["data", null, () => VisoftConnectionCodec]]),
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 },
24
+ route: "/v1/visoft/connections/{connectionId}",
25
+ response: VisoftConnectionResponseCodec,
26
+ errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
28
27
  };
29
28
  const ListOperation = {
30
29
  method: "GET",
31
30
  route: "/v1/visoft/connections",
32
31
  query: { cursor: "cursor", direction: "direction", limit: "limit" },
33
- response: object([["data", null, () => VisoftConnectionPageCodec]]),
34
- 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 },
32
+ response: VisoftConnectionPageResponseCodec,
33
+ errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
35
34
  };
36
35
  const VerifyOperation = {
37
36
  method: "POST",
38
37
  route: "/v1/visoft/connections/{connectionId}/verify",
39
38
  body: "flat",
40
39
  response: null,
41
- 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 },
40
+ errors: { "400": true, "401": true, "403": true, "404": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
42
41
  };
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, VerifyRequest, VerifyResponse, } from "./client.js";
5
- export type { VisoftConnection, VisoftConnectionPage, } from "./models.js";
5
+ export type { VisoftConnection, VisoftConnectionPage, VisoftConnectionPageResponse, VisoftConnectionResponse, VisoftDeletedObjectResponse, VisoftVerifyConnectionBody, VisoftVerifyConnectionResult, VisoftVerifyConnectionResultResponse, } from "./models.js";
@@ -1,4 +1,5 @@
1
- import type { PageInfo } from "../../models.js";
1
+ import type { DeletedObject, PageInfo } from "../../models.js";
2
+ import type { VisoftResponseMetadata } from "../models.js";
2
3
  export interface VisoftConnection {
3
4
  /**
4
5
  * The clinic's name.
@@ -65,5 +66,96 @@ export interface VisoftConnectionPage {
65
66
  */
66
67
  pageInfo: PageInfo;
67
68
  }
69
+ /**
70
+ * A successful answer.
71
+ */
72
+ export interface VisoftConnectionPageResponse {
73
+ data: VisoftConnectionPage;
74
+ error: null;
75
+ /**
76
+ * What every answer carries besides its data or error.
77
+ */
78
+ metadata: VisoftResponseMetadata;
79
+ success: true;
80
+ }
81
+ /**
82
+ * A successful answer.
83
+ */
84
+ export interface VisoftConnectionResponse {
85
+ /**
86
+ * One of the organization's Visoft connections. Never a credential.
87
+ */
88
+ data: VisoftConnection;
89
+ error: null;
90
+ /**
91
+ * What every answer carries besides its data or error.
92
+ */
93
+ metadata: VisoftResponseMetadata;
94
+ success: true;
95
+ }
96
+ /**
97
+ * A successful answer.
98
+ */
99
+ export interface VisoftDeletedObjectResponse {
100
+ data: DeletedObject;
101
+ error: null;
102
+ /**
103
+ * What every answer carries besides its data or error.
104
+ */
105
+ metadata: VisoftResponseMetadata;
106
+ success: true;
107
+ }
108
+ export interface VisoftVerifyConnectionBody {
109
+ /**
110
+ * The clinic whose SIIPS the login belongs to, as visoft.clinics.list names
111
+ * it.
112
+ */
113
+ clinicId: string;
114
+ /**
115
+ * The connection's name in Account.
116
+ */
117
+ name: string;
118
+ /**
119
+ * Its password, exactly as typed.
120
+ */
121
+ password: string;
122
+ /**
123
+ * The username the clinic's team signs in to SIIPS with. Surrounding spaces
124
+ * are ignored.
125
+ */
126
+ username: string;
127
+ }
128
+ /**
129
+ * active: SIIPS accepted the login, whose session Visoft keeps for the
130
+ * connection; Account seals the credentials now. rejected: nothing was stored.
131
+ */
132
+ export type VisoftVerifyConnectionResult = {
133
+ stateRef: string;
134
+ status: "active";
135
+ summary: string;
136
+ username: string;
137
+ } | {
138
+ errorCode: "CREDENTIALS_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_SESSION_CONFLICT";
139
+ status: "rejected";
140
+ };
141
+ /**
142
+ * A successful answer.
143
+ */
144
+ export interface VisoftVerifyConnectionResultResponse {
145
+ /**
146
+ * active: SIIPS accepted the login, whose session Visoft keeps for the
147
+ * connection; Account seals the credentials now. rejected: nothing was
148
+ * stored.
149
+ */
150
+ data: VisoftVerifyConnectionResult;
151
+ error: null;
152
+ /**
153
+ * What every answer carries besides its data or error.
154
+ */
155
+ metadata: VisoftResponseMetadata;
156
+ success: true;
157
+ }
68
158
  export declare const VisoftConnectionCodec: import("../../_/codec.js").Codec;
69
159
  export declare const VisoftConnectionPageCodec: import("../../_/codec.js").Codec;
160
+ export declare const VisoftConnectionPageResponseCodec: import("../../_/codec.js").Codec;
161
+ export declare const VisoftConnectionResponseCodec: import("../../_/codec.js").Codec;
@@ -9,3 +9,9 @@ export const VisoftConnectionCodec = object([
9
9
  export const VisoftConnectionPageCodec = object([
10
10
  ["data", null, array(() => VisoftConnectionCodec)],
11
11
  ]);
12
+ export const VisoftConnectionPageResponseCodec = object([
13
+ ["data", null, () => VisoftConnectionPageCodec],
14
+ ]);
15
+ export const VisoftConnectionResponseCodec = object([
16
+ ["data", null, () => VisoftConnectionCodec],
17
+ ]);
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { ResponseMetadata } from "../../models.js";
3
- import type { VisoftContractPage } from "./models.js";
2
+ import type { VisoftContractPageResponse } from "./models.js";
4
3
  export interface ClientOptions extends BaseClientOptions {
5
4
  /**
6
5
  * The URL the paths of the API are relative to.
@@ -11,49 +10,15 @@ export interface Client {
11
10
  /**
12
11
  * List the clinic's contracts
13
12
  *
14
- * The clinic's current contracts and agreements, at a location when it
15
- * schedules by location, in ascending code order. A contract with covers
16
- * schedules only those specialties: another one is in a sibling contract of
17
- * the same payer. A payer name that matches no contract, or several, is
18
- * TOOL_REFUSED (CONTRACT_NOT_FOUND, CONTRACT_AMBIGUOUS) with the closest
19
- * names in details.didYouMean, to offer the person. Preserve the returned
20
- * identifiers; a failed lookup never proves a patient lacks coverage. A
21
- * refusal is TOOL_REFUSED: data.reason says why, data.guidance what to do
22
- * next and data.details what it offers instead; it is never an outage. The
23
- * connection's clinic sets this tool's rules, parameters and accepted values:
24
- * visoft.tools.list answers them for the connection, and every call is
25
- * checked against them.
13
+ * The clinic's current contracts (convenios) at one of its cost centres, in
14
+ * ascending code order, as SIIPS lists them. Cached for 12 hours; refresh
15
+ * reads SIIPS again.
26
16
  */
27
17
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
28
18
  }
29
19
  export declare function createClient(options: ClientOptions): Client;
30
20
  export declare function bind(transport: Transport): Client;
31
21
  export interface ListRequest {
32
- /**
33
- * As the connection's clinic defines it: visoft.tools.list answers its
34
- * meaning, accepted values and whether it is required.
35
- */
36
- agency?: string;
37
- /**
38
- * As the connection's clinic defines it: visoft.tools.list answers its
39
- * meaning, accepted values and whether it is required.
40
- */
41
- search?: string;
42
- /**
43
- * As the connection's clinic defines it: visoft.tools.list answers its
44
- * meaning, accepted values and whether it is required.
45
- */
46
- refresh?: boolean;
47
- /**
48
- * As the connection's clinic defines it: visoft.tools.list answers its
49
- * meaning, accepted values and whether it is required.
50
- */
51
- eps?: string;
52
- /**
53
- * As the connection's clinic defines it: visoft.tools.list answers its
54
- * meaning, accepted values and whether it is required.
55
- */
56
- regimen?: string;
57
22
  /**
58
23
  * Opaque cursor returned by pageInfo; omit it to request the first page.
59
24
  */
@@ -70,18 +35,18 @@ export interface ListRequest {
70
35
  /**
71
36
  * The connection to run on. Optional when the organization has one Visoft
72
37
  * connection; required when it has several. Another organization's connection
73
- * is NOT_FOUND.
38
+ * is CONNECTION_NOT_FOUND.
74
39
  */
75
40
  connectionId?: string;
76
41
  /**
77
- * The channel the conversation happens on: voice, whatsapp or web (the
78
- * default).
42
+ * One of the clinic's cost centres, as visoft.clinic.get lists them. Optional
43
+ * when the clinic has a default one.
79
44
  */
80
- channel?: "voice" | "web" | "whatsapp";
81
- }
82
- export interface ListResponse {
83
- data: VisoftContractPage;
84
- error: null;
85
- metadata: ResponseMetadata;
86
- success: true;
45
+ agencyCode?: string;
46
+ /**
47
+ * Read SIIPS again instead of the connection's cache (contracts 12 h,
48
+ * services 6 h, professionals 1 h, a patient 5 min).
49
+ */
50
+ refresh?: boolean;
87
51
  }
52
+ export type ListResponse = VisoftContractPageResponse;
@@ -12,7 +12,7 @@ export function bind(transport) {
12
12
  const ListOperation = {
13
13
  method: "GET",
14
14
  route: "/v1/visoft/contracts",
15
- query: { agency: "agency", search: "search", refresh: "refresh", eps: "eps", regimen: "regimen", cursor: "cursor", direction: "direction", limit: "limit", connectionId: "connectionId", channel: "channel" },
15
+ query: { cursor: "cursor", direction: "direction", limit: "limit", connectionId: "connectionId", agencyCode: "agencyCode", refresh: "refresh" },
16
16
  response: null,
17
- 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 },
17
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
18
18
  };
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
5
- export type { VisoftContract, VisoftContractPage, } from "./models.js";
5
+ export type { VisoftContract, VisoftContractPage, VisoftContractPageResponse, VisoftListContractsBadGatewayError, VisoftListContractsUnprocessableContentError, VisoftListContractsUnprocessableContentFailure, } from "./models.js";
@@ -1,17 +1,16 @@
1
- import type { PageInfo } from "../../models.js";
1
+ import type { CredentialsRejectedFailure, ListContractsBadGatewayFailure, PageInfo } from "../../models.js";
2
+ import type { VisoftAgencyNotServedFailure, VisoftResponseMetadata } from "../models.js";
2
3
  export interface VisoftContract {
3
4
  /**
4
- * The contract, as visoft.services.list and visoft.availability.list take it.
5
+ * The contract's SIIPS code.
5
6
  */
6
7
  code: string;
7
8
  /**
8
- * The only specialties this contract schedules, when the clinic splits a
9
- * payer into several contracts: another specialty is in a sibling contract of
10
- * the same payer.
9
+ * The contract as SIIPS labels it, code and flags included.
11
10
  */
12
- covers?: string[];
11
+ label: string;
13
12
  /**
14
- * The contract's name: the payer or plan, to say to the person.
13
+ * The contract's name, without SIIPS's code and flags.
15
14
  */
16
15
  name: string;
17
16
  }
@@ -29,3 +28,40 @@ export interface VisoftContractPage {
29
28
  */
30
29
  pageInfo: PageInfo;
31
30
  }
31
+ /**
32
+ * A successful answer.
33
+ */
34
+ export interface VisoftContractPageResponse {
35
+ data: VisoftContractPage;
36
+ error: null;
37
+ /**
38
+ * What every answer carries besides its data or error.
39
+ */
40
+ metadata: VisoftResponseMetadata;
41
+ success: true;
42
+ }
43
+ /**
44
+ * A failed answer.
45
+ */
46
+ export interface VisoftListContractsBadGatewayError {
47
+ data: null;
48
+ error: ListContractsBadGatewayFailure;
49
+ /**
50
+ * What every answer carries besides its data or error.
51
+ */
52
+ metadata: VisoftResponseMetadata;
53
+ success: false;
54
+ }
55
+ /**
56
+ * A failed answer.
57
+ */
58
+ export interface VisoftListContractsUnprocessableContentError {
59
+ data: null;
60
+ error: VisoftListContractsUnprocessableContentFailure;
61
+ /**
62
+ * What every answer carries besides its data or error.
63
+ */
64
+ metadata: VisoftResponseMetadata;
65
+ success: false;
66
+ }
67
+ export type VisoftListContractsUnprocessableContentFailure = CredentialsRejectedFailure | VisoftAgencyNotServedFailure;
@@ -2,4 +2,4 @@ export { ApiError } from "../_/index.js";
2
2
  export type { RequestOptions } from "../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, } from "./client.js";
5
- export type { VisoftFailureResponse, VisoftToolResult, } from "./models.js";
5
+ export type { VisoftAgencyNotServedFailure, VisoftClinic, VisoftClinicAgency, VisoftConnectionNotConfiguredError, VisoftConnectionNotFoundError, VisoftContractNotFoundFailure, VisoftContractService, VisoftForbiddenError, VisoftInternalError, VisoftInvalidInputError, VisoftOutcomeUnknownError, VisoftProfessional, VisoftRateLimitedError, VisoftRequestTooLargeError, VisoftResponseMetadata, VisoftUnauthorizedError, VisoftUnsupportedMediaTypeError, VisoftUpstreamTimeoutError, VisoftUpstreamUnavailableError, } from "./models.js";