simpleapps-com-augur-api 0.8.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- augur_api/__init__.py +43 -0
- augur_api/client.py +453 -0
- augur_api/core/__init__.py +40 -0
- augur_api/core/config.py +75 -0
- augur_api/core/errors.py +173 -0
- augur_api/core/http_client.py +426 -0
- augur_api/core/schemas.py +105 -0
- augur_api/py.typed +0 -0
- augur_api/services/__init__.py +13 -0
- augur_api/services/agr_info/__init__.py +47 -0
- augur_api/services/agr_info/client.py +326 -0
- augur_api/services/agr_info/schemas.py +123 -0
- augur_api/services/agr_site/__init__.py +79 -0
- augur_api/services/agr_site/client.py +384 -0
- augur_api/services/agr_site/schemas.py +268 -0
- augur_api/services/agr_work/__init__.py +7 -0
- augur_api/services/agr_work/client.py +32 -0
- augur_api/services/agr_work/schemas.py +11 -0
- augur_api/services/avalara/__init__.py +17 -0
- augur_api/services/avalara/client.py +64 -0
- augur_api/services/avalara/schemas.py +34 -0
- augur_api/services/base.py +54 -0
- augur_api/services/basecamp2/__init__.py +65 -0
- augur_api/services/basecamp2/client.py +568 -0
- augur_api/services/basecamp2/schemas.py +227 -0
- augur_api/services/brand_folder/__init__.py +31 -0
- augur_api/services/brand_folder/client.py +206 -0
- augur_api/services/brand_folder/schemas.py +133 -0
- augur_api/services/commerce/__init__.py +56 -0
- augur_api/services/commerce/client.py +298 -0
- augur_api/services/commerce/schemas.py +167 -0
- augur_api/services/customers/__init__.py +69 -0
- augur_api/services/customers/client.py +437 -0
- augur_api/services/customers/schemas.py +273 -0
- augur_api/services/gregorovich/__init__.py +31 -0
- augur_api/services/gregorovich/client.py +151 -0
- augur_api/services/gregorovich/schemas.py +42 -0
- augur_api/services/items/__init__.py +302 -0
- augur_api/services/items/client.py +1223 -0
- augur_api/services/items/schemas.py +722 -0
- augur_api/services/joomla/__init__.py +59 -0
- augur_api/services/joomla/client.py +333 -0
- augur_api/services/joomla/schemas.py +286 -0
- augur_api/services/legacy/__init__.py +66 -0
- augur_api/services/legacy/client.py +391 -0
- augur_api/services/legacy/schemas.py +115 -0
- augur_api/services/logistics/__init__.py +34 -0
- augur_api/services/logistics/client.py +116 -0
- augur_api/services/logistics/schemas.py +65 -0
- augur_api/services/nexus/__init__.py +89 -0
- augur_api/services/nexus/client.py +589 -0
- augur_api/services/nexus/schemas.py +171 -0
- augur_api/services/open_search/__init__.py +58 -0
- augur_api/services/open_search/client.py +285 -0
- augur_api/services/open_search/schemas.py +146 -0
- augur_api/services/orders/__init__.py +51 -0
- augur_api/services/orders/client.py +299 -0
- augur_api/services/orders/schemas.py +195 -0
- augur_api/services/p21_apis/__init__.py +83 -0
- augur_api/services/p21_apis/client.py +420 -0
- augur_api/services/p21_apis/schemas.py +130 -0
- augur_api/services/p21_core/__init__.py +29 -0
- augur_api/services/p21_core/client.py +395 -0
- augur_api/services/p21_core/schemas.py +221 -0
- augur_api/services/p21_pim/__init__.py +51 -0
- augur_api/services/p21_pim/client.py +319 -0
- augur_api/services/p21_pim/schemas.py +128 -0
- augur_api/services/p21_sism/__init__.py +60 -0
- augur_api/services/p21_sism/client.py +334 -0
- augur_api/services/p21_sism/schemas.py +92 -0
- augur_api/services/payments/__init__.py +97 -0
- augur_api/services/payments/client.py +508 -0
- augur_api/services/payments/schemas.py +166 -0
- augur_api/services/pricing/__init__.py +43 -0
- augur_api/services/pricing/client.py +175 -0
- augur_api/services/pricing/schemas.py +146 -0
- augur_api/services/resource.py +141 -0
- augur_api/services/shipping/__init__.py +17 -0
- augur_api/services/shipping/client.py +68 -0
- augur_api/services/shipping/schemas.py +38 -0
- augur_api/services/slack/__init__.py +23 -0
- augur_api/services/slack/client.py +74 -0
- augur_api/services/slack/schemas.py +35 -0
- augur_api/services/smarty_streets/__init__.py +19 -0
- augur_api/services/smarty_streets/client.py +82 -0
- augur_api/services/smarty_streets/schemas.py +32 -0
- augur_api/services/ups/__init__.py +17 -0
- augur_api/services/ups/client.py +72 -0
- augur_api/services/ups/schemas.py +41 -0
- augur_api/services/vmi/__init__.py +157 -0
- augur_api/services/vmi/client.py +586 -0
- augur_api/services/vmi/schemas.py +285 -0
- simpleapps_com_augur_api-0.8.10.dist-info/METADATA +177 -0
- simpleapps_com_augur_api-0.8.10.dist-info/RECORD +96 -0
- simpleapps_com_augur_api-0.8.10.dist-info/WHEEL +4 -0
- simpleapps_com_augur_api-0.8.10.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"""Schemas for the Basecamp2 service."""
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
|
|
5
|
+
from augur_api.core.schemas import CamelCaseModel, EdgeCacheParams
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Health Check
|
|
9
|
+
class HealthCheckData(CamelCaseModel):
|
|
10
|
+
"""Health check response data."""
|
|
11
|
+
|
|
12
|
+
site_hash: str | None = None
|
|
13
|
+
site_id: str | None = None
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# Projects
|
|
17
|
+
class ProjectListParams(EdgeCacheParams):
|
|
18
|
+
"""Parameters for listing projects."""
|
|
19
|
+
|
|
20
|
+
limit: int | None = None
|
|
21
|
+
offset: int | None = None
|
|
22
|
+
archived_flag: str | None = None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Project(CamelCaseModel):
|
|
26
|
+
"""Basecamp project entity."""
|
|
27
|
+
|
|
28
|
+
projects_uid: int | None = None
|
|
29
|
+
bc_project_id: int | None = None
|
|
30
|
+
name: str | None = None
|
|
31
|
+
description: str | None = None
|
|
32
|
+
status: str | None = None
|
|
33
|
+
created_at: str | None = None
|
|
34
|
+
updated_at: str | None = None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# Todos
|
|
38
|
+
class TodoListParams(EdgeCacheParams):
|
|
39
|
+
"""Parameters for listing todos."""
|
|
40
|
+
|
|
41
|
+
limit: int | None = None
|
|
42
|
+
offset: int | None = None
|
|
43
|
+
order_by: str | None = None
|
|
44
|
+
completed_flag: str | None = None
|
|
45
|
+
projects_id: int | None = None
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class Todo(CamelCaseModel):
|
|
49
|
+
"""Basecamp todo entity."""
|
|
50
|
+
|
|
51
|
+
todos_uid: int | None = None
|
|
52
|
+
bc_todo_id: int | None = None
|
|
53
|
+
content: str | None = None
|
|
54
|
+
completed: bool | None = None
|
|
55
|
+
due_at: str | None = None
|
|
56
|
+
assignee_id: int | None = None
|
|
57
|
+
project_id: int | None = None
|
|
58
|
+
todolist_id: int | None = None
|
|
59
|
+
created_at: str | None = None
|
|
60
|
+
updated_at: str | None = None
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class TodoCreateParams(BaseModel):
|
|
64
|
+
"""Parameters for creating a todo."""
|
|
65
|
+
|
|
66
|
+
content: str
|
|
67
|
+
todolist_id: int
|
|
68
|
+
due_at: str | None = None
|
|
69
|
+
assignee_id: int | None = None
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class TodoUpdateParams(BaseModel):
|
|
73
|
+
"""Parameters for updating a todo."""
|
|
74
|
+
|
|
75
|
+
content: str | None = None
|
|
76
|
+
completed: bool | None = None
|
|
77
|
+
due_at: str | None = None
|
|
78
|
+
assignee_id: int | None = None
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
# People
|
|
82
|
+
class PersonListParams(EdgeCacheParams):
|
|
83
|
+
"""Parameters for listing people."""
|
|
84
|
+
|
|
85
|
+
limit: int | None = None
|
|
86
|
+
offset: int | None = None
|
|
87
|
+
order_by: str | None = None
|
|
88
|
+
q: str | None = None
|
|
89
|
+
admin_flag: str | None = None
|
|
90
|
+
trashed_flag: str | None = None
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class Person(CamelCaseModel):
|
|
94
|
+
"""Basecamp person entity."""
|
|
95
|
+
|
|
96
|
+
people_uid: int | None = None
|
|
97
|
+
bc_person_id: int | None = None
|
|
98
|
+
name: str | None = None
|
|
99
|
+
email_address: str | None = None
|
|
100
|
+
avatar_url: str | None = None
|
|
101
|
+
admin: bool | None = None
|
|
102
|
+
created_at: str | None = None
|
|
103
|
+
updated_at: str | None = None
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
# Comments
|
|
107
|
+
class CommentListParams(EdgeCacheParams):
|
|
108
|
+
"""Parameters for listing comments."""
|
|
109
|
+
|
|
110
|
+
limit: int | None = None
|
|
111
|
+
offset: int | None = None
|
|
112
|
+
order_by: str | None = None
|
|
113
|
+
creator_id: int | None = None
|
|
114
|
+
todos_id: int | None = None
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class Comment(CamelCaseModel):
|
|
118
|
+
"""Basecamp comment entity."""
|
|
119
|
+
|
|
120
|
+
comments_uid: int | None = None
|
|
121
|
+
bc_comment_id: int | None = None
|
|
122
|
+
content: str | None = None
|
|
123
|
+
creator_id: int | None = None
|
|
124
|
+
todo_id: int | None = None
|
|
125
|
+
created_at: str | None = None
|
|
126
|
+
updated_at: str | None = None
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class CommentCreateParams(BaseModel):
|
|
130
|
+
"""Parameters for creating a comment."""
|
|
131
|
+
|
|
132
|
+
content: str
|
|
133
|
+
todo_id: int
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
# Events
|
|
137
|
+
class EventListParams(EdgeCacheParams):
|
|
138
|
+
"""Parameters for listing events."""
|
|
139
|
+
|
|
140
|
+
limit: int | None = None
|
|
141
|
+
offset: int | None = None
|
|
142
|
+
order_by: str | None = None
|
|
143
|
+
event_type_cd: str | None = None
|
|
144
|
+
id: int | None = None
|
|
145
|
+
people_id: int | None = None
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class Event(CamelCaseModel, extra="allow"):
|
|
149
|
+
"""Basecamp event entity (passthrough for API flexibility)."""
|
|
150
|
+
|
|
151
|
+
events_uid: int | None = None
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
# Metrics
|
|
155
|
+
class MetricsListParams(EdgeCacheParams):
|
|
156
|
+
"""Parameters for listing metrics."""
|
|
157
|
+
|
|
158
|
+
limit: int | None = None
|
|
159
|
+
offset: int | None = None
|
|
160
|
+
order_by: str | None = None
|
|
161
|
+
assignee_id: int | None = None
|
|
162
|
+
creator_id: int | None = None
|
|
163
|
+
has_comments: str | None = None
|
|
164
|
+
is_stale: str | None = None
|
|
165
|
+
needs_response: str | None = None
|
|
166
|
+
projects_id: int | None = None
|
|
167
|
+
todos_status_cd: str | None = None
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
class Metric(CamelCaseModel, extra="allow"):
|
|
171
|
+
"""Basecamp metric entity (passthrough for API flexibility)."""
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
# Todolists
|
|
175
|
+
class TodolistListParams(EdgeCacheParams):
|
|
176
|
+
"""Parameters for listing todolists."""
|
|
177
|
+
|
|
178
|
+
limit: int | None = None
|
|
179
|
+
offset: int | None = None
|
|
180
|
+
order_by: str | None = None
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
class Todolist(CamelCaseModel, extra="allow"):
|
|
184
|
+
"""Basecamp todolist entity (passthrough for API flexibility)."""
|
|
185
|
+
|
|
186
|
+
todolists_uid: int | None = None
|
|
187
|
+
name: str | None = None
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
# Todos Summary
|
|
191
|
+
class TodosSummaryListParams(EdgeCacheParams):
|
|
192
|
+
"""Parameters for listing todos summary."""
|
|
193
|
+
|
|
194
|
+
limit: int | None = None
|
|
195
|
+
offset: int | None = None
|
|
196
|
+
order_by: str | None = None
|
|
197
|
+
akasha_cd: int | None = None
|
|
198
|
+
process_cd: int | None = None
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
class TodosSummary(CamelCaseModel, extra="allow"):
|
|
202
|
+
"""Basecamp todos summary entity (passthrough for API flexibility)."""
|
|
203
|
+
|
|
204
|
+
todos_summary_uid: int | None = None
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
# Sessions
|
|
208
|
+
class SessionListParams(EdgeCacheParams):
|
|
209
|
+
"""Parameters for listing sessions."""
|
|
210
|
+
|
|
211
|
+
limit: int | None = None
|
|
212
|
+
offset: int | None = None
|
|
213
|
+
session_status_cd: int | None = None
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
class Session(CamelCaseModel, extra="allow"):
|
|
217
|
+
"""Basecamp session entity (passthrough for API flexibility)."""
|
|
218
|
+
|
|
219
|
+
session_id: int | None = None
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
class SessionCreateParams(BaseModel, extra="allow"):
|
|
223
|
+
"""Parameters for creating a session (passthrough)."""
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
class SessionUpdateParams(BaseModel, extra="allow"):
|
|
227
|
+
"""Parameters for updating a session (passthrough)."""
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Brand Folder service exports."""
|
|
2
|
+
|
|
3
|
+
from augur_api.services.brand_folder.client import (
|
|
4
|
+
AssetsResource,
|
|
5
|
+
BrandFolderClient,
|
|
6
|
+
CategoriesResource,
|
|
7
|
+
CollectionsResource,
|
|
8
|
+
)
|
|
9
|
+
from augur_api.services.brand_folder.schemas import (
|
|
10
|
+
Asset,
|
|
11
|
+
AssetCreateParams,
|
|
12
|
+
AssetListParams,
|
|
13
|
+
Category,
|
|
14
|
+
CategoryListParams,
|
|
15
|
+
Collection,
|
|
16
|
+
CollectionListParams,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"Asset",
|
|
21
|
+
"AssetCreateParams",
|
|
22
|
+
"AssetListParams",
|
|
23
|
+
"AssetsResource",
|
|
24
|
+
"BrandFolderClient",
|
|
25
|
+
"CategoriesResource",
|
|
26
|
+
"Category",
|
|
27
|
+
"CategoryListParams",
|
|
28
|
+
"Collection",
|
|
29
|
+
"CollectionListParams",
|
|
30
|
+
"CollectionsResource",
|
|
31
|
+
]
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"""Brand Folder service client for digital asset management."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING, Any
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from augur_api.core.http_client import HTTPClient
|
|
9
|
+
from augur_api.core.schemas import BaseResponse
|
|
10
|
+
from augur_api.services.base import BaseServiceClient
|
|
11
|
+
from augur_api.services.brand_folder.schemas import (
|
|
12
|
+
Asset,
|
|
13
|
+
AssetListParams,
|
|
14
|
+
Category,
|
|
15
|
+
CategoryFocusResult,
|
|
16
|
+
CategoryListParams,
|
|
17
|
+
Collection,
|
|
18
|
+
CollectionListParams,
|
|
19
|
+
)
|
|
20
|
+
from augur_api.services.resource import BaseResource
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class AssetsResource(BaseResource):
|
|
24
|
+
"""Resource for /assets endpoints."""
|
|
25
|
+
|
|
26
|
+
def __init__(self, http: HTTPClient) -> None:
|
|
27
|
+
"""Initialize the resource."""
|
|
28
|
+
super().__init__(http, "/assets")
|
|
29
|
+
|
|
30
|
+
def list(self, params: AssetListParams | None = None) -> BaseResponse[list[Asset]]:
|
|
31
|
+
"""List assets.
|
|
32
|
+
|
|
33
|
+
Args:
|
|
34
|
+
params: Optional query parameters for filtering and pagination.
|
|
35
|
+
|
|
36
|
+
Returns:
|
|
37
|
+
BaseResponse containing a list of Asset items.
|
|
38
|
+
"""
|
|
39
|
+
response = self._get(params=params)
|
|
40
|
+
return BaseResponse[list[Asset]].model_validate(response)
|
|
41
|
+
|
|
42
|
+
def get(self, assets_uid: int) -> BaseResponse[Asset]:
|
|
43
|
+
"""Get asset by UID.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
assets_uid: The asset UID.
|
|
47
|
+
|
|
48
|
+
Returns:
|
|
49
|
+
BaseResponse containing the Asset.
|
|
50
|
+
"""
|
|
51
|
+
response = self._get(f"/{assets_uid}")
|
|
52
|
+
return BaseResponse[Asset].model_validate(response)
|
|
53
|
+
|
|
54
|
+
def create(self, data: Any) -> BaseResponse[Asset]:
|
|
55
|
+
"""Create a new asset.
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
data: The asset data to create.
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
BaseResponse containing the created Asset.
|
|
62
|
+
"""
|
|
63
|
+
response = self._post(data=data)
|
|
64
|
+
return BaseResponse[Asset].model_validate(response)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class CategoriesFocusResource(BaseResource):
|
|
68
|
+
"""Resource for /categories/focus endpoints."""
|
|
69
|
+
|
|
70
|
+
def __init__(self, http: HTTPClient) -> None:
|
|
71
|
+
"""Initialize the resource."""
|
|
72
|
+
super().__init__(http, "/categories/focus")
|
|
73
|
+
|
|
74
|
+
def create(self, data: Any) -> BaseResponse[CategoryFocusResult]:
|
|
75
|
+
"""Set category focus configuration.
|
|
76
|
+
|
|
77
|
+
Args:
|
|
78
|
+
data: Category focus configuration parameters.
|
|
79
|
+
|
|
80
|
+
Returns:
|
|
81
|
+
BaseResponse containing the CategoryFocusResult.
|
|
82
|
+
"""
|
|
83
|
+
response = self._post(data=data)
|
|
84
|
+
return BaseResponse[CategoryFocusResult].model_validate(response)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class CategoriesResource(BaseResource):
|
|
88
|
+
"""Resource for /categories endpoints."""
|
|
89
|
+
|
|
90
|
+
def __init__(self, http: HTTPClient) -> None:
|
|
91
|
+
"""Initialize the resource."""
|
|
92
|
+
super().__init__(http, "/categories")
|
|
93
|
+
self._focus: CategoriesFocusResource | None = None
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def focus(self) -> CategoriesFocusResource:
|
|
97
|
+
"""Access category focus endpoints."""
|
|
98
|
+
if self._focus is None:
|
|
99
|
+
self._focus = CategoriesFocusResource(self._http)
|
|
100
|
+
return self._focus
|
|
101
|
+
|
|
102
|
+
def list(self, params: CategoryListParams | None = None) -> BaseResponse[list[Category]]:
|
|
103
|
+
"""List categories.
|
|
104
|
+
|
|
105
|
+
Args:
|
|
106
|
+
params: Optional query parameters for filtering and pagination.
|
|
107
|
+
|
|
108
|
+
Returns:
|
|
109
|
+
BaseResponse containing a list of Category items.
|
|
110
|
+
"""
|
|
111
|
+
response = self._get(params=params)
|
|
112
|
+
return BaseResponse[list[Category]].model_validate(response)
|
|
113
|
+
|
|
114
|
+
def get(self, categories_uid: int) -> BaseResponse[Category]:
|
|
115
|
+
"""Get category by UID.
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
categories_uid: The category UID.
|
|
119
|
+
|
|
120
|
+
Returns:
|
|
121
|
+
BaseResponse containing the Category.
|
|
122
|
+
"""
|
|
123
|
+
response = self._get(f"/{categories_uid}")
|
|
124
|
+
return BaseResponse[Category].model_validate(response)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class CollectionsResource(BaseResource):
|
|
128
|
+
"""Resource for /collections endpoints."""
|
|
129
|
+
|
|
130
|
+
def __init__(self, http: HTTPClient) -> None:
|
|
131
|
+
"""Initialize the resource."""
|
|
132
|
+
super().__init__(http, "/collections")
|
|
133
|
+
|
|
134
|
+
def list(self, params: CollectionListParams | None = None) -> BaseResponse[list[Collection]]:
|
|
135
|
+
"""List collections.
|
|
136
|
+
|
|
137
|
+
Args:
|
|
138
|
+
params: Optional query parameters for filtering and pagination.
|
|
139
|
+
|
|
140
|
+
Returns:
|
|
141
|
+
BaseResponse containing a list of Collection items.
|
|
142
|
+
"""
|
|
143
|
+
response = self._get(params=params)
|
|
144
|
+
return BaseResponse[list[Collection]].model_validate(response)
|
|
145
|
+
|
|
146
|
+
def get(self, collections_uid: int) -> BaseResponse[Collection]:
|
|
147
|
+
"""Get collection by UID.
|
|
148
|
+
|
|
149
|
+
Args:
|
|
150
|
+
collections_uid: The collection UID.
|
|
151
|
+
|
|
152
|
+
Returns:
|
|
153
|
+
BaseResponse containing the Collection.
|
|
154
|
+
"""
|
|
155
|
+
response = self._get(f"/{collections_uid}")
|
|
156
|
+
return BaseResponse[Collection].model_validate(response)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
class BrandFolderClient(BaseServiceClient):
|
|
160
|
+
"""Client for the Brand Folder service.
|
|
161
|
+
|
|
162
|
+
Provides access to digital asset management endpoints including:
|
|
163
|
+
- Health check (health_check)
|
|
164
|
+
- Assets (assets)
|
|
165
|
+
- Categories (categories)
|
|
166
|
+
- Collections (collections)
|
|
167
|
+
|
|
168
|
+
Example:
|
|
169
|
+
>>> from augur_api import AugurAPI
|
|
170
|
+
>>> api = AugurAPI(token="...", site_id="...")
|
|
171
|
+
>>> assets = api.brand_folder.assets.list()
|
|
172
|
+
>>> for asset in assets.data:
|
|
173
|
+
... print(asset.name)
|
|
174
|
+
"""
|
|
175
|
+
|
|
176
|
+
def __init__(self, http_client: HTTPClient) -> None:
|
|
177
|
+
"""Initialize the Brand Folder client.
|
|
178
|
+
|
|
179
|
+
Args:
|
|
180
|
+
http_client: HTTP client for making requests.
|
|
181
|
+
"""
|
|
182
|
+
super().__init__(http_client)
|
|
183
|
+
self._assets: AssetsResource | None = None
|
|
184
|
+
self._categories: CategoriesResource | None = None
|
|
185
|
+
self._collections: CollectionsResource | None = None
|
|
186
|
+
|
|
187
|
+
@property
|
|
188
|
+
def assets(self) -> AssetsResource:
|
|
189
|
+
"""Access assets endpoints."""
|
|
190
|
+
if self._assets is None:
|
|
191
|
+
self._assets = AssetsResource(self._http)
|
|
192
|
+
return self._assets
|
|
193
|
+
|
|
194
|
+
@property
|
|
195
|
+
def categories(self) -> CategoriesResource:
|
|
196
|
+
"""Access categories endpoints."""
|
|
197
|
+
if self._categories is None:
|
|
198
|
+
self._categories = CategoriesResource(self._http)
|
|
199
|
+
return self._categories
|
|
200
|
+
|
|
201
|
+
@property
|
|
202
|
+
def collections(self) -> CollectionsResource:
|
|
203
|
+
"""Access collections endpoints."""
|
|
204
|
+
if self._collections is None:
|
|
205
|
+
self._collections = CollectionsResource(self._http)
|
|
206
|
+
return self._collections
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"""Schemas for the Brand Folder service."""
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
|
|
5
|
+
from augur_api.core.schemas import CamelCaseModel, EdgeCacheParams
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Health Check
|
|
9
|
+
class HealthCheckData(CamelCaseModel):
|
|
10
|
+
"""Health check response data."""
|
|
11
|
+
|
|
12
|
+
site_hash: str | None = None
|
|
13
|
+
site_id: str | None = None
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# Assets
|
|
17
|
+
class AssetListParams(EdgeCacheParams):
|
|
18
|
+
"""Parameters for listing assets."""
|
|
19
|
+
|
|
20
|
+
limit: int | None = None
|
|
21
|
+
offset: int | None = None
|
|
22
|
+
section_id: str | None = None
|
|
23
|
+
collection_id: str | None = None
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Asset(CamelCaseModel):
|
|
27
|
+
"""Brand folder asset entity."""
|
|
28
|
+
|
|
29
|
+
assets_uid: int | None = None
|
|
30
|
+
bf_asset_id: str | None = None
|
|
31
|
+
name: str | None = None
|
|
32
|
+
description: str | None = None
|
|
33
|
+
file_type: str | None = None
|
|
34
|
+
file_size: int | None = None
|
|
35
|
+
cdn_url: str | None = None
|
|
36
|
+
thumbnail_url: str | None = None
|
|
37
|
+
section_id: str | None = None
|
|
38
|
+
created_at: str | None = None
|
|
39
|
+
updated_at: str | None = None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class AssetCreateParams(BaseModel):
|
|
43
|
+
"""Parameters for creating an asset."""
|
|
44
|
+
|
|
45
|
+
name: str
|
|
46
|
+
section_id: str
|
|
47
|
+
description: str | None = None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# Categories
|
|
51
|
+
class CategoryListParams(EdgeCacheParams):
|
|
52
|
+
"""Parameters for listing categories."""
|
|
53
|
+
|
|
54
|
+
limit: int | None = None
|
|
55
|
+
offset: int | None = None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class Category(CamelCaseModel):
|
|
59
|
+
"""Brand folder category entity."""
|
|
60
|
+
|
|
61
|
+
categories_uid: int | None = None
|
|
62
|
+
bf_category_id: str | None = None
|
|
63
|
+
name: str | None = None
|
|
64
|
+
slug: str | None = None
|
|
65
|
+
parent_id: str | None = None
|
|
66
|
+
created_at: str | None = None
|
|
67
|
+
updated_at: str | None = None
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class CategoryFocusParams(BaseModel):
|
|
71
|
+
"""Parameters for setting category focus configuration."""
|
|
72
|
+
|
|
73
|
+
# Category identification
|
|
74
|
+
category_id: str | None = None
|
|
75
|
+
category_name: str | None = None
|
|
76
|
+
category_slug: str | None = None
|
|
77
|
+
# Focus configuration
|
|
78
|
+
focus_level: str | None = None # 'primary', 'secondary', 'tertiary'
|
|
79
|
+
priority: int | None = None # 1-100
|
|
80
|
+
is_active: bool | None = None
|
|
81
|
+
# Brand association
|
|
82
|
+
brand_id: str | None = None
|
|
83
|
+
brand_name: str | None = None
|
|
84
|
+
# Metadata
|
|
85
|
+
description: str | None = None
|
|
86
|
+
tags: list[str] | None = None
|
|
87
|
+
start_date: str | None = None
|
|
88
|
+
end_date: str | None = None
|
|
89
|
+
# Configuration options
|
|
90
|
+
display_order: int | None = None
|
|
91
|
+
visibility: str | None = None # 'public', 'private', 'draft'
|
|
92
|
+
featured: bool | None = None
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class CategoryFocusResult(CamelCaseModel):
|
|
96
|
+
"""Result of category focus configuration."""
|
|
97
|
+
|
|
98
|
+
category_id: str | None = None
|
|
99
|
+
category_name: str | None = None
|
|
100
|
+
category_slug: str | None = None
|
|
101
|
+
focus_level: str | None = None
|
|
102
|
+
priority: int | None = None
|
|
103
|
+
is_active: bool | None = None
|
|
104
|
+
brand_id: str | None = None
|
|
105
|
+
brand_name: str | None = None
|
|
106
|
+
display_order: int | None = None
|
|
107
|
+
visibility: str | None = None
|
|
108
|
+
featured: bool | None = None
|
|
109
|
+
created_at: str | None = None
|
|
110
|
+
updated_at: str | None = None
|
|
111
|
+
effective_date: str | None = None
|
|
112
|
+
expiration_date: str | None = None
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# Collections
|
|
116
|
+
class CollectionListParams(EdgeCacheParams):
|
|
117
|
+
"""Parameters for listing collections."""
|
|
118
|
+
|
|
119
|
+
limit: int | None = None
|
|
120
|
+
offset: int | None = None
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class Collection(CamelCaseModel):
|
|
124
|
+
"""Brand folder collection entity."""
|
|
125
|
+
|
|
126
|
+
collections_uid: int | None = None
|
|
127
|
+
bf_collection_id: str | None = None
|
|
128
|
+
name: str | None = None
|
|
129
|
+
description: str | None = None
|
|
130
|
+
slug: str | None = None
|
|
131
|
+
public: bool | None = None
|
|
132
|
+
created_at: str | None = None
|
|
133
|
+
updated_at: str | None = None
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""Commerce service exports."""
|
|
2
|
+
|
|
3
|
+
from augur_api.services.commerce.client import (
|
|
4
|
+
CartHdrResource,
|
|
5
|
+
CartLineResource,
|
|
6
|
+
CheckoutResource,
|
|
7
|
+
CommerceClient,
|
|
8
|
+
)
|
|
9
|
+
from augur_api.services.commerce.schemas import (
|
|
10
|
+
AlsoBoughtItem,
|
|
11
|
+
AlsoBoughtParams,
|
|
12
|
+
CartHdr,
|
|
13
|
+
CartHdrListParams,
|
|
14
|
+
CartHdrLookupParams,
|
|
15
|
+
CartLine,
|
|
16
|
+
CartLineAddItem,
|
|
17
|
+
CartLineDeleteResponse,
|
|
18
|
+
CartLineUpdateItem,
|
|
19
|
+
Checkout,
|
|
20
|
+
CheckoutCreateParams,
|
|
21
|
+
CheckoutDoc,
|
|
22
|
+
CheckoutDocParams,
|
|
23
|
+
HealthCheckData,
|
|
24
|
+
Prophet21Hdr,
|
|
25
|
+
Prophet21Line,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
__all__ = [
|
|
29
|
+
# Client
|
|
30
|
+
"CommerceClient",
|
|
31
|
+
# Resources
|
|
32
|
+
"CartHdrResource",
|
|
33
|
+
"CartLineResource",
|
|
34
|
+
"CheckoutResource",
|
|
35
|
+
# Health check
|
|
36
|
+
"HealthCheckData",
|
|
37
|
+
# Cart header schemas
|
|
38
|
+
"CartHdr",
|
|
39
|
+
"CartHdrListParams",
|
|
40
|
+
"CartHdrLookupParams",
|
|
41
|
+
"AlsoBoughtParams",
|
|
42
|
+
"AlsoBoughtItem",
|
|
43
|
+
# Cart line schemas
|
|
44
|
+
"CartLine",
|
|
45
|
+
"CartLineAddItem",
|
|
46
|
+
"CartLineUpdateItem",
|
|
47
|
+
"CartLineDeleteResponse",
|
|
48
|
+
# Checkout schemas
|
|
49
|
+
"Checkout",
|
|
50
|
+
"CheckoutCreateParams",
|
|
51
|
+
"CheckoutDoc",
|
|
52
|
+
"CheckoutDocParams",
|
|
53
|
+
# Prophet21 schemas
|
|
54
|
+
"Prophet21Hdr",
|
|
55
|
+
"Prophet21Line",
|
|
56
|
+
]
|