@arbol-ai/sdk 5.25.0 → 5.27.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 (137) hide show
  1. package/README.md +4 -4
  2. package/dist/client.d.ts +0 -4
  3. package/dist/client.js +0 -10
  4. package/dist/index.d.ts +1 -1
  5. package/dist/models.d.ts +0 -282
  6. package/dist/models.js +1 -5
  7. package/dist/raiz/conversations/client.d.ts +34 -9
  8. package/dist/raiz/conversations/client.js +2 -2
  9. package/dist/raiz/conversations/models.d.ts +3 -0
  10. package/dist/visoft/appointments/index.d.ts +1 -1
  11. package/dist/visoft/appointments/models.d.ts +32 -6
  12. package/dist/visoft/availability/models.d.ts +4 -4
  13. package/dist/visoft/contracts/index.d.ts +1 -1
  14. package/dist/visoft/contracts/models.d.ts +16 -3
  15. package/dist/visoft/index.d.ts +1 -1
  16. package/dist/visoft/models.d.ts +67 -2
  17. package/dist/visoft/patients/index.d.ts +1 -1
  18. package/dist/visoft/patients/models.d.ts +35 -6
  19. package/dist/visoft/professionals/models.d.ts +4 -4
  20. package/dist/visoft/serviceCatalogs/models.d.ts +4 -4
  21. package/dist/visoft/services/index.d.ts +1 -1
  22. package/dist/visoft/services/models.d.ts +16 -3
  23. package/package.json +3 -3
  24. package/dist/orsovision/agencies/client.d.ts +0 -51
  25. package/dist/orsovision/agencies/client.js +0 -18
  26. package/dist/orsovision/agencies/index.d.ts +0 -5
  27. package/dist/orsovision/agencies/index.js +0 -4
  28. package/dist/orsovision/agencies/models.d.ts +0 -107
  29. package/dist/orsovision/agencies/models.js +0 -3
  30. package/dist/orsovision/appointments/client.d.ts +0 -39
  31. package/dist/orsovision/appointments/client.js +0 -29
  32. package/dist/orsovision/appointments/index.d.ts +0 -5
  33. package/dist/orsovision/appointments/index.js +0 -4
  34. package/dist/orsovision/appointments/models.d.ts +0 -182
  35. package/dist/orsovision/appointments/models.js +0 -9
  36. package/dist/orsovision/availability/client.d.ts +0 -32
  37. package/dist/orsovision/availability/client.js +0 -19
  38. package/dist/orsovision/availability/index.d.ts +0 -5
  39. package/dist/orsovision/availability/index.js +0 -4
  40. package/dist/orsovision/availability/models.d.ts +0 -228
  41. package/dist/orsovision/availability/models.js +0 -15
  42. package/dist/orsovision/client.d.ts +0 -27
  43. package/dist/orsovision/client.js +0 -50
  44. package/dist/orsovision/clinic/client.d.ts +0 -34
  45. package/dist/orsovision/clinic/client.js +0 -18
  46. package/dist/orsovision/clinic/index.d.ts +0 -5
  47. package/dist/orsovision/clinic/index.js +0 -4
  48. package/dist/orsovision/clinic/models.d.ts +0 -90
  49. package/dist/orsovision/clinic/models.js +0 -3
  50. package/dist/orsovision/contracts/client.d.ts +0 -69
  51. package/dist/orsovision/contracts/client.js +0 -18
  52. package/dist/orsovision/contracts/index.d.ts +0 -5
  53. package/dist/orsovision/contracts/index.js +0 -4
  54. package/dist/orsovision/contracts/models.d.ts +0 -84
  55. package/dist/orsovision/contracts/models.js +0 -3
  56. package/dist/orsovision/index.d.ts +0 -5
  57. package/dist/orsovision/index.js +0 -4
  58. package/dist/orsovision/models.d.ts +0 -66
  59. package/dist/orsovision/models.js +0 -3
  60. package/dist/orsovision/patients/client.d.ts +0 -52
  61. package/dist/orsovision/patients/client.js +0 -34
  62. package/dist/orsovision/patients/index.d.ts +0 -5
  63. package/dist/orsovision/patients/index.js +0 -4
  64. package/dist/orsovision/patients/models.d.ts +0 -287
  65. package/dist/orsovision/patients/models.js +0 -3
  66. package/dist/orsovision/services/client.d.ts +0 -74
  67. package/dist/orsovision/services/client.js +0 -18
  68. package/dist/orsovision/services/index.d.ts +0 -5
  69. package/dist/orsovision/services/index.js +0 -4
  70. package/dist/orsovision/services/models.d.ts +0 -81
  71. package/dist/orsovision/services/models.js +0 -3
  72. package/dist/orsovision/tools/client.d.ts +0 -44
  73. package/dist/orsovision/tools/client.js +0 -18
  74. package/dist/orsovision/tools/index.d.ts +0 -5
  75. package/dist/orsovision/tools/index.js +0 -4
  76. package/dist/orsovision/tools/models.d.ts +0 -102
  77. package/dist/orsovision/tools/models.js +0 -3
  78. package/dist/somos/appointments/client.d.ts +0 -40
  79. package/dist/somos/appointments/client.js +0 -29
  80. package/dist/somos/appointments/index.d.ts +0 -5
  81. package/dist/somos/appointments/index.js +0 -4
  82. package/dist/somos/appointments/models.d.ts +0 -303
  83. package/dist/somos/appointments/models.js +0 -9
  84. package/dist/somos/availability/client.d.ts +0 -33
  85. package/dist/somos/availability/client.js +0 -19
  86. package/dist/somos/availability/index.d.ts +0 -5
  87. package/dist/somos/availability/index.js +0 -4
  88. package/dist/somos/availability/models.d.ts +0 -338
  89. package/dist/somos/availability/models.js +0 -15
  90. package/dist/somos/client.d.ts +0 -29
  91. package/dist/somos/client.js +0 -55
  92. package/dist/somos/clinic/client.d.ts +0 -33
  93. package/dist/somos/clinic/client.js +0 -18
  94. package/dist/somos/clinic/index.d.ts +0 -5
  95. package/dist/somos/clinic/index.js +0 -4
  96. package/dist/somos/clinic/models.d.ts +0 -90
  97. package/dist/somos/clinic/models.js +0 -3
  98. package/dist/somos/contracts/client.d.ts +0 -74
  99. package/dist/somos/contracts/client.js +0 -18
  100. package/dist/somos/contracts/index.d.ts +0 -5
  101. package/dist/somos/contracts/index.js +0 -4
  102. package/dist/somos/contracts/models.d.ts +0 -96
  103. package/dist/somos/contracts/models.js +0 -3
  104. package/dist/somos/groups/client.d.ts +0 -67
  105. package/dist/somos/groups/client.js +0 -18
  106. package/dist/somos/groups/index.d.ts +0 -5
  107. package/dist/somos/groups/index.js +0 -4
  108. package/dist/somos/groups/models.d.ts +0 -117
  109. package/dist/somos/groups/models.js +0 -3
  110. package/dist/somos/index.d.ts +0 -5
  111. package/dist/somos/index.js +0 -4
  112. package/dist/somos/models.d.ts +0 -88
  113. package/dist/somos/models.js +0 -3
  114. package/dist/somos/patients/client.d.ts +0 -51
  115. package/dist/somos/patients/client.js +0 -34
  116. package/dist/somos/patients/index.d.ts +0 -5
  117. package/dist/somos/patients/index.js +0 -4
  118. package/dist/somos/patients/models.d.ts +0 -330
  119. package/dist/somos/patients/models.js +0 -3
  120. package/dist/somos/services/client.d.ts +0 -116
  121. package/dist/somos/services/client.js +0 -26
  122. package/dist/somos/services/index.d.ts +0 -5
  123. package/dist/somos/services/index.js +0 -4
  124. package/dist/somos/services/models.d.ts +0 -261
  125. package/dist/somos/services/models.js +0 -3
  126. package/dist/somos/specialtyRules/client.d.ts +0 -44
  127. package/dist/somos/specialtyRules/client.js +0 -18
  128. package/dist/somos/specialtyRules/index.d.ts +0 -5
  129. package/dist/somos/specialtyRules/index.js +0 -4
  130. package/dist/somos/specialtyRules/models.d.ts +0 -54
  131. package/dist/somos/specialtyRules/models.js +0 -3
  132. package/dist/somos/tools/client.d.ts +0 -44
  133. package/dist/somos/tools/client.js +0 -18
  134. package/dist/somos/tools/index.d.ts +0 -5
  135. package/dist/somos/tools/index.js +0 -4
  136. package/dist/somos/tools/models.d.ts +0 -102
  137. package/dist/somos/tools/models.js +0 -3
