@@ -104,9 +104,9 @@ export const hubspotOwnerSchema = z
104
104
id : hubspotIdSchema ,
105
105
createdAt : z . string ( ) . transform ( ( val ) => new Date ( val ) ) ,
106
106
updatedAt : z . string ( ) . transform ( ( val ) => new Date ( val ) ) ,
107
- firstName : z . string ( ) ,
108
- lastName : z . string ( ) ,
109
- email : z . string ( ) ,
107
+ firstName : z . string ( ) . nullable ( ) ,
108
+ lastName : z . string ( ) . nullable ( ) ,
109
+ email : z . string ( ) . nullable ( ) ,
110
110
} )
111
111
. passthrough ( ) ;
112
112
export type HubspotOwner = z . infer < typeof hubspotOwnerSchema > ;
@@ -116,17 +116,16 @@ export type HubspotOwner = z.infer<typeof hubspotOwnerSchema>;
116
116
// -
117
117
const contactPropertiesSchema = z
118
118
. object ( {
119
- firstname : z . string ( ) ,
120
- lastname : z . string ( ) ,
121
- email : z . string ( ) ,
122
- jobtitle : z . string ( ) ,
123
- phone : z . string ( ) ,
124
- mobilephone : z . string ( ) ,
125
- hs_lead_status : z . string ( ) ,
126
- company : z . string ( ) ,
127
- hubspot_owner_id : z . string ( ) ,
119
+ firstname : z . string ( ) . nullable ( ) ,
120
+ lastname : z . string ( ) . nullable ( ) ,
121
+ email : z . string ( ) . nullable ( ) ,
122
+ jobtitle : z . string ( ) . nullable ( ) ,
123
+ phone : z . string ( ) . nullable ( ) ,
124
+ mobilephone : z . string ( ) . nullable ( ) ,
125
+ hs_lead_status : z . string ( ) . nullable ( ) ,
126
+ company : z . string ( ) . nullable ( ) ,
127
+ hubspot_owner_id : z . string ( ) . nullable ( ) ,
128
128
} )
129
- . partial ( )
130
129
. passthrough ( ) ;
131
130
export const contactProperties = Object . keys ( contactPropertiesSchema . shape ) ;
132
131
@@ -158,17 +157,19 @@ export type HubspotContactUpdate = z.infer<
158
157
// -
159
158
const dealPropertiesSchema = z
160
159
. object ( {
161
- amount : z . union ( [ z . string ( ) , z . number ( ) ] ) ,
162
- dealname : z . string ( ) ,
163
- closedate : z . string ( ) . transform ( ( val ) => new Date ( val ) ) ,
164
- dealstage : z . string ( ) ,
165
- hs_deal_stage_probability : z . union ( [ z . string ( ) , z . number ( ) ] ) ,
166
- hs_projected_amount : z . union ( [ z . string ( ) , z . number ( ) ] ) ,
167
- hs_is_closed_won : hubspotBooleanSchema ,
168
- hs_is_closed : hubspotBooleanSchema ,
169
- hubspot_owner_id : z . string ( ) ,
160
+ amount : z . union ( [ z . string ( ) , z . number ( ) ] ) . nullable ( ) ,
161
+ dealname : z . string ( ) . nullable ( ) ,
162
+ closedate : z
163
+ . string ( )
164
+ . transform ( ( val ) => new Date ( val ) )
165
+ . nullable ( ) ,
166
+ dealstage : z . string ( ) . nullable ( ) ,
167
+ hs_deal_stage_probability : z . union ( [ z . string ( ) , z . number ( ) ] ) . nullable ( ) ,
168
+ hs_projected_amount : z . union ( [ z . string ( ) , z . number ( ) ] ) . nullable ( ) ,
169
+ hs_is_closed_won : hubspotBooleanSchema . nullable ( ) ,
170
+ hs_is_closed : hubspotBooleanSchema . nullable ( ) ,
171
+ hubspot_owner_id : z . string ( ) . nullable ( ) ,
170
172
} )
171
- . partial ( )
172
173
. passthrough ( ) ;
173
174
export const dealProperties = Object . keys ( dealPropertiesSchema . shape ) ;
174
175
@@ -196,21 +197,20 @@ export type HubspotDealUpdate = z.infer<typeof hubspotDealUpsertSchema> & {
196
197
// -
197
198
const companyPropertiesSchema = z
198
199
. object ( {
199
- name : z . string ( ) ,
200
- website : z . string ( ) ,
201
- industry : z . string ( ) ,
202
- phone : z . string ( ) ,
203
- address : z . string ( ) ,
204
- city : z . string ( ) ,
205
- state : z . string ( ) ,
206
- zip : z . string ( ) ,
207
- country : z . string ( ) ,
208
- numberofemployees : z . union ( [ z . string ( ) , z . number ( ) ] ) ,
209
- annualrevenue : z . union ( [ z . string ( ) , z . number ( ) ] ) ,
210
- description : z . string ( ) ,
211
- hubspot_owner_id : z . string ( ) ,
200
+ name : z . string ( ) . nullable ( ) ,
201
+ website : z . string ( ) . nullable ( ) ,
202
+ industry : z . string ( ) . nullable ( ) ,
203
+ phone : z . string ( ) . nullable ( ) ,
204
+ address : z . string ( ) . nullable ( ) ,
205
+ city : z . string ( ) . nullable ( ) ,
206
+ state : z . string ( ) . nullable ( ) ,
207
+ zip : z . string ( ) . nullable ( ) ,
208
+ country : z . string ( ) . nullable ( ) ,
209
+ numberofemployees : z . union ( [ z . string ( ) , z . number ( ) ] ) . nullable ( ) ,
210
+ annualrevenue : z . union ( [ z . string ( ) , z . number ( ) ] ) . nullable ( ) ,
211
+ description : z . string ( ) . nullable ( ) ,
212
+ hubspot_owner_id : z . string ( ) . nullable ( ) ,
212
213
} )
213
- . partial ( )
214
214
. passthrough ( ) ;
215
215
export const companyProperties = Object . keys ( companyPropertiesSchema . shape ) ;
216
216
@@ -247,11 +247,10 @@ export type HubspotCompanyUpdate = z.infer<
247
247
// -
248
248
const notePropertiesSchema = z
249
249
. object ( {
250
- hubspot_owner_id : hubspotIdSchema ,
251
- hs_note_body : z . string ( ) ,
252
- hs_timestamp : z . string ( ) ,
250
+ hubspot_owner_id : hubspotIdSchema . nullable ( ) ,
251
+ hs_note_body : z . string ( ) . nullable ( ) ,
252
+ hs_timestamp : z . string ( ) . nullable ( ) ,
253
253
} )
254
- . partial ( )
255
254
. passthrough ( ) ;
256
255
export const noteProperties = Object . keys ( notePropertiesSchema . shape ) ;
257
256
@@ -277,14 +276,16 @@ export type HubspotNoteCreate = z.infer<typeof hubspotNoteUpsertSchema>;
277
276
// -
278
277
const taskPropertiesSchema = z
279
278
. object ( {
280
- hs_task_body : z . string ( ) ,
281
- hs_task_subject : z . string ( ) ,
282
- hs_task_status : z . string ( ) ,
283
- hs_timestamp : z . string ( ) . transform ( ( val ) => new Date ( val ) ) ,
284
- hs_task_priority : z . string ( ) ,
285
- hubspot_owner_id : hubspotIdSchema ,
279
+ hs_task_body : z . string ( ) . nullable ( ) ,
280
+ hs_task_subject : z . string ( ) . nullable ( ) ,
281
+ hs_task_status : z . string ( ) . nullable ( ) ,
282
+ hs_timestamp : z
283
+ . string ( )
284
+ . transform ( ( val ) => new Date ( val ) )
285
+ . nullable ( ) ,
286
+ hs_task_priority : z . string ( ) . nullable ( ) ,
287
+ hubspot_owner_id : hubspotIdSchema . nullable ( ) ,
286
288
} )
287
- . partial ( )
288
289
. passthrough ( ) ;
289
290
export const taskProperties = Object . keys ( taskPropertiesSchema . shape ) ;
290
291
@@ -313,15 +314,14 @@ export type HubspotTaskCreate = z.infer<typeof hubspotTaskUpsertSchema>;
313
314
// -
314
315
const meetingPropertiesSchema = z
315
316
. object ( {
316
- hs_timestamp : custom . date ( ) ,
317
- hs_meeting_title : z . string ( ) ,
318
- hs_meeting_body : z . string ( ) ,
319
- hs_meeting_location : z . string ( ) ,
320
- hs_meeting_start_time : custom . date ( ) . optional ( ) ,
321
- hs_meeting_end_time : custom . date ( ) . optional ( ) ,
322
- hubspot_owner_id : hubspotIdSchema ,
317
+ hs_timestamp : custom . date ( ) . nullable ( ) ,
318
+ hs_meeting_title : z . string ( ) . nullable ( ) ,
319
+ hs_meeting_body : z . string ( ) . nullable ( ) ,
320
+ hs_meeting_location : z . string ( ) . nullable ( ) ,
321
+ hs_meeting_start_time : custom . date ( ) . nullable ( ) ,
322
+ hs_meeting_end_time : custom . date ( ) . nullable ( ) ,
323
+ hubspot_owner_id : hubspotIdSchema . nullable ( ) ,
323
324
} )
324
- . partial ( )
325
325
. passthrough ( ) ;
326
326
export const meetingProperties = Object . keys ( meetingPropertiesSchema . shape ) ;
327
327
@@ -358,21 +358,23 @@ export const hubspotEmailDirectionSchema = z.enum([
358
358
359
359
const emailPropertiesSchema = z
360
360
. object ( {
361
- hs_email_from_email : z . string ( ) ,
362
- hs_email_to_email : z . string ( ) ,
363
- hs_email_cc_email : z . string ( ) ,
364
- hs_email_bcc_email : z . string ( ) ,
365
- hs_email_html : z . string ( ) ,
366
- hs_email_text : z . string ( ) ,
367
- hs_email_direction : hubspotEmailDirectionSchema ,
368
- hs_email_subject : z . string ( ) ,
369
- hs_email_bounce_error_detail_status_code : z . number ( ) ,
370
- hs_attachment_ids : z . array ( hubspotIdSchema ) ,
371
- hs_timestamp : z . string ( ) . transform ( ( val ) => new Date ( val ) ) ,
372
- hs_email_status : z . string ( ) ,
373
- hubspot_owner_id : hubspotIdSchema ,
361
+ hs_email_from_email : z . string ( ) . nullable ( ) ,
362
+ hs_email_to_email : z . string ( ) . nullable ( ) ,
363
+ hs_email_cc_email : z . string ( ) . nullable ( ) ,
364
+ hs_email_bcc_email : z . string ( ) . nullable ( ) ,
365
+ hs_email_html : z . string ( ) . nullable ( ) ,
366
+ hs_email_text : z . string ( ) . nullable ( ) ,
367
+ hs_email_direction : hubspotEmailDirectionSchema . nullable ( ) ,
368
+ hs_email_subject : z . string ( ) . nullable ( ) ,
369
+ hs_email_bounce_error_detail_status_code : z . number ( ) . nullable ( ) ,
370
+ hs_attachment_ids : z . array ( hubspotIdSchema ) . nullable ( ) ,
371
+ hs_timestamp : z
372
+ . string ( )
373
+ . transform ( ( val ) => new Date ( val ) )
374
+ . nullable ( ) ,
375
+ hs_email_status : z . string ( ) . nullable ( ) ,
376
+ hubspot_owner_id : hubspotIdSchema . nullable ( ) ,
374
377
} )
375
- . partial ( )
376
378
. passthrough ( ) ;
377
379
export const emailProperties = Object . keys ( emailPropertiesSchema . shape ) ;
378
380
@@ -421,14 +423,18 @@ export const callDispositionsSchema = z.array(
421
423
422
424
const callPropertiesSchema = z
423
425
. object ( {
424
- hs_call_disposition : z . string ( ) ,
425
- hs_call_direction : z . union ( [ z . literal ( 'INBOUND' ) , z . literal ( 'OUTBOUND' ) ] ) ,
426
- hs_timestamp : z . string ( ) . transform ( ( val ) => new Date ( val ) ) ,
427
- hs_call_body : z . string ( ) ,
428
- hs_call_title : z . string ( ) ,
429
- hubspot_owner_id : hubspotIdSchema ,
426
+ hs_call_disposition : z . string ( ) . nullable ( ) ,
427
+ hs_call_direction : z
428
+ . union ( [ z . literal ( 'INBOUND' ) , z . literal ( 'OUTBOUND' ) ] )
429
+ . nullable ( ) ,
430
+ hs_timestamp : z
431
+ . string ( )
432
+ . transform ( ( val ) => new Date ( val ) )
433
+ . nullable ( ) ,
434
+ hs_call_body : z . string ( ) . nullable ( ) ,
435
+ hs_call_title : z . string ( ) . nullable ( ) ,
436
+ hubspot_owner_id : hubspotIdSchema . nullable ( ) ,
430
437
} )
431
- . partial ( )
432
438
. passthrough ( ) ;
433
439
export const callProperties = Object . keys ( callPropertiesSchema . shape ) ;
434
440
@@ -464,7 +470,7 @@ export type HubspotCallUpdate = z.infer<typeof hubspotCallUpdateSchema> & {
464
470
export const hubspotContactListSchema = z
465
471
. object ( {
466
472
listId : hubspotIdSchema ,
467
- name : z . string ( ) ,
473
+ name : z . string ( ) . nullable ( ) ,
468
474
dynamic : z . boolean ( ) ,
469
475
createdAt : z . number ( ) . transform ( ( val ) => new Date ( val ) ) ,
470
476
updatedAt : z . number ( ) . transform ( ( val ) => new Date ( val ) ) ,
0 commit comments