From a98104fa24bd66c8cf31e06c3027cdfb24227ba0 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 10 Jun 2026 07:03:51 +0000
Subject: [PATCH 1/2] feat(api): add parent/scope fields, replace capability_id
in customer assignments
---
.stats.yml | 6 +-
api.md | 128 +++++++--------
src/stigg/_client.py | 39 ++++-
src/stigg/resources/__init__.py | 14 ++
src/stigg/resources/v1/events/__init__.py | 14 --
.../v1/events/data_export/data_export.py | 46 +++++-
.../v1/events/data_export/destinations.py | 48 +++++-
src/stigg/resources/v1/events/events.py | 32 ----
.../{v1/events/beta => v1_beta}/__init__.py | 26 +--
.../beta => v1_beta}/customers/__init__.py | 0
.../beta => v1_beta}/customers/assignments.py | 20 +--
.../beta => v1_beta}/customers/customers.py | 4 +-
.../beta => v1_beta}/customers/entities.py | 26 +--
.../customers/entitlements.py | 16 +-
.../events/beta => v1_beta}/entity_types.py | 20 +--
.../beta/beta.py => v1_beta/v1_beta.py} | 66 ++++----
.../customers/assignment_upsert_params.py | 38 -----
.../data_export/destination_create_params.py | 4 +
.../data_export_mint_scoped_token_params.py | 4 +
.../events/data_export_trigger_sync_params.py | 4 +
.../{v1/events/beta => v1_beta}/__init__.py | 0
.../beta => v1_beta}/customers/__init__.py | 0
.../customers/assignment_list_params.py | 2 +-
.../customers/assignment_list_response.py | 23 ++-
.../customers/assignment_upsert_params.py | 55 +++++++
.../customers/assignment_upsert_response.py | 24 ++-
.../customers/entitlement_check_params.py | 4 +-
.../customers/entitlement_check_response.py | 4 +-
.../customers/entity_archive_params.py | 4 +-
.../customers/entity_archive_response.py | 2 +-
.../customers/entity_list_params.py | 2 +-
.../customers/entity_list_response.py | 2 +-
.../customers/entity_retrieve_response.py | 2 +-
.../customers/entity_unarchive_params.py | 4 +-
.../customers/entity_unarchive_response.py | 2 +-
.../customers/entity_upsert_params.py | 2 +-
.../customers/entity_upsert_response.py | 2 +-
.../entity_type_list_params.py | 2 +-
.../entity_type_list_response.py | 2 +-
.../entity_type_upsert_params.py | 4 +-
.../entity_type_upsert_response.py | 2 +-
.../events/data_export/test_destinations.py | 58 ++++++-
.../v1/events/test_data_export.py | 8 +
.../{v1/events/beta => v1_beta}/__init__.py | 0
.../beta => v1_beta}/customers/__init__.py | 0
.../customers/test_assignments.py | 150 ++++++------------
.../customers/test_entities.py | 106 ++++++-------
.../customers/test_entitlements.py | 22 +--
.../beta => v1_beta}/test_entity_types.py | 34 ++--
49 files changed, 609 insertions(+), 468 deletions(-)
rename src/stigg/resources/{v1/events/beta => v1_beta}/__init__.py (71%)
rename src/stigg/resources/{v1/events/beta => v1_beta}/customers/__init__.py (100%)
rename src/stigg/resources/{v1/events/beta => v1_beta}/customers/assignments.py (94%)
rename src/stigg/resources/{v1/events/beta => v1_beta}/customers/customers.py (98%)
rename src/stigg/resources/{v1/events/beta => v1_beta}/customers/entities.py (96%)
rename src/stigg/resources/{v1/events/beta => v1_beta}/customers/entitlements.py (94%)
rename src/stigg/resources/{v1/events/beta => v1_beta}/entity_types.py (94%)
rename src/stigg/resources/{v1/events/beta/beta.py => v1_beta/v1_beta.py} (63%)
delete mode 100644 src/stigg/types/v1/events/beta/customers/assignment_upsert_params.py
rename src/stigg/types/{v1/events/beta => v1_beta}/__init__.py (100%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/__init__.py (100%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/assignment_list_params.py (95%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/assignment_list_response.py (56%)
create mode 100644 src/stigg/types/v1_beta/customers/assignment_upsert_params.py
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/assignment_upsert_response.py (58%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/entitlement_check_params.py (94%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/entitlement_check_response.py (99%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/entity_archive_params.py (86%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/entity_archive_response.py (93%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/entity_list_params.py (96%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/entity_list_response.py (96%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/entity_retrieve_response.py (96%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/entity_unarchive_params.py (86%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/entity_unarchive_response.py (93%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/entity_upsert_params.py (96%)
rename src/stigg/types/{v1/events/beta => v1_beta}/customers/entity_upsert_response.py (96%)
rename src/stigg/types/{v1/events/beta => v1_beta}/entity_type_list_params.py (94%)
rename src/stigg/types/{v1/events/beta => v1_beta}/entity_type_list_response.py (97%)
rename src/stigg/types/{v1/events/beta => v1_beta}/entity_type_upsert_params.py (93%)
rename src/stigg/types/{v1/events/beta => v1_beta}/entity_type_upsert_response.py (97%)
rename tests/api_resources/{v1/events/beta => v1_beta}/__init__.py (100%)
rename tests/api_resources/{v1/events/beta => v1_beta}/customers/__init__.py (100%)
rename tests/api_resources/{v1/events/beta => v1_beta}/customers/test_assignments.py (67%)
rename tests/api_resources/{v1/events/beta => v1_beta}/customers/test_entities.py (84%)
rename tests/api_resources/{v1/events/beta => v1_beta}/customers/test_entitlements.py (84%)
rename tests/api_resources/{v1/events/beta => v1_beta}/test_entity_types.py (88%)
diff --git a/.stats.yml b/.stats.yml
index 34ef2fd2..cc1d467b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 108
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stigg/stigg-88f0d558bab37f46f8961eb9ef3a985ec282251991f28863d7b1738927900d6e.yml
-openapi_spec_hash: 4aaa720e9246944b90c95405efd652aa
-config_hash: 0ab0f5c37a96aad83824aad473011f38
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stigg/stigg-4b036ae37ac7dc36a2dd01f48a5913d32202264b3c4b4d221c9cc8dd2af02913.yml
+openapi_spec_hash: e597fd274819cafb888ca653d5e8f3e5
+config_hash: da19ab71a4a80274895d7b4b295c08af
diff --git a/api.md b/api.md
index 2bc81a9e..0c948e5f 100644
--- a/api.md
+++ b/api.md
@@ -163,70 +163,6 @@ Methods:
- client.v1.events.report(\*\*params) -> EventReportResponse
-### Beta
-
-#### Customers
-
-##### Entitlements
-
-Types:
-
-```python
-from stigg.types.v1.events.beta.customers import EntitlementCheckResponse
-```
-
-Methods:
-
-- client.v1.events.beta.customers.entitlements.check(id, \*\*params) -> EntitlementCheckResponse
-
-##### Entities
-
-Types:
-
-```python
-from stigg.types.v1.events.beta.customers import (
- EntityRetrieveResponse,
- EntityListResponse,
- EntityArchiveResponse,
- EntityUnarchiveResponse,
- EntityUpsertResponse,
-)
-```
-
-Methods:
-
-- client.v1.events.beta.customers.entities.retrieve(entity_id, \*, id) -> EntityRetrieveResponse
-- client.v1.events.beta.customers.entities.list(id, \*\*params) -> SyncMyCursorIDPage[EntityListResponse]
-- client.v1.events.beta.customers.entities.archive(id, \*\*params) -> EntityArchiveResponse
-- client.v1.events.beta.customers.entities.unarchive(id, \*\*params) -> EntityUnarchiveResponse
-- client.v1.events.beta.customers.entities.upsert(id, \*\*params) -> EntityUpsertResponse
-
-##### Assignments
-
-Types:
-
-```python
-from stigg.types.v1.events.beta.customers import AssignmentListResponse, AssignmentUpsertResponse
-```
-
-Methods:
-
-- client.v1.events.beta.customers.assignments.list(id, \*\*params) -> SyncMyCursorIDPage[AssignmentListResponse]
-- client.v1.events.beta.customers.assignments.upsert(id, \*\*params) -> AssignmentUpsertResponse
-
-#### EntityTypes
-
-Types:
-
-```python
-from stigg.types.v1.events.beta import EntityTypeListResponse, EntityTypeUpsertResponse
-```
-
-Methods:
-
-- client.v1.events.beta.entity_types.list(\*\*params) -> SyncMyCursorIDPage[EntityTypeListResponse]
-- client.v1.events.beta.entity_types.upsert(\*\*params) -> EntityTypeUpsertResponse
-
### DataExport
Types:
@@ -440,3 +376,67 @@ Methods:
- client.v1.products.list_products(\*\*params) -> SyncMyCursorIDPage[ProductListProductsResponse]
- client.v1.products.unarchive_product(id) -> Product
- client.v1.products.update_product(id, \*\*params) -> Product
+
+# V1Beta
+
+## Customers
+
+### Entitlements
+
+Types:
+
+```python
+from stigg.types.v1_beta.customers import EntitlementCheckResponse
+```
+
+Methods:
+
+- client.v1_beta.customers.entitlements.check(id, \*\*params) -> EntitlementCheckResponse
+
+### Entities
+
+Types:
+
+```python
+from stigg.types.v1_beta.customers import (
+ EntityRetrieveResponse,
+ EntityListResponse,
+ EntityArchiveResponse,
+ EntityUnarchiveResponse,
+ EntityUpsertResponse,
+)
+```
+
+Methods:
+
+- client.v1_beta.customers.entities.retrieve(entity_id, \*, id) -> EntityRetrieveResponse
+- client.v1_beta.customers.entities.list(id, \*\*params) -> SyncMyCursorIDPage[EntityListResponse]
+- client.v1_beta.customers.entities.archive(id, \*\*params) -> EntityArchiveResponse
+- client.v1_beta.customers.entities.unarchive(id, \*\*params) -> EntityUnarchiveResponse
+- client.v1_beta.customers.entities.upsert(id, \*\*params) -> EntityUpsertResponse
+
+### Assignments
+
+Types:
+
+```python
+from stigg.types.v1_beta.customers import AssignmentListResponse, AssignmentUpsertResponse
+```
+
+Methods:
+
+- client.v1_beta.customers.assignments.list(id, \*\*params) -> SyncMyCursorIDPage[AssignmentListResponse]
+- client.v1_beta.customers.assignments.upsert(id, \*\*params) -> AssignmentUpsertResponse
+
+## EntityTypes
+
+Types:
+
+```python
+from stigg.types.v1_beta import EntityTypeListResponse, EntityTypeUpsertResponse
+```
+
+Methods:
+
+- client.v1_beta.entity_types.list(\*\*params) -> SyncMyCursorIDPage[EntityTypeListResponse]
+- client.v1_beta.entity_types.upsert(\*\*params) -> EntityTypeUpsertResponse
diff --git a/src/stigg/_client.py b/src/stigg/_client.py
index 53a56ad0..97467990 100644
--- a/src/stigg/_client.py
+++ b/src/stigg/_client.py
@@ -35,8 +35,9 @@
)
if TYPE_CHECKING:
- from .resources import v1
+ from .resources import v1, v1_beta
from .resources.v1.v1 import V1Resource, AsyncV1Resource
+ from .resources.v1_beta.v1_beta import V1BetaResource, AsyncV1BetaResource
__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Stigg", "AsyncStigg", "Client", "AsyncClient"]
@@ -111,6 +112,12 @@ def v1(self) -> V1Resource:
return V1Resource(self)
+ @cached_property
+ def v1_beta(self) -> V1BetaResource:
+ from .resources.v1_beta import V1BetaResource
+
+ return V1BetaResource(self)
+
@cached_property
def with_raw_response(self) -> StiggWithRawResponse:
return StiggWithRawResponse(self)
@@ -294,6 +301,12 @@ def v1(self) -> AsyncV1Resource:
return AsyncV1Resource(self)
+ @cached_property
+ def v1_beta(self) -> AsyncV1BetaResource:
+ from .resources.v1_beta import AsyncV1BetaResource
+
+ return AsyncV1BetaResource(self)
+
@cached_property
def with_raw_response(self) -> AsyncStiggWithRawResponse:
return AsyncStiggWithRawResponse(self)
@@ -419,6 +432,12 @@ def v1(self) -> v1.V1ResourceWithRawResponse:
return V1ResourceWithRawResponse(self._client.v1)
+ @cached_property
+ def v1_beta(self) -> v1_beta.V1BetaResourceWithRawResponse:
+ from .resources.v1_beta import V1BetaResourceWithRawResponse
+
+ return V1BetaResourceWithRawResponse(self._client.v1_beta)
+
class AsyncStiggWithRawResponse:
_client: AsyncStigg
@@ -432,6 +451,12 @@ def v1(self) -> v1.AsyncV1ResourceWithRawResponse:
return AsyncV1ResourceWithRawResponse(self._client.v1)
+ @cached_property
+ def v1_beta(self) -> v1_beta.AsyncV1BetaResourceWithRawResponse:
+ from .resources.v1_beta import AsyncV1BetaResourceWithRawResponse
+
+ return AsyncV1BetaResourceWithRawResponse(self._client.v1_beta)
+
class StiggWithStreamedResponse:
_client: Stigg
@@ -445,6 +470,12 @@ def v1(self) -> v1.V1ResourceWithStreamingResponse:
return V1ResourceWithStreamingResponse(self._client.v1)
+ @cached_property
+ def v1_beta(self) -> v1_beta.V1BetaResourceWithStreamingResponse:
+ from .resources.v1_beta import V1BetaResourceWithStreamingResponse
+
+ return V1BetaResourceWithStreamingResponse(self._client.v1_beta)
+
class AsyncStiggWithStreamedResponse:
_client: AsyncStigg
@@ -458,6 +489,12 @@ def v1(self) -> v1.AsyncV1ResourceWithStreamingResponse:
return AsyncV1ResourceWithStreamingResponse(self._client.v1)
+ @cached_property
+ def v1_beta(self) -> v1_beta.AsyncV1BetaResourceWithStreamingResponse:
+ from .resources.v1_beta import AsyncV1BetaResourceWithStreamingResponse
+
+ return AsyncV1BetaResourceWithStreamingResponse(self._client.v1_beta)
+
Client = Stigg
diff --git a/src/stigg/resources/__init__.py b/src/stigg/resources/__init__.py
index ea967b14..c6f1c959 100644
--- a/src/stigg/resources/__init__.py
+++ b/src/stigg/resources/__init__.py
@@ -8,6 +8,14 @@
V1ResourceWithStreamingResponse,
AsyncV1ResourceWithStreamingResponse,
)
+from .v1_beta import (
+ V1BetaResource,
+ AsyncV1BetaResource,
+ V1BetaResourceWithRawResponse,
+ AsyncV1BetaResourceWithRawResponse,
+ V1BetaResourceWithStreamingResponse,
+ AsyncV1BetaResourceWithStreamingResponse,
+)
__all__ = [
"V1Resource",
@@ -16,4 +24,10 @@
"AsyncV1ResourceWithRawResponse",
"V1ResourceWithStreamingResponse",
"AsyncV1ResourceWithStreamingResponse",
+ "V1BetaResource",
+ "AsyncV1BetaResource",
+ "V1BetaResourceWithRawResponse",
+ "AsyncV1BetaResourceWithRawResponse",
+ "V1BetaResourceWithStreamingResponse",
+ "AsyncV1BetaResourceWithStreamingResponse",
]
diff --git a/src/stigg/resources/v1/events/__init__.py b/src/stigg/resources/v1/events/__init__.py
index c2c4d5e8..b21e0c46 100644
--- a/src/stigg/resources/v1/events/__init__.py
+++ b/src/stigg/resources/v1/events/__init__.py
@@ -1,13 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from .beta import (
- BetaResource,
- AsyncBetaResource,
- BetaResourceWithRawResponse,
- AsyncBetaResourceWithRawResponse,
- BetaResourceWithStreamingResponse,
- AsyncBetaResourceWithStreamingResponse,
-)
from .events import (
EventsResource,
AsyncEventsResource,
@@ -26,12 +18,6 @@
)
__all__ = [
- "BetaResource",
- "AsyncBetaResource",
- "BetaResourceWithRawResponse",
- "AsyncBetaResourceWithRawResponse",
- "BetaResourceWithStreamingResponse",
- "AsyncBetaResourceWithStreamingResponse",
"DataExportResource",
"AsyncDataExportResource",
"DataExportResourceWithRawResponse",
diff --git a/src/stigg/resources/v1/events/data_export/data_export.py b/src/stigg/resources/v1/events/data_export/data_export.py
index ec831d98..79c1b60e 100644
--- a/src/stigg/resources/v1/events/data_export/data_export.py
+++ b/src/stigg/resources/v1/events/data_export/data_export.py
@@ -5,7 +5,7 @@
import httpx
from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
-from ....._utils import maybe_transform, async_maybe_transform
+from ....._utils import maybe_transform, strip_not_given, async_maybe_transform
from ....._compat import cached_property
from .destinations import (
DestinationsResource,
@@ -59,6 +59,8 @@ def mint_scoped_token(
*,
application_origin: str,
destination_type: str | Omit = omit,
+ x_account_id: str | Omit = omit,
+ x_environment_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -84,6 +86,15 @@ def mint_scoped_token(
timeout: Override the client-level default timeout for this request, in seconds
"""
+ extra_headers = {
+ **strip_not_given(
+ {
+ "X-ACCOUNT-ID": x_account_id,
+ "X-ENVIRONMENT-ID": x_environment_id,
+ }
+ ),
+ **(extra_headers or {}),
+ }
return self._post(
"/api/v1/data-export/scoped-token",
body=maybe_transform(
@@ -103,6 +114,8 @@ def trigger_sync(
self,
*,
destination_id: str | Omit = omit,
+ x_account_id: str | Omit = omit,
+ x_environment_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -125,6 +138,15 @@ def trigger_sync(
timeout: Override the client-level default timeout for this request, in seconds
"""
+ extra_headers = {
+ **strip_not_given(
+ {
+ "X-ACCOUNT-ID": x_account_id,
+ "X-ENVIRONMENT-ID": x_environment_id,
+ }
+ ),
+ **(extra_headers or {}),
+ }
return self._post(
"/api/v1/data-export/sync",
body=maybe_transform(
@@ -166,6 +188,8 @@ async def mint_scoped_token(
*,
application_origin: str,
destination_type: str | Omit = omit,
+ x_account_id: str | Omit = omit,
+ x_environment_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -191,6 +215,15 @@ async def mint_scoped_token(
timeout: Override the client-level default timeout for this request, in seconds
"""
+ extra_headers = {
+ **strip_not_given(
+ {
+ "X-ACCOUNT-ID": x_account_id,
+ "X-ENVIRONMENT-ID": x_environment_id,
+ }
+ ),
+ **(extra_headers or {}),
+ }
return await self._post(
"/api/v1/data-export/scoped-token",
body=await async_maybe_transform(
@@ -210,6 +243,8 @@ async def trigger_sync(
self,
*,
destination_id: str | Omit = omit,
+ x_account_id: str | Omit = omit,
+ x_environment_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -232,6 +267,15 @@ async def trigger_sync(
timeout: Override the client-level default timeout for this request, in seconds
"""
+ extra_headers = {
+ **strip_not_given(
+ {
+ "X-ACCOUNT-ID": x_account_id,
+ "X-ENVIRONMENT-ID": x_environment_id,
+ }
+ ),
+ **(extra_headers or {}),
+ }
return await self._post(
"/api/v1/data-export/sync",
body=await async_maybe_transform(
diff --git a/src/stigg/resources/v1/events/data_export/destinations.py b/src/stigg/resources/v1/events/data_export/destinations.py
index 88f5db2f..e5dfd81d 100644
--- a/src/stigg/resources/v1/events/data_export/destinations.py
+++ b/src/stigg/resources/v1/events/data_export/destinations.py
@@ -4,8 +4,8 @@
import httpx
-from ....._types import Body, Query, Headers, NotGiven, not_given
-from ....._utils import path_template, maybe_transform, async_maybe_transform
+from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ....._utils import path_template, maybe_transform, strip_not_given, async_maybe_transform
from ....._compat import cached_property
from ....._resource import SyncAPIResource, AsyncAPIResource
from ....._response import (
@@ -47,6 +47,8 @@ def create(
*,
destination_id: str,
destination_type: str,
+ x_account_id: str | Omit = omit,
+ x_environment_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -72,6 +74,15 @@ def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
+ extra_headers = {
+ **strip_not_given(
+ {
+ "X-ACCOUNT-ID": x_account_id,
+ "X-ENVIRONMENT-ID": x_environment_id,
+ }
+ ),
+ **(extra_headers or {}),
+ }
return self._post(
"/api/v1/data-export/destinations",
body=maybe_transform(
@@ -91,6 +102,8 @@ def delete(
self,
destination_id: str,
*,
+ x_account_id: str | Omit = omit,
+ x_environment_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -113,6 +126,15 @@ def delete(
"""
if not destination_id:
raise ValueError(f"Expected a non-empty value for `destination_id` but received {destination_id!r}")
+ extra_headers = {
+ **strip_not_given(
+ {
+ "X-ACCOUNT-ID": x_account_id,
+ "X-ENVIRONMENT-ID": x_environment_id,
+ }
+ ),
+ **(extra_headers or {}),
+ }
return self._delete(
path_template("/api/v1/data-export/destinations/{destination_id}", destination_id=destination_id),
options=make_request_options(
@@ -147,6 +169,8 @@ async def create(
*,
destination_id: str,
destination_type: str,
+ x_account_id: str | Omit = omit,
+ x_environment_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -172,6 +196,15 @@ async def create(
timeout: Override the client-level default timeout for this request, in seconds
"""
+ extra_headers = {
+ **strip_not_given(
+ {
+ "X-ACCOUNT-ID": x_account_id,
+ "X-ENVIRONMENT-ID": x_environment_id,
+ }
+ ),
+ **(extra_headers or {}),
+ }
return await self._post(
"/api/v1/data-export/destinations",
body=await async_maybe_transform(
@@ -191,6 +224,8 @@ async def delete(
self,
destination_id: str,
*,
+ x_account_id: str | Omit = omit,
+ x_environment_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -213,6 +248,15 @@ async def delete(
"""
if not destination_id:
raise ValueError(f"Expected a non-empty value for `destination_id` but received {destination_id!r}")
+ extra_headers = {
+ **strip_not_given(
+ {
+ "X-ACCOUNT-ID": x_account_id,
+ "X-ENVIRONMENT-ID": x_environment_id,
+ }
+ ),
+ **(extra_headers or {}),
+ }
return await self._delete(
path_template("/api/v1/data-export/destinations/{destination_id}", destination_id=destination_id),
options=make_request_options(
diff --git a/src/stigg/resources/v1/events/events.py b/src/stigg/resources/v1/events/events.py
index 1b6e2bbe..22271143 100644
--- a/src/stigg/resources/v1/events/events.py
+++ b/src/stigg/resources/v1/events/events.py
@@ -8,14 +8,6 @@
from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, strip_not_given, async_maybe_transform
-from .beta.beta import (
- BetaResource,
- AsyncBetaResource,
- BetaResourceWithRawResponse,
- AsyncBetaResourceWithRawResponse,
- BetaResourceWithStreamingResponse,
- AsyncBetaResourceWithStreamingResponse,
-)
from ...._compat import cached_property
from ....types.v1 import event_report_params
from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -42,10 +34,6 @@
class EventsResource(SyncAPIResource):
"""Operations related to usage & metering"""
- @cached_property
- def beta(self) -> BetaResource:
- return BetaResource(self._client)
-
@cached_property
def data_export(self) -> DataExportResource:
return DataExportResource(self._client)
@@ -120,10 +108,6 @@ def report(
class AsyncEventsResource(AsyncAPIResource):
"""Operations related to usage & metering"""
- @cached_property
- def beta(self) -> AsyncBetaResource:
- return AsyncBetaResource(self._client)
-
@cached_property
def data_export(self) -> AsyncDataExportResource:
return AsyncDataExportResource(self._client)
@@ -203,10 +187,6 @@ def __init__(self, events: EventsResource) -> None:
events.report,
)
- @cached_property
- def beta(self) -> BetaResourceWithRawResponse:
- return BetaResourceWithRawResponse(self._events.beta)
-
@cached_property
def data_export(self) -> DataExportResourceWithRawResponse:
return DataExportResourceWithRawResponse(self._events.data_export)
@@ -220,10 +200,6 @@ def __init__(self, events: AsyncEventsResource) -> None:
events.report,
)
- @cached_property
- def beta(self) -> AsyncBetaResourceWithRawResponse:
- return AsyncBetaResourceWithRawResponse(self._events.beta)
-
@cached_property
def data_export(self) -> AsyncDataExportResourceWithRawResponse:
return AsyncDataExportResourceWithRawResponse(self._events.data_export)
@@ -237,10 +213,6 @@ def __init__(self, events: EventsResource) -> None:
events.report,
)
- @cached_property
- def beta(self) -> BetaResourceWithStreamingResponse:
- return BetaResourceWithStreamingResponse(self._events.beta)
-
@cached_property
def data_export(self) -> DataExportResourceWithStreamingResponse:
return DataExportResourceWithStreamingResponse(self._events.data_export)
@@ -254,10 +226,6 @@ def __init__(self, events: AsyncEventsResource) -> None:
events.report,
)
- @cached_property
- def beta(self) -> AsyncBetaResourceWithStreamingResponse:
- return AsyncBetaResourceWithStreamingResponse(self._events.beta)
-
@cached_property
def data_export(self) -> AsyncDataExportResourceWithStreamingResponse:
return AsyncDataExportResourceWithStreamingResponse(self._events.data_export)
diff --git a/src/stigg/resources/v1/events/beta/__init__.py b/src/stigg/resources/v1_beta/__init__.py
similarity index 71%
rename from src/stigg/resources/v1/events/beta/__init__.py
rename to src/stigg/resources/v1_beta/__init__.py
index e9eee503..5266ed21 100644
--- a/src/stigg/resources/v1/events/beta/__init__.py
+++ b/src/stigg/resources/v1_beta/__init__.py
@@ -1,12 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from .beta import (
- BetaResource,
- AsyncBetaResource,
- BetaResourceWithRawResponse,
- AsyncBetaResourceWithRawResponse,
- BetaResourceWithStreamingResponse,
- AsyncBetaResourceWithStreamingResponse,
+from .v1_beta import (
+ V1BetaResource,
+ AsyncV1BetaResource,
+ V1BetaResourceWithRawResponse,
+ AsyncV1BetaResourceWithRawResponse,
+ V1BetaResourceWithStreamingResponse,
+ AsyncV1BetaResourceWithStreamingResponse,
)
from .customers import (
CustomersResource,
@@ -38,10 +38,10 @@
"AsyncEntityTypesResourceWithRawResponse",
"EntityTypesResourceWithStreamingResponse",
"AsyncEntityTypesResourceWithStreamingResponse",
- "BetaResource",
- "AsyncBetaResource",
- "BetaResourceWithRawResponse",
- "AsyncBetaResourceWithRawResponse",
- "BetaResourceWithStreamingResponse",
- "AsyncBetaResourceWithStreamingResponse",
+ "V1BetaResource",
+ "AsyncV1BetaResource",
+ "V1BetaResourceWithRawResponse",
+ "AsyncV1BetaResourceWithRawResponse",
+ "V1BetaResourceWithStreamingResponse",
+ "AsyncV1BetaResourceWithStreamingResponse",
]
diff --git a/src/stigg/resources/v1/events/beta/customers/__init__.py b/src/stigg/resources/v1_beta/customers/__init__.py
similarity index 100%
rename from src/stigg/resources/v1/events/beta/customers/__init__.py
rename to src/stigg/resources/v1_beta/customers/__init__.py
diff --git a/src/stigg/resources/v1/events/beta/customers/assignments.py b/src/stigg/resources/v1_beta/customers/assignments.py
similarity index 94%
rename from src/stigg/resources/v1/events/beta/customers/assignments.py
rename to src/stigg/resources/v1_beta/customers/assignments.py
index 9e3dc3c6..da799ecc 100644
--- a/src/stigg/resources/v1/events/beta/customers/assignments.py
+++ b/src/stigg/resources/v1_beta/customers/assignments.py
@@ -6,21 +6,21 @@
import httpx
-from ......_types import Body, Omit, Query, Headers, NotGiven, omit, not_given
-from ......_utils import path_template, maybe_transform, strip_not_given, async_maybe_transform
-from ......_compat import cached_property
-from ......_resource import SyncAPIResource, AsyncAPIResource
-from ......_response import (
+from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ...._utils import path_template, maybe_transform, strip_not_given, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ......pagination import SyncMyCursorIDPage, AsyncMyCursorIDPage
-from ......_base_client import AsyncPaginator, make_request_options
-from ......types.v1.events.beta.customers import assignment_list_params, assignment_upsert_params
-from ......types.v1.events.beta.customers.assignment_list_response import AssignmentListResponse
-from ......types.v1.events.beta.customers.assignment_upsert_response import AssignmentUpsertResponse
+from ....pagination import SyncMyCursorIDPage, AsyncMyCursorIDPage
+from ...._base_client import AsyncPaginator, make_request_options
+from ....types.v1_beta.customers import assignment_list_params, assignment_upsert_params
+from ....types.v1_beta.customers.assignment_list_response import AssignmentListResponse
+from ....types.v1_beta.customers.assignment_upsert_response import AssignmentUpsertResponse
__all__ = ["AssignmentsResource", "AsyncAssignmentsResource"]
diff --git a/src/stigg/resources/v1/events/beta/customers/customers.py b/src/stigg/resources/v1_beta/customers/customers.py
similarity index 98%
rename from src/stigg/resources/v1/events/beta/customers/customers.py
rename to src/stigg/resources/v1_beta/customers/customers.py
index 59a2eb6e..7196930e 100644
--- a/src/stigg/resources/v1/events/beta/customers/customers.py
+++ b/src/stigg/resources/v1_beta/customers/customers.py
@@ -10,6 +10,7 @@
EntitiesResourceWithStreamingResponse,
AsyncEntitiesResourceWithStreamingResponse,
)
+from ...._compat import cached_property
from .assignments import (
AssignmentsResource,
AsyncAssignmentsResource,
@@ -18,7 +19,7 @@
AssignmentsResourceWithStreamingResponse,
AsyncAssignmentsResourceWithStreamingResponse,
)
-from ......_compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
from .entitlements import (
EntitlementsResource,
AsyncEntitlementsResource,
@@ -27,7 +28,6 @@
EntitlementsResourceWithStreamingResponse,
AsyncEntitlementsResourceWithStreamingResponse,
)
-from ......_resource import SyncAPIResource, AsyncAPIResource
__all__ = ["CustomersResource", "AsyncCustomersResource"]
diff --git a/src/stigg/resources/v1/events/beta/customers/entities.py b/src/stigg/resources/v1_beta/customers/entities.py
similarity index 96%
rename from src/stigg/resources/v1/events/beta/customers/entities.py
rename to src/stigg/resources/v1_beta/customers/entities.py
index 948d1325..812747e1 100644
--- a/src/stigg/resources/v1/events/beta/customers/entities.py
+++ b/src/stigg/resources/v1_beta/customers/entities.py
@@ -7,29 +7,29 @@
import httpx
-from ......_types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
-from ......_utils import path_template, maybe_transform, strip_not_given, async_maybe_transform
-from ......_compat import cached_property
-from ......_resource import SyncAPIResource, AsyncAPIResource
-from ......_response import (
+from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
+from ...._utils import path_template, maybe_transform, strip_not_given, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ......pagination import SyncMyCursorIDPage, AsyncMyCursorIDPage
-from ......_base_client import AsyncPaginator, make_request_options
-from ......types.v1.events.beta.customers import (
+from ....pagination import SyncMyCursorIDPage, AsyncMyCursorIDPage
+from ...._base_client import AsyncPaginator, make_request_options
+from ....types.v1_beta.customers import (
entity_list_params,
entity_upsert_params,
entity_archive_params,
entity_unarchive_params,
)
-from ......types.v1.events.beta.customers.entity_list_response import EntityListResponse
-from ......types.v1.events.beta.customers.entity_upsert_response import EntityUpsertResponse
-from ......types.v1.events.beta.customers.entity_archive_response import EntityArchiveResponse
-from ......types.v1.events.beta.customers.entity_retrieve_response import EntityRetrieveResponse
-from ......types.v1.events.beta.customers.entity_unarchive_response import EntityUnarchiveResponse
+from ....types.v1_beta.customers.entity_list_response import EntityListResponse
+from ....types.v1_beta.customers.entity_upsert_response import EntityUpsertResponse
+from ....types.v1_beta.customers.entity_archive_response import EntityArchiveResponse
+from ....types.v1_beta.customers.entity_retrieve_response import EntityRetrieveResponse
+from ....types.v1_beta.customers.entity_unarchive_response import EntityUnarchiveResponse
__all__ = ["EntitiesResource", "AsyncEntitiesResource"]
diff --git a/src/stigg/resources/v1/events/beta/customers/entitlements.py b/src/stigg/resources/v1_beta/customers/entitlements.py
similarity index 94%
rename from src/stigg/resources/v1/events/beta/customers/entitlements.py
rename to src/stigg/resources/v1_beta/customers/entitlements.py
index e9464f90..da6e8e3e 100644
--- a/src/stigg/resources/v1/events/beta/customers/entitlements.py
+++ b/src/stigg/resources/v1_beta/customers/entitlements.py
@@ -6,19 +6,19 @@
import httpx
-from ......_types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
-from ......_utils import path_template, maybe_transform, strip_not_given, async_maybe_transform
-from ......_compat import cached_property
-from ......_resource import SyncAPIResource, AsyncAPIResource
-from ......_response import (
+from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
+from ...._utils import path_template, maybe_transform, strip_not_given, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ......_base_client import make_request_options
-from ......types.v1.events.beta.customers import entitlement_check_params
-from ......types.v1.events.beta.customers.entitlement_check_response import EntitlementCheckResponse
+from ...._base_client import make_request_options
+from ....types.v1_beta.customers import entitlement_check_params
+from ....types.v1_beta.customers.entitlement_check_response import EntitlementCheckResponse
__all__ = ["EntitlementsResource", "AsyncEntitlementsResource"]
diff --git a/src/stigg/resources/v1/events/beta/entity_types.py b/src/stigg/resources/v1_beta/entity_types.py
similarity index 94%
rename from src/stigg/resources/v1/events/beta/entity_types.py
rename to src/stigg/resources/v1_beta/entity_types.py
index 9a3a3d58..2ac69495 100644
--- a/src/stigg/resources/v1/events/beta/entity_types.py
+++ b/src/stigg/resources/v1_beta/entity_types.py
@@ -6,21 +6,21 @@
import httpx
-from ....._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
-from ....._utils import maybe_transform, strip_not_given, async_maybe_transform
-from ....._compat import cached_property
-from ....._resource import SyncAPIResource, AsyncAPIResource
-from ....._response import (
+from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ..._utils import maybe_transform, strip_not_given, async_maybe_transform
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from .....pagination import SyncMyCursorIDPage, AsyncMyCursorIDPage
-from ....._base_client import AsyncPaginator, make_request_options
-from .....types.v1.events.beta import entity_type_list_params, entity_type_upsert_params
-from .....types.v1.events.beta.entity_type_list_response import EntityTypeListResponse
-from .....types.v1.events.beta.entity_type_upsert_response import EntityTypeUpsertResponse
+from ...pagination import SyncMyCursorIDPage, AsyncMyCursorIDPage
+from ..._base_client import AsyncPaginator, make_request_options
+from ...types.v1_beta import entity_type_list_params, entity_type_upsert_params
+from ...types.v1_beta.entity_type_list_response import EntityTypeListResponse
+from ...types.v1_beta.entity_type_upsert_response import EntityTypeUpsertResponse
__all__ = ["EntityTypesResource", "AsyncEntityTypesResource"]
diff --git a/src/stigg/resources/v1/events/beta/beta.py b/src/stigg/resources/v1_beta/v1_beta.py
similarity index 63%
rename from src/stigg/resources/v1/events/beta/beta.py
rename to src/stigg/resources/v1_beta/v1_beta.py
index 23cf890e..a0d85579 100644
--- a/src/stigg/resources/v1/events/beta/beta.py
+++ b/src/stigg/resources/v1_beta/v1_beta.py
@@ -2,7 +2,8 @@
from __future__ import annotations
-from ....._compat import cached_property
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
from .entity_types import (
EntityTypesResource,
AsyncEntityTypesResource,
@@ -11,7 +12,6 @@
EntityTypesResourceWithStreamingResponse,
AsyncEntityTypesResourceWithStreamingResponse,
)
-from ....._resource import SyncAPIResource, AsyncAPIResource
from .customers.customers import (
CustomersResource,
AsyncCustomersResource,
@@ -21,10 +21,10 @@
AsyncCustomersResourceWithStreamingResponse,
)
-__all__ = ["BetaResource", "AsyncBetaResource"]
+__all__ = ["V1BetaResource", "AsyncV1BetaResource"]
-class BetaResource(SyncAPIResource):
+class V1BetaResource(SyncAPIResource):
@cached_property
def customers(self) -> CustomersResource:
return CustomersResource(self._client)
@@ -34,26 +34,26 @@ def entity_types(self) -> EntityTypesResource:
return EntityTypesResource(self._client)
@cached_property
- def with_raw_response(self) -> BetaResourceWithRawResponse:
+ def with_raw_response(self) -> V1BetaResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/stiggio/stigg-python#accessing-raw-response-data-eg-headers
"""
- return BetaResourceWithRawResponse(self)
+ return V1BetaResourceWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> BetaResourceWithStreamingResponse:
+ def with_streaming_response(self) -> V1BetaResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
For more information, see https://www.github.com/stiggio/stigg-python#with_streaming_response
"""
- return BetaResourceWithStreamingResponse(self)
+ return V1BetaResourceWithStreamingResponse(self)
-class AsyncBetaResource(AsyncAPIResource):
+class AsyncV1BetaResource(AsyncAPIResource):
@cached_property
def customers(self) -> AsyncCustomersResource:
return AsyncCustomersResource(self._client)
@@ -63,72 +63,72 @@ def entity_types(self) -> AsyncEntityTypesResource:
return AsyncEntityTypesResource(self._client)
@cached_property
- def with_raw_response(self) -> AsyncBetaResourceWithRawResponse:
+ def with_raw_response(self) -> AsyncV1BetaResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.
For more information, see https://www.github.com/stiggio/stigg-python#accessing-raw-response-data-eg-headers
"""
- return AsyncBetaResourceWithRawResponse(self)
+ return AsyncV1BetaResourceWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncBetaResourceWithStreamingResponse:
+ def with_streaming_response(self) -> AsyncV1BetaResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
For more information, see https://www.github.com/stiggio/stigg-python#with_streaming_response
"""
- return AsyncBetaResourceWithStreamingResponse(self)
+ return AsyncV1BetaResourceWithStreamingResponse(self)
-class BetaResourceWithRawResponse:
- def __init__(self, beta: BetaResource) -> None:
- self._beta = beta
+class V1BetaResourceWithRawResponse:
+ def __init__(self, v1_beta: V1BetaResource) -> None:
+ self._v1_beta = v1_beta
@cached_property
def customers(self) -> CustomersResourceWithRawResponse:
- return CustomersResourceWithRawResponse(self._beta.customers)
+ return CustomersResourceWithRawResponse(self._v1_beta.customers)
@cached_property
def entity_types(self) -> EntityTypesResourceWithRawResponse:
- return EntityTypesResourceWithRawResponse(self._beta.entity_types)
+ return EntityTypesResourceWithRawResponse(self._v1_beta.entity_types)
-class AsyncBetaResourceWithRawResponse:
- def __init__(self, beta: AsyncBetaResource) -> None:
- self._beta = beta
+class AsyncV1BetaResourceWithRawResponse:
+ def __init__(self, v1_beta: AsyncV1BetaResource) -> None:
+ self._v1_beta = v1_beta
@cached_property
def customers(self) -> AsyncCustomersResourceWithRawResponse:
- return AsyncCustomersResourceWithRawResponse(self._beta.customers)
+ return AsyncCustomersResourceWithRawResponse(self._v1_beta.customers)
@cached_property
def entity_types(self) -> AsyncEntityTypesResourceWithRawResponse:
- return AsyncEntityTypesResourceWithRawResponse(self._beta.entity_types)
+ return AsyncEntityTypesResourceWithRawResponse(self._v1_beta.entity_types)
-class BetaResourceWithStreamingResponse:
- def __init__(self, beta: BetaResource) -> None:
- self._beta = beta
+class V1BetaResourceWithStreamingResponse:
+ def __init__(self, v1_beta: V1BetaResource) -> None:
+ self._v1_beta = v1_beta
@cached_property
def customers(self) -> CustomersResourceWithStreamingResponse:
- return CustomersResourceWithStreamingResponse(self._beta.customers)
+ return CustomersResourceWithStreamingResponse(self._v1_beta.customers)
@cached_property
def entity_types(self) -> EntityTypesResourceWithStreamingResponse:
- return EntityTypesResourceWithStreamingResponse(self._beta.entity_types)
+ return EntityTypesResourceWithStreamingResponse(self._v1_beta.entity_types)
-class AsyncBetaResourceWithStreamingResponse:
- def __init__(self, beta: AsyncBetaResource) -> None:
- self._beta = beta
+class AsyncV1BetaResourceWithStreamingResponse:
+ def __init__(self, v1_beta: AsyncV1BetaResource) -> None:
+ self._v1_beta = v1_beta
@cached_property
def customers(self) -> AsyncCustomersResourceWithStreamingResponse:
- return AsyncCustomersResourceWithStreamingResponse(self._beta.customers)
+ return AsyncCustomersResourceWithStreamingResponse(self._v1_beta.customers)
@cached_property
def entity_types(self) -> AsyncEntityTypesResourceWithStreamingResponse:
- return AsyncEntityTypesResourceWithStreamingResponse(self._beta.entity_types)
+ return AsyncEntityTypesResourceWithStreamingResponse(self._v1_beta.entity_types)
diff --git a/src/stigg/types/v1/events/beta/customers/assignment_upsert_params.py b/src/stigg/types/v1/events/beta/customers/assignment_upsert_params.py
deleted file mode 100644
index 37fe302b..00000000
--- a/src/stigg/types/v1/events/beta/customers/assignment_upsert_params.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Iterable
-from typing_extensions import Literal, Required, Annotated, TypedDict
-
-from ......_utils import PropertyInfo
-
-__all__ = ["AssignmentUpsertParams", "Assignment"]
-
-
-class AssignmentUpsertParams(TypedDict, total=False):
- assignments: Required[Iterable[Assignment]]
- """Assignments to upsert (1–100 per request)"""
-
- x_account_id: Annotated[str, PropertyInfo(alias="X-ACCOUNT-ID")]
-
- x_environment_id: Annotated[str, PropertyInfo(alias="X-ENVIRONMENT-ID")]
-
-
-class Assignment(TypedDict, total=False):
- """A single assignment to create or update.
-
- The natural key is the `(entityId, capabilityId)` pair. On create both `usageLimit` and `cadence` are required; on update they may be omitted individually to preserve the existing value.
- """
-
- capability_id: Required[Annotated[str, PropertyInfo(alias="capabilityId")]]
- """The capability refId this assignment grants"""
-
- entity_id: Required[Annotated[str, PropertyInfo(alias="entityId")]]
- """The entity refId this assignment is attached to"""
-
- cadence: Literal["MONTH"]
- """Usage-reset cadence (required on create). Currently only `MONTH` is supported"""
-
- usage_limit: Annotated[float, PropertyInfo(alias="usageLimit")]
- """Maximum usage allowed within one cadence window (required on create)"""
diff --git a/src/stigg/types/v1/events/data_export/destination_create_params.py b/src/stigg/types/v1/events/data_export/destination_create_params.py
index d6176522..51d63ca0 100644
--- a/src/stigg/types/v1/events/data_export/destination_create_params.py
+++ b/src/stigg/types/v1/events/data_export/destination_create_params.py
@@ -15,3 +15,7 @@ class DestinationCreateParams(TypedDict, total=False):
destination_type: Required[Annotated[str, PropertyInfo(alias="destinationType")]]
"""The destination type (e.g. snowflake, bigquery)"""
+
+ x_account_id: Annotated[str, PropertyInfo(alias="X-ACCOUNT-ID")]
+
+ x_environment_id: Annotated[str, PropertyInfo(alias="X-ENVIRONMENT-ID")]
diff --git a/src/stigg/types/v1/events/data_export_mint_scoped_token_params.py b/src/stigg/types/v1/events/data_export_mint_scoped_token_params.py
index c9b8796d..258bbf62 100644
--- a/src/stigg/types/v1/events/data_export_mint_scoped_token_params.py
+++ b/src/stigg/types/v1/events/data_export_mint_scoped_token_params.py
@@ -15,3 +15,7 @@ class DataExportMintScopedTokenParams(TypedDict, total=False):
destination_type: Annotated[str, PropertyInfo(alias="destinationType")]
"""Pin the token to a specific warehouse connect flow"""
+
+ x_account_id: Annotated[str, PropertyInfo(alias="X-ACCOUNT-ID")]
+
+ x_environment_id: Annotated[str, PropertyInfo(alias="X-ENVIRONMENT-ID")]
diff --git a/src/stigg/types/v1/events/data_export_trigger_sync_params.py b/src/stigg/types/v1/events/data_export_trigger_sync_params.py
index 0fd62fea..74b2a516 100644
--- a/src/stigg/types/v1/events/data_export_trigger_sync_params.py
+++ b/src/stigg/types/v1/events/data_export_trigger_sync_params.py
@@ -12,3 +12,7 @@
class DataExportTriggerSyncParams(TypedDict, total=False):
destination_id: Annotated[str, PropertyInfo(alias="destinationId")]
"""Provider destination ID to sync. Omit to sync all destinations."""
+
+ x_account_id: Annotated[str, PropertyInfo(alias="X-ACCOUNT-ID")]
+
+ x_environment_id: Annotated[str, PropertyInfo(alias="X-ENVIRONMENT-ID")]
diff --git a/src/stigg/types/v1/events/beta/__init__.py b/src/stigg/types/v1_beta/__init__.py
similarity index 100%
rename from src/stigg/types/v1/events/beta/__init__.py
rename to src/stigg/types/v1_beta/__init__.py
diff --git a/src/stigg/types/v1/events/beta/customers/__init__.py b/src/stigg/types/v1_beta/customers/__init__.py
similarity index 100%
rename from src/stigg/types/v1/events/beta/customers/__init__.py
rename to src/stigg/types/v1_beta/customers/__init__.py
diff --git a/src/stigg/types/v1/events/beta/customers/assignment_list_params.py b/src/stigg/types/v1_beta/customers/assignment_list_params.py
similarity index 95%
rename from src/stigg/types/v1/events/beta/customers/assignment_list_params.py
rename to src/stigg/types/v1_beta/customers/assignment_list_params.py
index 1632b11b..3a2f4001 100644
--- a/src/stigg/types/v1/events/beta/customers/assignment_list_params.py
+++ b/src/stigg/types/v1_beta/customers/assignment_list_params.py
@@ -4,7 +4,7 @@
from typing_extensions import Annotated, TypedDict
-from ......_utils import PropertyInfo
+from ...._utils import PropertyInfo
__all__ = ["AssignmentListParams"]
diff --git a/src/stigg/types/v1/events/beta/customers/assignment_list_response.py b/src/stigg/types/v1_beta/customers/assignment_list_response.py
similarity index 56%
rename from src/stigg/types/v1/events/beta/customers/assignment_list_response.py
rename to src/stigg/types/v1_beta/customers/assignment_list_response.py
index 7f08327d..c9876de9 100644
--- a/src/stigg/types/v1/events/beta/customers/assignment_list_response.py
+++ b/src/stigg/types/v1_beta/customers/assignment_list_response.py
@@ -1,11 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal
from pydantic import Field as FieldInfo
-from ......_models import BaseModel
+from ...._models import BaseModel
__all__ = ["AssignmentListResponse"]
@@ -22,17 +23,31 @@ class AssignmentListResponse(BaseModel):
cadence: Literal["MONTH"]
"""Usage-reset cadence. Currently only `MONTH` is supported"""
- capability_id: str = FieldInfo(alias="capabilityId")
- """The capability refId this assignment grants"""
-
created_at: datetime = FieldInfo(alias="createdAt")
"""Timestamp of when the record was created"""
entity_id: str = FieldInfo(alias="entityId")
"""The entity refId this assignment is attached to"""
+ parent_id: Optional[str] = FieldInfo(alias="parentId", default=None)
+ """Parent entity refId in the hierarchy, or `null` for a root."""
+
+ scope_entity_ids: List[str] = FieldInfo(alias="scopeEntityIds")
+ """Dimension-scoped sub-budget key: the set of entity refIds this budget applies
+ to.
+
+ Empty is the node-wide budget that always matches; a non-empty set only applies
+ when every listed entity is present in the resolved set (order-insensitive).
+ """
+
updated_at: datetime = FieldInfo(alias="updatedAt")
"""Timestamp of when the record was last updated"""
usage_limit: float = FieldInfo(alias="usageLimit")
"""Maximum usage allowed within one cadence window"""
+
+ currency_id: Optional[str] = FieldInfo(alias="currencyId", default=None)
+ """Currency refId this assignment grants (present for credit capabilities)."""
+
+ feature_id: Optional[str] = FieldInfo(alias="featureId", default=None)
+ """Feature refId this assignment grants (present for feature capabilities)."""
diff --git a/src/stigg/types/v1_beta/customers/assignment_upsert_params.py b/src/stigg/types/v1_beta/customers/assignment_upsert_params.py
new file mode 100644
index 00000000..8acdfa8b
--- /dev/null
+++ b/src/stigg/types/v1_beta/customers/assignment_upsert_params.py
@@ -0,0 +1,55 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable, Optional
+from typing_extensions import Literal, Required, Annotated, TypedDict
+
+from ...._types import SequenceNotStr
+from ...._utils import PropertyInfo
+
+__all__ = ["AssignmentUpsertParams", "Assignment"]
+
+
+class AssignmentUpsertParams(TypedDict, total=False):
+ assignments: Required[Iterable[Assignment]]
+ """Assignments to upsert (1–100 per request)"""
+
+ x_account_id: Annotated[str, PropertyInfo(alias="X-ACCOUNT-ID")]
+
+ x_environment_id: Annotated[str, PropertyInfo(alias="X-ENVIRONMENT-ID")]
+
+
+class Assignment(TypedDict, total=False):
+ """A single assignment to create or update.
+
+ Identify the capability with exactly one of `featureId` or `currencyId`. The natural key is the `(entityId, capability, scopeEntityIds)` triple. On create both `usageLimit` and `cadence` are required; on update they may be omitted individually to preserve the existing value.
+ """
+
+ entity_id: Required[Annotated[str, PropertyInfo(alias="entityId")]]
+ """The entity refId this assignment is attached to"""
+
+ cadence: Literal["MONTH"]
+ """Usage-reset cadence (required on create). Currently only `MONTH` is supported"""
+
+ currency_id: Annotated[str, PropertyInfo(alias="currencyId")]
+ """Currency refId this assignment grants (credit budgets).
+
+ Mutually exclusive with `featureId`.
+ """
+
+ feature_id: Annotated[str, PropertyInfo(alias="featureId")]
+ """Feature refId this assignment grants. Mutually exclusive with `currencyId`."""
+
+ parent_id: Annotated[Optional[str], PropertyInfo(alias="parentId")]
+ """Parent entity refId in the hierarchy.
+
+ Omit to leave the current parent untouched (a new node defaults to a root);
+ `null` detaches to a root; a refId sets or changes the parent. Reparenting an
+ existing node is leaf-only.
+ """
+
+ scope_entity_ids: Annotated[SequenceNotStr[str], PropertyInfo(alias="scopeEntityIds")]
+
+ usage_limit: Annotated[float, PropertyInfo(alias="usageLimit")]
+ """Maximum usage allowed within one cadence window (required on create)"""
diff --git a/src/stigg/types/v1/events/beta/customers/assignment_upsert_response.py b/src/stigg/types/v1_beta/customers/assignment_upsert_response.py
similarity index 58%
rename from src/stigg/types/v1/events/beta/customers/assignment_upsert_response.py
rename to src/stigg/types/v1_beta/customers/assignment_upsert_response.py
index 3dd6962f..c99f7d4b 100644
--- a/src/stigg/types/v1/events/beta/customers/assignment_upsert_response.py
+++ b/src/stigg/types/v1_beta/customers/assignment_upsert_response.py
@@ -1,12 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List
+from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal
from pydantic import Field as FieldInfo
-from ......_models import BaseModel
+from ...._models import BaseModel
__all__ = ["AssignmentUpsertResponse", "Data"]
@@ -23,21 +23,35 @@ class Data(BaseModel):
cadence: Literal["MONTH"]
"""Usage-reset cadence. Currently only `MONTH` is supported"""
- capability_id: str = FieldInfo(alias="capabilityId")
- """The capability refId this assignment grants"""
-
created_at: datetime = FieldInfo(alias="createdAt")
"""Timestamp of when the record was created"""
entity_id: str = FieldInfo(alias="entityId")
"""The entity refId this assignment is attached to"""
+ parent_id: Optional[str] = FieldInfo(alias="parentId", default=None)
+ """Parent entity refId in the hierarchy, or `null` for a root."""
+
+ scope_entity_ids: List[str] = FieldInfo(alias="scopeEntityIds")
+ """Dimension-scoped sub-budget key: the set of entity refIds this budget applies
+ to.
+
+ Empty is the node-wide budget that always matches; a non-empty set only applies
+ when every listed entity is present in the resolved set (order-insensitive).
+ """
+
updated_at: datetime = FieldInfo(alias="updatedAt")
"""Timestamp of when the record was last updated"""
usage_limit: float = FieldInfo(alias="usageLimit")
"""Maximum usage allowed within one cadence window"""
+ currency_id: Optional[str] = FieldInfo(alias="currencyId", default=None)
+ """Currency refId this assignment grants (present for credit capabilities)."""
+
+ feature_id: Optional[str] = FieldInfo(alias="featureId", default=None)
+ """Feature refId this assignment grants (present for feature capabilities)."""
+
class AssignmentUpsertResponse(BaseModel):
"""Assignments after upsert."""
diff --git a/src/stigg/types/v1/events/beta/customers/entitlement_check_params.py b/src/stigg/types/v1_beta/customers/entitlement_check_params.py
similarity index 94%
rename from src/stigg/types/v1/events/beta/customers/entitlement_check_params.py
rename to src/stigg/types/v1_beta/customers/entitlement_check_params.py
index 58b19afa..a574958e 100644
--- a/src/stigg/types/v1/events/beta/customers/entitlement_check_params.py
+++ b/src/stigg/types/v1_beta/customers/entitlement_check_params.py
@@ -5,8 +5,8 @@
from typing import Dict
from typing_extensions import Annotated, TypedDict
-from ......_types import SequenceNotStr
-from ......_utils import PropertyInfo
+from ...._types import SequenceNotStr
+from ...._utils import PropertyInfo
__all__ = ["EntitlementCheckParams"]
diff --git a/src/stigg/types/v1/events/beta/customers/entitlement_check_response.py b/src/stigg/types/v1_beta/customers/entitlement_check_response.py
similarity index 99%
rename from src/stigg/types/v1/events/beta/customers/entitlement_check_response.py
rename to src/stigg/types/v1_beta/customers/entitlement_check_response.py
index f1e32147..367b3682 100644
--- a/src/stigg/types/v1/events/beta/customers/entitlement_check_response.py
+++ b/src/stigg/types/v1_beta/customers/entitlement_check_response.py
@@ -6,8 +6,8 @@
from pydantic import Field as FieldInfo
-from ......_utils import PropertyInfo
-from ......_models import BaseModel
+from ...._utils import PropertyInfo
+from ...._models import BaseModel
__all__ = [
"EntitlementCheckResponse",
diff --git a/src/stigg/types/v1/events/beta/customers/entity_archive_params.py b/src/stigg/types/v1_beta/customers/entity_archive_params.py
similarity index 86%
rename from src/stigg/types/v1/events/beta/customers/entity_archive_params.py
rename to src/stigg/types/v1_beta/customers/entity_archive_params.py
index eb3c2711..e0c1cca9 100644
--- a/src/stigg/types/v1/events/beta/customers/entity_archive_params.py
+++ b/src/stigg/types/v1_beta/customers/entity_archive_params.py
@@ -4,8 +4,8 @@
from typing_extensions import Required, Annotated, TypedDict
-from ......_types import SequenceNotStr
-from ......_utils import PropertyInfo
+from ...._types import SequenceNotStr
+from ...._utils import PropertyInfo
__all__ = ["EntityArchiveParams"]
diff --git a/src/stigg/types/v1/events/beta/customers/entity_archive_response.py b/src/stigg/types/v1_beta/customers/entity_archive_response.py
similarity index 93%
rename from src/stigg/types/v1/events/beta/customers/entity_archive_response.py
rename to src/stigg/types/v1_beta/customers/entity_archive_response.py
index ae67968e..3b99fb93 100644
--- a/src/stigg/types/v1/events/beta/customers/entity_archive_response.py
+++ b/src/stigg/types/v1_beta/customers/entity_archive_response.py
@@ -2,7 +2,7 @@
from typing import List
-from ......_models import BaseModel
+from ...._models import BaseModel
__all__ = ["EntityArchiveResponse", "Data"]
diff --git a/src/stigg/types/v1/events/beta/customers/entity_list_params.py b/src/stigg/types/v1_beta/customers/entity_list_params.py
similarity index 96%
rename from src/stigg/types/v1/events/beta/customers/entity_list_params.py
rename to src/stigg/types/v1_beta/customers/entity_list_params.py
index e47f81af..9d992faa 100644
--- a/src/stigg/types/v1/events/beta/customers/entity_list_params.py
+++ b/src/stigg/types/v1_beta/customers/entity_list_params.py
@@ -4,7 +4,7 @@
from typing_extensions import Literal, Annotated, TypedDict
-from ......_utils import PropertyInfo
+from ...._utils import PropertyInfo
__all__ = ["EntityListParams"]
diff --git a/src/stigg/types/v1/events/beta/customers/entity_list_response.py b/src/stigg/types/v1_beta/customers/entity_list_response.py
similarity index 96%
rename from src/stigg/types/v1/events/beta/customers/entity_list_response.py
rename to src/stigg/types/v1_beta/customers/entity_list_response.py
index 151d4148..b75ba903 100644
--- a/src/stigg/types/v1/events/beta/customers/entity_list_response.py
+++ b/src/stigg/types/v1_beta/customers/entity_list_response.py
@@ -5,7 +5,7 @@
from pydantic import Field as FieldInfo
-from ......_models import BaseModel
+from ...._models import BaseModel
__all__ = ["EntityListResponse"]
diff --git a/src/stigg/types/v1/events/beta/customers/entity_retrieve_response.py b/src/stigg/types/v1_beta/customers/entity_retrieve_response.py
similarity index 96%
rename from src/stigg/types/v1/events/beta/customers/entity_retrieve_response.py
rename to src/stigg/types/v1_beta/customers/entity_retrieve_response.py
index e8188094..d0a11d55 100644
--- a/src/stigg/types/v1/events/beta/customers/entity_retrieve_response.py
+++ b/src/stigg/types/v1_beta/customers/entity_retrieve_response.py
@@ -5,7 +5,7 @@
from pydantic import Field as FieldInfo
-from ......_models import BaseModel
+from ...._models import BaseModel
__all__ = ["EntityRetrieveResponse", "Data"]
diff --git a/src/stigg/types/v1/events/beta/customers/entity_unarchive_params.py b/src/stigg/types/v1_beta/customers/entity_unarchive_params.py
similarity index 86%
rename from src/stigg/types/v1/events/beta/customers/entity_unarchive_params.py
rename to src/stigg/types/v1_beta/customers/entity_unarchive_params.py
index 2cd9eaf9..2ac2d21e 100644
--- a/src/stigg/types/v1/events/beta/customers/entity_unarchive_params.py
+++ b/src/stigg/types/v1_beta/customers/entity_unarchive_params.py
@@ -4,8 +4,8 @@
from typing_extensions import Required, Annotated, TypedDict
-from ......_types import SequenceNotStr
-from ......_utils import PropertyInfo
+from ...._types import SequenceNotStr
+from ...._utils import PropertyInfo
__all__ = ["EntityUnarchiveParams"]
diff --git a/src/stigg/types/v1/events/beta/customers/entity_unarchive_response.py b/src/stigg/types/v1_beta/customers/entity_unarchive_response.py
similarity index 93%
rename from src/stigg/types/v1/events/beta/customers/entity_unarchive_response.py
rename to src/stigg/types/v1_beta/customers/entity_unarchive_response.py
index 26b3606d..cf8e6047 100644
--- a/src/stigg/types/v1/events/beta/customers/entity_unarchive_response.py
+++ b/src/stigg/types/v1_beta/customers/entity_unarchive_response.py
@@ -2,7 +2,7 @@
from typing import List
-from ......_models import BaseModel
+from ...._models import BaseModel
__all__ = ["EntityUnarchiveResponse", "Data"]
diff --git a/src/stigg/types/v1/events/beta/customers/entity_upsert_params.py b/src/stigg/types/v1_beta/customers/entity_upsert_params.py
similarity index 96%
rename from src/stigg/types/v1/events/beta/customers/entity_upsert_params.py
rename to src/stigg/types/v1_beta/customers/entity_upsert_params.py
index 638d19d3..0dcd3a36 100644
--- a/src/stigg/types/v1/events/beta/customers/entity_upsert_params.py
+++ b/src/stigg/types/v1_beta/customers/entity_upsert_params.py
@@ -5,7 +5,7 @@
from typing import Dict, Iterable
from typing_extensions import Required, Annotated, TypedDict
-from ......_utils import PropertyInfo
+from ...._utils import PropertyInfo
__all__ = ["EntityUpsertParams", "Entity"]
diff --git a/src/stigg/types/v1/events/beta/customers/entity_upsert_response.py b/src/stigg/types/v1_beta/customers/entity_upsert_response.py
similarity index 96%
rename from src/stigg/types/v1/events/beta/customers/entity_upsert_response.py
rename to src/stigg/types/v1_beta/customers/entity_upsert_response.py
index a4c8668e..5e77bd24 100644
--- a/src/stigg/types/v1/events/beta/customers/entity_upsert_response.py
+++ b/src/stigg/types/v1_beta/customers/entity_upsert_response.py
@@ -5,7 +5,7 @@
from pydantic import Field as FieldInfo
-from ......_models import BaseModel
+from ...._models import BaseModel
__all__ = ["EntityUpsertResponse", "Data"]
diff --git a/src/stigg/types/v1/events/beta/entity_type_list_params.py b/src/stigg/types/v1_beta/entity_type_list_params.py
similarity index 94%
rename from src/stigg/types/v1/events/beta/entity_type_list_params.py
rename to src/stigg/types/v1_beta/entity_type_list_params.py
index 74062038..3ac70d1a 100644
--- a/src/stigg/types/v1/events/beta/entity_type_list_params.py
+++ b/src/stigg/types/v1_beta/entity_type_list_params.py
@@ -4,7 +4,7 @@
from typing_extensions import Annotated, TypedDict
-from ....._utils import PropertyInfo
+from ..._utils import PropertyInfo
__all__ = ["EntityTypeListParams"]
diff --git a/src/stigg/types/v1/events/beta/entity_type_list_response.py b/src/stigg/types/v1_beta/entity_type_list_response.py
similarity index 97%
rename from src/stigg/types/v1/events/beta/entity_type_list_response.py
rename to src/stigg/types/v1_beta/entity_type_list_response.py
index 5f8e6c11..71182102 100644
--- a/src/stigg/types/v1/events/beta/entity_type_list_response.py
+++ b/src/stigg/types/v1_beta/entity_type_list_response.py
@@ -5,7 +5,7 @@
from pydantic import Field as FieldInfo
-from ....._models import BaseModel
+from ..._models import BaseModel
__all__ = ["EntityTypeListResponse"]
diff --git a/src/stigg/types/v1/events/beta/entity_type_upsert_params.py b/src/stigg/types/v1_beta/entity_type_upsert_params.py
similarity index 93%
rename from src/stigg/types/v1/events/beta/entity_type_upsert_params.py
rename to src/stigg/types/v1_beta/entity_type_upsert_params.py
index 33019ea3..d2179d0f 100644
--- a/src/stigg/types/v1/events/beta/entity_type_upsert_params.py
+++ b/src/stigg/types/v1_beta/entity_type_upsert_params.py
@@ -5,8 +5,8 @@
from typing import Iterable
from typing_extensions import Required, Annotated, TypedDict
-from ....._types import SequenceNotStr
-from ....._utils import PropertyInfo
+from ..._types import SequenceNotStr
+from ..._utils import PropertyInfo
__all__ = ["EntityTypeUpsertParams", "Type"]
diff --git a/src/stigg/types/v1/events/beta/entity_type_upsert_response.py b/src/stigg/types/v1_beta/entity_type_upsert_response.py
similarity index 97%
rename from src/stigg/types/v1/events/beta/entity_type_upsert_response.py
rename to src/stigg/types/v1_beta/entity_type_upsert_response.py
index 1ab7ef87..9f90c5c5 100644
--- a/src/stigg/types/v1/events/beta/entity_type_upsert_response.py
+++ b/src/stigg/types/v1_beta/entity_type_upsert_response.py
@@ -5,7 +5,7 @@
from pydantic import Field as FieldInfo
-from ....._models import BaseModel
+from ..._models import BaseModel
__all__ = ["EntityTypeUpsertResponse", "Data"]
diff --git a/tests/api_resources/v1/events/data_export/test_destinations.py b/tests/api_resources/v1/events/data_export/test_destinations.py
index ca2c5830..4b63a5d5 100644
--- a/tests/api_resources/v1/events/data_export/test_destinations.py
+++ b/tests/api_resources/v1/events/data_export/test_destinations.py
@@ -29,6 +29,17 @@ def test_method_create(self, client: Stigg) -> None:
)
assert_matches_type(DestinationCreateResponse, destination, path=["response"])
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_create_with_all_params(self, client: Stigg) -> None:
+ destination = client.v1.events.data_export.destinations.create(
+ destination_id="x",
+ destination_type="x",
+ x_account_id="X-ACCOUNT-ID",
+ x_environment_id="X-ENVIRONMENT-ID",
+ )
+ assert_matches_type(DestinationCreateResponse, destination, path=["response"])
+
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create(self, client: Stigg) -> None:
@@ -61,7 +72,17 @@ def test_streaming_response_create(self, client: Stigg) -> None:
@parametrize
def test_method_delete(self, client: Stigg) -> None:
destination = client.v1.events.data_export.destinations.delete(
- "x",
+ destination_id="x",
+ )
+ assert_matches_type(DestinationDeleteResponse, destination, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_delete_with_all_params(self, client: Stigg) -> None:
+ destination = client.v1.events.data_export.destinations.delete(
+ destination_id="x",
+ x_account_id="X-ACCOUNT-ID",
+ x_environment_id="X-ENVIRONMENT-ID",
)
assert_matches_type(DestinationDeleteResponse, destination, path=["response"])
@@ -69,7 +90,7 @@ def test_method_delete(self, client: Stigg) -> None:
@parametrize
def test_raw_response_delete(self, client: Stigg) -> None:
response = client.v1.events.data_export.destinations.with_raw_response.delete(
- "x",
+ destination_id="x",
)
assert response.is_closed is True
@@ -81,7 +102,7 @@ def test_raw_response_delete(self, client: Stigg) -> None:
@parametrize
def test_streaming_response_delete(self, client: Stigg) -> None:
with client.v1.events.data_export.destinations.with_streaming_response.delete(
- "x",
+ destination_id="x",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -96,7 +117,7 @@ def test_streaming_response_delete(self, client: Stigg) -> None:
def test_path_params_delete(self, client: Stigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `destination_id` but received ''"):
client.v1.events.data_export.destinations.with_raw_response.delete(
- "",
+ destination_id="",
)
@@ -114,6 +135,17 @@ async def test_method_create(self, async_client: AsyncStigg) -> None:
)
assert_matches_type(DestinationCreateResponse, destination, path=["response"])
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncStigg) -> None:
+ destination = await async_client.v1.events.data_export.destinations.create(
+ destination_id="x",
+ destination_type="x",
+ x_account_id="X-ACCOUNT-ID",
+ x_environment_id="X-ENVIRONMENT-ID",
+ )
+ assert_matches_type(DestinationCreateResponse, destination, path=["response"])
+
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create(self, async_client: AsyncStigg) -> None:
@@ -146,7 +178,17 @@ async def test_streaming_response_create(self, async_client: AsyncStigg) -> None
@parametrize
async def test_method_delete(self, async_client: AsyncStigg) -> None:
destination = await async_client.v1.events.data_export.destinations.delete(
- "x",
+ destination_id="x",
+ )
+ assert_matches_type(DestinationDeleteResponse, destination, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_delete_with_all_params(self, async_client: AsyncStigg) -> None:
+ destination = await async_client.v1.events.data_export.destinations.delete(
+ destination_id="x",
+ x_account_id="X-ACCOUNT-ID",
+ x_environment_id="X-ENVIRONMENT-ID",
)
assert_matches_type(DestinationDeleteResponse, destination, path=["response"])
@@ -154,7 +196,7 @@ async def test_method_delete(self, async_client: AsyncStigg) -> None:
@parametrize
async def test_raw_response_delete(self, async_client: AsyncStigg) -> None:
response = await async_client.v1.events.data_export.destinations.with_raw_response.delete(
- "x",
+ destination_id="x",
)
assert response.is_closed is True
@@ -166,7 +208,7 @@ async def test_raw_response_delete(self, async_client: AsyncStigg) -> None:
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncStigg) -> None:
async with async_client.v1.events.data_export.destinations.with_streaming_response.delete(
- "x",
+ destination_id="x",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -181,5 +223,5 @@ async def test_streaming_response_delete(self, async_client: AsyncStigg) -> None
async def test_path_params_delete(self, async_client: AsyncStigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `destination_id` but received ''"):
await async_client.v1.events.data_export.destinations.with_raw_response.delete(
- "",
+ destination_id="",
)
diff --git a/tests/api_resources/v1/events/test_data_export.py b/tests/api_resources/v1/events/test_data_export.py
index da2a5ac6..7371a368 100644
--- a/tests/api_resources/v1/events/test_data_export.py
+++ b/tests/api_resources/v1/events/test_data_export.py
@@ -34,6 +34,8 @@ def test_method_mint_scoped_token_with_all_params(self, client: Stigg) -> None:
data_export = client.v1.events.data_export.mint_scoped_token(
application_origin="x",
destination_type="destinationType",
+ x_account_id="X-ACCOUNT-ID",
+ x_environment_id="X-ENVIRONMENT-ID",
)
assert_matches_type(DataExportMintScopedTokenResponse, data_export, path=["response"])
@@ -74,6 +76,8 @@ def test_method_trigger_sync(self, client: Stigg) -> None:
def test_method_trigger_sync_with_all_params(self, client: Stigg) -> None:
data_export = client.v1.events.data_export.trigger_sync(
destination_id="destinationId",
+ x_account_id="X-ACCOUNT-ID",
+ x_environment_id="X-ENVIRONMENT-ID",
)
assert_matches_type(DataExportTriggerSyncResponse, data_export, path=["response"])
@@ -119,6 +123,8 @@ async def test_method_mint_scoped_token_with_all_params(self, async_client: Asyn
data_export = await async_client.v1.events.data_export.mint_scoped_token(
application_origin="x",
destination_type="destinationType",
+ x_account_id="X-ACCOUNT-ID",
+ x_environment_id="X-ENVIRONMENT-ID",
)
assert_matches_type(DataExportMintScopedTokenResponse, data_export, path=["response"])
@@ -159,6 +165,8 @@ async def test_method_trigger_sync(self, async_client: AsyncStigg) -> None:
async def test_method_trigger_sync_with_all_params(self, async_client: AsyncStigg) -> None:
data_export = await async_client.v1.events.data_export.trigger_sync(
destination_id="destinationId",
+ x_account_id="X-ACCOUNT-ID",
+ x_environment_id="X-ENVIRONMENT-ID",
)
assert_matches_type(DataExportTriggerSyncResponse, data_export, path=["response"])
diff --git a/tests/api_resources/v1/events/beta/__init__.py b/tests/api_resources/v1_beta/__init__.py
similarity index 100%
rename from tests/api_resources/v1/events/beta/__init__.py
rename to tests/api_resources/v1_beta/__init__.py
diff --git a/tests/api_resources/v1/events/beta/customers/__init__.py b/tests/api_resources/v1_beta/customers/__init__.py
similarity index 100%
rename from tests/api_resources/v1/events/beta/customers/__init__.py
rename to tests/api_resources/v1_beta/customers/__init__.py
diff --git a/tests/api_resources/v1/events/beta/customers/test_assignments.py b/tests/api_resources/v1_beta/customers/test_assignments.py
similarity index 67%
rename from tests/api_resources/v1/events/beta/customers/test_assignments.py
rename to tests/api_resources/v1_beta/customers/test_assignments.py
index 15b2696c..19c14c14 100644
--- a/tests/api_resources/v1/events/beta/customers/test_assignments.py
+++ b/tests/api_resources/v1_beta/customers/test_assignments.py
@@ -10,7 +10,7 @@
from stigg import Stigg, AsyncStigg
from tests.utils import assert_matches_type
from stigg.pagination import SyncMyCursorIDPage, AsyncMyCursorIDPage
-from stigg.types.v1.events.beta.customers import (
+from stigg.types.v1_beta.customers import (
AssignmentListResponse,
AssignmentUpsertResponse,
)
@@ -24,7 +24,7 @@ class TestAssignments:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_list(self, client: Stigg) -> None:
- assignment = client.v1.events.beta.customers.assignments.list(
+ assignment = client.v1_beta.customers.assignments.list(
id="id",
)
assert_matches_type(SyncMyCursorIDPage[AssignmentListResponse], assignment, path=["response"])
@@ -32,7 +32,7 @@ def test_method_list(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_list_with_all_params(self, client: Stigg) -> None:
- assignment = client.v1.events.beta.customers.assignments.list(
+ assignment = client.v1_beta.customers.assignments.list(
id="id",
after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
@@ -47,7 +47,7 @@ def test_method_list_with_all_params(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_list(self, client: Stigg) -> None:
- response = client.v1.events.beta.customers.assignments.with_raw_response.list(
+ response = client.v1_beta.customers.assignments.with_raw_response.list(
id="id",
)
@@ -59,7 +59,7 @@ def test_raw_response_list(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_list(self, client: Stigg) -> None:
- with client.v1.events.beta.customers.assignments.with_streaming_response.list(
+ with client.v1_beta.customers.assignments.with_streaming_response.list(
id="id",
) as response:
assert not response.is_closed
@@ -74,44 +74,41 @@ def test_streaming_response_list(self, client: Stigg) -> None:
@parametrize
def test_path_params_list(self, client: Stigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- client.v1.events.beta.customers.assignments.with_raw_response.list(
+ client.v1_beta.customers.assignments.with_raw_response.list(
id="",
)
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_upsert(self, client: Stigg) -> None:
- assignment = client.v1.events.beta.customers.assignments.upsert(
+ assignment = client.v1_beta.customers.assignments.upsert(
id="id",
- assignments=[
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-001",
- },
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-002",
- },
- ],
+ assignments=[{"entity_id": "workspace-001"}, {"entity_id": "workspace-002"}],
)
assert_matches_type(AssignmentUpsertResponse, assignment, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_upsert_with_all_params(self, client: Stigg) -> None:
- assignment = client.v1.events.beta.customers.assignments.upsert(
+ assignment = client.v1_beta.customers.assignments.upsert(
id="id",
assignments=[
{
- "capability_id": "compute-minutes",
"entity_id": "workspace-001",
"cadence": "MONTH",
+ "currency_id": "currencyId",
+ "feature_id": "compute-minutes",
+ "parent_id": "parentId",
+ "scope_entity_ids": ["NxI"],
"usage_limit": 1000,
},
{
- "capability_id": "compute-minutes",
"entity_id": "workspace-002",
"cadence": "MONTH",
+ "currency_id": "cred-type-tokens",
+ "feature_id": "featureId",
+ "parent_id": "workspace-001",
+ "scope_entity_ids": ["user-1"],
"usage_limit": 2000,
},
],
@@ -123,18 +120,9 @@ def test_method_upsert_with_all_params(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_upsert(self, client: Stigg) -> None:
- response = client.v1.events.beta.customers.assignments.with_raw_response.upsert(
+ response = client.v1_beta.customers.assignments.with_raw_response.upsert(
id="id",
- assignments=[
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-001",
- },
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-002",
- },
- ],
+ assignments=[{"entity_id": "workspace-001"}, {"entity_id": "workspace-002"}],
)
assert response.is_closed is True
@@ -145,18 +133,9 @@ def test_raw_response_upsert(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_upsert(self, client: Stigg) -> None:
- with client.v1.events.beta.customers.assignments.with_streaming_response.upsert(
+ with client.v1_beta.customers.assignments.with_streaming_response.upsert(
id="id",
- assignments=[
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-001",
- },
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-002",
- },
- ],
+ assignments=[{"entity_id": "workspace-001"}, {"entity_id": "workspace-002"}],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -170,18 +149,9 @@ def test_streaming_response_upsert(self, client: Stigg) -> None:
@parametrize
def test_path_params_upsert(self, client: Stigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- client.v1.events.beta.customers.assignments.with_raw_response.upsert(
+ client.v1_beta.customers.assignments.with_raw_response.upsert(
id="",
- assignments=[
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-001",
- },
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-002",
- },
- ],
+ assignments=[{"entity_id": "workspace-001"}, {"entity_id": "workspace-002"}],
)
@@ -193,7 +163,7 @@ class TestAsyncAssignments:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_list(self, async_client: AsyncStigg) -> None:
- assignment = await async_client.v1.events.beta.customers.assignments.list(
+ assignment = await async_client.v1_beta.customers.assignments.list(
id="id",
)
assert_matches_type(AsyncMyCursorIDPage[AssignmentListResponse], assignment, path=["response"])
@@ -201,7 +171,7 @@ async def test_method_list(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncStigg) -> None:
- assignment = await async_client.v1.events.beta.customers.assignments.list(
+ assignment = await async_client.v1_beta.customers.assignments.list(
id="id",
after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
@@ -216,7 +186,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncStigg) -> No
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_list(self, async_client: AsyncStigg) -> None:
- response = await async_client.v1.events.beta.customers.assignments.with_raw_response.list(
+ response = await async_client.v1_beta.customers.assignments.with_raw_response.list(
id="id",
)
@@ -228,7 +198,7 @@ async def test_raw_response_list(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_list(self, async_client: AsyncStigg) -> None:
- async with async_client.v1.events.beta.customers.assignments.with_streaming_response.list(
+ async with async_client.v1_beta.customers.assignments.with_streaming_response.list(
id="id",
) as response:
assert not response.is_closed
@@ -243,44 +213,41 @@ async def test_streaming_response_list(self, async_client: AsyncStigg) -> None:
@parametrize
async def test_path_params_list(self, async_client: AsyncStigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- await async_client.v1.events.beta.customers.assignments.with_raw_response.list(
+ await async_client.v1_beta.customers.assignments.with_raw_response.list(
id="",
)
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_upsert(self, async_client: AsyncStigg) -> None:
- assignment = await async_client.v1.events.beta.customers.assignments.upsert(
+ assignment = await async_client.v1_beta.customers.assignments.upsert(
id="id",
- assignments=[
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-001",
- },
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-002",
- },
- ],
+ assignments=[{"entity_id": "workspace-001"}, {"entity_id": "workspace-002"}],
)
assert_matches_type(AssignmentUpsertResponse, assignment, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_upsert_with_all_params(self, async_client: AsyncStigg) -> None:
- assignment = await async_client.v1.events.beta.customers.assignments.upsert(
+ assignment = await async_client.v1_beta.customers.assignments.upsert(
id="id",
assignments=[
{
- "capability_id": "compute-minutes",
"entity_id": "workspace-001",
"cadence": "MONTH",
+ "currency_id": "currencyId",
+ "feature_id": "compute-minutes",
+ "parent_id": "parentId",
+ "scope_entity_ids": ["NxI"],
"usage_limit": 1000,
},
{
- "capability_id": "compute-minutes",
"entity_id": "workspace-002",
"cadence": "MONTH",
+ "currency_id": "cred-type-tokens",
+ "feature_id": "featureId",
+ "parent_id": "workspace-001",
+ "scope_entity_ids": ["user-1"],
"usage_limit": 2000,
},
],
@@ -292,18 +259,9 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncStigg) ->
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_upsert(self, async_client: AsyncStigg) -> None:
- response = await async_client.v1.events.beta.customers.assignments.with_raw_response.upsert(
+ response = await async_client.v1_beta.customers.assignments.with_raw_response.upsert(
id="id",
- assignments=[
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-001",
- },
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-002",
- },
- ],
+ assignments=[{"entity_id": "workspace-001"}, {"entity_id": "workspace-002"}],
)
assert response.is_closed is True
@@ -314,18 +272,9 @@ async def test_raw_response_upsert(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_upsert(self, async_client: AsyncStigg) -> None:
- async with async_client.v1.events.beta.customers.assignments.with_streaming_response.upsert(
+ async with async_client.v1_beta.customers.assignments.with_streaming_response.upsert(
id="id",
- assignments=[
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-001",
- },
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-002",
- },
- ],
+ assignments=[{"entity_id": "workspace-001"}, {"entity_id": "workspace-002"}],
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -339,16 +288,7 @@ async def test_streaming_response_upsert(self, async_client: AsyncStigg) -> None
@parametrize
async def test_path_params_upsert(self, async_client: AsyncStigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- await async_client.v1.events.beta.customers.assignments.with_raw_response.upsert(
+ await async_client.v1_beta.customers.assignments.with_raw_response.upsert(
id="",
- assignments=[
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-001",
- },
- {
- "capability_id": "compute-minutes",
- "entity_id": "workspace-002",
- },
- ],
+ assignments=[{"entity_id": "workspace-001"}, {"entity_id": "workspace-002"}],
)
diff --git a/tests/api_resources/v1/events/beta/customers/test_entities.py b/tests/api_resources/v1_beta/customers/test_entities.py
similarity index 84%
rename from tests/api_resources/v1/events/beta/customers/test_entities.py
rename to tests/api_resources/v1_beta/customers/test_entities.py
index c576d09e..7eb8d493 100644
--- a/tests/api_resources/v1/events/beta/customers/test_entities.py
+++ b/tests/api_resources/v1_beta/customers/test_entities.py
@@ -10,7 +10,7 @@
from stigg import Stigg, AsyncStigg
from tests.utils import assert_matches_type
from stigg.pagination import SyncMyCursorIDPage, AsyncMyCursorIDPage
-from stigg.types.v1.events.beta.customers import (
+from stigg.types.v1_beta.customers import (
EntityListResponse,
EntityUpsertResponse,
EntityArchiveResponse,
@@ -27,7 +27,7 @@ class TestEntities:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_retrieve(self, client: Stigg) -> None:
- entity = client.v1.events.beta.customers.entities.retrieve(
+ entity = client.v1_beta.customers.entities.retrieve(
entity_id="x",
id="id",
)
@@ -36,7 +36,7 @@ def test_method_retrieve(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_retrieve_with_all_params(self, client: Stigg) -> None:
- entity = client.v1.events.beta.customers.entities.retrieve(
+ entity = client.v1_beta.customers.entities.retrieve(
entity_id="x",
id="id",
x_account_id="X-ACCOUNT-ID",
@@ -47,7 +47,7 @@ def test_method_retrieve_with_all_params(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_retrieve(self, client: Stigg) -> None:
- response = client.v1.events.beta.customers.entities.with_raw_response.retrieve(
+ response = client.v1_beta.customers.entities.with_raw_response.retrieve(
entity_id="x",
id="id",
)
@@ -60,7 +60,7 @@ def test_raw_response_retrieve(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_retrieve(self, client: Stigg) -> None:
- with client.v1.events.beta.customers.entities.with_streaming_response.retrieve(
+ with client.v1_beta.customers.entities.with_streaming_response.retrieve(
entity_id="x",
id="id",
) as response:
@@ -76,13 +76,13 @@ def test_streaming_response_retrieve(self, client: Stigg) -> None:
@parametrize
def test_path_params_retrieve(self, client: Stigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- client.v1.events.beta.customers.entities.with_raw_response.retrieve(
+ client.v1_beta.customers.entities.with_raw_response.retrieve(
entity_id="x",
id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"):
- client.v1.events.beta.customers.entities.with_raw_response.retrieve(
+ client.v1_beta.customers.entities.with_raw_response.retrieve(
entity_id="",
id="id",
)
@@ -90,7 +90,7 @@ def test_path_params_retrieve(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_list(self, client: Stigg) -> None:
- entity = client.v1.events.beta.customers.entities.list(
+ entity = client.v1_beta.customers.entities.list(
id="id",
)
assert_matches_type(SyncMyCursorIDPage[EntityListResponse], entity, path=["response"])
@@ -98,7 +98,7 @@ def test_method_list(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_list_with_all_params(self, client: Stigg) -> None:
- entity = client.v1.events.beta.customers.entities.list(
+ entity = client.v1_beta.customers.entities.list(
id="id",
after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
@@ -113,7 +113,7 @@ def test_method_list_with_all_params(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_list(self, client: Stigg) -> None:
- response = client.v1.events.beta.customers.entities.with_raw_response.list(
+ response = client.v1_beta.customers.entities.with_raw_response.list(
id="id",
)
@@ -125,7 +125,7 @@ def test_raw_response_list(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_list(self, client: Stigg) -> None:
- with client.v1.events.beta.customers.entities.with_streaming_response.list(
+ with client.v1_beta.customers.entities.with_streaming_response.list(
id="id",
) as response:
assert not response.is_closed
@@ -140,14 +140,14 @@ def test_streaming_response_list(self, client: Stigg) -> None:
@parametrize
def test_path_params_list(self, client: Stigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- client.v1.events.beta.customers.entities.with_raw_response.list(
+ client.v1_beta.customers.entities.with_raw_response.list(
id="",
)
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_archive(self, client: Stigg) -> None:
- entity = client.v1.events.beta.customers.entities.archive(
+ entity = client.v1_beta.customers.entities.archive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -156,7 +156,7 @@ def test_method_archive(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_archive_with_all_params(self, client: Stigg) -> None:
- entity = client.v1.events.beta.customers.entities.archive(
+ entity = client.v1_beta.customers.entities.archive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
x_account_id="X-ACCOUNT-ID",
@@ -167,7 +167,7 @@ def test_method_archive_with_all_params(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_archive(self, client: Stigg) -> None:
- response = client.v1.events.beta.customers.entities.with_raw_response.archive(
+ response = client.v1_beta.customers.entities.with_raw_response.archive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -180,7 +180,7 @@ def test_raw_response_archive(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_archive(self, client: Stigg) -> None:
- with client.v1.events.beta.customers.entities.with_streaming_response.archive(
+ with client.v1_beta.customers.entities.with_streaming_response.archive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
) as response:
@@ -196,7 +196,7 @@ def test_streaming_response_archive(self, client: Stigg) -> None:
@parametrize
def test_path_params_archive(self, client: Stigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- client.v1.events.beta.customers.entities.with_raw_response.archive(
+ client.v1_beta.customers.entities.with_raw_response.archive(
id="",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -204,7 +204,7 @@ def test_path_params_archive(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_unarchive(self, client: Stigg) -> None:
- entity = client.v1.events.beta.customers.entities.unarchive(
+ entity = client.v1_beta.customers.entities.unarchive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -213,7 +213,7 @@ def test_method_unarchive(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_unarchive_with_all_params(self, client: Stigg) -> None:
- entity = client.v1.events.beta.customers.entities.unarchive(
+ entity = client.v1_beta.customers.entities.unarchive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
x_account_id="X-ACCOUNT-ID",
@@ -224,7 +224,7 @@ def test_method_unarchive_with_all_params(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_unarchive(self, client: Stigg) -> None:
- response = client.v1.events.beta.customers.entities.with_raw_response.unarchive(
+ response = client.v1_beta.customers.entities.with_raw_response.unarchive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -237,7 +237,7 @@ def test_raw_response_unarchive(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_unarchive(self, client: Stigg) -> None:
- with client.v1.events.beta.customers.entities.with_streaming_response.unarchive(
+ with client.v1_beta.customers.entities.with_streaming_response.unarchive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
) as response:
@@ -253,7 +253,7 @@ def test_streaming_response_unarchive(self, client: Stigg) -> None:
@parametrize
def test_path_params_unarchive(self, client: Stigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- client.v1.events.beta.customers.entities.with_raw_response.unarchive(
+ client.v1_beta.customers.entities.with_raw_response.unarchive(
id="",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -261,7 +261,7 @@ def test_path_params_unarchive(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_upsert(self, client: Stigg) -> None:
- entity = client.v1.events.beta.customers.entities.upsert(
+ entity = client.v1_beta.customers.entities.upsert(
id="id",
entities=[{"id": "user-7f3a0c1d"}, {"id": "user-c4d1b2e9"}],
)
@@ -270,7 +270,7 @@ def test_method_upsert(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_upsert_with_all_params(self, client: Stigg) -> None:
- entity = client.v1.events.beta.customers.entities.upsert(
+ entity = client.v1_beta.customers.entities.upsert(
id="id",
entities=[
{
@@ -295,7 +295,7 @@ def test_method_upsert_with_all_params(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_upsert(self, client: Stigg) -> None:
- response = client.v1.events.beta.customers.entities.with_raw_response.upsert(
+ response = client.v1_beta.customers.entities.with_raw_response.upsert(
id="id",
entities=[{"id": "user-7f3a0c1d"}, {"id": "user-c4d1b2e9"}],
)
@@ -308,7 +308,7 @@ def test_raw_response_upsert(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_upsert(self, client: Stigg) -> None:
- with client.v1.events.beta.customers.entities.with_streaming_response.upsert(
+ with client.v1_beta.customers.entities.with_streaming_response.upsert(
id="id",
entities=[{"id": "user-7f3a0c1d"}, {"id": "user-c4d1b2e9"}],
) as response:
@@ -324,7 +324,7 @@ def test_streaming_response_upsert(self, client: Stigg) -> None:
@parametrize
def test_path_params_upsert(self, client: Stigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- client.v1.events.beta.customers.entities.with_raw_response.upsert(
+ client.v1_beta.customers.entities.with_raw_response.upsert(
id="",
entities=[{"id": "user-7f3a0c1d"}, {"id": "user-c4d1b2e9"}],
)
@@ -338,7 +338,7 @@ class TestAsyncEntities:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_retrieve(self, async_client: AsyncStigg) -> None:
- entity = await async_client.v1.events.beta.customers.entities.retrieve(
+ entity = await async_client.v1_beta.customers.entities.retrieve(
entity_id="x",
id="id",
)
@@ -347,7 +347,7 @@ async def test_method_retrieve(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_retrieve_with_all_params(self, async_client: AsyncStigg) -> None:
- entity = await async_client.v1.events.beta.customers.entities.retrieve(
+ entity = await async_client.v1_beta.customers.entities.retrieve(
entity_id="x",
id="id",
x_account_id="X-ACCOUNT-ID",
@@ -358,7 +358,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncStigg) -
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncStigg) -> None:
- response = await async_client.v1.events.beta.customers.entities.with_raw_response.retrieve(
+ response = await async_client.v1_beta.customers.entities.with_raw_response.retrieve(
entity_id="x",
id="id",
)
@@ -371,7 +371,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_retrieve(self, async_client: AsyncStigg) -> None:
- async with async_client.v1.events.beta.customers.entities.with_streaming_response.retrieve(
+ async with async_client.v1_beta.customers.entities.with_streaming_response.retrieve(
entity_id="x",
id="id",
) as response:
@@ -387,13 +387,13 @@ async def test_streaming_response_retrieve(self, async_client: AsyncStigg) -> No
@parametrize
async def test_path_params_retrieve(self, async_client: AsyncStigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- await async_client.v1.events.beta.customers.entities.with_raw_response.retrieve(
+ await async_client.v1_beta.customers.entities.with_raw_response.retrieve(
entity_id="x",
id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"):
- await async_client.v1.events.beta.customers.entities.with_raw_response.retrieve(
+ await async_client.v1_beta.customers.entities.with_raw_response.retrieve(
entity_id="",
id="id",
)
@@ -401,7 +401,7 @@ async def test_path_params_retrieve(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_list(self, async_client: AsyncStigg) -> None:
- entity = await async_client.v1.events.beta.customers.entities.list(
+ entity = await async_client.v1_beta.customers.entities.list(
id="id",
)
assert_matches_type(AsyncMyCursorIDPage[EntityListResponse], entity, path=["response"])
@@ -409,7 +409,7 @@ async def test_method_list(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncStigg) -> None:
- entity = await async_client.v1.events.beta.customers.entities.list(
+ entity = await async_client.v1_beta.customers.entities.list(
id="id",
after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
@@ -424,7 +424,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncStigg) -> No
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_list(self, async_client: AsyncStigg) -> None:
- response = await async_client.v1.events.beta.customers.entities.with_raw_response.list(
+ response = await async_client.v1_beta.customers.entities.with_raw_response.list(
id="id",
)
@@ -436,7 +436,7 @@ async def test_raw_response_list(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_list(self, async_client: AsyncStigg) -> None:
- async with async_client.v1.events.beta.customers.entities.with_streaming_response.list(
+ async with async_client.v1_beta.customers.entities.with_streaming_response.list(
id="id",
) as response:
assert not response.is_closed
@@ -451,14 +451,14 @@ async def test_streaming_response_list(self, async_client: AsyncStigg) -> None:
@parametrize
async def test_path_params_list(self, async_client: AsyncStigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- await async_client.v1.events.beta.customers.entities.with_raw_response.list(
+ await async_client.v1_beta.customers.entities.with_raw_response.list(
id="",
)
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_archive(self, async_client: AsyncStigg) -> None:
- entity = await async_client.v1.events.beta.customers.entities.archive(
+ entity = await async_client.v1_beta.customers.entities.archive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -467,7 +467,7 @@ async def test_method_archive(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_archive_with_all_params(self, async_client: AsyncStigg) -> None:
- entity = await async_client.v1.events.beta.customers.entities.archive(
+ entity = await async_client.v1_beta.customers.entities.archive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
x_account_id="X-ACCOUNT-ID",
@@ -478,7 +478,7 @@ async def test_method_archive_with_all_params(self, async_client: AsyncStigg) ->
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_archive(self, async_client: AsyncStigg) -> None:
- response = await async_client.v1.events.beta.customers.entities.with_raw_response.archive(
+ response = await async_client.v1_beta.customers.entities.with_raw_response.archive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -491,7 +491,7 @@ async def test_raw_response_archive(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_archive(self, async_client: AsyncStigg) -> None:
- async with async_client.v1.events.beta.customers.entities.with_streaming_response.archive(
+ async with async_client.v1_beta.customers.entities.with_streaming_response.archive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
) as response:
@@ -507,7 +507,7 @@ async def test_streaming_response_archive(self, async_client: AsyncStigg) -> Non
@parametrize
async def test_path_params_archive(self, async_client: AsyncStigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- await async_client.v1.events.beta.customers.entities.with_raw_response.archive(
+ await async_client.v1_beta.customers.entities.with_raw_response.archive(
id="",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -515,7 +515,7 @@ async def test_path_params_archive(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_unarchive(self, async_client: AsyncStigg) -> None:
- entity = await async_client.v1.events.beta.customers.entities.unarchive(
+ entity = await async_client.v1_beta.customers.entities.unarchive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -524,7 +524,7 @@ async def test_method_unarchive(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_unarchive_with_all_params(self, async_client: AsyncStigg) -> None:
- entity = await async_client.v1.events.beta.customers.entities.unarchive(
+ entity = await async_client.v1_beta.customers.entities.unarchive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
x_account_id="X-ACCOUNT-ID",
@@ -535,7 +535,7 @@ async def test_method_unarchive_with_all_params(self, async_client: AsyncStigg)
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_unarchive(self, async_client: AsyncStigg) -> None:
- response = await async_client.v1.events.beta.customers.entities.with_raw_response.unarchive(
+ response = await async_client.v1_beta.customers.entities.with_raw_response.unarchive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -548,7 +548,7 @@ async def test_raw_response_unarchive(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_unarchive(self, async_client: AsyncStigg) -> None:
- async with async_client.v1.events.beta.customers.entities.with_streaming_response.unarchive(
+ async with async_client.v1_beta.customers.entities.with_streaming_response.unarchive(
id="id",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
) as response:
@@ -564,7 +564,7 @@ async def test_streaming_response_unarchive(self, async_client: AsyncStigg) -> N
@parametrize
async def test_path_params_unarchive(self, async_client: AsyncStigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- await async_client.v1.events.beta.customers.entities.with_raw_response.unarchive(
+ await async_client.v1_beta.customers.entities.with_raw_response.unarchive(
id="",
ids=["user-7f3a0c1d", "user-c4d1b2e9"],
)
@@ -572,7 +572,7 @@ async def test_path_params_unarchive(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_upsert(self, async_client: AsyncStigg) -> None:
- entity = await async_client.v1.events.beta.customers.entities.upsert(
+ entity = await async_client.v1_beta.customers.entities.upsert(
id="id",
entities=[{"id": "user-7f3a0c1d"}, {"id": "user-c4d1b2e9"}],
)
@@ -581,7 +581,7 @@ async def test_method_upsert(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_upsert_with_all_params(self, async_client: AsyncStigg) -> None:
- entity = await async_client.v1.events.beta.customers.entities.upsert(
+ entity = await async_client.v1_beta.customers.entities.upsert(
id="id",
entities=[
{
@@ -606,7 +606,7 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncStigg) ->
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_upsert(self, async_client: AsyncStigg) -> None:
- response = await async_client.v1.events.beta.customers.entities.with_raw_response.upsert(
+ response = await async_client.v1_beta.customers.entities.with_raw_response.upsert(
id="id",
entities=[{"id": "user-7f3a0c1d"}, {"id": "user-c4d1b2e9"}],
)
@@ -619,7 +619,7 @@ async def test_raw_response_upsert(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_upsert(self, async_client: AsyncStigg) -> None:
- async with async_client.v1.events.beta.customers.entities.with_streaming_response.upsert(
+ async with async_client.v1_beta.customers.entities.with_streaming_response.upsert(
id="id",
entities=[{"id": "user-7f3a0c1d"}, {"id": "user-c4d1b2e9"}],
) as response:
@@ -635,7 +635,7 @@ async def test_streaming_response_upsert(self, async_client: AsyncStigg) -> None
@parametrize
async def test_path_params_upsert(self, async_client: AsyncStigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- await async_client.v1.events.beta.customers.entities.with_raw_response.upsert(
+ await async_client.v1_beta.customers.entities.with_raw_response.upsert(
id="",
entities=[{"id": "user-7f3a0c1d"}, {"id": "user-c4d1b2e9"}],
)
diff --git a/tests/api_resources/v1/events/beta/customers/test_entitlements.py b/tests/api_resources/v1_beta/customers/test_entitlements.py
similarity index 84%
rename from tests/api_resources/v1/events/beta/customers/test_entitlements.py
rename to tests/api_resources/v1_beta/customers/test_entitlements.py
index 687a8de4..6c224fa8 100644
--- a/tests/api_resources/v1/events/beta/customers/test_entitlements.py
+++ b/tests/api_resources/v1_beta/customers/test_entitlements.py
@@ -9,7 +9,7 @@
from stigg import Stigg, AsyncStigg
from tests.utils import assert_matches_type
-from stigg.types.v1.events.beta.customers import EntitlementCheckResponse
+from stigg.types.v1_beta.customers import EntitlementCheckResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -20,7 +20,7 @@ class TestEntitlements:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_check(self, client: Stigg) -> None:
- entitlement = client.v1.events.beta.customers.entitlements.check(
+ entitlement = client.v1_beta.customers.entitlements.check(
id="x",
)
assert_matches_type(EntitlementCheckResponse, entitlement, path=["response"])
@@ -28,7 +28,7 @@ def test_method_check(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_check_with_all_params(self, client: Stigg) -> None:
- entitlement = client.v1.events.beta.customers.entitlements.check(
+ entitlement = client.v1_beta.customers.entitlements.check(
id="x",
currency_id="x",
dimensions={"foo": "string"},
@@ -44,7 +44,7 @@ def test_method_check_with_all_params(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_check(self, client: Stigg) -> None:
- response = client.v1.events.beta.customers.entitlements.with_raw_response.check(
+ response = client.v1_beta.customers.entitlements.with_raw_response.check(
id="x",
)
@@ -56,7 +56,7 @@ def test_raw_response_check(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_check(self, client: Stigg) -> None:
- with client.v1.events.beta.customers.entitlements.with_streaming_response.check(
+ with client.v1_beta.customers.entitlements.with_streaming_response.check(
id="x",
) as response:
assert not response.is_closed
@@ -71,7 +71,7 @@ def test_streaming_response_check(self, client: Stigg) -> None:
@parametrize
def test_path_params_check(self, client: Stigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- client.v1.events.beta.customers.entitlements.with_raw_response.check(
+ client.v1_beta.customers.entitlements.with_raw_response.check(
id="",
)
@@ -84,7 +84,7 @@ class TestAsyncEntitlements:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_check(self, async_client: AsyncStigg) -> None:
- entitlement = await async_client.v1.events.beta.customers.entitlements.check(
+ entitlement = await async_client.v1_beta.customers.entitlements.check(
id="x",
)
assert_matches_type(EntitlementCheckResponse, entitlement, path=["response"])
@@ -92,7 +92,7 @@ async def test_method_check(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_check_with_all_params(self, async_client: AsyncStigg) -> None:
- entitlement = await async_client.v1.events.beta.customers.entitlements.check(
+ entitlement = await async_client.v1_beta.customers.entitlements.check(
id="x",
currency_id="x",
dimensions={"foo": "string"},
@@ -108,7 +108,7 @@ async def test_method_check_with_all_params(self, async_client: AsyncStigg) -> N
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_check(self, async_client: AsyncStigg) -> None:
- response = await async_client.v1.events.beta.customers.entitlements.with_raw_response.check(
+ response = await async_client.v1_beta.customers.entitlements.with_raw_response.check(
id="x",
)
@@ -120,7 +120,7 @@ async def test_raw_response_check(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_check(self, async_client: AsyncStigg) -> None:
- async with async_client.v1.events.beta.customers.entitlements.with_streaming_response.check(
+ async with async_client.v1_beta.customers.entitlements.with_streaming_response.check(
id="x",
) as response:
assert not response.is_closed
@@ -135,6 +135,6 @@ async def test_streaming_response_check(self, async_client: AsyncStigg) -> None:
@parametrize
async def test_path_params_check(self, async_client: AsyncStigg) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- await async_client.v1.events.beta.customers.entitlements.with_raw_response.check(
+ await async_client.v1_beta.customers.entitlements.with_raw_response.check(
id="",
)
diff --git a/tests/api_resources/v1/events/beta/test_entity_types.py b/tests/api_resources/v1_beta/test_entity_types.py
similarity index 88%
rename from tests/api_resources/v1/events/beta/test_entity_types.py
rename to tests/api_resources/v1_beta/test_entity_types.py
index af7bad06..2fcff144 100644
--- a/tests/api_resources/v1/events/beta/test_entity_types.py
+++ b/tests/api_resources/v1_beta/test_entity_types.py
@@ -10,7 +10,7 @@
from stigg import Stigg, AsyncStigg
from tests.utils import assert_matches_type
from stigg.pagination import SyncMyCursorIDPage, AsyncMyCursorIDPage
-from stigg.types.v1.events.beta import (
+from stigg.types.v1_beta import (
EntityTypeListResponse,
EntityTypeUpsertResponse,
)
@@ -24,13 +24,13 @@ class TestEntityTypes:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_list(self, client: Stigg) -> None:
- entity_type = client.v1.events.beta.entity_types.list()
+ entity_type = client.v1_beta.entity_types.list()
assert_matches_type(SyncMyCursorIDPage[EntityTypeListResponse], entity_type, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_list_with_all_params(self, client: Stigg) -> None:
- entity_type = client.v1.events.beta.entity_types.list(
+ entity_type = client.v1_beta.entity_types.list(
after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
limit=1,
@@ -42,7 +42,7 @@ def test_method_list_with_all_params(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_list(self, client: Stigg) -> None:
- response = client.v1.events.beta.entity_types.with_raw_response.list()
+ response = client.v1_beta.entity_types.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -52,7 +52,7 @@ def test_raw_response_list(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_list(self, client: Stigg) -> None:
- with client.v1.events.beta.entity_types.with_streaming_response.list() as response:
+ with client.v1_beta.entity_types.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -64,7 +64,7 @@ def test_streaming_response_list(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_upsert(self, client: Stigg) -> None:
- entity_type = client.v1.events.beta.entity_types.upsert(
+ entity_type = client.v1_beta.entity_types.upsert(
types=[
{
"id": "org",
@@ -83,7 +83,7 @@ def test_method_upsert(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_upsert_with_all_params(self, client: Stigg) -> None:
- entity_type = client.v1.events.beta.entity_types.upsert(
+ entity_type = client.v1_beta.entity_types.upsert(
types=[
{
"id": "org",
@@ -104,7 +104,7 @@ def test_method_upsert_with_all_params(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_upsert(self, client: Stigg) -> None:
- response = client.v1.events.beta.entity_types.with_raw_response.upsert(
+ response = client.v1_beta.entity_types.with_raw_response.upsert(
types=[
{
"id": "org",
@@ -127,7 +127,7 @@ def test_raw_response_upsert(self, client: Stigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_upsert(self, client: Stigg) -> None:
- with client.v1.events.beta.entity_types.with_streaming_response.upsert(
+ with client.v1_beta.entity_types.with_streaming_response.upsert(
types=[
{
"id": "org",
@@ -158,13 +158,13 @@ class TestAsyncEntityTypes:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_list(self, async_client: AsyncStigg) -> None:
- entity_type = await async_client.v1.events.beta.entity_types.list()
+ entity_type = await async_client.v1_beta.entity_types.list()
assert_matches_type(AsyncMyCursorIDPage[EntityTypeListResponse], entity_type, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncStigg) -> None:
- entity_type = await async_client.v1.events.beta.entity_types.list(
+ entity_type = await async_client.v1_beta.entity_types.list(
after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
limit=1,
@@ -176,7 +176,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncStigg) -> No
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_list(self, async_client: AsyncStigg) -> None:
- response = await async_client.v1.events.beta.entity_types.with_raw_response.list()
+ response = await async_client.v1_beta.entity_types.with_raw_response.list()
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -186,7 +186,7 @@ async def test_raw_response_list(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_list(self, async_client: AsyncStigg) -> None:
- async with async_client.v1.events.beta.entity_types.with_streaming_response.list() as response:
+ async with async_client.v1_beta.entity_types.with_streaming_response.list() as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -198,7 +198,7 @@ async def test_streaming_response_list(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_upsert(self, async_client: AsyncStigg) -> None:
- entity_type = await async_client.v1.events.beta.entity_types.upsert(
+ entity_type = await async_client.v1_beta.entity_types.upsert(
types=[
{
"id": "org",
@@ -217,7 +217,7 @@ async def test_method_upsert(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_upsert_with_all_params(self, async_client: AsyncStigg) -> None:
- entity_type = await async_client.v1.events.beta.entity_types.upsert(
+ entity_type = await async_client.v1_beta.entity_types.upsert(
types=[
{
"id": "org",
@@ -238,7 +238,7 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncStigg) ->
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_upsert(self, async_client: AsyncStigg) -> None:
- response = await async_client.v1.events.beta.entity_types.with_raw_response.upsert(
+ response = await async_client.v1_beta.entity_types.with_raw_response.upsert(
types=[
{
"id": "org",
@@ -261,7 +261,7 @@ async def test_raw_response_upsert(self, async_client: AsyncStigg) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_upsert(self, async_client: AsyncStigg) -> None:
- async with async_client.v1.events.beta.entity_types.with_streaming_response.upsert(
+ async with async_client.v1_beta.entity_types.with_streaming_response.upsert(
types=[
{
"id": "org",
From e0da86558a4ccffbe6e647017b7c7931b5e59ec8 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Wed, 10 Jun 2026 07:04:18 +0000
Subject: [PATCH 2/2] release: 0.1.0-beta.19
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 8 ++++++++
pyproject.toml | 2 +-
src/stigg/_version.py | 2 +-
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 159bd13c..2bce5e17 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.1.0-beta.18"
+ ".": "0.1.0-beta.19"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 04acc7dd..7dff1301 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.1.0-beta.19 (2026-06-10)
+
+Full Changelog: [v0.1.0-beta.18...v0.1.0-beta.19](https://github.com/stiggio/stigg-python/compare/v0.1.0-beta.18...v0.1.0-beta.19)
+
+### Features
+
+* **api:** add parent/scope fields, replace capability_id in customer assignments ([a98104f](https://github.com/stiggio/stigg-python/commit/a98104fa24bd66c8cf31e06c3027cdfb24227ba0))
+
## 0.1.0-beta.18 (2026-06-08)
Full Changelog: [v0.1.0-beta.17...v0.1.0-beta.18](https://github.com/stiggio/stigg-python/compare/v0.1.0-beta.17...v0.1.0-beta.18)
diff --git a/pyproject.toml b/pyproject.toml
index 226ae12d..680457d3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "stigg"
-version = "0.1.0-beta.18"
+version = "0.1.0-beta.19"
description = "The official Python library for the stigg API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/stigg/_version.py b/src/stigg/_version.py
index c75cdf1a..a0f1b47e 100644
--- a/src/stigg/_version.py
+++ b/src/stigg/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "stigg"
-__version__ = "0.1.0-beta.18" # x-release-please-version
+__version__ = "0.1.0-beta.19" # x-release-please-version