chunkify-analytics-sdk 0.9.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.
Files changed (179) hide show
  1. chunkify_analytics/__init__.py +102 -0
  2. chunkify_analytics/_base_client.py +2153 -0
  3. chunkify_analytics/_client.py +1262 -0
  4. chunkify_analytics/_compat.py +226 -0
  5. chunkify_analytics/_constants.py +14 -0
  6. chunkify_analytics/_exceptions.py +108 -0
  7. chunkify_analytics/_files.py +173 -0
  8. chunkify_analytics/_models.py +964 -0
  9. chunkify_analytics/_qs.py +149 -0
  10. chunkify_analytics/_resource.py +43 -0
  11. chunkify_analytics/_response.py +835 -0
  12. chunkify_analytics/_streaming.py +338 -0
  13. chunkify_analytics/_types.py +274 -0
  14. chunkify_analytics/_utils/__init__.py +64 -0
  15. chunkify_analytics/_utils/_compat.py +45 -0
  16. chunkify_analytics/_utils/_datetime_parse.py +136 -0
  17. chunkify_analytics/_utils/_json.py +35 -0
  18. chunkify_analytics/_utils/_logs.py +25 -0
  19. chunkify_analytics/_utils/_path.py +127 -0
  20. chunkify_analytics/_utils/_proxy.py +65 -0
  21. chunkify_analytics/_utils/_reflection.py +42 -0
  22. chunkify_analytics/_utils/_resources_proxy.py +24 -0
  23. chunkify_analytics/_utils/_streams.py +12 -0
  24. chunkify_analytics/_utils/_sync.py +58 -0
  25. chunkify_analytics/_utils/_transform.py +457 -0
  26. chunkify_analytics/_utils/_typing.py +156 -0
  27. chunkify_analytics/_utils/_utils.py +433 -0
  28. chunkify_analytics/_version.py +4 -0
  29. chunkify_analytics/lib/.keep +4 -0
  30. chunkify_analytics/pagination.py +221 -0
  31. chunkify_analytics/py.typed +0 -0
  32. chunkify_analytics/resources/__init__.py +243 -0
  33. chunkify_analytics/resources/admin/__init__.py +33 -0
  34. chunkify_analytics/resources/admin/admin.py +253 -0
  35. chunkify_analytics/resources/admin/keys.py +283 -0
  36. chunkify_analytics/resources/dimensions.py +436 -0
  37. chunkify_analytics/resources/engagement.py +479 -0
  38. chunkify_analytics/resources/errors.py +400 -0
  39. chunkify_analytics/resources/events.py +562 -0
  40. chunkify_analytics/resources/exports.py +584 -0
  41. chunkify_analytics/resources/health.py +159 -0
  42. chunkify_analytics/resources/playback_rates.py +391 -0
  43. chunkify_analytics/resources/project/__init__.py +33 -0
  44. chunkify_analytics/resources/project/keys.py +379 -0
  45. chunkify_analytics/resources/project/project.py +322 -0
  46. chunkify_analytics/resources/quality.py +471 -0
  47. chunkify_analytics/resources/renditions.py +391 -0
  48. chunkify_analytics/resources/retention.py +377 -0
  49. chunkify_analytics/resources/subtitles.py +389 -0
  50. chunkify_analytics/resources/summary.py +469 -0
  51. chunkify_analytics/resources/timeseries.py +399 -0
  52. chunkify_analytics/resources/videos.py +424 -0
  53. chunkify_analytics/resources/views.py +579 -0
  54. chunkify_analytics/types/__init__.py +145 -0
  55. chunkify_analytics/types/admin/__init__.py +3 -0
  56. chunkify_analytics/types/admin_create_project_params.py +25 -0
  57. chunkify_analytics/types/analytics_event.py +32 -0
  58. chunkify_analytics/types/analytics_event_param.py +30 -0
  59. chunkify_analytics/types/created_project.py +37 -0
  60. chunkify_analytics/types/created_project_key.py +34 -0
  61. chunkify_analytics/types/deleted_project.py +18 -0
  62. chunkify_analytics/types/dimension_list_values_params.py +124 -0
  63. chunkify_analytics/types/dimension_values.py +42 -0
  64. chunkify_analytics/types/engagement.py +60 -0
  65. chunkify_analytics/types/engagement_breakdown_page.py +44 -0
  66. chunkify_analytics/types/engagement_response.py +11 -0
  67. chunkify_analytics/types/engagement_retrieve_params.py +158 -0
  68. chunkify_analytics/types/engagement_timeseries.py +28 -0
  69. chunkify_analytics/types/engagement_timeseries_bucket.py +63 -0
  70. chunkify_analytics/types/error_group.py +17 -0
  71. chunkify_analytics/types/error_list_params.py +124 -0
  72. chunkify_analytics/types/error_page.py +14 -0
  73. chunkify_analytics/types/event_ingest_params.py +19 -0
  74. chunkify_analytics/types/event_ingest_response.py +11 -0
  75. chunkify_analytics/types/event_list_params.py +146 -0
  76. chunkify_analytics/types/event_page.py +18 -0
  77. chunkify_analytics/types/export.py +18 -0
  78. chunkify_analytics/types/export_columns.py +12 -0
  79. chunkify_analytics/types/export_create_params.py +40 -0
  80. chunkify_analytics/types/export_download_response.py +7 -0
  81. chunkify_analytics/types/export_list_columns_params.py +69 -0
  82. chunkify_analytics/types/export_query_param.py +141 -0
  83. chunkify_analytics/types/health.py +11 -0
  84. chunkify_analytics/types/metrics.py +13 -0
  85. chunkify_analytics/types/metrics_breakdown_page.py +40 -0
  86. chunkify_analytics/types/metrics_response.py +11 -0
  87. chunkify_analytics/types/native_created.py +13 -0
  88. chunkify_analytics/types/native_duplicate.py +13 -0
  89. chunkify_analytics/types/playback_error.py +180 -0
  90. chunkify_analytics/types/playback_error_param.py +182 -0
  91. chunkify_analytics/types/playback_rate_changed.py +150 -0
  92. chunkify_analytics/types/playback_rate_changed_param.py +152 -0
  93. chunkify_analytics/types/playback_rate_metric.py +21 -0
  94. chunkify_analytics/types/playback_rate_report.py +31 -0
  95. chunkify_analytics/types/playback_rate_retrieve_params.py +117 -0
  96. chunkify_analytics/types/playback_state_changed.py +150 -0
  97. chunkify_analytics/types/playback_state_changed_param.py +156 -0
  98. chunkify_analytics/types/project/__init__.py +6 -0
  99. chunkify_analytics/types/project/key_create_params.py +21 -0
  100. chunkify_analytics/types/project/project.py +35 -0
  101. chunkify_analytics/types/project_key.py +21 -0
  102. chunkify_analytics/types/project_keys.py +14 -0
  103. chunkify_analytics/types/project_update_params.py +25 -0
  104. chunkify_analytics/types/quality.py +117 -0
  105. chunkify_analytics/types/quality_breakdown_page.py +44 -0
  106. chunkify_analytics/types/quality_response.py +11 -0
  107. chunkify_analytics/types/quality_retrieve_params.py +158 -0
  108. chunkify_analytics/types/quality_timeseries.py +28 -0
  109. chunkify_analytics/types/quality_timeseries_bucket.py +120 -0
  110. chunkify_analytics/types/rendition_changed.py +156 -0
  111. chunkify_analytics/types/rendition_changed_param.py +158 -0
  112. chunkify_analytics/types/rendition_metric.py +40 -0
  113. chunkify_analytics/types/rendition_report.py +43 -0
  114. chunkify_analytics/types/rendition_retrieve_params.py +117 -0
  115. chunkify_analytics/types/retention_bucket.py +22 -0
  116. chunkify_analytics/types/retention_report.py +33 -0
  117. chunkify_analytics/types/retention_retrieve_params.py +110 -0
  118. chunkify_analytics/types/rotated_project_key.py +29 -0
  119. chunkify_analytics/types/seek_completed.py +166 -0
  120. chunkify_analytics/types/seek_completed_param.py +168 -0
  121. chunkify_analytics/types/shared/__init__.py +24 -0
  122. chunkify_analytics/types/shared/browser_context.py +62 -0
  123. chunkify_analytics/types/shared/custom_dimensions.py +8 -0
  124. chunkify_analytics/types/shared/event_context.py +161 -0
  125. chunkify_analytics/types/shared/event_envelope.py +152 -0
  126. chunkify_analytics/types/shared/metric_count_ratio.py +18 -0
  127. chunkify_analytics/types/shared/otlp_any_value.py +56 -0
  128. chunkify_analytics/types/shared/otlp_attribute.py +24 -0
  129. chunkify_analytics/types/shared/otlp_attribute_value.py +136 -0
  130. chunkify_analytics/types/shared/otlp_context_attribute.py +22 -0
  131. chunkify_analytics/types/shared/otlp_log_record.py +48 -0
  132. chunkify_analytics/types/shared/otlp_resource.py +20 -0
  133. chunkify_analytics/types/shared/otlp_scope.py +24 -0
  134. chunkify_analytics/types/shared/playback_rate_playing_time.py +12 -0
  135. chunkify_analytics/types/shared/playback_score.py +28 -0
  136. chunkify_analytics/types/shared/played_range.py +13 -0
  137. chunkify_analytics/types/shared/progress_reached.py +39 -0
  138. chunkify_analytics/types/shared/rendition_playing_time.py +21 -0
  139. chunkify_analytics/types/shared/startup_outcomes.py +39 -0
  140. chunkify_analytics/types/shared/stored_otlp_context.py +50 -0
  141. chunkify_analytics/types/shared/subtitle_playing_time.py +14 -0
  142. chunkify_analytics/types/shared/view_metrics.py +100 -0
  143. chunkify_analytics/types/shared/watch_time_distribution.py +41 -0
  144. chunkify_analytics/types/shared_params/__init__.py +8 -0
  145. chunkify_analytics/types/shared_params/browser_context.py +62 -0
  146. chunkify_analytics/types/shared_params/custom_dimensions.py +10 -0
  147. chunkify_analytics/types/shared_params/playback_rate_playing_time.py +14 -0
  148. chunkify_analytics/types/shared_params/played_range.py +15 -0
  149. chunkify_analytics/types/shared_params/rendition_playing_time.py +22 -0
  150. chunkify_analytics/types/shared_params/subtitle_playing_time.py +15 -0
  151. chunkify_analytics/types/stored_event.py +44 -0
  152. chunkify_analytics/types/subtitle_changed.py +150 -0
  153. chunkify_analytics/types/subtitle_changed_param.py +152 -0
  154. chunkify_analytics/types/subtitle_metric.py +26 -0
  155. chunkify_analytics/types/subtitle_report.py +31 -0
  156. chunkify_analytics/types/subtitle_retrieve_params.py +117 -0
  157. chunkify_analytics/types/summary_retrieve_params.py +158 -0
  158. chunkify_analytics/types/time_bucket.py +22 -0
  159. chunkify_analytics/types/timeseries.py +28 -0
  160. chunkify_analytics/types/timeseries_response.py +12 -0
  161. chunkify_analytics/types/timesery_retrieve_params.py +115 -0
  162. chunkify_analytics/types/video_list_params.py +140 -0
  163. chunkify_analytics/types/video_metrics.py +23 -0
  164. chunkify_analytics/types/video_page.py +14 -0
  165. chunkify_analytics/types/view.py +43 -0
  166. chunkify_analytics/types/view_detail.py +21 -0
  167. chunkify_analytics/types/view_ended.py +180 -0
  168. chunkify_analytics/types/view_ended_param.py +182 -0
  169. chunkify_analytics/types/view_list_params.py +152 -0
  170. chunkify_analytics/types/view_page.py +14 -0
  171. chunkify_analytics/types/view_retrieve_params.py +23 -0
  172. chunkify_analytics/types/view_snapshot.py +180 -0
  173. chunkify_analytics/types/view_snapshot_param.py +182 -0
  174. chunkify_analytics/types/view_started.py +192 -0
  175. chunkify_analytics/types/view_started_param.py +194 -0
  176. chunkify_analytics_sdk-0.9.0.dist-info/METADATA +487 -0
  177. chunkify_analytics_sdk-0.9.0.dist-info/RECORD +179 -0
  178. chunkify_analytics_sdk-0.9.0.dist-info/WHEEL +4 -0
  179. chunkify_analytics_sdk-0.9.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Union
