@arbol-ai/sdk 3.0.1 → 4.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 (220) hide show
  1. package/README.md +23 -0
  2. package/dist/account/apiKeys/client.d.ts +15 -47
  3. package/dist/account/apiKeys/client.js +11 -12
  4. package/dist/account/apiKeys/index.d.ts +1 -1
  5. package/dist/account/apiKeys/models.d.ts +164 -1
  6. package/dist/account/apiKeys/models.js +6 -0
  7. package/dist/account/billing/client.d.ts +4 -10
  8. package/dist/account/billing/client.js +7 -7
  9. package/dist/account/billing/index.d.ts +2 -2
  10. package/dist/account/billing/models.d.ts +32 -0
  11. package/dist/account/billing/models.js +5 -2
  12. package/dist/account/billingProfiles/client.d.ts +13 -24
  13. package/dist/account/billingProfiles/client.js +4 -4
  14. package/dist/account/billingProfiles/index.d.ts +1 -1
  15. package/dist/account/billingProfiles/models.d.ts +48 -0
  16. package/dist/account/client.d.ts +6 -0
  17. package/dist/account/client.js +15 -0
  18. package/dist/account/connections/client.d.ts +2 -200
  19. package/dist/account/connections/client.js +1 -25
  20. package/dist/account/connections/index.d.ts +2 -2
  21. package/dist/account/connections/models.d.ts +22 -7
  22. package/dist/account/index.d.ts +1 -1
  23. package/dist/account/invitations/client.d.ts +9 -38
  24. package/dist/account/invitations/client.js +8 -9
  25. package/dist/account/invitations/index.d.ts +1 -1
  26. package/dist/account/invitations/models.d.ts +221 -2
  27. package/dist/account/invitations/models.js +6 -0
  28. package/dist/account/invoiceDocuments/client.d.ts +25 -0
  29. package/dist/account/invoiceDocuments/client.js +17 -0
  30. package/dist/account/invoiceDocuments/index.d.ts +5 -0
  31. package/dist/account/invoiceDocuments/index.js +4 -0
  32. package/dist/account/invoiceDocuments/models.d.ts +35 -0
  33. package/dist/account/invoiceDocuments/models.js +3 -0
  34. package/dist/account/invoices/client.d.ts +7 -34
  35. package/dist/account/invoices/client.js +7 -14
  36. package/dist/account/invoices/index.d.ts +2 -2
  37. package/dist/account/invoices/models.d.ts +66 -1
  38. package/dist/account/invoices/models.js +8 -0
  39. package/dist/account/members/client.d.ts +14 -55
  40. package/dist/account/members/client.js +6 -7
  41. package/dist/account/members/index.d.ts +1 -1
  42. package/dist/account/members/models.d.ts +261 -2
  43. package/dist/account/models.d.ts +210 -259
  44. package/dist/account/organization/client.d.ts +31 -0
  45. package/dist/account/organization/client.js +25 -0
  46. package/dist/account/organization/index.d.ts +5 -0
  47. package/dist/account/organization/index.js +4 -0
  48. package/dist/account/organization/models.d.ts +89 -0
  49. package/dist/account/organization/models.js +3 -0
  50. package/dist/account/organizations/client.d.ts +2 -48
  51. package/dist/account/organizations/client.js +1 -16
  52. package/dist/account/organizations/index.d.ts +2 -2
  53. package/dist/account/organizations/models.d.ts +26 -37
  54. package/dist/account/payments/client.d.ts +2 -8
  55. package/dist/account/payments/client.js +4 -4
  56. package/dist/account/payments/index.d.ts +1 -1
  57. package/dist/account/payments/models.d.ts +28 -1
  58. package/dist/account/payments/models.js +3 -0
  59. package/dist/account/permissions/client.d.ts +2 -8
  60. package/dist/account/permissions/client.js +1 -1
  61. package/dist/account/permissions/index.d.ts +1 -1
  62. package/dist/account/permissions/models.d.ts +27 -1
  63. package/dist/account/roles/client.d.ts +2 -8
  64. package/dist/account/roles/client.js +1 -1
  65. package/dist/account/roles/index.d.ts +1 -1
  66. package/dist/account/roles/models.d.ts +27 -1
  67. package/dist/account/usage/client.d.ts +7 -44
  68. package/dist/account/usage/client.js +5 -13
  69. package/dist/account/usage/index.d.ts +2 -2
  70. package/dist/account/usage/models.d.ts +27 -1
  71. package/dist/account/usageSummary/client.d.ts +26 -0
  72. package/dist/account/usageSummary/client.js +19 -0
  73. package/dist/account/usageSummary/index.d.ts +5 -0
  74. package/dist/account/usageSummary/index.js +4 -0
  75. package/dist/account/usageSummary/models.d.ts +50 -0
  76. package/dist/account/usageSummary/models.js +9 -0
  77. package/dist/account/walletTransactions/client.d.ts +2 -8
  78. package/dist/account/walletTransactions/client.js +4 -4
  79. package/dist/account/walletTransactions/index.d.ts +1 -1
  80. package/dist/account/walletTransactions/models.d.ts +28 -1
  81. package/dist/account/walletTransactions/models.js +3 -0
  82. package/dist/agenda/appointments/client.d.ts +6 -7
  83. package/dist/agenda/availability/client.d.ts +3 -4
  84. package/dist/agenda/bookings/client.d.ts +11 -12
  85. package/dist/agenda/index.d.ts +1 -1
  86. package/dist/agenda/locations/client.d.ts +2 -3
  87. package/dist/agenda/locations/client.js +1 -1
  88. package/dist/agenda/models.d.ts +8 -2
  89. package/dist/agenda/offerings/client.d.ts +4 -4
  90. package/dist/agenda/resources/client.d.ts +4 -4
  91. package/dist/agenda/scheduleRules/client.d.ts +4 -4
  92. package/dist/agenda/services/client.d.ts +4 -4
  93. package/dist/agenda/waitlist/client.d.ts +3 -4
  94. package/dist/axxa/authorizations/client.d.ts +2 -2
  95. package/dist/axxa/connections/client.d.ts +6 -5
  96. package/dist/axxa/eligibility/client.d.ts +2 -2
  97. package/dist/axxa/index.d.ts +1 -1
  98. package/dist/axxa/models.d.ts +8 -2
  99. package/dist/axxa/provider/client.d.ts +2 -2
  100. package/dist/gmedic/agendaServices/client.d.ts +2 -2
  101. package/dist/gmedic/agendas/client.d.ts +2 -2
  102. package/dist/gmedic/appointments/client.d.ts +4 -4
  103. package/dist/gmedic/availability/client.d.ts +2 -2
  104. package/dist/gmedic/availableDays/client.d.ts +2 -2
  105. package/dist/gmedic/branchOffices/client.d.ts +2 -2
  106. package/dist/gmedic/connections/client.d.ts +6 -5
  107. package/dist/gmedic/dictionaryEntries/client.d.ts +2 -2
  108. package/dist/gmedic/healthPartners/client.d.ts +2 -2
  109. package/dist/gmedic/healthPromotionEntities/client.d.ts +2 -2
  110. package/dist/gmedic/index.d.ts +1 -1
  111. package/dist/gmedic/laboralRiskManagers/client.d.ts +2 -2
  112. package/dist/gmedic/models.d.ts +8 -2
  113. package/dist/gmedic/occupations/client.d.ts +2 -2
  114. package/dist/gmedic/patientNotes/client.d.ts +4 -4
  115. package/dist/gmedic/patients/client.d.ts +4 -4
  116. package/dist/gmedic/services/client.d.ts +2 -2
  117. package/dist/gmedic/sessionPackages/client.d.ts +3 -3
  118. package/dist/index.d.ts +1 -1
  119. package/dist/models.d.ts +293 -5
  120. package/dist/nuevaEps/affiliations/models.d.ts +8 -8
  121. package/dist/nuevaEps/connections/client.d.ts +3 -2
  122. package/dist/nuevaEps/connections/index.d.ts +1 -1
  123. package/dist/nuevaEps/connections/models.d.ts +25 -37
  124. package/dist/nuevaEps/index.d.ts +1 -1
  125. package/dist/nuevaEps/models.d.ts +2 -101
  126. package/dist/orsovision/agencies/models.d.ts +8 -8
  127. package/dist/orsovision/appointments/client.d.ts +3 -3
  128. package/dist/orsovision/appointments/index.d.ts +1 -1
  129. package/dist/orsovision/appointments/models.d.ts +8 -32
  130. package/dist/orsovision/availability/index.d.ts +1 -1
  131. package/dist/orsovision/availability/models.d.ts +9 -20
  132. package/dist/orsovision/clinic/index.d.ts +1 -1
  133. package/dist/orsovision/clinic/models.d.ts +9 -8
  134. package/dist/orsovision/contracts/index.d.ts +1 -1
  135. package/dist/orsovision/contracts/models.d.ts +6 -30
  136. package/dist/orsovision/index.d.ts +1 -1
  137. package/dist/orsovision/models.d.ts +1 -162
  138. package/dist/orsovision/patients/client.d.ts +4 -4
  139. package/dist/orsovision/patients/index.d.ts +1 -1
  140. package/dist/orsovision/patients/models.d.ts +17 -27
  141. package/dist/orsovision/services/index.d.ts +1 -1
  142. package/dist/orsovision/services/models.d.ts +6 -30
  143. package/dist/orsovision/tools/index.d.ts +1 -1
  144. package/dist/orsovision/tools/models.d.ts +9 -8
  145. package/dist/raiz/agents/client.d.ts +5 -6
  146. package/dist/raiz/bulletins/client.d.ts +7 -6
  147. package/dist/raiz/campaigns/client.d.ts +5 -6
  148. package/dist/raiz/changes/client.d.ts +2 -2
  149. package/dist/raiz/channels/client.d.ts +9 -9
  150. package/dist/raiz/contacts/client.d.ts +7 -8
  151. package/dist/raiz/contacts/client.js +1 -1
  152. package/dist/raiz/conversations/client.d.ts +8 -8
  153. package/dist/raiz/definitions/client.d.ts +5 -5
  154. package/dist/raiz/evalCases/client.d.ts +4 -4
  155. package/dist/raiz/evalRuns/client.d.ts +3 -4
  156. package/dist/raiz/facts/client.d.ts +3 -4
  157. package/dist/raiz/facts/client.js +1 -1
  158. package/dist/raiz/index.d.ts +1 -1
  159. package/dist/raiz/knowledge/client.d.ts +6 -7
  160. package/dist/raiz/models.d.ts +8 -2
  161. package/dist/raiz/organization/client.d.ts +4 -5
  162. package/dist/raiz/profiles/client.d.ts +5 -6
  163. package/dist/raiz/reports/client.d.ts +2 -2
  164. package/dist/raiz/suppressions/client.d.ts +3 -4
  165. package/dist/raiz/tasks/client.d.ts +5 -6
  166. package/dist/raiz/tasks/client.js +1 -1
  167. package/dist/raiz/templates/client.d.ts +3 -4
  168. package/dist/raiz/voices/client.d.ts +2 -2
  169. package/dist/somos/appointments/client.d.ts +3 -3
  170. package/dist/somos/appointments/index.d.ts +1 -1
  171. package/dist/somos/appointments/models.d.ts +14 -12
  172. package/dist/somos/availability/index.d.ts +1 -1
  173. package/dist/somos/availability/models.d.ts +9 -20
  174. package/dist/somos/clinic/index.d.ts +1 -1
  175. package/dist/somos/clinic/models.d.ts +9 -8
  176. package/dist/somos/contracts/index.d.ts +1 -1
  177. package/dist/somos/contracts/models.d.ts +9 -20
  178. package/dist/somos/groups/models.d.ts +9 -9
  179. package/dist/somos/index.d.ts +1 -1
  180. package/dist/somos/models.d.ts +12 -151
  181. package/dist/somos/patients/client.d.ts +4 -4
  182. package/dist/somos/patients/index.d.ts +1 -1
  183. package/dist/somos/patients/models.d.ts +20 -17
  184. package/dist/somos/services/index.d.ts +1 -1
  185. package/dist/somos/services/models.d.ts +15 -26
  186. package/dist/somos/specialtyRules/client.d.ts +2 -2
  187. package/dist/somos/specialtyRules/models.d.ts +7 -7
  188. package/dist/somos/tools/index.d.ts +1 -1
  189. package/dist/somos/tools/models.d.ts +9 -8
  190. package/dist/sura/affiliations/client.d.ts +2 -3
  191. package/dist/sura/appointments/client.d.ts +5 -6
  192. package/dist/sura/authorizations/client.d.ts +2 -3
  193. package/dist/sura/availability/client.d.ts +2 -3
  194. package/dist/sura/connections/client.d.ts +6 -5
  195. package/dist/sura/copays/client.d.ts +2 -3
  196. package/dist/sura/index.d.ts +1 -1
  197. package/dist/sura/models.d.ts +8 -2
  198. package/dist/sura/operations/client.d.ts +2 -3
  199. package/dist/sura/patients/client.d.ts +2 -3
  200. package/dist/sura/professionals/client.d.ts +2 -3
  201. package/dist/sura/services/client.d.ts +2 -3
  202. package/dist/visoft/appointments/index.d.ts +1 -1
  203. package/dist/visoft/appointments/models.d.ts +8 -32
  204. package/dist/visoft/availability/models.d.ts +6 -6
  205. package/dist/visoft/clinic/models.d.ts +3 -2
  206. package/dist/visoft/clinics/models.d.ts +3 -3
  207. package/dist/visoft/connections/client.d.ts +3 -2
  208. package/dist/visoft/connections/index.d.ts +1 -1
  209. package/dist/visoft/connections/models.d.ts +4 -17
  210. package/dist/visoft/contracts/index.d.ts +1 -1
  211. package/dist/visoft/contracts/models.d.ts +4 -16
  212. package/dist/visoft/index.d.ts +1 -1
  213. package/dist/visoft/models.d.ts +3 -162
  214. package/dist/visoft/patients/index.d.ts +1 -1
  215. package/dist/visoft/patients/models.d.ts +10 -38
  216. package/dist/visoft/professionals/models.d.ts +5 -5
  217. package/dist/visoft/serviceCatalogs/models.d.ts +6 -6
  218. package/dist/visoft/services/index.d.ts +1 -1
  219. package/dist/visoft/services/models.d.ts +5 -17
  220. package/package.json +3 -3
