@arbol-ai/sdk 5.67.0 → 5.68.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 (53) hide show
  1. package/dist/account/billing/client.d.ts +13 -2
  2. package/dist/account/billing/client.js +8 -0
  3. package/dist/account/billing/index.d.ts +2 -2
  4. package/dist/account/billing/models.d.ts +107 -3
  5. package/dist/account/billing/models.js +2 -0
  6. package/dist/account/billingPortalSessions/client.d.ts +2 -2
  7. package/dist/account/billingPortalSessions/models.d.ts +1 -1
  8. package/dist/account/client.d.ts +4 -0
  9. package/dist/account/client.js +10 -0
  10. package/dist/account/index.d.ts +1 -1
  11. package/dist/account/invitations/client.d.ts +3 -1
  12. package/dist/account/invitations/client.js +1 -1
  13. package/dist/account/invoices/client.d.ts +36 -0
  14. package/dist/account/invoices/client.js +19 -0
  15. package/dist/account/invoices/index.d.ts +5 -0
  16. package/dist/account/invoices/index.js +4 -0
  17. package/dist/account/invoices/models.d.ts +75 -0
  18. package/dist/account/invoices/models.js +14 -0
  19. package/dist/account/members/client.d.ts +6 -2
  20. package/dist/account/members/client.js +2 -2
  21. package/dist/account/models.d.ts +38 -0
  22. package/dist/account/paymentMethodSetups/client.d.ts +25 -0
  23. package/dist/account/paymentMethodSetups/client.js +18 -0
  24. package/dist/account/paymentMethodSetups/index.d.ts +5 -0
  25. package/dist/account/paymentMethodSetups/index.js +4 -0
  26. package/dist/account/paymentMethodSetups/models.d.ts +33 -0
  27. package/dist/account/paymentMethodSetups/models.js +3 -0
  28. package/dist/account/usageSummary/client.d.ts +12 -5
  29. package/dist/account/usageSummary/client.js +1 -1
  30. package/dist/account/usageSummary/models.d.ts +16 -3
  31. package/dist/account/usageSummary/models.js +2 -1
  32. package/dist/account/walletTopUps/client.d.ts +3 -2
  33. package/dist/account/walletTopUps/models.d.ts +1 -1
  34. package/dist/account/walletTransactions/client.d.ts +4 -3
  35. package/dist/account/walletTransactions/models.d.ts +21 -6
  36. package/dist/raiz/campaigns/client.d.ts +12 -6
  37. package/dist/raiz/campaigns/client.js +1 -1
  38. package/dist/raiz/campaigns/index.d.ts +1 -1
  39. package/dist/raiz/campaigns/models.d.ts +39 -3
  40. package/dist/raiz/channels/client.js +3 -3
  41. package/dist/raiz/conversations/index.d.ts +1 -1
  42. package/dist/raiz/conversations/models.d.ts +33 -0
  43. package/dist/raiz/index.d.ts +1 -1
  44. package/dist/raiz/models.d.ts +38 -0
  45. package/dist/raiz/organization/models.d.ts +2 -2
  46. package/dist/raiz/reports/client.d.ts +5 -2
  47. package/dist/raiz/reports/models.d.ts +21 -0
  48. package/dist/raiz/reports/models.js +1 -1
  49. package/dist/sanitas/affiliations/models.d.ts +2 -2
  50. package/dist/sanitas/connections/models.d.ts +2 -2
  51. package/dist/sanitas/index.d.ts +1 -1
  52. package/dist/sanitas/models.d.ts +21 -0
  53. package/package.json +3 -3
