Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: 🐝 Update SDK - Generate Organization SDK #84

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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: 2 additions & 0 deletions organization/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This allows generated code to be indexed correctly
*.py linguist-generated=false
6 changes: 6 additions & 0 deletions organization/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
venv/
src/*.egg-info/
__pycache__/
.pytest_cache/
.python-version
.DS_Store
70 changes: 70 additions & 0 deletions organization/.speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
lockVersion: 2.0.0
id: e4dd4f7e-1f48-469e-8cc1-9eb5b5a393b1
management:
docChecksum: 243f6d77a2d2aa13b8116985f9a6ec70
docVersion: 1.0.0
speakeasyVersion: 1.271.0
generationVersion: 2.312.1
releaseVersion: 1.3.0
configChecksum: 540bfa614ea7fa291e246ddbca962073
repoURL: https://github.com/epilot-dev/sdk-python.git
repoSubDirectory: organization
installationURL: https://github.com/epilot-dev/sdk-python.git#subdirectory=organization
features:
python:
core: 4.6.5
flattening: 2.81.1
globalSecurity: 2.83.5
globalServerURLs: 2.82.2
responseFormat: 0.1.0
unions: 2.82.6
generatedFiles:
- src/epilot/sdkconfiguration.py
- src/epilot/organization.py
- src/epilot/organization_settings.py
- src/epilot/sdk.py
- py.typed
- pylintrc
- setup.py
- src/epilot/__init__.py
- src/epilot/utils/__init__.py
- src/epilot/utils/retries.py
- src/epilot/utils/utils.py
- src/epilot/models/errors/sdkerror.py
- tests/helpers.py
- src/epilot/models/operations/getorganization.py
- src/epilot/models/operations/updateorganization.py
- src/epilot/models/operations/deletesettingsvalue.py
- src/epilot/models/operations/getsettings.py
- src/epilot/models/operations/putsettingsvalue.py
- src/epilot/models/components/organization.py
- src/epilot/models/components/httpmetadata.py
- src/epilot/models/components/security.py
- src/epilot/models/__init__.py
- src/epilot/models/errors/__init__.py
- src/epilot/models/operations/__init__.py
- src/epilot/models/components/__init__.py
- docs/models/operations/getorganizationrequest.md
- docs/models/operations/getorganizationresponse.md
- docs/models/operations/updateorganizationrequest.md
- docs/models/operations/updateorganizationresponse.md
- docs/models/operations/deletesettingsvaluerequest.md
- docs/models/operations/deletesettingsvalueresponse.md
- docs/models/operations/getsettingsrequest.md
- docs/models/operations/getsettingsresponse.md
- docs/models/operations/putsettingsvaluerequest.md
- docs/models/operations/putsettingsvalueresponse.md
- docs/models/components/address.md
- docs/models/components/type.md
- docs/models/components/organization.md
- docs/models/components/httpmetadata.md
- docs/models/components/settingsvalue.md
- docs/models/components/security.md
- docs/sdks/epilot/README.md
- docs/sdks/organization/README.md
- docs/sdks/organizationsettings/README.md
- USAGE.md
- .gitattributes
- src/epilot/_hooks/sdkhooks.py
- src/epilot/_hooks/types.py
- src/epilot/_hooks/__init__.py
176 changes: 154 additions & 22 deletions organization/README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,183 @@
# epilot-organization

<!-- Start SDK Installation -->
<!-- Start SDK Installation [installation] -->
## SDK Installation

```bash
pip install git+https://github.com/epilot-dev/sdk-python.git#subdirectory=organization
```
<!-- End SDK Installation -->
<!-- End SDK Installation [installation] -->

<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage
<!-- Start SDK Example Usage -->

### Example

```python
import epilot

s = epilot.Epilot(
epilot_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.organization.get_organization(org_id='739224')

if res.organization is not None:
# handle response
pass

```
<!-- End SDK Example Usage [usage] -->

<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations

### [organization](docs/sdks/organization/README.md)

* [get_organization](docs/sdks/organization/README.md#get_organization) - getOrganization
* [update_organization](docs/sdks/organization/README.md#update_organization) - updateOrganization

### [organization_settings](docs/sdks/organizationsettings/README.md)

* [delete_settings_value](docs/sdks/organizationsettings/README.md#delete_settings_value) - deleteSettingsValue
* [get_settings](docs/sdks/organizationsettings/README.md#get_settings) - getSettings
* [put_settings_value](docs/sdks/organizationsettings/README.md#put_settings_value) - putSettingsValue
<!-- End Available Resources and Operations [operations] -->

<!-- Start Error Handling [errors] -->
## Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.

| Error Object | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.SDKError | 4xx-5xx | */* |

### Example

```python
import epilot
from epilot.models import errors

s = epilot.Epilot(
epilot_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = None
try:
res = s.organization.get_organization(org_id='739224')
except errors.SDKError as e:
# handle exception
raise(e)

if res.organization is not None:
# handle response
pass

```
<!-- End Error Handling [errors] -->

<!-- Start Server Selection [server] -->
## Server Selection

### Select Server by Index

You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

| # | Server | Variables |
| - | ------ | --------- |
| 0 | `https://organization-v2.sls.epilot.io` | None |

#### Example

```python
import epilot
from epilot.models import operations, shared

s = epilot.Epilot(
security=shared.Security(
epilot_auth="Bearer YOUR_BEARER_TOKEN_HERE",
),
server_idx=0,
epilot_auth="<YOUR_BEARER_TOKEN_HERE>",
)


req = operations.GetOrganizationRequest(
org_id="739224",
res = s.organization.get_organization(org_id='739224')

if res.organization is not None:
# handle response
pass

```


