@engini/sdk 0.26.0 → 0.27.0
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.
- package/dist/index.d.ts +1 -1
- package/dist/resources/connections.d.ts +8 -4
- package/dist/resources/connections.js +9 -5
- package/dist/types.d.ts +9 -17
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { Toolset } from "./toolset.js";
|
|
|
13
13
|
export type { ConnectionBinding, ToolsetExecuteOptions } from "./toolset.js";
|
|
14
14
|
export { File } from "./files.js";
|
|
15
15
|
export type { FileWire } from "./files.js";
|
|
16
|
-
export type { ToolSchema, Filter, Sort, ToolExecuteResult, Application, ApplicationDetail, Connection, ConnectionDetail, ConnectionObject, WhoAmI,
|
|
16
|
+
export type { ToolSchema, Filter, Sort, ToolExecuteResult, Application, ApplicationDetail, Connection, ConnectionDetail, ConnectionObject, WhoAmI, SignInStatusResponse, } from "./types.js";
|
|
17
17
|
export type { ToolsetConnectionDto, ToolsetConnectionRequest, ToolsetDto } from "@engini/client";
|
|
18
18
|
export type { AuthProviderResponse, AuthProviderFieldValue, AuthProviderFieldDefinition, AuthProviderSourceApplication, AuthProviderSourceMethod, AuthProviderRedirectUriResponse, CreateAuthProviderRequest, UpdateAuthProviderRequest, UsableAuthProvider, } from "@engini/client";
|
|
19
19
|
export type { OnPremAgentListItem as OpaAgentListItem, OnPremAgentDetail as OpaAgentDetail, OnPremAgentSettings as OpaAgentSettings, OnPremAgentTokenResponse as OpaAgentTokenResponse, OnPremAgentCreateResponse as OpaAgentCreateResponse, OnPremAgentReleaseManifest as OpaReleaseManifest, CreateOnPremAgentRequest as CreateOpaAgentRequest, UpdateOnPremAgentRequest as UpdateOpaAgentRequest, } from "@engini/client";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Connections resource — listing, defaults, name→id resolution, and the creation
|
|
3
|
-
* flow (sign-in
|
|
3
|
+
* flow (sign-in-status/create/check/refresh/objects/select + the
|
|
4
4
|
* `waitForRefresh` poll helper) that backs the interactive `engini connect` CLI.
|
|
5
5
|
* See `docs/superpowers/specs/2026-06-18-cli-connect-flow-design.md`.
|
|
6
6
|
*/
|
|
7
7
|
import { type ConnectionObject, type ConnectionReplaceResult, type ConnectionPublicDetail, type ConnectionPublicListItem, type DefaultConnectionDto, type RefreshStatusResponse, type SignInUrlResponse } from "@engini/client";
|
|
8
8
|
import { type Transport } from "../http.js";
|
|
9
|
-
import type {
|
|
9
|
+
import type { SignInStatusResponse } from "../types.js";
|
|
10
10
|
/**
|
|
11
11
|
* Whether a refresh status is terminal (finished, error, or otherwise not running).
|
|
12
12
|
* Unknown descriptions count as terminal — erring that way avoids hanging on a
|
|
@@ -94,8 +94,12 @@ export declare class ConnectionsResource {
|
|
|
94
94
|
environment?: string;
|
|
95
95
|
authProviderId?: number;
|
|
96
96
|
}): Promise<SignInUrlResponse>;
|
|
97
|
-
/**
|
|
98
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Poll an OAuth2 sign-in by `state`. Token-free: `status` is `pending` until `signed_in`
|
|
99
|
+
* (or `failed` / `cancelled` / `expired`), then `create` with `oauthState` - the server
|
|
100
|
+
* reads the credentials from the sign-in itself.
|
|
101
|
+
*/
|
|
102
|
+
getSignInStatus(state: string): Promise<SignInStatusResponse>;
|
|
99
103
|
/**
|
|
100
104
|
* Create a connection; returns the full connection detail.
|
|
101
105
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Connections resource — listing, defaults, name→id resolution, and the creation
|
|
3
|
-
* flow (sign-in
|
|
3
|
+
* flow (sign-in-status/create/check/refresh/objects/select + the
|
|
4
4
|
* `waitForRefresh` poll helper) that backs the interactive `engini connect` CLI.
|
|
5
5
|
* See `docs/superpowers/specs/2026-06-18-cli-connect-flow-design.md`.
|
|
6
6
|
*/
|
|
7
|
-
import { connectionsGetConnection, connectionsDeleteConnection, connectionsGetConnections, connectionsGetDefaultConnections, connectionsSetDefaultConnection, connectionsClearDefaultConnection, connectionsGetSignInUrl,
|
|
7
|
+
import { connectionsGetConnection, connectionsDeleteConnection, connectionsGetConnections, connectionsGetDefaultConnections, connectionsSetDefaultConnection, connectionsClearDefaultConnection, connectionsGetSignInUrl, connectionsGetSignInStatus, connectionsCreateConnection, connectionsCheckConnection, connectionsRefreshObjects, connectionsGetRefreshStatus, connectionsGetConnectionObjects, connectionsSelectObjects, connectionsUpdateConnection, connectionsReplaceConnection, } from "@engini/client";
|
|
8
8
|
import { call } from "../http.js";
|
|
9
9
|
import { paginate, collect } from "../pagination.js";
|
|
10
10
|
import { EnginiConnectionError, EnginiTimeoutError, EnginiToolsetError } from "../errors.js";
|
|
@@ -220,9 +220,13 @@ export class ConnectionsResource {
|
|
|
220
220
|
},
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
/**
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
/**
|
|
224
|
+
* Poll an OAuth2 sign-in by `state`. Token-free: `status` is `pending` until `signed_in`
|
|
225
|
+
* (or `failed` / `cancelled` / `expired`), then `create` with `oauthState` - the server
|
|
226
|
+
* reads the credentials from the sign-in itself.
|
|
227
|
+
*/
|
|
228
|
+
async getSignInStatus(state) {
|
|
229
|
+
return call(connectionsGetSignInStatus, {
|
|
226
230
|
client: this.client._transport,
|
|
227
231
|
path: { state },
|
|
228
232
|
});
|
package/dist/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Canonical, provider-agnostic tool schema and execution result types.
|
|
3
3
|
* Bound to the autogen `@engini/client` models — the SDK's public surface.
|
|
4
4
|
*/
|
|
5
|
-
import type { ToolDetailDto, ActivityCondition, ActivitySort, ApplicationDto, ApplicationDetailDto, ConnectionPublicListItem, ConnectionPublicDetail, ConnectionObject as ConnectionObjectModel, WhoAmIResponse,
|
|
5
|
+
import type { ToolDetailDto, ActivityCondition, ActivitySort, ApplicationDto, ApplicationDetailDto, ConnectionPublicListItem, ConnectionPublicDetail, ConnectionObject as ConnectionObjectModel, WhoAmIResponse, SignInStatusResponse as ClientSignInStatusResponse } from "@engini/client";
|
|
6
6
|
/** Canonical tool schema (== client `ToolDetailDto`; carries `inputSchema` + `supports*`). */
|
|
7
7
|
export type ToolSchema = ToolDetailDto;
|
|
8
8
|
/** A connector application summary (== client `ApplicationDto`). */
|
|
@@ -18,23 +18,15 @@ export type ConnectionObject = ConnectionObjectModel;
|
|
|
18
18
|
/** Authenticated caller identity (== client `WhoAmIResponse`). */
|
|
19
19
|
export type WhoAmI = WhoAmIResponse;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
* connection field discovered from the signed-in org
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* `@engini/client`'s generated `AccessTokenResponse` now declares `fieldOptions` itself
|
|
29
|
-
* (required, non-null — the C# DTO is `= new()`), so this is a straight re-export, not
|
|
30
|
-
* a local intersection. That non-nullability is deliberate, not an oversight: the merged
|
|
31
|
-
* server (`ConnectionsController.cs`, terminal poll) maps a failed/empty lookup to `{}`
|
|
32
|
-
* explicitly, so **absent is the only signal of an older server** (one that predates
|
|
33
|
-
* WorkflowApi #1401); `{}` means the lookup ran and found no options, same as "the field
|
|
34
|
-
* genuinely has none". A failed lookup is indistinguishable from "no options" once it's
|
|
35
|
-
* on the wire (logged server-side, not surfaced here) - same as it is from absent.
|
|
21
|
+
* Sign-in status poll response. Carries no provider token: `fieldOptions` holds legal values for
|
|
22
|
+
* a declared connection field discovered from the signed-in org, shaped
|
|
23
|
+
* `{ [fieldName]: { [valueToSave]: labelToShow } }` (e.g. Salesforce's `ApiVersionUrl` ->
|
|
24
|
+
* `{ "/services/data/v60.0": "60.0" }` - the KEY is what `create`/`update` must send, the VALUE is
|
|
25
|
+
* only a display label), and `derivedFields` names the connection fields the server fills from the
|
|
26
|
+
* sign-in, so a caller must not ask for or post them. `createOutcome` (`connected` / `failed` /
|
|
27
|
+
* null) reports a create already made with this state and is separate from `status`.
|
|
36
28
|
*/
|
|
37
|
-
export type
|
|
29
|
+
export type SignInStatusResponse = ClientSignInStatusResponse;
|
|
38
30
|
/** Execute-time filter condition (gated by `supportsFilters`). */
|
|
39
31
|
export type Filter = ActivityCondition;
|
|
40
32
|
/** Execute-time sort directive (gated by `supportsSort`). */
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@engini/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Engini SDK — agent-first ergonomic layer over the Engini Public API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"test": "vitest run"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@engini/client": "0.
|
|
30
|
+
"@engini/client": "0.13.0",
|
|
31
31
|
"undici": "^6.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|