@corti/sdk 0.1.2-rc → 0.1.2-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -100,9 +100,9 @@ class CortiClient {
100
100
  "X-Fern-Runtime-Version": core.RUNTIME.version,
101
101
  }, _options === null || _options === void 0 ? void 0 : _options.headers), clientId: "clientId" in _options.auth ? _options.auth.clientId : undefined, clientSecret: "clientSecret" in _options.auth ? _options.auth.clientSecret : undefined, token: "accessToken" in _options.auth ? _options.auth.accessToken : undefined, environment: (0, getEnvironmentFromString_js_1.getEnvironment)(_options.environment) });
102
102
  /**
103
- * Patch: if `accessToken` is provided, use BearerProvider, otherwise use OAuthTokenProvider
103
+ * Patch: if `clientId` is provided, use OAuthTokenProvider, otherwise use BearerProvider
104
104
  */
105
- this._oauthTokenProvider = "clientSecret" in _options.auth ?
105
+ this._oauthTokenProvider = "clientId" in _options.auth ?
106
106
  new core.OAuthTokenProvider({
107
107
  clientId: _options.auth.clientId,
108
108
  clientSecret: _options.auth.clientSecret,
@@ -64,9 +64,9 @@ export class CortiClient {
64
64
  "X-Fern-Runtime-Version": core.RUNTIME.version,
65
65
  }, _options === null || _options === void 0 ? void 0 : _options.headers), clientId: "clientId" in _options.auth ? _options.auth.clientId : undefined, clientSecret: "clientSecret" in _options.auth ? _options.auth.clientSecret : undefined, token: "accessToken" in _options.auth ? _options.auth.accessToken : undefined, environment: getEnvironment(_options.environment) });
66
66
  /**
67
- * Patch: if `accessToken` is provided, use BearerProvider, otherwise use OAuthTokenProvider
67
+ * Patch: if `clientId` is provided, use OAuthTokenProvider, otherwise use BearerProvider
68
68
  */
69
- this._oauthTokenProvider = "clientSecret" in _options.auth ?
69
+ this._oauthTokenProvider = "clientId" in _options.auth ?
70
70
  new core.OAuthTokenProvider({
71
71
  clientId: _options.auth.clientId,
72
72
  clientSecret: _options.auth.clientSecret,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corti/sdk",
3
- "version": "0.1.2-rc",
3
+ "version": "0.1.2-rc.1",
4
4
  "private": false,
5
5
  "repository": "github:corticph/corti-sdk-javascript",
6
6
  "license": "MIT",