@@ -4,13 +4,16 @@ import { type Client as BillingClient } from "./billing/client.js";
4
4
  import { type Client as BillingProfilesClient } from "./billingProfiles/client.js";
5
5
  import { type Client as ConnectionsClient } from "./connections/client.js";
6
6
  import { type Client as InvitationsClient } from "./invitations/client.js";
7
+ import { type Client as InvoiceDocumentsClient } from "./invoiceDocuments/client.js";
7
8
  import { type Client as InvoicesClient } from "./invoices/client.js";
8
9
  import { type Client as MembersClient } from "./members/client.js";
10
+ import { type Client as OrganizationClient } from "./organization/client.js";
9
11
  import { type Client as OrganizationsClient } from "./organizations/client.js";
10
12
  import { type Client as PaymentsClient } from "./payments/client.js";
11
13
  import { type Client as PermissionsClient } from "./permissions/client.js";
12
14
  import { type Client as RolesClient } from "./roles/client.js";
13
15
  import { type Client as UsageClient } from "./usage/client.js";
16
+ import { type Client as UsageSummaryClient } from "./usageSummary/client.js";
14
17
  import { type Client as WalletTransactionsClient } from "./walletTransactions/client.js";
15
18
  export interface ClientOptions extends BaseClientOptions {
16
19
  /**
@@ -24,13 +27,16 @@ export interface Client {
24
27
  readonly billingProfiles: BillingProfilesClient;
25
28
  readonly connections: ConnectionsClient;
26
29
  readonly invitations: InvitationsClient;
30
+ readonly invoiceDocuments: InvoiceDocumentsClient;
27
31
  readonly invoices: InvoicesClient;
28
32
  readonly members: MembersClient;
33
+ readonly organization: OrganizationClient;
29
34
  readonly organizations: OrganizationsClient;
30
35
  readonly payments: PaymentsClient;
31
36
  readonly permissions: PermissionsClient;
32
37
  readonly roles: RolesClient;
33
38
  readonly usage: UsageClient;
39
+ readonly usageSummary: UsageSummaryClient;
34
40
  readonly walletTransactions: WalletTransactionsClient;
35
41
  }
36
42
  export declare function createClient(options: ClientOptions): Client;
@@ -6,13 +6,16 @@ import { bind as bindBilling, } from "./billing/client.js";
6
6
  import { bind as bindBillingProfiles, } from "./billingProfiles/client.js";
7
7
  import { bind as bindConnections, } from "./connections/client.js";
8
8
  import { bind as bindInvitations, } from "./invitations/client.js";
9
+ import { bind as bindInvoiceDocuments, } from "./invoiceDocuments/client.js";
9
10
  import { bind as bindInvoices, } from "./invoices/client.js";
10
11
  import { bind as bindMembers, } from "./members/client.js";
12
+ import { bind as bindOrganization, } from "./organization/client.js";
11
13
  import { bind as bindOrganizations, } from "./organizations/client.js";
12
14
  import { bind as bindPayments, } from "./payments/client.js";
13
15
  import { bind as bindPermissions, } from "./permissions/client.js";
14
16
  import { bind as bindRoles, } from "./roles/client.js";
15
17
  import { bind as bindUsage, } from "./usage/client.js";
18
+ import { bind as bindUsageSummary, } from "./usageSummary/client.js";
16
19
  import { bind as bindWalletTransactions, } from "./walletTransactions/client.js";
17
20
  export function createClient(options) {
18
21
  return bind(new Transport(options));
@@ -23,13 +26,16 @@ export function bind(transport) {
23
26
  let billingProfilesClient;
24
27
  let connectionsClient;
25
28
  let invitationsClient;
29
+ let invoiceDocumentsClient;
26
30
  let invoicesClient;
27
31
  let membersClient;
32
+ let organizationClient;
28
33
  let organizationsClient;
29
34
  let paymentsClient;
30
35
  let permissionsClient;
31
36
  let rolesClient;
32
37
  let usageClient;
38
+ let usageSummaryClient;
33
39
  let walletTransactionsClient;
34
40
  return {
35
41
  get apiKeys() {
@@ -47,12 +53,18 @@ export function bind(transport) {
47
53
  get invitations() {
48
54
  return (invitationsClient ??= bindInvitations(transport));
49
55
  },
56
+ get invoiceDocuments() {
57
+ return (invoiceDocumentsClient ??= bindInvoiceDocuments(transport));
58
+ },
50
59
  get invoices() {
51
60
  return (invoicesClient ??= bindInvoices(transport));
52
61
  },
53
62
  get members() {
54
63
  return (membersClient ??= bindMembers(transport));
55
64
  },
65
+ get organization() {
66
+ return (organizationClient ??= bindOrganization(transport));
67
+ },
56
68
  get organizations() {
57
69
  return (organizationsClient ??= bindOrganizations(transport));
58
70
  },
@@ -68,6 +80,9 @@ export function bind(transport) {
68
80
  get usage() {
69
81
  return (usageClient ??= bindUsage(transport));
70
82
  },
83
+ get usageSummary() {
84
+ return (usageSummaryClient ??= bindUsageSummary(transport));
85
+ },
71
86
  get walletTransactions() {
72
87
  return (walletTransactionsClient ??= bindWalletTransactions(transport));
73
88
  },
@@ -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 { AccountConnection, AccountConnectionPage } from "./models.js";
2
+ import type { AccountConnectionPageResponse } 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,124 +7,16 @@ export interface ClientOptions extends BaseClientOptions {
8
7
  baseUrl: string;
9
8
  }
10
9
  export interface Client {
11
- /**
12
- * Add a connection
13
- *
14
- * Add a connection. Provider connections: the owner verifies credentials once
15
- * with the credentials before anything is sealed; a refused login answers
16
- * LOGIN_REJECTED with each login's result, and one that was not refused stays
17
- * saved. A SURA account that sees several institutions answers
18
- * INSTITUTION_REQUIRED with them: send the same request again with
19
- * connectionId and institutionId. A custom server (Arbol staff) is read for
20
- * its tools before it is saved.
21
- */
22
- create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
23
- /**
24
- * Remove a connection
25
- *
26
- * Remove a connection: its owner drops the session first, then its
27
- * credentials are destroyed. Agents that used it stop seeing its tools. The
28
- * organization's Agenda cannot be removed.
29
- */
30
- delete(request: DeleteRequest, options?: RequestOptions): Promise<DeleteResponse>;
31
10
  /**
32
11
  * List the connections
33
12
  *
34
13
  * The organization's integration connections (SURA, Visoft, its Agenda,
35
14
  * custom servers) with the tools each offers an agent and their version.
36
- * Never a credential.
37
15
  */
38
16
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
39
- /**
40
- * Change a connection
41
- *
42
- * Rename, disable or enable a connection, or change its credentials. Only new
43
- * or changed logins are verified, each with one real sign-in; a refused one
44
- * changes nothing and the previous credentials stay. SURA: add logins, change
45
- * one by its login number, or remove some (one always stays). A custom
46
- * server's settings are Arbol staff's.
47
- */
48
- update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
49
17
  }
