@microsoft/rayfin-client 1.34.0-alpha.1201 → 1.34.0-alpha.1225

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 } 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';
@@ -58,6 +58,22 @@ export interface ConnectorsRayfinClientConfig<TConnectorsSchema extends Connecto
58
58
  * });
59
59
  * ```
60
60
  *
61
+ * Connectors whose operations return a binary stream (such as the
62
+ * `fabric-semanticmodel` Apache Arrow response) need a runtime decoder. Pass a
63
+ * {@link ConnectorsRuntime} as the second constructor argument, keyed by the
64
+ * same connector names used in the schema:
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * import { fabricSemanticModel } from '@microsoft/rayfin-connector-fabric-semanticmodel';
69
+ *
70
+ * const client = new ConnectorsRayfinClient<
71
+ * DataSchema,
72
+ * FunctionsSchema,
73
+ * AppConnectorsSchema
74
+ * >(config, { salesModel: fabricSemanticModel() });
75
+ * ```
76
+ *
61
77
  * @alpha
62
78
  * @internal
63
79
  */
@@ -77,8 +93,11 @@ export declare class ConnectorsRayfinClient<TSchema extends EntitySchema = Recor
77
93
  *
78
94
  * @param config - Client configuration, including optional auth-token
79
95
  * storage and per-connector routing configs.
96
+ * @param connectorsRuntime - Optional per-connector runtime hooks (e.g. binary
97
+ * decoders) keyed by connector name. Required only for connectors whose
98
+ * operations return a binary stream; JSON-only connectors work without it.
80
99
  */
81
- constructor(config: ConnectorsRayfinClientConfig<TConnectorsSchema>);
100
+ constructor(config: ConnectorsRayfinClientConfig<TConnectorsSchema>, connectorsRuntime?: ConnectorsRuntime);
82
101
  }
83
102
  export default ConnectorsRayfinClient;
84
103
  //# 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);
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.1201",
3
+ "version": "1.34.0-alpha.1225",
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.1201",
25
- "@microsoft/rayfin-connectors": "1.34.0-alpha.1201",
26
- "@microsoft/rayfin-data": "1.34.0-alpha.1201",
27
- "@microsoft/rayfin-lib": "1.34.0-alpha.1201",
28
- "@microsoft/rayfin-functions": "1.34.0-alpha.1201"
24
+ "@microsoft/rayfin-auth": "1.34.0-alpha.1225",
25
+ "@microsoft/rayfin-connectors": "1.34.0-alpha.1225",
26
+ "@microsoft/rayfin-lib": "1.34.0-alpha.1225",
27
+ "@microsoft/rayfin-data": "1.34.0-alpha.1225",
28
+ "@microsoft/rayfin-functions": "1.34.0-alpha.1225"
29
29
  },
30
30
  "devDependencies": {
31
31
  "typescript": "^5.8.3",