@corti/sdk 1.0.0-rc.2 → 1.0.0-rc.4

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.
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@corti/sdk",
46
- "X-Fern-SDK-Version": "1.0.0-rc.2",
47
- "User-Agent": "@corti/sdk/1.0.0-rc.2",
46
+ "X-Fern-SDK-Version": "1.0.0-rc.4",
47
+ "User-Agent": "@corti/sdk/1.0.0-rc.4",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  "Tenant-Name": options === null || options === void 0 ? void 0 : options.tenantName,
@@ -67,7 +67,9 @@ class CortiAuth extends Client_js_1.AuthClient {
67
67
  constructor(options) {
68
68
  var _a;
69
69
  const { environment, tenantName } = options, rest = __rest(options, ["environment", "tenantName"]);
70
- super(Object.assign(Object.assign({}, rest), { tenantName: "", environment: (0, environment_js_1.getEnvironment)(environment), token: (_a = options.token) !== null && _a !== void 0 ? _a : (() => "") }));
70
+ super(Object.assign(Object.assign({}, rest), {
71
+ // @ts-expect-error it suppose to be required, but we need to filter out header without rewriting too much
72
+ tenantName: null, environment: (0, environment_js_1.getEnvironment)(environment), token: (_a = options.token) !== null && _a !== void 0 ? _a : (() => "") }));
71
73
  this._tenantName = tenantName;
72
74
  this._options.authProvider = new core.NoOpAuthProvider();
73
75
  /** Stripping Fern headers to bypass CORS on authentication requests */
@@ -172,7 +174,7 @@ class CortiAuth extends Client_js_1.AuthClient {
172
174
  authorizeURL(_a, options_1) {
173
175
  return __awaiter(this, arguments, void 0, function* ({ clientId, redirectUri, codeChallenge, scopes }, options) {
174
176
  const envUrls = yield core.Supplier.get(this._options.environment);
175
- const tenantName = yield core.Supplier.get(this._options.tenantName);
177
+ const tenantName = yield core.Supplier.get(this._tenantName);
176
178
  const authUrl = new URL(core.url.join(envUrls.login, tenantName, "protocol/openid-connect/auth"));
177
179
  authUrl.searchParams.set("response_type", "code");
178
180
  const allScopes = ["openid", "profile", ...(scopes !== null && scopes !== void 0 ? scopes : [])];
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.0-rc.2";
1
+ export declare const SDK_VERSION = "1.0.0-rc.4";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.0.0-rc.2";
4
+ exports.SDK_VERSION = "1.0.0-rc.4";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@corti/sdk",
9
- "X-Fern-SDK-Version": "1.0.0-rc.2",
10
- "User-Agent": "@corti/sdk/1.0.0-rc.2",
9
+ "X-Fern-SDK-Version": "1.0.0-rc.4",
10
+ "User-Agent": "@corti/sdk/1.0.0-rc.4",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  "Tenant-Name": options === null || options === void 0 ? void 0 : options.tenantName,
@@ -31,7 +31,9 @@ export class CortiAuth extends AuthClient {
31
31
  constructor(options) {
32
32
  var _a;
33
33
  const { environment, tenantName } = options, rest = __rest(options, ["environment", "tenantName"]);
34
- super(Object.assign(Object.assign({}, rest), { tenantName: "", environment: getEnvironment(environment), token: (_a = options.token) !== null && _a !== void 0 ? _a : (() => "") }));
34
+ super(Object.assign(Object.assign({}, rest), {
35
+ // @ts-expect-error it suppose to be required, but we need to filter out header without rewriting too much
36
+ tenantName: null, environment: getEnvironment(environment), token: (_a = options.token) !== null && _a !== void 0 ? _a : (() => "") }));
35
37
  this._tenantName = tenantName;
36
38
  this._options.authProvider = new core.NoOpAuthProvider();
37
39
  /** Stripping Fern headers to bypass CORS on authentication requests */
@@ -136,7 +138,7 @@ export class CortiAuth extends AuthClient {
136
138
  authorizeURL(_a, options_1) {
137
139
  return __awaiter(this, arguments, void 0, function* ({ clientId, redirectUri, codeChallenge, scopes }, options) {
138
140
  const envUrls = yield core.Supplier.get(this._options.environment);
139
- const tenantName = yield core.Supplier.get(this._options.tenantName);
141
+ const tenantName = yield core.Supplier.get(this._tenantName);
140
142
  const authUrl = new URL(core.url.join(envUrls.login, tenantName, "protocol/openid-connect/auth"));
141
143
  authUrl.searchParams.set("response_type", "code");
142
144
  const allScopes = ["openid", "profile", ...(scopes !== null && scopes !== void 0 ? scopes : [])];
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.0-rc.2";
1
+ export declare const SDK_VERSION = "1.0.0-rc.4";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.0-rc.2";
1
+ export const SDK_VERSION = "1.0.0-rc.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corti/sdk",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.4",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",