50
18
  export declare function createClient(options: ClientOptions): Client;
51
19
  export declare function bind(transport: Transport): Client;
52
- export type CreateRequest = {
53
- connectionId?: string;
54
- institutionId?: string;
55
- integration: "sura";
56
- kind: "arbol";
57
- logins: {
58
- password: string;
59
- totpSecret: string;
60
- username: string;
61
- }[];
62
- name: string;
63
- portal: "agenda" | "saludweb";
64
- } | {
65
- clinicId: string;
66
- integration: "visoft";
67
- kind: "arbol";
68
- name: string;
69
- password: string;
70
- username: string;
71
- } | {
72
- documentType: string;
73
- integration: "axxa";
74
- kind: "arbol";
75
- name: string;
76
- password: string;
77
- providerCode: string;
78
- username: string;
79
- } | {
80
- documentType: string;
81
- integration: "nueva-eps";
82
- kind: "arbol";
83
- name: string;
84
- password: string;
85
- username: string;
86
- } | {
87
- apiToken: string;
88
- integration: "gmedic";
89
- kind: "arbol";
90
- name: string;
91
- } | {
92
- authHeader?: string;
93
- fileArgument?: string;
94
- kind: "custom";
95
- name: string;
96
- secret: string;
97
- transport: "http" | "mcp";
98
- url: string;
99
- writesEnabled: boolean;
100
- writesThrough?: {
101
- [key: string]: unknown;
102
- };
103
- };
104
- export interface CreateResponse {
105
- /**
106
- * One connection of an integration. Never a credential.
107
- */
108
- data: AccountConnection;
109
- error: null;
110
- metadata: ResponseMetadata;
111
- success: true;
112
- }
113
- export interface DeleteRequest {
114
- /**
115
- * A connection's id: con_ and 26 characters, stable and unique across the
116
- * platform.
117
- */
118
- id: string;
119
- body: {
120
- [key: string]: unknown;
121
- };
122
- }
123
- export interface DeleteResponse {
124
- data: DeletedObject;
125
- error: null;
126
- metadata: ResponseMetadata;
127
- success: true;
128
- }
129
20
  export interface ListRequest {
130
21
  /**
131
22
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -141,93 +32,4 @@ export interface ListRequest {
141
32
  */
142
33
  limit?: number;
143
34
  }
