Skip to content

Commit e92ec04

Browse files
feat(api): casing
1 parent d5af5d8 commit e92ec04

File tree

6 files changed

+204
-22
lines changed

6 files changed

+204
-22
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 19
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openint%2Fopenint-5d7be7748789c7dc809c42528c6d7a033a5836964ecbd673842714ef82ed8335.yml
3-
openapi_spec_hash: bc09645d3ed0e895692e7dba584e4a94
4-
config_hash: 61b25dd271bd118bf6213c0ee305cfb8
1+
configured_endpoints: 20
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openint%2Fopenint-9393fb16ed1db4a42d88b8e5111c84a4425d35fd813b7ab57fec7649fa59aa3d.yml
3+
openapi_spec_hash: 6f286b7e5993a5e6c570a5e8e14ce7cb
4+
config_hash: d9cb78a553d174780d65e0f069519292

api.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,18 @@ from openint.types import (
2626
ListEventsResponse,
2727
UpsertConnnectorConfigResponse,
2828
UpsertCustomerResponse,
29+
UpsertOrganizationResponse,
2930
)
3031
```
3132

3233
Methods:
3334

34-
- <code title="put /v2/connection/{id}/assignment/{replId}">client.<a href="./src/openint/_client.py">assign_connection</a>(repl_id, \*, id) -> <a href="./src/openint/types/assign_connection_response.py">AssignConnectionResponse</a></code>
35+
- <code title="put /v2/connection/{id}/assignment/{repl_id}">client.<a href="./src/openint/_client.py">assign_connection</a>(repl_id, \*, id) -> <a href="./src/openint/types/assign_connection_response.py">AssignConnectionResponse</a></code>
3536
- <code title="post /v1/connection/{id}/check">client.<a href="./src/openint/_client.py">check_connection</a>(id) -> <a href="./src/openint/types/check_connection_response.py">CheckConnectionResponse</a></code>
3637
- <code title="post /v2/connection">client.<a href="./src/openint/_client.py">create_connection</a>(\*\*<a href="src/openint/types/client_create_connection_params.py">params</a>) -> <a href="./src/openint/types/create_connection_response.py">CreateConnectionResponse</a></code>
3738
- <code title="post /v2/connector-config">client.<a href="./src/openint/_client.py">create_connnector_config</a>(\*\*<a href="src/openint/types/client_create_connnector_config_params.py">params</a>) -> <a href="./src/openint/types/create_connnector_config_response.py">CreateConnnectorConfigResponse</a></code>
3839
- <code title="post /v1/customer/{customer_id}/token">client.<a href="./src/openint/_client.py">create_token</a>(customer_id, \*\*<a href="src/openint/types/client_create_token_params.py">params</a>) -> <a href="./src/openint/types/create_token_response.py">CreateTokenResponse</a></code>
39-
- <code title="delete /v2/connection/{id}/assignment/{replId}">client.<a href="./src/openint/_client.py">delete_assignment</a>(repl_id, \*, id) -> <a href="./src/openint/types/delete_assignment_response.py">DeleteAssignmentResponse</a></code>
40+
- <code title="delete /v2/connection/{id}/assignment/{repl_id}">client.<a href="./src/openint/_client.py">delete_assignment</a>(repl_id, \*, id) -> <a href="./src/openint/types/delete_assignment_response.py">DeleteAssignmentResponse</a></code>
4041
- <code title="delete /v2/connection/{id}">client.<a href="./src/openint/_client.py">delete_connection</a>(id) -> <a href="./src/openint/types/delete_connection_response.py">DeleteConnectionResponse</a></code>
4142
- <code title="delete /v2/connector-config/{id}">client.<a href="./src/openint/_client.py">delete_connector_config</a>(id) -> <a href="./src/openint/types/delete_connector_config_response.py">DeleteConnectorConfigResponse</a></code>
4243
- <code title="get /v2/connector-config/{id}">client.<a href="./src/openint/_client.py">get_conector_config</a>(id, \*\*<a href="src/openint/types/client_get_conector_config_params.py">params</a>) -> <a href="./src/openint/types/get_conector_config_response.py">GetConectorConfigResponse</a></code>
@@ -51,3 +52,4 @@ Methods:
5152
- <code title="get /v1/event">client.<a href="./src/openint/_client.py">list_events</a>(\*\*<a href="src/openint/types/client_list_events_params.py">params</a>) -> <a href="./src/openint/types/list_events_response.py">SyncOffsetPagination[ListEventsResponse]</a></code>
5253
- <code title="put /v2/connector-config/{id}">client.<a href="./src/openint/_client.py">upsert_connnector_config</a>(id, \*\*<a href="src/openint/types/client_upsert_connnector_config_params.py">params</a>) -> <a href="./src/openint/types/upsert_connnector_config_response.py">UpsertConnnectorConfigResponse</a></code>
5354
- <code title="put /v1/customer">client.<a href="./src/openint/_client.py">upsert_customer</a>(\*\*<a href="src/openint/types/client_upsert_customer_params.py">params</a>) -> <a href="./src/openint/types/upsert_customer_response.py">UpsertCustomerResponse</a></code>
55+
- <code title="put /v2/organization/{org_id}">client.<a href="./src/openint/_client.py">upsert_organization</a>(org_id) -> <a href="./src/openint/types/upsert_organization_response.py">UpsertOrganizationResponse</a></code>

src/openint/_client.py

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
from .types.delete_assignment_response import DeleteAssignmentResponse
7676
from .types.delete_connection_response import DeleteConnectionResponse
7777
from .types.get_conector_config_response import GetConectorConfigResponse
78+
from .types.upsert_organization_response import UpsertOrganizationResponse
7879
from .types.list_connector_configs_response import ListConnectorConfigsResponse
7980
from .types.delete_connector_config_response import DeleteConnectorConfigResponse
8081
from .types.list_connnector_configs_response import ListConnnectorConfigsResponse
@@ -1675,6 +1676,40 @@ def upsert_customer(
16751676
cast_to=UpsertCustomerResponse,
16761677
)
16771678

1679+
def upsert_organization(
1680+
self,
1681+
org_id: str,
1682+
*,
1683+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1684+
# The extra values given here take precedence over values defined on the client or passed to this method.
1685+
extra_headers: Headers | None = None,
1686+
extra_query: Query | None = None,
1687+
extra_body: Body | None = None,
1688+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1689+
) -> UpsertOrganizationResponse:
1690+
"""Upsert an organization by ID.
1691+
1692+
Creates if it does not exist.
1693+
1694+
Args:
1695+
extra_headers: Send extra headers
1696+
1697+
extra_query: Add additional query parameters to the request
1698+
1699+
extra_body: Add additional JSON properties to the request
1700+
1701+
timeout: Override the client-level default timeout for this request, in seconds
1702+
"""
1703+
if not org_id:
1704+
raise ValueError(f"Expected a non-empty value for `org_id` but received {org_id!r}")
1705+
return self.put(
1706+
f"/v2/organization/{org_id}",
1707+
options=make_request_options(
1708+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1709+
),
1710+
cast_to=UpsertOrganizationResponse,
1711+
)
1712+
16781713
@override
16791714
def _make_status_error(
16801715
self,
@@ -3300,6 +3335,40 @@ async def upsert_customer(
33003335
cast_to=UpsertCustomerResponse,
33013336
)
33023337

3338+
async def upsert_organization(
3339+
self,
3340+
org_id: str,
3341+
*,
3342+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3343+
# The extra values given here take precedence over values defined on the client or passed to this method.
3344+
extra_headers: Headers | None = None,
3345+
extra_query: Query | None = None,
3346+
extra_body: Body | None = None,
3347+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
3348+
) -> UpsertOrganizationResponse:
3349+
"""Upsert an organization by ID.
3350+
3351+
Creates if it does not exist.
3352+
3353+
Args:
3354+
extra_headers: Send extra headers
3355+
3356+
extra_query: Add additional query parameters to the request
3357+
3358+
extra_body: Add additional JSON properties to the request
3359+
3360+
timeout: Override the client-level default timeout for this request, in seconds
3361+
"""
3362+
if not org_id:
3363+
raise ValueError(f"Expected a non-empty value for `org_id` but received {org_id!r}")
3364+
return await self.put(
3365+
f"/v2/organization/{org_id}",
3366+
options=make_request_options(
3367+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
3368+
),
3369+
cast_to=UpsertOrganizationResponse,
3370+
)
3371+
33033372
@override
33043373
def _make_status_error(
33053374
self,
@@ -3396,6 +3465,9 @@ def __init__(self, client: Openint) -> None:
33963465
self.upsert_customer = to_raw_response_wrapper(
33973466
client.upsert_customer,
33983467
)
3468+
self.upsert_organization = to_raw_response_wrapper(
3469+
client.upsert_organization,
3470+
)
33993471

34003472

34013473
class AsyncOpenintWithRawResponse:
@@ -3460,6 +3532,9 @@ def __init__(self, client: AsyncOpenint) -> None:
34603532
self.upsert_customer = async_to_raw_response_wrapper(
34613533
client.upsert_customer,
34623534
)
3535+
self.upsert_organization = async_to_raw_response_wrapper(
3536+
client.upsert_organization,
3537+
)
34633538

34643539

34653540
class OpenintWithStreamedResponse:
@@ -3524,6 +3599,9 @@ def __init__(self, client: Openint) -> None:
35243599
self.upsert_customer = to_streamed_response_wrapper(
35253600
client.upsert_customer,
35263601
)
3602+
self.upsert_organization = to_streamed_response_wrapper(
3603+
client.upsert_organization,
3604+
)
35273605

35283606

35293607
class AsyncOpenintWithStreamedResponse:
@@ -3588,6 +3666,9 @@ def __init__(self, client: AsyncOpenint) -> None:
35883666
self.upsert_customer = async_to_streamed_response_wrapper(
35893667
client.upsert_customer,
35903668
)
3669+
self.upsert_organization = async_to_streamed_response_wrapper(
3670+
client.upsert_organization,
3671+
)
35913672

35923673

35933674
Client = Openint

src/openint/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from .client_get_connection_params import ClientGetConnectionParams as ClientGetConnectionParams
2424
from .client_list_customers_params import ClientListCustomersParams as ClientListCustomersParams
2525
from .get_conector_config_response import GetConectorConfigResponse as GetConectorConfigResponse
26+
from .upsert_organization_response import UpsertOrganizationResponse as UpsertOrganizationResponse
2627
from .client_list_connectors_params import ClientListConnectorsParams as ClientListConnectorsParams
2728
from .client_upsert_customer_params import ClientUpsertCustomerParams as ClientUpsertCustomerParams
2829
from .client_list_connections_params import ClientListConnectionsParams as ClientListConnectionsParams
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .._models import BaseModel
4+
5+
__all__ = ["UpsertOrganizationResponse"]
6+
7+
8+
class UpsertOrganizationResponse(BaseModel):
9+
id: str
10+
11+
api_key: str
12+
13+
created: bool

0 commit comments

Comments
 (0)