Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 3.0.1, Speakeasy CLI 1.134.1
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Jan 11, 2024
1 parent 40424ef commit 52f4cbe
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 105 deletions.
8 changes: 3 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 79fa0df9-852a-493c-b998-1d82654b5f18
management:
docChecksum: 62753fde5be1f94d492210a95b671a45
docChecksum: 6ed50c0a738674fc6881ca1e83500d6f
docVersion: 3.0.1
speakeasyVersion: internal
generationVersion: 2.230.3
releaseVersion: 0.4.0
configChecksum: d65c440b4991499653ecbe5ea753d142
releaseVersion: 0.4.1
configChecksum: e568a802b1b0da51419990f6313728eb
repoURL: https://github.com/BoltApp/Bolt-Typescript-SDK.git
repoSubDirectory: .
installationURL: https://github.com/BoltApp/Bolt-Typescript-SDK
Expand Down Expand Up @@ -137,8 +137,6 @@ generatedFiles:
- docs/models/components/dottag.md
- docs/models/components/paymentactionrequest.md
- docs/models/components/paymentinitializerequest.md
- docs/models/components/refreshtokenscope.md
- docs/models/components/getaccesstokenresponsescope.md
- docs/models/components/getaccesstokenresponse.md
- docs/models/components/granttype.md
- docs/models/components/scope.md
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,14 @@ Based on:
### Generated
- [typescript v0.4.0] .
### Releases
- [NPM v0.4.0] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.4.0 - .
- [NPM v0.4.0] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.4.0 - .

## 2024-01-11 01:13:19
### Changes
Based on:
- OpenAPI Doc 3.0.1
- Speakeasy CLI 1.134.1 (2.230.3) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.4.1] .
### Releases
- [NPM v0.4.1] https://www.npmjs.com/package/@boltpay/bolt-typescript-sdk/v/0.4.1 - .
16 changes: 8 additions & 8 deletions docs/models/components/getaccesstokenrequest.md

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions docs/models/components/getaccesstokenresponse.md

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions docs/models/components/getaccesstokenresponsescope.md

This file was deleted.

5 changes: 1 addition & 4 deletions docs/models/components/granttype.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# GrantType

The type of OAuth 2.0 grant being utilized.

The value will always be `authorization_code` when exchanging an authorization code for an access token.

The type of OAuth 2.0 grant being utilized. The only supported grant is `authorization_code`.


## Values
Expand Down
10 changes: 0 additions & 10 deletions docs/models/components/refreshtokenscope.md

This file was deleted.

7 changes: 4 additions & 3 deletions docs/sdks/oauth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ async function run() {
});

const res = await sdk.oAuth.getToken({
code: "string",
clientId: "string",
clientSecret: "string",
code: "7GSjMRSHs6Ak7C_zvVW6P2IhZOHxMK7HZKW1fMX85ms",
clientId: "8fd9diIy59sj.IraJdeIgmdsO.fd233434fg2c616cgo932aa6e1e4fc627a9385045gr395222a127gi93c595rg4",
clientSecret: "23ee7ec7301779eaff451d7c6f6cba322499e3c0ec752f800c72a8f99217e3a8",
grantType: GrantType.AuthorizationCode,
scope: [
Scope.BoltAccountManage,
],
state: "xyzABC123",
});

