@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,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { array, instant, object } from "../../_/index.js";
4
- import { RaizBusinessHoursCodec } from "../models.js";
4
+ import { RaizBusinessHoursCodec, } from "../models.js";
5
5
  export const RaizAgentCodec = object([
6
6
  ["channels", null, array(object([["lastBusinessAppGreetingAt", null, instant]]))],
7
7
  ["createdAt", null, instant],
@@ -10,6 +10,18 @@ export const RaizAgentCodec = object([
10
10
  export const RaizAgentPageCodec = object([
11
11
  ["data", null, array(() => RaizAgentCodec)],
12
12
  ]);
13
+ export const RaizAgentPageResponseCodec = object([
14
+ ["data", null, () => RaizAgentPageCodec],
15
+ ]);
16
+ export const RaizAgentResponseCodec = object([
17
+ ["data", null, () => RaizAgentCodec],
18
+ ]);
13
19
  export const RaizAgentSettingsInputCodec = object([
14
20
  ["businessHours", null, () => RaizBusinessHoursCodec],
15
21
  ]);
22
+ export const RaizCreateAgentBodyCodec = object([
23
+ ["settings", null, () => RaizAgentSettingsInputCodec],
24
+ ]);
25
+ export const RaizUpdateAgentBodyCodec = object([
26
+ ["settings", null, () => RaizAgentSettingsInputCodec],
27
+ ]);
@@ -1,7 +1,6 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { DeletedObject } from "../../models.js";
3
- import type { RaizResponseMetadata } from "../models.js";
4
- import { type RaizBulletin, type RaizBulletinPage } from "./models.js";
2
+ import type { DeletedObjectResponse } from "../../models.js";
3
+ import { type RaizBulletinPageResponse, type RaizBulletinResponse, type RaizCreateBulletinBody, type RaizUpdateBulletinBody } from "./models.js";
5
4
  export interface ClientOptions extends BaseClientOptions {
6
5
  /**
7
6
  * The URL the paths of the API are relative to.
@@ -69,59 +68,22 @@ export interface Client {
69
68
  }
70
69
  export declare function createClient(options: ClientOptions): Client;
71
70
  export declare function bind(transport: Transport): Client;
72
- export interface CreateRequest {
73
- agentId?: string | null;
74
- /**
75
- * When Agents stop applying it, later than its start and than now. Omit it or
76
- * send null to keep it until it is deleted.
77
- */
78
- endsAt?: Temporal.Instant | null;
79
- /**
80
- * When Agents start applying it; default now. No Agent reads it before. For
81
- * Agents to know ahead (so they book no appointment on a closed day), start
82
- * it now and write the dates in the text.
83
- */
84
- startsAt?: Temporal.Instant;
85
- /**
86
- * What is happening and what the Agents should do about it, written as you
87
- * would tell them. One situation per bulletin; long reference material
88
- * belongs in Knowledge.
89
- */
90
- text: string;
91
- }
92
- export interface CreateResponse {
93
- data: RaizBulletin;
94
- error: null;
95
- metadata: RaizResponseMetadata;
96
- success: true;
97
- }
71
+ export type CreateRequest = RaizCreateBulletinBody;
72
+ export type CreateResponse = RaizBulletinResponse;
98
73
  export interface DeleteRequest {
99
74
  /**
100
75
  * Bulletin id.
101
76
  */
102
77
  bulletinId: string;
103
- body: {
104
- [key: string]: unknown;
105
- };
106
- }
107
- export interface DeleteResponse {
108
- data: DeletedObject;
109
- error: null;
110
- metadata: RaizResponseMetadata;
111
- success: true;
112
78
  }
79
+ export type DeleteResponse = DeletedObjectResponse;
113
80
  export interface GetRequest {
114
81
  /**
115
82
  * Bulletin id.
116
83
  */
117
84
  bulletinId: string;
118
85
  }
119
- export interface GetResponse {
120
- data: RaizBulletin;
121
- error: null;
122
- metadata: RaizResponseMetadata;
123
- success: true;
124
- }
86
+ export type GetResponse = RaizBulletinResponse;
125
87
  export interface ListRequest {
126
88
  /**
127
89
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -150,37 +112,11 @@ export interface ListRequest {
150
112
  */
151
113
  status?: string;
152
114
  }
153
- export interface ListResponse {
154
- data: RaizBulletinPage;
155
- error: null;
156
- metadata: RaizResponseMetadata;
157
- success: true;
158
- }
159
- export interface UpdateRequest {
115
+ export type ListResponse = RaizBulletinPageResponse;
116
+ export type UpdateRequest = {
160
117
  /**
161
118
  * Bulletin id.
162
119
  */
163
120
  bulletinId: string;
164
- agentId?: string | null;
165
- /**
166
- * When Agents stop applying it, later than its start; send the current
167
- * instant to end it now, or null to keep it until it is deleted.
168
- */
169
- endsAt?: Temporal.Instant | null;
170
- /**
171
- * When Agents start applying it.
172
- */
173
- startsAt?: Temporal.Instant;
174
- /**
175
- * What is happening and what the Agents should do about it, written as you
176
- * would tell them. One situation per bulletin; long reference material
177
- * belongs in Knowledge.
178
- */
179
- text?: string;
180
- }
181
- export interface UpdateResponse {
182
- data: RaizBulletin;
183
- error: null;
184
- metadata: RaizResponseMetadata;
185
- success: true;
186
- }
121
+ } & RaizUpdateBulletinBody;
122
+ export type UpdateResponse = RaizBulletinResponse;
@@ -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 { RaizBulletinCodec, RaizBulletinPageCodec, } from "./models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { RaizBulletinPageResponseCodec, RaizBulletinResponseCodec, RaizCreateBulletinBodyCodec, RaizUpdateBulletinBodyCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -18,35 +18,34 @@ const CreateOperation = {
18
18
  method: "POST",
19
19
  route: "/v1/raiz/bulletins",
20
20
  body: "flat",
21
- request: object([["endsAt", null, instant], ["startsAt", null, instant]]),
22
- response: object([["data", null, () => RaizBulletinCodec]]),
23
- 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 },
21
+ request: RaizCreateBulletinBodyCodec,
22
+ response: RaizBulletinResponseCodec,
23
+ 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
24
  };
25
25
  const DeleteOperation = {
26
26
  method: "DELETE",
27
27
  route: "/v1/raiz/bulletins/{bulletinId}",
28
- body: "nested",
29
28
  response: null,
30
- 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 },
29
+ errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
31
30
  };
32
31
  const GetOperation = {
33
32
  method: "GET",
34
33
  route: "/v1/raiz/bulletins/{bulletinId}",
35
- response: object([["data", null, () => RaizBulletinCodec]]),
36
- 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 },
34
+ response: RaizBulletinResponseCodec,
35
+ errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
37
36
  };
