@truefoundry/trueforge-sdk 0.1.1 → 0.1.2

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": "@truefoundry/trueforge-sdk",
46
- "X-Fern-SDK-Version": "0.1.1",
47
- "User-Agent": "@truefoundry/trueforge-sdk/0.1.1",
46
+ "X-Fern-SDK-Version": "0.1.2",
47
+ "User-Agent": "@truefoundry/trueforge-sdk/0.1.2",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -25,7 +25,7 @@ export declare class McpServersClient {
25
25
  list(requestOptions?: McpServersClient.RequestOptions): core.HttpResponsePromise<TrueForge.ListAvailableMcpServersResponse>;
26
26
  private __list;
27
27
  /**
28
- * For servers without auth returns not_required, and for header credentials returns authenticated (no browser flow). For auth.type dcr, returns authenticated when a usable (or refreshable) token exists; otherwise runs DCR if needed and returns auth_required with an authorization URL. Optional redirect_url is where the OAuth callback then redirects the browser; without it the callback returns JSON.
28
+ * For servers without auth returns not_required, and for header credentials returns authenticated (no browser flow). For auth.type dcr, returns authenticated when a usable (or refreshable) token exists; otherwise runs DCR if needed and returns auth_required with an authorization URL. Optional return_to is where the OAuth callback then redirects the browser; without it the callback returns JSON.
29
29
  *
30
30
  * @param {string} name - MCP server name.
31
31
  * @param {TrueForge.AuthorizeMcpServersRequest} request
@@ -55,8 +55,8 @@ export declare class McpServersClient {
55
55
  * @throws {@link errors.TrueForgeTimeoutError}
56
56
  *
57
57
  * @example
58
- * await client.mcpServers.deleteAuthorize("name")
58
+ * await client.mcpServers.deleteAuthorization("name")
59
59
  */
60
- deleteAuthorize(name: string, requestOptions?: McpServersClient.RequestOptions): core.HttpResponsePromise<TrueForge.GetMcpServerResponse>;
61
- private __deleteAuthorize;
60
+ deleteAuthorization(name: string, requestOptions?: McpServersClient.RequestOptions): core.HttpResponsePromise<TrueForge.GetMcpServerResponse>;
61
+ private __deleteAuthorization;
62
62
  }
@@ -120,7 +120,7 @@ class McpServersClient {
120
120
  });
121
121
  }
122
122
  /**
123
- * For servers without auth returns not_required, and for header credentials returns authenticated (no browser flow). For auth.type dcr, returns authenticated when a usable (or refreshable) token exists; otherwise runs DCR if needed and returns auth_required with an authorization URL. Optional redirect_url is where the OAuth callback then redirects the browser; without it the callback returns JSON.
123
+ * For servers without auth returns not_required, and for header credentials returns authenticated (no browser flow). For auth.type dcr, returns authenticated when a usable (or refreshable) token exists; otherwise runs DCR if needed and returns auth_required with an authorization URL. Optional return_to is where the OAuth callback then redirects the browser; without it the callback returns JSON.
124
124
  *
125
125
  * @param {string} name - MCP server name.
126
126
  * @param {TrueForge.AuthorizeMcpServersRequest} request
@@ -143,9 +143,9 @@ class McpServersClient {
143
143
  __authorize(name_1) {
144
144
  return __awaiter(this, arguments, void 0, function* (name, request = {}, requestOptions) {
145
145
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
146
- const { redirectUrl } = request;
146
+ const { returnTo } = request;
147
147
  const _queryParams = {
148
- redirect_url: redirectUrl,
148
+ return_to: returnTo,
149
149
  };
150
150
  const _authRequest = yield this._options.authProvider.getAuthRequest();
151
151
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
@@ -240,12 +240,12 @@ class McpServersClient {
240
240
  * @throws {@link errors.TrueForgeTimeoutError}
241
241
  *
242
242
  * @example
243
- * await client.mcpServers.deleteAuthorize("name")
243
+ * await client.mcpServers.deleteAuthorization("name")
244
244
  */