4
+ from typing_extensions import TypeAlias
5
+
6
+ from .timeseries import Timeseries
7
+ from .quality_timeseries import QualityTimeseries
8
+ from .engagement_timeseries import EngagementTimeseries
9
+
10
+ __all__ = ["TimeseriesResponse"]
11
+
12
+ TimeseriesResponse: TypeAlias = Union[Timeseries, QualityTimeseries, EngagementTimeseries]
@@ -0,0 +1,115 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union
6
+ from datetime import datetime
7
+ from typing_extensions import Literal, Required, Annotated, TypedDict
8
+
9
+ from .._utils import PropertyInfo
10
+
11
+ __all__ = ["TimeseryRetrieveParams"]
12
+
13
+
14
+ class TimeseryRetrieveParams(TypedDict, total=False):
15
+ from_: Required[Annotated[Union[str, datetime], PropertyInfo(alias="from", format="iso8601")]]
16
+ """Inclusive view-start time in RFC3339 format with a timezone."""
17
+
18
+ interval: Required[Literal["hour", "day"]]
19
+ """UTC hour or day. The requested range can contain at most 1000 buckets."""
20
+
21
+ to: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
22
+ """Exclusive view-start time in RFC3339 format with a timezone.
23
+
24
+ Must be later than from.
25
+ """
26
+
27
+ browser_name: str
28
+ """Exact browser name, such as Chrome. Missing values do not match."""
29
+
30
+ city: str
31
+ """
32
+ Exact, case-sensitive city name from the local lookup, with 1 to 256 Unicode
33
+ characters. Use country alongside city to distinguish places with the same name.
34
+ Missing locations do not match.
35
+ """
36
+
37
+ continent: Literal["AF", "AN", "AS", "EU", "NA", "OC", "SA"]
38
+ """Exact continent code from the local lookup. Missing locations do not match."""
39
+
40
+ country: str
41
+ """Exact uppercase ISO 3166-1 alpha-2 country code, such as GB.
42
+
43
+ Missing locations do not match.
44
+ """
45
+
46
+ device_type: Literal["desktop", "mobile", "tablet", "unknown"]
47
+ """Exact device class. unknown matches an explicit unknown value."""
48
+
49
+ kind: Literal["summary", "quality", "engagement"]
50
+ """Metric set for every time bucket.
51
+
52
+ Uses the same calculations and sample counts as the corresponding totals route.
53
+ """
54
+
55
+ os_name: str
56
+ """Exact operating-system name, such as macOS. Missing values do not match."""
57
+
58
+ page_origin: str
59
+ """
60
+ Exact, case-sensitive page origin captured by the player, such as
61
+ https://example.com. Metrics use the first retained view start; raw events use
62
+ each event context. Missing values do not match.
63
+ """
64
+
65
+ page_path: str
66
+ """Exact, case-sensitive page path captured by the player, such as /watch/video.
67
+
68
+ Filter by page_origin as well to distinguish identical paths on different sites.
69
+ Metrics use the first retained view start; raw events use each event context.
70
+ Missing values do not match.
71
+ """
72
+
73
+ playback_rate: str
74
+ """
75
+ Playback rate from 0.01 to 16 with at most two decimals, such as 1, 1.5 or 2;
76
+ 2.0 and 2 are the same rate. Metrics use the rate on the first retained view
77
+ start; raw events use each event's value.
78
+ """
79
+
80
+ subtitle_language: str
81
+ """
82
+ Exact, case-sensitive, non-blank subtitle language tag, such as fr or en-US; und
83
+ for a subtitles track without a language. Metrics use the language showing on
84
+ the first retained view start; raw events use each event's value. Views without
85
+ subtitles at start do not match.
86
+ """
87
+
88
+ user_id: str
89
+ """Exact integrator-supplied user ID.
90
+
91
+ Selects views by their start event; event lists match each event's own value.
92
+ Missing/null user IDs do not match. Reports with this filter read one stored row
93
+ per view.
94
+ """
95
+
96
+ video_id: str
97
+ """Exact video ID; must not be blank. Combined with all other filters using AND."""
98
+
99
+ video_title: str
100
+ """Exact, case-sensitive video title.
101
+
102
+ Selects views by the title on their first retained start; event lists match each
103
+ event's own value. Views without a title do not match. Reports with this filter
104
+ read one stored row per view.
105
+ """
106
+
107
+ view_id: str
108
+ """Filter one playback attempt by view ID. Metrics use its first retained start."""
109
+
110
+ viewer_id: str
111
+ """Exact viewer ID.
112
+
113
+ The Chunkify player SDK generates one per browser; missing/null viewer IDs do
114
+ not match.
115
+ """
@@ -0,0 +1,140 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union
6
+ from datetime import datetime
7
+ from typing_extensions import Literal, Annotated, TypedDict
8
+
9
+ from .._utils import PropertyInfo
10
+
11
+ __all__ = ["VideoListParams"]
12
+
13
+
14
+ class VideoListParams(TypedDict, total=False):
15
+ browser_name: str
16
+ """Exact browser name, such as Chrome. Missing values do not match."""
17
+
18
+ city: str
19
+ """
20
+ Exact, case-sensitive city name from the local lookup, with 1 to 256 Unicode
21
+ characters. Use country alongside city to distinguish places with the same name.
22
+ Missing locations do not match.
23
+ """
24
+
25
+ continent: Literal["AF", "AN", "AS", "EU", "NA", "OC", "SA"]
26
+ """Exact continent code from the local lookup. Missing locations do not match."""
27
+
28
+ country: str
29
+ """Exact uppercase ISO 3166-1 alpha-2 country code, such as GB.
30
+
31
+ Missing locations do not match.
32
+ """
33
+
34
+ cursor: str
35
+ """Use next_cursor from the previous page.
36
+
37
+ Keep the same filters, sort_by and order. Video cursors from earlier versions
38
+ are invalid; start a new pagination sequence after upgrading.
39
+ """
40
+
41
+ device_type: Literal["desktop", "mobile", "tablet", "unknown"]
42
+ """Exact device class. unknown matches an explicit unknown value."""
43
+
44
+ from_: Annotated[Union[str, datetime], PropertyInfo(alias="from", format="iso8601")]
45
+ """Inclusive RFC3339 occurrence-time lower bound, with timezone.
46
+
47
+ Summary/video queries apply it to the selected view_started event. Must be
48
+ before to.
49
+ """
50
+
51
+ limit: int
52
+ """Maximum rows on this page.
53
+
54
+ Events and videos always support pagination; summary, quality and engagement
55
+ support it only with group_by.
56
+ """
57
+
58
+ order: Literal["asc", "desc"]
59
+ """Sort direction.
60
+
61
+ Events and videos default to asc; views default to desc. Events sort by
62
+ ingestion sequence. Videos and views sort by sort_by with missing values last.
63
+ View ties use view_id in the requested direction; video metric ties use video_id
64
+ ascending.
65
+ """
66
+
67
+ os_name: str
68
+ """Exact operating-system name, such as macOS. Missing values do not match."""
69
+
70
+ page_origin: str
71
+ """
72
+ Exact, case-sensitive page origin captured by the player, such as
73
+ https://example.com. Metrics use the first retained view start; raw events use
74
+ each event context. Missing values do not match.
75
+ """
76
+
77
+ page_path: str
78
+ """Exact, case-sensitive page path captured by the player, such as /watch/video.
79
+
80
+ Filter by page_origin as well to distinguish identical paths on different sites.
81
+ Metrics use the first retained view start; raw events use each event context.
82
+ Missing values do not match.
83
+ """
84
+
85
+ playback_rate: str
86
+ """
87
+ Playback rate from 0.01 to 16 with at most two decimals, such as 1, 1.5 or 2;
88
+ 2.0 and 2 are the same rate. Metrics use the rate on the first retained view
89
+ start; raw events use each event's value.
90
+ """
91
+
92
+ sort_by: Literal["video_id", "views", "unique_viewers", "total_playing_time_ms", "playback_score"]
93
+ """Rank all matching videos before pagination.
94
+
95
+ Missing scores come last in both directions. Metric ties use video_id ascending.
96
+ Keep sort_by, order and filters unchanged with a cursor.
97
+ """
98
+
99
+ subtitle_language: str
100
+ """
101
+ Exact, case-sensitive, non-blank subtitle language tag, such as fr or en-US; und
102
+ for a subtitles track without a language. Metrics use the language showing on
103
+ the first retained view start; raw events use each event's value. Views without
104
+ subtitles at start do not match.
105
+ """
106
+
107
+ to: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
108
+ """Exclusive RFC3339 occurrence-time upper bound, with timezone.
109
+
110
+ Summary/video queries apply it to the selected view_started event.
111
+ """
112
+
113
+ user_id: str
114
+ """Exact integrator-supplied user ID.
115
+
116
+ Selects views by their start event; event lists match each event's own value.
117
+ Missing/null user IDs do not match. Reports with this filter read one stored row
118
+ per view.
119
+ """
120
+
121
+ video_id: str
122
+ """Exact video ID; must not be blank. Combined with all other filters using AND."""
123
+
124
+ video_title: str
125
+ """Exact, case-sensitive video title.
126
+
127
+ Selects views by the title on their first retained start; event lists match each
128
+ event's own value. Views without a title do not match. Reports with this filter
129
+ read one stored row per view.
130
+ """
131
+
132
+ view_id: str
133
+ """Filter one playback attempt by view ID. Metrics use its first retained start."""
134
+
135
+ viewer_id: str
136
+ """Exact viewer ID.
137
+
138
+ The Chunkify player SDK generates one per browser; missing/null viewer IDs do
139
+ not match.
140
+ """
@@ -0,0 +1,23 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from .._models import BaseModel
6
+ from .shared.playback_score import PlaybackScore
7
+
8
+ __all__ = ["VideoMetrics"]
9
+
10
+
11
+ class VideoMetrics(BaseModel):
12
+ playback_score: PlaybackScore
13
+
14
+ total_playing_time_ms: float
15
+
16
+ unique_viewers: int
17
+
18
+ video_id: str
19
+
20
+ video_title: Optional[str] = None
21
+ """Title from the most recently received selected start that supplied one."""
22
+
23
+ views: int
@@ -0,0 +1,14 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from .._models import BaseModel
6
+ from .video_metrics import VideoMetrics
7
+
8
+ __all__ = ["VideoPage"]
9
+
10
+
11
+ class VideoPage(BaseModel):
12
+ next_cursor: Optional[str] = None
13
+
14
+ videos: List[VideoMetrics]
@@ -0,0 +1,43 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+
6
+ from .._models import BaseModel
7
+ from .shared.playback_score import PlaybackScore
8
+
9
+ __all__ = ["View"]
10
+
11
+
12
+ class View(BaseModel):
13
+ browser_name: Optional[str] = None
14
+
15
+ device_type: Optional[str] = None
16
+
17
+ has_ended_event: bool
18
+
19
+ has_fatal_error: bool
20
+
21
+ os_name: Optional[str] = None
22
+
23
+ playback_score: PlaybackScore
24
+
25
+ playing_time_ms: float
26
+
27
+ reached_end: bool
28
+
29
+ rebuffer_duration_ms: Optional[float] = None
30
+
31
+ started_at: datetime
32
+
33
+ startup_time_ms: Optional[float] = None
34
+
35
+ user_id: Optional[str] = None
36
+
37
+ video_id: str
38
+
39
+ video_title: Optional[str] = None
40
+
41
+ view_id: str
42
+
43
+ viewer_id: Optional[str] = None
@@ -0,0 +1,21 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import List, Optional
6
+
7
+ from .view import View
8
+ from .._models import BaseModel
9
+
10
+ __all__ = ["ViewDetail"]
11
+
12
+
13
+ class ViewDetail(BaseModel):
14
+ events: List["StoredEvent"]
15
+
16
+ next_cursor: Optional[str] = None
17
+
18
+ view: View
19
+
20
+
21
+ from .stored_event import StoredEvent
@@ -0,0 +1,180 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Union, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from .._models import BaseModel
8
+ from .shared.played_range import PlayedRange
9
+ from .shared.browser_context import BrowserContext
10
+ from .shared.subtitle_playing_time import SubtitlePlayingTime
11
+ from .shared.rendition_playing_time import RenditionPlayingTime
12
+ from .shared.playback_rate_playing_time import PlaybackRatePlayingTime
13
+
14
+ __all__ = ["ViewEnded"]
15
+
16
+
17
+ class ViewEnded(BaseModel):
18
+ connector_name: str
19
+
20
+ connector_version: Optional[str] = None
21
+
22
+ delivery_hostname: Optional[str] = None
23
+
24
+ delivery_request_count: Optional[float] = None
25
+
26
+ delivery_throughput_bps: Optional[float] = None
27
+
28
+ delivery_transferred_bytes: Optional[float] = None
29
+
30
+ dropped_video_frames: Optional[float] = None
31
+
32
+ environment: Optional[str] = None
33
+
34
+ error_category: Optional[Literal["aborted", "network", "decode", "unsupported", "unknown"]] = None
35
+
36
+ error_code: Union[str, float, None] = None
37
+
38
+ error_fatal: Optional[bool] = None
39
+
40
+ error_playhead_seconds: Optional[float] = None
41
+
42
+ event_id: str
43
+
44
+ event_name: Literal["chunkify.video.view_ended"]
45
+
46
+ first_video_frame_time_ms: Optional[float] = None
47
+
48
+ furthest_progress_ratio: Optional[float] = None
49
+
50
+ maximum_playhead_seconds: float
51
+
52
+ media_duration_seconds: Optional[float] = None
53
+
54
+ media_height_px: Optional[float] = None
55
+
56
+ media_width_px: Optional[float] = None
57
+
58
+ occurred_at: datetime
59
+
60
+ player_height_px: Optional[float] = None
61
+
62
+ player_name: Optional[str] = None
63
+
64
+ player_version: Optional[str] = None
65
+
66
+ player_width_px: Optional[float] = None
67
+
68
+ playing_time_ms: float
69
+
70
+ reason: Optional[Literal["ended", "destroyed", "source_changed", "page_exit"]] = None
71
+
72
+ rebuffer_count: float
73
+
74
+ rebuffer_duration_ms: float
75
+
76
+ rebuffer_ratio: Optional[float] = None
77
+
78
+ rendition_playing_time: Optional[List[RenditionPlayingTime]] = None
79
+
80
+ rendition_switch_count: Optional[float] = None
81
+
82
+ schema_version: Literal[1]
83
+
84
+ sdk_name: str
85
+ """Name of the SDK or integration that produced the event.
86
+
87
+ Informational metadata, preserved as received. Must contain at least one
88
+ non-whitespace character.
89
+ """
90
+
91
+ sdk_version: str
92
+
93
+ seek_count: float
94
+
95
+ seek_duration_ms: float
96
+
97
+ selected_rendition_bitrate_bps: Optional[float] = None
98
+
99
+ selected_rendition_codec: Optional[str] = None
100
+
101
+ selected_rendition_height: Optional[float] = None
102
+
103
+ selected_rendition_width: Optional[float] = None
104
+
105
+ sequence: int
106
+
107
+ startup_outcome: Optional[Literal["started", "failed_before_start", "ended_before_start"]] = None
108
+
109
+ startup_time_ms: Optional[float] = None
110
+
111
+ total_video_frames: Optional[float] = None
112
+
113
+ video_id: str
114
+
115
+ view_id: str
116
+
117
+ viewer_id: Optional[str] = None
118
+ """
119
+ Anonymous browser identifier generated by the Chunkify player SDK and stored in
120
+ the page's localStorage.
121
+ """
122
+
123
+ browser_context: Optional[BrowserContext] = None
124
+ """Browser and device information.
125
+
126
+ The Chunkify player sends every field, with null for unavailable measurements.
127
+ Other integrations may omit any field except schema_version. Extra properties
128
+ are preserved.
129
+ """
130
+
131
+ playback_rate: Optional[float] = None
132
+ """
133
+ Current playback rate, rounded to two decimals, such as 1, 1.5 or 2; from 0.01
134
+ to 16. Optional.
135
+ """
136
+
137
+ playback_rate_playing_time: Optional[List[PlaybackRatePlayingTime]] = None
138
+ """Cumulative playing time per playback rate for this attempt.
139
+
140
+ At most 32 entries. Optional.
141
+ """
142
+
143
+ played_ranges: Optional[List[PlayedRange]] = None
144
+ """
145
+ Cumulative played media ranges for this attempt, sorted and merged without
146
+ overlaps. Seeking, pauses and buffering are excluded. Missing or null means
147
+ unavailable; an empty array means measured but no section played. Replaying a
148
+ section does not add another range.
149
+ """
150
+
151
+ playhead_seconds: Optional[float] = None
152
+ """Current media position at this event, not the maximum reached."""
153
+
154
+ subtitle_language: Optional[str] = None
155
+ """
156
+ Language tag (BCP 47) of the showing subtitles or captions track; und when the
157
+ track declares no language; null when subtitles are off. Optional.
158
+ """
159
+
160
+ subtitle_playing_time: Optional[List[SubtitlePlayingTime]] = None
161
+ """
162
+ Cumulative playing time per subtitle language for this attempt, null language
163
+ meaning subtitles off. At most 32 entries. Optional.
164
+ """
165
+
166
+ user_id: Optional[str] = None
167
+ """
168
+ Optional integrator-supplied user ID, used to link views to the integrator's own
169
+ users.
170
+ """
171
+
172
+ video_title: Optional[str] = None
173
+ """Optional human-readable video title for reports."""
174
+
175
+ visibility_state: Optional[Literal["visible", "hidden"]] = None
176
+ """Tab visibility when the event was recorded.
177
+
178
+ Hidden does not imply paused playback or identify the cause of a pause. Missing
179
+ on older events; null when unavailable.
180
+ """