Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-beta.28"
".": "0.1.0-beta.29"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 110
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stigg/stigg-7dccccd9c809d3fcc5f0ba477228a67b5f1fc5352b282081131f9fa0d90577d4.yml
openapi_spec_hash: 43d3823a6e045c2fd0b832877f2d8739
config_hash: 0eca08dde117ac62155a012abb0ecac7
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/stigg/stigg-adaad2912e291814c93ac60d21f83f15a49cfd8d8ee8dc07b5f4b4a961d74904.yml
openapi_spec_hash: 1bbed365dc0b25763e34f2869ab08593
config_hash: 2e65c1178cfd5d688faf5c9b1a48a732
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.0-beta.29 (2026-06-23)

Full Changelog: [v0.1.0-beta.28...v0.1.0-beta.29](https://github.com/stiggio/stigg-python/compare/v0.1.0-beta.28...v0.1.0-beta.29)

### Features

* **api:** add update method to data export destinations ([d7166a7](https://github.com/stiggio/stigg-python/commit/d7166a7efc21c7bb19b10a55dcb6695b0d81c481))

## 0.1.0-beta.28 (2026-06-23)

Full Changelog: [v0.1.0-beta.27...v0.1.0-beta.28](https://github.com/stiggio/stigg-python/compare/v0.1.0-beta.27...v0.1.0-beta.28)
Expand Down
7 changes: 6 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,17 @@ Methods:
Types:

```python
from stigg.types.v1.events.data_export import DestinationCreateResponse, DestinationDeleteResponse
from stigg.types.v1.events.data_export import (
DestinationCreateResponse,
DestinationUpdateResponse,
DestinationDeleteResponse,
)
```

Methods:

- <code title="post /api/v1/data-export/destinations">client.v1.events.data_export.destinations.<a href="./src/stigg/resources/v1/events/data_export/destinations.py">create</a>(\*\*<a href="src/stigg/types/v1/events/data_export/destination_create_params.py">params</a>) -> <a href="./src/stigg/types/v1/events/data_export/destination_create_response.py">DestinationCreateResponse</a></code>
- <code title="patch /api/v1/data-export/destinations/{destinationId}">client.v1.events.data_export.destinations.<a href="./src/stigg/resources/v1/events/data_export/destinations.py">update</a>(destination_id, \*\*<a href="src/stigg/types/v1/events/data_export/destination_update_params.py">params</a>) -> <a href="./src/stigg/types/v1/events/data_export/destination_update_response.py">DestinationUpdateResponse</a></code>
- <code title="delete /api/v1/data-export/destinations/{destinationId}">client.v1.events.data_export.destinations.<a href="./src/stigg/resources/v1/events/data_export/destinations.py">delete</a>(destination_id) -> <a href="./src/stigg/types/v1/events/data_export/destination_delete_response.py">DestinationDeleteResponse</a></code>

### Beta
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "stigg"
version = "0.1.0-beta.28"
version = "0.1.0-beta.29"
description = "The official Python library for the stigg API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/stigg/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "stigg"
__version__ = "0.1.0-beta.28" # x-release-please-version
__version__ = "0.1.0-beta.29" # x-release-please-version
131 changes: 130 additions & 1 deletion src/stigg/resources/v1/events/data_export/destinations.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
async_to_streamed_response_wrapper,
)
from ....._base_client import make_request_options
from .....types.v1.events.data_export import destination_create_params
from .....types.v1.events.data_export import destination_create_params, destination_update_params
from .....types.v1.events.data_export.destination_create_response import DestinationCreateResponse
from .....types.v1.events.data_export.destination_delete_response import DestinationDeleteResponse
from .....types.v1.events.data_export.destination_update_response import DestinationUpdateResponse

__all__ = ["DestinationsResource", "AsyncDestinationsResource"]

Expand Down Expand Up @@ -100,6 +101,64 @@ def create(
cast_to=DestinationCreateResponse,
)

def update(
self,
destination_id: str,
*,
enabled_models: SequenceNotStr[str],
integration_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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DestinationUpdateResponse:
"""Update a destination's entity selection.

Pushes the new enabled_models to the
provider first, then persists the selection. Applies on the next scheduled
transfer.

Args:
integration_id: Target integration row hosting the destination

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
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._patch(
path_template("/api/v1/data-export/destinations/{destination_id}", destination_id=destination_id),
body=maybe_transform(
{
"enabled_models": enabled_models,
"integration_id": integration_id,
},
destination_update_params.DestinationUpdateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=DestinationUpdateResponse,
)

def delete(
self,
destination_id: str,
Expand Down Expand Up @@ -224,6 +283,64 @@ async def create(
cast_to=DestinationCreateResponse,
)

async def update(
self,
destination_id: str,
*,
enabled_models: SequenceNotStr[str],
integration_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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DestinationUpdateResponse:
"""Update a destination's entity selection.

Pushes the new enabled_models to the
provider first, then persists the selection. Applies on the next scheduled
transfer.

Args:
integration_id: Target integration row hosting the destination

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
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._patch(
path_template("/api/v1/data-export/destinations/{destination_id}", destination_id=destination_id),
body=await async_maybe_transform(
{
"enabled_models": enabled_models,
"integration_id": integration_id,
},
destination_update_params.DestinationUpdateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=DestinationUpdateResponse,
)

async def delete(
self,
destination_id: str,
Expand Down Expand Up @@ -277,6 +394,9 @@ def __init__(self, destinations: DestinationsResource) -> None:
self.create = to_raw_response_wrapper(
destinations.create,
)
self.update = to_raw_response_wrapper(
destinations.update,
)
self.delete = to_raw_response_wrapper(
destinations.delete,
)
Expand All @@ -289,6 +409,9 @@ def __init__(self, destinations: AsyncDestinationsResource) -> None:
self.create = async_to_raw_response_wrapper(
destinations.create,
)
self.update = async_to_raw_response_wrapper(
destinations.update,
)
self.delete = async_to_raw_response_wrapper(
destinations.delete,
)
Expand All @@ -301,6 +424,9 @@ def __init__(self, destinations: DestinationsResource) -> None:
self.create = to_streamed_response_wrapper(
destinations.create,
)
self.update = to_streamed_response_wrapper(
destinations.update,
)
self.delete = to_streamed_response_wrapper(
destinations.delete,
)
Expand All @@ -313,6 +439,9 @@ def __init__(self, destinations: AsyncDestinationsResource) -> None:
self.create = async_to_streamed_response_wrapper(
destinations.create,
)
self.update = async_to_streamed_response_wrapper(
destinations.update,
)
self.delete = async_to_streamed_response_wrapper(
destinations.delete,
)
2 changes: 2 additions & 0 deletions src/stigg/types/v1/events/data_export/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
from __future__ import annotations

from .destination_create_params import DestinationCreateParams as DestinationCreateParams
from .destination_update_params import DestinationUpdateParams as DestinationUpdateParams
from .destination_create_response import DestinationCreateResponse as DestinationCreateResponse
from .destination_delete_response import DestinationDeleteResponse as DestinationDeleteResponse
from .destination_update_response import DestinationUpdateResponse as DestinationUpdateResponse
21 changes: 21 additions & 0 deletions src/stigg/types/v1/events/data_export/destination_update_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import Required, Annotated, TypedDict

from ....._types import SequenceNotStr
from ....._utils import PropertyInfo

__all__ = ["DestinationUpdateParams"]


class DestinationUpdateParams(TypedDict, total=False):
enabled_models: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="enabledModels")]]

integration_id: Required[Annotated[str, PropertyInfo(alias="integrationId")]]
"""Target integration row hosting the destination"""

x_account_id: Annotated[str, PropertyInfo(alias="X-ACCOUNT-ID")]

x_environment_id: Annotated[str, PropertyInfo(alias="X-ENVIRONMENT-ID")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional

from pydantic import Field as FieldInfo

from ....._models import BaseModel

__all__ = ["DestinationUpdateResponse", "Data", "DataDestination", "DataDestinationLastSyncStatus"]


class DataDestinationLastSyncStatus(BaseModel):
"""Latest sync snapshot for the destination, refreshed by the provider webhook"""

finished_at: str = FieldInfo(alias="finishedAt")
"""ISO8601 timestamp of when the latest sync finished"""

status: str
"""Sync status (PENDING, RUNNING, INCOMPLETE, FAILED, SUCCEEDED, CANCELLED)"""

transfer_id: str = FieldInfo(alias="transferId")
"""Provider transfer ID of the latest sync"""

blamed_party: Optional[str] = FieldInfo(alias="blamedParty", default=None)
"""Party responsible for a failed sync, as reported by the data-export provider"""

failure_message: Optional[str] = FieldInfo(alias="failureMessage", default=None)
"""Customer-friendly failure message, when the latest sync failed"""

rows_transferred: Optional[float] = FieldInfo(alias="rowsTransferred", default=None)
"""Number of rows transferred in the latest sync"""


class DataDestination(BaseModel):
"""A single destination entry under the DATA_EXPORT integration."""

connected_at: str = FieldInfo(alias="connectedAt")
"""ISO8601 timestamp of when the destination was connected"""

destination_id: str = FieldInfo(alias="destinationId")
"""Provider destination ID"""

type: str
"""Destination type (snowflake, bigquery, ...)"""

connection_status: Optional[str] = FieldInfo(alias="connectionStatus", default=None)
"""Connection status of the destination (connected, failed)"""

enabled_models: Optional[List[str]] = FieldInfo(alias="enabledModels", default=None)

last_sync_status: Optional[DataDestinationLastSyncStatus] = FieldInfo(alias="lastSyncStatus", default=None)
"""Latest sync snapshot for the destination, refreshed by the provider webhook"""


class Data(BaseModel):
"""Current destinations under the DATA_EXPORT integration."""

destinations: List[DataDestination]
"""Current destinations under the DATA_EXPORT integration"""


class DestinationUpdateResponse(BaseModel):
"""Response object"""

data: Data
"""Current destinations under the DATA_EXPORT integration."""
Loading