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,145 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from . import shared, event_page, view_detail, stored_event
6
+ from .. import _compat
7
+ from .view import View as View
8
+ from .export import Export as Export
9
+ from .health import Health as Health
10
+ from .shared import (
11
+ OtlpScope as OtlpScope,
12
+ PlayedRange as PlayedRange,
13
+ ViewMetrics as ViewMetrics,
14
+ EventContext as EventContext,
15
+ OtlpAnyValue as OtlpAnyValue,
16
+ OtlpResource as OtlpResource,
17
+ EventEnvelope as EventEnvelope,
18
+ OtlpAttribute as OtlpAttribute,
19
+ OtlpLogRecord as OtlpLogRecord,
20
+ PlaybackScore as PlaybackScore,
21
+ BrowserContext as BrowserContext,
22
+ ProgressReached as ProgressReached,
23
+ StartupOutcomes as StartupOutcomes,
24
+ CustomDimensions as CustomDimensions,
25
+ MetricCountRatio as MetricCountRatio,
26
+ StoredOtlpContext as StoredOtlpContext,
27
+ OtlpAttributeValue as OtlpAttributeValue,
28
+ SubtitlePlayingTime as SubtitlePlayingTime,
29
+ OtlpContextAttribute as OtlpContextAttribute,
30
+ RenditionPlayingTime as RenditionPlayingTime,
31
+ WatchTimeDistribution as WatchTimeDistribution,
32
+ PlaybackRatePlayingTime as PlaybackRatePlayingTime,
33
+ )
34
+ from .metrics import Metrics as Metrics
35
+ from .project import Project as Project
36
+ from .quality import Quality as Quality
37
+ from .view_page import ViewPage as ViewPage
38
+ from .engagement import Engagement as Engagement
39
+ from .error_page import ErrorPage as ErrorPage
40
+ from .event_page import EventPage as EventPage
41
+ from .timeseries import Timeseries as Timeseries
42
+ from .video_page import VideoPage as VideoPage
43
+ from .view_ended import ViewEnded as ViewEnded
44
+ from .error_group import ErrorGroup as ErrorGroup
45
+ from .project_key import ProjectKey as ProjectKey
46
+ from .time_bucket import TimeBucket as TimeBucket
47
+ from .view_detail import ViewDetail as ViewDetail
48
+ from .project_keys import ProjectKeys as ProjectKeys
49
+ from .stored_event import StoredEvent as StoredEvent
50
+ from .view_started import ViewStarted as ViewStarted
51
+ from .video_metrics import VideoMetrics as VideoMetrics
52
+ from .view_snapshot import ViewSnapshot as ViewSnapshot
53
+ from .export_columns import ExportColumns as ExportColumns
54
+ from .native_created import NativeCreated as NativeCreated
55
+ from .playback_error import PlaybackError as PlaybackError
56
+ from .seek_completed import SeekCompleted as SeekCompleted
57
+ from .analytics_event import AnalyticsEvent as AnalyticsEvent
58
+ from .created_project import CreatedProject as CreatedProject
59
+ from .deleted_project import DeletedProject as DeletedProject
60
+ from .subtitle_metric import SubtitleMetric as SubtitleMetric
61
+ from .subtitle_report import SubtitleReport as SubtitleReport
62
+ from .dimension_values import DimensionValues as DimensionValues
63
+ from .metrics_response import MetricsResponse as MetricsResponse
64
+ from .native_duplicate import NativeDuplicate as NativeDuplicate
65
+ from .quality_response import QualityResponse as QualityResponse
66
+ from .rendition_metric import RenditionMetric as RenditionMetric
67
+ from .rendition_report import RenditionReport as RenditionReport
68
+ from .retention_bucket import RetentionBucket as RetentionBucket
69
+ from .retention_report import RetentionReport as RetentionReport
70
+ from .subtitle_changed import SubtitleChanged as SubtitleChanged
71
+ from .view_ended_param import ViewEndedParam as ViewEndedParam
72
+ from .view_list_params import ViewListParams as ViewListParams
73
+ from .error_list_params import ErrorListParams as ErrorListParams
74
+ from .event_list_params import EventListParams as EventListParams
75
+ from .rendition_changed import RenditionChanged as RenditionChanged
76
+ from .video_list_params import VideoListParams as VideoListParams
77
+ from .export_query_param import ExportQueryParam as ExportQueryParam
78
+ from .quality_timeseries import QualityTimeseries as QualityTimeseries
79
+ from .view_started_param import ViewStartedParam as ViewStartedParam
80
+ from .created_project_key import CreatedProjectKey as CreatedProjectKey
81
+ from .engagement_response import EngagementResponse as EngagementResponse
82
+ from .event_ingest_params import EventIngestParams as EventIngestParams
83
+ from .rotated_project_key import RotatedProjectKey as RotatedProjectKey
84
+ from .timeseries_response import TimeseriesResponse as TimeseriesResponse
85
+ from .view_snapshot_param import ViewSnapshotParam as ViewSnapshotParam
86
+ from .export_create_params import ExportCreateParams as ExportCreateParams
87
+ from .playback_error_param import PlaybackErrorParam as PlaybackErrorParam
88
+ from .playback_rate_metric import PlaybackRateMetric as PlaybackRateMetric
89
+ from .playback_rate_report import PlaybackRateReport as PlaybackRateReport
90
+ from .seek_completed_param import SeekCompletedParam as SeekCompletedParam
91
+ from .view_retrieve_params import ViewRetrieveParams as ViewRetrieveParams
92
+ from .analytics_event_param import AnalyticsEventParam as AnalyticsEventParam
93
+ from .engagement_timeseries import EngagementTimeseries as EngagementTimeseries
94
+ from .event_ingest_response import EventIngestResponse as EventIngestResponse
95
+ from .playback_rate_changed import PlaybackRateChanged as PlaybackRateChanged
96
+ from .project_update_params import ProjectUpdateParams as ProjectUpdateParams
97
+ from .metrics_breakdown_page import MetricsBreakdownPage as MetricsBreakdownPage
98
+ from .playback_state_changed import PlaybackStateChanged as PlaybackStateChanged
99
+ from .quality_breakdown_page import QualityBreakdownPage as QualityBreakdownPage
100
+ from .subtitle_changed_param import SubtitleChangedParam as SubtitleChangedParam
101
+ from .quality_retrieve_params import QualityRetrieveParams as QualityRetrieveParams
102
+ from .rendition_changed_param import RenditionChangedParam as RenditionChangedParam
103
+ from .summary_retrieve_params import SummaryRetrieveParams as SummaryRetrieveParams
104
+ from .export_download_response import ExportDownloadResponse as ExportDownloadResponse
105
+ from .subtitle_retrieve_params import SubtitleRetrieveParams as SubtitleRetrieveParams
106
+ from .timesery_retrieve_params import TimeseryRetrieveParams as TimeseryRetrieveParams
107
+ from .engagement_breakdown_page import EngagementBreakdownPage as EngagementBreakdownPage
108
+ from .quality_timeseries_bucket import QualityTimeseriesBucket as QualityTimeseriesBucket
109
+ from .rendition_retrieve_params import RenditionRetrieveParams as RenditionRetrieveParams
110
+ from .retention_retrieve_params import RetentionRetrieveParams as RetentionRetrieveParams
111
+ from .engagement_retrieve_params import EngagementRetrieveParams as EngagementRetrieveParams
112
+ from .export_list_columns_params import ExportListColumnsParams as ExportListColumnsParams
113
+ from .admin_create_project_params import AdminCreateProjectParams as AdminCreateProjectParams
114
+ from .playback_rate_changed_param import PlaybackRateChangedParam as PlaybackRateChangedParam
115
+ from .dimension_list_values_params import DimensionListValuesParams as DimensionListValuesParams
116
+ from .engagement_timeseries_bucket import EngagementTimeseriesBucket as EngagementTimeseriesBucket
117
+ from .playback_state_changed_param import PlaybackStateChangedParam as PlaybackStateChangedParam
118
+ from .playback_rate_retrieve_params import PlaybackRateRetrieveParams as PlaybackRateRetrieveParams
119
+
120
+ # Rebuild cyclical models only after all modules are imported.
121
+ # This ensures that, when building the deferred (due to cyclical references) model schema,
122
+ # Pydantic can resolve the necessary references.
123
+ # See: https://github.com/pydantic/pydantic/issues/11250 for more context.
124
+ if _compat.PYDANTIC_V1:
125
+ event_page.EventPage.update_forward_refs() # type: ignore
126
+ stored_event.StoredEvent.update_forward_refs() # type: ignore
127
+ view_detail.ViewDetail.update_forward_refs() # type: ignore
128
+ shared.otlp_any_value.OtlpAnyValue.update_forward_refs() # type: ignore
129
+ shared.otlp_attribute.OtlpAttribute.update_forward_refs() # type: ignore
130
+ shared.otlp_context_attribute.OtlpContextAttribute.update_forward_refs() # type: ignore
131
+ shared.otlp_log_record.OtlpLogRecord.update_forward_refs() # type: ignore
132
+ shared.otlp_resource.OtlpResource.update_forward_refs() # type: ignore
133
+ shared.otlp_scope.OtlpScope.update_forward_refs() # type: ignore
134
+ shared.stored_otlp_context.StoredOtlpContext.update_forward_refs() # type: ignore
135
+ else:
136
+ event_page.EventPage.model_rebuild(_parent_namespace_depth=0)
137
+ stored_event.StoredEvent.model_rebuild(_parent_namespace_depth=0)
138
+ view_detail.ViewDetail.model_rebuild(_parent_namespace_depth=0)
139
+ shared.otlp_any_value.OtlpAnyValue.model_rebuild(_parent_namespace_depth=0)
140
+ shared.otlp_attribute.OtlpAttribute.model_rebuild(_parent_namespace_depth=0)
141
+ shared.otlp_context_attribute.OtlpContextAttribute.model_rebuild(_parent_namespace_depth=0)
142
+ shared.otlp_log_record.OtlpLogRecord.model_rebuild(_parent_namespace_depth=0)
143
+ shared.otlp_resource.OtlpResource.model_rebuild(_parent_namespace_depth=0)
144
+ shared.otlp_scope.OtlpScope.model_rebuild(_parent_namespace_depth=0)
145
+ shared.stored_otlp_context.StoredOtlpContext.model_rebuild(_parent_namespace_depth=0)
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
@@ -0,0 +1,25 @@
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 Optional
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ from .._types import SequenceNotStr
9
+
10
+ __all__ = ["AdminCreateProjectParams"]
11
+
12
+
13
+ class AdminCreateProjectParams(TypedDict, total=False):
14
+ name: Required[str]
15
+ """Project display name."""
16
+
17
+ allowed_origins: SequenceNotStr[str]
18
+ """Additional project origins. Shared TOML origins are always included."""
19
+
20
+ retention_seconds: Optional[int]
21
+ """Retention by server receipt time, in seconds.
22
+
23
+ 0 disables expiration; null inherits the installation default. Omission also
24
+ inherits the default.
25
+ """
@@ -0,0 +1,32 @@
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 Annotated, TypeAlias
5
+
6
+ from .._utils import PropertyInfo
7
+ from .view_ended import ViewEnded
8
+ from .view_started import ViewStarted
9
+ from .view_snapshot import ViewSnapshot
10
+ from .playback_error import PlaybackError
11
+ from .seek_completed import SeekCompleted
12
+ from .subtitle_changed import SubtitleChanged
13
+ from .rendition_changed import RenditionChanged
14
+ from .playback_rate_changed import PlaybackRateChanged
15
+ from .playback_state_changed import PlaybackStateChanged
16
+
17
+ __all__ = ["AnalyticsEvent"]
18
+
19
+ AnalyticsEvent: TypeAlias = Annotated[
20
+ Union[
21
+ ViewStarted,
22
+ ViewSnapshot,
23
+ PlaybackError,
24
+ ViewEnded,
25
+ PlaybackStateChanged,
26
+ RenditionChanged,
27
+ SeekCompleted,
28
+ SubtitleChanged,
29
+ PlaybackRateChanged,
30
+ ],
31
+ PropertyInfo(discriminator="event_name"),
32
+ ]
@@ -0,0 +1,30 @@
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 typing_extensions import TypeAlias
7
+
8
+ from .view_ended_param import ViewEndedParam
9
+ from .view_started_param import ViewStartedParam
10
+ from .view_snapshot_param import ViewSnapshotParam
11
+ from .playback_error_param import PlaybackErrorParam
12
+ from .seek_completed_param import SeekCompletedParam
13
+ from .subtitle_changed_param import SubtitleChangedParam
14
+ from .rendition_changed_param import RenditionChangedParam
15
+ from .playback_rate_changed_param import PlaybackRateChangedParam
16
+ from .playback_state_changed_param import PlaybackStateChangedParam
17
+
18
+ __all__ = ["AnalyticsEventParam"]
19
+
20
+ AnalyticsEventParam: TypeAlias = Union[
21
+ ViewStartedParam,
22
+ ViewSnapshotParam,
23
+ PlaybackErrorParam,
24
+ ViewEndedParam,
25
+ PlaybackStateChangedParam,
26
+ RenditionChangedParam,
27
+ SeekCompletedParam,
28
+ SubtitleChangedParam,
29
+ PlaybackRateChangedParam,
30
+ ]
@@ -0,0 +1,37 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["CreatedProject"]
9
+
10
+
11
+ class CreatedProject(BaseModel):
12
+ effective_retention_seconds: int
13
+ """Effective retention in seconds after resolving the installation default.
14
+
15
+ 0 disables expiration.
16
+ """
17
+
18
+ name: str
19
+ """Project display name."""
20
+
21
+ project_id: str
22
+
23
+ public_key: str
24
+ """Public key for sending events."""
25
+
26
+ restart_required: Literal[False]
27
+
28
+ retention_seconds: Optional[int] = None
29
+ """Retention by server receipt time, in seconds.
30
+
31
+ 0 disables expiration; null inherits the installation default.
32
+ """
33
+
34
+ secret_key: str
35
+ """Secret key for this project. Save it now; it is returned once."""
36
+
37
+ warning: Optional[str] = None
@@ -0,0 +1,34 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["CreatedProjectKey"]
9
+
10
+
11
+ class CreatedProjectKey(BaseModel):
12
+ """A newly created key.
13
+
14
+ Save the key value now; later key listings contain only metadata.
15
+ """
16
+
17
+ key: str
18
+ """New key value. Save it now; it is returned once."""
19
+
20
+ key_id: str
21
+
22
+ permission: Literal["public", "secret"]
23
+
24
+ project_id: str
25
+
26
+ read_only: bool
27
+ """True for a private key limited to analytics reads through HTTP and MCP.
28
+
29
+ Public keys always report false. Rotation preserves this setting.
30
+ """
31
+
32
+ restart_required: Literal[False]
33
+
34
+ warning: Optional[str] = None
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["DeletedProject"]
9
+
10
+
11
+ class DeletedProject(BaseModel):
12
+ deleted: Literal[True]
13
+
14
+ project_id: str
15
+
16
+ restart_required: Literal[False]
17
+
18
+ warning: Optional[str] = None
@@ -0,0 +1,124 @@
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__ = ["DimensionListValuesParams"]
12
+
13
+
14
+ class DimensionListValuesParams(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
+ os_name: str
59
+ """Exact operating-system name, such as macOS. Missing values do not match."""
60
+
61
+ page_origin: str
62
+ """
63
+ Exact, case-sensitive page origin captured by the player, such as
64
+ https://example.com. Metrics use the first retained view start; raw events use
65
+ each event context. Missing values do not match.
66
+ """
67
+
68
+ page_path: str
69
+ """Exact, case-sensitive page path captured by the player, such as /watch/video.
70
+
71
+ Filter by page_origin as well to distinguish identical paths on different sites.
72
+ Metrics use the first retained view start; raw events use each event context.
73
+ Missing values do not match.
74
+ """
75
+
76
+ playback_rate: str
77
+ """
78
+ Playback rate from 0.01 to 16 with at most two decimals, such as 1, 1.5 or 2;
79
+ 2.0 and 2 are the same rate. Metrics use the rate on the first retained view
80
+ start; raw events use each event's value.
81
+ """
82
+
83
+ subtitle_language: str
84
+ """
85
+ Exact, case-sensitive, non-blank subtitle language tag, such as fr or en-US; und
86
+ for a subtitles track without a language. Metrics use the language showing on
87
+ the first retained view start; raw events use each event's value. Views without
88
+ subtitles at start do not match.
89
+ """
90
+
91
+ to: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
92
+ """Exclusive RFC3339 occurrence-time upper bound, with timezone.
93
+
94
+ Summary/video queries apply it to the selected view_started event.
95
+ """
96
+
97
+ user_id: str
98
+ """Exact integrator-supplied user ID.
99
+
100
+ Selects views by their start event; event lists match each event's own value.
101
+ Missing/null user IDs do not match. Reports with this filter read one stored row
102
+ per view.
103
+ """
104
+
105
+ video_id: str
106
+ """Exact video ID; must not be blank. Combined with all other filters using AND."""
107
+
108
+ video_title: str
109
+ """Exact, case-sensitive video title.
110
+
111
+ Selects views by the title on their first retained start; event lists match each
112
+ event's own value. Views without a title do not match. Reports with this filter
113
+ read one stored row per view.
114
+ """
115
+
116
+ view_id: str
117
+ """Filter one playback attempt by view ID. Metrics use its first retained start."""
118
+
119
+ viewer_id: str
120
+ """Exact viewer ID.
121
+
122
+ The Chunkify player SDK generates one per browser; missing/null viewer IDs do
123
+ not match.
124
+ """
@@ -0,0 +1,42 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Union, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+
8
+ __all__ = ["DimensionValues", "Value"]
9
+
10
+
11
+ class Value(BaseModel):
12
+ value: Optional[str] = None
13
+
14
+ views: int
15
+
16
+
17
+ class DimensionValues(BaseModel):
18
+ dimension: Union[
19
+ Literal[
20
+ "browser_name",
21
+ "os_name",
22
+ "device_type",
23
+ "video_id",
24
+ "viewer_id",
25
+ "user_id",
26
+ "video_title",
27
+ "continent",
28
+ "country",
29
+ "city",
30
+ "page_origin",
31
+ "page_path",
32
+ "subtitle_language",
33
+ "playback_rate",
34
+ "custom_keys",
35
+ ],
36
+ str,
37
+ ]
38
+ """One custom dimension's values, such as custom.plan."""
39
+
40
+ next_cursor: Optional[str] = None
41
+
42
+ values: List[Value]
@@ -0,0 +1,60 @@
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.progress_reached import ProgressReached
7
+ from .shared.watch_time_distribution import WatchTimeDistribution
8
+
9
+ __all__ = ["Engagement"]
10
+
11
+
12
+ class Engagement(BaseModel):
13
+ """Observed watch time and end-of-media for the same start cohort as summary.
14
+
15
+ Missing delivery can undercount both.
16
+ """
17
+
18
+ average_playing_time_ms: Optional[float] = None
19
+ """Total playing time divided by all selected attempts.
20
+
21
+ Null with no views; zero when views exist with no measured time.
22
+ """
23
+
24
+ progress_reached: ProgressReached
25
+ """Furthest progress on the selected final event or latest snapshot.
26
+
27
+ Only views with a positive known media duration and a progress ratio in [0,1]
28
+ are samples. Each milestone ratio uses sample_views. Seeking can count; this is
29
+ not watched coverage or audience retention.
30
+ """
31
+
32
+ reached_end_ratio: Optional[float] = None
33
+ """Reached-end views divided by all selected attempts.
34
+
35
+ Null without views. Multiply by 100 for percent. Does not imply the whole video
36
+ was watched.
37
+ """
38
+
39
+ reached_end_views: int
40
+ """Views whose winning final event has reason=ended.
41
+
42
+ Counts each selected view at most once.
43
+ """
44
+
45
+ total_playing_time_ms: float
46
+ """Cumulative playing time summed once per selected view, as in summary."""
47
+
48
+ views: int
49
+ """
50
+ Selected playback attempts with a retained start, including failed, ongoing and
51
+ start-only attempts.
52
+ """
53
+
54
+ watch_time_ms: WatchTimeDistribution
55
+ """
56
+ Playing time in milliseconds from one selected final event or latest snapshot
57
+ per view. Measured zero is included; missing measurements are excluded.
58
+ Percentiles use linear interpolation and are null without samples. This sample
59
+ denominator differs from average_playing_time_ms, which uses all attempts.
60
+ """
@@ -0,0 +1,44 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Union, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+ from .engagement import Engagement
8
+
9
+ __all__ = ["EngagementBreakdownPage", "Group"]
10
+
11
+
12
+ class Group(BaseModel):
13
+ data: Engagement
14
+ """Observed watch time and end-of-media for the same start cohort as summary.
15
+
16
+ Missing delivery can undercount both.
17
+ """
18
+
19
+ value: Optional[str] = None
20
+
21
+
22
+ class EngagementBreakdownPage(BaseModel):
23
+ group_by: Union[
24
+ Literal[
25
+ "browser_name",
26
+ "os_name",
27
+ "device_type",
28
+ "continent",
29
+ "country",
30
+ "city",
31
+ "page_origin",
32
+ "page_path",
33
+ "subtitle_language",
34
+ "playback_rate",
35
+ "video_title",
36
+ "user_id",
37
+ ],
38
+ str,
39
+ ]
40
+ """A custom dimension key, such as custom.plan."""
41
+
42
+ groups: List[Group]
43
+
44
+ next_cursor: Optional[str] = None
@@ -0,0 +1,11 @@
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 .engagement import Engagement
7
+ from .engagement_breakdown_page import EngagementBreakdownPage
8
+
9
+ __all__ = ["EngagementResponse"]
10
+
11
+ EngagementResponse: TypeAlias = Union[Engagement, EngagementBreakdownPage]