22
33from __future__ import annotations
44
5- from typing import Dict , Optional
6-
75import httpx
86
97from ..._types import Body , Omit , Query , Headers , NotGiven , omit , not_given
3028from ...types .data .record_update_response import RecordUpdateResponse
3129from ...types .data .record_upsert_response import RecordUpsertResponse
3230from ...types .data .record_retrieve_response import RecordRetrieveResponse
31+ from ...types .data .u_record_attributes_param import URecordAttributesParam
3332from ...types .data .record_find_unique_response import RecordFindUniqueResponse
3433
3534__all__ = ["RecordsResource" , "AsyncRecordsResource" ]
@@ -59,7 +58,7 @@ def create(
5958 self ,
6059 object_name : str ,
6160 * ,
62- data : Dict [ str , record_create_params . Data ] ,
61+ data : URecordAttributesParam ,
6362 validation_mode : ValidationMode | Omit = omit ,
6463 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6564 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -70,9 +69,7 @@ def create(
7069 ) -> RecordCreateResponse :
7170 """
7271 Args:
73- data: The attribute values for the new record.
74-
75- All required attributes on the object must be included.
72+ data: Attribute key-value pairs associated with an object record.
7673
7774 validation_mode: Validation mode to use when validating request data.
7875
@@ -148,7 +145,7 @@ def update(
148145 record_id : str ,
149146 * ,
150147 object_name : str ,
151- data : Dict [ str , record_update_params . Data ] ,
148+ data : URecordAttributesParam ,
152149 validation_mode : ValidationMode | Omit = omit ,
153150 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
154151 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -159,7 +156,7 @@ def update(
159156 ) -> RecordUpdateResponse :
160157 """
161158 Args:
162- data: The attribute values to update in the record.
159+ data: Attribute key-value pairs associated with an object record.
163160
164161 validation_mode: Validation mode to use when validating request data.
165162
@@ -238,7 +235,7 @@ def find_unique(
238235 self ,
239236 object_name : str ,
240237 * ,
241- match : Dict [ str , Optional [ record_find_unique_params . Match ]] ,
238+ match : URecordAttributesParam ,
242239 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
243240 # The extra values given here take precedence over values defined on the client or passed to this method.
244241 extra_headers : Headers | None = None ,
@@ -248,11 +245,7 @@ def find_unique(
248245 ) -> RecordFindUniqueResponse :
249246 """
250247 Args:
251- match: The attribute values to match against to find an existing record.
252-
253- At least one unique attribute must be included to ensure that at most one record
254- is matched. Additional unique or non-unique attributes may also be included to
255- refine the matching criteria.
248+ match: Attribute key-value pairs associated with an object record.
256249
257250 extra_headers: Send extra headers
258251
@@ -277,13 +270,13 @@ def upsert(
277270 self ,
278271 object_name : str ,
279272 * ,
280- match : Dict [ str , Optional [ record_upsert_params . Match ]] ,
273+ match : URecordAttributesParam ,
281274 validation_mode : ValidationMode | Omit = omit ,
282- create : Dict [ str , record_upsert_params . Create ] | Omit = omit ,
283- create_or_update : Dict [ str , record_upsert_params . CreateOrUpdate ] | Omit = omit ,
284- create_or_update_if_empty : Dict [ str , record_upsert_params . CreateOrUpdateIfEmpty ] | Omit = omit ,
285- update : Dict [ str , record_upsert_params . Update ] | Omit = omit ,
286- update_if_empty : Dict [ str , record_upsert_params . UpdateIfEmpty ] | Omit = omit ,
275+ create : URecordAttributesParam | Omit = omit ,
276+ create_or_update : URecordAttributesParam | Omit = omit ,
277+ create_or_update_if_empty : URecordAttributesParam | Omit = omit ,
278+ update : URecordAttributesParam | Omit = omit ,
279+ update_if_empty : URecordAttributesParam | Omit = omit ,
287280 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
288281 # The extra values given here take precedence over values defined on the client or passed to this method.
289282 extra_headers : Headers | None = None ,
@@ -293,11 +286,7 @@ def upsert(
293286 ) -> RecordUpsertResponse :
294287 """
295288 Args:
296- match: The attribute values to match against to find an existing record.
297-
298- At least one unique attribute must be included to ensure that at most one record
299- is matched. Additional unique or non-unique attributes may also be included to
300- refine the matching criteria.
289+ match: Attribute key-value pairs associated with an object record.
301290
302291 validation_mode: Validation mode to use when validating request data.
303292
@@ -309,18 +298,15 @@ def upsert(
309298 will still fail if the request body does not contain the proper structure or if
310299 any required attributes fail validation.
311300
312- create: The attribute values to use when creating a new record if no match is found .
301+ create: Attribute key-value pairs associated with an object record.
313302
314- create_or_update: The attribute values to apply during both creation and update operations .
303+ create_or_update: Attribute key-value pairs associated with an object record .
315304
316- create_or_update_if_empty: The attribute values to apply during both creation and update-if-empty
317- operations.
305+ create_or_update_if_empty: Attribute key-value pairs associated with an object record.
318306
319- update: The attribute values to use when updating an existing record if a match is
320- found.
307+ update: Attribute key-value pairs associated with an object record.
321308
322- update_if_empty: The attribute values to update when a matching record is found and the existing
323- attribute value on the record is `null`.
309+ update_if_empty: Attribute key-value pairs associated with an object record.
324310
325311 extra_headers: Send extra headers
326312
@@ -380,7 +366,7 @@ async def create(
380366 self ,
381367 object_name : str ,
382368 * ,
383- data : Dict [ str , record_create_params . Data ] ,
369+ data : URecordAttributesParam ,
384370 validation_mode : ValidationMode | Omit = omit ,
385371 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
386372 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -391,9 +377,7 @@ async def create(
391377 ) -> RecordCreateResponse :
392378 """
393379 Args:
394- data: The attribute values for the new record.
395-
396- All required attributes on the object must be included.
380+ data: Attribute key-value pairs associated with an object record.
397381
398382 validation_mode: Validation mode to use when validating request data.
399383
@@ -471,7 +455,7 @@ async def update(
471455 record_id : str ,
472456 * ,
473457 object_name : str ,
474- data : Dict [ str , record_update_params . Data ] ,
458+ data : URecordAttributesParam ,
475459 validation_mode : ValidationMode | Omit = omit ,
476460 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
477461 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -482,7 +466,7 @@ async def update(
482466 ) -> RecordUpdateResponse :
483467 """
484468 Args:
485- data: The attribute values to update in the record.
469+ data: Attribute key-value pairs associated with an object record.
486470
487471 validation_mode: Validation mode to use when validating request data.
488472
@@ -563,7 +547,7 @@ async def find_unique(
563547 self ,
564548 object_name : str ,
565549 * ,
566- match : Dict [ str , Optional [ record_find_unique_params . Match ]] ,
550+ match : URecordAttributesParam ,
567551 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
568552 # The extra values given here take precedence over values defined on the client or passed to this method.
569553 extra_headers : Headers | None = None ,
@@ -573,11 +557,7 @@ async def find_unique(
573557 ) -> RecordFindUniqueResponse :
574558 """
575559 Args:
576- match: The attribute values to match against to find an existing record.
577-
578- At least one unique attribute must be included to ensure that at most one record
579- is matched. Additional unique or non-unique attributes may also be included to
580- refine the matching criteria.
560+ match: Attribute key-value pairs associated with an object record.
581561
582562 extra_headers: Send extra headers
583563
@@ -602,13 +582,13 @@ async def upsert(
602582 self ,
603583 object_name : str ,
604584 * ,
605- match : Dict [ str , Optional [ record_upsert_params . Match ]] ,
585+ match : URecordAttributesParam ,
606586 validation_mode : ValidationMode | Omit = omit ,
607- create : Dict [ str , record_upsert_params . Create ] | Omit = omit ,
608- create_or_update : Dict [ str , record_upsert_params . CreateOrUpdate ] | Omit = omit ,
609- create_or_update_if_empty : Dict [ str , record_upsert_params . CreateOrUpdateIfEmpty ] | Omit = omit ,
610- update : Dict [ str , record_upsert_params . Update ] | Omit = omit ,
611- update_if_empty : Dict [ str , record_upsert_params . UpdateIfEmpty ] | Omit = omit ,
587+ create : URecordAttributesParam | Omit = omit ,
588+ create_or_update : URecordAttributesParam | Omit = omit ,
589+ create_or_update_if_empty : URecordAttributesParam | Omit = omit ,
590+ update : URecordAttributesParam | Omit = omit ,
591+ update_if_empty : URecordAttributesParam | Omit = omit ,
612592 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
613593 # The extra values given here take precedence over values defined on the client or passed to this method.
614594 extra_headers : Headers | None = None ,
@@ -618,11 +598,7 @@ async def upsert(
618598 ) -> RecordUpsertResponse :
619599 """
620600 Args:
621- match: The attribute values to match against to find an existing record.
622-
623- At least one unique attribute must be included to ensure that at most one record
624- is matched. Additional unique or non-unique attributes may also be included to
625- refine the matching criteria.
601+ match: Attribute key-value pairs associated with an object record.
626602
627603 validation_mode: Validation mode to use when validating request data.
628604
@@ -634,18 +610,15 @@ async def upsert(
634610 will still fail if the request body does not contain the proper structure or if
635611 any required attributes fail validation.
636612
637- create: The attribute values to use when creating a new record if no match is found .
613+ create: Attribute key-value pairs associated with an object record.
638614
639- create_or_update: The attribute values to apply during both creation and update operations .
615+ create_or_update: Attribute key-value pairs associated with an object record .
640616
641- create_or_update_if_empty: The attribute values to apply during both creation and update-if-empty
642- operations.
617+ create_or_update_if_empty: Attribute key-value pairs associated with an object record.
643618
644- update: The attribute values to use when updating an existing record if a match is
645- found.
619+ update: Attribute key-value pairs associated with an object record.
646620
647- update_if_empty: The attribute values to update when a matching record is found and the existing
648- attribute value on the record is `null`.
621+ update_if_empty: Attribute key-value pairs associated with an object record.
649622
650623 extra_headers: Send extra headers
651624
0 commit comments