@arbol-ai/sdk 5.26.0 → 5.28.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.
- package/README.md +4 -4
- package/dist/agenda/models.d.ts +105 -0
- package/dist/client.d.ts +0 -4
- package/dist/client.js +0 -10
- package/dist/index.d.ts +1 -1
- package/dist/models.d.ts +0 -282
- package/dist/models.js +1 -5
- package/dist/raiz/conversations/client.d.ts +4 -3
- package/dist/raiz/organization/client.d.ts +11 -4
- package/dist/raiz/organization/models.d.ts +6 -0
- package/dist/visoft/appointments/index.d.ts +1 -1
- package/dist/visoft/appointments/models.d.ts +32 -6
- package/dist/visoft/availability/models.d.ts +4 -4
- package/dist/visoft/contracts/index.d.ts +1 -1
- package/dist/visoft/contracts/models.d.ts +16 -3
- package/dist/visoft/index.d.ts +1 -1
- package/dist/visoft/models.d.ts +67 -2
- package/dist/visoft/patients/index.d.ts +1 -1
- package/dist/visoft/patients/models.d.ts +35 -6
- package/dist/visoft/professionals/models.d.ts +4 -4
- package/dist/visoft/serviceCatalogs/models.d.ts +4 -4
- package/dist/visoft/services/index.d.ts +1 -1
- package/dist/visoft/services/models.d.ts +16 -3
- package/package.json +3 -3
- package/dist/orsovision/agencies/client.d.ts +0 -51
- package/dist/orsovision/agencies/client.js +0 -18
- package/dist/orsovision/agencies/index.d.ts +0 -5
- package/dist/orsovision/agencies/index.js +0 -4
- package/dist/orsovision/agencies/models.d.ts +0 -107
- package/dist/orsovision/agencies/models.js +0 -3
- package/dist/orsovision/appointments/client.d.ts +0 -39
- package/dist/orsovision/appointments/client.js +0 -29
- package/dist/orsovision/appointments/index.d.ts +0 -5
- package/dist/orsovision/appointments/index.js +0 -4
- package/dist/orsovision/appointments/models.d.ts +0 -182
- package/dist/orsovision/appointments/models.js +0 -9
- package/dist/orsovision/availability/client.d.ts +0 -32
- package/dist/orsovision/availability/client.js +0 -19
- package/dist/orsovision/availability/index.d.ts +0 -5
- package/dist/orsovision/availability/index.js +0 -4
- package/dist/orsovision/availability/models.d.ts +0 -228
- package/dist/orsovision/availability/models.js +0 -15
- package/dist/orsovision/client.d.ts +0 -27
- package/dist/orsovision/client.js +0 -50
- package/dist/orsovision/clinic/client.d.ts +0 -34
- package/dist/orsovision/clinic/client.js +0 -18
- package/dist/orsovision/clinic/index.d.ts +0 -5
- package/dist/orsovision/clinic/index.js +0 -4
- package/dist/orsovision/clinic/models.d.ts +0 -90
- package/dist/orsovision/clinic/models.js +0 -3
- package/dist/orsovision/contracts/client.d.ts +0 -69
- package/dist/orsovision/contracts/client.js +0 -18
- package/dist/orsovision/contracts/index.d.ts +0 -5
- package/dist/orsovision/contracts/index.js +0 -4
- package/dist/orsovision/contracts/models.d.ts +0 -84
- package/dist/orsovision/contracts/models.js +0 -3
- package/dist/orsovision/index.d.ts +0 -5
- package/dist/orsovision/index.js +0 -4
- package/dist/orsovision/models.d.ts +0 -66
- package/dist/orsovision/models.js +0 -3
- package/dist/orsovision/patients/client.d.ts +0 -52
- package/dist/orsovision/patients/client.js +0 -34
- package/dist/orsovision/patients/index.d.ts +0 -5
- package/dist/orsovision/patients/index.js +0 -4
- package/dist/orsovision/patients/models.d.ts +0 -287
- package/dist/orsovision/patients/models.js +0 -3
- package/dist/orsovision/services/client.d.ts +0 -74
- package/dist/orsovision/services/client.js +0 -18
- package/dist/orsovision/services/index.d.ts +0 -5
- package/dist/orsovision/services/index.js +0 -4
- package/dist/orsovision/services/models.d.ts +0 -81
- package/dist/orsovision/services/models.js +0 -3
- package/dist/orsovision/tools/client.d.ts +0 -44
- package/dist/orsovision/tools/client.js +0 -18
- package/dist/orsovision/tools/index.d.ts +0 -5
- package/dist/orsovision/tools/index.js +0 -4
- package/dist/orsovision/tools/models.d.ts +0 -102
- package/dist/orsovision/tools/models.js +0 -3
- package/dist/somos/appointments/client.d.ts +0 -40
- package/dist/somos/appointments/client.js +0 -29
- package/dist/somos/appointments/index.d.ts +0 -5
- package/dist/somos/appointments/index.js +0 -4
- package/dist/somos/appointments/models.d.ts +0 -303
- package/dist/somos/appointments/models.js +0 -9
- package/dist/somos/availability/client.d.ts +0 -33
- package/dist/somos/availability/client.js +0 -19
- package/dist/somos/availability/index.d.ts +0 -5
- package/dist/somos/availability/index.js +0 -4
- package/dist/somos/availability/models.d.ts +0 -338
- package/dist/somos/availability/models.js +0 -15
- package/dist/somos/client.d.ts +0 -29
- package/dist/somos/client.js +0 -55
- package/dist/somos/clinic/client.d.ts +0 -33
- package/dist/somos/clinic/client.js +0 -18
- package/dist/somos/clinic/index.d.ts +0 -5
- package/dist/somos/clinic/index.js +0 -4
- package/dist/somos/clinic/models.d.ts +0 -90
- package/dist/somos/clinic/models.js +0 -3
- package/dist/somos/contracts/client.d.ts +0 -74
- package/dist/somos/contracts/client.js +0 -18
- package/dist/somos/contracts/index.d.ts +0 -5
- package/dist/somos/contracts/index.js +0 -4
- package/dist/somos/contracts/models.d.ts +0 -96
- package/dist/somos/contracts/models.js +0 -3
- package/dist/somos/groups/client.d.ts +0 -67
- package/dist/somos/groups/client.js +0 -18
- package/dist/somos/groups/index.d.ts +0 -5
- package/dist/somos/groups/index.js +0 -4
- package/dist/somos/groups/models.d.ts +0 -117
- package/dist/somos/groups/models.js +0 -3
- package/dist/somos/index.d.ts +0 -5
- package/dist/somos/index.js +0 -4
- package/dist/somos/models.d.ts +0 -88
- package/dist/somos/models.js +0 -3
- package/dist/somos/patients/client.d.ts +0 -51
- package/dist/somos/patients/client.js +0 -34
- package/dist/somos/patients/index.d.ts +0 -5
- package/dist/somos/patients/index.js +0 -4
- package/dist/somos/patients/models.d.ts +0 -330
- package/dist/somos/patients/models.js +0 -3
- package/dist/somos/services/client.d.ts +0 -116
- package/dist/somos/services/client.js +0 -26
- package/dist/somos/services/index.d.ts +0 -5
- package/dist/somos/services/index.js +0 -4
- package/dist/somos/services/models.d.ts +0 -261
- package/dist/somos/services/models.js +0 -3
- package/dist/somos/specialtyRules/client.d.ts +0 -44
- package/dist/somos/specialtyRules/client.js +0 -18
- package/dist/somos/specialtyRules/index.d.ts +0 -5
- package/dist/somos/specialtyRules/index.js +0 -4
- package/dist/somos/specialtyRules/models.d.ts +0 -54
- package/dist/somos/specialtyRules/models.js +0 -3
- package/dist/somos/tools/client.d.ts +0 -44
- package/dist/somos/tools/client.js +0 -18
- package/dist/somos/tools/index.d.ts +0 -5
- package/dist/somos/tools/index.js +0 -4
- package/dist/somos/tools/models.d.ts +0 -102
- 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/
|
|
33
|
-
import type { AccountCurrentOrganization } from '@arbol-ai/sdk/account/
|
|
32
|
+
import { createClient } from '@arbol-ai/sdk/account/organization';
|
|
33
|
+
import type { AccountCurrentOrganization } from '@arbol-ai/sdk/account/organization';
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
const organization = createClient({ baseUrl: 'https://api.getarbol.com', token });
|
|
36
36
|
|
|
37
|
-
const { data } = await
|
|
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/agenda/models.d.ts
CHANGED
|
@@ -839,6 +839,111 @@ export interface AgendaFailureResponse {
|
|
|
839
839
|
};
|
|
840
840
|
message: "The integration service rejected this request. Review its configuration.";
|
|
841
841
|
retryable: false;
|
|
842
|
+
} | {
|
|
843
|
+
code: "FOLLOWUP_SETTINGS_VERSION_MISMATCH";
|
|
844
|
+
data: {
|
|
845
|
+
[key: string]: unknown;
|
|
846
|
+
};
|
|
847
|
+
message: "Follow-up email settings changed; reload before saving.";
|
|
848
|
+
retryable: false;
|
|
849
|
+
} | {
|
|
850
|
+
code: "FOLLOWUP_DISABLED";
|
|
851
|
+
data: {
|
|
852
|
+
[key: string]: unknown;
|
|
853
|
+
};
|
|
854
|
+
message: "Turn this follow-up email on in the notification settings first.";
|
|
855
|
+
retryable: false;
|
|
856
|
+
} | {
|
|
857
|
+
code: "FOLLOWUP_CONSENT_REQUIRED";
|
|
858
|
+
data: {
|
|
859
|
+
[key: string]: unknown;
|
|
860
|
+
};
|
|
861
|
+
message: "The patient has not consented to this follow-up email for their current address.";
|
|
862
|
+
retryable: false;
|
|
863
|
+
} | {
|
|
864
|
+
code: "PATIENT_EMAIL_REQUIRED";
|
|
865
|
+
data: {
|
|
866
|
+
[key: string]: unknown;
|
|
867
|
+
};
|
|
868
|
+
message: "Record the patient's email before this action.";
|
|
869
|
+
retryable: false;
|
|
870
|
+
} | {
|
|
871
|
+
code: "PATIENT_ARCHIVED";
|
|
872
|
+
data: {
|
|
873
|
+
[key: string]: unknown;
|
|
874
|
+
};
|
|
875
|
+
message: "Restore the patient before this action.";
|
|
876
|
+
retryable: false;
|
|
877
|
+
} | {
|
|
878
|
+
code: "RECALL_ALREADY_ACTIVE";
|
|
879
|
+
data: {
|
|
880
|
+
[key: string]: unknown;
|
|
881
|
+
};
|
|
882
|
+
message: "The patient already has an active recall for this service.";
|
|
883
|
+
retryable: false;
|
|
884
|
+
} | {
|
|
885
|
+
code: "RECALL_MONTH_PASSED";
|
|
886
|
+
data: {
|
|
887
|
+
[key: string]: unknown;
|
|
888
|
+
};
|
|
889
|
+
message: "The recall's month has already passed.";
|
|
890
|
+
retryable: false;
|
|
891
|
+
} | {
|
|
892
|
+
code: "RECALL_VISIT_REQUIRED";
|
|
893
|
+
data: {
|
|
894
|
+
[key: string]: unknown;
|
|
895
|
+
};
|
|
896
|
+
message: "Enter the last visit: there is no attended appointment of this service for the patient.";
|
|
897
|
+
retryable: false;
|
|
898
|
+
} | {
|
|
899
|
+
code: "RECALL_VISIT_IN_FUTURE";
|
|
900
|
+
data: {
|
|
901
|
+
[key: string]: unknown;
|
|
902
|
+
};
|
|
903
|
+
message: "The last visit must be a past date.";
|
|
904
|
+
retryable: false;
|
|
905
|
+
} | {
|
|
906
|
+
code: "RECALL_VERSION_MISMATCH";
|
|
907
|
+
data: {
|
|
908
|
+
[key: string]: unknown;
|
|
909
|
+
};
|
|
910
|
+
message: "The recall changed after it was loaded.";
|
|
911
|
+
retryable: false;
|
|
912
|
+
} | {
|
|
913
|
+
code: "SLOT_OFFER_NOT_ALLOWED";
|
|
914
|
+
data: {
|
|
915
|
+
[key: string]: unknown;
|
|
916
|
+
};
|
|
917
|
+
message: "Only an open waiting-list entry of a registered patient can receive a slot offer.";
|
|
918
|
+
retryable: false;
|
|
919
|
+
} | {
|
|
920
|
+
code: "SLOT_OFFER_MISMATCH";
|
|
921
|
+
data: {
|
|
922
|
+
[key: string]: unknown;
|
|
923
|
+
};
|
|
924
|
+
message: "The slot belongs to another service or agenda than the entry asks for.";
|
|
925
|
+
retryable: false;
|
|
926
|
+
} | {
|
|
927
|
+
code: "SLOT_OFFER_TOO_SOON";
|
|
928
|
+
data: {
|
|
929
|
+
[key: string]: unknown;
|
|
930
|
+
};
|
|
931
|
+
message: "The slot starts too soon to hold it for the patient; offer a later one.";
|
|
932
|
+
retryable: false;
|
|
933
|
+
} | {
|
|
934
|
+
code: "SLOT_OFFER_ALREADY_OPEN";
|
|
935
|
+
data: {
|
|
936
|
+
[key: string]: unknown;
|
|
937
|
+
};
|
|
938
|
+
message: "This waiting-list entry already has an open slot offer.";
|
|
939
|
+
retryable: false;
|
|
940
|
+
} | {
|
|
941
|
+
code: "SLOT_OFFER_CLOSED";
|
|
942
|
+
data: {
|
|
943
|
+
[key: string]: unknown;
|
|
944
|
+
};
|
|
945
|
+
message: "The slot offer is no longer open.";
|
|
946
|
+
retryable: false;
|
|
842
947
|
});
|
|
843
948
|
metadata: AgendaResponseMetadata;
|
|
844
949
|
success: false;
|
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 {
|
|
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,
|
|
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
|
]);
|
|
@@ -272,9 +272,10 @@ export interface CountRequest {
|
|
|
272
272
|
durationMax?: number;
|
|
273
273
|
/**
|
|
274
274
|
* `outcome`, `status`, `channel` (type), `agent`, `sentiment`, `tool` (each
|
|
275
|
-
* Agent tool and the conversations that used it
|
|
276
|
-
* of `toolName` when given, by error) or
|
|
277
|
-
* value of that definition, such as the
|
|
275
|
+
* Agent tool and the conversations that used it; null for those that used
|
|
276
|
+
* none), `toolError` (failed calls, of `toolName` when given, by error) or
|
|
277
|
+
* `fact:<definition key>` (the current value of that definition, such as the
|
|
278
|
+
* reason for contact).
|
|
278
279
|
*/
|
|
279
280
|
groupBy?: string;
|
|
280
281
|
}
|
|
@@ -14,10 +14,11 @@ export interface Client {
|
|
|
14
14
|
* Read your organization: name, default language and time zone, deployment
|
|
15
15
|
* capabilities, and the settings in effect (defaults included), such as how
|
|
16
16
|
* many outbound calls may run at once, who is emailed when the AI escalates a
|
|
17
|
-
* conversation or fails in it
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* organization's
|
|
17
|
+
* conversation or fails in it and how often (each notice at once, or a digest
|
|
18
|
+
* every few hours), and the daily report. capabilities.managedVoiceOutbound
|
|
19
|
+
* reports whether the shared outbound line is configured;
|
|
20
|
+
* settings.channels.managedVoiceOutboundEnabled is the organization's
|
|
21
|
+
* separate permission to use it.
|
|
21
22
|
*/
|
|
22
23
|
get(request?: GetRequest, options?: RequestOptions): Promise<GetResponse>;
|
|
23
24
|
/**
|
|
@@ -93,9 +94,15 @@ export interface UpdateRequest {
|
|
|
93
94
|
escalations?: boolean | null;
|
|
94
95
|
failedOutcomes?: boolean | null;
|
|
95
96
|
failures?: boolean | null;
|
|
97
|
+
frequency?: "immediate" | "hourly" | "every3Hours" | "every6Hours" | "every12Hours" | null;
|
|
96
98
|
phones?: string[] | null;
|
|
97
99
|
recipients?: RaizEmailAddress[] | null;
|
|
98
100
|
};
|
|
101
|
+
productNotices?: {
|
|
102
|
+
administrators?: RaizEmailAddress[] | null;
|
|
103
|
+
events?: ("agent-idle" | "agent-live" | "budget-reached" | "budget-warning" | "campaign-finished" | "channel-disconnected" | "channel-limit" | "channel-quality" | "channel-restored" | "import-finished" | "knowledge-failed" | "milestone" | "monthly-summary" | "outage-resolved" | "template-approved" | "template-rejected" | "weekly-summary")[] | null;
|
|
104
|
+
recipients?: RaizEmailAddress[] | null;
|
|
105
|
+
};
|
|
99
106
|
whatsapp?: {
|
|
100
107
|
maxConcurrentReplies?: number | null;
|
|
101
108
|
};
|
|
@@ -31,9 +31,15 @@ export interface RaizOrganization {
|
|
|
31
31
|
escalations: boolean;
|
|
32
32
|
failedOutcomes: boolean;
|
|
33
33
|
failures: boolean;
|
|
34
|
+
frequency: "immediate" | "hourly" | "every3Hours" | "every6Hours" | "every12Hours";
|
|
34
35
|
phones: string[];
|
|
35
36
|
recipients: RaizEmailAddress[];
|
|
36
37
|
};
|
|
38
|
+
productNotices?: {
|
|
39
|
+
administrators: RaizEmailAddress[];
|
|
40
|
+
events: ("agent-idle" | "agent-live" | "budget-reached" | "budget-warning" | "campaign-finished" | "channel-disconnected" | "channel-limit" | "channel-quality" | "channel-restored" | "import-finished" | "knowledge-failed" | "milestone" | "monthly-summary" | "outage-resolved" | "template-approved" | "template-rejected" | "weekly-summary")[];
|
|
41
|
+
recipients: RaizEmailAddress[];
|
|
42
|
+
};
|
|
37
43
|
whatsapp: {
|
|
38
44
|
maxConcurrentReplies: number;
|
|
39
45
|
};
|
|
@@ -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";
|