144
- export interface ListResponse {
145
- data: AccountConnectionPage;
146
- error: null;
147
- metadata: ResponseMetadata;
148
- success: true;
149
- }
150
- export interface UpdateRequest {
151
- /**
152
- * A connection's id: con_ and 26 characters, stable and unique across the
153
- * platform.
154
- */
155
- id: string;
156
- apiToken?: string;
157
- authHeader?: string | null;
158
- /**
159
- * The clinic whose SIIPS the login belongs to, as visoft.clinics.list names
160
- * it.
161
- */
162
- clinicId?: string;
163
- documentType?: string;
164
- /**
165
- * false disables the connection (its owner refuses it); true enables it
166
- * again.
167
- */
168
- enabled?: boolean;
169
- fileArgument?: string | null;
170
- /**
171
- * SURA: logins to add or to change; only these are verified.
172
- */
173
- logins?: {
174
- login?: number;
175
- password: string;
176
- totpSecret: string;
177
- username: string;
178
- }[];
179
- /**
180
- * The connection's name, as an agent's builder sees it and an agent picks it:
181
- * 'Sede Norte'.
182
- */
183
- name?: string;
184
- /**
185
- * Its password, exactly as typed.
186
- */
187
- password?: string;
188
- providerCode?: string;
189
- /**
190
- * SURA: the logins to remove; at least one login stays.
191
- */
192
- removeLogins?: number[];
193
- /**
194
- * The server's secret. It is sealed and only ever sent to the registered
195
- * server.
196
- */
197
- secret?: string;
198
- /**
199
- * http: an OpenAPI 3 document (or a server whose /openapi.json serves one).
200
- * mcp: an MCP endpoint (Streamable HTTP).
201
- */
202
- transport?: "http" | "mcp";
203
- /**
204
- * The OpenAPI document, or the MCP endpoint: https, without a query or a
205
- * fragment.
206
- */
207
- url?: string;
208
- /**
209
- * The username the clinic's team signs in to SIIPS with.
210
- */
211
- username?: string;
212
- /**
213
- * Staff verified the server's domain belongs to the organization: its write
214
- * tools are offered.
215
- */
216
- writesEnabled?: boolean;
217
- /**
218
- * Per write tool, the Arbol integrations it writes through (sura, agenda),
219
- * when its document does not say: Raíz fences them together.
220
- */
221
- writesThrough?: {
222
- [key: string]: unknown;
223
- };
224
- }
225
- export interface UpdateResponse {
226
- /**
227
- * One connection of an integration. Never a credential.
228
- */
229
- data: AccountConnection;
230
- error: null;
231
- metadata: ResponseMetadata;
232
- success: true;
233
- }
35
+ export type ListResponse = AccountConnectionPageResponse;
@@ -6,37 +6,13 @@ export function createClient(options) {
6
6
  }