### Override Server URL Per-Client

The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
```python
import epilot

s = epilot.Epilot(
server_url="https://organization-v2.sls.epilot.io",
epilot_auth="<YOUR_BEARER_TOKEN_HERE>",
)

res = s.organization.get_organization(req)


res = s.organization.get_organization(org_id='739224')

if res.organization is not None:
# handle response
pass

```
<!-- End SDK Example Usage -->
<!-- End Server Selection [server] -->

<!-- Start SDK Available Operations -->
## SDK Available Operations
<!-- Start Custom HTTP Client [http-client] -->
## Custom HTTP Client

The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.

### organization
For example, you could specify a header for every request that this sdk makes as follows:
```python
import epilot
import requests

http_client = requests.Session()
http_client.headers.update({'x-custom-header': 'someValue'})
s = epilot.Epilot(client=http_client)
```
<!-- End Custom HTTP Client [http-client] -->

<!-- Start Authentication [security] -->
## Authentication

### Per-Client Security Schemes

This SDK supports the following security scheme globally:

| Name | Type | Scheme |
| ------------- | ------------- | ------------- |
| `epilot_auth` | http | HTTP Bearer |

To authenticate with the API the `epilot_auth` parameter must be set when initializing the SDK client instance. For example:
```python
import epilot

s = epilot.Epilot(
epilot_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.organization.get_organization(org_id='739224')

if res.organization is not None:
# handle response
pass

```
<!-- End Authentication [security] -->

* `get_organization` - getOrganization
* `update_organization` - updateOrganization
<!-- Placeholder for Future Speakeasy SDK Sections -->

### organization_settings

* `delete_settings_value` - deleteSettingsValue
* `get_settings` - getSettings
* `put_settings_value` - putSettingsValue
<!-- End SDK Available Operations -->

### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)
10 changes: 9 additions & 1 deletion organization/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,12 @@ Based on:
### Changes
Based on:
- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/organization-v2.yaml
- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy
- Speakeasy CLI 1.19.2 (2.16.5) https://github.com/speakeasy-api/speakeasy

## 2024-04-24 00:01:42
### Changes
Based on:
- OpenAPI Doc 1.0.0 https://docs.api.epilot.io/organization-v2.yaml
- Speakeasy CLI 1.271.0 (2.312.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v1.3.0] organization
17 changes: 6 additions & 11 deletions organization/USAGE.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<!-- Start SDK Example Usage -->
<!-- Start SDK Example Usage [usage] -->
```python
import epilot
from epilot.models import operations, shared

s = epilot.Epilot(
security=shared.Security(
epilot_auth="Bearer YOUR_BEARER_TOKEN_HERE",
),
epilot_auth="<YOUR_BEARER_TOKEN_HERE>",
)


req = operations.GetOrganizationRequest(
org_id="739224",
)

res = s.organization.get_organization(req)
res = s.organization.get_organization(org_id='739224')

if res.organization is not None:
# handle response
pass

```
<!-- End SDK Example Usage -->
<!-- End SDK Example Usage [usage] -->
12 changes: 12 additions & 0 deletions organization/docs/models/components/address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Address


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `city` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `country` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `postal_code` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `street` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `street_number` | *Optional[str]* | :heavy_minus_sign: | N/A |
9 changes: 9 additions & 0 deletions organization/docs/models/components/httpmetadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# HTTPMetadata


## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `response` | [requests.Response](https://requests.readthedocs.io/en/latest/api/#requests.Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
| `request` | [requests.Request](https://requests.readthedocs.io/en/latest/api/#requests.Request) | :heavy_check_mark: | Raw HTTP request; suitable for debugging |
22 changes: 22 additions & 0 deletions organization/docs/models/components/organization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Organization


## Fields

| Field | Type | Required | Description | Example |
| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| `address` | [Optional[components.Address]](../../models/components/address.md) | :heavy_minus_sign: | N/A | |
| `email` | *Optional[str]* | :heavy_minus_sign: | N/A | [email protected] |
| `free_user_limit` | *Optional[float]* | :heavy_minus_sign: | N/A | 50 |
| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | 739224 |
| `is_unlicensed_org` | *Optional[bool]* | :heavy_minus_sign: | N/A | false |
| `logo_thumbnail_url` | *Optional[str]* | :heavy_minus_sign: | N/A | https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png |
| `logo_url` | *Optional[str]* | :heavy_minus_sign: | N/A | https://epilot-playground-organization-data.s3.eu-central-1.amazonaws.com/epilot-logo.png |
| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | Epilot |
| `phone` | *Optional[str]* | :heavy_minus_sign: | N/A | 49123123123 |
| `pricing_tier` | *Optional[str]* | :heavy_minus_sign: | N/A | professional |
| `signature` | *Optional[str]* | :heavy_minus_sign: | N/A | <p>Thanks</p> |
| `style` | Dict[str, *Any*] | :heavy_minus_sign: | Organization style setting (e.g. font setting) | |
| `symbol` | *Optional[str]* | :heavy_minus_sign: | N/A | EPI |
| `type` | [Optional[components.Type]](../../models/components/type.md) | :heavy_minus_sign: | N/A | |
| `website` | *Optional[str]* | :heavy_minus_sign: | N/A | https://epilot.cloud |
Loading