38
37
  const ListOperation = {
39
38
  method: "GET",
40
39
  route: "/v1/raiz/bulletins",
41
40
  query: { cursor: "cursor", direction: "direction", limit: "limit", agentId: "agentId", q: "q", status: "status" },
42
- response: object([["data", null, () => RaizBulletinPageCodec]]),
43
- 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 },
41
+ response: RaizBulletinPageResponseCodec,
42
+ errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
44
43
  };
45
44
  const UpdateOperation = {
46
45
  method: "PATCH",
47
46
  route: "/v1/raiz/bulletins/{bulletinId}",
48
47
  body: "flat",
49
- request: object([["endsAt", null, instant], ["startsAt", null, instant]]),
50
- response: object([["data", null, () => RaizBulletinCodec]]),
51
- 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 },
48
+ request: RaizUpdateBulletinBodyCodec,
49
+ response: RaizBulletinResponseCodec,
50
+ 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 },
52
51
  };
@@ -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, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { RaizBulletin, RaizBulletinAgent, RaizBulletinPage, } from "./models.js";
5
+ export type { RaizBulletin, RaizBulletinAgent, RaizBulletinLimitReachedError, RaizBulletinPage, RaizBulletinPageResponse, RaizBulletinPeriodInvalidError, RaizBulletinResponse, RaizCreateBulletinBody, RaizListBulletinsBadRequestError, RaizListBulletinsBadRequestFailure, RaizUpdateBulletinBody, } from "./models.js";
@@ -1,4 +1,5 @@
1
- import type { PageInfo } from "../../models.js";
1
+ import type { InvalidInputFailure, PageInfo, ResponseMetadata } from "../../models.js";
2
+ import type { RaizBulletinLimitReachedFailure, RaizBulletinPeriodInvalidFailure, RaizInvalidCursorFailure } from "../models.js";
2
3
  export interface RaizBulletin {
3
4
  agent: RaizBulletinAgent | null;
4
5
  /**
@@ -35,6 +36,22 @@ export interface RaizBulletinAgent {
35
36
  id: string;
36
37
  name: string;
37
38
  }
39
+ /**
40
+ * A failed answer.
41
+ */
42
+ export interface RaizBulletinLimitReachedError {
43
+ data: null;
44
+ /**
45
+ * The organization already has 30 bulletins in force or scheduled. End or
46
+ * delete one before adding another.
47
+ */
48
+ error: RaizBulletinLimitReachedFailure;
49
+ /**
50
+ * What every answer carries besides its data or error.
51
+ */
52
+ metadata: ResponseMetadata;
53
+ success: false;
54
+ }
38
55
  export interface RaizBulletinPage {
39
56
  /**
40
57
  * Items admitted by this resource contract within the verified organization.
@@ -49,5 +66,99 @@ export interface RaizBulletinPage {
49
66
  */
50
67
  pageInfo: PageInfo;
51
68
  }
69
+ /**
70
+ * A successful answer.
71
+ */
72
+ export interface RaizBulletinPageResponse {
73
+ data: RaizBulletinPage;
74
+ error: null;
75
+ /**
76
+ * What every answer carries besides its data or error.
77
+ */
78
+ metadata: ResponseMetadata;
79
+ success: true;
80
+ }
81
+ /**
82
+ * A failed answer.
83
+ */
84
+ export interface RaizBulletinPeriodInvalidError {
85
+ data: null;
86
+ /**
87
+ * A bulletin must end after it starts, and a new one must end in the future.
88
+ */
89
+ error: RaizBulletinPeriodInvalidFailure;
90
+ /**
91
+ * What every answer carries besides its data or error.
92
+ */
93
+ metadata: ResponseMetadata;
94
+ success: false;
95
+ }
96
+ /**
97
+ * A successful answer.
98
+ */
99
+ export interface RaizBulletinResponse {
100
+ data: RaizBulletin;
101
+ error: null;
102
+ /**
103
+ * What every answer carries besides its data or error.
104
+ */
105
+ metadata: ResponseMetadata;
106
+ success: true;
107
+ }
108
+ export interface RaizCreateBulletinBody {
109
+ agentId?: string | null;
110
+ /**
111
+ * When Agents stop applying it, later than its start and than now. Omit it or
112
+ * send null to keep it until it is deleted.
113
+ */
114
+ endsAt?: Temporal.Instant | null;
115
+ /**
116
+ * When Agents start applying it; default now. No Agent reads it before. For
117
+ * Agents to know ahead (so they book no appointment on a closed day), start
118
+ * it now and write the dates in the text.
119
+ */
120
+ startsAt?: Temporal.Instant;
121
+ /**
122
+ * What is happening and what the Agents should do about it, written as you
123
+ * would tell them. One situation per bulletin; long reference material
124
+ * belongs in Knowledge.
125
+ */
126
+ text: string;
127
+ }
128
+ /**
129
+ * A failed answer.
130
+ */
131
+ export interface RaizListBulletinsBadRequestError {
132
+ data: null;
133
+ error: RaizListBulletinsBadRequestFailure;
134
+ /**
135
+ * What every answer carries besides its data or error.
136
+ */
137
+ metadata: ResponseMetadata;
138
+ success: false;
139
+ }
140
+ export type RaizListBulletinsBadRequestFailure = InvalidInputFailure | RaizInvalidCursorFailure;
141
+ export interface RaizUpdateBulletinBody {
142
+ agentId?: string | null;
143
+ /**
144
+ * When Agents stop applying it, later than its start; send the current
145
+ * instant to end it now, or null to keep it until it is deleted.
146
+ */
147
+ endsAt?: Temporal.Instant | null;
148
+ /**
149
+ * When Agents start applying it.
150
+ */
151
+ startsAt?: Temporal.Instant;
152
+ /**
153
+ * What is happening and what the Agents should do about it, written as you
154
+ * would tell them. One situation per bulletin; long reference material
155
+ * belongs in Knowledge.
156
+ */
157
+ text?: string;
158
+ }
52
159
  export declare const RaizBulletinCodec: import("../../_/codec.js").Codec;
53
160
  export declare const RaizBulletinPageCodec: import("../../_/codec.js").Codec;
161
+ export declare const RaizBulletinPageResponseCodec: import("../../_/codec.js").Codec;
162
+ export declare const RaizBulletinResponseCodec: import("../../_/codec.js").Codec;
163
+ export declare const RaizCreateBulletinBodyCodec: import("../../_/codec.js").Codec;
164
+ export declare const RaizUpdateBulletinBodyCodec: import("../../_/codec.js").Codec;
@@ -10,3 +10,17 @@ export const RaizBulletinCodec = object([
10
10
  export const RaizBulletinPageCodec = object([
11
11
  ["data", null, array(() => RaizBulletinCodec)],
12
12
  ]);
13
+ export const RaizBulletinPageResponseCodec = object([
14
+ ["data", null, () => RaizBulletinPageCodec],
15
+ ]);
16
+ export const RaizBulletinResponseCodec = object([
17
+ ["data", null, () => RaizBulletinCodec],
18
+ ]);
19
+ export const RaizCreateBulletinBodyCodec = object([
20
+ ["endsAt", null, instant],
21
+ ["startsAt", null, instant],
22
+ ]);
23
+ export const RaizUpdateBulletinBodyCodec = object([
24
+ ["endsAt", null, instant],
25
+ ["startsAt", null, instant],
26
+ ]);
@@ -1,6 +1,6 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { RaizContactHoursWindow, RaizResponseMetadata } from "../models.js";
3
- import { type RaizCampaign, type RaizCampaignPage, type RaizCampaignRecipientInput, type RaizCampaignTemplateInput } from "./models.js";
2
+ import type { Empty } from "../../models.js";
3
+ import { type RaizCampaignPageResponse, type RaizCampaignResponse, type RaizCreateCampaignBody, type RaizUpdateCampaignBody } from "./models.js";
4
4
  export interface ClientOptions extends BaseClientOptions {
5
5
  /**
6
6
  * The URL the paths of the API are relative to.
@@ -96,49 +96,8 @@ export interface Client {
96
96
  }
97
97
  export declare function createClient(options: ClientOptions): Client;
98
98
  export declare function bind(transport: Transport): Client;
99
- export type CreateRequest = {
100
- agentId: string;
101
- channelId?: string | null;
102
- channelType?: "voice";
103
- contactHours?: RaizContactHoursWindow[];
104
- firstMessage?: string | null;
105
- instructions?: string | null;
106
- maxAttempts?: number;
107
- metadata?: {
108
- [key: string]: unknown;
109
- };
110
- name: string;
111
- recipients?: RaizCampaignRecipientInput[];
112
- retryAfterMinutes?: number;
113
- retryOn?: ("no_answer" | "failure")[];
114
- scheduledEndAt?: Temporal.Instant | null;
115
- scheduledStartAt?: Temporal.Instant | null;
116
- timeZone?: string;
117
- } | {
118
- agentId: string;
119
- channelId?: string | null;
120
- channelType: "whatsapp";
121
- contactHours?: RaizContactHoursWindow[];
122
- instructions?: string | null;
123
- maxAttempts?: number;
124
- metadata?: {
125
- [key: string]: unknown;
126
- };
127
- name: string;
128
- recipients?: RaizCampaignRecipientInput[];
129
- retryAfterMinutes?: number;
130
- retryOn?: ("no_answer" | "not_delivered")[];
131
- scheduledEndAt?: Temporal.Instant | null;
132
- scheduledStartAt?: Temporal.Instant | null;
133
- template: RaizCampaignTemplateInput;
134
- timeZone?: string;
135
- };
136
- export interface CreateResponse {
137
- data: RaizCampaign;
138
- error: null;
139
- metadata: RaizResponseMetadata;
140
- success: true;
141
- }
99
+ export type CreateRequest = RaizCreateCampaignBody;
100
+ export type CreateResponse = RaizCampaignResponse;
142
101
  export interface GetRequest {
143
102
  /**
144
103
  * Campaign id.
@@ -181,12 +140,7 @@ export interface GetRequest {
181
140
  */
182
141
  recipientsStatus?: "pending" | "in_progress" | "completed" | "failed" | "cancelled";
183
142
  }
184
- export interface GetResponse {
185
- data: RaizCampaign;
186
- error: null;
187
- metadata: RaizResponseMetadata;
188
- success: true;
189
- }
143
+ export type GetResponse = RaizCampaignResponse;
190
144
  export interface ListRequest {
191
145
  /**
192
146
  * Opaque cursor returned by pageInfo; omit it to request the first page.
@@ -216,102 +170,19 @@ export interface ListRequest {
216
170
  */
217
171
  status?: "queued" | "running" | "paused" | "completed" | "cancelled" | "failed";
218
172
  }
219
- export interface ListResponse {
220
- data: RaizCampaignPage;
221
- error: null;
222
- metadata: RaizResponseMetadata;
223
- success: true;
224
- }
173
+ export type ListResponse = RaizCampaignPageResponse;
225
174
  export interface StartRequest {
226
175
  /**
227
176
  * Campaign id.
228
177
  */
229
178
  campaignId: string;
230
- body: {
231
- [key: string]: unknown;
232
- };
233
- }
234
- export interface StartResponse {
235
- data: RaizCampaign;
236
- error: null;
237
- metadata: RaizResponseMetadata;
238
- success: true;
179
+ body: Empty;
239
180
  }
240
- export interface UpdateRequest {
181
+ export type StartResponse = RaizCampaignResponse;
182
+ export type UpdateRequest = {
241
183
  /**
242
184
  * Campaign id.
243
185
  */
244
186
  campaignId: string;
245
- /**
246
- * Adds these recipients, before or after the start, skipping numbers the
247
- * campaign already has. A list longer than one request arrives in parts this
248
- * way, and repeating a part reaches nobody twice.
249
- */
250
- addRecipients?: RaizCampaignRecipientInput[];
251
- /**
252
- * Changes only before the campaign starts.
253
- */
254
- agentId?: string;
255
- channelId?: string | null;
256
- /**
257
- * When calls may start and messages may leave, in the campaign's time zone.
258
- * Empty: any time. Public holidays count like any other day: whether to reach
259
- * people on one is the organization's decision.
260
- */
261
- contactHours?: RaizContactHoursWindow[];
262
- /**
263
- * The `version` you read. When present, the change applies only if nobody
264
- * changed the resource since; otherwise it fails with VERSION_CONFLICT.
265
- */
266
- expectedVersion?: number;
267
- firstMessage?: string | null;
268
- instructions?: string | null;
269
- /**
270
- * Calls or messages per recipient at most, retries included.
271
- */
272
- maxAttempts?: number;
273
- /**
274
- * Your own keys and labels for this resource (up to 50 keys of 40 characters;
275
- * values up to 500 characters). Raíz never interprets them.
276
- */
277
- metadata?: {
278
- [key: string]: unknown;
279
- };
280
- name?: string;
281
- /**
282
- * Pause (`true`) or resume (`false`) a started campaign. A campaign that
283
- * never started is started with `startCampaign` (INVALID_STATE here).
284
- */
285
- paused?: boolean;
286
- /**
287
- * Before the campaign starts: the complete set, replacing whoever was there.
288
- * Once it started: only adds, skipping numbers it already has.
289
- */
290
- recipients?: RaizCampaignRecipientInput[];
291
- /**
292
- * Wait before a retry or reminder, up to a week.
293
- */
294
- retryAfterMinutes?: number;
295
- /**
296
- * What earns another attempt: `no_answer` and `failure` on a call,
297
- * `no_answer` and `not_delivered` on WhatsApp.
298
- */
299
- retryOn?: ("no_answer" | "failure" | "not_delivered")[];
300
- scheduledEndAt?: Temporal.Instant | null;
301
- scheduledStartAt?: Temporal.Instant | null;
302
- /**
303
- * WhatsApp only. On a started campaign it applies to the messages still to
304
- * go.
305
- */
306
- template?: RaizCampaignTemplateInput;
307
- /**
308
- * IANA time zone name.
309
- */
310
- timeZone?: string;
311
- }
312
- export interface UpdateResponse {
313
- data: RaizCampaign;
314
- error: null;
315
- metadata: RaizResponseMetadata;
316
- success: true;
317
- }
187
+ } & RaizUpdateCampaignBody;
188
+ export type UpdateResponse = RaizCampaignResponse;
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { Transport, array, instant, object, union, } from "../../_/index.js";
4
- import { RaizCampaignCodec, RaizCampaignPageCodec, RaizCampaignRecipientInputCodec, } from "./models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { RaizCampaignPageResponseCodec, RaizCampaignResponseCodec, RaizCreateCampaignBodyCodec, RaizUpdateCampaignBodyCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -18,36 +18,36 @@ const CreateOperation = {
18
18
  method: "POST",
19
19
  route: "/v1/raiz/campaigns",
20
20
  body: "flat",
21
- request: union([object([["recipients", null, array(() => RaizCampaignRecipientInputCodec)], ["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]]), object([["recipients", null, array(() => RaizCampaignRecipientInputCodec)], ["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]])]),
22
- response: object([["data", null, () => RaizCampaignCodec]]),
23
- 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 },
21
+ request: RaizCreateCampaignBodyCodec,
22
+ response: RaizCampaignResponseCodec,
23
+ 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
24
  };
25
25
  const GetOperation = {
26
26
  method: "GET",
27
27
  route: "/v1/raiz/campaigns/{campaignId}",
28
28
  query: { expand: "expand", recipientsCursor: "recipientsCursor", recipientsDirection: "recipientsDirection", recipientsLimit: "recipientsLimit", recipientsQ: "recipientsQ", recipientsResult: "recipientsResult", recipientsStatus: "recipientsStatus" },
29
- response: object([["data", null, () => RaizCampaignCodec]]),
30
- 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 },
29
+ response: RaizCampaignResponseCodec,
30
+ errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
31
31
  };
