@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
@@ -1,5 +1,107 @@
1
- import type { PageInfo } from "../../models.js";
2
- import type { RaizContactHoursWindow } from "../models.js";
1
+ import type { InvalidInputFailure, PageInfo, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { RaizChannelAgentMismatchFailure, RaizChannelTypeMismatchFailure, RaizContactHoursWindow, RaizIntegrationsUnavailableFailure, RaizInvalidCursorFailure, RaizTimeZoneUnknownFailure, RaizVersionConflictFailure } from "../models.js";
3
+ export type RaizCreateProfileBody = {
4
+ agentId: string;
5
+ channelId?: string | null;
6
+ channelType: "voice";
7
+ contactHours?: RaizContactHoursWindow[];
8
+ firstMessage?: string | null;
9
+ instructions?: string | null;
10
+ metadata?: {
11
+ [key: string]: unknown;
12
+ };
13
+ name: string;
14
+ timeZone?: string | null;
15
+ } | {
16
+ agentId: string;
17
+ channelId?: string | null;
18
+ channelType: "whatsapp";
19
+ contactHours?: RaizContactHoursWindow[];
20
+ metadata?: {
21
+ [key: string]: unknown;
22
+ };
23
+ name: string;
24
+ template: RaizProfileTemplateInput;
25
+ timeZone?: string | null;
26
+ };
27
+ /**
28
+ * A failed answer.
29
+ */
30
+ export interface RaizCreateProfileConflictError {
31
+ data: null;
32
+ error: RaizCreateProfileConflictFailure;
33
+ /**
34
+ * What every answer carries besides its data or error.
35
+ */
36
+ metadata: ResponseMetadata;
37
+ success: false;
38
+ }
39
+ export type RaizCreateProfileConflictFailure = RaizChannelTypeMismatchFailure | RaizVersionConflictFailure;
40
+ /**
41
+ * A failed answer.
42
+ */
43
+ export interface RaizCreateProfileServiceUnavailableError {
44
+ data: null;
45
+ error: RaizCreateProfileServiceUnavailableFailure;
46
+ /**
47
+ * What every answer carries besides its data or error.
48
+ */
49
+ metadata: ResponseMetadata;
50
+ success: false;
51
+ }
52
+ export type RaizCreateProfileServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
53
+ /**
54
+ * A failed answer.
55
+ */
56
+ export interface RaizCreateProfileUnprocessableContentError {
57
+ data: null;
58
+ error: RaizCreateProfileUnprocessableContentFailure;
59
+ /**
60
+ * What every answer carries besides its data or error.
61
+ */
62
+ metadata: ResponseMetadata;
63
+ success: false;
64
+ }
65
+ export type RaizCreateProfileUnprocessableContentFailure = RaizTimeZoneUnknownFailure | RaizChannelAgentMismatchFailure;
66
+ /**
67
+ * A failed answer.
68
+ */
69
+ export interface RaizGetProfileServiceUnavailableError {
70
+ data: null;
71
+ error: RaizGetProfileServiceUnavailableFailure;
72
+ /**
73
+ * What every answer carries besides its data or error.
74
+ */
75
+ metadata: ResponseMetadata;
76
+ success: false;
77
+ }
78
+ export type RaizGetProfileServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
79
+ /**
80
+ * A failed answer.
81
+ */
82
+ export interface RaizListProfilesBadRequestError {
83
+ data: null;
84
+ error: RaizListProfilesBadRequestFailure;
85
+ /**
86
+ * What every answer carries besides its data or error.
87
+ */
88
+ metadata: ResponseMetadata;
89
+ success: false;
90
+ }
91
+ export type RaizListProfilesBadRequestFailure = InvalidInputFailure | RaizInvalidCursorFailure;
92
+ /**
93
+ * A failed answer.
94
+ */
95
+ export interface RaizListProfilesServiceUnavailableError {
96
+ data: null;
97
+ error: RaizListProfilesServiceUnavailableFailure;
98
+ /**
99
+ * What every answer carries besides its data or error.
100
+ */
101
+ metadata: ResponseMetadata;
102
+ success: false;
103
+ }
104
+ export type RaizListProfilesServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
3
105
  export interface RaizProfile {
4
106
  /**
5
107
  * Agent id.
@@ -68,6 +170,30 @@ export interface RaizProfilePage {
68
170
  */
69
171
  pageInfo: PageInfo;
70
172
  }
173
+ /**
174
+ * A successful answer.
175
+ */
176
+ export interface RaizProfilePageResponse {
177
+ data: RaizProfilePage;
178
+ error: null;
179
+ /**
180
+ * What every answer carries besides its data or error.
181
+ */
182
+ metadata: ResponseMetadata;
183
+ success: true;
184
+ }
185
+ /**
186
+ * A successful answer.
187
+ */
188
+ export interface RaizProfileResponse {
189
+ data: RaizProfile;
190
+ error: null;
191
+ /**
192
+ * What every answer carries besides its data or error.
193
+ */
194
+ metadata: ResponseMetadata;
195
+ success: true;
196
+ }
71
197
  export interface RaizProfileTemplateInput {
72
198
  /**
73
199
  * The template's language: WhatsApp's code (`es`, `es_MX`) or a BCP 47 tag
@@ -86,5 +212,83 @@ export interface RaizProfileTemplateInput {
86
212
  */
87
213
  parameters?: string[];
88
214
  }
215
+ export interface RaizUpdateProfileBody {
216
+ /**
217
+ * Agent id.
218
+ */
219
+ agentId?: string;
220
+ channelId?: string | null;
221
+ /**
222
+ * When a conversation may start, in the profile's time zone. Empty: any time.
223
+ * Outside them `createConversation` fails with OUTSIDE_CONTACT_HOURS and
224
+ * nothing is sent.
225
+ */
226
+ contactHours?: RaizContactHoursWindow[];
227
+ /**
228
+ * The `version` you read. When present, the change applies only if nobody
229
+ * changed the resource since; otherwise it fails with VERSION_CONFLICT.
230
+ */
231
+ expectedVersion?: number;
232
+ firstMessage?: string | null;
233
+ instructions?: string | null;
234
+ /**
235
+ * Your own keys and labels for this resource (up to 50 keys of 40 characters;
236
+ * values up to 500 characters). Raíz never interprets them.
237
+ */
238
+ metadata?: {
239
+ [key: string]: unknown;
240
+ };
241
+ /**
242
+ * What the profile is for, as people read it.
243
+ */
244
+ name?: string;
245
+ /**
246
+ * The approved template that opens every conversation. WhatsApp allows a
247
+ * business to start a conversation only with one.
248
+ */
249
+ template?: RaizProfileTemplateInput;
250
+ timeZone?: string | null;
251
+ }
252
+ /**
253
+ * A failed answer.
254
+ */
255
+ export interface RaizUpdateProfileConflictError {
256
+ data: null;
257
+ error: RaizUpdateProfileConflictFailure;
258
+ /**
259
+ * What every answer carries besides its data or error.
260
+ */
261
+ metadata: ResponseMetadata;
262
+ success: false;
263
+ }
264
+ export type RaizUpdateProfileConflictFailure = RaizChannelTypeMismatchFailure | RaizVersionConflictFailure;
265
+ /**
266
+ * A failed answer.
267
+ */
268
+ export interface RaizUpdateProfileServiceUnavailableError {
269
+ data: null;
270
+ error: RaizUpdateProfileServiceUnavailableFailure;
271
+ /**
272
+ * What every answer carries besides its data or error.
273
+ */
274
+ metadata: ResponseMetadata;
275
+ success: false;
276
+ }
277
+ export type RaizUpdateProfileServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
278
+ /**
279
+ * A failed answer.
280
+ */
281
+ export interface RaizUpdateProfileUnprocessableContentError {
282
+ data: null;
283
+ error: RaizUpdateProfileUnprocessableContentFailure;
284
+ /**
285
+ * What every answer carries besides its data or error.
286
+ */
287
+ metadata: ResponseMetadata;
288
+ success: false;
289
+ }
290
+ export type RaizUpdateProfileUnprocessableContentFailure = RaizTimeZoneUnknownFailure | RaizChannelAgentMismatchFailure;
89
291
  export declare const RaizProfileCodec: import("../../_/codec.js").Codec;
90
292
  export declare const RaizProfilePageCodec: import("../../_/codec.js").Codec;
293
+ export declare const RaizProfilePageResponseCodec: import("../../_/codec.js").Codec;
294
+ export declare const RaizProfileResponseCodec: import("../../_/codec.js").Codec;
@@ -8,3 +8,9 @@ export const RaizProfileCodec = object([
8
8
  export const RaizProfilePageCodec = object([
9
9
  ["data", null, array(() => RaizProfileCodec)],
10
10
  ]);
11
+ export const RaizProfilePageResponseCodec = object([
12
+ ["data", null, () => RaizProfilePageCodec],
13
+ ]);
14
+ export const RaizProfileResponseCodec = object([
15
+ ["data", null, () => RaizProfileCodec],
16
+ ]);
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { RaizResponseMetadata } from "../models.js";
3
- import { type RaizReport } from "./models.js";
2
+ import { type RaizReportResponse } from "./models.js";
4
3
  export interface ClientOptions extends BaseClientOptions {
5
4
  /**
6
5
  * The URL the paths of the API are relative to.
@@ -53,6 +52,9 @@ export interface GetRequest {
53
52
  * Campaign id.
54
53
  */
55
54
  campaignId?: string;
55
+ /**
56
+ * The channel type.
57
+ */
56
58
  channelType?: "voice" | "whatsapp" | "web";
57
59
  /**
58
60
  * Definition id.
@@ -96,9 +98,4 @@ export interface GetRequest {
96
98
  */
97
99
  to?: Temporal.PlainDate;
98
100
  }
99
- export interface GetResponse {
100
- data: RaizReport;
101
- error: null;
102
- metadata: RaizResponseMetadata;
103
- success: true;
104
- }
101
+ export type GetResponse = RaizReportResponse;
@@ -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 { RaizReportCodec } from "./models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { RaizReportResponseCodec } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -14,6 +14,6 @@ const GetOperation = {
14
14
  method: "GET",
15
15
  route: "/v1/raiz/reports",
16
16
  query: { specialty: "specialty", agentId: "agentId", campaignId: "campaignId", channelType: "channelType", definitionId: "definitionId", from: "from", name: "name", to: "to" },
17
- response: object([["data", null, () => RaizReportCodec]]),
18
- 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 },
17
+ response: RaizReportResponseCodec,
18
+ errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
19
  };
@@ -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, } from "./client.js";
5
- export type { RaizReport } from "./models.js";
5
+ export type { RaizGetReportBadRequestError, RaizGetReportBadRequestFailure, RaizGetReportServiceUnavailableError, RaizGetReportServiceUnavailableFailure, RaizReport, RaizReportResponse, } from "./models.js";
@@ -1,3 +1,31 @@
1
+ import type { InvalidInputFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { RaizIntegrationsUnavailableFailure, RaizReportFilterUnsupportedFailure, RaizReportRangeInvalidFailure } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface RaizGetReportBadRequestError {
7
+ data: null;
8
+ error: RaizGetReportBadRequestFailure;
9
+ /**
10
+ * What every answer carries besides its data or error.
11
+ */
12
+ metadata: ResponseMetadata;
13
+ success: false;
14
+ }
15
+ export type RaizGetReportBadRequestFailure = InvalidInputFailure | RaizReportFilterUnsupportedFailure | RaizReportRangeInvalidFailure;
16
+ /**
17
+ * A failed answer.
18
+ */
19
+ export interface RaizGetReportServiceUnavailableError {
20
+ data: null;
21
+ error: RaizGetReportServiceUnavailableFailure;
22
+ /**
23
+ * What every answer carries besides its data or error.
24
+ */
25
+ metadata: ResponseMetadata;
26
+ success: false;
27
+ }
28
+ export type RaizGetReportServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
1
29
  export type RaizReport = {
2
30
  from: Temporal.PlainDate;
3
31
  hasMore: boolean;
@@ -142,4 +170,17 @@ export type RaizReport = {
142
170
  successCount: number;
143
171
  }[];
144
172
  };
173
+ /**
174
+ * A successful answer.
175
+ */
176
+ export interface RaizReportResponse {
177
+ data: RaizReport;
178
+ error: null;
179
+ /**
180
+ * What every answer carries besides its data or error.
181
+ */
182
+ metadata: ResponseMetadata;
183
+ success: true;
184
+ }
145
185
  export declare const RaizReportCodec: import("../../_/codec.js").Codec;
186
+ export declare const RaizReportResponseCodec: import("../../_/codec.js").Codec;
@@ -2,3 +2,6 @@
2
2
  /* eslint-disable */
3
3
  import { array, date, instant, object, union } from "../../_/index.js";
4
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([["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]])]);
5
+ export const RaizReportResponseCodec = object([
6
+ ["data", null, () => RaizReportCodec],
7
+ ]);
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { RaizPhoneNumber, RaizResponseMetadata } from "../models.js";
3
- import { type RaizSuppression, type RaizSuppressionPage } from "./models.js";
2
+ import { type RaizCreateSuppressionBody, type RaizSuppressionPageResponse, type RaizSuppressionResponse } from "./models.js";
4
3
  export interface ClientOptions extends BaseClientOptions {
5
4
  /**
6
5
  * The URL the paths of the API are relative to.
@@ -30,29 +29,8 @@ export interface Client {
30
29
  }
31
30
  export declare function createClient(options: ClientOptions): Client;
32
31
  export declare function bind(transport: Transport): Client;
33
- export type CreateRequest = {
34
- kind: "phone";
35
- phone: RaizPhoneNumber;
36
- reason: string;
37
- } | {
38
- kind: "phone_prefix";
39
- phonePrefix: string;
40
- reason: string;
41
- } | {
42
- ipNetwork: string;
43
- kind: "ip_network";
44
- reason: string;
45
- } | {
46
- countryCode: string;
47
- kind: "country";
48
- reason: string;
49
- };
50
- export interface CreateResponse {
51
- data: RaizSuppression;
52
- error: null;
53
- metadata: RaizResponseMetadata;
54
- success: true;
55
- }
32
+ export type CreateRequest = RaizCreateSuppressionBody;
33
+ export type CreateResponse = RaizSuppressionResponse;
56
34
  export interface ListRequest {
57
35
  /**
58
36
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -82,9 +60,4 @@ export interface ListRequest {
82
60
  */
83
61
  q?: string;
84
62
  }
85
- export interface ListResponse {
86
- data: RaizSuppressionPage;
87
- error: null;
88
- metadata: RaizResponseMetadata;
89
- success: true;
90
- }
63
+ export type ListResponse = RaizSuppressionPageResponse;
@@ -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 { RaizSuppressionCodec, RaizSuppressionPageCodec, } from "./models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { RaizSuppressionPageResponseCodec, RaizSuppressionResponseCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -15,13 +15,13 @@ const CreateOperation = {
15
15
  method: "POST",
16
16
  route: "/v1/raiz/suppressions",
17
17
  body: "flat",
18
- response: object([["data", null, () => RaizSuppressionCodec]]),
19
- 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 },
18
+ response: RaizSuppressionResponseCodec,
19
+ errors: { "400": true, "401": true, "403": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
20
20
  };
21
21
  const ListOperation = {
22
22
  method: "GET",
23
23
  route: "/v1/raiz/suppressions",
24
24
  query: { cursor: "cursor", direction: "direction", limit: "limit", kind: "kind", phone: "phone", q: "q" },
25
- response: object([["data", null, () => RaizSuppressionPageCodec]]),
26
- 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 },
25
+ response: RaizSuppressionPageResponseCodec,
26
+ errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
27
27
  };
@@ -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, ListRequest, ListResponse, } from "./client.js";
5
- export type { RaizSuppression, RaizSuppressionPage, } from "./models.js";
5
+ export type { RaizCreateSuppressionBody, RaizCreateSuppressionServiceUnavailableError, RaizCreateSuppressionServiceUnavailableFailure, RaizIpNetworkInvalidError, RaizListSuppressionsBadRequestError, RaizListSuppressionsBadRequestFailure, RaizListSuppressionsServiceUnavailableError, RaizListSuppressionsServiceUnavailableFailure, RaizSuppression, RaizSuppressionExistsError, RaizSuppressionPage, RaizSuppressionPageResponse, RaizSuppressionResponse, } from "./models.js";
@@ -1,4 +1,76 @@
1
- import type { PageInfo } from "../../models.js";
1
+ import type { InvalidInputFailure, PageInfo, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { RaizIntegrationsUnavailableFailure, RaizInvalidCursorFailure, RaizIpNetworkInvalidFailure, RaizPhoneNumber, RaizSuppressionExistsFailure } from "../models.js";
3
+ export type RaizCreateSuppressionBody = {
4
+ kind: "phone";
5
+ phone: RaizPhoneNumber;
6
+ reason: string;
7
+ } | {
8
+ kind: "phone_prefix";
9
+ phonePrefix: string;
10
+ reason: string;
11
+ } | {
12
+ ipNetwork: string;
13
+ kind: "ip_network";
14
+ reason: string;
15
+ } | {
16
+ countryCode: string;
17
+ kind: "country";
18
+ reason: string;
19
+ };
20
+ /**
21
+ * A failed answer.
22
+ */
23
+ export interface RaizCreateSuppressionServiceUnavailableError {
24
+ data: null;
25
+ error: RaizCreateSuppressionServiceUnavailableFailure;
26
+ /**
27
+ * What every answer carries besides its data or error.
28
+ */
29
+ metadata: ResponseMetadata;
30
+ success: false;
31
+ }
32
+ export type RaizCreateSuppressionServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
33
+ /**
34
+ * A failed answer.
35
+ */
36
+ export interface RaizIpNetworkInvalidError {
37
+ data: null;
38
+ /**
39
+ * The IP network is not a valid IPv4 or IPv6 address or CIDR block.
40
+ */
41
+ error: RaizIpNetworkInvalidFailure;
42
+ /**
43
+ * What every answer carries besides its data or error.
44
+ */
45
+ metadata: ResponseMetadata;
46
+ success: false;
47
+ }
48
+ /**
49
+ * A failed answer.
50
+ */
51
+ export interface RaizListSuppressionsBadRequestError {
52
+ data: null;
53
+ error: RaizListSuppressionsBadRequestFailure;
54
+ /**
55
+ * What every answer carries besides its data or error.
56
+ */
57
+ metadata: ResponseMetadata;
58
+ success: false;
59
+ }
60
+ export type RaizListSuppressionsBadRequestFailure = InvalidInputFailure | RaizInvalidCursorFailure;
61
+ /**
62
+ * A failed answer.
63
+ */
64
+ export interface RaizListSuppressionsServiceUnavailableError {
65
+ data: null;
66
+ error: RaizListSuppressionsServiceUnavailableFailure;
67
+ /**
68
+ * What every answer carries besides its data or error.
69
+ */
70
+ metadata: ResponseMetadata;
71
+ success: false;
72
+ }
73
+ export type RaizListSuppressionsServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
2
74
  export interface RaizSuppression {
3
75
  countryCode: string | null;
4
76
  /**
@@ -15,6 +87,21 @@ export interface RaizSuppression {
15
87
  phonePrefix: string | null;
16
88
  reason: string;
17
89
  }
90
+ /**
91
+ * A failed answer.
92
+ */
93
+ export interface RaizSuppressionExistsError {
94
+ data: null;
95
+ /**
96
+ * This organization already has this suppression rule.
97
+ */
98
+ error: RaizSuppressionExistsFailure;
99
+ /**
100
+ * What every answer carries besides its data or error.
101
+ */
102
+ metadata: ResponseMetadata;
103
+ success: false;
104
+ }
18
105
  export interface RaizSuppressionPage {
19
106
  /**
20
107
  * Items admitted by this resource contract within the verified organization.
@@ -29,5 +116,31 @@ export interface RaizSuppressionPage {
29
116
  */
30
117
  pageInfo: PageInfo;
31
118
  }
119
+ /**
120
+ * A successful answer.
121
+ */
122
+ export interface RaizSuppressionPageResponse {
123
+ data: RaizSuppressionPage;
124
+ error: null;
125
+ /**
126
+ * What every answer carries besides its data or error.
127
+ */
128
+ metadata: ResponseMetadata;
129
+ success: true;
130
+ }
131
+ /**
132
+ * A successful answer.
133
+ */
134
+ export interface RaizSuppressionResponse {
135
+ data: RaizSuppression;
136
+ error: null;
137
+ /**
138
+ * What every answer carries besides its data or error.
139
+ */
140
+ metadata: ResponseMetadata;
141
+ success: true;
142
+ }
32
143
  export declare const RaizSuppressionCodec: import("../../_/codec.js").Codec;
33
144
  export declare const RaizSuppressionPageCodec: import("../../_/codec.js").Codec;
145
+ export declare const RaizSuppressionPageResponseCodec: import("../../_/codec.js").Codec;
146
+ export declare const RaizSuppressionResponseCodec: import("../../_/codec.js").Codec;
@@ -7,3 +7,9 @@ export const RaizSuppressionCodec = object([
7
7
  export const RaizSuppressionPageCodec = object([
8
8
  ["data", null, array(() => RaizSuppressionCodec)],
9
9
  ]);
10
+ export const RaizSuppressionPageResponseCodec = object([
11
+ ["data", null, () => RaizSuppressionPageCodec],
12
+ ]);
13
+ export const RaizSuppressionResponseCodec = object([
14
+ ["data", null, () => RaizSuppressionCodec],
15
+ ]);
@@ -1,6 +1,7 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import { type RaizResponseMetadata, type RaizTask } from "../models.js";
3
- import { type RaizTaskPage } from "./models.js";
2
+ import type { Empty } from "../../models.js";
3
+ import { type RaizTaskResponse } from "../models.js";
4
+ import { type RaizTaskPageResponse } from "./models.js";
4
5
  export interface ClientOptions extends BaseClientOptions {
5
6
  /**
6
7
  * The URL the paths of the API are relative to.
@@ -56,28 +57,16 @@ export interface CancelRequest {
56
57
  * Task id.
57
58
  */
58
59
  taskId: string;
59
- body: {
60
- [key: string]: unknown;
61
- };
62
- }
63
- export interface CancelResponse {
64
- data: RaizTask;
65
- error: null;
66
- metadata: RaizResponseMetadata;
67
- success: true;
60
+ body: Empty;
68
61
  }
62
+ export type CancelResponse = RaizTaskResponse;
69
63
  export interface GetRequest {
70
64
  /**
71
65
  * Task id.
72
66
  */
73
67
  taskId: string;
74
68
  }
75
- export interface GetResponse {
76
- data: RaizTask;
77
- error: null;
78
- metadata: RaizResponseMetadata;
79
- success: true;
80
- }
69
+ export type GetResponse = RaizTaskResponse;
81
70
  export interface ListRequest {
82
71
  /**
83
72
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -96,26 +85,17 @@ export interface ListRequest {
96
85
  * What the task does.
97
86
  */
98
87
  kind?: "contact_import" | "analysis_run" | "knowledge_crawl";
88
+ /**
89
+ * The status.
90
+ */
99
91
  status?: "queued" | "running" | "completed" | "failed" | "cancelled";
100
92
  }
101
- export interface ListResponse {
102
- data: RaizTaskPage;
103
- error: null;
104
- metadata: RaizResponseMetadata;
105
- success: true;
106
- }
93
+ export type ListResponse = RaizTaskPageResponse;
107
94
  export interface RetryRequest {
108
95
  /**
109
96
  * Task id.
110
97
  */
111
98
  taskId: string;
112
- body: {
113
- [key: string]: unknown;
114
- };
115
- }
116
- export interface RetryResponse {
117
- data: RaizTask;
118
- error: null;
119
- metadata: RaizResponseMetadata;
120
- success: true;
99
+ body: Empty;
121
100
  }
101
+ export type RetryResponse = RaizTaskResponse;