if (res?.statusCode !== 200) {
Expand Down
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ generation:
fixes:
nameResolutionDec2023: false
typescript:
version: 0.4.0
version: 0.4.1
author: BoltPublicAPI
clientServerStatusCodesAsErrors: true
flattenGlobalSecurity: true
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "commonjs",
"name": "@boltpay/bolt-typescript-sdk",
"version": "0.4.0",
"version": "0.4.1",
"author": "BoltPublicAPI",
"main": "./index.js",
"sideEffects": false,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL {
export const SDK_METADATA = Object.freeze({
language: "typescript",
openapiDocVersion: "3.0.1",
sdkVersion: "0.4.0",
sdkVersion: "0.4.1",
genVersion: "2.230.3",
userAgent: "speakeasy-sdk/typescript 0.4.0 2.230.3 3.0.1 @boltpay/bolt-typescript-sdk",
userAgent: "speakeasy-sdk/typescript 0.4.1 2.230.3 3.0.1 @boltpay/bolt-typescript-sdk",
});
35 changes: 17 additions & 18 deletions src/models/components/getaccesstokenrequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
import { z } from "zod";

/**
* The type of OAuth 2.0 grant being utilized.
*
* @remarks
*
* The value will always be `authorization_code` when exchanging an authorization code for an access token.
*
* The type of OAuth 2.0 grant being utilized. The only supported grant is `authorization_code`.
*/
export enum GrantType {
AuthorizationCode = "authorization_code",
Expand All @@ -28,34 +23,38 @@ export type GetAccessTokenRequest = {
*/
code: string;
/**
* Merchant publishable key which can be found in the merchant dashboard
* The OAuth client ID, which corresponds to the merchant publishable key, which can be retrieved
*
* @remarks
* in the Merchant Dashboard.
*
*/
clientId: string;
/**
* Your Bolt API Key.
*/
clientSecret: string;
/**
* The type of OAuth 2.0 grant being utilized.
* The OAuth client secret, which corresponds the merchant API key, which can be retrieved in the
*
* @remarks
*
* The value will always be `authorization_code` when exchanging an authorization code for an access token.
* Merchant Dashboard.
*
*/
clientSecret: string;
/**
* The type of OAuth 2.0 grant being utilized. The only supported grant is `authorization_code`.
*/
grantType: GrantType;
/**
* The scope issued to the merchant when receiving an authorization code.
*
* @remarks
* Options include `bolt.account.manage`, `bolt.account.view`, `openid`.
* You can find more information on these options in our
* [OAuth scope documentation](https://help.bolt.com/developers/references/bolt-oauth/#scopes).
*
*/
scope: Array<Scope>;
/**
* A randomly generated string issued to the merchant when receiving an authorization code used to prevent CSRF attacks
* A randomly generated string sent along with an authorization code. This must be included, if provided,
*
* @remarks
* in order to prevent CSRF attacks. used to prevent CSRF attacks.
*
*/
state?: string | undefined;
};
Expand Down
44 changes: 13 additions & 31 deletions src/models/components/getaccesstokenresponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@

import { z } from "zod";

export enum RefreshTokenScope {
BoltAccountManage = "bolt.account.manage",
BoltAccountView = "bolt.account.view",
Openid = "openid",
}

export enum GetAccessTokenResponseScope {
BoltAccountManage = "bolt.account.manage",
BoltAccountView = "bolt.account.view",
Openid = "openid",
}

export type GetAccessTokenResponse = {
/**
* A JWT token issued when the request includes the scope open_id.
Expand All @@ -26,46 +14,40 @@ export type GetAccessTokenResponse = {
*/
accessToken?: string | undefined;
/**
* Access tokens expiration in seconds.
* The access token's expiration, in seconds.
*/
expiresIn?: number | undefined;
/**
* A refresh token you can use to issue a brand new access token without obtaining a new authorization code.
*/
refreshToken?: string | undefined;
/**
* The scope granted to the refresh token. Currently this will always be bolt.account.view.
* The scope granted to the refresh token. Currently, refreshed token will only grant view permissions.
*/
refreshTokenScope?: Array<RefreshTokenScope> | undefined;
refreshTokenScope?: string | undefined;
/**
* The scope granted to access token, depending on the scope granted to the authorization code as well as the scope parameter.
*
* @remarks
* Options include `bolt.account.manage`, `bolt.account.view`, `openid`.'
* Options include `bolt.account.manage`, `bolt.account.view`, `openid`. Multiple values can be returned as space-separated strings.
*
*/
scope?: Array<GetAccessTokenResponseScope> | undefined;
scope?: string | undefined;
/**
* The token_type will always be bearer.
*/
tokenType?: string | undefined;
};

/** @internal */
export const RefreshTokenScope$ = z.nativeEnum(RefreshTokenScope);

/** @internal */
export const GetAccessTokenResponseScope$ = z.nativeEnum(GetAccessTokenResponseScope);

/** @internal */
export namespace GetAccessTokenResponse$ {
export type Inbound = {
id_token?: string | undefined;
access_token?: string | undefined;
expires_in?: number | undefined;
refresh_token?: string | undefined;
refresh_token_scope?: Array<RefreshTokenScope> | undefined;
scope?: Array<GetAccessTokenResponseScope> | undefined;
refresh_token_scope?: string | undefined;
scope?: string | undefined;
token_type?: string | undefined;
};

Expand All @@ -75,8 +57,8 @@ export namespace GetAccessTokenResponse$ {
access_token: z.string().optional(),
expires_in: z.number().int().optional(),
refresh_token: z.string().optional(),
refresh_token_scope: z.array(RefreshTokenScope$).optional(),
scope: z.array(GetAccessTokenResponseScope$).optional(),
refresh_token_scope: z.string().optional(),
scope: z.string().optional(),
token_type: z.string().optional(),
})
.transform((v) => {
Expand All @@ -98,8 +80,8 @@ export namespace GetAccessTokenResponse$ {
access_token?: string | undefined;
expires_in?: number | undefined;
refresh_token?: string | undefined;
refresh_token_scope?: Array<RefreshTokenScope> | undefined;
scope?: Array<GetAccessTokenResponseScope> | undefined;
refresh_token_scope?: string | undefined;
scope?: string | undefined;
token_type?: string | undefined;
};

Expand All @@ -109,8 +91,8 @@ export namespace GetAccessTokenResponse$ {
accessToken: z.string().optional(),
expiresIn: z.number().int().optional(),
refreshToken: z.string().optional(),
refreshTokenScope: z.array(RefreshTokenScope$).optional(),
scope: z.array(GetAccessTokenResponseScope$).optional(),
refreshTokenScope: z.string().optional(),
scope: z.string().optional(),
tokenType: z.string().optional(),
})
.transform((v) => {
Expand Down

0 comments on commit 52f4cbe

Please sign in to comment.