package/README.md CHANGED
@@ -29,12 +29,12 @@ Each service and each of its resources is also an entry of its own, with its own
29
29
  an application bundles only what it calls instead of every service's:
30
30
 
31
31
  ```ts
32
- import { createClient } from '@arbol-ai/sdk/account/organizations';
33
- import type { AccountCurrentOrganization } from '@arbol-ai/sdk/account/organizations';
32
+ import { createClient } from '@arbol-ai/sdk/account/organization';
33
+ import type { AccountCurrentOrganization } from '@arbol-ai/sdk/account/organization';
34
34
 
35
- const organizations = createClient({ baseUrl: 'https://api.getarbol.com', token });
35
+ const organization = createClient({ baseUrl: 'https://api.getarbol.com', token });
36
36
 
37
- const { data } = await organizations.current();
37
+ const { data } = await organization.get();
38
38
  ```
39
39
 
40
40
  `@arbol-ai/sdk/<service>` is one service (`client.<resource>.<verb>`) and
package/dist/client.d.ts CHANGED
@@ -5,12 +5,10 @@ import { type Client as AgendaClient } from "./agenda/client.js";
5
5
  import { type Client as AxxaClient } from "./axxa/client.js";
6
6
  import { type Client as GmedicClient } from "./gmedic/client.js";
7
7
  import { type Client as NuevaEpsClient } from "./nuevaEps/client.js";
8
- import { type Client as OrsovisionClient } from "./orsovision/client.js";
9
8
  import { type Client as PoliciaColombiaClient } from "./policiaColombia/client.js";
10
9
  import { type Client as RaizClient } from "./raiz/client.js";
11
10
  import { type Client as SaludTotalClient } from "./saludTotal/client.js";
12
11
  import { type Client as SisbenClient } from "./sisben/client.js";
13
- import { type Client as SomosClient } from "./somos/client.js";
14
12
  import { type Client as SuraClient } from "./sura/client.js";
15
13
  import { type Client as VisoftClient } from "./visoft/client.js";
