@@ -9,7 +9,7 @@ class Contact(BaseModel):
99 Contact model representing a contact in the Devo Global Communications API.
1010 """
1111
12- id : str = Field (..., description = "Unique identifier for the contact" )
12+ id : str = Field (description = "Unique identifier for the contact" )
1313 account_id : Optional [str ] = Field (None , description = "Account identifier" )
1414 user_id : Optional [str ] = Field (None , description = "User identifier" )
1515 phone_number : Optional [str ] = Field (None , description = "Contact phone number in E.164 format" )
@@ -160,7 +160,7 @@ class DeleteContactsDto(BaseModel):
160160 Data transfer object for deleting contacts.
161161 """
162162
163- contact_ids : List [str ] = Field (..., min_items = 1 , description = "List of contact IDs to delete" )
163+ contact_ids : List [str ] = Field (description = "List of contact IDs to delete" , min_length = 1 )
164164
165165 @validator ("contact_ids" )
166166 def validate_contact_ids (cls , v ):
@@ -175,8 +175,8 @@ class AssignToContactsGroupDto(BaseModel):
175175 Data transfer object for assigning/unassigning contacts to/from groups.
176176 """
177177
178- contact_ids : List [str ] = Field (..., min_items = 1 , description = "List of contact IDs" )
179- contacts_group_id : str = Field (..., description = "Contact group ID" )
178+ contact_ids : List [str ] = Field (description = "List of contact IDs" , min_length = 1 )
179+ contacts_group_id : str = Field (description = "Contact group ID" )
180180
181181 @validator ("contact_ids" )
182182 def validate_contact_ids (cls , v ):
@@ -198,7 +198,7 @@ class CreateContactsFromCsvDto(BaseModel):
198198 Data transfer object for importing contacts from CSV.
199199 """
200200
201- csv_data : str = Field (..., description = "CSV data as string" )
201+ csv_data : str = Field (description = "CSV data as string" )
202202 contacts_group_id : Optional [str ] = Field (None , description = "Contact group ID to assign imported contacts" )
203203 skip_duplicates : Optional [bool ] = Field (True , description = "Skip duplicate contacts" )
204204 update_existing : Optional [bool ] = Field (False , description = "Update existing contacts" )
@@ -216,10 +216,10 @@ class CreateContactsFromCsvRespDto(BaseModel):
216216 Response data transfer object for CSV import operation.
217217 """
218218
219- total_processed : int = Field (..., description = "Total number of contacts processed" )
220- successfully_created : int = Field (..., description = "Number of contacts successfully created" )
221- skipped_duplicates : int = Field (..., description = "Number of duplicate contacts skipped" )
222- failed_imports : int = Field (..., description = "Number of failed imports" )
219+ total_processed : int = Field (description = "Total number of contacts processed" )
220+ successfully_created : int = Field (description = "Number of contacts successfully created" )
221+ skipped_duplicates : int = Field (description = "Number of duplicate contacts skipped" )
222+ failed_imports : int = Field (description = "Number of failed imports" )
223223 errors : Optional [List [str ]] = Field (None , description = "List of error messages" )
224224
225225
@@ -228,11 +228,11 @@ class GetContactsSerializer(BaseModel):
228228 Serializer for paginated contacts list response.
229229 """
230230
231- contacts : List [ContactSerializer ] = Field (..., description = "List of contacts" )
232- total : int = Field (..., description = "Total number of contacts" )
233- page : int = Field (..., description = "Current page number" )
234- limit : int = Field (..., description = "Number of contacts per page" )
235- total_pages : int = Field (..., description = "Total number of pages" )
231+ contacts : List [ContactSerializer ] = Field (description = "List of contacts" )
232+ total : int = Field (description = "Total number of contacts" )
233+ page : int = Field (description = "Current page number" )
234+ limit : int = Field (description = "Number of contacts per page" )
235+ total_pages : int = Field (description = "Total number of pages" )
236236
237237 @validator ("page" )
238238 def validate_page (cls , v ):
@@ -255,9 +255,9 @@ class CustomField(BaseModel):
255255 Custom field model.
256256 """
257257
258- id : str = Field (..., description = "Unique identifier for the custom field" )
259- name : str = Field (..., description = "Custom field name" )
260- field_type : str = Field (..., description = "Field type (text, number, date, boolean, etc.)" )
258+ id : str = Field (description = "Unique identifier for the custom field" )
259+ name : str = Field (description = "Custom field name" )
260+ field_type : str = Field (description = "Field type (text, number, date, boolean, etc.)" )
261261 description : Optional [str ] = Field (None , description = "Custom field description" )
262262 is_required : Optional [bool ] = Field (False , description = "Whether the field is required" )
263263 default_value : Optional [Any ] = Field (None , description = "Default value for the field" )
@@ -280,8 +280,8 @@ class CreateCustomFieldDto(BaseModel):
280280 Data transfer object for creating a custom field.
281281 """
282282
283- name : str = Field (..., description = "Custom field name" )
284- field_type : str = Field (..., description = "Field type (text, number, date, boolean, etc.)" )
283+ name : str = Field (description = "Custom field name" )
284+ field_type : str = Field (description = "Field type (text, number, date, boolean, etc.)" )
285285 description : Optional [str ] = Field (None , description = "Custom field description" )
286286 is_required : Optional [bool ] = Field (False , description = "Whether the field is required" )
287287 default_value : Optional [Any ] = Field (None , description = "Default value for the field" )
@@ -337,11 +337,11 @@ class GetCustomFieldsSerializer(BaseModel):
337337 Serializer for paginated custom fields list response.
338338 """
339339
340- custom_fields : List [CustomFieldSerializer ] = Field (..., description = "List of custom fields" )
341- total : int = Field (..., description = "Total number of custom fields" )
342- page : int = Field (..., description = "Current page number" )
343- limit : int = Field (..., description = "Number of custom fields per page" )
344- total_pages : int = Field (..., description = "Total number of pages" )
340+ custom_fields : List [CustomFieldSerializer ] = Field (description = "List of custom fields" )
341+ total : int = Field (description = "Total number of custom fields" )
342+ page : int = Field (description = "Current page number" )
343+ limit : int = Field (description = "Number of custom fields per page" )
344+ total_pages : int = Field (description = "Total number of pages" )
345345
346346 @validator ("page" )
347347 def validate_page (cls , v ):
@@ -363,7 +363,7 @@ class CommonDeleteDto(BaseModel):
363363 Common data transfer object for delete operations.
364364 """
365365
366- ids : List [str ] = Field (..., min_items = 1 , description = "List of IDs to delete" )
366+ ids : List [str ] = Field (description = "List of IDs to delete" , min_length = 1 )
367367
368368 @validator ("ids" )
369369 def validate_ids (cls , v ):
0 commit comments