mysticat-data-service-types 1.0.0__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.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""
|
|
2
|
+
mysticat-data-service-types
|
|
3
|
+
|
|
4
|
+
Pydantic models for Mysticat Data Service API.
|
|
5
|
+
Auto-generated from PostgreSQL/PostgREST schema.
|
|
6
|
+
|
|
7
|
+
Example:
|
|
8
|
+
from mysticat_data_service_types import Organizations, Sites, Audits
|
|
9
|
+
|
|
10
|
+
# Use for validation
|
|
11
|
+
org = Organizations(id="...", name="My Org", ...)
|
|
12
|
+
|
|
13
|
+
# Use for type hints
|
|
14
|
+
def process_site(site: Sites) -> None:
|
|
15
|
+
print(site.base_url)
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from .models import * # noqa: F401, F403
|
|
@@ -0,0 +1,1118 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: openapi.json
|
|
3
|
+
# timestamp: 2026-02-04T11:38:55+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from datetime import date
|
|
8
|
+
from enum import Enum
|
|
9
|
+
from typing import Any
|
|
10
|
+
from uuid import UUID
|
|
11
|
+
|
|
12
|
+
from pydantic import AwareDatetime, BaseModel, Field, constr
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Origin(Enum):
|
|
16
|
+
ESS_OPS = 'ESS_OPS'
|
|
17
|
+
AI = 'AI'
|
|
18
|
+
AUTOMATION = 'AUTOMATION'
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Status(Enum):
|
|
22
|
+
NEW = 'NEW'
|
|
23
|
+
IN_PROGRESS = 'IN_PROGRESS'
|
|
24
|
+
IGNORED = 'IGNORED'
|
|
25
|
+
RESOLVED = 'RESOLVED'
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Opportunities(BaseModel):
|
|
29
|
+
id: UUID = Field(
|
|
30
|
+
...,
|
|
31
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
32
|
+
)
|
|
33
|
+
site_id: UUID = Field(
|
|
34
|
+
...,
|
|
35
|
+
description="Reference to the site this opportunity belongs to\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
36
|
+
)
|
|
37
|
+
audit_id: UUID | None = Field(
|
|
38
|
+
None,
|
|
39
|
+
description="Reference to the audit that discovered this opportunity (if applicable)\n\nNote:\nThis is a Foreign Key to `audits.id`.<fk table='audits' column='id'/>",
|
|
40
|
+
)
|
|
41
|
+
runbook: str | None = Field(
|
|
42
|
+
None,
|
|
43
|
+
description='URL to the runbook/documentation for resolving this opportunity',
|
|
44
|
+
)
|
|
45
|
+
type: str = Field(
|
|
46
|
+
...,
|
|
47
|
+
description='Category of opportunity (e.g., broken-backlinks, high-bounce-rate)',
|
|
48
|
+
)
|
|
49
|
+
data: Any | None = Field(None, description='Opportunity-specific data as JSON')
|
|
50
|
+
origin: Origin = Field(..., description='How this opportunity was discovered')
|
|
51
|
+
title: str = Field(
|
|
52
|
+
..., description='Human-readable title describing the opportunity'
|
|
53
|
+
)
|
|
54
|
+
description: str | None = Field(
|
|
55
|
+
None, description='Detailed description of the opportunity'
|
|
56
|
+
)
|
|
57
|
+
status: Status = Field(
|
|
58
|
+
..., description='Current workflow status of the opportunity'
|
|
59
|
+
)
|
|
60
|
+
guidance: Any | None = Field(
|
|
61
|
+
None, description='AI-generated guidance for resolving the opportunity'
|
|
62
|
+
)
|
|
63
|
+
tags: list[str] | None = Field(
|
|
64
|
+
None, description='Classification tags for filtering and grouping'
|
|
65
|
+
)
|
|
66
|
+
created_at: AwareDatetime = Field(
|
|
67
|
+
..., description='Timestamp when the opportunity was created'
|
|
68
|
+
)
|
|
69
|
+
updated_at: AwareDatetime = Field(
|
|
70
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
71
|
+
)
|
|
72
|
+
updated_by: str | None = Field(
|
|
73
|
+
'system',
|
|
74
|
+
description='Identifier of the user or system that made the last update',
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class Status1(Enum):
|
|
79
|
+
IN_PROGRESS = 'IN_PROGRESS'
|
|
80
|
+
COMPLETED = 'COMPLETED'
|
|
81
|
+
FAILED = 'FAILED'
|
|
82
|
+
CANCELLED = 'CANCELLED'
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class ResultType(Enum):
|
|
86
|
+
S3 = 'S3'
|
|
87
|
+
INLINE = 'INLINE'
|
|
88
|
+
URL = 'URL'
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class AsyncJobs(BaseModel):
|
|
92
|
+
id: UUID = Field(
|
|
93
|
+
...,
|
|
94
|
+
description='Unique identifier (UUID v7, time-sortable) - use this as the job ticket\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
95
|
+
)
|
|
96
|
+
status: Status1 = Field(..., description='Current execution status')
|
|
97
|
+
result_location: str | None = Field(
|
|
98
|
+
None, description='Where to find the result (S3 path, URL, etc.)'
|
|
99
|
+
)
|
|
100
|
+
result_type: ResultType | None = Field(
|
|
101
|
+
None, description='How the result is stored/accessed'
|
|
102
|
+
)
|
|
103
|
+
result: Any | None = Field(
|
|
104
|
+
None, description='Inline result data for small payloads as JSON'
|
|
105
|
+
)
|
|
106
|
+
error: Any | None = Field(
|
|
107
|
+
None, description='Error details if the job failed as JSON'
|
|
108
|
+
)
|
|
109
|
+
metadata: Any | None = Field(None, description='Job-specific metadata as JSON')
|
|
110
|
+
started_at: AwareDatetime = Field(..., description='When job execution began')
|
|
111
|
+
ended_at: AwareDatetime | None = Field(
|
|
112
|
+
None, description='When job execution completed'
|
|
113
|
+
)
|
|
114
|
+
created_at: AwareDatetime = Field(
|
|
115
|
+
..., description='Timestamp when the job was created'
|
|
116
|
+
)
|
|
117
|
+
updated_at: AwareDatetime = Field(
|
|
118
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
119
|
+
)
|
|
120
|
+
updated_by: str | None = Field(
|
|
121
|
+
'system',
|
|
122
|
+
description='Identifier of the user or system that made the last update',
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class Status2(Enum):
|
|
127
|
+
ACTIVE = 'ACTIVE'
|
|
128
|
+
INACTIVE = 'INACTIVE'
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class Experiments(BaseModel):
|
|
132
|
+
id: UUID = Field(
|
|
133
|
+
...,
|
|
134
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
135
|
+
)
|
|
136
|
+
site_id: UUID = Field(
|
|
137
|
+
...,
|
|
138
|
+
description="Reference to the site running the experiment\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
139
|
+
)
|
|
140
|
+
exp_id: str = Field(
|
|
141
|
+
..., description='External experiment identifier (unique per site)'
|
|
142
|
+
)
|
|
143
|
+
name: str | None = Field(None, description='Human-readable experiment name')
|
|
144
|
+
url: str = Field(..., description='URL where the experiment is running')
|
|
145
|
+
type: str | None = Field(None, description='Experiment type classification')
|
|
146
|
+
status: Status2 = Field(
|
|
147
|
+
..., description='Whether the experiment is currently active'
|
|
148
|
+
)
|
|
149
|
+
start_date: AwareDatetime | None = Field(
|
|
150
|
+
None, description='When the experiment started'
|
|
151
|
+
)
|
|
152
|
+
end_date: AwareDatetime | None = Field(
|
|
153
|
+
None, description='When the experiment ended or is scheduled to end'
|
|
154
|
+
)
|
|
155
|
+
conversion_event_name: str | None = Field(
|
|
156
|
+
None, description='Name of the conversion event being tracked'
|
|
157
|
+
)
|
|
158
|
+
conversion_event_value: str | None = Field(
|
|
159
|
+
None, description='Target value for the conversion event'
|
|
160
|
+
)
|
|
161
|
+
variants: Any = Field(
|
|
162
|
+
..., description='Experiment variants and their configurations as JSON'
|
|
163
|
+
)
|
|
164
|
+
created_at: AwareDatetime = Field(
|
|
165
|
+
..., description='Timestamp when the record was created'
|
|
166
|
+
)
|
|
167
|
+
updated_at: AwareDatetime = Field(
|
|
168
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
169
|
+
)
|
|
170
|
+
updated_by: str = Field(
|
|
171
|
+
..., description='Identifier of the user or system that made the last update'
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
class Status3(Enum):
|
|
176
|
+
RUNNING = 'RUNNING'
|
|
177
|
+
COMPLETE = 'COMPLETE'
|
|
178
|
+
FAILED = 'FAILED'
|
|
179
|
+
STOPPED = 'STOPPED'
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
class ScrapeJobs(BaseModel):
|
|
183
|
+
id: UUID = Field(
|
|
184
|
+
...,
|
|
185
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
186
|
+
)
|
|
187
|
+
base_url: str = Field(..., description='Base URL being scraped')
|
|
188
|
+
processing_type: str = Field(
|
|
189
|
+
..., description='Type of processing to apply to scraped content'
|
|
190
|
+
)
|
|
191
|
+
duration: float = Field(..., description='Total job duration in seconds')
|
|
192
|
+
ended_at: AwareDatetime | None = Field(None, description='When the job completed')
|
|
193
|
+
failed_count: int = Field(..., description='Number of URLs that failed to scrape')
|
|
194
|
+
scrape_queue_id: str | None = Field(None, description='External queue identifier')
|
|
195
|
+
options: Any | None = Field(
|
|
196
|
+
None, description='Scraping configuration options as JSON'
|
|
197
|
+
)
|
|
198
|
+
custom_headers: Any | None = Field(
|
|
199
|
+
None, description='Custom HTTP headers for requests as JSON'
|
|
200
|
+
)
|
|
201
|
+
redirect_count: int = Field(..., description='Number of redirects encountered')
|
|
202
|
+
status: Status3 = Field(..., description='Current job status')
|
|
203
|
+
started_at: AwareDatetime = Field(..., description='When the job started')
|
|
204
|
+
success_count: int = Field(..., description='Number of URLs successfully scraped')
|
|
205
|
+
url_count: int = Field(..., description='Total number of URLs to process')
|
|
206
|
+
results: Any | None = Field(None, description='Aggregated scraping results as JSON')
|
|
207
|
+
created_at: AwareDatetime = Field(
|
|
208
|
+
..., description='Timestamp when the job was created'
|
|
209
|
+
)
|
|
210
|
+
updated_at: AwareDatetime = Field(
|
|
211
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
212
|
+
)
|
|
213
|
+
updated_by: str | None = Field(
|
|
214
|
+
'system',
|
|
215
|
+
description='Identifier of the user or system that made the last update',
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
class SiteEnrollments(BaseModel):
|
|
220
|
+
id: UUID = Field(
|
|
221
|
+
...,
|
|
222
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
223
|
+
)
|
|
224
|
+
site_id: UUID = Field(
|
|
225
|
+
...,
|
|
226
|
+
description="Reference to the enrolled site\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
227
|
+
)
|
|
228
|
+
entitlement_id: UUID = Field(
|
|
229
|
+
...,
|
|
230
|
+
description="Reference to the entitlement\n\nNote:\nThis is a Foreign Key to `entitlements.id`.<fk table='entitlements' column='id'/>",
|
|
231
|
+
)
|
|
232
|
+
created_at: AwareDatetime = Field(
|
|
233
|
+
..., description='Timestamp when the enrollment was created'
|
|
234
|
+
)
|
|
235
|
+
updated_at: AwareDatetime = Field(
|
|
236
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
237
|
+
)
|
|
238
|
+
updated_by: str | None = Field(
|
|
239
|
+
'system',
|
|
240
|
+
description='Identifier of the user or system that made the last update',
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
class ProductCode(Enum):
|
|
245
|
+
LLMO = 'LLMO'
|
|
246
|
+
ASO = 'ASO'
|
|
247
|
+
ACO = 'ACO'
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class Tier(Enum):
|
|
251
|
+
FREE_TRIAL = 'FREE_TRIAL'
|
|
252
|
+
PAID = 'PAID'
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
class Entitlements(BaseModel):
|
|
256
|
+
id: UUID = Field(
|
|
257
|
+
...,
|
|
258
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
259
|
+
)
|
|
260
|
+
organization_id: UUID = Field(
|
|
261
|
+
...,
|
|
262
|
+
description="Reference to the organization\n\nNote:\nThis is a Foreign Key to `organizations.id`.<fk table='organizations' column='id'/>",
|
|
263
|
+
)
|
|
264
|
+
product_code: ProductCode = Field(..., description='Product being entitled')
|
|
265
|
+
tier: Tier = Field(..., description='Subscription tier level')
|
|
266
|
+
quotas: Any | None = Field(None, description='Usage limits and quotas as JSON')
|
|
267
|
+
created_at: AwareDatetime = Field(
|
|
268
|
+
..., description='Timestamp when the entitlement was created'
|
|
269
|
+
)
|
|
270
|
+
updated_at: AwareDatetime = Field(
|
|
271
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
272
|
+
)
|
|
273
|
+
updated_by: str | None = Field(
|
|
274
|
+
'system',
|
|
275
|
+
description='Identifier of the user or system that made the last update',
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
class AuditUrls(BaseModel):
|
|
280
|
+
id: UUID = Field(
|
|
281
|
+
...,
|
|
282
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
283
|
+
)
|
|
284
|
+
site_id: UUID = Field(
|
|
285
|
+
...,
|
|
286
|
+
description="Reference to the parent site\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
287
|
+
)
|
|
288
|
+
url: str = Field(..., description='URL to be audited (unique per site)')
|
|
289
|
+
by_customer: bool = Field(
|
|
290
|
+
...,
|
|
291
|
+
description='Whether this URL was added by the customer (vs auto-discovered)',
|
|
292
|
+
)
|
|
293
|
+
audits: list[str] = Field(..., description='List of audit types to run on this URL')
|
|
294
|
+
created_at: AwareDatetime = Field(
|
|
295
|
+
..., description='Timestamp when the URL was registered'
|
|
296
|
+
)
|
|
297
|
+
updated_at: AwareDatetime = Field(
|
|
298
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
299
|
+
)
|
|
300
|
+
created_by: str = Field(..., description='User or system that added this URL')
|
|
301
|
+
updated_by: str | None = Field(
|
|
302
|
+
'system',
|
|
303
|
+
description='Identifier of the user or system that made the last update',
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
class SiteTopForms(BaseModel):
|
|
308
|
+
id: UUID = Field(
|
|
309
|
+
...,
|
|
310
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
311
|
+
)
|
|
312
|
+
site_id: UUID = Field(
|
|
313
|
+
...,
|
|
314
|
+
description="Reference to the parent site\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
315
|
+
)
|
|
316
|
+
url: str = Field(..., description='URL of the page containing the form')
|
|
317
|
+
form_source: str = Field(
|
|
318
|
+
..., description='Identifier for the specific form on the page'
|
|
319
|
+
)
|
|
320
|
+
traffic: int = Field(..., description='Traffic volume to this form')
|
|
321
|
+
source: str = Field(..., description='Analytics source for the traffic data')
|
|
322
|
+
imported_at: AwareDatetime = Field(
|
|
323
|
+
..., description='When this data was imported from the source'
|
|
324
|
+
)
|
|
325
|
+
created_at: AwareDatetime = Field(
|
|
326
|
+
..., description='Timestamp when the record was created'
|
|
327
|
+
)
|
|
328
|
+
updated_at: AwareDatetime = Field(
|
|
329
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
330
|
+
)
|
|
331
|
+
updated_by: str | None = Field(
|
|
332
|
+
'system',
|
|
333
|
+
description='Identifier of the user or system that made the last update',
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
class Type(Enum):
|
|
338
|
+
SIGN_UP = 'SIGN_UP'
|
|
339
|
+
SIGN_IN = 'SIGN_IN'
|
|
340
|
+
CREATE_SITE = 'CREATE_SITE'
|
|
341
|
+
RUN_AUDIT = 'RUN_AUDIT'
|
|
342
|
+
PROMPT_RUN = 'PROMPT_RUN'
|
|
343
|
+
DOWNLOAD = 'DOWNLOAD'
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
class TrialUserActivities(BaseModel):
|
|
347
|
+
id: UUID = Field(
|
|
348
|
+
...,
|
|
349
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
350
|
+
)
|
|
351
|
+
trial_user_id: UUID = Field(
|
|
352
|
+
...,
|
|
353
|
+
description="Reference to the trial user\n\nNote:\nThis is a Foreign Key to `trial_users.id`.<fk table='trial_users' column='id'/>",
|
|
354
|
+
)
|
|
355
|
+
entitlement_id: UUID = Field(
|
|
356
|
+
...,
|
|
357
|
+
description="Reference to the entitlement used\n\nNote:\nThis is a Foreign Key to `entitlements.id`.<fk table='entitlements' column='id'/>",
|
|
358
|
+
)
|
|
359
|
+
site_id: UUID | None = Field(
|
|
360
|
+
None,
|
|
361
|
+
description="Reference to the site involved (if applicable)\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
362
|
+
)
|
|
363
|
+
type: Type = Field(..., description='Type of activity performed')
|
|
364
|
+
details: Any | None = Field(None, description='Activity-specific details as JSON')
|
|
365
|
+
product_code: ProductCode = Field(..., description='Product code for the activity')
|
|
366
|
+
created_at: AwareDatetime = Field(
|
|
367
|
+
..., description='Timestamp when the activity occurred'
|
|
368
|
+
)
|
|
369
|
+
updated_at: AwareDatetime = Field(
|
|
370
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
371
|
+
)
|
|
372
|
+
updated_by: str | None = Field(
|
|
373
|
+
'system',
|
|
374
|
+
description='Identifier of the user or system that made the last update',
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
class PageIntent(Enum):
|
|
379
|
+
INFORMATIONAL = 'INFORMATIONAL'
|
|
380
|
+
NAVIGATIONAL = 'NAVIGATIONAL'
|
|
381
|
+
TRANSACTIONAL = 'TRANSACTIONAL'
|
|
382
|
+
COMMERCIAL = 'COMMERCIAL'
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
class PageIntents(BaseModel):
|
|
386
|
+
id: UUID = Field(
|
|
387
|
+
...,
|
|
388
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
389
|
+
)
|
|
390
|
+
site_id: UUID = Field(
|
|
391
|
+
...,
|
|
392
|
+
description="Reference to the parent site\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
393
|
+
)
|
|
394
|
+
url: str = Field(..., description='Full URL of the page (unique across all sites)')
|
|
395
|
+
page_intent: PageIntent = Field(..., description='Classified search intent type')
|
|
396
|
+
topic: str = Field(..., description='Primary topic or subject of the page')
|
|
397
|
+
created_at: AwareDatetime = Field(
|
|
398
|
+
..., description='Timestamp when the record was created'
|
|
399
|
+
)
|
|
400
|
+
updated_at: AwareDatetime = Field(
|
|
401
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
402
|
+
)
|
|
403
|
+
updated_by: str | None = Field(
|
|
404
|
+
'spacecat',
|
|
405
|
+
description='Identifier of the user or system that made the last update',
|
|
406
|
+
)
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
class Audits(BaseModel):
|
|
410
|
+
id: UUID = Field(
|
|
411
|
+
...,
|
|
412
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
413
|
+
)
|
|
414
|
+
site_id: UUID = Field(
|
|
415
|
+
...,
|
|
416
|
+
description="Reference to the audited site\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
417
|
+
)
|
|
418
|
+
audit_type: str = Field(
|
|
419
|
+
..., description='Type of audit performed (e.g., cwv, lhs, broken-backlinks)'
|
|
420
|
+
)
|
|
421
|
+
audit_result: Any = Field(..., description='Full audit results as JSON')
|
|
422
|
+
full_audit_ref: str = Field(
|
|
423
|
+
..., description='Reference to the complete audit data in external storage'
|
|
424
|
+
)
|
|
425
|
+
is_live: bool = Field(
|
|
426
|
+
..., description='Whether this audit was performed on a live site'
|
|
427
|
+
)
|
|
428
|
+
is_error: bool = Field(..., description='Whether the audit encountered an error')
|
|
429
|
+
invocation_id: str | None = Field(
|
|
430
|
+
None, description='Correlation ID for the audit invocation'
|
|
431
|
+
)
|
|
432
|
+
audited_at: AwareDatetime = Field(
|
|
433
|
+
..., description='Timestamp when the audit was performed'
|
|
434
|
+
)
|
|
435
|
+
created_at: AwareDatetime = Field(
|
|
436
|
+
..., description='Timestamp when the record was created'
|
|
437
|
+
)
|
|
438
|
+
updated_at: AwareDatetime = Field(
|
|
439
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
440
|
+
)
|
|
441
|
+
updated_by: str | None = Field(
|
|
442
|
+
'system',
|
|
443
|
+
description='Identifier of the user or system that made the last update',
|
|
444
|
+
)
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
class ImportJobs(BaseModel):
|
|
448
|
+
id: UUID = Field(
|
|
449
|
+
...,
|
|
450
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
451
|
+
)
|
|
452
|
+
base_url: str = Field(..., description='Base URL being imported from')
|
|
453
|
+
duration: float = Field(..., description='Total job duration in seconds')
|
|
454
|
+
ended_at: AwareDatetime | None = Field(None, description='When the job completed')
|
|
455
|
+
failed_count: int = Field(..., description='Number of URLs that failed to import')
|
|
456
|
+
has_custom_headers: bool = Field(
|
|
457
|
+
..., description='Whether custom HTTP headers were used'
|
|
458
|
+
)
|
|
459
|
+
has_custom_import_js: bool = Field(
|
|
460
|
+
..., description='Whether custom import JavaScript was used'
|
|
461
|
+
)
|
|
462
|
+
hashed_api_key: str = Field(
|
|
463
|
+
..., description='Hash of the API key that initiated the import'
|
|
464
|
+
)
|
|
465
|
+
import_queue_id: str | None = Field(None, description='External queue identifier')
|
|
466
|
+
initiated_by: Any | None = Field(
|
|
467
|
+
None, description='User or system that started the import'
|
|
468
|
+
)
|
|
469
|
+
options: Any | None = Field(
|
|
470
|
+
None, description='Import configuration options as JSON'
|
|
471
|
+
)
|
|
472
|
+
redirect_count: int = Field(..., description='Number of redirects encountered')
|
|
473
|
+
status: Status3 = Field(..., description='Current job status')
|
|
474
|
+
started_at: AwareDatetime = Field(..., description='When the job started')
|
|
475
|
+
success_count: int = Field(..., description='Number of URLs successfully imported')
|
|
476
|
+
url_count: int = Field(..., description='Total number of URLs to process')
|
|
477
|
+
created_at: AwareDatetime = Field(
|
|
478
|
+
..., description='Timestamp when the job was created'
|
|
479
|
+
)
|
|
480
|
+
updated_at: AwareDatetime = Field(
|
|
481
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
482
|
+
)
|
|
483
|
+
updated_by: str | None = Field(
|
|
484
|
+
'system',
|
|
485
|
+
description='Identifier of the user or system that made the last update',
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
class Status5(Enum):
|
|
490
|
+
processing = 'processing'
|
|
491
|
+
success = 'success'
|
|
492
|
+
failed = 'failed'
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
class Reports(BaseModel):
|
|
496
|
+
id: UUID = Field(
|
|
497
|
+
...,
|
|
498
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
499
|
+
)
|
|
500
|
+
site_id: UUID = Field(
|
|
501
|
+
...,
|
|
502
|
+
description="Reference to the site this report is for\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
503
|
+
)
|
|
504
|
+
report_type: str = Field(
|
|
505
|
+
..., description='Type of report (e.g., monthly-summary, performance)'
|
|
506
|
+
)
|
|
507
|
+
report_period: Any = Field(
|
|
508
|
+
..., description='Time period covered by the report as JSON'
|
|
509
|
+
)
|
|
510
|
+
comparison_period: Any = Field(
|
|
511
|
+
..., description='Comparison period for trend analysis as JSON'
|
|
512
|
+
)
|
|
513
|
+
storage_path: str = Field(..., description='Path to the generated report file')
|
|
514
|
+
status: Status5 = Field(..., description='Report generation status')
|
|
515
|
+
created_at: AwareDatetime = Field(
|
|
516
|
+
..., description='Timestamp when the report was requested'
|
|
517
|
+
)
|
|
518
|
+
updated_at: AwareDatetime = Field(
|
|
519
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
520
|
+
)
|
|
521
|
+
updated_by: str | None = Field(
|
|
522
|
+
'system',
|
|
523
|
+
description='Identifier of the user or system that made the last update',
|
|
524
|
+
)
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
class Status6(Enum):
|
|
528
|
+
PENDING = 'PENDING'
|
|
529
|
+
REDIRECT = 'REDIRECT'
|
|
530
|
+
RUNNING = 'RUNNING'
|
|
531
|
+
COMPLETE = 'COMPLETE'
|
|
532
|
+
FAILED = 'FAILED'
|
|
533
|
+
STOPPED = 'STOPPED'
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
class ImportUrls(BaseModel):
|
|
537
|
+
id: UUID = Field(
|
|
538
|
+
...,
|
|
539
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
540
|
+
)
|
|
541
|
+
import_job_id: UUID = Field(
|
|
542
|
+
...,
|
|
543
|
+
description="Reference to the parent import job\n\nNote:\nThis is a Foreign Key to `import_jobs.id`.<fk table='import_jobs' column='id'/>",
|
|
544
|
+
)
|
|
545
|
+
file: str | None = Field(
|
|
546
|
+
None, description='Output file path for the imported content'
|
|
547
|
+
)
|
|
548
|
+
path: str | None = Field(
|
|
549
|
+
None, description='Relative path within the import destination'
|
|
550
|
+
)
|
|
551
|
+
reason: str | None = Field(
|
|
552
|
+
None, description='Failure or redirect reason (if applicable)'
|
|
553
|
+
)
|
|
554
|
+
status: Status6 = Field(..., description='Current processing status')
|
|
555
|
+
url: str = Field(..., description='URL being imported')
|
|
556
|
+
created_at: AwareDatetime = Field(
|
|
557
|
+
..., description='Timestamp when the record was created'
|
|
558
|
+
)
|
|
559
|
+
updated_at: AwareDatetime = Field(
|
|
560
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
561
|
+
)
|
|
562
|
+
updated_by: str | None = Field(
|
|
563
|
+
'system',
|
|
564
|
+
description='Identifier of the user or system that made the last update',
|
|
565
|
+
)
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
class Projects(BaseModel):
|
|
569
|
+
id: UUID = Field(
|
|
570
|
+
...,
|
|
571
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
572
|
+
)
|
|
573
|
+
organization_id: UUID = Field(
|
|
574
|
+
...,
|
|
575
|
+
description="Reference to the owning organization\n\nNote:\nThis is a Foreign Key to `organizations.id`.<fk table='organizations' column='id'/>",
|
|
576
|
+
)
|
|
577
|
+
project_name: str = Field(..., description='Name of the project')
|
|
578
|
+
created_at: AwareDatetime = Field(
|
|
579
|
+
..., description='Timestamp when the project was created'
|
|
580
|
+
)
|
|
581
|
+
updated_at: AwareDatetime = Field(
|
|
582
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
583
|
+
)
|
|
584
|
+
updated_by: str | None = Field(
|
|
585
|
+
'system',
|
|
586
|
+
description='Identifier of the user or system that made the last update',
|
|
587
|
+
)
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
class DeliveryType(Enum):
|
|
591
|
+
aem_cs = 'aem_cs'
|
|
592
|
+
aem_edge = 'aem_edge'
|
|
593
|
+
aem_ams = 'aem_ams'
|
|
594
|
+
aem_headless = 'aem_headless'
|
|
595
|
+
other = 'other'
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
class AuthoringType(Enum):
|
|
599
|
+
cs_crosswalk = 'cs/crosswalk'
|
|
600
|
+
cs = 'cs'
|
|
601
|
+
ams = 'ams'
|
|
602
|
+
sharepoint = 'sharepoint'
|
|
603
|
+
googledocs = 'googledocs'
|
|
604
|
+
documentauthoring = 'documentauthoring'
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
class Sites(BaseModel):
|
|
608
|
+
id: UUID = Field(
|
|
609
|
+
...,
|
|
610
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
611
|
+
)
|
|
612
|
+
organization_id: UUID = Field(
|
|
613
|
+
...,
|
|
614
|
+
description="Reference to the owning organization\n\nNote:\nThis is a Foreign Key to `organizations.id`.<fk table='organizations' column='id'/>",
|
|
615
|
+
)
|
|
616
|
+
base_url: str = Field(
|
|
617
|
+
..., description='Primary URL of the website (must be unique)'
|
|
618
|
+
)
|
|
619
|
+
name: str | None = Field(
|
|
620
|
+
None, description='Human-friendly display name for the site'
|
|
621
|
+
)
|
|
622
|
+
is_primary_locale: bool | None = Field(
|
|
623
|
+
None, description='Whether this is the primary locale for a multi-locale site'
|
|
624
|
+
)
|
|
625
|
+
language: constr(max_length=2) | None = Field(
|
|
626
|
+
None, description='ISO 639-1 two-letter language code (e.g., en, de, fr)'
|
|
627
|
+
)
|
|
628
|
+
region: constr(max_length=2) | None = Field(
|
|
629
|
+
None, description='ISO 3166-1 alpha-2 country code (e.g., US, DE, FR)'
|
|
630
|
+
)
|
|
631
|
+
config: Any = Field(..., description='Site-level configuration settings as JSON')
|
|
632
|
+
code: Any | None = Field(
|
|
633
|
+
None, description='Code-related configuration (e.g., repository settings)'
|
|
634
|
+
)
|
|
635
|
+
delivery_type: DeliveryType = Field(
|
|
636
|
+
..., description='Content delivery platform type'
|
|
637
|
+
)
|
|
638
|
+
authoring_type: AuthoringType | None = Field(
|
|
639
|
+
None, description='Content authoring platform type'
|
|
640
|
+
)
|
|
641
|
+
github_url: str | None = Field(
|
|
642
|
+
None, description='URL to the GitHub repository for this site'
|
|
643
|
+
)
|
|
644
|
+
delivery_config: Any | None = Field(
|
|
645
|
+
None, description='Delivery-specific configuration settings'
|
|
646
|
+
)
|
|
647
|
+
hlx_config: Any | None = Field(
|
|
648
|
+
None, description='Helix (Edge Delivery) specific configuration'
|
|
649
|
+
)
|
|
650
|
+
is_sandbox: bool = Field(..., description='Whether this is a sandbox/test site')
|
|
651
|
+
is_live: bool = Field(..., description='Whether the site is actively monitored')
|
|
652
|
+
is_live_toggled_at: AwareDatetime | None = Field(
|
|
653
|
+
None, description='Timestamp when is_live status was last changed'
|
|
654
|
+
)
|
|
655
|
+
external_owner_id: str | None = Field(
|
|
656
|
+
None, description='External system owner identifier'
|
|
657
|
+
)
|
|
658
|
+
external_site_id: str | None = Field(
|
|
659
|
+
None, description='External system site identifier'
|
|
660
|
+
)
|
|
661
|
+
page_types: Any | None = Field(
|
|
662
|
+
None, description='Configured page type classifications'
|
|
663
|
+
)
|
|
664
|
+
created_at: AwareDatetime = Field(
|
|
665
|
+
..., description='Timestamp when the site was created'
|
|
666
|
+
)
|
|
667
|
+
updated_at: AwareDatetime = Field(
|
|
668
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
669
|
+
)
|
|
670
|
+
updated_by: str | None = Field(
|
|
671
|
+
'system',
|
|
672
|
+
description='Identifier of the user or system that made the last update',
|
|
673
|
+
)
|
|
674
|
+
project_id: UUID | None = Field(
|
|
675
|
+
None,
|
|
676
|
+
description="Reference to the project this site belongs to (optional)\n\nNote:\nThis is a Foreign Key to `projects.id`.<fk table='projects' column='id'/>",
|
|
677
|
+
)
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
class Status7(Enum):
|
|
681
|
+
INVITED = 'INVITED'
|
|
682
|
+
REGISTERED = 'REGISTERED'
|
|
683
|
+
BLOCKED = 'BLOCKED'
|
|
684
|
+
DELETED = 'DELETED'
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
class TrialUsers(BaseModel):
|
|
688
|
+
id: UUID = Field(
|
|
689
|
+
...,
|
|
690
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
691
|
+
)
|
|
692
|
+
organization_id: UUID = Field(
|
|
693
|
+
...,
|
|
694
|
+
description="Reference to the organization\n\nNote:\nThis is a Foreign Key to `organizations.id`.<fk table='organizations' column='id'/>",
|
|
695
|
+
)
|
|
696
|
+
external_user_id: str | None = Field(
|
|
697
|
+
None, description='User ID from external identity system'
|
|
698
|
+
)
|
|
699
|
+
status: Status7 = Field(..., description='Current status in the trial lifecycle')
|
|
700
|
+
last_seen_at: AwareDatetime | None = Field(
|
|
701
|
+
None, description='Last activity timestamp'
|
|
702
|
+
)
|
|
703
|
+
email_id: str = Field(..., description='Email address (unique per organization)')
|
|
704
|
+
first_name: str | None = Field(None, description='User first name')
|
|
705
|
+
last_name: str | None = Field(None, description='User last name')
|
|
706
|
+
metadata: Any | None = Field(None, description='Additional user metadata as JSON')
|
|
707
|
+
created_at: AwareDatetime = Field(
|
|
708
|
+
..., description='Timestamp when the user was created'
|
|
709
|
+
)
|
|
710
|
+
updated_at: AwareDatetime = Field(
|
|
711
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
712
|
+
)
|
|
713
|
+
updated_by: str | None = Field(
|
|
714
|
+
'system',
|
|
715
|
+
description='Identifier of the user or system that made the last update',
|
|
716
|
+
)
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
class Type1(Enum):
|
|
720
|
+
CODE_CHANGE = 'CODE_CHANGE'
|
|
721
|
+
CONTENT_UPDATE = 'CONTENT_UPDATE'
|
|
722
|
+
REDIRECT_UPDATE = 'REDIRECT_UPDATE'
|
|
723
|
+
METADATA_UPDATE = 'METADATA_UPDATE'
|
|
724
|
+
AI_INSIGHTS = 'AI_INSIGHTS'
|
|
725
|
+
CONFIG_UPDATE = 'CONFIG_UPDATE'
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
class Status8(Enum):
|
|
729
|
+
PENDING = 'PENDING'
|
|
730
|
+
DEPLOYED = 'DEPLOYED'
|
|
731
|
+
PUBLISHED = 'PUBLISHED'
|
|
732
|
+
FAILED = 'FAILED'
|
|
733
|
+
ROLLED_BACK = 'ROLLED_BACK'
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
class Origin1(Enum):
|
|
737
|
+
spacecat = 'spacecat'
|
|
738
|
+
aso = 'aso'
|
|
739
|
+
reporting = 'reporting'
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
class FixEntities(BaseModel):
|
|
743
|
+
id: UUID = Field(
|
|
744
|
+
...,
|
|
745
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
746
|
+
)
|
|
747
|
+
opportunity_id: UUID = Field(
|
|
748
|
+
...,
|
|
749
|
+
description="Reference to the opportunity being fixed\n\nNote:\nThis is a Foreign Key to `opportunities.id`.<fk table='opportunities' column='id'/>",
|
|
750
|
+
)
|
|
751
|
+
type: Type1 = Field(
|
|
752
|
+
..., description='Type of fix applied (reuses suggestion_type enum)'
|
|
753
|
+
)
|
|
754
|
+
executed_by: str | None = Field(
|
|
755
|
+
None, description='User or system that executed the fix'
|
|
756
|
+
)
|
|
757
|
+
executed_at: AwareDatetime | None = Field(
|
|
758
|
+
None, description='Timestamp when the fix was executed'
|
|
759
|
+
)
|
|
760
|
+
published_at: AwareDatetime | None = Field(
|
|
761
|
+
None, description='Timestamp when the fix was published/deployed'
|
|
762
|
+
)
|
|
763
|
+
change_details: Any = Field(..., description='Details of the changes made as JSON')
|
|
764
|
+
status: Status8 = Field(..., description='Current deployment status of the fix')
|
|
765
|
+
origin: Origin1 | None = Field(
|
|
766
|
+
'spacecat', description='System that originated the fix'
|
|
767
|
+
)
|
|
768
|
+
created_at: AwareDatetime = Field(
|
|
769
|
+
..., description='Timestamp when the record was created'
|
|
770
|
+
)
|
|
771
|
+
updated_at: AwareDatetime = Field(
|
|
772
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
773
|
+
)
|
|
774
|
+
updated_by: str | None = Field(
|
|
775
|
+
'system',
|
|
776
|
+
description='Identifier of the user or system that made the last update',
|
|
777
|
+
)
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
class Organizations(BaseModel):
|
|
781
|
+
id: UUID = Field(
|
|
782
|
+
...,
|
|
783
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
784
|
+
)
|
|
785
|
+
name: str = Field(..., description='Display name of the organization')
|
|
786
|
+
ims_org_id: str | None = Field(
|
|
787
|
+
None, description='Adobe IMS organization identifier'
|
|
788
|
+
)
|
|
789
|
+
config: Any = Field(
|
|
790
|
+
..., description='Organization-level configuration settings as JSON'
|
|
791
|
+
)
|
|
792
|
+
fulfillable_items: Any | None = Field(
|
|
793
|
+
None, description='Fulfillment tracking data for provisioned services'
|
|
794
|
+
)
|
|
795
|
+
created_at: AwareDatetime = Field(
|
|
796
|
+
..., description='Timestamp when the organization was created'
|
|
797
|
+
)
|
|
798
|
+
updated_at: AwareDatetime = Field(
|
|
799
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
800
|
+
)
|
|
801
|
+
updated_by: str | None = Field(
|
|
802
|
+
'system',
|
|
803
|
+
description='Identifier of the user or system that made the last update',
|
|
804
|
+
)
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
class SiteTopPages(BaseModel):
|
|
808
|
+
id: UUID = Field(
|
|
809
|
+
...,
|
|
810
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
811
|
+
)
|
|
812
|
+
site_id: UUID = Field(
|
|
813
|
+
...,
|
|
814
|
+
description="Reference to the parent site\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
815
|
+
)
|
|
816
|
+
url: str = Field(..., description='Full URL of the page')
|
|
817
|
+
traffic: int = Field(..., description='Traffic volume (page views or visits)')
|
|
818
|
+
source: str = Field(..., description='Analytics source (e.g., rum, ahrefs, google)')
|
|
819
|
+
top_keyword: str | None = Field(
|
|
820
|
+
None, description='Primary keyword driving traffic to this page'
|
|
821
|
+
)
|
|
822
|
+
geo: str = Field(
|
|
823
|
+
..., description='Geographic region for the traffic data (default: global)'
|
|
824
|
+
)
|
|
825
|
+
imported_at: AwareDatetime = Field(
|
|
826
|
+
..., description='When this data was imported from the source'
|
|
827
|
+
)
|
|
828
|
+
created_at: AwareDatetime = Field(
|
|
829
|
+
..., description='Timestamp when the record was created'
|
|
830
|
+
)
|
|
831
|
+
updated_at: AwareDatetime = Field(
|
|
832
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
833
|
+
)
|
|
834
|
+
updated_by: str | None = Field(
|
|
835
|
+
'system',
|
|
836
|
+
description='Identifier of the user or system that made the last update',
|
|
837
|
+
)
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
class Source(Enum):
|
|
841
|
+
SPACECAT_SLACK_BOT = 'SPACECAT_SLACK_BOT'
|
|
842
|
+
RUM = 'RUM'
|
|
843
|
+
CDN = 'CDN'
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
class Status9(Enum):
|
|
847
|
+
PENDING = 'PENDING'
|
|
848
|
+
IGNORED = 'IGNORED'
|
|
849
|
+
APPROVED = 'APPROVED'
|
|
850
|
+
ERROR = 'ERROR'
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
class SiteCandidates(BaseModel):
|
|
854
|
+
id: UUID = Field(
|
|
855
|
+
...,
|
|
856
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
857
|
+
)
|
|
858
|
+
site_id: UUID | None = Field(
|
|
859
|
+
None,
|
|
860
|
+
description="Reference to the site (once approved and created)\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
861
|
+
)
|
|
862
|
+
base_url: str = Field(..., description='URL of the candidate site (must be unique)')
|
|
863
|
+
hlx_config: Any = Field(
|
|
864
|
+
..., description='Helix configuration discovered for this candidate'
|
|
865
|
+
)
|
|
866
|
+
source: Source = Field(..., description='How this candidate was discovered')
|
|
867
|
+
status: Status9 = Field(..., description='Current approval workflow status')
|
|
868
|
+
created_at: AwareDatetime = Field(
|
|
869
|
+
..., description='Timestamp when the candidate was discovered'
|
|
870
|
+
)
|
|
871
|
+
updated_at: AwareDatetime = Field(
|
|
872
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
873
|
+
)
|
|
874
|
+
updated_by: str | None = Field(
|
|
875
|
+
'spacecat',
|
|
876
|
+
description='Identifier of the user or system that made the last update',
|
|
877
|
+
)
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
class ApiKeys(BaseModel):
|
|
881
|
+
id: UUID = Field(
|
|
882
|
+
...,
|
|
883
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
884
|
+
)
|
|
885
|
+
hashed_api_key: str = Field(
|
|
886
|
+
..., description='SHA-256 hash of the API key (never store plain text)'
|
|
887
|
+
)
|
|
888
|
+
ims_user_id: str = Field(..., description='Adobe IMS user ID who owns this key')
|
|
889
|
+
ims_org_id: str = Field(
|
|
890
|
+
..., description='Adobe IMS organization ID this key belongs to'
|
|
891
|
+
)
|
|
892
|
+
name: str = Field(..., description='Human-readable name for the API key')
|
|
893
|
+
deleted_at: AwareDatetime | None = Field(None, description='Soft delete timestamp')
|
|
894
|
+
expires_at: AwareDatetime | None = Field(
|
|
895
|
+
None, description='When the key expires (null = never)'
|
|
896
|
+
)
|
|
897
|
+
revoked_at: AwareDatetime | None = Field(
|
|
898
|
+
None, description='When the key was revoked (null = active)'
|
|
899
|
+
)
|
|
900
|
+
scopes: Any = Field(..., description='Permissions granted to this key as JSON')
|
|
901
|
+
created_at: AwareDatetime = Field(
|
|
902
|
+
..., description='Timestamp when the key was created'
|
|
903
|
+
)
|
|
904
|
+
updated_at: AwareDatetime = Field(
|
|
905
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
906
|
+
)
|
|
907
|
+
updated_by: str | None = Field(
|
|
908
|
+
'system',
|
|
909
|
+
description='Identifier of the user or system that made the last update',
|
|
910
|
+
)
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
class Status10(Enum):
|
|
914
|
+
PENDING = 'PENDING'
|
|
915
|
+
REDIRECT = 'REDIRECT'
|
|
916
|
+
RUNNING = 'RUNNING'
|
|
917
|
+
COMPLETE = 'COMPLETE'
|
|
918
|
+
FAILED = 'FAILED'
|
|
919
|
+
STOPPED = 'STOPPED'
|
|
920
|
+
|
|
921
|
+
|
|
922
|
+
class ScrapeUrls(BaseModel):
|
|
923
|
+
id: UUID = Field(
|
|
924
|
+
...,
|
|
925
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
926
|
+
)
|
|
927
|
+
scrape_job_id: UUID = Field(
|
|
928
|
+
...,
|
|
929
|
+
description="Reference to the parent scrape job\n\nNote:\nThis is a Foreign Key to `scrape_jobs.id`.<fk table='scrape_jobs' column='id'/>",
|
|
930
|
+
)
|
|
931
|
+
file: str | None = Field(
|
|
932
|
+
None, description='Output file path for the scraped content'
|
|
933
|
+
)
|
|
934
|
+
path: str | None = Field(
|
|
935
|
+
None, description='Relative path within the output destination'
|
|
936
|
+
)
|
|
937
|
+
reason: str | None = Field(
|
|
938
|
+
None, description='Failure or redirect reason (if applicable)'
|
|
939
|
+
)
|
|
940
|
+
status: Status10 = Field(..., description='Current processing status')
|
|
941
|
+
url: str = Field(..., description='URL being scraped')
|
|
942
|
+
processing_type: str = Field(
|
|
943
|
+
..., description='Type of processing applied to this URL'
|
|
944
|
+
)
|
|
945
|
+
options: Any | None = Field(None, description='URL-specific options as JSON')
|
|
946
|
+
is_original: bool = Field(
|
|
947
|
+
...,
|
|
948
|
+
description='Whether this is an original URL (not discovered during scraping)',
|
|
949
|
+
)
|
|
950
|
+
created_at: AwareDatetime = Field(
|
|
951
|
+
..., description='Timestamp when the record was created'
|
|
952
|
+
)
|
|
953
|
+
updated_at: AwareDatetime = Field(
|
|
954
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
955
|
+
)
|
|
956
|
+
updated_by: str | None = Field(
|
|
957
|
+
'system',
|
|
958
|
+
description='Identifier of the user or system that made the last update',
|
|
959
|
+
)
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
class PageCitabilities(BaseModel):
|
|
963
|
+
id: UUID = Field(
|
|
964
|
+
...,
|
|
965
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
966
|
+
)
|
|
967
|
+
site_id: UUID = Field(
|
|
968
|
+
...,
|
|
969
|
+
description="Reference to the parent site\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
970
|
+
)
|
|
971
|
+
url: str = Field(..., description='Full URL of the page (unique across all sites)')
|
|
972
|
+
citability_score: float | None = Field(
|
|
973
|
+
None, description='Overall citability score (0-100)'
|
|
974
|
+
)
|
|
975
|
+
content_ratio: float | None = Field(
|
|
976
|
+
None, description='Ratio of useful content to total content'
|
|
977
|
+
)
|
|
978
|
+
word_difference: int | None = Field(
|
|
979
|
+
None, description='Difference in word count between bot and normal views'
|
|
980
|
+
)
|
|
981
|
+
bot_words: int | None = Field(
|
|
982
|
+
None, description='Word count as seen by bots/crawlers'
|
|
983
|
+
)
|
|
984
|
+
normal_words: int | None = Field(
|
|
985
|
+
None, description='Word count as seen by normal users'
|
|
986
|
+
)
|
|
987
|
+
is_deployed_at_edge: bool | None = Field(
|
|
988
|
+
None, description='Whether the page is served from edge CDN'
|
|
989
|
+
)
|
|
990
|
+
created_at: AwareDatetime = Field(
|
|
991
|
+
..., description='Timestamp when the record was created'
|
|
992
|
+
)
|
|
993
|
+
updated_at: AwareDatetime = Field(
|
|
994
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
995
|
+
)
|
|
996
|
+
updated_by: str | None = Field(
|
|
997
|
+
'spacecat',
|
|
998
|
+
description='Identifier of the user or system that made the last update',
|
|
999
|
+
)
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
class FixEntitySuggestions(BaseModel):
|
|
1003
|
+
suggestion_id: UUID = Field(
|
|
1004
|
+
...,
|
|
1005
|
+
description="Reference to the suggestion\n\nNote:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `suggestions.id`.<fk table='suggestions' column='id'/>",
|
|
1006
|
+
)
|
|
1007
|
+
fix_entity_id: UUID = Field(
|
|
1008
|
+
...,
|
|
1009
|
+
description="Reference to the fix entity\n\nNote:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `fix_entities.id`.<fk table='fix_entities' column='id'/>",
|
|
1010
|
+
)
|
|
1011
|
+
opportunity_id: UUID = Field(
|
|
1012
|
+
...,
|
|
1013
|
+
description="Reference to the parent opportunity (denormalized for queries)\n\nNote:\nThis is a Foreign Key to `opportunities.id`.<fk table='opportunities' column='id'/>",
|
|
1014
|
+
)
|
|
1015
|
+
fix_entity_created_at: AwareDatetime = Field(
|
|
1016
|
+
..., description='Timestamp when the fix entity was created'
|
|
1017
|
+
)
|
|
1018
|
+
fix_entity_created_date: date | None = Field(
|
|
1019
|
+
None,
|
|
1020
|
+
description='Date portion of fix_entity_created_at (generated, for date-based queries)',
|
|
1021
|
+
)
|
|
1022
|
+
created_at: AwareDatetime = Field(
|
|
1023
|
+
..., description='Timestamp when the link was created'
|
|
1024
|
+
)
|
|
1025
|
+
updated_at: AwareDatetime = Field(
|
|
1026
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
1027
|
+
)
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
class Type2(Enum):
|
|
1031
|
+
PERFORMANCE = 'PERFORMANCE'
|
|
1032
|
+
SEO = 'SEO'
|
|
1033
|
+
CONTENT = 'CONTENT'
|
|
1034
|
+
CODE = 'CODE'
|
|
1035
|
+
THIRD_PARTY = 'THIRD PARTY'
|
|
1036
|
+
EXPERIMENTATION = 'EXPERIMENTATION'
|
|
1037
|
+
NETWORK = 'NETWORK'
|
|
1038
|
+
STATUS_CHANGE = 'STATUS CHANGE'
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
class KeyEvents(BaseModel):
|
|
1042
|
+
id: UUID = Field(
|
|
1043
|
+
...,
|
|
1044
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
1045
|
+
)
|
|
1046
|
+
site_id: UUID = Field(
|
|
1047
|
+
...,
|
|
1048
|
+
description="Reference to the site this event belongs to\n\nNote:\nThis is a Foreign Key to `sites.id`.<fk table='sites' column='id'/>",
|
|
1049
|
+
)
|
|
1050
|
+
name: str = Field(..., description='Description of the event')
|
|
1051
|
+
type: Type2 = Field(..., description='Category of the event')
|
|
1052
|
+
time: AwareDatetime = Field(..., description='When the event occurred')
|
|
1053
|
+
created_at: AwareDatetime = Field(
|
|
1054
|
+
..., description='Timestamp when the record was created'
|
|
1055
|
+
)
|
|
1056
|
+
updated_at: AwareDatetime = Field(
|
|
1057
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
1058
|
+
)
|
|
1059
|
+
updated_by: str | None = Field(
|
|
1060
|
+
'system',
|
|
1061
|
+
description='Identifier of the user or system that made the last update',
|
|
1062
|
+
)
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
class Type3(Enum):
|
|
1066
|
+
CODE_CHANGE = 'CODE_CHANGE'
|
|
1067
|
+
CONTENT_UPDATE = 'CONTENT_UPDATE'
|
|
1068
|
+
REDIRECT_UPDATE = 'REDIRECT_UPDATE'
|
|
1069
|
+
METADATA_UPDATE = 'METADATA_UPDATE'
|
|
1070
|
+
AI_INSIGHTS = 'AI_INSIGHTS'
|
|
1071
|
+
CONFIG_UPDATE = 'CONFIG_UPDATE'
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
class Status11(Enum):
|
|
1075
|
+
NEW = 'NEW'
|
|
1076
|
+
APPROVED = 'APPROVED'
|
|
1077
|
+
IN_PROGRESS = 'IN_PROGRESS'
|
|
1078
|
+
SKIPPED = 'SKIPPED'
|
|
1079
|
+
FIXED = 'FIXED'
|
|
1080
|
+
ERROR = 'ERROR'
|
|
1081
|
+
OUTDATED = 'OUTDATED'
|
|
1082
|
+
PENDING_VALIDATION = 'PENDING_VALIDATION'
|
|
1083
|
+
REJECTED = 'REJECTED'
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
class Suggestions(BaseModel):
|
|
1087
|
+
id: UUID = Field(
|
|
1088
|
+
...,
|
|
1089
|
+
description='Unique identifier (UUID v7, time-sortable)\n\nNote:\nThis is a Primary Key.<pk/>',
|
|
1090
|
+
)
|
|
1091
|
+
opportunity_id: UUID = Field(
|
|
1092
|
+
...,
|
|
1093
|
+
description="Reference to the parent opportunity\n\nNote:\nThis is a Foreign Key to `opportunities.id`.<fk table='opportunities' column='id'/>",
|
|
1094
|
+
)
|
|
1095
|
+
type: Type3 = Field(..., description='Category of change being suggested')
|
|
1096
|
+
rank: int = Field(
|
|
1097
|
+
...,
|
|
1098
|
+
description='Priority ranking among suggestions for the same opportunity (lower is higher priority)',
|
|
1099
|
+
)
|
|
1100
|
+
data: Any = Field(
|
|
1101
|
+
..., description='Suggestion-specific data including the proposed changes'
|
|
1102
|
+
)
|
|
1103
|
+
kpi_deltas: Any | None = Field(
|
|
1104
|
+
None, description='Projected impact on KPIs if this suggestion is implemented'
|
|
1105
|
+
)
|
|
1106
|
+
status: Status11 = Field(
|
|
1107
|
+
..., description='Current workflow status of the suggestion'
|
|
1108
|
+
)
|
|
1109
|
+
created_at: AwareDatetime = Field(
|
|
1110
|
+
..., description='Timestamp when the suggestion was created'
|
|
1111
|
+
)
|
|
1112
|
+
updated_at: AwareDatetime = Field(
|
|
1113
|
+
..., description='Timestamp of the last update (auto-managed)'
|
|
1114
|
+
)
|
|
1115
|
+
updated_by: str | None = Field(
|
|
1116
|
+
'system',
|
|
1117
|
+
description='Identifier of the user or system that made the last update',
|
|
1118
|
+
)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mysticat-data-service-types
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Pydantic models for Mysticat Data Service API (PostgREST)
|
|
5
|
+
Project-URL: Homepage, https://github.com/adobe/mysticat-data-service
|
|
6
|
+
Project-URL: Repository, https://github.com/adobe/mysticat-data-service
|
|
7
|
+
Project-URL: Documentation, https://github.com/adobe/mysticat-data-service#readme
|
|
8
|
+
Author-email: Adobe <noreply@adobe.com>
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
Keywords: models,mysticat,postgrest,pydantic,types
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Typing :: Typed
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Requires-Dist: pydantic>=2.0.0
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# mysticat-data-service-types
|
|
24
|
+
|
|
25
|
+
Pydantic models for Mysticat Data Service API (PostgREST).
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install mysticat-data-service-types
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from mysticat_data_service_types import Organizations, Sites, Audits
|
|
37
|
+
|
|
38
|
+
# Type hints for API responses
|
|
39
|
+
def process_organization(org: Organizations) -> None:
|
|
40
|
+
print(org.name)
|
|
41
|
+
|
|
42
|
+
# Validation
|
|
43
|
+
org = Organizations(
|
|
44
|
+
id="01234567-89ab-cdef-0123-456789abcdef",
|
|
45
|
+
name="My Organization",
|
|
46
|
+
ims_org_id="ABC123@AdobeOrg",
|
|
47
|
+
# ...
|
|
48
|
+
)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
Apache-2.0
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
mysticat_data_service_types/__init__.py,sha256=57T0ap1G3Va3BagQ0U8dkDt8hx1d0LBvNzF67opzcZA,437
|
|
2
|
+
mysticat_data_service_types/models.py,sha256=k9p9ZOLg96RG3qxyBk5xll84Yf-IdkdiIz26KoGH4Ck,40916
|
|
3
|
+
mysticat_data_service_types-1.0.0.dist-info/METADATA,sha256=N4WzQVWH1p9TLmjVeRXkkb2xNLfFyjd5UNRl91bLq7w,1499
|
|
4
|
+
mysticat_data_service_types-1.0.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
5
|
+
mysticat_data_service_types-1.0.0.dist-info/RECORD,,
|