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 3a04529 commit 1dec59d
Show file tree
Hide file tree
Showing 464 changed files with 5,735 additions and 5,115 deletions.
138 changes: 83 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,14 +16,15 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: false
typescript:
version: 0.15.1
version: 0.16.0
additionalDependencies:
dependencies: {}
devDependencies: {}
peerDependencies: {}
additionalPackageJSON: {}
author: Speakeasy
clientServerStatusCodesAsErrors: true
defaultErrorName: SDKError
enumFormat: union
envVarPrefix: POLAR
flattenGlobalSecurity: true
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:f42da804fd4b2c4d782ed454d174adb8316fdc986e50245ae703e445020b1b76
sourceBlobDigest: sha256:0e4a2d08c7f1223110e726f0037614363ba877289fef1c97a1a12fd3d5a7dc59
sourceRevisionDigest: sha256:4df6842813b1d54baedbb25f874738d0e3c669760833f3b457579ba69a12a8e4
sourceBlobDigest: sha256:0f5b5388af51c8cea34904ea7acce013ecca69a2afb75886d9f134e135a365bd
tags:
- latest
- main
targets:
polar:
source: Polar-OAS
sourceNamespace: polar-oas
sourceRevisionDigest: sha256:f42da804fd4b2c4d782ed454d174adb8316fdc986e50245ae703e445020b1b76
sourceBlobDigest: sha256:0e4a2d08c7f1223110e726f0037614363ba877289fef1c97a1a12fd3d5a7dc59
sourceRevisionDigest: sha256:4df6842813b1d54baedbb25f874738d0e3c669760833f3b457579ba69a12a8e4
sourceBlobDigest: sha256:0f5b5388af51c8cea34904ea7acce013ecca69a2afb75886d9f134e135a365bd
codeSamplesNamespace: polar-oas-code-samples
codeSamplesRevisionDigest: sha256:75cc7be78a96633fb0659d25db90c457df8c0fac82a428524a1fadb33d3a8699
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: $npm_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: $npm_token
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/polar/polar/polar-oas-code-samples
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ run();