32
32
  const ListOperation = {
33
33
  method: "GET",
34
34
  route: "/v1/raiz/campaigns",
35
35
  query: { cursor: "cursor", direction: "direction", limit: "limit", agentId: "agentId", channelType: "channelType", status: "status" },
36
- response: object([["data", null, () => RaizCampaignPageCodec]]),
37
- 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 },
36
+ response: RaizCampaignPageResponseCodec,
37
+ errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
38
38
  };
39
39
  const StartOperation = {
40
40
  method: "POST",
41
41
  route: "/v1/raiz/campaigns/{campaignId}/start",
42
42
  body: "nested",
43
- response: object([["data", null, () => RaizCampaignCodec]]),
44
- 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 },
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 },
45
45
  };
46
46
  const UpdateOperation = {
47
47
  method: "PATCH",
48
48
  route: "/v1/raiz/campaigns/{campaignId}",
49
49
  body: "flat",
50
- request: object([["addRecipients", null, array(() => RaizCampaignRecipientInputCodec)], ["recipients", null, array(() => RaizCampaignRecipientInputCodec)], ["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]]),
51
- response: object([["data", null, () => RaizCampaignCodec]]),
52
- 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 },
50
+ request: RaizUpdateCampaignBodyCodec,
51
+ response: RaizCampaignResponseCodec,
52
+ 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 },
53
53
  };
@@ -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, RaizCampaignProgress, RaizCampaignReadiness, RaizCampaignRecipientInput, RaizCampaignRecipientPage, RaizCampaignResult, RaizCampaignTemplate, RaizCampaignTemplateInput, RaizTemplateHeaderFile, } from "./models.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, RaizTemplateHeaderFile, RaizUpdateCampaignBadRequestError, RaizUpdateCampaignBadRequestFailure, RaizUpdateCampaignBody, RaizUpdateCampaignConflictError, RaizUpdateCampaignConflictFailure, RaizUpdateCampaignServiceUnavailableError, RaizUpdateCampaignServiceUnavailableFailure, RaizUpdateCampaignUnprocessableContentError, RaizUpdateCampaignUnprocessableContentFailure, } from "./models.js";