245
- deleteAuthorize(name, requestOptions) {
246
- return core.HttpResponsePromise.fromPromise(this.__deleteAuthorize(name, requestOptions));
245
+ deleteAuthorization(name, requestOptions) {
246
+ return core.HttpResponsePromise.fromPromise(this.__deleteAuthorization(name, requestOptions));
247
247
  }
248
- __deleteAuthorize(name, requestOptions) {
248
+ __deleteAuthorization(name, requestOptions) {
249
249
  return __awaiter(this, void 0, void 0, function* () {
250
250
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
251
251
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -3,6 +3,6 @@
3
3
  * {}
4
4
  */
5
5
  export interface AuthorizeMcpServersRequest {
6
- /** Optional FE landing URL the OAuth callback redirects to, with `isSuccess`/`reason` appended. */
7
- redirectUrl?: string;
6
+ /** Optional path to return to after OAuth. Must be a same-origin relative path; the OAuth callback redirects here with `isSuccess`/`reason` appended. */
7
+ returnTo?: string;
8
8
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.1";
1
+ export declare const SDK_VERSION = "0.1.2";
@@ -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 = "0.1.1";
4
+ exports.SDK_VERSION = "0.1.2";
@@ -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": "@truefoundry/trueforge-sdk",
9
- "X-Fern-SDK-Version": "0.1.1",
10
- "User-Agent": "@truefoundry/trueforge-sdk/0.1.1",
9
+ "X-Fern-SDK-Version": "0.1.2",
10
+ "User-Agent": "@truefoundry/trueforge-sdk/0.1.2",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -25,7 +25,7 @@ export declare class McpServersClient {
25
25
  list(requestOptions?: McpServersClient.RequestOptions): core.HttpResponsePromise<TrueForge.ListAvailableMcpServersResponse>;
26
26
  private __list;
27
27
  /**
28
- * For servers without auth returns not_required, and for header credentials returns authenticated (no browser flow). For auth.type dcr, returns authenticated when a usable (or refreshable) token exists; otherwise runs DCR if needed and returns auth_required with an authorization URL. Optional redirect_url is where the OAuth callback then redirects the browser; without it the callback returns JSON.
28
+ * For servers without auth returns not_required, and for header credentials returns authenticated (no browser flow). For auth.type dcr, returns authenticated when a usable (or refreshable) token exists; otherwise runs DCR if needed and returns auth_required with an authorization URL. Optional return_to is where the OAuth callback then redirects the browser; without it the callback returns JSON.
29
29
  *
30
30
  * @param {string} name - MCP server name.
31
31
  * @param {TrueForge.AuthorizeMcpServersRequest} request
@@ -55,8 +55,8 @@ export declare class McpServersClient {
55
55
  * @throws {@link errors.TrueForgeTimeoutError}
56
56
  *
57
57
  * @example
58
- * await client.mcpServers.deleteAuthorize("name")
58
+ * await client.mcpServers.deleteAuthorization("name")
59
59
  */
60
- deleteAuthorize(name: string, requestOptions?: McpServersClient.RequestOptions): core.HttpResponsePromise<TrueForge.GetMcpServerResponse>;
61
- private __deleteAuthorize;
60
+ deleteAuthorization(name: string, requestOptions?: McpServersClient.RequestOptions): core.HttpResponsePromise<TrueForge.GetMcpServerResponse>;
61
+ private __deleteAuthorization;
62
62
  }
@@ -84,7 +84,7 @@ export class McpServersClient {
84
84
  });
85
85
  }
86
86
  /**
87
- * For servers without auth returns not_required, and for header credentials returns authenticated (no browser flow). For auth.type dcr, returns authenticated when a usable (or refreshable) token exists; otherwise runs DCR if needed and returns auth_required with an authorization URL. Optional redirect_url is where the OAuth callback then redirects the browser; without it the callback returns JSON.
87
+ * For servers without auth returns not_required, and for header credentials returns authenticated (no browser flow). For auth.type dcr, returns authenticated when a usable (or refreshable) token exists; otherwise runs DCR if needed and returns auth_required with an authorization URL. Optional return_to is where the OAuth callback then redirects the browser; without it the callback returns JSON.
88
88
  *
89
89
  * @param {string} name - MCP server name.
90
90
  * @param {TrueForge.AuthorizeMcpServersRequest} request
@@ -107,9 +107,9 @@ export class McpServersClient {
107
107
  __authorize(name_1) {
108
108
  return __awaiter(this, arguments, void 0, function* (name, request = {}, requestOptions) {
109
109
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
110
- const { redirectUrl } = request;
110
+ const { returnTo } = request;
111
111
  const _queryParams = {
112
- redirect_url: redirectUrl,
112
+ return_to: returnTo,
113
113
  };
114
114
  const _authRequest = yield this._options.authProvider.getAuthRequest();
115
115
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
@@ -204,12 +204,12 @@ export class McpServersClient {
204
204
  * @throws {@link errors.TrueForgeTimeoutError}
205
205
  *
206
206
  * @example
207
- * await client.mcpServers.deleteAuthorize("name")
207
+ * await client.mcpServers.deleteAuthorization("name")
208
208
  */
209
- deleteAuthorize(name, requestOptions) {
210
- return core.HttpResponsePromise.fromPromise(this.__deleteAuthorize(name, requestOptions));
209
+ deleteAuthorization(name, requestOptions) {
210
+ return core.HttpResponsePromise.fromPromise(this.__deleteAuthorization(name, requestOptions));
211
211
  }
212
- __deleteAuthorize(name, requestOptions) {
212
+ __deleteAuthorization(name, requestOptions) {
213
213
  return __awaiter(this, void 0, void 0, function* () {
214
214
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
215
215
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -3,6 +3,6 @@
3
3
  * {}
4
4
  */
5
5
  export interface AuthorizeMcpServersRequest {
6
- /** Optional FE landing URL the OAuth callback redirects to, with `isSuccess`/`reason` appended. */
7
- redirectUrl?: string;
6
+ /** Optional path to return to after OAuth. Must be a same-origin relative path; the OAuth callback redirects here with `isSuccess`/`reason` appended. */
7
+ returnTo?: string;
8
8
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.1";
1
+ export declare const SDK_VERSION = "0.1.2";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.1.1";
1
+ export const SDK_VERSION = "0.1.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truefoundry/trueforge-sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "main": "./dist/cjs/index.js",
package/reference.md CHANGED
@@ -563,7 +563,7 @@ await client.mcpServers.list();
563
563
  <dl>
564
564
  <dd>
565
565
 
566
- For servers without auth returns not_required, and for header credentials returns authenticated (no browser flow). For auth.type dcr, returns authenticated when a usable (or refreshable) token exists; otherwise runs DCR if needed and returns auth_required with an authorization URL. Optional redirect_url is where the OAuth callback then redirects the browser; without it the callback returns JSON.
566
+ For servers without auth returns not_required, and for header credentials returns authenticated (no browser flow). For auth.type dcr, returns authenticated when a usable (or refreshable) token exists; otherwise runs DCR if needed and returns auth_required with an authorization URL. Optional return_to is where the OAuth callback then redirects the browser; without it the callback returns JSON.
567
567
  </dd>
568
568
  </dl>
569
569
  </dd>
@@ -622,7 +622,7 @@ await client.mcpServers.authorize("name");
622
622
  </dl>
623
623
  </details>
624
624
 
625
- <details><summary><code>client.mcpServers.<a href="/src/api/resources/mcpServers/client/Client.ts">deleteAuthorize</a>(name) -> TrueForge.GetMcpServerResponse</code></summary>
625
+ <details><summary><code>client.mcpServers.<a href="/src/api/resources/mcpServers/client/Client.ts">deleteAuthorization</a>(name) -> TrueForge.GetMcpServerResponse</code></summary>
626
626
  <dl>
627
627
  <dd>
628
628
 
@@ -649,7 +649,7 @@ For auth.type dcr, deletes the stored OAuth token and returns the server with au
649
649
  <dd>
650
650
 
651
651
  ```typescript
652
- await client.mcpServers.deleteAuthorize("name");
652
+ await client.mcpServers.deleteAuthorization("name");
653
653
 
654
654
  ```
655
655
  </dd>