Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.438.1
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot authored and frankie567 committed Nov 13, 2024
1 parent c995730 commit 28bc4d2
Show file tree
Hide file tree
Showing 175 changed files with 2,415 additions and 1,746 deletions.
137 changes: 82 additions & 55 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
python:
version: 0.7.2
version: 0.8.0
additionalDependencies:
dev: {}
main: {}
authors:
- Polar
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKError
description: Polar SDK for Python
enumFormat: enum
fixFlags:
Expand Down
15 changes: 10 additions & 5 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
speakeasyVersion: 1.431.0
speakeasyVersion: 1.438.1
sources:
Polar-OAS:
sourceNamespace: polar-oas
sourceRevisionDigest: sha256:24ce22f912266c290b90a984be308b37c71712a60a136bd2a24fbe08555eec7d
sourceBlobDigest: sha256:0e4a2d08c7f1223110e726f0037614363ba877289fef1c97a1a12fd3d5a7dc59
sourceRevisionDigest: sha256:4c8f6dea674031cefb5b638d589e7903c000e0f44ffbf6046027cbc0ba9dda55
sourceBlobDigest: sha256:0f5b5388af51c8cea34904ea7acce013ecca69a2afb75886d9f134e135a365bd
tags:
- latest
- main
targets:
polar:
source: Polar-OAS
sourceNamespace: polar-oas
sourceRevisionDigest: sha256:24ce22f912266c290b90a984be308b37c71712a60a136bd2a24fbe08555eec7d
sourceBlobDigest: sha256:0e4a2d08c7f1223110e726f0037614363ba877289fef1c97a1a12fd3d5a7dc59
sourceRevisionDigest: sha256:4c8f6dea674031cefb5b638d589e7903c000e0f44ffbf6046027cbc0ba9dda55
sourceBlobDigest: sha256:0f5b5388af51c8cea34904ea7acce013ecca69a2afb75886d9f134e135a365bd
codeSamplesNamespace: polar-oas-code-samples
codeSamplesRevisionDigest: sha256:d980ce7e51397e88d462aed35890accbb2be4d8c18090d89e306bd189fd48ac5
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand All @@ -24,6 +26,7 @@ workflow:
- location: https://raw.githubusercontent.com/polarsource/polar/main/sdk/overlays/security.yml
- location: https://raw.githubusercontent.com/polarsource/polar/main/sdk/overlays/type_parameter.yml
- location: https://raw.githubusercontent.com/polarsource/polar/main/sdk/overlays/product_price_discriminator.yml
- location: https://raw.githubusercontent.com/polarsource/polar/main/sdk/overlays/read_only.yml
registry:
location: registry.speakeasyapi.dev/polar/polar/polar-oas
targets:
Expand All @@ -35,3 +38,5 @@ workflow:
token: $pypi_token
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/polar/polar/polar-oas-code-samples
2 changes: 2 additions & 0 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ targets:
token: $pypi_token
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/polar/polar/polar-oas-code-samples
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ asyncio.run(main())

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

