@@ -217,6 +217,40 @@ export type PipedriveDealUpdate = z.infer<typeof pipedriveDealUpsertSchema> & {
217217 id : string ;
218218} ;
219219
220+ // -
221+ // Organizations
222+ // -
223+ export const pipedriveOrganizationSchema = custom . addNativeToZodSchema (
224+ z . object ( {
225+ id : z . number ( ) ,
226+ name : z . string ( ) ,
227+ address_route : z . string ( ) ,
228+ address_locality : z . string ( ) ,
229+ address_admin_area_level_1 : z . string ( ) ,
230+ address_postal_code : z . string ( ) ,
231+ address_country : z . string ( ) ,
232+ update_time : custom . date ( ) ,
233+ add_time : custom . date ( ) ,
234+ active_flag : z . boolean ( ) , // isDeleted
235+ owner_id : z . object ( { value : z . number ( ) } ) ,
236+ } ) ,
237+ ) ;
238+ export type PipedriveOrganization = z . infer < typeof pipedriveOrganizationSchema > ;
239+ export const pipedriveOrganizationUpsertSchema = z
240+ . object ( {
241+ name : z . string ( ) ,
242+ address : z . string ( ) . optional ( ) ,
243+ owner_id : z . number ( ) . optional ( ) ,
244+ $native : z . record ( z . any ( ) ) ,
245+ } )
246+ . partial ( ) ;
247+ export type PipedriveOrganizationCreate = z . infer <
248+ typeof pipedriveOrganizationUpsertSchema
249+ > ;
250+ export type PipedriveOrganizationUpdate = z . infer <
251+ typeof pipedriveOrganizationUpsertSchema
252+ > & { id : string } ;
253+
220254// -
221255// Notes
222256// -
0 commit comments