@microsoft/rayfin-client 1.34.0-alpha.1221 → 1.34.0-alpha.1270
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createConnectorsApi, type ConnectorConfig, type ConnectorsSchema } from '@microsoft/rayfin-connectors';
|
|
1
|
+
import { createConnectorsApi, type ConnectorConfig, type ConnectorsRuntime, type ConnectorsSchema, type HostEnvironment } from '@microsoft/rayfin-connectors';
|
|
2
2
|
import { type EntitySchema } from '@microsoft/rayfin-data';
|
|
3
3
|
import { type FunctionsSchema } from '@microsoft/rayfin-functions';
|
|
4
4
|
import RayfinClient, { RayfinClientConfig } from '../client.js';
|
|
@@ -20,6 +20,17 @@ export interface ConnectorsRayfinClientConfig<TConnectorsSchema extends Connecto
|
|
|
20
20
|
* connector declared in `TConnectorsSchema` must have a runtime config.
|
|
21
21
|
*/
|
|
22
22
|
connectors: Record<keyof TConnectorsSchema & string, ConnectorConfig>;
|
|
23
|
+
/**
|
|
24
|
+
* (Experimental) Hosting environment the connectors runtime runs in. Carried
|
|
25
|
+
* on every invocation context so a registered invoke middleware can branch
|
|
26
|
+
* on it (embedded-in-Fabric vs standalone vs cli). When omitted, the host is
|
|
27
|
+
* auto-detected (`detectHost()`) so callers wire up nothing — `cli` under
|
|
28
|
+
* Node, `embedded` inside a parent frame, otherwise `standalone`. Pass an
|
|
29
|
+
* explicit value only to override detection. The connectors layer only
|
|
30
|
+
* carries this value; confirming a specific Fabric host is the job of the
|
|
31
|
+
* connector-specific package.
|
|
32
|
+
*/
|
|
33
|
+
host?: HostEnvironment;
|
|
23
34
|
}
|
|
24
35
|
/**
|
|
25
36
|
* (Experimental) Rayfin client that surfaces the typed connectors runtime as
|
|
@@ -58,6 +69,22 @@ export interface ConnectorsRayfinClientConfig<TConnectorsSchema extends Connecto
|
|
|
58
69
|
* });
|
|
59
70
|
* ```
|
|
60
71
|
*
|
|
72
|
+
* Connectors whose operations return a binary stream (such as the
|
|
73
|
+
* `fabric-semanticmodel` Apache Arrow response) need a runtime decoder. Pass a
|
|
74
|
+
* {@link ConnectorsRuntime} as the second constructor argument, keyed by the
|
|
75
|
+
* same connector names used in the schema:
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* import { fabricSemanticModel } from '@microsoft/rayfin-connector-fabric-semanticmodel';
|
|
80
|
+
*
|
|
81
|
+
* const client = new ConnectorsRayfinClient<
|
|
82
|
+
* DataSchema,
|
|
83
|
+
* FunctionsSchema,
|
|
84
|
+
* AppConnectorsSchema
|
|
85
|
+
* >(config, { salesModel: fabricSemanticModel() });
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
61
88
|
* @alpha
|
|
62
89
|
* @internal
|
|
63
90
|
*/
|
|
@@ -77,8 +104,11 @@ export declare class ConnectorsRayfinClient<TSchema extends EntitySchema = Recor
|
|
|
77
104
|
*
|
|
78
105
|
* @param config - Client configuration, including optional auth-token
|
|
79
106
|
* storage and per-connector routing configs.
|
|
107
|
+
* @param connectorsRuntime - Optional per-connector runtime hooks (e.g. binary
|
|
108
|
+
* decoders) keyed by connector name. Required only for connectors whose
|
|
109
|
+
* operations return a binary stream; JSON-only connectors work without it.
|
|
80
110
|
*/
|
|
81
|
-
constructor(config: ConnectorsRayfinClientConfig<TConnectorsSchema
|
|
111
|
+
constructor(config: ConnectorsRayfinClientConfig<TConnectorsSchema>, connectorsRuntime?: ConnectorsRuntime);
|
|
82
112
|
}
|
|
83
113
|
export default ConnectorsRayfinClient;
|
|
84
114
|
//# sourceMappingURL=ConnectorsRayfinClient.d.ts.map
|
|
@@ -37,6 +37,22 @@ import RayfinClient from '../client.js';
|
|
|
37
37
|
* });
|
|
38
38
|
* ```
|
|
39
39
|
*
|
|
40
|
+
* Connectors whose operations return a binary stream (such as the
|
|
41
|
+
* `fabric-semanticmodel` Apache Arrow response) need a runtime decoder. Pass a
|
|
42
|
+
* {@link ConnectorsRuntime} as the second constructor argument, keyed by the
|
|
43
|
+
* same connector names used in the schema:
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* import { fabricSemanticModel } from '@microsoft/rayfin-connector-fabric-semanticmodel';
|
|
48
|
+
*
|
|
49
|
+
* const client = new ConnectorsRayfinClient<
|
|
50
|
+
* DataSchema,
|
|
51
|
+
* FunctionsSchema,
|
|
52
|
+
* AppConnectorsSchema
|
|
53
|
+
* >(config, { salesModel: fabricSemanticModel() });
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
40
56
|
* @alpha
|
|
41
57
|
* @internal
|
|
42
58
|
*/
|
|
@@ -56,10 +72,13 @@ export class ConnectorsRayfinClient extends RayfinClient {
|
|
|
56
72
|
*
|
|
57
73
|
* @param config - Client configuration, including optional auth-token
|
|
58
74
|
* storage and per-connector routing configs.
|
|
75
|
+
* @param connectorsRuntime - Optional per-connector runtime hooks (e.g. binary
|
|
76
|
+
* decoders) keyed by connector name. Required only for connectors whose
|
|
77
|
+
* operations return a binary stream; JSON-only connectors work without it.
|
|
59
78
|
*/
|
|
60
|
-
constructor(config) {
|
|
79
|
+
constructor(config, connectorsRuntime) {
|
|
61
80
|
super(config);
|
|
62
|
-
this.connectors = createConnectorsApi(this.apiClient, config.connectors);
|
|
81
|
+
this.connectors = createConnectorsApi(this.apiClient, config.connectors, connectorsRuntime, config.host);
|
|
63
82
|
}
|
|
64
83
|
}
|
|
65
84
|
export default ConnectorsRayfinClient;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/rayfin-client",
|
|
3
|
-
"version": "1.34.0-alpha.
|
|
3
|
+
"version": "1.34.0-alpha.1270",
|
|
4
4
|
"description": "Main client SDK for Rayfin services",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"assets/docs"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@microsoft/rayfin-auth": "1.34.0-alpha.
|
|
25
|
-
"@microsoft/rayfin-connectors": "1.34.0-alpha.
|
|
26
|
-
"@microsoft/rayfin-data": "1.34.0-alpha.
|
|
27
|
-
"@microsoft/rayfin-functions": "1.34.0-alpha.
|
|
28
|
-
"@microsoft/rayfin-lib": "1.34.0-alpha.
|
|
24
|
+
"@microsoft/rayfin-auth": "1.34.0-alpha.1270",
|
|
25
|
+
"@microsoft/rayfin-connectors": "1.34.0-alpha.1270",
|
|
26
|
+
"@microsoft/rayfin-data": "1.34.0-alpha.1270",
|
|
27
|
+
"@microsoft/rayfin-functions": "1.34.0-alpha.1270",
|
|
28
|
+
"@microsoft/rayfin-lib": "1.34.0-alpha.1270"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"typescript": "^5.8.3",
|