* [authorize](docs/sdks/oauth2/README.md#authorize) - Authorize
* [token](docs/sdks/oauth2/README.md#token) - Request Token
* [revoke](docs/sdks/oauth2/README.md#revoke) - Revoke Token
* [introspect](docs/sdks/oauth2/README.md#introspect) - Introspect Token
Expand Down Expand Up @@ -335,10 +336,10 @@ By default, an API error will raise a models.SDKError exception, which has the f

When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `list_async` method may raise the following exceptions:

| Error Type | Status Code | Content Type |
| -------------------------- | -------------------------- | -------------------------- |
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | \*/\* |
| Error Type | Status Code | Content Type |
| -------------------------- | ----------- | ---------------- |
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | \*/\* |

### Example

Expand Down Expand Up @@ -377,10 +378,10 @@ except models.SDKError as e:

You can override the default server globally by passing a server name to the `server: str` 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 names associated with the available servers:

| Name | Server | Variables |
| ----- | ------ | --------- |
| `production` | `https://api.polar.sh` | None |
| `sandbox` | `https://sandbox-api.polar.sh` | None |
| Name | Server |
| ------------ | ------------------------------ |
| `production` | `https://api.polar.sh` |
| `sandbox` | `https://sandbox-api.polar.sh` |

#### Example

Expand All @@ -404,7 +405,6 @@ if res is not None:

```


### 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:
Expand Down Expand Up @@ -517,9 +517,9 @@ s = Polar(async_client=CustomClient(httpx.AsyncClient()))

This SDK supports the following security scheme globally:

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

To authenticate with the API the `access_token` parameter must be set when initializing the SDK client instance. For example:
```python
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,4 +293,14 @@ Based on:
### Generated
- [python v0.7.2] .
### Releases
- [PyPI v0.7.2] https://pypi.org/project/polar-sdk/0.7.2 - .
- [PyPI v0.7.2] https://pypi.org/project/polar-sdk/0.7.2 - .

## 2024-11-13 14:20:56
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.438.1 (2.457.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.8.0] .
### Releases
- [PyPI v0.8.0] https://pypi.org/project/polar-sdk/0.8.0 - .
8 changes: 7 additions & 1 deletion codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ actions:
"x-codeSamples":
- "lang": "python"
"label": "create"
"source": "import polar_sdk\nfrom polar_sdk import Polar\n\ns = Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n)\n\nres = s.checkouts.custom.create(request={\n \"payment_processor\": polar_sdk.PaymentProcessor.STRIPE,\n \"product_price_id\": \"<value>\",\n})\n\nif res is not None:\n # handle response\n pass"
"source": "import polar_sdk\nfrom polar_sdk import Polar\n\ns = Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n)\n\nres = s.checkouts.custom.create(request={\n \"payment_processor\": polar_sdk.PolarCheckoutSchemasCheckoutCreatePaymentProcessor.STRIPE,\n \"product_price_id\": \"<value>\",\n})\n\nif res is not None:\n # handle response\n pass"
- target: $["paths"]["/v1/checkouts/custom/client/{client_secret}"]["get"]
update:
"x-codeSamples":
Expand Down Expand Up @@ -285,6 +285,12 @@ actions:
- "lang": "python"
"label": "list"
"source": "from polar_sdk import Polar\n\ns = Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n)\n\nres = s.oauth2.clients.list()\n\nif res is not None:\n while True:\n # handle items\n\n res = res.next()\n if res is None:\n break"
- target: $["paths"]["/v1/oauth2/authorize"]["get"]
update:
"x-codeSamples":
- "lang": "python"
"label": "authorize"
"source": "from polar_sdk import Polar\n\ns = Polar(\n access_token=\"<YOUR_BEARER_TOKEN_HERE>\",\n)\n\nres = s.oauth2.authorize()\n\nif res is not None:\n # handle response\n pass"
- target: $["paths"]["/v1/oauth2/introspect"]["post"]
update:
"x-codeSamples":
Expand Down
10 changes: 10 additions & 0 deletions docs/models/authorizeorganization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# AuthorizeOrganization


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `id` | *str* | :heavy_check_mark: | N/A |
| `slug` | *str* | :heavy_check_mark: | N/A |
| `avatar_url` | *Nullable[str]* | :heavy_check_mark: | N/A |
12 changes: 12 additions & 0 deletions docs/models/authorizeresponseorganization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AuthorizeResponseOrganization


## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `client` | [models.OAuth2ClientPublic](../models/oauth2clientpublic.md) | :heavy_check_mark: | N/A |
| `sub` | [Nullable[models.AuthorizeOrganization]](../models/authorizeorganization.md) | :heavy_check_mark: | N/A |
| `scopes` | List[[models.Scope](../models/scope.md)] | :heavy_check_mark: | N/A |
| `organizations` | List[[models.AuthorizeOrganization](../models/authorizeorganization.md)] | :heavy_check_mark: | N/A |
| `sub_type` | [models.AuthorizeResponseOrganizationSubType](../models/authorizeresponseorganizationsubtype.md) | :heavy_check_mark: | N/A |
8 changes: 8 additions & 0 deletions docs/models/authorizeresponseorganizationsubtype.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# AuthorizeResponseOrganizationSubType


## Values

| Name | Value |
| -------------- | -------------- |
| `ORGANIZATION` | organization |
11 changes: 11 additions & 0 deletions docs/models/authorizeresponseuser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# AuthorizeResponseUser


## Fields

| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `client` | [models.OAuth2ClientPublic](../models/oauth2clientpublic.md) | :heavy_check_mark: | N/A |
| `sub` | [Nullable[models.AuthorizeUser]](../models/authorizeuser.md) | :heavy_check_mark: | N/A |
| `scopes` | List[[models.Scope](../models/scope.md)] | :heavy_check_mark: | N/A |
| `sub_type` | [models.AuthorizeResponseUserSubType](../models/authorizeresponseusersubtype.md) | :heavy_check_mark: | N/A |
8 changes: 8 additions & 0 deletions docs/models/authorizeresponseusersubtype.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# AuthorizeResponseUserSubType


## Values

| Name | Value |
| ------ | ------ |
| `USER` | user |
4 changes: 2 additions & 2 deletions docs/models/donationuser.md → docs/models/authorizeuser.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# DonationUser
# AuthorizeUser


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `id` | *str* | :heavy_check_mark: | N/A |
| `public_name` | *str* | :heavy_check_mark: | N/A |
| `email` | *str* | :heavy_check_mark: | N/A |
| `avatar_url` | *Nullable[str]* | :heavy_check_mark: | N/A |
20 changes: 0 additions & 20 deletions docs/models/benefitdiscordinput.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/models/benefitdiscordpropertiesinput.md

This file was deleted.

Loading

0 comments on commit 28bc4d2

Please sign in to comment.