From 0c9fe4c1bf19360cbd876480fbf9dd42edf78906 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 21:52:45 +0000 Subject: [PATCH] feat(api): api update (#85) --- .stats.yml | 2 +- src/conductor/resources/end_users.py | 12 ++++++------ src/conductor/types/auth_session.py | 5 ++++- src/conductor/types/end_user.py | 13 +++++++++---- src/conductor/types/end_user_create_params.py | 6 +++--- src/conductor/types/integration_connection.py | 6 +++++- 6 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index be079fe2..1e447fcf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 51 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-0468898ce720912feb8723a31f41773399bb4c931369f4b4f2354be30019acc4.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/conductor%2Fconductor-3a917b8686955f6fde9d822081ba7df42bed37826f0bf2c83fedad0a47721b91.yml diff --git a/src/conductor/resources/end_users.py b/src/conductor/resources/end_users.py index 8815ce57..9fabedbb 100644 --- a/src/conductor/resources/end_users.py +++ b/src/conductor/resources/end_users.py @@ -67,12 +67,12 @@ def create( Creates an EndUser. Args: - company_name: Your end-user's company name that will be shown elsewhere in Conductor. + company_name: The end-user's company name that will be shown elsewhere in Conductor. - email: Your end-user's email address for identification purposes. Setting this field + email: The end-user's email address for identification purposes. Setting this field will not cause any emails to be sent. - source_id: A unique identifier for your end-user from your system. Maps users between your + source_id: The end-user's unique identifier from your system. Maps users between your database and Conductor. Must be unique for each user. If you have only one user, you may use any string value. @@ -280,12 +280,12 @@ async def create( Creates an EndUser. Args: - company_name: Your end-user's company name that will be shown elsewhere in Conductor. + company_name: The end-user's company name that will be shown elsewhere in Conductor. - email: Your end-user's email address for identification purposes. Setting this field + email: The end-user's email address for identification purposes. Setting this field will not cause any emails to be sent. - source_id: A unique identifier for your end-user from your system. Maps users between your + source_id: The end-user's unique identifier from your system. Maps users between your database and Conductor. Must be unique for each user. If you have only one user, you may use any string value. diff --git a/src/conductor/types/auth_session.py b/src/conductor/types/auth_session.py index c828e492..6474d92a 100644 --- a/src/conductor/types/auth_session.py +++ b/src/conductor/types/auth_session.py @@ -23,11 +23,14 @@ class AuthSession(BaseModel): client_secret: str = FieldInfo(alias="clientSecret") """The secret used in `authFlowUrl` to securely access the authentication flow.""" + created_at: str = FieldInfo(alias="createdAt") + """The date and time when this object was created.""" + end_user_id: str = FieldInfo(alias="endUserId") """The ID of the EndUser for whom to create an IntegrationConnection.""" expires_at: str = FieldInfo(alias="expiresAt") - """The time at which the AuthSession expires. + """The date and time when this AuthSession expires. By default, this value is 30 minutes from creation. You can extend this time by setting `linkExpiryMins` when diff --git a/src/conductor/types/end_user.py b/src/conductor/types/end_user.py index 6d0467b3..154b639a 100644 --- a/src/conductor/types/end_user.py +++ b/src/conductor/types/end_user.py @@ -1,10 +1,12 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import List from typing_extensions import Literal from pydantic import Field as FieldInfo from .._models import BaseModel +from .integration_connection import IntegrationConnection __all__ = ["EndUser"] @@ -18,19 +20,22 @@ class EndUser(BaseModel): """ company_name: str = FieldInfo(alias="companyName") - """Your end-user's company name that will be shown elsewhere in Conductor.""" + """The EndUser's company name that will be shown elsewhere in Conductor.""" created_at: str = FieldInfo(alias="createdAt") - """The time at which the object was created.""" + """The date and time when this object was created.""" email: str - """Your end-user's email address for identification purposes.""" + """The EndUser's email address for identification purposes.""" + + integration_connections: List[IntegrationConnection] = FieldInfo(alias="integrationConnections") + """The EndUser's IntegrationConnections.""" object_type: Literal["end_user"] = FieldInfo(alias="objectType") """The type of object. This value is always `"end_user"`.""" source_id: str = FieldInfo(alias="sourceId") - """Your end-user's unique ID from your system. + """The EndUser's unique identifier from your system. Maps users between your database and Conductor. """ diff --git a/src/conductor/types/end_user_create_params.py b/src/conductor/types/end_user_create_params.py index 25848313..fe680d0d 100644 --- a/src/conductor/types/end_user_create_params.py +++ b/src/conductor/types/end_user_create_params.py @@ -11,16 +11,16 @@ class EndUserCreateParams(TypedDict, total=False): company_name: Required[Annotated[str, PropertyInfo(alias="companyName")]] - """Your end-user's company name that will be shown elsewhere in Conductor.""" + """The end-user's company name that will be shown elsewhere in Conductor.""" email: Required[str] - """Your end-user's email address for identification purposes. + """The end-user's email address for identification purposes. Setting this field will not cause any emails to be sent. """ source_id: Required[Annotated[str, PropertyInfo(alias="sourceId")]] - """A unique identifier for your end-user from your system. + """The end-user's unique identifier from your system. Maps users between your database and Conductor. Must be unique for each user. If you have only one user, you may use any string value. diff --git a/src/conductor/types/integration_connection.py b/src/conductor/types/integration_connection.py index 9193af7e..9a24fdb8 100644 --- a/src/conductor/types/integration_connection.py +++ b/src/conductor/types/integration_connection.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import Optional from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -14,7 +15,7 @@ class IntegrationConnection(BaseModel): """The unique identifier for this IntegrationConnection.""" created_at: str = FieldInfo(alias="createdAt") - """The time at which the object was created.""" + """The date and time when this object was created.""" end_user_id: str = FieldInfo(alias="endUserId") """The ID of the EndUser who owns this IntegrationConnection.""" @@ -22,5 +23,8 @@ class IntegrationConnection(BaseModel): integration_slug: Literal["quickbooks_desktop"] = FieldInfo(alias="integrationSlug") """The identifier of the third-party platform to integrate.""" + last_request_at: Optional[str] = FieldInfo(alias="lastRequestAt", default=None) + """The date and time of your last API request to this IntegrationConnection.""" + object_type: Literal["integration_connection"] = FieldInfo(alias="objectType") """The type of object. This value is always `"integration_connection"`."""