Skip to content

Commit

Permalink
release: 0.1.0-alpha.3 (#8)
Browse files Browse the repository at this point in the history
Automated Release PR
---


## 0.1.0-alpha.3 (2024-06-14)

Full Changelog:
[v0.1.0-alpha.2...v0.1.0-alpha.3](v0.1.0-alpha.2...v0.1.0-alpha.3)

### Features

* **api:** OpenAPI spec update via Stainless API
([#10](#10))
([942ef29](942ef29))
* **api:** OpenAPI spec update via Stainless API
([#7](#7))
([761be66](761be66))
* **api:** OpenAPI spec update via Stainless API
([#9](#9))
([d070213](d070213))
* Update README.md with warning and remove Stainless branding
([#11](#11))
([8cb0d8b](8cb0d8b))

---
This Pull Request has been generated automatically as part of
[Stainless](https://stainlessapi.com/)'s release process.
For a better experience, it is recommended to use either rebase-merge or
squash-merge when merging this pull request ([see
details](https://github.com/stainless-api/release-please/#linear-git-commit-history-use-squash-merge)).

_More technical details can be found at
[stainless-api/release-please](https://github.com/stainless-api/release-please)_.

---------

Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
Co-authored-by: Stainless Bot <[email protected]>
  • Loading branch information
stainless-app[bot] and Stainless Bot authored Jun 14, 2024
1 parent 2c3f683 commit cbf1640
Show file tree
Hide file tree
Showing 9 changed files with 233 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.2"
".": "0.1.0-alpha.3"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 48
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-05e51d588b47a6124e7af1cd591b6d1ec254edeba03c4fd499ac905d4687cb6d.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-fb93c2956bf8bafe2ca270399a827c6c03be0db9a533bd2f61727aab765bfd6b.yml
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.1.0-alpha.3 (2024-06-14)

Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/Metronome-Industries/metronome-python/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)

### Features

* **api:** OpenAPI spec update via Stainless API ([#10](https://github.com/Metronome-Industries/metronome-python/issues/10)) ([942ef29](https://github.com/Metronome-Industries/metronome-python/commit/942ef29a578bace159757b2056e417433a0d946e))
* **api:** OpenAPI spec update via Stainless API ([#7](https://github.com/Metronome-Industries/metronome-python/issues/7)) ([761be66](https://github.com/Metronome-Industries/metronome-python/commit/761be66a36024d246ec223ac99b265826d70e02d))
* **api:** OpenAPI spec update via Stainless API ([#9](https://github.com/Metronome-Industries/metronome-python/issues/9)) ([d070213](https://github.com/Metronome-Industries/metronome-python/commit/d070213b9dbbf4f5ca87915bab04924aa2c9235f))
* Update README.md with warning and remove Stainless branding ([#11](https://github.com/Metronome-Industries/metronome-python/issues/11)) ([8cb0d8b](https://github.com/Metronome-Industries/metronome-python/commit/8cb0d8b6ce2a50a2deca85ad1d185b7fb7587ccc))

## 0.1.0-alpha.2 (2024-06-10)

Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/Metronome-Industries/metronome-python/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "metronome-sdk"
version = "0.1.0-alpha.2"
version = "0.1.0-alpha.3"
description = "The official Python library for the metronome API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/metronome/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "metronome"
__version__ = "0.1.0-alpha.2" # x-release-please-version
__version__ = "0.1.0-alpha.3" # x-release-please-version
12 changes: 6 additions & 6 deletions src/metronome/resources/billable_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> BillableMetricRetrieveResponse:
"""
Get a billable metric
Get a billable metric.
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -179,7 +179,7 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncCursorPage[BillableMetricListResponse]:
"""
List all billable metrics.
Get all billable metrics for a given customer.
Args:
limit: Max number of results that should be returned
Expand Down Expand Up @@ -231,7 +231,7 @@ def archive(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> BillableMetricArchiveResponse:
"""
Archive an existing billable metric
Archive an existing billable metric.
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -357,7 +357,7 @@ async def retrieve(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> BillableMetricRetrieveResponse:
"""
Get a billable metric
Get a billable metric.
Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -393,7 +393,7 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[BillableMetricListResponse, AsyncCursorPage[BillableMetricListResponse]]:
"""
List all billable metrics.
Get all billable metrics for a given customer.
Args:
limit: Max number of results that should be returned
Expand Down Expand Up @@ -445,7 +445,7 @@ async def archive(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> BillableMetricArchiveResponse:
"""
Archive an existing billable metric
Archive an existing billable metric.
Args:
extra_headers: Send extra headers
Expand Down
4 changes: 2 additions & 2 deletions src/metronome/resources/customers/customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def list_billable_metrics(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> SyncCursorPage[CustomerListBillableMetricsResponse]:
"""
List all billable metrics.
Get all billable metrics for a given customer.
Args:
limit: Max number of results that should be returned
Expand Down Expand Up @@ -743,7 +743,7 @@ def list_billable_metrics(
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[CustomerListBillableMetricsResponse, AsyncCursorPage[CustomerListBillableMetricsResponse]]:
"""
List all billable metrics.
Get all billable metrics for a given customer.
Args:
limit: Max number of results that should be returned
Expand Down
107 changes: 105 additions & 2 deletions src/metronome/types/billable_metric_list_response.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,118 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing import Dict, List, Optional
from typing_extensions import Literal

from .._models import BaseModel

__all__ = ["BillableMetricListResponse"]
__all__ = ["BillableMetricListResponse", "EventTypeFilter", "PropertyFilter"]


class EventTypeFilter(BaseModel):
in_values: Optional[List[str]] = None
"""A list of event types that are explicitly included in the billable metric.
If specified, only events of these types will match the billable metric. Must be
non-empty if present.
"""

not_in_values: Optional[List[str]] = None
"""A list of event types that are explicitly excluded from the billable metric.
If specified, events of these types will not match the billable metric. Must be
non-empty if present.
"""


class PropertyFilter(BaseModel):
name: str
"""The name of the event property."""

exists: Optional[bool] = None
"""Determines whether the property must exist in the event.
If true, only events with this property will pass the filter. If false, only
events without this property will pass the filter. If null or omitted, the
existence of the property is optional.
"""

in_values: Optional[List[str]] = None
"""Specifies the allowed values for the property to match an event.
An event will pass the filter only if its property value is included in this
list. If undefined, all property values will pass the filter. Must be non-empty
if present.
"""

not_in_values: Optional[List[str]] = None
"""Specifies the values that prevent an event from matching the filter.
An event will not pass the filter if its property value is included in this
list. If null or empty, all property values will pass the filter. Must be
non-empty if present.
"""


class BillableMetricListResponse(BaseModel):
id: str

name: str

aggregate: Optional[str] = None
"""(DEPRECATED) use aggregation_type instead"""

aggregate_keys: Optional[List[str]] = None
"""(DEPRECATED) use aggregation_key instead"""

aggregation_key: Optional[str] = None
"""A key that specifies which property of the event is used to aggregate data.
This key must be one of the property filter names and is not applicable when the
aggregation type is 'count'.
"""

aggregation_type: Optional[
Literal[
"count",
"Count",
"COUNT",
"latest",
"Latest",
"LATEST",
"max",
"Max",
"MAX",
"sum",
"Sum",
"SUM",
"unique",
"Unique",
"UNIQUE",
]
] = None
"""Specifies the type of aggregation performed on matching events."""

custom_fields: Optional[Dict[str, str]] = None

event_type_filter: Optional[EventTypeFilter] = None
"""An optional filtering rule to match the 'event_type' property of an event."""

filter: Optional[Dict[str, object]] = None
"""(DEPRECATED) use property_filters & event_type_filter instead"""

group_by: Optional[List[str]] = None
"""(DEPRECATED) use group_keys instead"""

group_keys: Optional[List[List[str]]] = None
"""Property names that are used to group usage costs on an invoice.
Each entry represents a set of properties used to slice events into distinct
buckets.
"""

property_filters: Optional[List[PropertyFilter]] = None
"""A list of filters to match events to this billable metric.
Each filter defines a rule on an event property. All rules must pass for the
event to match the billable metric.
"""
107 changes: 105 additions & 2 deletions src/metronome/types/customer_list_billable_metrics_response.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,118 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing import Dict, List, Optional
from typing_extensions import Literal

from .._models import BaseModel

__all__ = ["CustomerListBillableMetricsResponse"]
__all__ = ["CustomerListBillableMetricsResponse", "EventTypeFilter", "PropertyFilter"]


class EventTypeFilter(BaseModel):
in_values: Optional[List[str]] = None
"""A list of event types that are explicitly included in the billable metric.
If specified, only events of these types will match the billable metric. Must be
non-empty if present.
"""

not_in_values: Optional[List[str]] = None
"""A list of event types that are explicitly excluded from the billable metric.
If specified, events of these types will not match the billable metric. Must be
non-empty if present.
"""


class PropertyFilter(BaseModel):
name: str
"""The name of the event property."""

exists: Optional[bool] = None
"""Determines whether the property must exist in the event.
If true, only events with this property will pass the filter. If false, only
events without this property will pass the filter. If null or omitted, the
existence of the property is optional.
"""

in_values: Optional[List[str]] = None
"""Specifies the allowed values for the property to match an event.
An event will pass the filter only if its property value is included in this
list. If undefined, all property values will pass the filter. Must be non-empty
if present.
"""

not_in_values: Optional[List[str]] = None
"""Specifies the values that prevent an event from matching the filter.
An event will not pass the filter if its property value is included in this
list. If null or empty, all property values will pass the filter. Must be
non-empty if present.
"""


class CustomerListBillableMetricsResponse(BaseModel):
id: str

name: str

aggregate: Optional[str] = None
"""(DEPRECATED) use aggregation_type instead"""

aggregate_keys: Optional[List[str]] = None
"""(DEPRECATED) use aggregation_key instead"""

aggregation_key: Optional[str] = None
"""A key that specifies which property of the event is used to aggregate data.
This key must be one of the property filter names and is not applicable when the
aggregation type is 'count'.
"""

aggregation_type: Optional[
Literal[
"count",
"Count",
"COUNT",
"latest",
"Latest",
"LATEST",
"max",
"Max",
"MAX",
"sum",
"Sum",
"SUM",
"unique",
"Unique",
"UNIQUE",
]
] = None
"""Specifies the type of aggregation performed on matching events."""

custom_fields: Optional[Dict[str, str]] = None

event_type_filter: Optional[EventTypeFilter] = None
"""An optional filtering rule to match the 'event_type' property of an event."""

filter: Optional[Dict[str, object]] = None
"""(DEPRECATED) use property_filters & event_type_filter instead"""

group_by: Optional[List[str]] = None
"""(DEPRECATED) use group_keys instead"""

group_keys: Optional[List[List[str]]] = None
"""Property names that are used to group usage costs on an invoice.
Each entry represents a set of properties used to slice events into distinct
buckets.
"""

property_filters: Optional[List[PropertyFilter]] = None
"""A list of filters to match events to this billable metric.
Each filter defines a rule on an event property. All rules must pass for the
event to match the billable metric.
"""

0 comments on commit cbf1640

Please sign in to comment.