Catalog Models
Catalog API models.
Field shapes ported against ab/api/schemas/catalog.json (swagger,
Tier 3) with ABConnectTools/ABConnect/api/models/catalog.py as
secondary reference (Tier 4). The prior placeholder implementation
had invented field names for AddCatalogRequest,
UpdateCatalogRequest, and BulkInsertRequest that did not match
either source — see specs/036-lotsdb-migration-prep/gap-recommendations.md.
SellerDto is a TYPE_CHECKING-only import to break the
catalog ↔ sellers circular reference; _rebuild_catalog_models()
at the bottom of the module does the runtime import and calls
model_rebuild() on any class whose annotations need it.
- class ab.api.models.catalog.CatalogDto(*, id, customerCatalogId=None, agent=None, title=None, startDate, endDate, isCompleted, **extra_data)[source]
Bases:
ResponseModelCore catalog information — parent of
CatalogWithSellersDtoandCatalogExpandedDto.- Parameters:
- start_date: datetime
- end_date: datetime
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.catalog.CatalogWithSellersDto(*, id, customerCatalogId=None, agent=None, title=None, startDate, endDate, isCompleted, sellers=None, **extra_data)[source]
Bases:
CatalogDtoCatalog with embedded sellers — returned by
POST /CatalogandPUT /Catalog/{id}.- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.catalog.CatalogExpandedDto(*, id, customerCatalogId=None, agent=None, title=None, startDate, endDate, isCompleted, sellers=None, lots=None, **extra_data)[source]
Bases:
CatalogDtoCatalog with sellers and lot summaries — returned by
GET /Catalog/{id}.- Parameters:
- lots: List[LotCatalogInformationDto] | None
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'allow', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.catalog.AddCatalogRequest(*, customerCatalogId=None, agent=None, title=None, startDate, endDate, sellerIds=None)[source]
Bases:
RequestModelBody for
POST /Catalog.start_dateandend_dateare required per swagger (nonullable: true). All other fields are optional.- Parameters:
- start_date: datetime
- end_date: datetime
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.catalog.UpdateCatalogRequest(*, customerCatalogId=None, agent=None, title=None, startDate, endDate, sellerIds=None)[source]
Bases:
AddCatalogRequestBody for
PUT /Catalog/{id}. Same shape asAddCatalogRequestper swagger.- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.catalog.CatalogListParams(*, Id=None, CustomerCatalogId=None, Agent=None, Title=None, StartDate=None, EndDate=None, IsCompleted=None, SellerIds=None, PageSize=None, PageNumber=None)[source]
Bases:
RequestModelQuery parameters for
GET /Catalog.- Parameters:
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.catalog.BulkInsertSellerRequest(*, name=None, customerDisplayId, isActive)[source]
Bases:
RequestModelSeller entry inside a bulk insert payload.
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.catalog.BulkInsertLotRequest(*, customerItemId=None, lotNumber=None, imageLinks=None, initialData=None, overridenData=None)[source]
Bases:
RequestModelLot entry inside a bulk insert payload.
- Parameters:
customerItemId (str | None)
lotNumber (str | None)
initialData (LotDataDto | None)
overridenData (List[LotDataDto] | None)
- initial_data: LotDataDto | None
- overriden_data: List[LotDataDto] | None
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.catalog.BulkInsertCatalogRequest(*, customerCatalogId=None, agent=None, title=None, startDate, endDate, lots=None, sellers=None)[source]
Bases:
RequestModelCatalog entry inside a bulk insert payload. Nests lots and sellers.
- Parameters:
customerCatalogId (str | None)
agent (str | None)
title (str | None)
startDate (datetime)
endDate (datetime)
lots (List[BulkInsertLotRequest] | None)
sellers (List[BulkInsertSellerRequest] | None)
- start_date: datetime
- end_date: datetime
- lots: List[BulkInsertLotRequest] | None
- sellers: List[BulkInsertSellerRequest] | None
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ab.api.models.catalog.BulkInsertRequest(*, catalogs=None)[source]
Bases:
RequestModelBody for
POST /Bulk/insert.Per swagger, the top-level payload contains exactly one key —
catalogs— a list ofBulkInsertCatalogRequest. Each nested catalog carries its own lots and sellers. This is a nested bulk shape, not a flat list of rows.- Parameters:
catalogs (List[BulkInsertCatalogRequest] | None)
- catalogs: List[BulkInsertCatalogRequest] | None
- model_config = {'alias_generator': <function _to_camel>, 'extra': 'forbid', 'populate_by_name': True, 'str_strip_whitespace': True, 'use_enum_values': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].