16
14
  export interface ClientOptions extends BaseClientOptions {
@@ -26,12 +24,10 @@ export interface Client {
26
24
  readonly axxa: AxxaClient;
27
25
  readonly gmedic: GmedicClient;
28
26
  readonly nuevaEps: NuevaEpsClient;
29
- readonly orsovision: OrsovisionClient;
30
27
  readonly policiaColombia: PoliciaColombiaClient;
31
28
  readonly raiz: RaizClient;
32
29
  readonly saludTotal: SaludTotalClient;
33
30
  readonly sisben: SisbenClient;
34
- readonly somos: SomosClient;
35
31
  readonly sura: SuraClient;
36
32
  readonly visoft: VisoftClient;
37
33
  }
package/dist/client.js CHANGED
@@ -7,12 +7,10 @@ import { bind as bindAgenda, } from "./agenda/client.js";
7
7
  import { bind as bindAxxa } from "./axxa/client.js";
8
8
  import { bind as bindGmedic, } from "./gmedic/client.js";
9
9
  import { bind as bindNuevaEps, } from "./nuevaEps/client.js";
10
- import { bind as bindOrsovision, } from "./orsovision/client.js";
11
10
  import { bind as bindPoliciaColombia, } from "./policiaColombia/client.js";
12
11
  import { bind as bindRaiz } from "./raiz/client.js";
13
12
  import { bind as bindSaludTotal, } from "./saludTotal/client.js";
14
13
  import { bind as bindSisben, } from "./sisben/client.js";
15
- import { bind as bindSomos, } from "./somos/client.js";
16
14
  import { bind as bindSura } from "./sura/client.js";
17
15
  import { bind as bindVisoft, } from "./visoft/client.js";
18
16
  export function createClient(options) {
@@ -25,12 +23,10 @@ export function bind(transport) {
25
23
  let axxaClient;
26
24
  let gmedicClient;
27
25
  let nuevaEpsClient;
28
- let orsovisionClient;
29
26
  let policiaColombiaClient;
30
27
  let raizClient;
31
28
  let saludTotalClient;
32
29
  let sisbenClient;
33
- let somosClient;
34
30
  let suraClient;
35
31
  let visoftClient;
36
32
  return {
@@ -52,9 +48,6 @@ export function bind(transport) {
52
48
  get nuevaEps() {
53
49
  return (nuevaEpsClient ??= bindNuevaEps(transport));
54
50
  },
55
- get orsovision() {
56
- return (orsovisionClient ??= bindOrsovision(transport));
57
- },
58
51
  get policiaColombia() {
59
52
  return (policiaColombiaClient ??= bindPoliciaColombia(transport));
60
53
  },
@@ -67,9 +60,6 @@ export function bind(transport) {
67
60
  get sisben() {
68
61
  return (sisbenClient ??= bindSisben(transport));
69
62
  },
70
- get somos() {
71
- return (somosClient ??= bindSomos(transport));
72
- },
73
63
  get sura() {
74
64
  return (suraClient ??= bindSura(transport));
75
65
  },
package/dist/index.d.ts CHANGED
@@ -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 { AvailabilityBookingInput, CancelAppointmentBadGatewayError, CancelAppointmentBadGatewayFailure, Connection, ConnectionNotConfiguredFailure, ConnectionNotFoundError, ConnectionNotFoundFailure, ConnectionPage, ConnectionPageResponse, ConnectionResponse, CreateAppointmentBadGatewayError, CreateAppointmentBadGatewayFailure, CredentialsRejectedError, CredentialsRejectedFailure, DeletedObject, DeletedObjectResponse, Empty, Failure, ForbiddenError, ForbiddenFailure, InternalError, InternalFailure, InvalidInputError, InvalidInputFailure, InvalidInputFailureData, ListAvailabilityUnprocessableContentError, ListAvailabilityUnprocessableContentFailure, ListContractsBadGatewayError, ListContractsBadGatewayFailure, ListContractsUnprocessableContentError, ListContractsUnprocessableContentFailure, ListServicesBadGatewayError, ListServicesBadGatewayFailure, ListServicesUnprocessableContentError, ListServicesUnprocessableContentFailure, LookupPatientBadGatewayError, LookupPatientBadGatewayFailure, OutcomeUnknownError, OutcomeUnknownFailure, PageInfo, ProviderUnavailableFailure, RateLimitedError, RateLimitedFailure, RequestTooLargeError, RequestTooLargeFailure, ResponseMetadata, ToolRefusedFailure, ToolRefusedFailureData, ToolResult, ToolResultResponse, UnauthorizedError, UnauthorizedFailure, UnsupportedMediaTypeError, UnsupportedMediaTypeFailure, UpstreamTimeoutError, UpstreamTimeoutFailure, UpstreamUnavailableError, UpstreamUnavailableFailure, ValidationIssue, VerifyConnectionResult, VerifyConnectionResultResponse, } from "./models.js";
5
+ export type { Connection, ConnectionNotFoundError, ConnectionNotFoundFailure, ConnectionPage, ConnectionPageResponse, ConnectionResponse, DeletedObject, DeletedObjectResponse, Empty, Failure, ForbiddenError, ForbiddenFailure, InternalError, InternalFailure, InvalidInputError, InvalidInputFailure, InvalidInputFailureData, OutcomeUnknownError, OutcomeUnknownFailure, PageInfo, RateLimitedError, RateLimitedFailure, RequestTooLargeError, RequestTooLargeFailure, ResponseMetadata, UnauthorizedError, UnauthorizedFailure, UnsupportedMediaTypeError, UnsupportedMediaTypeFailure, UpstreamTimeoutError, UpstreamTimeoutFailure, UpstreamUnavailableError, UpstreamUnavailableFailure, ValidationIssue, VerifyConnectionResult, VerifyConnectionResultResponse, } from "./models.js";
package/dist/models.d.ts CHANGED
@@ -1,76 +1,9 @@
1
- export interface AvailabilityBookingInput {
2
- agency: string;
3
- authorizationService?: string;
4
- contract: string;
5
- /**
6
- * Deprecated: use `startsAt`. Answered until 2027-01-28.
7
- *
8
- * @deprecated
9
- */
10
- date: Temporal.PlainDate;
11
- fonoGroup?: string;
12
- intent?: string;
13
- medicName: string;
14
- modality?: string;
15
- pairWithNext?: boolean;
16
- patientAgeMonths?: string;
17
- professionalChangeConfirmed?: boolean;
18
- sala?: string;
19
- service: string;
20
- specialty?: string;
21
- /**
22
- * The slot's moment, with the clinic's offset: book it with this value.
23
- */
24
- startsAt?: Temporal.Instant;
25
- /**
26
- * Deprecated: use `startsAt`. Answered until 2027-01-28.
27
- *
28
- * @deprecated
29
- */
30
- time: string;
31
- toGroup?: string;
32
- }
33
- /**
34
- * A failed answer.
35
- */
36
- export interface CancelAppointmentBadGatewayError {
37
- data: null;
38
- error: CancelAppointmentBadGatewayFailure;
39
- /**
40
- * What every answer carries besides its data or error.
41
- */
42
- metadata: ResponseMetadata;
43
- success: false;
44
- }
45
- export type CancelAppointmentBadGatewayFailure = OutcomeUnknownFailure | ProviderUnavailableFailure;
46
1
  export interface Connection {
47
2
  id: string;
48
3
  name: string;
49
4
  status: "active" | "disabled" | "failed" | "not_configured";
50
5
  verifiedAt: Temporal.Instant | null;
51
6
  }
52
- /**
53
- * The organization has no active Visoft connection for this call; an
54
- * administrator connects Visoft in Account.
55
- */
56
- export interface ConnectionNotConfiguredFailure {
57
- /**
58
- * The failure code, stable across releases.
59
- */
60
- code: "CONNECTION_NOT_CONFIGURED";
61
- /**
62
- * No fields.
63
- */
64
- data: Empty;
65
- /**
66
- * What went wrong, for people; it never contains input values.
67
- */
68
- message: string;
69
- /**
70
- * Whether repeating the same request may succeed.
71
- */
72
- retryable: false;
73
- }
74
7
  /**
75
8
  * A failed answer.
76
9
  */
@@ -145,57 +78,6 @@ export interface ConnectionResponse {
145
78
  metadata: ResponseMetadata;
146
79
  success: true;
147
80
  }
148
- /**
149
- * A failed answer.
150
- */
151
- export interface CreateAppointmentBadGatewayError {
152
- data: null;
153
- error: CreateAppointmentBadGatewayFailure;
154
- /**
155
- * What every answer carries besides its data or error.
156
- */
157
- metadata: ResponseMetadata;
158
- success: false;
159
- }
160
- export type CreateAppointmentBadGatewayFailure = OutcomeUnknownFailure | ProviderUnavailableFailure;
161
- /**
162
- * A failed answer.
163
- */
164
- export interface CredentialsRejectedError {
165
- data: null;
166
- /**
167
- * The clinical system rejected the username or password, or the user is
168
- * blocked.
169
- */
170
- error: CredentialsRejectedFailure;
171
- /**
172
- * What every answer carries besides its data or error.
173
- */
174
- metadata: ResponseMetadata;
175
- success: false;
176
- }
177
- /**
178
- * The clinical system rejected the username or password, or the user is
179
- * blocked.
180
- */
181
- export interface CredentialsRejectedFailure {
182
- /**
183
- * The failure code, stable across releases.
184
- */
185
- code: "CREDENTIALS_REJECTED";
186
- /**
187
- * No fields.
188
- */
189
- data: Empty;
190
- /**
191
- * What went wrong, for people; it never contains input values.
192
- */
193
- message: string;
194
- /**
195
- * Whether repeating the same request may succeed.
196
- */
197
- retryable: false;
198
- }
199
81
  export interface DeletedObject {
200
82
  deleted: true;
201
83
  /**
@@ -349,84 +231,6 @@ export interface InvalidInputFailure {
349
231
  export interface InvalidInputFailureData {
350
232
  issues?: ValidationIssue[];
351
233
  }
352
- /**
353
- * A failed answer.
354
- */
355
- export interface ListAvailabilityUnprocessableContentError {
356
- data: null;
357
- error: ListAvailabilityUnprocessableContentFailure;
358
- /**
359
- * What every answer carries besides its data or error.
360
- */
361
- metadata: ResponseMetadata;
362
- success: false;
363
- }
364
- export type ListAvailabilityUnprocessableContentFailure = CredentialsRejectedFailure | ToolRefusedFailure;
365
- /**
366
- * A failed answer.
367
- */
368
- export interface ListContractsBadGatewayError {
369
- data: null;
370
- error: ListContractsBadGatewayFailure;
371
- /**
372
- * What every answer carries besides its data or error.
373
- */
374
- metadata: ResponseMetadata;
375
- success: false;
376
- }
377
- export type ListContractsBadGatewayFailure = OutcomeUnknownFailure | ProviderUnavailableFailure;
378
- /**
379
- * A failed answer.
380
- */
381
- export interface ListContractsUnprocessableContentError {
382
- data: null;
383
- error: ListContractsUnprocessableContentFailure;
384
- /**
385
- * What every answer carries besides its data or error.
386
- */
387
- metadata: ResponseMetadata;
388
- success: false;
389
- }
390
- export type ListContractsUnprocessableContentFailure = CredentialsRejectedFailure | ToolRefusedFailure;
391
- /**
392
- * A failed answer.
393
- */
394
- export interface ListServicesBadGatewayError {
395
- data: null;
396
- error: ListServicesBadGatewayFailure;
397
- /**
398
- * What every answer carries besides its data or error.
399
- */
400
- metadata: ResponseMetadata;
401
- success: false;
402
- }
403
- export type ListServicesBadGatewayFailure = OutcomeUnknownFailure | ProviderUnavailableFailure;
404
- /**
405
- * A failed answer.
406
- */
407
- export interface ListServicesUnprocessableContentError {
408
- data: null;
409
- error: ListServicesUnprocessableContentFailure;
410
- /**
411
- * What every answer carries besides its data or error.
412
- */
413
- metadata: ResponseMetadata;
414
- success: false;
415
- }
416
- export type ListServicesUnprocessableContentFailure = CredentialsRejectedFailure | ToolRefusedFailure;
417
- /**
418
- * A failed answer.
419
- */
420
- export interface LookupPatientBadGatewayError {
421
- data: null;
422
- error: LookupPatientBadGatewayFailure;
423
- /**
424
- * What every answer carries besides its data or error.
425
- */
426
- metadata: ResponseMetadata;
427
- success: false;
428
- }
429
- export type LookupPatientBadGatewayFailure = OutcomeUnknownFailure | ProviderUnavailableFailure;
430
234
  /**
431
235
  * A failed answer.
432
236
  */
@@ -481,27 +285,6 @@ export interface PageInfo {
481
285
  */
482
286
  previousCursor: string | null;
483
287
  }
484
- /**
485
- * The clinical system did not answer or could not complete the request.
486
- */
487
- export interface ProviderUnavailableFailure {
488
- /**
489
- * The failure code, stable across releases.
490
- */
491
- code: "PROVIDER_UNAVAILABLE";
492
- /**
493
- * No fields.
494
- */
495
- data: Empty;
496
- /**
497
- * What went wrong, for people; it never contains input values.
498
- */
499
- message: string;
500
- /**
501
- * Whether repeating the same request may succeed.
502
- */
503
- retryable: true;
504
- }
505
288
  /**
506
289
  * A failed answer.
507
290
  */
@@ -583,70 +366,6 @@ export interface ResponseMetadata {
583
366
  */
584
367
  requestId: string;
585
368
  }
586
- /**
587
- * The clinic's rules did not answer the request as asked: data.reason says why
588
- * and data.guidance what to do next. Nothing was changed.
589
- */
590
- export interface ToolRefusedFailure {
591
- /**
592
- * The failure code, stable across releases.
593
- */
594
- code: "TOOL_REFUSED";
595
- data: ToolRefusedFailureData;
596
- /**
597
- * What went wrong, for people; it never contains input values.
598
- */
599
- message: string;
600
- /**
601
- * Whether repeating the same request may succeed.
602
- */
603
- retryable: false;
604
- }
605
- export interface ToolRefusedFailureData {
606
- /**
607
- * What was refused, in English, for logs and people.
608
- */
609
- detail: string;
610
- /**
611
- * What the refusal offers to continue (suggested names, accepted values,
612
- * missing fields), as the guidance names it.
613
- */
614
- details: {
615
- [key: string]: unknown;
616
- };
617
- /**
618
- * What an Agent does next, in the language it speaks to the person.
619
- */
620
- guidance?: string;
621
- /**
622
- * Why, as a stable code: CONTRACT_NOT_FOUND, MISSING_ARGUMENT,
623
- * NO_AVAILABILITY…
624
- */
625
- reason: string;
626
- /**
627
- * A sentence an Agent may say to the person as it is.
628
- */
629
- say?: string;
630
- }
631
- export type ToolResult = {
632
- [key: string]: unknown;
633
- };
634
- /**
635
- * A successful answer.
636
- */
637
- export interface ToolResultResponse {
638
- /**
639
- * The tool's clinical answer. ok:false is a conversational refusal the Agent
640
- * reads (error, errorCode, ai_hint), not a failure.
641
- */
642
- data: ToolResult;
643
- error: null;
644
- /**
645
- * What every answer carries besides its data or error.
646
- */
647
- metadata: ResponseMetadata;
648
- success: true;
649
- }
650
369
  /**
651
370
  * A failed answer.
652
371
  */
@@ -818,7 +537,6 @@ export interface VerifyConnectionResultResponse {
818
537
  metadata: ResponseMetadata;
819
538
  success: true;
820
539
  }
821
- export declare const AvailabilityBookingInputCodec: import("./_/codec.js").Codec;
822
540
  export declare const ConnectionCodec: import("./_/codec.js").Codec;
823
541
  export declare const ConnectionPageCodec: import("./_/codec.js").Codec;
824
542
  export declare const ConnectionPageResponseCodec: import("./_/codec.js").Codec;
package/dist/models.js CHANGED
@@ -1,10 +1,6 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { array, date, instant, object } from "./_/index.js";
4
- export const AvailabilityBookingInputCodec = object([
5
- ["date", null, date],
6
- ["startsAt", null, instant],
7
- ]);
3
+ import { array, instant, object } from "./_/index.js";
8
4
  export const ConnectionCodec = object([
9
5
  ["verifiedAt", null, instant],
10
6
  ]);
@@ -27,14 +27,14 @@ export interface Client {
27
27
  *
28
28
  * Count the conversations `list_conversations` returns for the same filters
29
29
  * (every filter it takes, without `sort`), up to 10,000: `capped` then says
30
- * at least that many match. `averageMessageCount` is their average length.
31
- * `groupBy` also divides them, largest group first, each with its outcomes:
32
- * by `outcome`, `status`, `channel`, `agent`, `sentiment`, `tool` (which
33
- * Agent tools they used, and in how many a tool failed), `toolError` (why
34
- * calls of `toolName` failed) or `fact:<definition key>` (such as the reason
35
- * for contact). Use it to answer how many conversations match, or how they
36
- * divide, instead of paging through the list; for volumes per day use
37
- * `get_report`.
30
+ * at least that many match. `averageMessageCount` and
31
+ * `averageDurationSeconds` are their average length. `groupBy` also divides
32
+ * them, largest group first, each with its outcomes: by `outcome`, `status`,
33
+ * `channel`, `agent`, `sentiment`, `tool` (which Agent tools they used, and
34
+ * in how many a tool failed), `toolError` (why calls of `toolName` failed) or
35
+ * `fact:<definition key>` (such as the reason for contact). Use it to answer
36
+ * how many conversations match, or how they divide, instead of paging through
37
+ * the list; for volumes per day use `get_report`.
38
38
  */
39
39
  count(request?: CountRequest, options?: RequestOptions): Promise<CountResponse>;
40
40
  /**
@@ -70,7 +70,8 @@ export interface Client {
70
70
  * the AI), `worker` (`ai` or `team`: who answers it now), the Agent's tools
71
71
  * (`toolName`, `toolStatus`: which tool it called and how the call ended), a
72
72
  * captured fact (`factDefinition`, `factValue`), `assessment` (`failed` or
73
- * `passed`), length (`messagesMin`, `messagesMax`, `durationMin`,
73
+ * `passed`), `toReview` (what needs a person's look: not resolved, or handed
74
+ * to the team), length (`messagesMin`, `messagesMax`, `durationMin`,
74
75
  * `durationMax`), `campaignId`, `profileId`, `requestedBy` and start time
75
76
  * (`startedAfter`, `startedBefore`); `q` searches participant identities
76
77
  * (names, profile names, usernames, phones, emails and documents), visible
@@ -210,6 +211,12 @@ export interface CountRequest {
210
211
  */
211
212
  startedBefore?: Temporal.Instant;
212
213
  status?: "open" | "closed";
214
+ /**
215
+ * Started today or in the last 7, 30, 90 or 365 days including today,
216
+ * counting days in the organization's time zone as `get_report` does. A saved
217
+ * view keeps its period this way, so it moves with the calendar.
218
+ */
219
+ period?: "today" | "7d" | "30d" | "90d" | "365d";
213
220
  /**
214
221
  * Comma-separated sentiments of the analysis.
215
222
  */
@@ -241,6 +248,12 @@ export interface CountRequest {
241
248
  * `passed`, at least one answered and every answered one yes.
242
249
  */
243
250
  assessment?: "failed" | "passed";
251
+ /**
252
+ * `true`: conversations to review, as `get_report` counts them in
253
+ * `toReviewCount`: the analysis says the request was not resolved, or the AI
254
+ * handed the conversation to the team. `false`: the others.
255
+ */
256
+ toReview?: boolean;
244
257
  /**
245
258
  * At least this many messages.
246
259
  */
@@ -419,6 +432,12 @@ export interface ListRequest {
419
432
  */
420
433
  startedBefore?: Temporal.Instant;
421
434
  status?: "open" | "closed";
435
+ /**
436
+ * Started today or in the last 7, 30, 90 or 365 days including today,
437
+ * counting days in the organization's time zone as `get_report` does. A saved
438
+ * view keeps its period this way, so it moves with the calendar.
439
+ */
440
+ period?: "today" | "7d" | "30d" | "90d" | "365d";
422
441
  /**
423
442
  * Comma-separated sentiments of the analysis.
424
443
  */
@@ -450,6 +469,12 @@ export interface ListRequest {
450
469
  * `passed`, at least one answered and every answered one yes.
451
470
  */
452
471
  assessment?: "failed" | "passed";
472
+ /**
473
+ * `true`: conversations to review, as `get_report` counts them in
474
+ * `toReviewCount`: the analysis says the request was not resolved, or the AI
475
+ * handed the conversation to the team. `false`: the others.
476
+ */
477
+ toReview?: boolean;
453
478
  /**
454
479
  * At least this many messages.
455
480
  */
@@ -25,7 +25,7 @@ const ContinueOperation = {
25
25
  const CountOperation = {
26
26
  method: "GET",
27
27
  route: "/v1/raiz/conversations/count",
28
- query: { agentId: "agentId", campaignId: "campaignId", channelId: "channelId", channelType: "channelType", contactId: "contactId", conversationDirection: "conversationDirection", handling: "handling", worker: "worker", origin: "origin", outcome: "outcome", metadataReference: "metadataReference", profileId: "profileId", q: "q", requestedBy: "requestedBy", startedAfter: "startedAfter", startedBefore: "startedBefore", status: "status", sentiment: "sentiment", toolName: "toolName", toolStatus: "toolStatus", factDefinition: "factDefinition", factValue: "factValue", assessment: "assessment", messagesMin: "messagesMin", messagesMax: "messagesMax", durationMin: "durationMin", durationMax: "durationMax", groupBy: "groupBy" },
28
+ query: { agentId: "agentId", campaignId: "campaignId", channelId: "channelId", channelType: "channelType", contactId: "contactId", conversationDirection: "conversationDirection", handling: "handling", worker: "worker", origin: "origin", outcome: "outcome", metadataReference: "metadataReference", profileId: "profileId", q: "q", requestedBy: "requestedBy", startedAfter: "startedAfter", startedBefore: "startedBefore", status: "status", period: "period", sentiment: "sentiment", toolName: "toolName", toolStatus: "toolStatus", factDefinition: "factDefinition", factValue: "factValue", assessment: "assessment", toReview: "toReview", messagesMin: "messagesMin", messagesMax: "messagesMax", durationMin: "durationMin", durationMax: "durationMax", groupBy: "groupBy" },
29
29
  response: null,
30
30
  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 },
31
31
  };
@@ -46,7 +46,7 @@ const GetOperation = {
46
46
  const ListOperation = {
47
47
  method: "GET",
48
48
  route: "/v1/raiz/conversations",
49
- query: { cursor: "cursor", direction: "direction", limit: "limit", agentId: "agentId", campaignId: "campaignId", channelId: "channelId", channelType: "channelType", contactId: "contactId", conversationDirection: "conversationDirection", handling: "handling", worker: "worker", origin: "origin", outcome: "outcome", metadataReference: "metadataReference", profileId: "profileId", q: "q", requestedBy: "requestedBy", startedAfter: "startedAfter", startedBefore: "startedBefore", status: "status", sentiment: "sentiment", toolName: "toolName", toolStatus: "toolStatus", factDefinition: "factDefinition", factValue: "factValue", assessment: "assessment", messagesMin: "messagesMin", messagesMax: "messagesMax", durationMin: "durationMin", durationMax: "durationMax", sort: "sort" },
49
+ query: { cursor: "cursor", direction: "direction", limit: "limit", agentId: "agentId", campaignId: "campaignId", channelId: "channelId", channelType: "channelType", contactId: "contactId", conversationDirection: "conversationDirection", handling: "handling", worker: "worker", origin: "origin", outcome: "outcome", metadataReference: "metadataReference", profileId: "profileId", q: "q", requestedBy: "requestedBy", startedAfter: "startedAfter", startedBefore: "startedBefore", status: "status", period: "period", sentiment: "sentiment", toolName: "toolName", toolStatus: "toolStatus", factDefinition: "factDefinition", factValue: "factValue", assessment: "assessment", toReview: "toReview", messagesMin: "messagesMin", messagesMax: "messagesMax", durationMin: "durationMin", durationMax: "durationMax", sort: "sort" },
50
50
  response: object([["data", null, () => RaizConversationPageCodec]]),
51
51
  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 },
52
52
  };
@@ -116,6 +116,7 @@ export interface RaizConversation {
116
116
  workers: RaizConversationWorker[];
117
117
  }
118
118
  export interface RaizConversationCount {
119
+ averageDurationSeconds: number | null;
119
120
  averageMessageCount: number | null;
120
121
  /**
121
122
  * True when the count reached 10000: at least that many match.
@@ -143,6 +144,8 @@ export interface RaizConversationDiagnostics {
143
144
  terminationReasonPresent: boolean;
144
145
  }
145
146
  export interface RaizConversationGroup {
147
+ averageDurationSeconds: number | null;
148
+ averageMessageCount: number | null;
146
149
  /**
147
150
  * Conversations in the group.
148
151
  */
@@ -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, CancelRequest, CancelResponse, CreateRequest, CreateResponse, } from "./client.js";
5
- export type { VisoftAppointmentNotCancellableFailure, VisoftAppointmentReferenceInvalidFailure, VisoftAppointmentRequestExistsFailure, VisoftAppointmentRequestExistsFailureData, VisoftBooking, VisoftBookingRefusedFailure, VisoftBookingRefusedFailureData, VisoftBookingResponse, VisoftCancelAppointmentBody, VisoftCancelAppointmentConflictError, VisoftCancelAppointmentConflictFailure, VisoftCancelAppointmentUnprocessableContentError, VisoftCancelAppointmentUnprocessableContentFailure, VisoftCancelNoticeRequiredFailure, VisoftCancelTimeUnverifiedFailure, VisoftCancellation, VisoftCancellationRefusedFailure, VisoftCancellationRefusedFailureData, VisoftCancellationResponse, VisoftCreateAppointmentBody, VisoftCreateAppointmentConflictError, VisoftCreateAppointmentConflictFailure, VisoftCreateAppointmentUnprocessableContentError, VisoftCreateAppointmentUnprocessableContentFailure, } from "./models.js";
5
+ export type { VisoftAppointmentNotCancellableFailure, VisoftAppointmentReferenceInvalidFailure, VisoftAppointmentRequestExistsFailure, VisoftAppointmentRequestExistsFailureData, VisoftBooking, VisoftBookingRefusedFailure, VisoftBookingRefusedFailureData, VisoftBookingResponse, VisoftCancelAppointmentBadGatewayError, VisoftCancelAppointmentBadGatewayFailure, VisoftCancelAppointmentBody, VisoftCancelAppointmentConflictError, VisoftCancelAppointmentConflictFailure, VisoftCancelAppointmentUnprocessableContentError, VisoftCancelAppointmentUnprocessableContentFailure, VisoftCancelNoticeRequiredFailure, VisoftCancelTimeUnverifiedFailure, VisoftCancellation, VisoftCancellationRefusedFailure, VisoftCancellationRefusedFailureData, VisoftCancellationResponse, VisoftCreateAppointmentBadGatewayError, VisoftCreateAppointmentBadGatewayFailure, VisoftCreateAppointmentBody, VisoftCreateAppointmentConflictError, VisoftCreateAppointmentConflictFailure, VisoftCreateAppointmentUnprocessableContentError, VisoftCreateAppointmentUnprocessableContentFailure, } from "./models.js";
@@ -1,5 +1,5 @@
1
- import type { ConnectionNotConfiguredFailure, CredentialsRejectedFailure, Empty, ResponseMetadata } from "../../models.js";
2
- import type { VisoftAgencyNotServedFailure } from "../models.js";
1
+ import type { Empty, OutcomeUnknownFailure, ResponseMetadata } from "../../models.js";
2
+ import type { VisoftAgencyNotServedFailure, VisoftConnectionNotConfiguredFailure, VisoftCredentialsRejectedFailure, VisoftProviderUnavailableFailure } from "../models.js";
3
3
  /**
4
4
  * The appointment is no longer cancellable in the patient's current agenda;
5
5
  * read the patient again. Nothing was cancelled.
@@ -132,6 +132,19 @@ export interface VisoftBookingResponse {
132
132
  metadata: ResponseMetadata;
133
133
  success: true;
134
134
  }
135
+ /**
136
+ * A failed answer.
137
+ */
138
+ export interface VisoftCancelAppointmentBadGatewayError {
139
+ data: null;
140
+ error: VisoftCancelAppointmentBadGatewayFailure;
141
+ /**
142
+ * What every answer carries besides its data or error.
143
+ */
144
+ metadata: ResponseMetadata;
145
+ success: false;
146
+ }
147
+ export type VisoftCancelAppointmentBadGatewayFailure = OutcomeUnknownFailure | VisoftProviderUnavailableFailure;
135
148
  export interface VisoftCancelAppointmentBody {
136
149
  /**
137
150
  * The connection to run on. Optional when the organization has one Visoft
@@ -186,7 +199,7 @@ export interface VisoftCancelAppointmentConflictError {
186
199
  metadata: ResponseMetadata;
187
200
  success: false;
188
201
  }
189
- export type VisoftCancelAppointmentConflictFailure = ConnectionNotConfiguredFailure | VisoftAppointmentNotCancellableFailure | VisoftCancelNoticeRequiredFailure | VisoftCancelTimeUnverifiedFailure;
202
+ export type VisoftCancelAppointmentConflictFailure = VisoftConnectionNotConfiguredFailure | VisoftAppointmentNotCancellableFailure | VisoftCancelNoticeRequiredFailure | VisoftCancelTimeUnverifiedFailure;
190
203
  /**
191
204
  * A failed answer.
192
205
  */
@@ -199,7 +212,7 @@ export interface VisoftCancelAppointmentUnprocessableContentError {
199
212
  metadata: ResponseMetadata;
200
213
  success: false;
201
214
  }
202
- export type VisoftCancelAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | VisoftAgencyNotServedFailure | VisoftAppointmentReferenceInvalidFailure | VisoftCancellationRefusedFailure;
215
+ export type VisoftCancelAppointmentUnprocessableContentFailure = VisoftCredentialsRejectedFailure | VisoftAgencyNotServedFailure | VisoftAppointmentReferenceInvalidFailure | VisoftCancellationRefusedFailure;
203
216
  /**
204
217
  * The appointment starts sooner than the minimum notice the call asked for.
205
218
  * Nothing was cancelled.
@@ -298,6 +311,19 @@ export interface VisoftCancellationResponse {
298
311
  metadata: ResponseMetadata;
299
312
  success: true;
300
313
  }
314
+ /**
315
+ * A failed answer.
316
+ */
317
+ export interface VisoftCreateAppointmentBadGatewayError {
318
+ data: null;
319
+ error: VisoftCreateAppointmentBadGatewayFailure;
320
+ /**
321
+ * What every answer carries besides its data or error.
322
+ */
323
+ metadata: ResponseMetadata;
324
+ success: false;
325
+ }
326
+ export type VisoftCreateAppointmentBadGatewayFailure = OutcomeUnknownFailure | VisoftProviderUnavailableFailure;
301
327
  export interface VisoftCreateAppointmentBody {
302
328
  /**
303
329
  * The connection to run on. Optional when the organization has one Visoft
@@ -347,7 +373,7 @@ export interface VisoftCreateAppointmentConflictError {
347
373
  metadata: ResponseMetadata;
348
374
  success: false;
349
375
  }
350
- export type VisoftCreateAppointmentConflictFailure = ConnectionNotConfiguredFailure | VisoftAppointmentRequestExistsFailure;
376
+ export type VisoftCreateAppointmentConflictFailure = VisoftConnectionNotConfiguredFailure | VisoftAppointmentRequestExistsFailure;
351
377
  /**
352
378
  * A failed answer.
353
379
  */
@@ -360,7 +386,7 @@ export interface VisoftCreateAppointmentUnprocessableContentError {
360
386
  metadata: ResponseMetadata;
361
387
  success: false;
362
388
  }
363
- export type VisoftCreateAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | VisoftAgencyNotServedFailure | VisoftBookingRefusedFailure;
389
+ export type VisoftCreateAppointmentUnprocessableContentFailure = VisoftCredentialsRejectedFailure | VisoftAgencyNotServedFailure | VisoftBookingRefusedFailure;
364
390
  export declare const VisoftBookingCodec: import("../../_/codec.js").Codec;
365
391
  export declare const VisoftBookingResponseCodec: import("../../_/codec.js").Codec;
366
392
  export declare const VisoftCancellationCodec: import("../../_/codec.js").Codec;