### [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 @@ -344,6 +345,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
- [`licenseKeysUpdate`](docs/sdks/licensekeys/README.md#update) - Update License Key
- [`metricsGet`](docs/sdks/metrics/README.md#get) - Get Metrics
- [`metricsLimits`](docs/sdks/metrics/README.md#limits) - Get Metrics Limits
- [`oauth2Authorize`](docs/sdks/oauth2/README.md#authorize) - Authorize
- [`oauth2ClientsCreate`](docs/sdks/clients/README.md#create) - Create Client
- [`oauth2ClientsDelete`](docs/sdks/clients/README.md#delete) - Delete Client
- [`oauth2ClientsGet`](docs/sdks/clients/README.md#get) - Get Client
Expand Down Expand Up @@ -517,10 +519,10 @@ If a HTTP request fails, an operation my also throw an error from the `models/er

In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `list` method may throw the following errors:

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

```typescript
import { Polar } from "@polar-sh/sdk";
Expand Down Expand Up @@ -575,12 +577,14 @@ Validation errors can also occur when either method arguments or data returned f

### Select Server by Name

You can override the default server globally by passing a server name to the `server` 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:
You can override the default server globally by passing a server name to the `server: keyof typeof ServerList` 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

```typescript
import { Polar } from "@polar-sh/sdk";
Expand All @@ -603,11 +607,9 @@ run();

```


### Override Server URL Per-Client

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

The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
```typescript
import { Polar } from "@polar-sh/sdk";

Expand Down Expand Up @@ -686,9 +688,9 @@ const sdk = new Polar({ httpClient });

This SDK supports the following security scheme globally:

| Name | Type | Scheme | Environment Variable |
| -------------------- | -------------------- | -------------------- | -------------------- |
| `accessToken` | http | HTTP Bearer | `POLAR_ACCESS_TOKEN` |
| Name | Type | Scheme | Environment Variable |
| ------------- | ---- | ----------- | -------------------- |
| `accessToken` | http | HTTP Bearer | `POLAR_ACCESS_TOKEN` |

To authenticate with the API the `accessToken` parameter must be set when initializing the SDK client instance. For example:
```typescript
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,14 @@ Based on:
### Generated
- [typescript v0.15.1] .
### Releases
- [NPM v0.15.1] https://www.npmjs.com/package/@polar-sh/sdk/v/0.15.1 - .
- [NPM v0.15.1] https://www.npmjs.com/package/@polar-sh/sdk/v/0.15.1 - .

## 2024-11-13 14:21:07
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.438.1 (2.457.2) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.16.0] .
### Releases
- [NPM v0.16.0] https://www.npmjs.com/package/@polar-sh/sdk/v/0.16.0 - .
6 changes: 6 additions & 0 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ actions:
- "lang": "typescript"
"label": "list"
"source": "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n const result = await polar.oauth2.clients.list({});\n\n for await (const page of result) {\n // Handle the page\n console.log(page);\n }\n}\n\nrun();"
- target: $["paths"]["/v1/oauth2/authorize"]["get"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "authorize"
"source": "import { Polar } from \"@polar-sh/sdk\";\n\nconst polar = new Polar({\n accessToken: process.env[\"POLAR_ACCESS_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n const result = await polar.oauth2.authorize();\n\n // Handle the result\n console.log(result);\n}\n\nrun();"
- target: $["paths"]["/v1/oauth2/introspect"]["post"]
update:
"x-codeSamples":
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/address.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { Address } from "@polar-sh/sdk/models/components";

let value: Address = {
country: "Italy",
country: "Netherlands",
};
```

Expand Down
10 changes: 5 additions & 5 deletions docs/models/components/advertisementcampaign.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import { AdvertisementCampaign } from "@polar-sh/sdk/models/components";

let value: AdvertisementCampaign = {
createdAt: new Date("2023-07-24T07:58:55.379Z"),
modifiedAt: new Date("2023-08-15T05:41:44.857Z"),
createdAt: new Date("2023-05-29T14:57:16.680Z"),
modifiedAt: new Date("2022-10-03T22:43:14.073Z"),
id: "<value>",
imageUrl: "https://short-term-mentor.info",
imageUrlDark: "https://clean-essence.net/",
imageUrl: "https://basic-emergent.net",
imageUrlDark: "https://alienated-metal.biz",
text: "<value>",
linkUrl: "https://competent-bid.org/",
linkUrl: "https://spherical-cauliflower.info",
};
```

Expand Down
16 changes: 8 additions & 8 deletions docs/models/components/advertisementcampaignlistresource.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ import { AdvertisementCampaignListResource } from "@polar-sh/sdk/models/componen
let value: AdvertisementCampaignListResource = {
items: [
{
createdAt: new Date("2023-03-04T12:05:11.807Z"),
modifiedAt: new Date("2022-11-29T03:56:04.500Z"),
createdAt: new Date("2022-03-16T23:12:57.117Z"),
modifiedAt: new Date("2024-12-22T15:39:21.636Z"),
id: "<value>",
imageUrl: "https://lovely-sandbar.net/",
imageUrlDark: "https://unfit-assist.org",
imageUrl: "https://trivial-ostrich.biz",
imageUrlDark: "https://awesome-moment.info",
text: "<value>",
linkUrl: "https://digital-vision.net/",
linkUrl: "https://alienated-governance.info",
},
],
pagination: {
totalCount: 929724,
maxPage: 523154,
totalCount: 152359,
maxPage: 414720,
},
dimensions: [
747742,
910478,
],
};
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/advertisementsortproperty.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
```typescript
import { AdvertisementSortProperty } from "@polar-sh/sdk/models/components";

let value: AdvertisementSortProperty = "-created_at";
let value: AdvertisementSortProperty = "-granted_at";
```

## Values
Expand Down
27 changes: 13 additions & 14 deletions docs/models/components/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,39 @@ let value: Article = {
body: "<value>",
byline: {
name: "<value>",
avatarUrl: "https://witty-scenario.com/",
avatarUrl: "https://unwieldy-vision.name/",
},
visibility: "hidden",
userId: "<value>",
organizationId: "<value>",
organization: {
createdAt: new Date("2023-06-22T00:09:40.274Z"),
modifiedAt: new Date("2022-07-19T21:06:20.014Z"),
createdAt: new Date("2024-01-25T11:17:56.076Z"),
modifiedAt: new Date("2022-01-18T01:14:03.818Z"),
id: "<value>",
name: "<value>",
slug: "<value>",
avatarUrl: "https://tempting-accelerator.com",
avatarUrl: "https://hoarse-sonnet.biz/",
bio: "<value>",
company: "Wyman - Jakubowski",
company: "Hoeger - Flatley",
blog: "<value>",
location: "<value>",
email: "Bo53@gmail.com",
email: "Grayson.Rice@gmail.com",
twitterUsername: "<value>",
pledgeMinimumAmount: 318150,
pledgeMinimumAmount: 646822,
pledgeBadgeShowAmount: false,
defaultUpfrontSplitToContributors: 639855,
donationsEnabled: false,
defaultUpfrontSplitToContributors: 887921,
profileSettings: {},
featureSettings: {},
},
publishedAt: new Date("2024-03-18T13:58:56.966Z"),
publishedAt: new Date("2022-06-06T17:12:12.382Z"),
paidSubscribersOnly: false,
paidSubscribersOnlyEndsAt: new Date("2023-09-23T21:51:50.742Z"),
paidSubscribersOnlyEndsAt: new Date("2024-06-13T14:44:19.237Z"),
isPreview: false,
isPinned: false,
notifySubscribers: false,
notificationsSentAt: new Date("2022-07-04T22:19:31.096Z"),
emailSentToCount: 985905,
ogImageUrl: "https://lustrous-offset.net",
notificationsSentAt: new Date("2023-10-31T06:09:51.790Z"),
emailSentToCount: 29242,
ogImageUrl: "https://mysterious-sediment.info",
ogDescription: "<value>",
};
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/articlepreview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { ArticlePreview } from "@polar-sh/sdk/models/components";

let value: ArticlePreview = {
email: "Kali.Schultz@hotmail.com",
email: "Berneice16@hotmail.com",
};
```

Expand Down
6 changes: 3 additions & 3 deletions docs/models/components/articlereceivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import { ArticleReceivers } from "@polar-sh/sdk/models/components";

let value: ArticleReceivers = {
freeSubscribers: 554289,
premiumSubscribers: 500494,
organizationMembers: 58582,
freeSubscribers: 666805,
premiumSubscribers: 821345,
organizationMembers: 426397,
};
```

Expand Down
8 changes: 4 additions & 4 deletions docs/models/components/assignee.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import { Assignee } from "@polar-sh/sdk/models/components";

let value: Assignee = {
id: 706309,
login: "Wilford.Bogisich78",
htmlUrl: "https://raw-farm.net/",
avatarUrl: "https://sweet-marimba.info",
id: 838479,
login: "Rafaela_Smith",
htmlUrl: "https://terrible-provision.net",
avatarUrl: "https://pitiful-avalanche.biz/",
};
```

Expand Down
6 changes: 3 additions & 3 deletions docs/models/components/attachedcustomfield.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { AttachedCustomField } from "@polar-sh/sdk/models/components";
let value: AttachedCustomField = {
customFieldId: "<value>",
customField: {
createdAt: new Date("2023-05-30T01:41:52.063Z"),
modifiedAt: new Date("2022-06-22T02:05:53.320Z"),
createdAt: new Date("2023-10-31T04:19:03.850Z"),
modifiedAt: new Date("2024-01-14T05:30:11.757Z"),
id: "<value>",
metadata: {
"key": "<value>",
Expand All @@ -21,7 +21,7 @@ let value: AttachedCustomField = {
organizationId: "<value>",
properties: {},
},
order: 241568,
order: 756641,
required: false,
};
```
Expand Down
8 changes: 4 additions & 4 deletions docs/models/components/author.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import { Author } from "@polar-sh/sdk/models/components";

let value: Author = {
id: 618463,
login: "Christy_Schuppe",
htmlUrl: "https://kooky-deduction.biz/",
avatarUrl: "https://raw-waist.com",
id: 202789,
login: "Gia84",
htmlUrl: "https://exhausted-disadvantage.info/",
avatarUrl: "https://noxious-minority.org",
};
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# DonationUser
# AuthorizeOrganization

## Example Usage

```typescript
import { DonationUser } from "@polar-sh/sdk/models/components";
import { AuthorizeOrganization } from "@polar-sh/sdk/models/components";

let value: DonationUser = {
let value: AuthorizeOrganization = {
id: "<value>",
publicName: "<value>",
avatarUrl: "https://bustling-coil.com/",
slug: "<value>",
avatarUrl: "https://private-outrun.com/",
};
```

Expand All @@ -17,5 +17,5 @@ let value: DonationUser = {
| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `id` | *string* | :heavy_check_mark: | N/A |
| `publicName` | *string* | :heavy_check_mark: | N/A |
| `slug` | *string* | :heavy_check_mark: | N/A |
| `avatarUrl` | *string* | :heavy_check_mark: | N/A |
Loading

0 comments on commit 1dec59d

Please sign in to comment.