@arbol-ai/sdk 5.44.0 → 5.46.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 (231) hide show
  1. package/dist/account/client.d.ts +0 -16
  2. package/dist/account/client.js +0 -40
  3. package/dist/account/index.d.ts +1 -1
  4. package/dist/account/models.d.ts +0 -93
  5. package/dist/agenda/appointments/client.d.ts +14 -243
  6. package/dist/agenda/appointments/client.js +18 -17
  7. package/dist/agenda/appointments/index.d.ts +1 -1
  8. package/dist/agenda/appointments/models.d.ts +612 -2
  9. package/dist/agenda/appointments/models.js +14 -2
  10. package/dist/agenda/availability/client.d.ts +2 -7
  11. package/dist/agenda/availability/client.js +5 -4
  12. package/dist/agenda/availability/index.d.ts +1 -0
  13. package/dist/agenda/availability/models.d.ts +67 -0
  14. package/dist/agenda/bookingLocations/client.d.ts +2 -7
  15. package/dist/agenda/bookingLocations/client.js +4 -4
  16. package/dist/agenda/bookingLocations/index.d.ts +1 -0
  17. package/dist/agenda/bookingLocations/models.d.ts +67 -0
  18. package/dist/agenda/bookingOfferings/client.d.ts +2 -8
  19. package/dist/agenda/bookingOfferings/client.js +1 -1
  20. package/dist/agenda/bookingOfferings/index.d.ts +1 -1
  21. package/dist/agenda/bookingOfferings/models.d.ts +79 -1
  22. package/dist/agenda/bookingRequirements/client.d.ts +2 -75
  23. package/dist/agenda/bookingRequirements/client.js +1 -1
  24. package/dist/agenda/bookingRequirements/index.d.ts +1 -0
  25. package/dist/agenda/bookingRequirements/models.d.ts +182 -0
  26. package/dist/agenda/bookingSlots/client.d.ts +2 -7
  27. package/dist/agenda/bookingSlots/client.js +5 -4
  28. package/dist/agenda/bookingSlots/index.d.ts +1 -0
  29. package/dist/agenda/bookingSlots/models.d.ts +67 -0
  30. package/dist/agenda/bookingSlots/models.js +3 -0
  31. package/dist/agenda/bookings/client.d.ts +13 -188
  32. package/dist/agenda/bookings/client.js +13 -13
  33. package/dist/agenda/bookings/index.d.ts +1 -1
  34. package/dist/agenda/bookings/models.d.ts +526 -1
  35. package/dist/agenda/bookings/models.js +7 -1
  36. package/dist/agenda/firstAvailability/client.d.ts +2 -8
  37. package/dist/agenda/firstAvailability/client.js +4 -4
  38. package/dist/agenda/firstAvailability/index.d.ts +1 -1
  39. package/dist/agenda/firstAvailability/models.d.ts +80 -1
  40. package/dist/agenda/firstAvailability/models.js +4 -1
  41. package/dist/agenda/index.d.ts +1 -1
  42. package/dist/agenda/locations/client.d.ts +2 -7
  43. package/dist/agenda/locations/client.js +4 -4
  44. package/dist/agenda/locations/index.d.ts +1 -0
  45. package/dist/agenda/locations/models.d.ts +67 -0
  46. package/dist/agenda/locations/models.js +3 -0
  47. package/dist/agenda/models.d.ts +2193 -839
  48. package/dist/agenda/models.js +9 -0
  49. package/dist/agenda/nearestBookingSlots/client.d.ts +2 -8
  50. package/dist/agenda/nearestBookingSlots/client.js +4 -4
  51. package/dist/agenda/nearestBookingSlots/index.d.ts +1 -1
  52. package/dist/agenda/nearestBookingSlots/models.d.ts +80 -2
  53. package/dist/agenda/nearestBookingSlots/models.js +4 -1
  54. package/dist/agenda/offerings/client.d.ts +7 -146
  55. package/dist/agenda/offerings/client.js +8 -8
  56. package/dist/agenda/offerings/index.d.ts +1 -1
  57. package/dist/agenda/offerings/models.d.ts +349 -1
  58. package/dist/agenda/offerings/models.js +6 -0
  59. package/dist/agenda/resourceSchedules/client.d.ts +4 -51
  60. package/dist/agenda/resourceSchedules/client.js +5 -4
  61. package/dist/agenda/resourceSchedules/index.d.ts +1 -0
  62. package/dist/agenda/resourceSchedules/models.d.ts +133 -0
  63. package/dist/agenda/resourceSchedules/models.js +12 -0
  64. package/dist/agenda/resources/client.d.ts +7 -99
  65. package/dist/agenda/resources/client.js +8 -8
  66. package/dist/agenda/resources/index.d.ts +1 -1
  67. package/dist/agenda/resources/models.d.ts +302 -1
  68. package/dist/agenda/resources/models.js +6 -0
  69. package/dist/agenda/scheduleRules/client.d.ts +7 -172
  70. package/dist/agenda/scheduleRules/client.js +10 -10
  71. package/dist/agenda/scheduleRules/index.d.ts +1 -1
  72. package/dist/agenda/scheduleRules/models.d.ts +520 -1
  73. package/dist/agenda/scheduleRules/models.js +31 -0
  74. package/dist/agenda/services/client.d.ts +7 -71
  75. package/dist/agenda/services/client.js +8 -8
  76. package/dist/agenda/services/index.d.ts +1 -1
  77. package/dist/agenda/services/models.d.ts +274 -1
  78. package/dist/agenda/services/models.js +6 -0
  79. package/dist/agenda/waitlist/client.d.ts +9 -217
  80. package/dist/agenda/waitlist/client.js +13 -13
  81. package/dist/agenda/waitlist/index.d.ts +1 -1
  82. package/dist/agenda/waitlist/models.d.ts +482 -1
  83. package/dist/agenda/waitlist/models.js +16 -1
  84. package/dist/index.d.ts +1 -1
  85. package/dist/models.d.ts +0 -20
  86. package/dist/raiz/agents/client.d.ts +32 -158
  87. package/dist/raiz/agents/client.js +12 -12
  88. package/dist/raiz/agents/index.d.ts +1 -1
  89. package/dist/raiz/agents/models.d.ts +334 -2
  90. package/dist/raiz/agents/models.js +13 -1
  91. package/dist/raiz/bulletins/client.d.ts +10 -74
  92. package/dist/raiz/bulletins/client.js +13 -14
  93. package/dist/raiz/bulletins/index.d.ts +1 -1
  94. package/dist/raiz/bulletins/models.d.ts +112 -1
  95. package/dist/raiz/bulletins/models.js +14 -0
  96. package/dist/raiz/campaigns/client.d.ts +11 -140
  97. package/dist/raiz/campaigns/client.js +14 -14
  98. package/dist/raiz/campaigns/index.d.ts +1 -1
  99. package/dist/raiz/campaigns/models.d.ts +343 -2
  100. package/dist/raiz/campaigns/models.js +14 -1
  101. package/dist/raiz/changes/client.d.ts +2 -8
  102. package/dist/raiz/changes/client.js +4 -4
  103. package/dist/raiz/changes/index.d.ts +1 -1
  104. package/dist/raiz/changes/models.d.ts +41 -1
  105. package/dist/raiz/changes/models.js +3 -0
  106. package/dist/raiz/channels/client.d.ts +15 -142
  107. package/dist/raiz/channels/client.js +16 -18
  108. package/dist/raiz/channels/index.d.ts +1 -1
  109. package/dist/raiz/channels/models.d.ts +1511 -2
  110. package/dist/raiz/channels/models.js +12 -2
  111. package/dist/raiz/contacts/client.d.ts +12 -117
  112. package/dist/raiz/contacts/client.js +15 -15
  113. package/dist/raiz/contacts/index.d.ts +1 -1
  114. package/dist/raiz/contacts/models.d.ts +305 -2
  115. package/dist/raiz/contacts/models.js +10 -1
  116. package/dist/raiz/conversations/client.d.ts +18 -99
  117. package/dist/raiz/conversations/client.js +12 -13
  118. package/dist/raiz/conversations/index.d.ts +1 -1
  119. package/dist/raiz/conversations/models.d.ts +253 -2
  120. package/dist/raiz/conversations/models.js +8 -2
  121. package/dist/raiz/definitions/client.d.ts +8 -115
  122. package/dist/raiz/definitions/client.js +10 -10
  123. package/dist/raiz/definitions/index.d.ts +1 -1
  124. package/dist/raiz/definitions/models.d.ts +224 -1
  125. package/dist/raiz/definitions/models.js +6 -0
  126. package/dist/raiz/evalCases/client.d.ts +10 -57
  127. package/dist/raiz/evalCases/client.js +8 -8
  128. package/dist/raiz/evalCases/index.d.ts +1 -1
  129. package/dist/raiz/evalCases/models.d.ts +78 -1
  130. package/dist/raiz/evalCases/models.js +6 -0
  131. package/dist/raiz/evalRuns/client.d.ts +4 -45
  132. package/dist/raiz/evalRuns/client.js +6 -6
  133. package/dist/raiz/evalRuns/index.d.ts +1 -1
  134. package/dist/raiz/evalRuns/models.d.ts +85 -0
  135. package/dist/raiz/evalRuns/models.js +3 -0
  136. package/dist/raiz/facts/client.d.ts +6 -65
  137. package/dist/raiz/facts/client.js +7 -7
  138. package/dist/raiz/facts/index.d.ts +1 -0
  139. package/dist/raiz/facts/models.d.ts +120 -0
  140. package/dist/raiz/facts/models.js +10 -0
  141. package/dist/raiz/index.d.ts +1 -1
  142. package/dist/raiz/knowledge/client.d.ts +10 -130
  143. package/dist/raiz/knowledge/client.js +13 -13
  144. package/dist/raiz/knowledge/index.d.ts +1 -1
  145. package/dist/raiz/knowledge/models.d.ts +256 -1
  146. package/dist/raiz/knowledge/models.js +12 -0
  147. package/dist/raiz/models.d.ts +1499 -825
  148. package/dist/raiz/models.js +3 -0
  149. package/dist/raiz/organization/client.d.ts +7 -70
  150. package/dist/raiz/organization/client.js +8 -8
  151. package/dist/raiz/organization/index.d.ts +1 -1
  152. package/dist/raiz/organization/models.d.ts +178 -1
  153. package/dist/raiz/organization/models.js +11 -0
  154. package/dist/raiz/profiles/client.d.ts +8 -87
  155. package/dist/raiz/profiles/client.js +10 -10
  156. package/dist/raiz/profiles/index.d.ts +1 -1
  157. package/dist/raiz/profiles/models.d.ts +206 -2
  158. package/dist/raiz/profiles/models.js +6 -0
  159. package/dist/raiz/reports/client.d.ts +5 -8
  160. package/dist/raiz/reports/client.js +4 -4
  161. package/dist/raiz/reports/index.d.ts +1 -1
  162. package/dist/raiz/reports/models.d.ts +41 -0
  163. package/dist/raiz/reports/models.js +3 -0
  164. package/dist/raiz/suppressions/client.d.ts +4 -31
  165. package/dist/raiz/suppressions/client.js +6 -6
  166. package/dist/raiz/suppressions/index.d.ts +1 -1
  167. package/dist/raiz/suppressions/models.d.ts +114 -1
  168. package/dist/raiz/suppressions/models.js +6 -0
  169. package/dist/raiz/tasks/client.d.ts +12 -32
  170. package/dist/raiz/tasks/client.js +11 -11
  171. package/dist/raiz/tasks/index.d.ts +1 -1
  172. package/dist/raiz/tasks/models.d.ts +108 -2
  173. package/dist/raiz/tasks/models.js +4 -1
  174. package/dist/raiz/templates/client.d.ts +7 -84
  175. package/dist/raiz/templates/client.js +5 -4
  176. package/dist/raiz/templates/index.d.ts +1 -1
  177. package/dist/raiz/templates/models.d.ts +214 -1
  178. package/dist/raiz/templates/models.js +4 -1
  179. package/dist/raiz/voices/client.d.ts +2 -8
  180. package/dist/raiz/voices/client.js +1 -1
  181. package/dist/raiz/voices/index.d.ts +1 -1
  182. package/dist/raiz/voices/models.d.ts +40 -1
  183. package/package.json +3 -3
  184. package/dist/account/billing/client.d.ts +0 -22
  185. package/dist/account/billing/client.js +0 -18
  186. package/dist/account/billing/index.d.ts +0 -5
  187. package/dist/account/billing/index.js +0 -4
  188. package/dist/account/billing/models.d.ts +0 -74
  189. package/dist/account/billing/models.js +0 -10
  190. package/dist/account/billingProfiles/client.d.ts +0 -39
  191. package/dist/account/billingProfiles/client.js +0 -25
  192. package/dist/account/billingProfiles/index.d.ts +0 -5
  193. package/dist/account/billingProfiles/index.js +0 -4
  194. package/dist/account/billingProfiles/models.d.ts +0 -58
  195. package/dist/account/invoiceDocuments/client.d.ts +0 -25
  196. package/dist/account/invoiceDocuments/client.js +0 -17
  197. package/dist/account/invoiceDocuments/index.d.ts +0 -5
  198. package/dist/account/invoiceDocuments/index.js +0 -4
  199. package/dist/account/invoiceDocuments/models.d.ts +0 -35
  200. package/dist/account/invoices/client.d.ts +0 -47
  201. package/dist/account/invoices/client.js +0 -26
  202. package/dist/account/invoices/index.d.ts +0 -5
  203. package/dist/account/invoices/index.js +0 -4
  204. package/dist/account/invoices/models.d.ts +0 -135
  205. package/dist/account/invoices/models.js +0 -24
  206. package/dist/account/payments/client.d.ts +0 -34
  207. package/dist/account/payments/client.js +0 -19
  208. package/dist/account/payments/index.d.ts +0 -5
  209. package/dist/account/payments/index.js +0 -4
  210. package/dist/account/payments/models.d.ts +0 -64
  211. package/dist/account/payments/models.js +0 -12
  212. package/dist/account/usage/client.d.ts +0 -47
  213. package/dist/account/usage/client.js +0 -18
  214. package/dist/account/usage/index.d.ts +0 -5
  215. package/dist/account/usage/index.js +0 -4
  216. package/dist/account/usage/models.d.ts +0 -51
  217. package/dist/account/usageSummary/client.d.ts +0 -26
  218. package/dist/account/usageSummary/client.js +0 -19
  219. package/dist/account/usageSummary/index.d.ts +0 -5
  220. package/dist/account/usageSummary/index.js +0 -4
  221. package/dist/account/usageSummary/models.d.ts +0 -50
  222. package/dist/account/usageSummary/models.js +0 -9
  223. package/dist/account/walletTransactions/client.d.ts +0 -34
  224. package/dist/account/walletTransactions/client.js +0 -19
  225. package/dist/account/walletTransactions/index.d.ts +0 -5
  226. package/dist/account/walletTransactions/index.js +0 -4
  227. package/dist/account/walletTransactions/models.d.ts +0 -58
  228. package/dist/account/walletTransactions/models.js +0 -12
  229. /package/dist/{account/billingProfiles → agenda/availability}/models.js +0 -0
  230. /package/dist/{account/invoiceDocuments → agenda/bookingLocations}/models.js +0 -0
  231. /package/dist/{account/usage → agenda/bookingRequirements}/models.js +0 -0