@@ -0,0 +1,33 @@
1
+ import type { ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { AccountBillingNotConfiguredFailure, AccountBillingUnavailableFailure } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface AccountCreatePaymentMethodSetupServiceUnavailableError {
7
+ data: null;
8
+ error: AccountCreatePaymentMethodSetupServiceUnavailableFailure;
9
+ /**
10
+ * What every answer carries besides its data or error.
11
+ */
12
+ metadata: ResponseMetadata;
13
+ success: false;
14
+ }
15
+ export type AccountCreatePaymentMethodSetupServiceUnavailableFailure = UpstreamUnavailableFailure | AccountBillingNotConfiguredFailure | AccountBillingUnavailableFailure;
16
+ export interface AccountPaymentMethodSetup {
17
+ /**
18
+ * The payment processor's page to add or change the card, with no purchase.
19
+ */
20
+ url: string;
21
+ }
22
+ /**
23
+ * A successful answer.
24
+ */
25
+ export interface AccountPaymentMethodSetupResponse {
26
+ data: AccountPaymentMethodSetup;
27
+ error: null;
28
+ /**
29
+ * What every answer carries besides its data or error.
30
+ */
31
+ metadata: ResponseMetadata;
32
+ success: true;
33
+ }
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -10,9 +10,11 @@ export interface Client {
10
10
  /**
11
11
  * Get the usage summary
12
12
  *
13
- * What the organization used in a range, the current month by default: each
14
- * metered feature in its own units (minutes, conversations, lookups…), broken
15
- * down by product or channel, and the credits its wallet paid.
13
+ * What the organization used in a range (the current month by default, at
14
+ * most 366 days): each metered feature in its own units (minutes,
15
+ * conversations, lookups…) and its value in credits at the organization's own
16
+ * rates, broken down by product, channel, Agent or campaign, a series by day
17
+ * in the organization's time zone, and the credits its wallet paid.
16
18
  */
17
19
  get(request?: GetRequest, options?: RequestOptions): Promise<GetResponse>;
18
20
  }
@@ -24,12 +26,17 @@ export interface GetRequest {
24
26
  */
25
27
  from?: Temporal.Instant;
26
28
  /**
27
- * End of the range; now by default.
29
+ * End of the range; now by default. At most 366 days after `from`.
28
30
  */
29
31
  to?: Temporal.Instant;
30
32
  /**
31
33
  * Breaks each feature down; by product by default.
32
34
  */
33
- groupBy?: "product" | "channel";
35
+ groupBy?: "product" | "channel" | "agent" | "campaign";
36
+ /**
37
+ * An IANA time zone (`America/Bogota`) that days and the default month
38
+ * follow; UTC by default.
39
+ */
40
+ timezone?: string;
34
41
  }
35
42
  export type GetResponse = AccountUsageSummaryResponse;
@@ -13,7 +13,7 @@ export function bind(transport) {
13
13
  const GetOperation = {
14
14
  method: "GET",
15
15
  route: "/v1/account/usage-summary",
16
- query: { from: "from", to: "to", groupBy: "groupBy" },
16
+ query: { from: "from", to: "to", groupBy: "groupBy", timezone: "timezone" },
17
17
  response: AccountUsageSummaryResponseCodec,
18
18
  errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
19
  };
@@ -14,18 +14,23 @@ export interface AccountGetUsageSummaryServiceUnavailableError {
14
14
  }
15
15
  export type AccountGetUsageSummaryServiceUnavailableFailure = UpstreamUnavailableFailure | AccountBillingNotConfiguredFailure | AccountBillingUnavailableFailure;
16
16
  export interface AccountUsageFeature {
17
+ /**
18
+ * Its value at the organization's own rates.
19
+ */
20
+ credits: number;
17
21
  /**
18
22
  * How many reports made it up.
19
23
  */
20
24
  events: number;
21
- feature: "voice_minutes" | "telephony_minutes" | "whatsapp_conversations" | "whatsapp_messages" | "whatsapp_templates" | "tool_calls" | "ai_cost" | "phone_numbers" | "sisben_lookups" | "postconsultations" | "agenda_plan" | "agenda_users" | "support_fee";
25
+ feature: "voice_minutes" | "telephony_minutes" | "telephony_cost" | "whatsapp_conversations" | "whatsapp_messages" | "whatsapp_templates" | "tool_calls" | "ai_cost" | "phone_numbers" | "sisben_lookups" | "adres_lookups" | "policia_colombia_lookups" | "postconsultations" | "agenda_users" | "sms_messages" | "agenda_plan" | "support_fee";
22
26
  groups: {
27
+ credits: number;
23
28
  key: string;
24
29
  units: number;
25
30
  }[];
26
31
  /**
27
32
  * What was used, in the feature's units: minutes, conversations, lookups… For
28
- * `ai_cost`, the model calls.
33
+ * `ai_cost` and `telephony_cost`, the reports.
29
34
  */
30
35
  units: number;
31
36
  }
@@ -34,9 +39,17 @@ export interface AccountUsageSummary {
34
39
  * Credits the wallet paid in the range.
35
40
  */
36
41
  credits: number;
42
+ days: {
43
+ credits: number;
44
+ date: Temporal.PlainDate;
45
+ units: {
46
+ [key: string]: unknown;
47
+ };
48
+ }[];
37
49
  features: AccountUsageFeature[];
38
50
  from: Temporal.Instant;
39
- groupBy: "product" | "channel";
51
+ groupBy: "product" | "channel" | "agent" | "campaign";
52
+ timezone: string;
40
53
  to: Temporal.Instant;
41
54
  }
42
55
  /**
@@ -1,7 +1,8 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { instant, object } from "../../_/index.js";
3
+ import { array, date, instant, object } from "../../_/index.js";
4
4
  export const AccountUsageSummaryCodec = object([
5
+ ["days", null, array(object([["date", null, date]]))],
5
6
  ["from", null, instant],
6
7
  ["to", null, instant],
7
8
  ]);
@@ -12,8 +12,9 @@ export interface Client {
12
12
  *
13
13
  * Buys credits at one US dollar each. The organization's saved card is
14
14
  * charged at once; without one, or when the bank asks to confirm, the answer
15
- * is Stripe's page to pay on. Never repeated on its own: a lost answer is
16
- * OUTCOME_UNKNOWN, and the wallet's transactions say whether it was paid.
15
+ * is the payment processor's page to pay on. Never repeated on its own: a
16
+ * lost answer is OUTCOME_UNKNOWN, and the wallet's transactions say whether
17
+ * it was paid.
17
18
  */
18
19
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
19
20
  }
@@ -57,7 +57,7 @@ export interface AccountTopUpDeclinedFailure {
57
57
  }
58
58
  export interface AccountWalletTopUp {
59
59
  /**
60
- * Stripe's page to pay on, for `checkout`.
60
+ * The payment processor's page to pay on, for `checkout`.
61
61
  */
62
62
  checkoutUrl: string | null;
63
63
  /**
@@ -10,9 +10,10 @@ export interface Client {
10
10
  /**
11
11
  * List wallet transactions
12
12
  *
13
- * What moved the organization's wallet, newest first: top-ups, plan grants
14
- * and renewals, adjustments Arbol made, and the credits spent, one entry per
15
- * UTC day, each with the balance right after it. Listed forward only.
13
+ * What moved the organization's wallet, newest first: top-ups, transfers,
14
+ * credits Arbol gave (by name), plan grants and renewals, adjustments, and
15
+ * the credits spent, one entry per UTC day, each with whether it was paid or
16
+ * granted and the balance right after it. Listed forward only.
16
17
  */
17
18
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
18
19
  }
@@ -15,12 +15,12 @@ export interface AccountListWalletTransactionsServiceUnavailableError {
15
15
  export type AccountListWalletTransactionsServiceUnavailableFailure = UpstreamUnavailableFailure | AccountBillingNotConfiguredFailure | AccountBillingUnavailableFailure;
16
16
  export interface AccountWalletTransaction {
17
17
  /**
18
- * Credits it added (positive) or took (negative); null when Autumn could not
18
+ * Credits it added (positive) or took (negative); null when billing could not
19
19
  * tell.
20
20
  */
21
21
  amount: number | null;
22
22
  /**
23
- * Its amounts are Autumn’s estimate, not an exact record.
23
+ * Its amounts are an estimate, not an exact record.
24
24
  */
25
25
  approximate: boolean;
26
26
  /**
@@ -35,13 +35,28 @@ export interface AccountWalletTransaction {
35
35
  * For a day of usage, its last use.
36
36
  */
37
37
  endsAt: Temporal.Instant | null;
38
+ /**
39
+ * `paid`: money came in; `granted`: Arbol gave the credits; null for spending
40
+ * and renewals.
41
+ */
42
+ funding: "paid" | "granted" | null;
43
+ /**
44
+ * For a `grant`, what Arbol gave it as; its name when `label` is null.
45
+ */
46
+ grantKind: "promo" | "subsidy" | "courtesy" | "correction" | null;
38
47
  id: string;
39
48
  /**
40
- * `usage`: credits spent, one entry per UTC day; `top_up`: credits bought;
41
- * `plan`: a plan's grant or change; `reset`: the plan's period renewed;
42
- * `adjustment`: a change Arbol made.
49
+ * `usage`: credits spent, one entry per UTC day; `top_up`: credits bought by
50
+ * card; `transfer`: credits paid by bank transfer, which Arbol recorded;
51
+ * `grant`: credits Arbol gave, named by `label`; `plan`: a plan's grant or
52
+ * change; `reset`: the plan's period renewed; `adjustment`: another change
53
+ * Arbol made.
54
+ */
55
+ kind: "usage" | "top_up" | "transfer" | "grant" | "plan" | "reset" | "adjustment";
56
+ /**
57
+ * The name Arbol gave a grant or a transfer ("Arbol promo", "Bank transfer").
43
58
  */
44
- kind: "usage" | "top_up" | "plan" | "reset" | "adjustment";
59
+ label: string | null;
45
60
  /**
46
61
  * When it happened; for a day of usage, its first use.
47
62
  */
@@ -38,8 +38,10 @@ export interface Client {
38
38
  * its recipients in the order they were added, each with attempts, next
39
39
  * attempt, error and latest call or message; continue with `recipientsCursor`
40
40
  * (`recipientsDirection` reads the other way). `expand=readiness` says
41
- * whether it can start and lists what has to be fixed first, without reaching
42
- * anyone. `expand=results` counts what people answered, by the Agent's data
41
+ * whether it can start, lists what has to be fixed first and estimates what
42
+ * reaching each pending recipient once would cost in credits against the
43
+ * organization's balance (`estimate`), without reaching anyone.
44
+ * `expand=results` counts what people answered, by the Agent's data
43
45
  * definitions with options; each recipient also says their own. Read it
44
46
  * before `update_campaign` and send `expectedVersion`.
45
47
  */
@@ -68,10 +70,14 @@ export interface Client {
68
70
  * every variable (CAMPAIGN_VARIABLE_MISSING) and, when the template's header
69
71
  * is a document, image or video, the first pending recipient's own `header`
70
72
  * file (CAMPAIGN_HEADER_MISSING). A recipient must be pending
71
- * (CAMPAIGN_NO_RECIPIENTS). `get_campaign` with `expand=readiness` lists all
72
- * of this beforehand. A campaign starts once: starting a running one changes
73
- * nothing, and a paused one resumes with `update_campaign` and `paused:
74
- * false`. Not an AI tool: it reaches real people.
73
+ * (CAMPAIGN_NO_RECIPIENTS). What reaching each pending recipient once would
74
+ * cost is checked against the organization's balance: when the balance does
75
+ * not cover it and billing stops the organization's work for that, it does
76
+ * not start (CREDITS_EXHAUSTED). `get_campaign` with `expand=readiness` lists
77
+ * all of this beforehand, with the estimate. A campaign starts once: starting
78
+ * a running one changes nothing, and a paused one resumes with
79
+ * `update_campaign` and `paused: false`. Not an AI tool: it reaches real
80
+ * people.
75
81
  */
76
82
  start(request: StartRequest, options?: RequestOptions): Promise<StartResponse>;
77
83
  /**
@@ -41,7 +41,7 @@ const StartOperation = {
41
41
  route: "/v1/raiz/campaigns/{campaignId}/start",
42
42
  body: "nested",
43
43
  response: RaizCampaignResponseCodec,
44
- errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
44
+ errors: { "400": true, "401": true, "402": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
45
45
  };
46
46
  const UpdateOperation = {
47
47
  method: "PATCH",
@@ -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, GetRequest, GetResponse, ListRequest, ListResponse, StartRequest, StartResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { RaizCampaign, RaizCampaignBlocker, RaizCampaignPage, RaizCampaignPageResponse, RaizCampaignProgress, RaizCampaignReadiness, RaizCampaignRecipientInput, RaizCampaignRecipientPage, RaizCampaignResponse, RaizCampaignResult, RaizCampaignTemplate, RaizCampaignTemplateInput, RaizCreateCampaignBadRequestError, RaizCreateCampaignBadRequestFailure, RaizCreateCampaignBody, RaizCreateCampaignConflictError, RaizCreateCampaignConflictFailure, RaizCreateCampaignServiceUnavailableError, RaizCreateCampaignServiceUnavailableFailure, RaizCreateCampaignUnprocessableContentError, RaizCreateCampaignUnprocessableContentFailure, RaizGetCampaignBadRequestError, RaizGetCampaignBadRequestFailure, RaizGetCampaignServiceUnavailableError, RaizGetCampaignServiceUnavailableFailure, RaizListCampaignsBadRequestError, RaizListCampaignsBadRequestFailure, RaizListCampaignsServiceUnavailableError, RaizListCampaignsServiceUnavailableFailure, RaizStartCampaignBadRequestError, RaizStartCampaignBadRequestFailure, RaizStartCampaignConflictError, RaizStartCampaignConflictFailure, RaizStartCampaignNotFoundError, RaizStartCampaignNotFoundFailure, RaizStartCampaignUnprocessableContentError, RaizStartCampaignUnprocessableContentFailure, RaizUpdateCampaignBadRequestError, RaizUpdateCampaignBadRequestFailure, RaizUpdateCampaignBody, RaizUpdateCampaignConflictError, RaizUpdateCampaignConflictFailure, RaizUpdateCampaignServiceUnavailableError, RaizUpdateCampaignServiceUnavailableFailure, RaizUpdateCampaignUnprocessableContentError, RaizUpdateCampaignUnprocessableContentFailure, } from "./models.js";
5
+ export type { RaizCampaign, RaizCampaignBlocker, RaizCampaignEstimate, RaizCampaignPage, RaizCampaignPageResponse, RaizCampaignProgress, RaizCampaignReadiness, RaizCampaignRecipientInput, RaizCampaignRecipientPage, RaizCampaignResponse, RaizCampaignResult, RaizCampaignTemplate, RaizCampaignTemplateInput, RaizCreateCampaignBadRequestError, RaizCreateCampaignBadRequestFailure, RaizCreateCampaignBody, RaizCreateCampaignConflictError, RaizCreateCampaignConflictFailure, RaizCreateCampaignServiceUnavailableError, RaizCreateCampaignServiceUnavailableFailure, RaizCreateCampaignUnprocessableContentError, RaizCreateCampaignUnprocessableContentFailure, RaizGetCampaignBadRequestError, RaizGetCampaignBadRequestFailure, RaizGetCampaignServiceUnavailableError, RaizGetCampaignServiceUnavailableFailure, RaizListCampaignsBadRequestError, RaizListCampaignsBadRequestFailure, RaizListCampaignsServiceUnavailableError, RaizListCampaignsServiceUnavailableFailure, RaizStartCampaignBadRequestError, RaizStartCampaignBadRequestFailure, RaizStartCampaignConflictError, RaizStartCampaignConflictFailure, RaizStartCampaignNotFoundError, RaizStartCampaignNotFoundFailure, RaizStartCampaignUnprocessableContentError, RaizStartCampaignUnprocessableContentFailure, RaizUpdateCampaignBadRequestError, RaizUpdateCampaignBadRequestFailure, RaizUpdateCampaignBody, RaizUpdateCampaignConflictError, RaizUpdateCampaignConflictFailure, RaizUpdateCampaignServiceUnavailableError, RaizUpdateCampaignServiceUnavailableFailure, RaizUpdateCampaignUnprocessableContentError, RaizUpdateCampaignUnprocessableContentFailure, } from "./models.js";
@@ -43,8 +43,9 @@ export interface RaizCampaign {
43
43
  */
44
44
  progress: RaizCampaignProgress;
45
45
  /**
46
- * Whether the campaign can start, checked against its Agent, line, template
47
- * and recipients without reaching anyone. Present only when expanded.
46
+ * Whether the campaign can start, checked against its Agent, line, template,
47
+ * recipients and the organization's balance without reaching anyone. Present
48
+ * only when expanded.
48
49
  */
49
50
  readiness?: RaizCampaignReadiness;
50
51
  /**
@@ -86,7 +87,8 @@ export interface RaizCampaignBlocker {
86
87
  /**
87
88
  * The error `startCampaign` would refuse with: `CAMPAIGN_AGENT_NOT_READY`,
88
89
  * `CAMPAIGN_NO_RECIPIENTS`, `CAMPAIGN_VARIABLE_MISSING`, `CHANNEL_NOT_READY`,
89
- * a `TEMPLATE_*` code, `UPSTREAM_UNAVAILABLE` or `VOICE_AGENT_NOT_READY`.
90
+ * `CREDITS_EXHAUSTED` (see `estimate`), a `TEMPLATE_*` code,
91
+ * `UPSTREAM_UNAVAILABLE` or `VOICE_AGENT_NOT_READY`.
90
92
  */
91
93
  code: string;
92
94
  /**
@@ -94,6 +96,35 @@ export interface RaizCampaignBlocker {
94
96
  */
95
97
  variable?: string;
96
98
  }
99
+ export interface RaizCampaignEstimate {
100
+ callMinutes: {
101
+ calls: number;
102
+ perCall: number;
103
+ } | null;
104
+ /**
105
+ * Whether the organization's balance covers `credits`, or the organization is
106
+ * never stopped at zero, as billing answers it now. True when nothing was
107
+ * counted, or billing did not answer (`degraded`).
108
+ */
109
+ covered: boolean;
110
+ credits: number | null;
111
+ /**
112
+ * Billing did not answer in time: `credits` may be null, and `covered` is
113
+ * assumed.
114
+ */
115
+ degraded: boolean;
116
+ /**
117
+ * Whether a balance that does not cover what is used stops this
118
+ * organization's work now. When it does and `covered` is false, the campaign
119
+ * cannot start (`CREDITS_EXHAUSTED`); while it does not, it starts anyway.
120
+ * False when nothing was counted.
121
+ */
122
+ enforced: boolean;
123
+ /**
124
+ * The recipients still to be reached, each counted once.
125
+ */
126
+ people: number;
127
+ }
97
128
  export interface RaizCampaignPage {
98
129
  /**
99
130
  * Items admitted by this resource contract within the verified organization.
@@ -179,6 +210,11 @@ export interface RaizCampaignReadiness {
179
210
  * What has to be fixed first. Empty when it can start.
180
211
  */
181
212
  blockers: RaizCampaignBlocker[];
213
+ /**
214
+ * What reaching each pending recipient once would cost, checked against the
215
+ * organization's balance without reaching anyone.
216
+ */
217
+ estimate: RaizCampaignEstimate;
182
218
  preview: string | null;
183
219
  /**
184
220
  * Whether `startCampaign` would accept it now.
@@ -21,13 +21,13 @@ const CreateOperation = {
21
21
  route: "/v1/raiz/channels",
22
22
  body: "flat",
23
23
  response: RaizChannelResponseCodec,
24
- errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
24
+ errors: { "400": true, "401": true, "402": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
25
25
  };
26
26
  const DeleteOperation = {
27
27
  method: "DELETE",
28
28
  route: "/v1/raiz/channels/{channelId}",
29
29
  response: null,
30
- errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
30
+ errors: { "400": true, "401": true, "402": true, "403": true, "404": true, "409": true, "413": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
31
31
  };
32
32
  const GetOperation = {
33
33
  method: "GET",
@@ -56,7 +56,7 @@ const UpdateOperation = {
56
56
  body: "flat",
57
57
  request: RaizUpdateChannelBodyCodec,
58
58
  response: RaizChannelResponseCodec,
59
- errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
59
+ errors: { "400": true, "401": true, "402": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
60
60
  };
61
61
  const VerifyOperation = {
62
62
  method: "POST",
@@ -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, ContinueRequest, ContinueResponse, CountRequest, CountResponse, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, SendRequest, SendResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { RaizAssigneeUnavailableError, RaizContinueConversationBadRequestError, RaizContinueConversationBadRequestFailure, RaizContinueConversationBody, RaizContinueConversationConflictError, RaizContinueConversationConflictFailure, RaizContinueConversationNotFoundError, RaizContinueConversationNotFoundFailure, RaizContinueConversationServiceUnavailableError, RaizContinueConversationServiceUnavailableFailure, RaizContinueConversationUnprocessableContentError, RaizContinueConversationUnprocessableContentFailure, RaizConversation, RaizConversationCount, RaizConversationCountResponse, RaizConversationDiagnostics, RaizConversationEvent, RaizConversationGroup, RaizConversationOutcomeCounts, RaizConversationPage, RaizConversationPageResponse, RaizConversationResponse, RaizConversationToolCalls, RaizConversationToolFailure, RaizConversationWorker, RaizCountConversationsServiceUnavailableError, RaizCountConversationsServiceUnavailableFailure, RaizDeleteConversationConflictError, RaizDeleteConversationConflictFailure, RaizGetConversationBadRequestError, RaizGetConversationBadRequestFailure, RaizGetConversationServiceUnavailableError, RaizGetConversationServiceUnavailableFailure, RaizListConversationsBadRequestError, RaizListConversationsBadRequestFailure, RaizListConversationsServiceUnavailableError, RaizListConversationsServiceUnavailableFailure, RaizMessage, RaizMessagePage, RaizMessageResponse, RaizSendMessageBadGatewayError, RaizSendMessageBadGatewayFailure, RaizSendMessageBody, RaizSendMessageConflictError, RaizSendMessageConflictFailure, RaizSendMessageNotFoundError, RaizSendMessageNotFoundFailure, RaizSendMessageTooManyRequestsError, RaizSendMessageTooManyRequestsFailure, RaizSendMessageUnprocessableContentError, RaizSendMessageUnprocessableContentFailure, RaizUpdateConversationBadRequestError, RaizUpdateConversationBadRequestFailure, RaizUpdateConversationBody, RaizUpdateConversationConflictError, RaizUpdateConversationConflictFailure, RaizUpdateConversationServiceUnavailableError, RaizUpdateConversationServiceUnavailableFailure, } from "./models.js";
5
+ export type { RaizAssigneeUnavailableError, RaizContinueConversationBadRequestError, RaizContinueConversationBadRequestFailure, RaizContinueConversationBody, RaizContinueConversationConflictError, RaizContinueConversationConflictFailure, RaizContinueConversationNotFoundError, RaizContinueConversationNotFoundFailure, RaizContinueConversationServiceUnavailableError, RaizContinueConversationServiceUnavailableFailure, RaizContinueConversationUnprocessableContentError, RaizContinueConversationUnprocessableContentFailure, RaizConversation, RaizConversationCount, RaizConversationCountResponse, RaizConversationDiagnostics, RaizConversationEvent, RaizConversationGroup, RaizConversationOutcomeCounts, RaizConversationPage, RaizConversationPageResponse, RaizConversationResponse, RaizConversationToolCalls, RaizConversationToolFailure, RaizConversationUsage, RaizConversationUsageItem, RaizConversationWorker, RaizCountConversationsServiceUnavailableError, RaizCountConversationsServiceUnavailableFailure, RaizDeleteConversationConflictError, RaizDeleteConversationConflictFailure, RaizGetConversationBadRequestError, RaizGetConversationBadRequestFailure, RaizGetConversationServiceUnavailableError, RaizGetConversationServiceUnavailableFailure, RaizListConversationsBadRequestError, RaizListConversationsBadRequestFailure, RaizListConversationsServiceUnavailableError, RaizListConversationsServiceUnavailableFailure, RaizMessage, RaizMessagePage, RaizMessageResponse, RaizSendMessageBadGatewayError, RaizSendMessageBadGatewayFailure, RaizSendMessageBody, RaizSendMessageConflictError, RaizSendMessageConflictFailure, RaizSendMessageNotFoundError, RaizSendMessageNotFoundFailure, RaizSendMessageTooManyRequestsError, RaizSendMessageTooManyRequestsFailure, RaizSendMessageUnprocessableContentError, RaizSendMessageUnprocessableContentFailure, RaizUpdateConversationBadRequestError, RaizUpdateConversationBadRequestFailure, RaizUpdateConversationBody, RaizUpdateConversationConflictError, RaizUpdateConversationConflictFailure, RaizUpdateConversationServiceUnavailableError, RaizUpdateConversationServiceUnavailableFailure, } from "./models.js";
@@ -251,6 +251,13 @@ export interface RaizConversation {
251
251
  * An instant in RFC 3339 format, in UTC.
252
252
  */
253
253
  updatedAt: Temporal.Instant;
254
+ /**
255
+ * What the conversation used, as billing valued it. What an integration
256
+ * charged for a tool the Agent ran is part of `tools` once billing hands it
257
+ * over, which it does when the integration names the conversation in its
258
+ * report.
259
+ */
260
+ usage: RaizConversationUsage;
254
261
  version: number;
255
262
  waitingOn: "ai" | "team" | "contact" | null;
256
263
  waitingSinceAt: Temporal.Instant | null;
@@ -416,6 +423,32 @@ export interface RaizConversationToolFailure {
416
423
  errorMessage: string | null;
417
424
  toolName: string;
418
425
  }
426
+ export interface RaizConversationUsage {
427
+ credits: number | null;
428
+ items: RaizConversationUsageItem[];
429
+ /**
430
+ * Part of the usage is still waiting for its value in credits.
431
+ */
432
+ pending: boolean;
433
+ }
434
+ export interface RaizConversationUsageItem {
435
+ credits: number | null;
436
+ /**
437
+ * `voice`: minutes of the voice Agent, rounded up per call. `phone_line`:
438
+ * minutes of the phone line; its credits include what the line was charged
439
+ * when the plan bills it apart. `phone_numbers`: a number's month.
440
+ * `messages`: WhatsApp messages, in and out. `templates`: WhatsApp templates
441
+ * sent. `conversations`: WhatsApp conversations started. `tools`: integration
442
+ * tools the Agent ran; its credits include what an integration charged for a
443
+ * run, once billing hands that over. `ai`: model calls.
444
+ */
445
+ kind: "voice" | "phone_line" | "phone_numbers" | "messages" | "templates" | "conversations" | "tools" | "ai";
446
+ /**
447
+ * How much of it: minutes, messages, templates, conversations, tool runs or
448
+ * model calls.
449
+ */
450
+ units: number;
451
+ }
419
452
  export type RaizConversationWorker = {
420
453
  agentId: string;
421
454
  answering: boolean;
@@ -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 { RaizAddressInUseFailure, RaizAgentInUseFailure, RaizAgentIntegrationProcedureInput, RaizAgentModalityLockedFailure, RaizAgentProcedureInput, RaizAgentProceduresInvalidFailure, RaizAgentProceduresInvalidFailureData, RaizAgentSettingsInvalidFailure, RaizAgentWorkflowInvalidFailure, RaizAgentWorkflowInvalidFailureData, RaizAssigneeUnavailableFailure, RaizBulletinLimitReachedFailure, RaizBulletinPeriodInvalidFailure, RaizBusinessHours, RaizBusinessHoursWindow, RaizCallInProgressFailure, RaizCampaignAgentNotReadyFailure, RaizCampaignHeaderMissingFailure, RaizCampaignHeaderNotStoredFailure, RaizCampaignHeaderNotStoredFailureData, RaizCampaignNoRecipientsFailure, RaizCampaignVariableMissingFailure, RaizCampaignVariableMissingFailureData, RaizChannelAgentMismatchFailure, RaizChannelNotReadyFailure, RaizChannelTypeMismatchFailure, RaizContactHoursWindow, RaizContactSuppressedFailure, RaizConversationClosedFailure, RaizConversationNotHandedOffFailure, RaizConversationOpenFailure, RaizDailyReportInProgressFailure, RaizDailyReportRecipientsMissingFailure, RaizDefinitionNotActiveFailure, RaizDefinitionOptionsInvalidFailure, RaizDefinitionRetiredFailure, RaizDefinitionTypeLockedFailure, RaizEmailAddress, RaizEvalCasesUnavailableFailure, RaizEvalGateUnmetFailure, RaizFact, RaizFactSubjectMismatchFailure, RaizFactValueInvalidFailure, RaizFeedbackProposalUnavailableFailure, RaizHandoffAlreadyContinuedFailure, RaizIdentifierInUseFailure, RaizImportFileInvalidFailure, RaizImportFileTooLargeFailure, RaizIntegrationProcedureUnavailableFailure, RaizIntegrationToolUnavailableFailure, RaizIntegrationsUnavailableFailure, RaizInvalidCursorFailure, RaizInvalidStateFailure, RaizIpNetworkInvalidFailure, RaizKeyInUseFailure, RaizKnowledgeDocumentUnavailableFailure, RaizKnowledgeFileInvalidFailure, RaizKnowledgeKindMismatchFailure, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizProviderRejectedError, RaizProviderRejectedFailure, RaizReplyInProgressFailure, RaizReportFilterUnsupportedFailure, RaizReportRangeInvalidFailure, RaizResourceNotFoundError, RaizResourceNotFoundFailure, RaizSourceConversationOpenFailure, RaizSuppressionExistsFailure, RaizTask, RaizTaskNotRetryableFailure, RaizTaskResponse, RaizTeamUnavailableFailure, RaizTemplateHeaderFile, RaizTemplateHeaderMismatchFailure, RaizTemplateHeaderRequiredFailure, RaizTemplateNotApprovedFailure, RaizTemplateNotFoundFailure, RaizTemplateParametersMismatchFailure, RaizTemplateUnsupportedFailure, RaizTimeZoneUnknownFailure, RaizVersionConflictError, RaizVersionConflictFailure, RaizVoiceAgentNotReadyFailure, RaizVoiceUnavailableFailure, RaizWebsiteNotApprovedFailure, RaizWhatsappAiPausedFailure, RaizWhatsappDeliveryFailedFailure, RaizWhatsappMarketingStoppedFailure, RaizWhatsappMediaRejectedFailure, RaizWhatsappMessageUnsupportedFailure, RaizWhatsappRateLimitedFailure, RaizWhatsappRecipientUnavailableFailure, RaizWhatsappWindowClosedFailure, } from "./models.js";
5
+ export type { RaizAddressInUseFailure, RaizAgentInUseFailure, RaizAgentIntegrationProcedureInput, RaizAgentModalityLockedFailure, RaizAgentProcedureInput, RaizAgentProceduresInvalidFailure, RaizAgentProceduresInvalidFailureData, RaizAgentSettingsInvalidFailure, RaizAgentWorkflowInvalidFailure, RaizAgentWorkflowInvalidFailureData, RaizAssigneeUnavailableFailure, RaizBulletinLimitReachedFailure, RaizBulletinPeriodInvalidFailure, RaizBusinessHours, RaizBusinessHoursWindow, RaizCallInProgressFailure, RaizCampaignAgentNotReadyFailure, RaizCampaignHeaderMissingFailure, RaizCampaignHeaderNotStoredFailure, RaizCampaignHeaderNotStoredFailureData, RaizCampaignNoRecipientsFailure, RaizCampaignVariableMissingFailure, RaizCampaignVariableMissingFailureData, RaizChannelAgentMismatchFailure, RaizChannelNotReadyFailure, RaizChannelTypeMismatchFailure, RaizContactHoursWindow, RaizContactSuppressedFailure, RaizConversationClosedFailure, RaizConversationNotHandedOffFailure, RaizConversationOpenFailure, RaizCreditsExhaustedError, RaizCreditsExhaustedFailure, RaizDailyReportInProgressFailure, RaizDailyReportRecipientsMissingFailure, RaizDefinitionNotActiveFailure, RaizDefinitionOptionsInvalidFailure, RaizDefinitionRetiredFailure, RaizDefinitionTypeLockedFailure, RaizEmailAddress, RaizEvalCasesUnavailableFailure, RaizEvalGateUnmetFailure, RaizFact, RaizFactSubjectMismatchFailure, RaizFactValueInvalidFailure, RaizFeedbackProposalUnavailableFailure, RaizHandoffAlreadyContinuedFailure, RaizIdentifierInUseFailure, RaizImportFileInvalidFailure, RaizImportFileTooLargeFailure, RaizIntegrationProcedureUnavailableFailure, RaizIntegrationToolUnavailableFailure, RaizIntegrationsUnavailableFailure, RaizInvalidCursorFailure, RaizInvalidStateFailure, RaizIpNetworkInvalidFailure, RaizKeyInUseFailure, RaizKnowledgeDocumentUnavailableFailure, RaizKnowledgeFileInvalidFailure, RaizKnowledgeKindMismatchFailure, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizProviderRejectedError, RaizProviderRejectedFailure, RaizReplyInProgressFailure, RaizReportFilterUnsupportedFailure, RaizReportRangeInvalidFailure, RaizResourceNotFoundError, RaizResourceNotFoundFailure, RaizSourceConversationOpenFailure, RaizSuppressionExistsFailure, RaizTask, RaizTaskNotRetryableFailure, RaizTaskResponse, RaizTeamUnavailableFailure, RaizTemplateHeaderFile, RaizTemplateHeaderMismatchFailure, RaizTemplateHeaderRequiredFailure, RaizTemplateNotApprovedFailure, RaizTemplateNotFoundFailure, RaizTemplateParametersMismatchFailure, RaizTemplateUnsupportedFailure, RaizTimeZoneUnknownFailure, RaizVersionConflictError, RaizVersionConflictFailure, RaizVoiceAgentNotReadyFailure, RaizVoiceUnavailableFailure, RaizWebsiteNotApprovedFailure, RaizWhatsappAiPausedFailure, RaizWhatsappDeliveryFailedFailure, RaizWhatsappMarketingStoppedFailure, RaizWhatsappMediaRejectedFailure, RaizWhatsappMessageUnsupportedFailure, RaizWhatsappRateLimitedFailure, RaizWhatsappRecipientUnavailableFailure, RaizWhatsappWindowClosedFailure, } from "./models.js";
@@ -740,6 +740,44 @@ export interface RaizConversationOpenFailure {
740
740
  */
741
741
  retryable: false;
742
742
  }
743
+ /**
744
+ * A failed answer.
745
+ */
746
+ export interface RaizCreditsExhaustedError {
747
+ data: null;
748
+ /**
749
+ * The organization's credits do not cover this, so nothing was started. Try
750
+ * again once the organization adds credits.
751
+ */
752
+ error: RaizCreditsExhaustedFailure;
753
+ /**
754
+ * What every answer carries besides its data or error.
755
+ */
756
+ metadata: ResponseMetadata;
757
+ success: false;
758
+ }
759
+ /**
760
+ * The organization's credits do not cover this, so nothing was started. Try
761
+ * again once the organization adds credits.
762
+ */
763
+ export interface RaizCreditsExhaustedFailure {
764
+ /**
765
+ * The failure code, stable across releases.
766
+ */
767
+ code: "CREDITS_EXHAUSTED";
768
+ /**
769
+ * No fields.
770
+ */
771
+ data: Empty;
772
+ /**
773
+ * What went wrong, for people; it never contains input values.
774
+ */
775
+ message: string;
776
+ /**
777
+ * Whether repeating the same request may succeed.
778
+ */
779
+ retryable: false;
780
+ }
743
781
  /**
744
782
  * The daily report you asked for is still on its way; it arrives within a
745
783
  * minute.
@@ -84,7 +84,7 @@ export interface RaizOrganization {
84
84
  };
85
85
  productNotices: {
86
86
  administrators: RaizEmailAddress[];
87
- 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" | "spam-blocked" | "template-approved" | "template-rejected" | "weekly-summary")[];
87
+ events: ("agent-idle" | "agent-live" | "budget-reached" | "budget-warning" | "campaign-finished" | "channel-disconnected" | "channel-limit" | "channel-quality" | "channel-restored" | "credits-exhausted" | "import-finished" | "knowledge-failed" | "milestone" | "monthly-summary" | "outage-resolved" | "spam-blocked" | "template-approved" | "template-rejected" | "weekly-summary")[];
88
88
  recipients: RaizEmailAddress[];
89
89
  };
90
90
  protection: {
@@ -223,7 +223,7 @@ export interface RaizUpdateOrganizationBody {
223
223
  };
224
224
  productNotices?: {
225
225
  administrators?: RaizEmailAddress[] | null;
226
- 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" | "spam-blocked" | "template-approved" | "template-rejected" | "weekly-summary")[] | null;
226
+ events?: ("agent-idle" | "agent-live" | "budget-reached" | "budget-warning" | "campaign-finished" | "channel-disconnected" | "channel-limit" | "channel-quality" | "channel-restored" | "credits-exhausted" | "import-finished" | "knowledge-failed" | "milestone" | "monthly-summary" | "outage-resolved" | "spam-blocked" | "template-approved" | "template-rejected" | "weekly-summary")[] | null;
227
227
  recipients?: RaizEmailAddress[] | null;
228
228
  };
229
229
  protection?: {
@@ -97,9 +97,12 @@ export interface GetRequest {
97
97
  * pending/unclassified conversations, excluding tests/imports/deleted records
98
98
  * (filters `agentId`, `channelType`); no measured filing reduction is
99
99
  * inferred. `campaign_progress`: recipients by status (filter `campaignId`;
100
- * no dates).
100
+ * no dates). `usage_daily`: what was used per day, Agent, channel type,
101
+ * campaign and kind, with its credits at the organization's rates and, for
102
+ * AI, the model tier and its tokens (filters `agentId`, `channelType`,
103
+ * `campaignId`); test conversations count like any other.
101
104
  */
102
- name: "conversations_daily" | "handoffs_daily" | "pqrsf_daily" | "tool_calls_daily" | "tool_calls" | "booking_outcomes" | "booking_details" | "assessment_results_daily" | "campaign_progress";
105
+ name: "conversations_daily" | "handoffs_daily" | "pqrsf_daily" | "tool_calls_daily" | "tool_calls" | "booking_outcomes" | "booking_details" | "assessment_results_daily" | "campaign_progress" | "usage_daily";
103
106
  /**
104
107
  * Last day (`YYYY-MM-DD`), inclusive, of a daily report. Default: today in
105
108
  * the organization's time zone.
@@ -187,6 +187,27 @@ export type RaizReport = {
187
187
  recipientCount: number;
188
188
  successCount: number;
189
189
  }[];
190
+ } | {
191
+ from: Temporal.PlainDate;
192
+ hasMore: boolean;
193
+ name: "usage_daily";
194
+ rows: {
195
+ agentId: string | null;
196
+ agentName: string | null;
197
+ cacheReadTokens: number;
198
+ cacheWriteTokens: number;
199
+ campaignId: string | null;
200
+ channelType: "voice" | "whatsapp" | "web" | null;
201
+ credits: number | null;
202
+ day: Temporal.PlainDate;
203
+ inputTokens: number;
204
+ kind: "voice" | "phone_line" | "phone_numbers" | "messages" | "templates" | "conversations" | "tools" | "ai";
205
+ model: "arbolito/agile" | "arbolito/balanced" | "arbolito/advanced" | "arbolito/top" | null;
206
+ outputTokens: number;
207
+ pendingCount: number;
208
+ units: number;
209
+ }[];
210
+ to: Temporal.PlainDate;
190
211
  };
191
212
  /**
192
213
  * A successful answer.
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { array, date, instant, object, union } from "../../_/index.js";
4
- export const RaizReportCodec = union([object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["occurredAt", null, instant]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["appointmentDate", null, date], ["cancelledAt", null, instant], ["createdAt", null, instant], ["day", null, date]]))], ["snapshotAt", null, instant], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]])]);
4
+ export const RaizReportCodec = union([object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["occurredAt", null, instant]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["appointmentDate", null, date], ["cancelledAt", null, instant], ["createdAt", null, instant], ["day", null, date]]))], ["snapshotAt", null, instant], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]])]);
5
5
  export const RaizReportResponseCodec = object([
6
6
  ["data", null, () => RaizReportCodec],
7
7
  ]);
@@ -1,5 +1,5 @@
1
1
  import type { OutcomeUnknownFailure, RateLimitedFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
- import type { SanitasConnectionRequiredFailure, SanitasLoginCoolingDownFailure, SanitasPatientUnresolvedFailure, SanitasProviderChallengeRequiredFailure, SanitasProviderContextRequiredFailure, SanitasProviderProtocolChangedFailure, SanitasProviderSessionExpiredFailure, SanitasProviderUnavailableFailure } from "../models.js";
2
+ import type { SanitasConnectionRequiredFailure, SanitasLoginCoolingDownFailure, SanitasPatientUnresolvedFailure, SanitasProviderAccessDeniedFailure, SanitasProviderChallengeRequiredFailure, SanitasProviderContextRequiredFailure, SanitasProviderProtocolChangedFailure, SanitasProviderSessionExpiredFailure, SanitasProviderUnavailableFailure } from "../models.js";
3
3
  /**
4
4
  * A failed answer.
5
5
  */
@@ -62,7 +62,7 @@ export interface SanitasLookupAffiliationServiceUnavailableError {
62
62
  metadata: ResponseMetadata;
63
63
  success: false;
64
64
  }
65
- export type SanitasLookupAffiliationServiceUnavailableFailure = UpstreamUnavailableFailure | SanitasProviderUnavailableFailure | SanitasProviderChallengeRequiredFailure;
65
+ export type SanitasLookupAffiliationServiceUnavailableFailure = UpstreamUnavailableFailure | SanitasProviderUnavailableFailure | SanitasProviderAccessDeniedFailure | SanitasProviderChallengeRequiredFailure;
66
66
  /**
67
67
  * A failed answer.
68
68
  */
@@ -1,5 +1,5 @@
1
1
  import type { OutcomeUnknownFailure, RateLimitedFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
- import type { SanitasConnectionRequiredFailure, SanitasLoginCoolingDownFailure, SanitasPatientUnresolvedFailure, SanitasProviderChallengeRequiredFailure, SanitasProviderContextRequiredFailure, SanitasProviderProtocolChangedFailure, SanitasProviderSessionExpiredFailure, SanitasProviderUnavailableFailure } from "../models.js";
2
+ import type { SanitasConnectionRequiredFailure, SanitasLoginCoolingDownFailure, SanitasPatientUnresolvedFailure, SanitasProviderAccessDeniedFailure, SanitasProviderChallengeRequiredFailure, SanitasProviderContextRequiredFailure, SanitasProviderProtocolChangedFailure, SanitasProviderSessionExpiredFailure, SanitasProviderUnavailableFailure } from "../models.js";
3
3
  /**
4
4
  * A failed answer.
5
5
  */
@@ -38,7 +38,7 @@ export interface SanitasGetConnectionServiceUnavailableError {
38
38
  metadata: ResponseMetadata;
39
39
  success: false;
40
40
  }
41
- export type SanitasGetConnectionServiceUnavailableFailure = UpstreamUnavailableFailure | SanitasProviderUnavailableFailure | SanitasProviderChallengeRequiredFailure;
41
+ export type SanitasGetConnectionServiceUnavailableFailure = UpstreamUnavailableFailure | SanitasProviderUnavailableFailure | SanitasProviderAccessDeniedFailure | SanitasProviderChallengeRequiredFailure;
42
42
  /**
43
43
  * A failed answer.
44
44
  */