diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
index b14b0a6..21ac70a 100644
--- a/.github/workflows/release-please.yml
+++ b/.github/workflows/release-please.yml
@@ -51,18 +51,44 @@ jobs:
# version bump and changelog must also land back on scalar-next, or the next
# release PR would propose this release again. A real merge (never a plain
# commit push) so a squash- or rebase-merged release PR syncs just as well; the
- # non-conventional message keeps the sync commit out of future changelogs. Plain
- # (non-force) push on purpose: losing a race against a concurrent regeneration
- # push fails loudly here, and the platform's next sync re-converges.
+ # non-conventional message keeps the sync commit out of future changelogs.
+ #
+ # The Scalar platform merges main into scalar-next itself when the release
+ # PR merges, so this step routinely races it. The sync is done once the release commit
+ # is an ancestor of scalar-next, whoever merged it, so that is checked before every
+ # attempt. A rejected push retries from a fresh fetch rather than failing the release
+ # run. Plain (non-force) push on purpose: a concurrent regeneration push is never
+ # discarded, and a sync that still cannot land after the retries fails loudly.
- name: Sync release back to scalar-next
if: ${{ steps.release.outputs.release_created == 'true' }}
+ env:
+ RELEASE_SHA: ${{ steps.release.outputs.sha }}
+ RELEASE_TAG: ${{ steps.release.outputs.tag_name }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- git fetch origin scalar-next
- git checkout -B scalar-next origin/scalar-next
- git merge --no-edit -m "Sync release ${{ steps.release.outputs.tag_name }} back to scalar-next" "${{ steps.release.outputs.sha }}"
- git push origin scalar-next
+ # Explicit `|| return 1`s because `set -e` does not apply inside a function called
+ # as a condition, and a failed merge must never fall through to a no-op push.
+ sync_release() {
+ git fetch origin scalar-next || return 1
+ if git merge-base --is-ancestor "$RELEASE_SHA" origin/scalar-next; then
+ echo "$RELEASE_TAG is already on scalar-next."
+ return 0
+ fi
+ git checkout -B scalar-next origin/scalar-next || return 1
+ if ! git merge --no-edit -m "Sync release $RELEASE_TAG back to scalar-next" "$RELEASE_SHA"; then
+ git merge --abort
+ return 1
+ fi
+ git push origin scalar-next
+ }
+ for attempt in 1 2 3; do
+ if sync_release; then exit 0; fi
+ echo "Attempt $attempt of 3 to sync $RELEASE_TAG back to scalar-next failed."
+ if [ "$attempt" -lt 3 ]; then sleep $((attempt * 5)); fi
+ done
+ echo "::error::Could not sync $RELEASE_TAG back to scalar-next after 3 attempts."
+ exit 1
publish:
needs: release-please
# `!cancelled()` keeps publishing even when the back-sync to the integration branch
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 41ea87d..f6a9e15 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "1.2.1"
+ ".": "1.2.2"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 615d367..b4adf3b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## [1.2.2](https://github.com/gumlet/python-sdk/compare/v1.2.1...v1.2.2) (2026-10-15)
+
+
+### Chores
+
+* **api:** regenerate SDK ([ab7321f](https://github.com/gumlet/python-sdk/commit/ab7321f04a407bf2f38decc49e5f55c99aab778f))
+* **api:** update generated SDK content ([0a32835](https://github.com/gumlet/python-sdk/commit/0a3283563935151c50fca48554e99fd2d28b98a2))
+
## [1.2.1](https://github.com/gumlet/python-sdk/compare/v1.2.0...v1.2.1) (2026-10-12)
diff --git a/api.md b/api.md
index 3b21370..0cdcbba 100644
--- a/api.md
+++ b/api.md
@@ -1445,7 +1445,7 @@ This endpoint retrieves viewer analytics data. This endpoint is use for deep ins
```python
video_analytic = client.video_analytics.chart_data(
- metrics=[""],
+ metrics=["views"],
date_range={"start_at": "2024-01-01", "end_at": "2024-01-01"},
group_by="daily",
)
@@ -1485,7 +1485,7 @@ This endpoint retrieves aggregated data of the given metrics.
video_analytic = client.video_analytics.aggregated_data(
aggregate=[{"metric": "views", "function": "sum"}],
workspace_id="",
- timeframe={},
+ timeframe={"start_at": "2024-01-01", "end_at": "2024-01-01"},
)
```
diff --git a/pyproject.toml b/pyproject.toml
index 280156a..80053c7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "gumlet"
-version = "1.2.1" # x-release-please-version
+version = "1.2.2" # x-release-please-version
description = "Gumlet helps developers deliver online video and images. This API encompasses Gumlet Video, Image and Video Analytics functionality to help you build your products better and faster than ever before."
readme = "README.md"
license = "Apache-2.0"
diff --git a/scalar-sdk.manifest.json b/scalar-sdk.manifest.json
index 9139cf5..11e92de 100644
--- a/scalar-sdk.manifest.json
+++ b/scalar-sdk.manifest.json
@@ -1,7 +1,7 @@
{
"name": "Gumlet",
"slug": "gumlet",
- "generatorVersion": "0.36.3",
+ "generatorVersion": "0.36.5",
"servers": [
"https://api.gumlet.com/v1"
],
diff --git a/src/gumlet/_version.py b/src/gumlet/_version.py
index c821d8d..d522dc3 100644
--- a/src/gumlet/_version.py
+++ b/src/gumlet/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Scalar. See README.md for details.
__title__ = "gumlet"
-__version__ = "1.2.1" # x-release-please-version
+__version__ = "1.2.2" # x-release-please-version
diff --git a/src/gumlet/resources/image_usage_analytics.py b/src/gumlet/resources/image_usage_analytics.py
index 085bce3..6b48403 100644
--- a/src/gumlet/resources/image_usage_analytics.py
+++ b/src/gumlet/resources/image_usage_analytics.py
@@ -69,7 +69,7 @@ def retrieve(
This endpoint helps you get image analytics data like bandwidth consumption, request count, CDN hit ratio, etc.
Args:
- metrics: Define the metric you need the data for. Currently we support `bandwidth_consumption`, `requests_count`, `status_4xx`, `status_5xx`, and `avg_response_time`.
+ metrics: Define the metric you need the data for. Supported values: `bandwidth_consumption`, `requests_count`, `transformations_count`, `bandwidth_savings`, `origin_hit_rate`, `avg_transformation_response_time`, `status_4xx`, `status_5xx`, `cdn_hit_rate`, `content_type`, `status_2xx`, `avg_response_time`, `top_assets`, `bandwidth_consumption_by_source`, and `ai_credit_usage`.
date_range: The timeframe to get the data for. Currently we only support a maximum of 30 days between `start_at` and `end_at`.
group_by: Body parameter.
filters: Body parameter.
@@ -153,7 +153,7 @@ async def retrieve(
This endpoint helps you get image analytics data like bandwidth consumption, request count, CDN hit ratio, etc.
Args:
- metrics: Define the metric you need the data for. Currently we support `bandwidth_consumption`, `requests_count`, `status_4xx`, `status_5xx`, and `avg_response_time`.
+ metrics: Define the metric you need the data for. Supported values: `bandwidth_consumption`, `requests_count`, `transformations_count`, `bandwidth_savings`, `origin_hit_rate`, `avg_transformation_response_time`, `status_4xx`, `status_5xx`, `cdn_hit_rate`, `content_type`, `status_2xx`, `avg_response_time`, `top_assets`, `bandwidth_consumption_by_source`, and `ai_credit_usage`.
date_range: The timeframe to get the data for. Currently we only support a maximum of 30 days between `start_at` and `end_at`.
group_by: Body parameter.
filters: Body parameter.
diff --git a/src/gumlet/resources/video_analytics.py b/src/gumlet/resources/video_analytics.py
index 923f895..0ba70b5 100644
--- a/src/gumlet/resources/video_analytics.py
+++ b/src/gumlet/resources/video_analytics.py
@@ -4,9 +4,8 @@
import httpx
-from typing import Iterable
+from typing import Iterable, List
from typing_extensions import Literal
-from .._types import SequenceNotStr
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
@@ -43,7 +42,18 @@ def with_streaming_response(self) -> VideoAnalyticsResourceWithStreamingResponse
def chart_data(
self,
*,
- metrics: SequenceNotStr[str],
+ metrics: List[
+ Literal[
+ "views",
+ "unique_views",
+ "impressions",
+ "completion_percent_by_views",
+ "playing_time",
+ "concurrent_users",
+ "widget_form_submitted",
+ "cta_clicks",
+ ]
+ ],
workspace_id: str | Omit = omit,
date_range: video_analytic_chart_data_params.DateRange,
filters: Iterable[video_analytic_chart_data_params.Filter] | Omit = omit,
@@ -61,9 +71,9 @@ def chart_data(
This endpoint retrieves viewer analytics data. This endpoint is use for deep insights on the analytics data.
Args:
- metrics: Get data for one or more `metrics` in the same request. Please add any of these metrics. `views`, `unique_views`, `impressions`. `completion_percent_by_views`, `playing_time`, `concurrent_users`, `widget_form_submitted`, `cta_clicks`
+ metrics: Get data for one or more metrics in the same request. Supported values: `views`, `unique_views`, `impressions`, `completion_percent_by_views`, `playing_time`, `concurrent_users`, `widget_form_submitted`, and `cta_clicks`.
workspace_id: Gumlet workspace ID
- date_range: The timeframe to get the data for.
+ date_range: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Build *segments* of users using multiple filters on the data, `value` should be an *exact match*
group_by: Data can be grouped by `daily`, `weekly` or `monthly`.
chart_dimension: Group metrics by the selected dimension. You can select up to 3 dimensions for nested category results; results follow the selection order.
@@ -79,7 +89,7 @@ def chart_data(
Example:
```python
video_analytic = client.video_analytics.chart_data(
- metrics=[""],
+ metrics=["views"],
date_range={"start_at": "2024-01-01", "end_at": "2024-01-01"},
group_by="daily",
)
@@ -123,7 +133,7 @@ def breakdown_data(
This endpoint retrieves breakdown data of the given metrics by given breakdown field
Args:
- date_range: The timeframe to get the data for.
+ date_range: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Build *segments* of users using multiple filters on the data, `value` should be an *exact match*
breakdowns: Breakdown fields and metrics to retrieve data for. Supports 1 to 3 breakdowns per request.
workspace_id: The five to ten character unique identifier of the Gumlet workspace ID available on the Video Workspaces.
@@ -185,7 +195,7 @@ def aggregated_data(
Args:
aggregate: Aggregate multiple metrics at the same time
workspace_id: The unique identifier of the Gumlet workspace ID available on the Video Workspaces.
- timeframe: The timeframe to get the data for. Currently we only support maximum difference between `start_at` and `end_at` to be *60 days*
+ timeframe: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Get aggregations for metrics with multiple filters, `value` should be an exact match
extra_headers: Send extra headers with the request.
extra_query: Send extra query parameters with the request.
@@ -200,7 +210,7 @@ def aggregated_data(
video_analytic = client.video_analytics.aggregated_data(
aggregate=[{"metric": "views", "function": "sum"}],
workspace_id="",
- timeframe={},
+ timeframe={"start_at": "2024-01-01", "end_at": "2024-01-01"},
)
```
"""
@@ -234,7 +244,18 @@ def with_streaming_response(self) -> AsyncVideoAnalyticsResourceWithStreamingRes
async def chart_data(
self,
*,
- metrics: SequenceNotStr[str],
+ metrics: List[
+ Literal[
+ "views",
+ "unique_views",
+ "impressions",
+ "completion_percent_by_views",
+ "playing_time",
+ "concurrent_users",
+ "widget_form_submitted",
+ "cta_clicks",
+ ]
+ ],
workspace_id: str | Omit = omit,
date_range: video_analytic_chart_data_params.DateRange,
filters: Iterable[video_analytic_chart_data_params.Filter] | Omit = omit,
@@ -252,9 +273,9 @@ async def chart_data(
This endpoint retrieves viewer analytics data. This endpoint is use for deep insights on the analytics data.
Args:
- metrics: Get data for one or more `metrics` in the same request. Please add any of these metrics. `views`, `unique_views`, `impressions`. `completion_percent_by_views`, `playing_time`, `concurrent_users`, `widget_form_submitted`, `cta_clicks`
+ metrics: Get data for one or more metrics in the same request. Supported values: `views`, `unique_views`, `impressions`, `completion_percent_by_views`, `playing_time`, `concurrent_users`, `widget_form_submitted`, and `cta_clicks`.
workspace_id: Gumlet workspace ID
- date_range: The timeframe to get the data for.
+ date_range: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Build *segments* of users using multiple filters on the data, `value` should be an *exact match*
group_by: Data can be grouped by `daily`, `weekly` or `monthly`.
chart_dimension: Group metrics by the selected dimension. You can select up to 3 dimensions for nested category results; results follow the selection order.
@@ -270,7 +291,7 @@ async def chart_data(
Example:
```python
video_analytic = await client.video_analytics.chart_data(
- metrics=[""],
+ metrics=["views"],
date_range={"start_at": "2024-01-01", "end_at": "2024-01-01"},
group_by="daily",
)
@@ -314,7 +335,7 @@ async def breakdown_data(
This endpoint retrieves breakdown data of the given metrics by given breakdown field
Args:
- date_range: The timeframe to get the data for.
+ date_range: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Build *segments* of users using multiple filters on the data, `value` should be an *exact match*
breakdowns: Breakdown fields and metrics to retrieve data for. Supports 1 to 3 breakdowns per request.
workspace_id: The five to ten character unique identifier of the Gumlet workspace ID available on the Video Workspaces.
@@ -376,7 +397,7 @@ async def aggregated_data(
Args:
aggregate: Aggregate multiple metrics at the same time
workspace_id: The unique identifier of the Gumlet workspace ID available on the Video Workspaces.
- timeframe: The timeframe to get the data for. Currently we only support maximum difference between `start_at` and `end_at` to be *60 days*
+ timeframe: The timeframe to get the data for. The maximum range between start_at and end_at is 60 days.
filters: Get aggregations for metrics with multiple filters, `value` should be an exact match
extra_headers: Send extra headers with the request.
extra_query: Send extra query parameters with the request.
@@ -391,7 +412,7 @@ async def aggregated_data(
video_analytic = await client.video_analytics.aggregated_data(
aggregate=[{"metric": "views", "function": "sum"}],
workspace_id="",
- timeframe={},
+ timeframe={"start_at": "2024-01-01", "end_at": "2024-01-01"},
)
```
"""
diff --git a/src/gumlet/resources/video_assets.py b/src/gumlet/resources/video_assets.py
index 022bd25..db02521 100644
--- a/src/gumlet/resources/video_assets.py
+++ b/src/gumlet/resources/video_assets.py
@@ -4,7 +4,8 @@
import httpx
-from typing import Dict, Iterable, List
+from typing import Dict, Iterable, List, Union
+from datetime import date
from typing_extensions import Literal
from .._types import SequenceNotStr
@@ -630,8 +631,8 @@ def list(
status: str | Omit = omit,
tag: str | Omit = omit,
playlist_id: str | Omit = omit,
- start_date: str | Omit = omit,
- end_date: str | Omit = omit,
+ start_date: Union[str, date] | Omit = omit,
+ end_date: Union[str, date] | Omit = omit,
min_duration: float | Omit = omit,
max_duration: float | Omit = omit,
sort_by: Literal["title", "duration", "uploaded_at", "created_at"] | Omit = omit,
@@ -658,8 +659,8 @@ def list(
status: Comma-separated asset status values.
tag: Comma-separated asset tags.
playlist_id: Filter assets to a playlist.
- start_date: Asset created_at lower bound.
- end_date: Asset created_at upper bound.
+ start_date: Asset created_at lower bound. Date in yyyy-MM-dd format.
+ end_date: Asset created_at upper bound. Date in yyyy-MM-dd format.
min_duration: Minimum asset duration in seconds.
max_duration: Maximum asset duration in seconds.
sort_by: Sort assets by a supported field.
@@ -1571,8 +1572,8 @@ async def list(
status: str | Omit = omit,
tag: str | Omit = omit,
playlist_id: str | Omit = omit,
- start_date: str | Omit = omit,
- end_date: str | Omit = omit,
+ start_date: Union[str, date] | Omit = omit,
+ end_date: Union[str, date] | Omit = omit,
min_duration: float | Omit = omit,
max_duration: float | Omit = omit,
sort_by: Literal["title", "duration", "uploaded_at", "created_at"] | Omit = omit,
@@ -1599,8 +1600,8 @@ async def list(
status: Comma-separated asset status values.
tag: Comma-separated asset tags.
playlist_id: Filter assets to a playlist.
- start_date: Asset created_at lower bound.
- end_date: Asset created_at upper bound.
+ start_date: Asset created_at lower bound. Date in yyyy-MM-dd format.
+ end_date: Asset created_at upper bound. Date in yyyy-MM-dd format.
min_duration: Minimum asset duration in seconds.
max_duration: Maximum asset duration in seconds.
sort_by: Sort assets by a supported field.
diff --git a/src/gumlet/resources/video_usage_analytics.py b/src/gumlet/resources/video_usage_analytics.py
index f579aea..f5106ec 100644
--- a/src/gumlet/resources/video_usage_analytics.py
+++ b/src/gumlet/resources/video_usage_analytics.py
@@ -4,7 +4,8 @@
import httpx
-from typing import List
+from typing import List, Union
+from datetime import date
from typing_extensions import Literal
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
@@ -64,7 +65,7 @@ def retrieve(
This endpoint gives usage analytics data of your videos. Ex - top assets, bandwidth consumption
Args:
- metrics: Define the metric you need the data for. Currently we only support `bandwidth_consumption`, `asset_duration`, `storage_unit`, `top_assets`, `bandwidth_consumption_by_collection`, `errored_videos` and `widget_data`
+ metrics: Define the metric you need the data for. Supported values: `bandwidth_consumption`, `asset_duration`, `storage_unit`, `top_assets`, `drm_requests`, `ai_credit_usage`, and `errored_videos`.
date_range: The timeframe to get the data for. Currently we only support a maximum of 60 days between `start_at` and `end_at`.
filters: Body parameter.
top_assets_count: Count of video assets that should be returned. Max assets count is 1000 per page.
@@ -111,8 +112,8 @@ def retrieve(
def top_assets(
self,
*,
- start_at: str,
- end_at: str,
+ start_at: Union[str, date],
+ end_at: Union[str, date],
collection_id: str | Omit = omit,
page: str | Omit = omit,
page_size: str | Omit = omit,
@@ -127,8 +128,8 @@ def top_assets(
This endpoint lists top streamed assets in a video collection
Args:
- start_at: Date string in "yyyy-mm-dd" format
- end_at: Date string in "yyyy-mm-dd" format
+ start_at: Date in yyyy-MM-dd format
+ end_at: Date in yyyy-MM-dd format
collection_id: Gumlet workspace ID
page: Page number of the response.
page_size: Assets to list per page.
@@ -211,7 +212,7 @@ async def retrieve(
This endpoint gives usage analytics data of your videos. Ex - top assets, bandwidth consumption
Args:
- metrics: Define the metric you need the data for. Currently we only support `bandwidth_consumption`, `asset_duration`, `storage_unit`, `top_assets`, `bandwidth_consumption_by_collection`, `errored_videos` and `widget_data`
+ metrics: Define the metric you need the data for. Supported values: `bandwidth_consumption`, `asset_duration`, `storage_unit`, `top_assets`, `drm_requests`, `ai_credit_usage`, and `errored_videos`.
date_range: The timeframe to get the data for. Currently we only support a maximum of 60 days between `start_at` and `end_at`.
filters: Body parameter.
top_assets_count: Count of video assets that should be returned. Max assets count is 1000 per page.
@@ -258,8 +259,8 @@ async def retrieve(
async def top_assets(
self,
*,
- start_at: str,
- end_at: str,
+ start_at: Union[str, date],
+ end_at: Union[str, date],
collection_id: str | Omit = omit,
page: str | Omit = omit,
page_size: str | Omit = omit,
@@ -274,8 +275,8 @@ async def top_assets(
This endpoint lists top streamed assets in a video collection
Args:
- start_at: Date string in "yyyy-mm-dd" format
- end_at: Date string in "yyyy-mm-dd" format
+ start_at: Date in yyyy-MM-dd format
+ end_at: Date in yyyy-MM-dd format
collection_id: Gumlet workspace ID
page: Page number of the response.
page_size: Assets to list per page.
diff --git a/src/gumlet/types/audit_log_fetch_params.py b/src/gumlet/types/audit_log_fetch_params.py
index 6d469a0..0c9995a 100644
--- a/src/gumlet/types/audit_log_fetch_params.py
+++ b/src/gumlet/types/audit_log_fetch_params.py
@@ -2,10 +2,13 @@
from __future__ import annotations
-from typing import List
-from typing_extensions import Literal, Required, TypedDict
+from typing import List, Union
+from datetime import date
+from typing_extensions import Annotated, Literal, Required, TypedDict
from .._types import SequenceNotStr
+from .._utils import PropertyInfo
+
__all__ = ["AuditLogFetchParams", "DateRange"]
@@ -70,8 +73,8 @@ class AuditLogFetchParams(TypedDict, total=False):
class DateRange(TypedDict, total=False):
- start_at: Required[str]
- """Starting date for audit logs. It's a string in YYYY-MM-DD format."""
+ start_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
+ """Date in yyyy-MM-dd format"""
- end_at: Required[str]
- """Ending date for audit logs. It's a string in YYYY-MM-DD format."""
+ end_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
+ """Date in yyyy-MM-dd format"""
diff --git a/src/gumlet/types/image_usage_analytic_retrieve_params.py b/src/gumlet/types/image_usage_analytic_retrieve_params.py
index c7a212d..0d366c6 100644
--- a/src/gumlet/types/image_usage_analytic_retrieve_params.py
+++ b/src/gumlet/types/image_usage_analytic_retrieve_params.py
@@ -33,7 +33,7 @@ class ImageUsageAnalyticRetrieveParams(TypedDict, total=False):
]
]
]
- """Define the metric you need the data for. Currently we support `bandwidth_consumption`, `requests_count`, `status_4xx`, `status_5xx`, and `avg_response_time`."""
+ """Define the metric you need the data for. Supported values: `bandwidth_consumption`, `requests_count`, `transformations_count`, `bandwidth_savings`, `origin_hit_rate`, `avg_transformation_response_time`, `status_4xx`, `status_5xx`, `cdn_hit_rate`, `content_type`, `status_2xx`, `avg_response_time`, `top_assets`, `bandwidth_consumption_by_source`, and `ai_credit_usage`."""
date_range: Required[DateRange]
"""The timeframe to get the data for. Currently we only support a maximum of 30 days between `start_at` and `end_at`."""
@@ -50,7 +50,7 @@ class Filters(TypedDict, total=False):
class DateRange(TypedDict, total=False):
start_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """The starting date to consider"""
+ """Date in yyyy-MM-dd format"""
end_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """The ending date to consider"""
+ """Date in yyyy-MM-dd format"""
diff --git a/src/gumlet/types/live_stream_analytic_usage_params.py b/src/gumlet/types/live_stream_analytic_usage_params.py
index 45300e1..d928d4a 100644
--- a/src/gumlet/types/live_stream_analytic_usage_params.py
+++ b/src/gumlet/types/live_stream_analytic_usage_params.py
@@ -23,7 +23,7 @@ class LiveStreamAnalyticUsageParams(TypedDict, total=False):
class DateRange(TypedDict, total=False):
start_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """Start date in ISO 8601 date format (YYYY-MM-DD)"""
+ """Date in yyyy-MM-dd format"""
end_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """End date in ISO 8601 date format (YYYY-MM-DD)"""
+ """Date in yyyy-MM-dd format"""
diff --git a/src/gumlet/types/video_analytic_aggregated_data_params.py b/src/gumlet/types/video_analytic_aggregated_data_params.py
index 907d524..f312fea 100644
--- a/src/gumlet/types/video_analytic_aggregated_data_params.py
+++ b/src/gumlet/types/video_analytic_aggregated_data_params.py
@@ -19,7 +19,7 @@ class VideoAnalyticAggregatedDataParams(TypedDict, total=False):
"""The unique identifier of the Gumlet workspace ID available on the Video Workspaces."""
timeframe: Required[Timeframe]
- """The timeframe to get the data for. Currently we only support maximum difference between `start_at` and `end_at` to be *60 days*"""
+ """The timeframe to get the data for. The maximum range between start_at and end_at is 60 days."""
filters: Iterable[Filter]
"""Get aggregations for metrics with multiple filters, `value` should be an exact match"""
@@ -73,11 +73,11 @@ class Filter(TypedDict, total=False):
class Timeframe(TypedDict, total=False):
- start_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
- """Use yyyy-MM-dd format"""
+ start_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
+ """Date in yyyy-MM-dd format"""
- end_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
- """Use yyyy-MM-dd format"""
+ end_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
+ """Date in yyyy-MM-dd format"""
class Aggregate(TypedDict, total=False):
diff --git a/src/gumlet/types/video_analytic_breakdown_data_params.py b/src/gumlet/types/video_analytic_breakdown_data_params.py
index 1501c49..6bd1d27 100644
--- a/src/gumlet/types/video_analytic_breakdown_data_params.py
+++ b/src/gumlet/types/video_analytic_breakdown_data_params.py
@@ -13,10 +13,7 @@
class VideoAnalyticBreakdownDataParams(TypedDict, total=False):
date_range: Required[DateRange]
- """
- The timeframe to get the data for.
- Currently, we only support a maximum of *60 days* between `start_at` and `end_at`.
- """
+ """The timeframe to get the data for. The maximum range between start_at and end_at is 60 days."""
filters: Iterable[Filter]
"""Build *segments* of users using multiple filters on the data, `value` should be an *exact match*"""
@@ -132,7 +129,7 @@ class Filter(TypedDict, total=False):
class DateRange(TypedDict, total=False):
start_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """Use yyyy-MM-dd format"""
+ """Date in yyyy-MM-dd format"""
end_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """Use yyyy-MM-dd format"""
+ """Date in yyyy-MM-dd format"""
diff --git a/src/gumlet/types/video_analytic_chart_data_params.py b/src/gumlet/types/video_analytic_chart_data_params.py
index a05295e..8035c39 100644
--- a/src/gumlet/types/video_analytic_chart_data_params.py
+++ b/src/gumlet/types/video_analytic_chart_data_params.py
@@ -2,10 +2,9 @@
from __future__ import annotations
-from typing import Iterable, Union
+from typing import Iterable, List, Union
from datetime import date
from typing_extensions import Annotated, Literal, Required, TypedDict
-from .._types import SequenceNotStr
from .._utils import PropertyInfo
@@ -13,17 +12,27 @@
class VideoAnalyticChartDataParams(TypedDict, total=False):
- metrics: Required[SequenceNotStr[str]]
- """Get data for one or more `metrics` in the same request. Please add any of these metrics. `views`, `unique_views`, `impressions`. `completion_percent_by_views`, `playing_time`, `concurrent_users`, `widget_form_submitted`, `cta_clicks`"""
+ metrics: Required[
+ List[
+ Literal[
+ "views",
+ "unique_views",
+ "impressions",
+ "completion_percent_by_views",
+ "playing_time",
+ "concurrent_users",
+ "widget_form_submitted",
+ "cta_clicks",
+ ]
+ ]
+ ]
+ """Get data for one or more metrics in the same request. Supported values: `views`, `unique_views`, `impressions`, `completion_percent_by_views`, `playing_time`, `concurrent_users`, `widget_form_submitted`, and `cta_clicks`."""
workspace_id: str
"""Gumlet workspace ID"""
date_range: Required[DateRange]
- """
- The timeframe to get the data for.
- Currently, we only support a maximum of *60 days* between `start_at` and `end_at`.
- """
+ """The timeframe to get the data for. The maximum range between start_at and end_at is 60 days."""
filters: Iterable[Filter]
"""Build *segments* of users using multiple filters on the data, `value` should be an *exact match*"""
@@ -116,7 +125,7 @@ class Filter(TypedDict, total=False):
class DateRange(TypedDict, total=False):
start_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """Use yyyy-MM-dd format"""
+ """Date in yyyy-MM-dd format"""
end_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """Use yyyy-MM-dd format"""
+ """Date in yyyy-MM-dd format"""
diff --git a/src/gumlet/types/video_asset_analytics_params.py b/src/gumlet/types/video_asset_analytics_params.py
index 188d880..15f37f9 100644
--- a/src/gumlet/types/video_asset_analytics_params.py
+++ b/src/gumlet/types/video_asset_analytics_params.py
@@ -44,7 +44,7 @@ class VideoAssetAnalyticsParams(TypedDict, total=False):
class DateRange(TypedDict, total=False):
start_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """ISO 8601 start timestamp"""
+ """Date in yyyy-MM-dd format"""
end_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """ISO 8601 end timestamp"""
+ """Date in yyyy-MM-dd format"""
diff --git a/src/gumlet/types/video_asset_list_params.py b/src/gumlet/types/video_asset_list_params.py
index f83d15a..587dfef 100644
--- a/src/gumlet/types/video_asset_list_params.py
+++ b/src/gumlet/types/video_asset_list_params.py
@@ -2,6 +2,8 @@
from __future__ import annotations
+from typing import Union
+from datetime import date
from typing_extensions import Annotated, Literal, TypedDict
from .._utils import PropertyInfo
@@ -28,11 +30,11 @@ class VideoAssetListParams(TypedDict, total=False):
playlist_id: str
"""Filter assets to a playlist."""
- start_date: str
- """Asset created_at lower bound."""
+ start_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
+ """Asset created_at lower bound. Date in yyyy-MM-dd format."""
- end_date: str
- """Asset created_at upper bound."""
+ end_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")]
+ """Asset created_at upper bound. Date in yyyy-MM-dd format."""
min_duration: float
"""Minimum asset duration in seconds."""
diff --git a/src/gumlet/types/video_usage_analytic_retrieve_params.py b/src/gumlet/types/video_usage_analytic_retrieve_params.py
index 15f007e..e7ea33a 100644
--- a/src/gumlet/types/video_usage_analytic_retrieve_params.py
+++ b/src/gumlet/types/video_usage_analytic_retrieve_params.py
@@ -25,7 +25,7 @@ class VideoUsageAnalyticRetrieveParams(TypedDict, total=False):
]
]
]
- """Define the metric you need the data for. Currently we only support `bandwidth_consumption`, `asset_duration`, `storage_unit`, `top_assets`, `bandwidth_consumption_by_collection`, `errored_videos` and `widget_data`"""
+ """Define the metric you need the data for. Supported values: `bandwidth_consumption`, `asset_duration`, `storage_unit`, `top_assets`, `drm_requests`, `ai_credit_usage`, and `errored_videos`."""
date_range: Required[DateRange]
"""The timeframe to get the data for. Currently we only support a maximum of 60 days between `start_at` and `end_at`."""
@@ -52,7 +52,7 @@ class Filters(TypedDict, total=False):
class DateRange(TypedDict, total=False):
start_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """The starting date to consider"""
+ """Date in yyyy-MM-dd format"""
end_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
- """The ending date to consider"""
+ """Date in yyyy-MM-dd format"""
diff --git a/src/gumlet/types/video_usage_analytic_top_assets_params.py b/src/gumlet/types/video_usage_analytic_top_assets_params.py
index 80692f5..d208203 100644
--- a/src/gumlet/types/video_usage_analytic_top_assets_params.py
+++ b/src/gumlet/types/video_usage_analytic_top_assets_params.py
@@ -2,17 +2,21 @@
from __future__ import annotations
-from typing_extensions import Required, TypedDict
+from typing import Union
+from datetime import date
+from typing_extensions import Annotated, Required, TypedDict
+
+from .._utils import PropertyInfo
__all__ = ["VideoUsageAnalyticTopAssetsParams"]
class VideoUsageAnalyticTopAssetsParams(TypedDict, total=False):
- start_at: Required[str]
- """Date string in "yyyy-mm-dd" format"""
+ start_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
+ """Date in yyyy-MM-dd format"""
- end_at: Required[str]
- """Date string in "yyyy-mm-dd" format"""
+ end_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
+ """Date in yyyy-MM-dd format"""
collection_id: str
"""Gumlet workspace ID"""
diff --git a/tests/smoke-test.py b/tests/smoke-test.py
index 4c459f4..6a7801e 100644
--- a/tests/smoke-test.py
+++ b/tests/smoke-test.py
@@ -271,8 +271,8 @@ def _smoke_case_12() -> None:
status="status",
tag="tag",
playlist_id="playlist_id",
- start_date="start_date",
- end_date="end_date",
+ start_date="2024-01-01",
+ end_date="2024-01-01",
min_duration=1,
max_duration=1,
sort_by="title",
@@ -1203,7 +1203,7 @@ def _smoke_case_100() -> None:
def _smoke_case_101() -> None:
video_analytic = client.video_analytics.chart_data(
- metrics=[""],
+ metrics=["views"],
date_range={"start_at": "2024-01-01", "end_at": "2024-01-01"},
group_by="daily",
)
@@ -1211,7 +1211,7 @@ def _smoke_case_101() -> None:
def _smoke_case_102() -> None:
video_analytic = client.video_analytics.chart_data(
- metrics=[""],
+ metrics=["views"],
workspace_id="",
date_range={"start_at": "2024-01-01", "end_at": "2024-01-01"},
filters=[{"name": "meta_browser", "value": "", "operator": "equals"}],
@@ -1237,7 +1237,7 @@ def _smoke_case_104() -> None:
video_analytic = client.video_analytics.aggregated_data(
aggregate=[{"metric": "views", "function": "sum"}],
workspace_id="",
- timeframe={},
+ timeframe={"start_at": "2024-01-01", "end_at": "2024-01-01"},
)