@@ -14,3 +14,6 @@ export const RaizTaskCodec = object([
14
14
  ["endedAt", null, instant],
15
15
  ["startedAt", null, instant],
16
16
  ]);
17
+ export const RaizTaskResponseCodec = object([
18
+ ["data", null, () => RaizTaskCodec],
19
+ ]);
@@ -1,6 +1,6 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { RaizEmailAddress, RaizResponseMetadata } from "../models.js";
3
- import { type RaizOrganization } from "./models.js";
2
+ import type { Empty } from "../../models.js";
3
+ import { type RaizOrganizationResponse, type RaizSendDailyReportResultResponse, type RaizUpdateOrganizationBody } from "./models.js";
4
4
  export interface ClientOptions extends BaseClientOptions {
5
5
  /**
6
6
  * The URL the paths of the API are relative to.
@@ -49,73 +49,10 @@ export declare function createClient(options: ClientOptions): Client;
49
49
  export declare function bind(transport: Transport): Client;
50
50
  export interface GetRequest {
51
51
  }
52
- export interface GetResponse {
53
- data: RaizOrganization;
54
- error: null;
55
- metadata: RaizResponseMetadata;
56
- success: true;
57
- }
52
+ export type GetResponse = RaizOrganizationResponse;
58
53
  export interface SendDailyReportRequest {
59
- body: {
60
- [key: string]: unknown;
61
- };
62
- }
63
- export interface SendDailyReportResponse {
64
- data: {
65
- endsAt: Temporal.Instant;
66
- recipients: number;
67
- requestedAt: Temporal.Instant;
68
- until: Temporal.Instant;
69
- };
70
- error: null;
71
- metadata: RaizResponseMetadata;
72
- success: true;
73
- }
74
- export interface UpdateRequest {
75
- /**
76
- * BCP 47 language tag.
77
- */
78
- language?: string;
79
- name?: string;
80
- /**
81
- * Settings to change. An omitted setting stays as it is; `null` returns it to
82
- * its default.
83
- */
84
- settings?: {
85
- channels?: {
86
- managedVoiceOutboundEnabled?: boolean | null;
87
- maxConcurrentOutboundCalls?: number | null;
88
- };
89
- dailyReport?: {
90
- enabled?: boolean | null;
91
- recipients?: RaizEmailAddress[] | null;
92
- sendAt?: string | null;
93
- };
94
- notifications?: {
95
- escalations?: boolean | null;
96
- failedOutcomes?: boolean | null;
97
- failures?: boolean | null;
98
- frequency?: "immediate" | "hourly" | "every3Hours" | "every6Hours" | "every12Hours" | null;
99
- phones?: string[] | null;
100
- recipients?: RaizEmailAddress[] | null;
101
- };
102
- productNotices?: {
103
- administrators?: RaizEmailAddress[] | null;
104
- 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;
105
- recipients?: RaizEmailAddress[] | null;
106
- };
107
- whatsapp?: {
108
- maxConcurrentReplies?: number | null;
109
- };
110
- };
111
- /**
112
- * IANA time zone name.
113
- */
114
- timeZone?: string;
115
- }
116
- export interface UpdateResponse {
117
- data: RaizOrganization;
118
- error: null;
119
- metadata: RaizResponseMetadata;
120
- success: true;
54
+ body: Empty;
121
55
  }