7
7
  export function bind(transport) {
8
8
  return {
9
- create: (request, options) => transport.send(CreateOperation, request, options),
10
- delete: (request, options) => transport.send(DeleteOperation, request, options),
11
9
  list: (request, options) => transport.send(ListOperation, request, options),
12
- update: (request, options) => transport.send(UpdateOperation, request, options),
13
10
  };
14
11
  }
15
- const CreateOperation = {
16
- method: "POST",
17
- route: "/v1/account/connections",
18
- body: "flat",
19
- response: null,
20
- 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 },
21
- };
22
- const DeleteOperation = {
23
- method: "DELETE",
24
- route: "/v1/account/connections/{id}",
25
- body: "nested",
26
- response: null,
27
- 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 },
28
- };
29
12
  const ListOperation = {
30
13
  method: "GET",
31
14
  route: "/v1/account/connections",
32
15
  query: { cursor: "cursor", direction: "direction", limit: "limit" },
33
16
  response: null,
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 },
35
- };
36
- const UpdateOperation = {
37
- method: "PATCH",
38
- route: "/v1/account/connections/{id}",
39
- body: "flat",
40
- response: null,
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 },
17
+ errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
42
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, CreateRequest, CreateResponse, DeleteRequest, DeleteResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { AccountConnection, AccountConnectionPage, } from "./models.js";
4
+ export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
5
+ export type { AccountConnection, AccountConnectionPage, AccountConnectionPageResponse, } from "./models.js";
@@ -1,9 +1,9 @@
1
- import type { PageInfo } from "../../models.js";
1
+ import type { PageInfo, ResponseMetadata } from "../../models.js";
2
2
  export interface AccountConnection {
3
3
  errorCode: string | null;
4
4
  /**
5
- * The connection's configuration: portal, institution, clinic, transport,
6
- * url. Never secret.
5
+ * Its settings by name. Every caller reads a custom server's; only staff read
6
+ * an Arbol integration's, which is empty for other callers.
7
7
  */
8
8
  fields: {
9
9
  [key: string]: unknown;
@@ -18,6 +18,9 @@ export interface AccountConnection {
18
18
  */
19
19
  integration: string;
20
20
  kind: "arbol" | "custom";
21
+ /**
22
+ * Staff only; empty for other callers.
23
+ */
21
24
  logins: {
22
25
  login: number;
23
26
  username: string | null;
@@ -40,8 +43,8 @@ export interface AccountConnection {
40
43
  name: string;
41
44
  }[];
42
45
  /**
43
- * active: agents may use it. disabled: turned off here. failed: its last
44
- * verification failed.
46
+ * active: agents may use it. disabled: turned off. failed: agents cannot use
47
+ * it until Arbol's team reviews it.
45
48
  */
46
49
  status: "active" | "disabled" | "failed";
47
50
  summary: string | null;
@@ -72,11 +75,11 @@ export interface AccountConnection {
72
75
  toolsVersion: string;
73
76
  updatedAt: string | null;
74
77
  /**
75
- * The first login's username, masked.
78
+ * Staff only; empty for other callers.
76
79
  */
77
80
  username: string | null;
78
81
  /**
79
- * When a login was last verified and saved.
82
+ * Staff only; empty for other callers.
80
83
  */
81
84
  verifiedAt: string | null;
82
85
  }
@@ -94,3 +97,15 @@ export interface AccountConnectionPage {
94
97
  */
95
98
  pageInfo: PageInfo;
96
99
  }
100
+ /**
101
+ * A successful answer.
102
+ */
103
+ export interface AccountConnectionPageResponse {
104
+ data: AccountConnectionPage;
105
+ error: null;
106
+ /**
107
+ * What every answer carries besides its data or error.
108
+ */
109
+ metadata: ResponseMetadata;
110
+ success: true;
111
+ }
@@ -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 { AccountFailureResponse, AccountProductRole, } from "./models.js";
5
+ export type { AccountAccountNotConfiguredFailure, AccountBillingRecordNotFoundError, AccountBillingRecordNotFoundFailure, AccountBillingRejectedError, AccountBillingRejectedFailure, AccountBillingUnavailableFailure, AccountIdentityRejectedError, AccountIdentityRejectedFailure, AccountIdentityUnavailableFailure, AccountMemberProtectedFailure, AccountProductRole, AccountRoleNotAssignableFailure, } from "./models.js";
@@ -1,6 +1,6 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { DeletedObject, ResponseMetadata } from "../../models.js";
3
- import { type AccountInvitation, type AccountInvitationPage } from "./models.js";
2
+ import type { DeletedObjectResponse } from "../../models.js";
3
+ import { type AccountCreateInvitationBody, type AccountInvitationPageResponse, type AccountInvitationResponse } from "./models.js";
4
4
  export interface ClientOptions extends BaseClientOptions {
5
5
  /**
6
6
  * The URL the paths of the API are relative to.
@@ -34,39 +34,15 @@ export interface Client {
34
34
  }
35
35
  export declare function createClient(options: ClientOptions): Client;
36
36
  export declare function bind(transport: Transport): Client;
37
- export interface CreateRequest {
38
- /**
39
- * Who to invite: someone who does not have an Arbol account yet.
40
- */
41
- email: string;
42
- /**
43
- * A product whose team Account administers: Raíz, Agenda, Ámbar or Account
44
- * itself.
45
- */
46
- product: "raiz" | "agenda" | "ambar" | "account";
37
+ export type CreateRequest = AccountCreateInvitationBody;
38
+ export type CreateResponse = AccountInvitationResponse;
39
+ export interface DeleteRequest {
47
40
  /**
48
- * A role name, such as calendar:operator.
41
+ * The invitation's id, as invitations.list answers it.
49
42
  */
50
- role: string;
51
- }
52
- export interface CreateResponse {
53
- data: AccountInvitation;
54
- error: null;
55
- metadata: ResponseMetadata;
56
- success: true;
57
- }
58
- export interface DeleteRequest {
59
- id: string;
60
- body: {
61
- [key: string]: unknown;
62
- };
63
- }
64
- export interface DeleteResponse {
65
- data: DeletedObject;
66
- error: null;
67
- metadata: ResponseMetadata;
68
- success: true;
43
+ invitationId: string;
69
44
  }
45
+ export type DeleteResponse = DeletedObjectResponse;
70
46
  export interface ListRequest {
71
47
  /**
72
48
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -82,9 +58,4 @@ export interface ListRequest {
82
58
  */
83
59
  limit?: number;
84
60
  }
85
- export interface ListResponse {
86
- data: AccountInvitationPage;
87
- error: null;
88
- metadata: ResponseMetadata;
89
- success: true;
90
- }
61
+ export type ListResponse = AccountInvitationPageResponse;
@@ -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 { AccountInvitationCodec, AccountInvitationPageCodec, } from "./models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { AccountInvitationPageResponseCodec, AccountInvitationResponseCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -16,20 +16,19 @@ const CreateOperation = {
16
16
  method: "POST",
17
17
  route: "/v1/account/invitations",
18
18
  body: "flat",
19
- response: object([["data", null, () => AccountInvitationCodec]]),
20
- 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 },
19
+ response: AccountInvitationResponseCodec,
20
+ errors: { "400": true, "401": true, "403": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
21
21
  };
22
22
  const DeleteOperation = {
23
23
  method: "DELETE",
24
- route: "/v1/account/invitations/{id}",
25
- body: "nested",
24
+ route: "/v1/account/invitations/{invitationId}",
26
25
  response: null,
27
- 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 },
26
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": 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/account/invitations",
32
31
  query: { cursor: "cursor", direction: "direction", limit: "limit" },
33
- response: object([["data", null, () => AccountInvitationPageCodec]]),
34
- 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 },
32
+ response: AccountInvitationPageResponseCodec,
33
+ errors: { "400": true, "401": true, "403": true, "409": true, "429": true, "500": true, "502": true, "503": true, "504": true },
35
34
  };
@@ -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, CreateRequest, CreateResponse, DeleteRequest, DeleteResponse, ListRequest, ListResponse, } from "./client.js";
5
- export type { AccountInvitation, AccountInvitationPage, } from "./models.js";
5
+ export type { AccountAccountExistsFailure, AccountCreateInvitationBody, AccountCreateInvitationConflictError, AccountCreateInvitationConflictFailure, AccountCreateInvitationForbiddenError, AccountCreateInvitationForbiddenFailure, AccountCreateInvitationServiceUnavailableError, AccountCreateInvitationServiceUnavailableFailure, AccountDeleteInvitationForbiddenError, AccountDeleteInvitationForbiddenFailure, AccountDeleteInvitationServiceUnavailableError, AccountDeleteInvitationServiceUnavailableFailure, AccountInvitation, AccountInvitationExistsFailure, AccountInvitationNotFoundError, AccountInvitationNotFoundFailure, AccountInvitationPage, AccountInvitationPageResponse, AccountInvitationResponse, AccountListInvitationsServiceUnavailableError, AccountListInvitationsServiceUnavailableFailure, AccountMemberExistsFailure, } from "./models.js";