@@ -3,15 +3,21 @@ import { z } from 'zod';
33
44const outreachRelationship = z . object ( {
55 data : z . object ( {
6- id : z . string ( ) ,
6+ id : z . string ( ) . or ( z . number ( ) ) ,
77 } ) ,
88} ) ;
9+ const outreachMultiRelationship = z . object ( {
10+ data : z . array (
11+ z . object ( {
12+ id : z . string ( ) . or ( z . number ( ) ) ,
13+ } ) ,
14+ ) ,
15+ } ) ;
916export const outreachPaginatedResponse = z . object ( {
1017 links : z
1118 . object ( {
1219 next : z . string ( ) . nullish ( ) ,
1320 } )
14-
1521 . nullish ( ) ,
1622} ) ;
1723
@@ -170,14 +176,14 @@ export const outreachSequenceStep = custom.object({
170176 positiveReplyCount : z . number ( ) . nullable ( ) ,
171177 replyCount : z . number ( ) . nullable ( ) ,
172178 scheduleCount : z . number ( ) . nullable ( ) ,
173- stepType : z . string ( ) . nullable ( ) ,
179+ stepType : z . string ( ) ,
174180 taskAutoskipDelay : z . number ( ) . nullable ( ) ,
175181 taskNote : z . string ( ) . nullable ( ) ,
176182 updatedAt : custom . date ( ) . nullable ( ) ,
177183 } ) ,
178184 relationships : z . object ( {
179185 sequence : outreachRelationship . nullable ( ) ,
180- sequenceTemplates : outreachRelationship . nullable ( ) ,
186+ sequenceTemplates : outreachMultiRelationship . nullable ( ) ,
181187 } ) ,
182188} ) ;
183189
@@ -186,11 +192,11 @@ export const outreachTemplate = custom.object({
186192 attributes : z . object ( {
187193 archived : z . boolean ( ) . nullable ( ) ,
188194 archivedAt : custom . date ( ) . nullable ( ) ,
189- bccRecipients : z . string ( ) . nullable ( ) ,
195+ bccRecipients : z . array ( z . string ( ) ) . nullable ( ) ,
190196 bodyHtml : z . string ( ) . nullable ( ) ,
191197 bodyText : z . string ( ) . nullable ( ) ,
192198 bounceCount : z . number ( ) . nullable ( ) ,
193- ccRecipients : z . string ( ) . nullable ( ) ,
199+ ccRecipients : z . array ( z . string ( ) ) . nullable ( ) ,
194200 clickCount : z . number ( ) . nullable ( ) ,
195201 createdAt : custom . date ( ) . nullable ( ) ,
196202 deliverCount : z . number ( ) . nullable ( ) ,
@@ -206,8 +212,8 @@ export const outreachTemplate = custom.object({
206212 scheduleCount : z . number ( ) . nullable ( ) ,
207213 shareType : z . string ( ) . nullable ( ) ,
208214 subject : z . string ( ) . nullable ( ) ,
209- tags : z . string ( ) . nullable ( ) ,
210- toRecipients : z . string ( ) . nullable ( ) ,
215+ tags : z . array ( z . string ( ) ) . nullable ( ) ,
216+ toRecipients : z . array ( z . string ( ) ) . nullable ( ) ,
211217 trackLinks : z . boolean ( ) . nullable ( ) ,
212218 trackOpens : z . boolean ( ) . nullable ( ) ,
213219 updatedAt : custom . date ( ) . nullable ( ) ,
@@ -235,7 +241,7 @@ export const outreachSequenceTemplate = custom.object({
235241 updatedAt : custom . date ( ) . nullable ( ) ,
236242 } ) ,
237243 relationships : z . object ( {
238- template : outreachTemplate . nullable ( ) ,
244+ template : outreachRelationship . nullable ( ) ,
239245 } ) ,
240246} ) ;
241247
0 commit comments