56
+ export type SendDailyReportResponse = RaizSendDailyReportResultResponse;
57
+ export type UpdateRequest = RaizUpdateOrganizationBody;
58
+ export type UpdateResponse = RaizOrganizationResponse;
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { Transport, instant, object, } from "../../_/index.js";
4
- import { RaizOrganizationCodec } from "./models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { RaizOrganizationResponseCodec, RaizSendDailyReportResultResponseCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -15,20 +15,20 @@ export function bind(transport) {
15
15
  const GetOperation = {
16
16
  method: "GET",
17
17
  route: "/v1/raiz/organization",
18
- response: object([["data", null, () => RaizOrganizationCodec]]),
19
- 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 },
18
+ response: RaizOrganizationResponseCodec,
19
+ errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
20
20
  };
21
21
  const SendDailyReportOperation = {
22
22
  method: "POST",
23
23
  route: "/v1/raiz/organization/send-daily-report",
24
24
  body: "nested",
25
- response: object([["data", null, object([["endsAt", null, instant], ["requestedAt", null, instant], ["until", null, instant]])]]),
26
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
25
+ response: RaizSendDailyReportResultResponseCodec,
26
+ 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 },
27
27
  };
28
28
  const UpdateOperation = {
29
29
  method: "PATCH",
30
30
  route: "/v1/raiz/organization",
31
31
  body: "flat",
32
- response: object([["data", null, () => RaizOrganizationCodec]]),
33
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
32
+ response: RaizOrganizationResponseCodec,
33
+ errors: { "400": true, "401": true, "403": true, "404": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
34
34
  };
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, GetRequest, GetResponse, SendDailyReportRequest, SendDailyReportResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { OrganizationId, RaizOrganization, } from "./models.js";
5
+ export type { OrganizationId, RaizDailyReportInProgressError, RaizDailyReportRecipientsMissingError, RaizGetOrganizationServiceUnavailableError, RaizGetOrganizationServiceUnavailableFailure, RaizOrganization, RaizOrganizationResponse, RaizSendDailyReportResult, RaizSendDailyReportResultResponse, RaizSendDailyReportServiceUnavailableError, RaizSendDailyReportServiceUnavailableFailure, RaizTimeZoneUnknownError, RaizUpdateOrganizationBody, RaizUpdateOrganizationServiceUnavailableError, RaizUpdateOrganizationServiceUnavailableFailure, } from "./models.js";
@@ -1,5 +1,51 @@
1
- import type { RaizEmailAddress } from "../models.js";
1
+ import type { ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { RaizDailyReportInProgressFailure, RaizDailyReportRecipientsMissingFailure, RaizEmailAddress, RaizIntegrationsUnavailableFailure, RaizTimeZoneUnknownFailure } from "../models.js";
2
3
  export type OrganizationId = string;
4
+ /**
5
+ * A failed answer.
6
+ */
7
+ export interface RaizDailyReportInProgressError {
8
+ data: null;
9
+ /**
10
+ * The daily report you asked for is still on its way; it arrives within a
11
+ * minute.
12
+ */
13
+ error: RaizDailyReportInProgressFailure;
14
+ /**
15
+ * What every answer carries besides its data or error.
16
+ */
17
+ metadata: ResponseMetadata;
18
+ success: false;
19
+ }
20
+ /**
21
+ * A failed answer.
22
+ */
23
+ export interface RaizDailyReportRecipientsMissingError {
24
+ data: null;
25
+ /**
26
+ * The daily report has no recipients. Add them in
27
+ * `settings.dailyReport.recipients` first.
28
+ */
29
+ error: RaizDailyReportRecipientsMissingFailure;
30
+ /**
31
+ * What every answer carries besides its data or error.
32
+ */
33
+ metadata: ResponseMetadata;
34
+ success: false;
35
+ }
36
+ /**
37
+ * A failed answer.
38
+ */
39
+ export interface RaizGetOrganizationServiceUnavailableError {
40
+ data: null;
41
+ error: RaizGetOrganizationServiceUnavailableFailure;
42
+ /**
43
+ * What every answer carries besides its data or error.
44
+ */
45
+ metadata: ResponseMetadata;
46
+ success: false;
47
+ }
48
+ export type RaizGetOrganizationServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
3
49
  export interface RaizOrganization {
4
50
  capabilities: {
5
51
  managedVoiceOutbound: boolean;
@@ -53,4 +99,135 @@ export interface RaizOrganization {
53
99
  */
54
100
  updatedAt: Temporal.Instant;
55
101
  }
102
+ /**
103
+ * A successful answer.
104
+ */
105
+ export interface RaizOrganizationResponse {
106
+ data: RaizOrganization;
107
+ error: null;
108
+ /**
109
+ * What every answer carries besides its data or error.
110
+ */
111
+ metadata: ResponseMetadata;
112
+ success: true;
113
+ }
114
+ export interface RaizSendDailyReportResult {
115
+ /**
116
+ * The end of the 24 hours the report covers, in RFC 3339 format, in UTC.
117
+ */
118
+ endsAt: Temporal.Instant;
119
+ /**
120
+ * How many addresses Account resolved when the report was requested. Delivery
121
+ * resolves them again.
122
+ */
123
+ recipients: number;
124
+ /**
125
+ * An instant in RFC 3339 format, in UTC.
126
+ */
127
+ requestedAt: Temporal.Instant;
128
+ /**
129
+ * Deprecated: use `endsAt`. Answered until 2027-01-28.
130
+ *
131
+ * @deprecated
132
+ */
133
+ until: Temporal.Instant;
134
+ }
135
+ /**
136
+ * A successful answer.
137
+ */
138
+ export interface RaizSendDailyReportResultResponse {
139
+ data: RaizSendDailyReportResult;
140
+ error: null;
141
+ /**
142
+ * What every answer carries besides its data or error.
143
+ */
144
+ metadata: ResponseMetadata;
145
+ success: true;
146
+ }
147
+ /**
148
+ * A failed answer.
149
+ */
150
+ export interface RaizSendDailyReportServiceUnavailableError {
151
+ data: null;
152
+ error: RaizSendDailyReportServiceUnavailableFailure;
153
+ /**
154
+ * What every answer carries besides its data or error.
155
+ */
156
+ metadata: ResponseMetadata;
157
+ success: false;
158
+ }
159
+ export type RaizSendDailyReportServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
160
+ /**
161
+ * A failed answer.
162
+ */
163
+ export interface RaizTimeZoneUnknownError {
164
+ data: null;
165
+ /**
166
+ * The time zone is not in the IANA time zone database.
167
+ */
168
+ error: RaizTimeZoneUnknownFailure;
169
+ /**
170
+ * What every answer carries besides its data or error.
171
+ */
172
+ metadata: ResponseMetadata;
173
+ success: false;
174
+ }
175
+ export interface RaizUpdateOrganizationBody {
176
+ /**
177
+ * BCP 47 language tag.
178
+ */
179
+ language?: string;
180
+ name?: string;
181
+ /**
182
+ * Settings to change. An omitted setting stays as it is; `null` returns it to
183
+ * its default.
184
+ */
185
+ settings?: {
186
+ channels?: {
187
+ managedVoiceOutboundEnabled?: boolean | null;
188
+ maxConcurrentOutboundCalls?: number | null;
189
+ };
190
+ dailyReport?: {
191
+ enabled?: boolean | null;
192
+ recipients?: RaizEmailAddress[] | null;
193
+ sendAt?: string | null;
194
+ };
195
+ notifications?: {
196
+ escalations?: boolean | null;
197
+ failedOutcomes?: boolean | null;
198
+ failures?: boolean | null;
199
+ frequency?: "immediate" | "hourly" | "every3Hours" | "every6Hours" | "every12Hours" | null;
200
+ phones?: string[] | null;
201
+ recipients?: RaizEmailAddress[] | null;
202
+ };
203
+ productNotices?: {
204
+ administrators?: RaizEmailAddress[] | null;
205
+ 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;
206
+ recipients?: RaizEmailAddress[] | null;
207
+ };
208
+ whatsapp?: {
209
+ maxConcurrentReplies?: number | null;
210
+ };
211
+ };
212
+ /**
213
+ * IANA time zone name.
214
+ */
215
+ timeZone?: string;
216
+ }
217
+ /**
218
+ * A failed answer.
219
+ */
220
+ export interface RaizUpdateOrganizationServiceUnavailableError {
221
+ data: null;
222
+ error: RaizUpdateOrganizationServiceUnavailableFailure;
223
+ /**
224
+ * What every answer carries besides its data or error.
225
+ */
226
+ metadata: ResponseMetadata;
227
+ success: false;
228
+ }
229
+ export type RaizUpdateOrganizationServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
56
230
  export declare const RaizOrganizationCodec: import("../../_/codec.js").Codec;
231
+ export declare const RaizOrganizationResponseCodec: import("../../_/codec.js").Codec;
232
+ export declare const RaizSendDailyReportResultCodec: import("../../_/codec.js").Codec;
233
+ export declare const RaizSendDailyReportResultResponseCodec: import("../../_/codec.js").Codec;
@@ -5,3 +5,14 @@ export const RaizOrganizationCodec = object([
5
5
  ["createdAt", null, instant],
6
6
  ["updatedAt", null, instant],
7
7
  ]);
8
+ export const RaizOrganizationResponseCodec = object([
9
+ ["data", null, () => RaizOrganizationCodec],
10
+ ]);
11
+ export const RaizSendDailyReportResultCodec = object([
12
+ ["endsAt", null, instant],
13
+ ["requestedAt", null, instant],
14
+ ["until", null, instant],
15
+ ]);
16
+ export const RaizSendDailyReportResultResponseCodec = object([
17
+ ["data", null, () => RaizSendDailyReportResultCodec],
18
+ ]);
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { RaizContactHoursWindow, RaizResponseMetadata } from "../models.js";
3
- import { type RaizProfile, type RaizProfilePage, type RaizProfileTemplateInput } from "./models.js";
2
+ import { type RaizCreateProfileBody, type RaizProfilePageResponse, type RaizProfileResponse, type RaizUpdateProfileBody } from "./models.js";
4
3
  export interface ClientOptions extends BaseClientOptions {
5
4
  /**
6
5
  * The URL the paths of the API are relative to.
@@ -52,48 +51,15 @@ export interface Client {
52
51
  }
53
52
  export declare function createClient(options: ClientOptions): Client;
54
53
  export declare function bind(transport: Transport): Client;
55
- export type CreateRequest = {
56
- agentId: string;
57
- channelId?: string | null;
58
- channelType: "voice";
59
- contactHours?: RaizContactHoursWindow[];
60
- firstMessage?: string | null;
61
- instructions?: string | null;
62
- metadata?: {
63
- [key: string]: unknown;
64
- };
65
- name: string;
66
- timeZone?: string | null;
67
- } | {
68
- agentId: string;
69
- channelId?: string | null;
70
- channelType: "whatsapp";
71
- contactHours?: RaizContactHoursWindow[];
72
- metadata?: {
73
- [key: string]: unknown;
74
- };
75
- name: string;
76
- template: RaizProfileTemplateInput;
77
- timeZone?: string | null;
78
- };
79
- export interface CreateResponse {
80
- data: RaizProfile;
81
- error: null;
82
- metadata: RaizResponseMetadata;
83
- success: true;
84
- }
54
+ export type CreateRequest = RaizCreateProfileBody;
55
+ export type CreateResponse = RaizProfileResponse;
85
56
  export interface GetRequest {
86
57
  /**
87
58
  * Communication profile id.
88
59
  */
89
60
  profileId: string;
90
61
  }
91
- export interface GetResponse {
92
- data: RaizProfile;
93
- error: null;
94
- metadata: RaizResponseMetadata;
95
- success: true;
96
- }
62
+ export type GetResponse = RaizProfileResponse;
97
63
  export interface ListRequest {
98
64
  /**
99
65
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -119,56 +85,11 @@ export interface ListRequest {
119
85
  */
120
86
  channelType?: "voice" | "whatsapp";
121
87
  }
122
- export interface ListResponse {
123
- data: RaizProfilePage;
124
- error: null;
125
- metadata: RaizResponseMetadata;
126
- success: true;
127
- }
128
- export interface UpdateRequest {
88
+ export type ListResponse = RaizProfilePageResponse;
89
+ export type UpdateRequest = {
129
90
  /**
130
91
  * Communication profile id.
131
92
  */
132
93
  profileId: string;
133
- /**
134
- * Agent id.
135
- */
136
- agentId?: string;
137
- channelId?: string | null;
138
- /**
139
- * When a conversation may start, in the profile's time zone. Empty: any time.
140
- * Outside them `createConversation` fails with OUTSIDE_CONTACT_HOURS and
141
- * nothing is sent.
142
- */
143
- contactHours?: RaizContactHoursWindow[];
144
- /**
145
- * The `version` you read. When present, the change applies only if nobody
146
- * changed the resource since; otherwise it fails with VERSION_CONFLICT.
147
- */
148
- expectedVersion?: number;
149
- firstMessage?: string | null;
150
- instructions?: string | null;
151
- /**
152
- * Your own keys and labels for this resource (up to 50 keys of 40 characters;
153
- * values up to 500 characters). Raíz never interprets them.
154
- */
155
- metadata?: {
156
- [key: string]: unknown;
157
- };
158
- /**
159
- * What the profile is for, as people read it.
160
- */
161
- name?: string;
162
- /**
163
- * The approved template that opens every conversation. WhatsApp allows a
164
- * business to start a conversation only with one.
165
- */
166
- template?: RaizProfileTemplateInput;
167
- timeZone?: string | null;
168
- }
169
- export interface UpdateResponse {
170
- data: RaizProfile;
171
- error: null;
172
- metadata: RaizResponseMetadata;
173
- success: true;
174
- }
94
+ } & RaizUpdateProfileBody;
95
+ export type UpdateResponse = RaizProfileResponse;
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { Transport, object, } from "../../_/index.js";
4
- import { RaizProfileCodec, RaizProfilePageCodec, } from "./models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { RaizProfilePageResponseCodec, RaizProfileResponseCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -17,26 +17,26 @@ const CreateOperation = {
17
17
  method: "POST",
18
18
  route: "/v1/raiz/profiles",
19
19
  body: "flat",
20
- response: object([["data", null, () => RaizProfileCodec]]),
21
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
20
+ response: RaizProfileResponseCodec,
21
+ 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 },
22
22
  };
23
23
  const GetOperation = {
24
24
  method: "GET",
25
25
  route: "/v1/raiz/profiles/{profileId}",
26
- response: object([["data", null, () => RaizProfileCodec]]),
27
- 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 },
26
+ response: RaizProfileResponseCodec,
27
+ errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
28
28
  };
29
29
  const ListOperation = {
30
30
  method: "GET",
31
31
  route: "/v1/raiz/profiles",
32
32
  query: { cursor: "cursor", direction: "direction", limit: "limit", agentId: "agentId", channelType: "channelType" },
33
- response: object([["data", null, () => RaizProfilePageCodec]]),
34
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
33
+ response: RaizProfilePageResponseCodec,
34
+ errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
35
35
  };
36
36
  const UpdateOperation = {
37
37
  method: "PATCH",
38
38
  route: "/v1/raiz/profiles/{profileId}",
39
39
  body: "flat",
40
- response: object([["data", null, () => RaizProfileCodec]]),
41
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
40
+ response: RaizProfileResponseCodec,
41
+ 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 },
42
42
  };
@@ -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, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { RaizProfile, RaizProfilePage, RaizProfileTemplateInput, } from "./models.js";
5
+ export type { RaizCreateProfileBody, RaizCreateProfileConflictError, RaizCreateProfileConflictFailure, RaizCreateProfileServiceUnavailableError, RaizCreateProfileServiceUnavailableFailure, RaizCreateProfileUnprocessableContentError, RaizCreateProfileUnprocessableContentFailure, RaizGetProfileServiceUnavailableError, RaizGetProfileServiceUnavailableFailure, RaizListProfilesBadRequestError, RaizListProfilesBadRequestFailure, RaizListProfilesServiceUnavailableError, RaizListProfilesServiceUnavailableFailure, RaizProfile, RaizProfilePage, RaizProfilePageResponse, RaizProfileResponse, RaizProfileTemplateInput, RaizUpdateProfileBody, RaizUpdateProfileConflictError, RaizUpdateProfileConflictFailure, RaizUpdateProfileServiceUnavailableError, RaizUpdateProfileServiceUnavailableFailure, RaizUpdateProfileUnprocessableContentError, RaizUpdateProfileUnprocessableContentFailure, } from "./models.js";