@arbol-ai/sdk 2.15.0 → 2.16.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.
@@ -62,7 +62,7 @@ export interface AccountConnection {
62
62
  path: string;
63
63
  };
64
64
  rpcMethod?: string | null;
65
- runtimeInputs?: ("connectionId" | "channel")[];
65
+ runtimeInputs?: ("connectionId" | "channel" | "conversationUrl")[];
66
66
  writesThrough?: string[];
67
67
  }[];
68
68
  /**
@@ -11,10 +11,10 @@ export interface Client {
11
11
  /**
12
12
  * Invite someone to a product
13
13
  *
14
- * Invites someone not yet in the organization by email with a role in Raíz,
14
+ * Invites someone without an Arbol account by email with a role in Raíz,
15
15
  * Agenda, Ámbar or Account. The invitation email comes from the product's own
16
- * application, so its link opens that product. Someone already in the
17
- * organization is given the role with `members.create`.
16
+ * application. Existing accounts receive access with `members.create` and
17
+ * sign in with their current password.
18
18
  */
19
19
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
20
20
  /**
@@ -36,7 +36,7 @@ export declare function createClient(options: ClientOptions): Client;
36
36
  export declare function bind(transport: Transport): Client;
37
37
  export interface CreateRequest {
38
38
  /**
39
- * Who to invite: someone not yet in the organization.
39
+ * Who to invite: someone who does not have an Arbol account yet.
40
40
  */
41
41
  email: string;
42
42
  /**
@@ -11,8 +11,10 @@ export interface Client {
11
11
  /**
12
12
  * Give a member a role in a product
13
13
  *
14
- * Gives someone already in the organization a role in Raíz, Agenda, Ámbar or
15
- * Account, by their email. Anyone else is invited with `invitations.create`.
14
+ * Gives someone with an existing Arbol account a role in Raíz, Agenda, Ámbar
15
+ * or Account, joining them to this organization when needed. They sign in
16
+ * with their current password. Someone without an account is invited with
17
+ * `invitations.create`.
16
18
  */
17
19
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
18
20
  /**
@@ -41,7 +43,8 @@ export declare function createClient(options: ClientOptions): Client;
41
43
  export declare function bind(transport: Transport): Client;
42
44
  export interface CreateRequest {
43
45
  /**
44
- * The email of someone already in the organization.
46
+ * The email of someone with an existing Arbol account, in this organization
47
+ * or another.
45
48
  */
46
49
  email: string;
47
50
  /**
@@ -141,6 +141,13 @@ export interface AccountFailureResponse {
141
141
  };
142
142
  message: "This person is already a member.";
143
143
  retryable: false;
144
+ } | {
145
+ code: "ACCOUNT_EXISTS";
146
+ data: {
147
+ [key: string]: unknown;
148
+ };
149
+ message: "This person already has an Arbol account. Give them access with members.create.";
150
+ retryable: false;
144
151
  } | {
145
152
  code: "INVITATION_EXISTS";
146
153
  data: {
@@ -160,7 +167,7 @@ export interface AccountFailureResponse {
160
167
  data: {
161
168
  [key: string]: unknown;
162
169
  };
163
- message: "This person is not a member.";
170
+ message: "No existing Arbol account was found.";
164
171
  retryable: false;
165
172
  } | {
166
173
  code: "INVITATION_NOT_FOUND";
@@ -8,7 +8,7 @@ export interface AccountPermission {
8
8
  /**
9
9
  * The product or integration the permission belongs to.
10
10
  */
11
- group: "raiz" | "agenda" | "ambar" | "sura" | "visoft" | "account";
11
+ group: "raiz" | "agenda" | "ambar" | "sura" | "visoft" | "nueva-eps" | "account";
12
12
  value: string;
13
13
  }
14
14
  export interface AccountPermissionPage {
@@ -19,21 +19,22 @@ export interface Client {
19
19
  * with the doctor and books it. Use reason 'priority' right after
20
20
  * create_appointment when the patient asked for a priority (urgent)
21
21
  * appointment: pass that appointment's id as appointmentId so the team can
22
- * bring it forward. Always pass conversationUrl: this conversation's link in
23
- * Arbol's Contactabilidad (https://raiz.getarbol.com/conversations/…), so the
24
- * team opens it there. Pass the patient's name, document and documentType,
25
- * phone, serviceId and the payer as the patient said it. Use resourceId only
26
- * for the professional the person requested. Calling again for the same
27
- * patient, service and reason returns the same open entry and updates
28
- * supplied consented preferences, note, payer, conversation or appointment
29
- * association. A supplied confirmed phone replaces the patient contact phone;
30
- * omitted or null phone preserves it. Omitted fields preserve their values;
31
- * resourceId:null explicitly accepts any professional. When supplying
32
- * preferences, send the complete consented date/time window; null fields
33
- * clear those limits. Identical repeats do not change the version. Staff
34
- * status, priority and original queue position are preserved. A closed entry
35
- * is not reopened. This registers a waiting-list request, never an
36
- * appointment. Then tell the patient the clinic's team will contact them.
22
+ * bring it forward. For agent calls, the platform supplies conversationUrl
23
+ * from the invoking conversation; omit that field. Direct callers may supply
24
+ * the referring conversation link so the team can reopen it. Pass the
25
+ * patient's name, document and documentType, phone, serviceId and the payer
26
+ * as the patient said it. Use resourceId only for the professional the person
27
+ * requested. Calling again for the same patient, service and reason returns
28
+ * the same open entry and updates supplied consented preferences, note,
29
+ * payer, conversation or appointment association. A supplied confirmed phone
30
+ * replaces the patient contact phone; omitted or null phone preserves it.
31
+ * Omitted fields preserve their values; resourceId:null explicitly accepts
32
+ * any professional. When supplying preferences, send the complete consented
33
+ * date/time window; null fields clear those limits. Identical repeats do not
34
+ * change the version. Staff status, priority and original queue position are
35
+ * preserved. A closed entry is not reopened. This registers a waiting-list
36
+ * request, never an appointment. Then tell the patient the clinic's team will
37
+ * contact them.
37
38
  */
38
39
  join(request: JoinRequest, options?: RequestOptions): Promise<JoinResponse>;
39
40
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "2.15.0",
3
+ "version": "2.16.0",
4
4
  "description": "The Arbol API for TypeScript and JavaScript, generated by Cloudflare Forge from the platform's public OpenAPI.",
5
5
  "keywords": [
6
6
  "arbol",
@@ -50,8 +50,8 @@
50
50
  "packageManager": "bun@1.4.3",
51
51
  "arbol": {
52
52
  "openapi": {
53
- "release": "1.20261028.202015",
54
- "sha256": "268d85ea2cea9f6a0cc5de011c11912128724fb1e1a101e2b12cb628a5e2c13d"
53
+ "release": "1.20261028.230100",
54
+ "sha256": "821b642463ce46413eb98de5ae447705d8d3559284cfda5e63341c7bcf56d1f8"
55
55
  }
56
56
  }
57
57
  }