@agntcy/slim-bindings-linux-arm64-gnu 2.0.0-alpha.2 → 2.0.0-alpha.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.
- package/index.d.ts +10 -1
- package/index.js +16 -1
- package/libslim_bindings.so +0 -0
- package/package.json +5 -6
- package/slim_bindings-ffi.d.ts +292 -0
- package/slim_bindings-ffi.js +1442 -0
- package/slim_bindings.d.ts +4863 -0
- package/slim_bindings.js +6362 -0
- package/slim_rpc-ffi.d.ts +271 -0
- package/slim_rpc-ffi.js +1233 -0
- package/slim_rpc.d.ts +1931 -0
- package/slim_rpc.js +3660 -0
- package/slim-bindings-node.d.ts +0 -3995
- package/slim-bindings-node.js +0 -11296
- package/slim-bindings-sys.d.ts +0 -616
- package/slim-bindings-sys.js +0 -3594
|
@@ -0,0 +1,4863 @@
|
|
|
1
|
+
import { type UniffiByteArray, type UniffiGcObject, type UniffiHandle, FfiConverterObject, RustBuffer, UniffiAbstractObject, destructorGuardSymbol, pointerLiteralSymbol, uniffiTypeNameSymbol } from "@ubjs/core";
|
|
2
|
+
/**
|
|
3
|
+
* Create a new Service with builder pattern
|
|
4
|
+
*/
|
|
5
|
+
export declare function createService(name: string): ServiceLike;
|
|
6
|
+
/**
|
|
7
|
+
* Create a new Service with configuration
|
|
8
|
+
*/
|
|
9
|
+
export declare function createServiceWithConfig(name: string, config: ServiceConfig): ServiceLike;
|
|
10
|
+
/**
|
|
11
|
+
* Get detailed build information
|
|
12
|
+
*/
|
|
13
|
+
export declare function getBuildInfo(): BuildInfo;
|
|
14
|
+
/**
|
|
15
|
+
* Get the global service instance (creates it if it doesn't exist)
|
|
16
|
+
*
|
|
17
|
+
* This returns a reference to the shared global service that can be used
|
|
18
|
+
* across the application. All calls to this function return the same service instance.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getGlobalService(): ServiceLike;
|
|
21
|
+
/**
|
|
22
|
+
* Returns references to all global services.
|
|
23
|
+
* If not initialized, initializes with defaults first.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getServices(): Array<ServiceLike>;
|
|
26
|
+
/**
|
|
27
|
+
* Get the version of the SLIM bindings (simple string)
|
|
28
|
+
*/
|
|
29
|
+
export declare function getVersion(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Initialize SLIM bindings from a configuration file
|
|
32
|
+
*
|
|
33
|
+
* This function:
|
|
34
|
+
* 1. Loads the configuration file
|
|
35
|
+
* 2. Initializes the crypto provider
|
|
36
|
+
* 3. Sets up tracing/logging exactly as the main SLIM application does
|
|
37
|
+
* 4. Initializes the global runtime with configuration from the file
|
|
38
|
+
* 5. Initializes and starts the global service with servers/clients from config
|
|
39
|
+
*
|
|
40
|
+
* This must be called before using any SLIM bindings functionality.
|
|
41
|
+
* It's safe to call multiple times - subsequent calls will be ignored.
|
|
42
|
+
*
|
|
43
|
+
* # Arguments
|
|
44
|
+
* * `config_path` - Path to the YAML configuration file
|
|
45
|
+
*
|
|
46
|
+
* # Returns
|
|
47
|
+
* * `Ok(())` - Successfully initialized
|
|
48
|
+
* * `Err(SlimError)` - If initialization fails
|
|
49
|
+
*
|
|
50
|
+
* # Example
|
|
51
|
+
* ```ignore
|
|
52
|
+
* initialize_from_config("/path/to/config.yaml")?;
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function initializeFromConfig(configPath: string): void;
|
|
56
|
+
/**
|
|
57
|
+
* Initialize SLIM bindings from a configuration file and return errors
|
|
58
|
+
* instead of panicking.
|
|
59
|
+
*/
|
|
60
|
+
export declare function initializeFromConfigWithError(configPath: string): void;
|
|
61
|
+
/**
|
|
62
|
+
* Initialize SLIM bindings with custom configuration structs
|
|
63
|
+
*
|
|
64
|
+
* This function allows you to programmatically configure SLIM bindings by passing
|
|
65
|
+
* configuration structs directly, without needing a config file.
|
|
66
|
+
*
|
|
67
|
+
* # Arguments
|
|
68
|
+
* * `runtime_config` - Runtime configuration (thread count, naming, etc.)
|
|
69
|
+
* * `tracing_config` - Tracing/logging configuration
|
|
70
|
+
* * `service_config` - Service configuration (node ID, group name, etc.)
|
|
71
|
+
*
|
|
72
|
+
* # Returns
|
|
73
|
+
* * `Ok(())` - Successfully initialized
|
|
74
|
+
* * `Err(SlimError)` - If initialization fails
|
|
75
|
+
*
|
|
76
|
+
* # Example
|
|
77
|
+
* ```ignore
|
|
78
|
+
* let runtime_config = new_runtime_config();
|
|
79
|
+
* let tracing_config = new_tracing_config();
|
|
80
|
+
* let mut service_config = new_service_config();
|
|
81
|
+
* service_config.node_id = Some("my-node".to_string());
|
|
82
|
+
*
|
|
83
|
+
* initialize_with_configs(runtime_config, tracing_config, service_config)?;
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export declare function initializeWithConfigs(runtimeConfig: RuntimeConfig, tracingConfig: TracingConfig, serviceConfig: Array<ServiceConfig>): void;
|
|
87
|
+
/**
|
|
88
|
+
* Initialize SLIM bindings with default configuration
|
|
89
|
+
*
|
|
90
|
+
* This is a convenience function that initializes the bindings with:
|
|
91
|
+
* - Default runtime configuration
|
|
92
|
+
* - Default tracing/logging configuration
|
|
93
|
+
* - Initialized crypto provider
|
|
94
|
+
* - Default global service (no servers/clients)
|
|
95
|
+
*
|
|
96
|
+
* Use `initialize_from_config` for file-based configuration or
|
|
97
|
+
* `initialize_with_configs` for programmatic configuration.
|
|
98
|
+
*/
|
|
99
|
+
export declare function initializeWithDefaults(): void;
|
|
100
|
+
/**
|
|
101
|
+
* Check if SLIM bindings have been initialized
|
|
102
|
+
*/
|
|
103
|
+
export declare function isInitialized(): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Parse and validate a SLIM gRPC client configuration from JSON.
|
|
106
|
+
*
|
|
107
|
+
* The JSON must match [`CoreClientConfig`] (same as
|
|
108
|
+
* `data-plane/core/config/src/grpc/schema/client-config.schema.json`).
|
|
109
|
+
*/
|
|
110
|
+
export declare function newConfigFromJson(json: string): ClientConfig;
|
|
111
|
+
/**
|
|
112
|
+
* Create a new DataplaneConfig
|
|
113
|
+
*/
|
|
114
|
+
export declare function newDataplaneConfig(): DataplaneConfig;
|
|
115
|
+
/**
|
|
116
|
+
* Create a new insecure client config (no TLS)
|
|
117
|
+
*/
|
|
118
|
+
export declare function newInsecureClientConfig(endpoint: string): ClientConfig;
|
|
119
|
+
/**
|
|
120
|
+
* Create a new insecure server config (no TLS)
|
|
121
|
+
*/
|
|
122
|
+
export declare function newInsecureServerConfig(endpoint: string): ServerConfig;
|
|
123
|
+
/**
|
|
124
|
+
* Create a new BindingsRuntimeConfig with default values
|
|
125
|
+
*/
|
|
126
|
+
export declare function newRuntimeConfig(): RuntimeConfig;
|
|
127
|
+
/**
|
|
128
|
+
* Create a new BindingsRuntimeConfig with custom values
|
|
129
|
+
*/
|
|
130
|
+
export declare function newRuntimeConfigWith(nCores: bigint, threadName: string, drainTimeout: number): RuntimeConfig;
|
|
131
|
+
/**
|
|
132
|
+
* Create a new secure client config (TLS enabled with default settings)
|
|
133
|
+
*/
|
|
134
|
+
export declare function newSecureClientConfig(endpoint: string): ClientConfig;
|
|
135
|
+
/**
|
|
136
|
+
* Create a new secure server config (TLS enabled with the given certificate source)
|
|
137
|
+
*/
|
|
138
|
+
export declare function newSecureServerConfig(endpoint: string, tlsSource: TlsSource): ServerConfig;
|
|
139
|
+
/**
|
|
140
|
+
* Create a new server config with the given endpoint and default values
|
|
141
|
+
*/
|
|
142
|
+
export declare function newServerConfig(endpoint: string): ServerConfig;
|
|
143
|
+
/**
|
|
144
|
+
* Create a new BindingsServiceConfig with default values
|
|
145
|
+
*/
|
|
146
|
+
export declare function newServiceConfig(): ServiceConfig;
|
|
147
|
+
/**
|
|
148
|
+
* Create a new BindingsServiceConfig with custom values
|
|
149
|
+
*/
|
|
150
|
+
export declare function newServiceConfigWith(nodeId: string | undefined, groupName: string | undefined, dataplane: DataplaneConfig): ServiceConfig;
|
|
151
|
+
/**
|
|
152
|
+
* Create a new ServiceConfiguration
|
|
153
|
+
*/
|
|
154
|
+
export declare function newServiceConfiguration(): ServiceConfig;
|
|
155
|
+
/**
|
|
156
|
+
* Create a new BindingsTracingConfig with default values
|
|
157
|
+
*/
|
|
158
|
+
export declare function newTracingConfig(): TracingConfig;
|
|
159
|
+
/**
|
|
160
|
+
* Create a new BindingsTracingConfig with custom values
|
|
161
|
+
*/
|
|
162
|
+
export declare function newTracingConfigWith(logLevel: string, displayThreadNames: boolean, displayThreadIds: boolean, filters: Array<string>): TracingConfig;
|
|
163
|
+
/**
|
|
164
|
+
* Perform graceful shutdown operations (blocking version)
|
|
165
|
+
*
|
|
166
|
+
* This is a blocking wrapper around the async `shutdown()` function for use from
|
|
167
|
+
* synchronous contexts or language bindings that don't support async.
|
|
168
|
+
*
|
|
169
|
+
* # Returns
|
|
170
|
+
* * `Ok(())` - Successfully shut down
|
|
171
|
+
* * `Err(SlimError)` - If shutdown fails
|
|
172
|
+
*/
|
|
173
|
+
export declare function shutdownBlocking(): void;
|
|
174
|
+
/**
|
|
175
|
+
* Basic authentication configuration
|
|
176
|
+
*/
|
|
177
|
+
export type BasicAuth = {
|
|
178
|
+
username: string;
|
|
179
|
+
password: string;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Generated factory for {@link BasicAuth} record objects.
|
|
183
|
+
*/
|
|
184
|
+
export declare const BasicAuth: Readonly<{
|
|
185
|
+
create: (partial: Partial<BasicAuth> & Required<Omit<BasicAuth, "username" | "password">>) => BasicAuth;
|
|
186
|
+
new: (partial: Partial<BasicAuth> & Required<Omit<BasicAuth, "username" | "password">>) => BasicAuth;
|
|
187
|
+
defaults: () => Partial<BasicAuth>;
|
|
188
|
+
}>;
|
|
189
|
+
/**
|
|
190
|
+
* Build information for the SLIM bindings
|
|
191
|
+
*/
|
|
192
|
+
export type BuildInfo = {
|
|
193
|
+
/**
|
|
194
|
+
* Semantic version (e.g., "0.7.0")
|
|
195
|
+
*/
|
|
196
|
+
version: string;
|
|
197
|
+
/**
|
|
198
|
+
* Git commit hash (short)
|
|
199
|
+
*/
|
|
200
|
+
gitSha: string;
|
|
201
|
+
/**
|
|
202
|
+
* Build date in ISO 8601 UTC format
|
|
203
|
+
*/
|
|
204
|
+
buildDate: string;
|
|
205
|
+
/**
|
|
206
|
+
* Build profile (debug/release)
|
|
207
|
+
*/
|
|
208
|
+
profile: string;
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Generated factory for {@link BuildInfo} record objects.
|
|
212
|
+
*/
|
|
213
|
+
export declare const BuildInfo: Readonly<{
|
|
214
|
+
create: (partial: Partial<BuildInfo> & Required<Omit<BuildInfo, "version" | "gitSha" | "buildDate" | "profile">>) => BuildInfo;
|
|
215
|
+
new: (partial: Partial<BuildInfo> & Required<Omit<BuildInfo, "version" | "gitSha" | "buildDate" | "profile">>) => BuildInfo;
|
|
216
|
+
defaults: () => Partial<BuildInfo>;
|
|
217
|
+
}>;
|
|
218
|
+
/**
|
|
219
|
+
* SPIRE configuration for SPIFFE Workload API integration
|
|
220
|
+
*/
|
|
221
|
+
export type SpireConfig = {
|
|
222
|
+
/**
|
|
223
|
+
* Path to the SPIFFE Workload API socket (None => use SPIFFE_ENDPOINT_SOCKET env var)
|
|
224
|
+
*/
|
|
225
|
+
socketPath?: string;
|
|
226
|
+
/**
|
|
227
|
+
* Optional target SPIFFE ID when requesting JWT SVIDs
|
|
228
|
+
*/
|
|
229
|
+
targetSpiffeId?: string;
|
|
230
|
+
/**
|
|
231
|
+
* Audiences to request/verify for JWT SVIDs
|
|
232
|
+
*/
|
|
233
|
+
jwtAudiences: Array<string>;
|
|
234
|
+
/**
|
|
235
|
+
* Optional trust domains override for X.509 bundle retrieval
|
|
236
|
+
*/
|
|
237
|
+
trustDomains: Array<string>;
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* Generated factory for {@link SpireConfig} record objects.
|
|
241
|
+
*/
|
|
242
|
+
export declare const SpireConfig: Readonly<{
|
|
243
|
+
create: (partial: Partial<SpireConfig> & Required<Omit<SpireConfig, "socketPath" | "targetSpiffeId" | "jwtAudiences" | "trustDomains">>) => SpireConfig;
|
|
244
|
+
new: (partial: Partial<SpireConfig> & Required<Omit<SpireConfig, "socketPath" | "targetSpiffeId" | "jwtAudiences" | "trustDomains">>) => SpireConfig;
|
|
245
|
+
defaults: () => Partial<SpireConfig>;
|
|
246
|
+
}>;
|
|
247
|
+
export declare enum TlsSource_Tags {
|
|
248
|
+
Pem = "Pem",
|
|
249
|
+
File = "File",
|
|
250
|
+
Spire = "Spire",
|
|
251
|
+
None = "None"
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* TLS certificate and key source configuration
|
|
255
|
+
*/
|
|
256
|
+
export declare const TlsSource: Readonly<{
|
|
257
|
+
instanceOf: (obj: any) => obj is TlsSource;
|
|
258
|
+
Pem: {
|
|
259
|
+
new (inner: {
|
|
260
|
+
cert: string;
|
|
261
|
+
key: string;
|
|
262
|
+
}): {
|
|
263
|
+
readonly tag: TlsSource_Tags.Pem;
|
|
264
|
+
readonly inner: Readonly<{
|
|
265
|
+
cert: string;
|
|
266
|
+
key: string;
|
|
267
|
+
}>;
|
|
268
|
+
/**
|
|
269
|
+
* @private
|
|
270
|
+
* This field is private and should not be used, use `tag` instead.
|
|
271
|
+
*/
|
|
272
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
273
|
+
};
|
|
274
|
+
"new"(inner: {
|
|
275
|
+
cert: string;
|
|
276
|
+
key: string;
|
|
277
|
+
}): {
|
|
278
|
+
readonly tag: TlsSource_Tags.Pem;
|
|
279
|
+
readonly inner: Readonly<{
|
|
280
|
+
cert: string;
|
|
281
|
+
key: string;
|
|
282
|
+
}>;
|
|
283
|
+
/**
|
|
284
|
+
* @private
|
|
285
|
+
* This field is private and should not be used, use `tag` instead.
|
|
286
|
+
*/
|
|
287
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
288
|
+
};
|
|
289
|
+
instanceOf(obj: any): obj is {
|
|
290
|
+
readonly tag: TlsSource_Tags.Pem;
|
|
291
|
+
readonly inner: Readonly<{
|
|
292
|
+
cert: string;
|
|
293
|
+
key: string;
|
|
294
|
+
}>;
|
|
295
|
+
/**
|
|
296
|
+
* @private
|
|
297
|
+
* This field is private and should not be used, use `tag` instead.
|
|
298
|
+
*/
|
|
299
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
File: {
|
|
303
|
+
new (inner: {
|
|
304
|
+
cert: string;
|
|
305
|
+
key: string;
|
|
306
|
+
}): {
|
|
307
|
+
readonly tag: TlsSource_Tags.File;
|
|
308
|
+
readonly inner: Readonly<{
|
|
309
|
+
cert: string;
|
|
310
|
+
key: string;
|
|
311
|
+
}>;
|
|
312
|
+
/**
|
|
313
|
+
* @private
|
|
314
|
+
* This field is private and should not be used, use `tag` instead.
|
|
315
|
+
*/
|
|
316
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
317
|
+
};
|
|
318
|
+
"new"(inner: {
|
|
319
|
+
cert: string;
|
|
320
|
+
key: string;
|
|
321
|
+
}): {
|
|
322
|
+
readonly tag: TlsSource_Tags.File;
|
|
323
|
+
readonly inner: Readonly<{
|
|
324
|
+
cert: string;
|
|
325
|
+
key: string;
|
|
326
|
+
}>;
|
|
327
|
+
/**
|
|
328
|
+
* @private
|
|
329
|
+
* This field is private and should not be used, use `tag` instead.
|
|
330
|
+
*/
|
|
331
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
332
|
+
};
|
|
333
|
+
instanceOf(obj: any): obj is {
|
|
334
|
+
readonly tag: TlsSource_Tags.File;
|
|
335
|
+
readonly inner: Readonly<{
|
|
336
|
+
cert: string;
|
|
337
|
+
key: string;
|
|
338
|
+
}>;
|
|
339
|
+
/**
|
|
340
|
+
* @private
|
|
341
|
+
* This field is private and should not be used, use `tag` instead.
|
|
342
|
+
*/
|
|
343
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
Spire: {
|
|
347
|
+
new (inner: {
|
|
348
|
+
config: SpireConfig;
|
|
349
|
+
}): {
|
|
350
|
+
readonly tag: TlsSource_Tags.Spire;
|
|
351
|
+
readonly inner: Readonly<{
|
|
352
|
+
config: SpireConfig;
|
|
353
|
+
}>;
|
|
354
|
+
/**
|
|
355
|
+
* @private
|
|
356
|
+
* This field is private and should not be used, use `tag` instead.
|
|
357
|
+
*/
|
|
358
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
359
|
+
};
|
|
360
|
+
"new"(inner: {
|
|
361
|
+
config: SpireConfig;
|
|
362
|
+
}): {
|
|
363
|
+
readonly tag: TlsSource_Tags.Spire;
|
|
364
|
+
readonly inner: Readonly<{
|
|
365
|
+
config: SpireConfig;
|
|
366
|
+
}>;
|
|
367
|
+
/**
|
|
368
|
+
* @private
|
|
369
|
+
* This field is private and should not be used, use `tag` instead.
|
|
370
|
+
*/
|
|
371
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
372
|
+
};
|
|
373
|
+
instanceOf(obj: any): obj is {
|
|
374
|
+
readonly tag: TlsSource_Tags.Spire;
|
|
375
|
+
readonly inner: Readonly<{
|
|
376
|
+
config: SpireConfig;
|
|
377
|
+
}>;
|
|
378
|
+
/**
|
|
379
|
+
* @private
|
|
380
|
+
* This field is private and should not be used, use `tag` instead.
|
|
381
|
+
*/
|
|
382
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
None: {
|
|
386
|
+
new (): {
|
|
387
|
+
readonly tag: TlsSource_Tags.None;
|
|
388
|
+
/**
|
|
389
|
+
* @private
|
|
390
|
+
* This field is private and should not be used, use `tag` instead.
|
|
391
|
+
*/
|
|
392
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
393
|
+
};
|
|
394
|
+
"new"(): {
|
|
395
|
+
readonly tag: TlsSource_Tags.None;
|
|
396
|
+
/**
|
|
397
|
+
* @private
|
|
398
|
+
* This field is private and should not be used, use `tag` instead.
|
|
399
|
+
*/
|
|
400
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
401
|
+
};
|
|
402
|
+
instanceOf(obj: any): obj is {
|
|
403
|
+
readonly tag: TlsSource_Tags.None;
|
|
404
|
+
/**
|
|
405
|
+
* @private
|
|
406
|
+
* This field is private and should not be used, use `tag` instead.
|
|
407
|
+
*/
|
|
408
|
+
readonly [uniffiTypeNameSymbol]: "TlsSource";
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
}>;
|
|
412
|
+
/**
|
|
413
|
+
* TLS certificate and key source configuration
|
|
414
|
+
*/
|
|
415
|
+
export type TlsSource = InstanceType<typeof TlsSource['Pem' | 'File' | 'Spire' | 'None']>;
|
|
416
|
+
export declare enum CaSource_Tags {
|
|
417
|
+
File = "File",
|
|
418
|
+
Pem = "Pem",
|
|
419
|
+
Spire = "Spire",
|
|
420
|
+
None = "None"
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* CA certificate source configuration
|
|
424
|
+
*/
|
|
425
|
+
export declare const CaSource: Readonly<{
|
|
426
|
+
instanceOf: (obj: any) => obj is CaSource;
|
|
427
|
+
File: {
|
|
428
|
+
new (inner: {
|
|
429
|
+
path: string;
|
|
430
|
+
}): {
|
|
431
|
+
readonly tag: CaSource_Tags.File;
|
|
432
|
+
readonly inner: Readonly<{
|
|
433
|
+
path: string;
|
|
434
|
+
}>;
|
|
435
|
+
/**
|
|
436
|
+
* @private
|
|
437
|
+
* This field is private and should not be used, use `tag` instead.
|
|
438
|
+
*/
|
|
439
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
440
|
+
};
|
|
441
|
+
"new"(inner: {
|
|
442
|
+
path: string;
|
|
443
|
+
}): {
|
|
444
|
+
readonly tag: CaSource_Tags.File;
|
|
445
|
+
readonly inner: Readonly<{
|
|
446
|
+
path: string;
|
|
447
|
+
}>;
|
|
448
|
+
/**
|
|
449
|
+
* @private
|
|
450
|
+
* This field is private and should not be used, use `tag` instead.
|
|
451
|
+
*/
|
|
452
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
453
|
+
};
|
|
454
|
+
instanceOf(obj: any): obj is {
|
|
455
|
+
readonly tag: CaSource_Tags.File;
|
|
456
|
+
readonly inner: Readonly<{
|
|
457
|
+
path: string;
|
|
458
|
+
}>;
|
|
459
|
+
/**
|
|
460
|
+
* @private
|
|
461
|
+
* This field is private and should not be used, use `tag` instead.
|
|
462
|
+
*/
|
|
463
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
Pem: {
|
|
467
|
+
new (inner: {
|
|
468
|
+
data: string;
|
|
469
|
+
}): {
|
|
470
|
+
readonly tag: CaSource_Tags.Pem;
|
|
471
|
+
readonly inner: Readonly<{
|
|
472
|
+
data: string;
|
|
473
|
+
}>;
|
|
474
|
+
/**
|
|
475
|
+
* @private
|
|
476
|
+
* This field is private and should not be used, use `tag` instead.
|
|
477
|
+
*/
|
|
478
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
479
|
+
};
|
|
480
|
+
"new"(inner: {
|
|
481
|
+
data: string;
|
|
482
|
+
}): {
|
|
483
|
+
readonly tag: CaSource_Tags.Pem;
|
|
484
|
+
readonly inner: Readonly<{
|
|
485
|
+
data: string;
|
|
486
|
+
}>;
|
|
487
|
+
/**
|
|
488
|
+
* @private
|
|
489
|
+
* This field is private and should not be used, use `tag` instead.
|
|
490
|
+
*/
|
|
491
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
492
|
+
};
|
|
493
|
+
instanceOf(obj: any): obj is {
|
|
494
|
+
readonly tag: CaSource_Tags.Pem;
|
|
495
|
+
readonly inner: Readonly<{
|
|
496
|
+
data: string;
|
|
497
|
+
}>;
|
|
498
|
+
/**
|
|
499
|
+
* @private
|
|
500
|
+
* This field is private and should not be used, use `tag` instead.
|
|
501
|
+
*/
|
|
502
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
Spire: {
|
|
506
|
+
new (inner: {
|
|
507
|
+
config: SpireConfig;
|
|
508
|
+
}): {
|
|
509
|
+
readonly tag: CaSource_Tags.Spire;
|
|
510
|
+
readonly inner: Readonly<{
|
|
511
|
+
config: SpireConfig;
|
|
512
|
+
}>;
|
|
513
|
+
/**
|
|
514
|
+
* @private
|
|
515
|
+
* This field is private and should not be used, use `tag` instead.
|
|
516
|
+
*/
|
|
517
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
518
|
+
};
|
|
519
|
+
"new"(inner: {
|
|
520
|
+
config: SpireConfig;
|
|
521
|
+
}): {
|
|
522
|
+
readonly tag: CaSource_Tags.Spire;
|
|
523
|
+
readonly inner: Readonly<{
|
|
524
|
+
config: SpireConfig;
|
|
525
|
+
}>;
|
|
526
|
+
/**
|
|
527
|
+
* @private
|
|
528
|
+
* This field is private and should not be used, use `tag` instead.
|
|
529
|
+
*/
|
|
530
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
531
|
+
};
|
|
532
|
+
instanceOf(obj: any): obj is {
|
|
533
|
+
readonly tag: CaSource_Tags.Spire;
|
|
534
|
+
readonly inner: Readonly<{
|
|
535
|
+
config: SpireConfig;
|
|
536
|
+
}>;
|
|
537
|
+
/**
|
|
538
|
+
* @private
|
|
539
|
+
* This field is private and should not be used, use `tag` instead.
|
|
540
|
+
*/
|
|
541
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
None: {
|
|
545
|
+
new (): {
|
|
546
|
+
readonly tag: CaSource_Tags.None;
|
|
547
|
+
/**
|
|
548
|
+
* @private
|
|
549
|
+
* This field is private and should not be used, use `tag` instead.
|
|
550
|
+
*/
|
|
551
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
552
|
+
};
|
|
553
|
+
"new"(): {
|
|
554
|
+
readonly tag: CaSource_Tags.None;
|
|
555
|
+
/**
|
|
556
|
+
* @private
|
|
557
|
+
* This field is private and should not be used, use `tag` instead.
|
|
558
|
+
*/
|
|
559
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
560
|
+
};
|
|
561
|
+
instanceOf(obj: any): obj is {
|
|
562
|
+
readonly tag: CaSource_Tags.None;
|
|
563
|
+
/**
|
|
564
|
+
* @private
|
|
565
|
+
* This field is private and should not be used, use `tag` instead.
|
|
566
|
+
*/
|
|
567
|
+
readonly [uniffiTypeNameSymbol]: "CaSource";
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
}>;
|
|
571
|
+
/**
|
|
572
|
+
* CA certificate source configuration
|
|
573
|
+
*/
|
|
574
|
+
export type CaSource = InstanceType<typeof CaSource['File' | 'Pem' | 'Spire' | 'None']>;
|
|
575
|
+
/**
|
|
576
|
+
* TLS configuration for client connections
|
|
577
|
+
*/
|
|
578
|
+
export type TlsClientConfig = {
|
|
579
|
+
/**
|
|
580
|
+
* Disable TLS entirely (plain text connection)
|
|
581
|
+
*/
|
|
582
|
+
insecure: boolean;
|
|
583
|
+
/**
|
|
584
|
+
* Skip server certificate verification (enables TLS but doesn't verify certs)
|
|
585
|
+
* WARNING: Only use for testing - insecure in production!
|
|
586
|
+
*/
|
|
587
|
+
insecureSkipVerify: boolean;
|
|
588
|
+
/**
|
|
589
|
+
* Certificate and key source for client authentication
|
|
590
|
+
*/
|
|
591
|
+
source: TlsSource;
|
|
592
|
+
/**
|
|
593
|
+
* CA certificate source for verifying server certificates
|
|
594
|
+
*/
|
|
595
|
+
caSource: CaSource;
|
|
596
|
+
/**
|
|
597
|
+
* Include system CA certificates pool (default: true)
|
|
598
|
+
*/
|
|
599
|
+
includeSystemCaCertsPool: boolean;
|
|
600
|
+
/**
|
|
601
|
+
* TLS version to use: "tls1.2" or "tls1.3" (default: "tls1.3")
|
|
602
|
+
*/
|
|
603
|
+
tlsVersion: string;
|
|
604
|
+
};
|
|
605
|
+
/**
|
|
606
|
+
* Generated factory for {@link TlsClientConfig} record objects.
|
|
607
|
+
*/
|
|
608
|
+
export declare const TlsClientConfig: Readonly<{
|
|
609
|
+
create: (partial: Partial<TlsClientConfig> & Required<Omit<TlsClientConfig, "insecure" | "insecureSkipVerify" | "source" | "caSource" | "includeSystemCaCertsPool" | "tlsVersion">>) => TlsClientConfig;
|
|
610
|
+
new: (partial: Partial<TlsClientConfig> & Required<Omit<TlsClientConfig, "insecure" | "insecureSkipVerify" | "source" | "caSource" | "includeSystemCaCertsPool" | "tlsVersion">>) => TlsClientConfig;
|
|
611
|
+
defaults: () => Partial<TlsClientConfig>;
|
|
612
|
+
}>;
|
|
613
|
+
/**
|
|
614
|
+
* Compression type for gRPC messages
|
|
615
|
+
*/
|
|
616
|
+
export declare enum CompressionType {
|
|
617
|
+
Gzip = 0,
|
|
618
|
+
Zlib = 1,
|
|
619
|
+
Deflate = 2,
|
|
620
|
+
Snappy = 3,
|
|
621
|
+
Zstd = 4,
|
|
622
|
+
Lz4 = 5,
|
|
623
|
+
None = 6,
|
|
624
|
+
Empty = 7
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Keepalive configuration for the client
|
|
628
|
+
*/
|
|
629
|
+
export type KeepaliveConfig = {
|
|
630
|
+
/**
|
|
631
|
+
* TCP keepalive duration
|
|
632
|
+
*/
|
|
633
|
+
tcpKeepalive: number;
|
|
634
|
+
/**
|
|
635
|
+
* HTTP2 keepalive duration
|
|
636
|
+
*/
|
|
637
|
+
http2Keepalive: number;
|
|
638
|
+
/**
|
|
639
|
+
* Keepalive timeout
|
|
640
|
+
*/
|
|
641
|
+
timeout: number;
|
|
642
|
+
/**
|
|
643
|
+
* Whether to permit keepalive without an active stream
|
|
644
|
+
*/
|
|
645
|
+
keepAliveWhileIdle: boolean;
|
|
646
|
+
};
|
|
647
|
+
/**
|
|
648
|
+
* Generated factory for {@link KeepaliveConfig} record objects.
|
|
649
|
+
*/
|
|
650
|
+
export declare const KeepaliveConfig: Readonly<{
|
|
651
|
+
create: (partial: Partial<KeepaliveConfig> & Required<Omit<KeepaliveConfig, "tcpKeepalive" | "http2Keepalive" | "timeout" | "keepAliveWhileIdle">>) => KeepaliveConfig;
|
|
652
|
+
new: (partial: Partial<KeepaliveConfig> & Required<Omit<KeepaliveConfig, "tcpKeepalive" | "http2Keepalive" | "timeout" | "keepAliveWhileIdle">>) => KeepaliveConfig;
|
|
653
|
+
defaults: () => Partial<KeepaliveConfig>;
|
|
654
|
+
}>;
|
|
655
|
+
/**
|
|
656
|
+
* HTTP Proxy configuration
|
|
657
|
+
*/
|
|
658
|
+
export type ProxyConfig = {
|
|
659
|
+
/**
|
|
660
|
+
* The HTTP proxy URL (e.g., "http://proxy.example.com:8080")
|
|
661
|
+
*/
|
|
662
|
+
url?: string;
|
|
663
|
+
/**
|
|
664
|
+
* TLS configuration for proxy connection
|
|
665
|
+
*/
|
|
666
|
+
tls: TlsClientConfig;
|
|
667
|
+
/**
|
|
668
|
+
* Optional username for proxy authentication
|
|
669
|
+
*/
|
|
670
|
+
username?: string;
|
|
671
|
+
/**
|
|
672
|
+
* Optional password for proxy authentication
|
|
673
|
+
*/
|
|
674
|
+
password?: string;
|
|
675
|
+
/**
|
|
676
|
+
* Headers to send with proxy requests
|
|
677
|
+
*/
|
|
678
|
+
headers: Map<string, string>;
|
|
679
|
+
};
|
|
680
|
+
/**
|
|
681
|
+
* Generated factory for {@link ProxyConfig} record objects.
|
|
682
|
+
*/
|
|
683
|
+
export declare const ProxyConfig: Readonly<{
|
|
684
|
+
create: (partial: Partial<ProxyConfig> & Required<Omit<ProxyConfig, "username" | "password" | "url" | "tls" | "headers">>) => ProxyConfig;
|
|
685
|
+
new: (partial: Partial<ProxyConfig> & Required<Omit<ProxyConfig, "username" | "password" | "url" | "tls" | "headers">>) => ProxyConfig;
|
|
686
|
+
defaults: () => Partial<ProxyConfig>;
|
|
687
|
+
}>;
|
|
688
|
+
/**
|
|
689
|
+
* Static JWT (Bearer token) authentication configuration
|
|
690
|
+
* The token is loaded from a file and automatically reloaded when changed
|
|
691
|
+
*/
|
|
692
|
+
export type StaticJwtAuth = {
|
|
693
|
+
/**
|
|
694
|
+
* Path to file containing the JWT token
|
|
695
|
+
*/
|
|
696
|
+
tokenFile: string;
|
|
697
|
+
/**
|
|
698
|
+
* Duration for caching the token before re-reading from file (default: 3600 seconds)
|
|
699
|
+
*/
|
|
700
|
+
duration: number;
|
|
701
|
+
};
|
|
702
|
+
/**
|
|
703
|
+
* Generated factory for {@link StaticJwtAuth} record objects.
|
|
704
|
+
*/
|
|
705
|
+
export declare const StaticJwtAuth: Readonly<{
|
|
706
|
+
create: (partial: Partial<StaticJwtAuth> & Required<Omit<StaticJwtAuth, "tokenFile" | "duration">>) => StaticJwtAuth;
|
|
707
|
+
new: (partial: Partial<StaticJwtAuth> & Required<Omit<StaticJwtAuth, "tokenFile" | "duration">>) => StaticJwtAuth;
|
|
708
|
+
defaults: () => Partial<StaticJwtAuth>;
|
|
709
|
+
}>;
|
|
710
|
+
/**
|
|
711
|
+
* JWT signing/verification algorithm
|
|
712
|
+
*/
|
|
713
|
+
export declare enum JwtAlgorithm {
|
|
714
|
+
Hs256 = 0,
|
|
715
|
+
Hs384 = 1,
|
|
716
|
+
Hs512 = 2,
|
|
717
|
+
Es256 = 3,
|
|
718
|
+
Es384 = 4,
|
|
719
|
+
Rs256 = 5,
|
|
720
|
+
Rs384 = 6,
|
|
721
|
+
Rs512 = 7,
|
|
722
|
+
Ps256 = 8,
|
|
723
|
+
Ps384 = 9,
|
|
724
|
+
Ps512 = 10,
|
|
725
|
+
EdDsa = 11
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* JWT key format
|
|
729
|
+
*/
|
|
730
|
+
export declare enum JwtKeyFormat {
|
|
731
|
+
Pem = 0,
|
|
732
|
+
Jwk = 1,
|
|
733
|
+
Jwks = 2
|
|
734
|
+
}
|
|
735
|
+
export declare enum JwtKeyData_Tags {
|
|
736
|
+
Data = "Data",
|
|
737
|
+
File = "File"
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* JWT key data source
|
|
741
|
+
*/
|
|
742
|
+
export declare const JwtKeyData: Readonly<{
|
|
743
|
+
instanceOf: (obj: any) => obj is JwtKeyData;
|
|
744
|
+
Data: {
|
|
745
|
+
new (inner: {
|
|
746
|
+
value: string;
|
|
747
|
+
}): {
|
|
748
|
+
readonly tag: JwtKeyData_Tags.Data;
|
|
749
|
+
readonly inner: Readonly<{
|
|
750
|
+
value: string;
|
|
751
|
+
}>;
|
|
752
|
+
/**
|
|
753
|
+
* @private
|
|
754
|
+
* This field is private and should not be used, use `tag` instead.
|
|
755
|
+
*/
|
|
756
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyData";
|
|
757
|
+
};
|
|
758
|
+
"new"(inner: {
|
|
759
|
+
value: string;
|
|
760
|
+
}): {
|
|
761
|
+
readonly tag: JwtKeyData_Tags.Data;
|
|
762
|
+
readonly inner: Readonly<{
|
|
763
|
+
value: string;
|
|
764
|
+
}>;
|
|
765
|
+
/**
|
|
766
|
+
* @private
|
|
767
|
+
* This field is private and should not be used, use `tag` instead.
|
|
768
|
+
*/
|
|
769
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyData";
|
|
770
|
+
};
|
|
771
|
+
instanceOf(obj: any): obj is {
|
|
772
|
+
readonly tag: JwtKeyData_Tags.Data;
|
|
773
|
+
readonly inner: Readonly<{
|
|
774
|
+
value: string;
|
|
775
|
+
}>;
|
|
776
|
+
/**
|
|
777
|
+
* @private
|
|
778
|
+
* This field is private and should not be used, use `tag` instead.
|
|
779
|
+
*/
|
|
780
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyData";
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
File: {
|
|
784
|
+
new (inner: {
|
|
785
|
+
path: string;
|
|
786
|
+
}): {
|
|
787
|
+
readonly tag: JwtKeyData_Tags.File;
|
|
788
|
+
readonly inner: Readonly<{
|
|
789
|
+
path: string;
|
|
790
|
+
}>;
|
|
791
|
+
/**
|
|
792
|
+
* @private
|
|
793
|
+
* This field is private and should not be used, use `tag` instead.
|
|
794
|
+
*/
|
|
795
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyData";
|
|
796
|
+
};
|
|
797
|
+
"new"(inner: {
|
|
798
|
+
path: string;
|
|
799
|
+
}): {
|
|
800
|
+
readonly tag: JwtKeyData_Tags.File;
|
|
801
|
+
readonly inner: Readonly<{
|
|
802
|
+
path: string;
|
|
803
|
+
}>;
|
|
804
|
+
/**
|
|
805
|
+
* @private
|
|
806
|
+
* This field is private and should not be used, use `tag` instead.
|
|
807
|
+
*/
|
|
808
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyData";
|
|
809
|
+
};
|
|
810
|
+
instanceOf(obj: any): obj is {
|
|
811
|
+
readonly tag: JwtKeyData_Tags.File;
|
|
812
|
+
readonly inner: Readonly<{
|
|
813
|
+
path: string;
|
|
814
|
+
}>;
|
|
815
|
+
/**
|
|
816
|
+
* @private
|
|
817
|
+
* This field is private and should not be used, use `tag` instead.
|
|
818
|
+
*/
|
|
819
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyData";
|
|
820
|
+
};
|
|
821
|
+
};
|
|
822
|
+
}>;
|
|
823
|
+
/**
|
|
824
|
+
* JWT key data source
|
|
825
|
+
*/
|
|
826
|
+
export type JwtKeyData = InstanceType<typeof JwtKeyData['Data' | 'File']>;
|
|
827
|
+
/**
|
|
828
|
+
* JWT key configuration
|
|
829
|
+
*/
|
|
830
|
+
export type JwtKeyConfig = {
|
|
831
|
+
/**
|
|
832
|
+
* Algorithm used for signing/verifying the JWT
|
|
833
|
+
*/
|
|
834
|
+
algorithm: JwtAlgorithm;
|
|
835
|
+
/**
|
|
836
|
+
* Key format - PEM, JWK or JWKS
|
|
837
|
+
*/
|
|
838
|
+
format: JwtKeyFormat;
|
|
839
|
+
/**
|
|
840
|
+
* Encoded key or file path
|
|
841
|
+
*/
|
|
842
|
+
key: JwtKeyData;
|
|
843
|
+
};
|
|
844
|
+
/**
|
|
845
|
+
* Generated factory for {@link JwtKeyConfig} record objects.
|
|
846
|
+
*/
|
|
847
|
+
export declare const JwtKeyConfig: Readonly<{
|
|
848
|
+
create: (partial: Partial<JwtKeyConfig> & Required<Omit<JwtKeyConfig, "key" | "algorithm" | "format">>) => JwtKeyConfig;
|
|
849
|
+
new: (partial: Partial<JwtKeyConfig> & Required<Omit<JwtKeyConfig, "key" | "algorithm" | "format">>) => JwtKeyConfig;
|
|
850
|
+
defaults: () => Partial<JwtKeyConfig>;
|
|
851
|
+
}>;
|
|
852
|
+
export declare enum JwtKeyType_Tags {
|
|
853
|
+
Encoding = "Encoding",
|
|
854
|
+
Decoding = "Decoding",
|
|
855
|
+
Autoresolve = "Autoresolve"
|
|
856
|
+
}
|
|
857
|
+
/**
|
|
858
|
+
* JWT key type (encoding, decoding, or autoresolve)
|
|
859
|
+
*/
|
|
860
|
+
export declare const JwtKeyType: Readonly<{
|
|
861
|
+
instanceOf: (obj: any) => obj is JwtKeyType;
|
|
862
|
+
Encoding: {
|
|
863
|
+
new (inner: {
|
|
864
|
+
key: JwtKeyConfig;
|
|
865
|
+
}): {
|
|
866
|
+
readonly tag: JwtKeyType_Tags.Encoding;
|
|
867
|
+
readonly inner: Readonly<{
|
|
868
|
+
key: JwtKeyConfig;
|
|
869
|
+
}>;
|
|
870
|
+
/**
|
|
871
|
+
* @private
|
|
872
|
+
* This field is private and should not be used, use `tag` instead.
|
|
873
|
+
*/
|
|
874
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyType";
|
|
875
|
+
};
|
|
876
|
+
"new"(inner: {
|
|
877
|
+
key: JwtKeyConfig;
|
|
878
|
+
}): {
|
|
879
|
+
readonly tag: JwtKeyType_Tags.Encoding;
|
|
880
|
+
readonly inner: Readonly<{
|
|
881
|
+
key: JwtKeyConfig;
|
|
882
|
+
}>;
|
|
883
|
+
/**
|
|
884
|
+
* @private
|
|
885
|
+
* This field is private and should not be used, use `tag` instead.
|
|
886
|
+
*/
|
|
887
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyType";
|
|
888
|
+
};
|
|
889
|
+
instanceOf(obj: any): obj is {
|
|
890
|
+
readonly tag: JwtKeyType_Tags.Encoding;
|
|
891
|
+
readonly inner: Readonly<{
|
|
892
|
+
key: JwtKeyConfig;
|
|
893
|
+
}>;
|
|
894
|
+
/**
|
|
895
|
+
* @private
|
|
896
|
+
* This field is private and should not be used, use `tag` instead.
|
|
897
|
+
*/
|
|
898
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyType";
|
|
899
|
+
};
|
|
900
|
+
};
|
|
901
|
+
Decoding: {
|
|
902
|
+
new (inner: {
|
|
903
|
+
key: JwtKeyConfig;
|
|
904
|
+
}): {
|
|
905
|
+
readonly tag: JwtKeyType_Tags.Decoding;
|
|
906
|
+
readonly inner: Readonly<{
|
|
907
|
+
key: JwtKeyConfig;
|
|
908
|
+
}>;
|
|
909
|
+
/**
|
|
910
|
+
* @private
|
|
911
|
+
* This field is private and should not be used, use `tag` instead.
|
|
912
|
+
*/
|
|
913
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyType";
|
|
914
|
+
};
|
|
915
|
+
"new"(inner: {
|
|
916
|
+
key: JwtKeyConfig;
|
|
917
|
+
}): {
|
|
918
|
+
readonly tag: JwtKeyType_Tags.Decoding;
|
|
919
|
+
readonly inner: Readonly<{
|
|
920
|
+
key: JwtKeyConfig;
|
|
921
|
+
}>;
|
|
922
|
+
/**
|
|
923
|
+
* @private
|
|
924
|
+
* This field is private and should not be used, use `tag` instead.
|
|
925
|
+
*/
|
|
926
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyType";
|
|
927
|
+
};
|
|
928
|
+
instanceOf(obj: any): obj is {
|
|
929
|
+
readonly tag: JwtKeyType_Tags.Decoding;
|
|
930
|
+
readonly inner: Readonly<{
|
|
931
|
+
key: JwtKeyConfig;
|
|
932
|
+
}>;
|
|
933
|
+
/**
|
|
934
|
+
* @private
|
|
935
|
+
* This field is private and should not be used, use `tag` instead.
|
|
936
|
+
*/
|
|
937
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyType";
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
Autoresolve: {
|
|
941
|
+
new (): {
|
|
942
|
+
readonly tag: JwtKeyType_Tags.Autoresolve;
|
|
943
|
+
/**
|
|
944
|
+
* @private
|
|
945
|
+
* This field is private and should not be used, use `tag` instead.
|
|
946
|
+
*/
|
|
947
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyType";
|
|
948
|
+
};
|
|
949
|
+
"new"(): {
|
|
950
|
+
readonly tag: JwtKeyType_Tags.Autoresolve;
|
|
951
|
+
/**
|
|
952
|
+
* @private
|
|
953
|
+
* This field is private and should not be used, use `tag` instead.
|
|
954
|
+
*/
|
|
955
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyType";
|
|
956
|
+
};
|
|
957
|
+
instanceOf(obj: any): obj is {
|
|
958
|
+
readonly tag: JwtKeyType_Tags.Autoresolve;
|
|
959
|
+
/**
|
|
960
|
+
* @private
|
|
961
|
+
* This field is private and should not be used, use `tag` instead.
|
|
962
|
+
*/
|
|
963
|
+
readonly [uniffiTypeNameSymbol]: "JwtKeyType";
|
|
964
|
+
};
|
|
965
|
+
};
|
|
966
|
+
}>;
|
|
967
|
+
/**
|
|
968
|
+
* JWT key type (encoding, decoding, or autoresolve)
|
|
969
|
+
*/
|
|
970
|
+
export type JwtKeyType = InstanceType<typeof JwtKeyType['Encoding' | 'Decoding' | 'Autoresolve']>;
|
|
971
|
+
/**
|
|
972
|
+
* JWT authentication configuration for client-side signing
|
|
973
|
+
*/
|
|
974
|
+
export type ClientJwtAuth = {
|
|
975
|
+
/**
|
|
976
|
+
* JWT key configuration (encoding key for signing)
|
|
977
|
+
*/
|
|
978
|
+
key: JwtKeyType;
|
|
979
|
+
/**
|
|
980
|
+
* JWT audience claims to include
|
|
981
|
+
*/
|
|
982
|
+
audience?: Array<string>;
|
|
983
|
+
/**
|
|
984
|
+
* JWT issuer to include
|
|
985
|
+
*/
|
|
986
|
+
issuer?: string;
|
|
987
|
+
/**
|
|
988
|
+
* JWT subject to include
|
|
989
|
+
*/
|
|
990
|
+
subject?: string;
|
|
991
|
+
/**
|
|
992
|
+
* Token validity duration (default: 3600 seconds)
|
|
993
|
+
*/
|
|
994
|
+
duration: number;
|
|
995
|
+
};
|
|
996
|
+
/**
|
|
997
|
+
* Generated factory for {@link ClientJwtAuth} record objects.
|
|
998
|
+
*/
|
|
999
|
+
export declare const ClientJwtAuth: Readonly<{
|
|
1000
|
+
create: (partial: Partial<ClientJwtAuth> & Required<Omit<ClientJwtAuth, "key" | "duration" | "audience" | "issuer" | "subject">>) => ClientJwtAuth;
|
|
1001
|
+
new: (partial: Partial<ClientJwtAuth> & Required<Omit<ClientJwtAuth, "key" | "duration" | "audience" | "issuer" | "subject">>) => ClientJwtAuth;
|
|
1002
|
+
defaults: () => Partial<ClientJwtAuth>;
|
|
1003
|
+
}>;
|
|
1004
|
+
export declare enum ClientAuthenticationConfig_Tags {
|
|
1005
|
+
Basic = "Basic",
|
|
1006
|
+
StaticJwt = "StaticJwt",
|
|
1007
|
+
Jwt = "Jwt",
|
|
1008
|
+
Spire = "Spire",
|
|
1009
|
+
None = "None"
|
|
1010
|
+
}
|
|
1011
|
+
/**
|
|
1012
|
+
* Authentication configuration enum for client
|
|
1013
|
+
*/
|
|
1014
|
+
export declare const ClientAuthenticationConfig: Readonly<{
|
|
1015
|
+
instanceOf: (obj: any) => obj is ClientAuthenticationConfig;
|
|
1016
|
+
Basic: {
|
|
1017
|
+
new (inner: {
|
|
1018
|
+
config: BasicAuth;
|
|
1019
|
+
}): {
|
|
1020
|
+
readonly tag: ClientAuthenticationConfig_Tags.Basic;
|
|
1021
|
+
readonly inner: Readonly<{
|
|
1022
|
+
config: BasicAuth;
|
|
1023
|
+
}>;
|
|
1024
|
+
/**
|
|
1025
|
+
* @private
|
|
1026
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1027
|
+
*/
|
|
1028
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1029
|
+
};
|
|
1030
|
+
"new"(inner: {
|
|
1031
|
+
config: BasicAuth;
|
|
1032
|
+
}): {
|
|
1033
|
+
readonly tag: ClientAuthenticationConfig_Tags.Basic;
|
|
1034
|
+
readonly inner: Readonly<{
|
|
1035
|
+
config: BasicAuth;
|
|
1036
|
+
}>;
|
|
1037
|
+
/**
|
|
1038
|
+
* @private
|
|
1039
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1040
|
+
*/
|
|
1041
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1042
|
+
};
|
|
1043
|
+
instanceOf(obj: any): obj is {
|
|
1044
|
+
readonly tag: ClientAuthenticationConfig_Tags.Basic;
|
|
1045
|
+
readonly inner: Readonly<{
|
|
1046
|
+
config: BasicAuth;
|
|
1047
|
+
}>;
|
|
1048
|
+
/**
|
|
1049
|
+
* @private
|
|
1050
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1051
|
+
*/
|
|
1052
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1053
|
+
};
|
|
1054
|
+
};
|
|
1055
|
+
StaticJwt: {
|
|
1056
|
+
new (inner: {
|
|
1057
|
+
config: StaticJwtAuth;
|
|
1058
|
+
}): {
|
|
1059
|
+
readonly tag: ClientAuthenticationConfig_Tags.StaticJwt;
|
|
1060
|
+
readonly inner: Readonly<{
|
|
1061
|
+
config: StaticJwtAuth;
|
|
1062
|
+
}>;
|
|
1063
|
+
/**
|
|
1064
|
+
* @private
|
|
1065
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1066
|
+
*/
|
|
1067
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1068
|
+
};
|
|
1069
|
+
"new"(inner: {
|
|
1070
|
+
config: StaticJwtAuth;
|
|
1071
|
+
}): {
|
|
1072
|
+
readonly tag: ClientAuthenticationConfig_Tags.StaticJwt;
|
|
1073
|
+
readonly inner: Readonly<{
|
|
1074
|
+
config: StaticJwtAuth;
|
|
1075
|
+
}>;
|
|
1076
|
+
/**
|
|
1077
|
+
* @private
|
|
1078
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1079
|
+
*/
|
|
1080
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1081
|
+
};
|
|
1082
|
+
instanceOf(obj: any): obj is {
|
|
1083
|
+
readonly tag: ClientAuthenticationConfig_Tags.StaticJwt;
|
|
1084
|
+
readonly inner: Readonly<{
|
|
1085
|
+
config: StaticJwtAuth;
|
|
1086
|
+
}>;
|
|
1087
|
+
/**
|
|
1088
|
+
* @private
|
|
1089
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1090
|
+
*/
|
|
1091
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
Jwt: {
|
|
1095
|
+
new (inner: {
|
|
1096
|
+
config: ClientJwtAuth;
|
|
1097
|
+
}): {
|
|
1098
|
+
readonly tag: ClientAuthenticationConfig_Tags.Jwt;
|
|
1099
|
+
readonly inner: Readonly<{
|
|
1100
|
+
config: ClientJwtAuth;
|
|
1101
|
+
}>;
|
|
1102
|
+
/**
|
|
1103
|
+
* @private
|
|
1104
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1105
|
+
*/
|
|
1106
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1107
|
+
};
|
|
1108
|
+
"new"(inner: {
|
|
1109
|
+
config: ClientJwtAuth;
|
|
1110
|
+
}): {
|
|
1111
|
+
readonly tag: ClientAuthenticationConfig_Tags.Jwt;
|
|
1112
|
+
readonly inner: Readonly<{
|
|
1113
|
+
config: ClientJwtAuth;
|
|
1114
|
+
}>;
|
|
1115
|
+
/**
|
|
1116
|
+
* @private
|
|
1117
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1118
|
+
*/
|
|
1119
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1120
|
+
};
|
|
1121
|
+
instanceOf(obj: any): obj is {
|
|
1122
|
+
readonly tag: ClientAuthenticationConfig_Tags.Jwt;
|
|
1123
|
+
readonly inner: Readonly<{
|
|
1124
|
+
config: ClientJwtAuth;
|
|
1125
|
+
}>;
|
|
1126
|
+
/**
|
|
1127
|
+
* @private
|
|
1128
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1129
|
+
*/
|
|
1130
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1131
|
+
};
|
|
1132
|
+
};
|
|
1133
|
+
Spire: {
|
|
1134
|
+
new (inner: {
|
|
1135
|
+
config: SpireConfig;
|
|
1136
|
+
}): {
|
|
1137
|
+
readonly tag: ClientAuthenticationConfig_Tags.Spire;
|
|
1138
|
+
readonly inner: Readonly<{
|
|
1139
|
+
config: SpireConfig;
|
|
1140
|
+
}>;
|
|
1141
|
+
/**
|
|
1142
|
+
* @private
|
|
1143
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1144
|
+
*/
|
|
1145
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1146
|
+
};
|
|
1147
|
+
"new"(inner: {
|
|
1148
|
+
config: SpireConfig;
|
|
1149
|
+
}): {
|
|
1150
|
+
readonly tag: ClientAuthenticationConfig_Tags.Spire;
|
|
1151
|
+
readonly inner: Readonly<{
|
|
1152
|
+
config: SpireConfig;
|
|
1153
|
+
}>;
|
|
1154
|
+
/**
|
|
1155
|
+
* @private
|
|
1156
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1157
|
+
*/
|
|
1158
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1159
|
+
};
|
|
1160
|
+
instanceOf(obj: any): obj is {
|
|
1161
|
+
readonly tag: ClientAuthenticationConfig_Tags.Spire;
|
|
1162
|
+
readonly inner: Readonly<{
|
|
1163
|
+
config: SpireConfig;
|
|
1164
|
+
}>;
|
|
1165
|
+
/**
|
|
1166
|
+
* @private
|
|
1167
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1168
|
+
*/
|
|
1169
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1170
|
+
};
|
|
1171
|
+
};
|
|
1172
|
+
None: {
|
|
1173
|
+
new (): {
|
|
1174
|
+
readonly tag: ClientAuthenticationConfig_Tags.None;
|
|
1175
|
+
/**
|
|
1176
|
+
* @private
|
|
1177
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1178
|
+
*/
|
|
1179
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1180
|
+
};
|
|
1181
|
+
"new"(): {
|
|
1182
|
+
readonly tag: ClientAuthenticationConfig_Tags.None;
|
|
1183
|
+
/**
|
|
1184
|
+
* @private
|
|
1185
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1186
|
+
*/
|
|
1187
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1188
|
+
};
|
|
1189
|
+
instanceOf(obj: any): obj is {
|
|
1190
|
+
readonly tag: ClientAuthenticationConfig_Tags.None;
|
|
1191
|
+
/**
|
|
1192
|
+
* @private
|
|
1193
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1194
|
+
*/
|
|
1195
|
+
readonly [uniffiTypeNameSymbol]: "ClientAuthenticationConfig";
|
|
1196
|
+
};
|
|
1197
|
+
};
|
|
1198
|
+
}>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Authentication configuration enum for client
|
|
1201
|
+
*/
|
|
1202
|
+
export type ClientAuthenticationConfig = InstanceType<typeof ClientAuthenticationConfig['Basic' | 'StaticJwt' | 'Jwt' | 'Spire' | 'None']>;
|
|
1203
|
+
/**
|
|
1204
|
+
* Exponential backoff configuration
|
|
1205
|
+
*/
|
|
1206
|
+
export type ExponentialBackoff = {
|
|
1207
|
+
/**
|
|
1208
|
+
* Base delay
|
|
1209
|
+
*/
|
|
1210
|
+
base: number;
|
|
1211
|
+
/**
|
|
1212
|
+
* Multiplication factor for each retry
|
|
1213
|
+
*/
|
|
1214
|
+
factor: bigint;
|
|
1215
|
+
/**
|
|
1216
|
+
* Maximum delay
|
|
1217
|
+
*/
|
|
1218
|
+
maxDelay: number;
|
|
1219
|
+
/**
|
|
1220
|
+
* Maximum number of retry attempts
|
|
1221
|
+
*/
|
|
1222
|
+
maxAttempts: bigint;
|
|
1223
|
+
/**
|
|
1224
|
+
* Whether to add random jitter to delays
|
|
1225
|
+
*/
|
|
1226
|
+
jitter: boolean;
|
|
1227
|
+
};
|
|
1228
|
+
/**
|
|
1229
|
+
* Generated factory for {@link ExponentialBackoff} record objects.
|
|
1230
|
+
*/
|
|
1231
|
+
export declare const ExponentialBackoff: Readonly<{
|
|
1232
|
+
create: (partial: Partial<ExponentialBackoff> & Required<Omit<ExponentialBackoff, "base" | "factor" | "maxDelay" | "maxAttempts" | "jitter">>) => ExponentialBackoff;
|
|
1233
|
+
new: (partial: Partial<ExponentialBackoff> & Required<Omit<ExponentialBackoff, "base" | "factor" | "maxDelay" | "maxAttempts" | "jitter">>) => ExponentialBackoff;
|
|
1234
|
+
defaults: () => Partial<ExponentialBackoff>;
|
|
1235
|
+
}>;
|
|
1236
|
+
/**
|
|
1237
|
+
* Fixed interval backoff configuration
|
|
1238
|
+
*/
|
|
1239
|
+
export type FixedIntervalBackoff = {
|
|
1240
|
+
/**
|
|
1241
|
+
* Fixed interval between retries
|
|
1242
|
+
*/
|
|
1243
|
+
interval: number;
|
|
1244
|
+
/**
|
|
1245
|
+
* Maximum number of retry attempts
|
|
1246
|
+
*/
|
|
1247
|
+
maxAttempts: bigint;
|
|
1248
|
+
};
|
|
1249
|
+
/**
|
|
1250
|
+
* Generated factory for {@link FixedIntervalBackoff} record objects.
|
|
1251
|
+
*/
|
|
1252
|
+
export declare const FixedIntervalBackoff: Readonly<{
|
|
1253
|
+
create: (partial: Partial<FixedIntervalBackoff> & Required<Omit<FixedIntervalBackoff, "maxAttempts" | "interval">>) => FixedIntervalBackoff;
|
|
1254
|
+
new: (partial: Partial<FixedIntervalBackoff> & Required<Omit<FixedIntervalBackoff, "maxAttempts" | "interval">>) => FixedIntervalBackoff;
|
|
1255
|
+
defaults: () => Partial<FixedIntervalBackoff>;
|
|
1256
|
+
}>;
|
|
1257
|
+
export declare enum BackoffConfig_Tags {
|
|
1258
|
+
Exponential = "Exponential",
|
|
1259
|
+
FixedInterval = "FixedInterval"
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* Backoff retry configuration
|
|
1263
|
+
*/
|
|
1264
|
+
export declare const BackoffConfig: Readonly<{
|
|
1265
|
+
instanceOf: (obj: any) => obj is BackoffConfig;
|
|
1266
|
+
Exponential: {
|
|
1267
|
+
new (inner: {
|
|
1268
|
+
config: ExponentialBackoff;
|
|
1269
|
+
}): {
|
|
1270
|
+
readonly tag: BackoffConfig_Tags.Exponential;
|
|
1271
|
+
readonly inner: Readonly<{
|
|
1272
|
+
config: ExponentialBackoff;
|
|
1273
|
+
}>;
|
|
1274
|
+
/**
|
|
1275
|
+
* @private
|
|
1276
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1277
|
+
*/
|
|
1278
|
+
readonly [uniffiTypeNameSymbol]: "BackoffConfig";
|
|
1279
|
+
};
|
|
1280
|
+
"new"(inner: {
|
|
1281
|
+
config: ExponentialBackoff;
|
|
1282
|
+
}): {
|
|
1283
|
+
readonly tag: BackoffConfig_Tags.Exponential;
|
|
1284
|
+
readonly inner: Readonly<{
|
|
1285
|
+
config: ExponentialBackoff;
|
|
1286
|
+
}>;
|
|
1287
|
+
/**
|
|
1288
|
+
* @private
|
|
1289
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1290
|
+
*/
|
|
1291
|
+
readonly [uniffiTypeNameSymbol]: "BackoffConfig";
|
|
1292
|
+
};
|
|
1293
|
+
instanceOf(obj: any): obj is {
|
|
1294
|
+
readonly tag: BackoffConfig_Tags.Exponential;
|
|
1295
|
+
readonly inner: Readonly<{
|
|
1296
|
+
config: ExponentialBackoff;
|
|
1297
|
+
}>;
|
|
1298
|
+
/**
|
|
1299
|
+
* @private
|
|
1300
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1301
|
+
*/
|
|
1302
|
+
readonly [uniffiTypeNameSymbol]: "BackoffConfig";
|
|
1303
|
+
};
|
|
1304
|
+
};
|
|
1305
|
+
FixedInterval: {
|
|
1306
|
+
new (inner: {
|
|
1307
|
+
config: FixedIntervalBackoff;
|
|
1308
|
+
}): {
|
|
1309
|
+
readonly tag: BackoffConfig_Tags.FixedInterval;
|
|
1310
|
+
readonly inner: Readonly<{
|
|
1311
|
+
config: FixedIntervalBackoff;
|
|
1312
|
+
}>;
|
|
1313
|
+
/**
|
|
1314
|
+
* @private
|
|
1315
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1316
|
+
*/
|
|
1317
|
+
readonly [uniffiTypeNameSymbol]: "BackoffConfig";
|
|
1318
|
+
};
|
|
1319
|
+
"new"(inner: {
|
|
1320
|
+
config: FixedIntervalBackoff;
|
|
1321
|
+
}): {
|
|
1322
|
+
readonly tag: BackoffConfig_Tags.FixedInterval;
|
|
1323
|
+
readonly inner: Readonly<{
|
|
1324
|
+
config: FixedIntervalBackoff;
|
|
1325
|
+
}>;
|
|
1326
|
+
/**
|
|
1327
|
+
* @private
|
|
1328
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1329
|
+
*/
|
|
1330
|
+
readonly [uniffiTypeNameSymbol]: "BackoffConfig";
|
|
1331
|
+
};
|
|
1332
|
+
instanceOf(obj: any): obj is {
|
|
1333
|
+
readonly tag: BackoffConfig_Tags.FixedInterval;
|
|
1334
|
+
readonly inner: Readonly<{
|
|
1335
|
+
config: FixedIntervalBackoff;
|
|
1336
|
+
}>;
|
|
1337
|
+
/**
|
|
1338
|
+
* @private
|
|
1339
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1340
|
+
*/
|
|
1341
|
+
readonly [uniffiTypeNameSymbol]: "BackoffConfig";
|
|
1342
|
+
};
|
|
1343
|
+
};
|
|
1344
|
+
}>;
|
|
1345
|
+
/**
|
|
1346
|
+
* Backoff retry configuration
|
|
1347
|
+
*/
|
|
1348
|
+
export type BackoffConfig = InstanceType<typeof BackoffConfig['Exponential' | 'FixedInterval']>;
|
|
1349
|
+
/**
|
|
1350
|
+
* Client configuration for connecting to a SLIM server
|
|
1351
|
+
*/
|
|
1352
|
+
export type ClientConfig = {
|
|
1353
|
+
/**
|
|
1354
|
+
* The target endpoint the client will connect to.
|
|
1355
|
+
*
|
|
1356
|
+
* The transport protocol is inferred from the endpoint scheme:
|
|
1357
|
+
* `ws://`/`wss://` → WebSocket, otherwise gRPC.
|
|
1358
|
+
*/
|
|
1359
|
+
endpoint: string;
|
|
1360
|
+
/**
|
|
1361
|
+
* TLS client configuration
|
|
1362
|
+
*/
|
|
1363
|
+
tls: TlsClientConfig;
|
|
1364
|
+
/**
|
|
1365
|
+
* Origin (HTTP Host authority override) for the client
|
|
1366
|
+
*/
|
|
1367
|
+
origin?: string;
|
|
1368
|
+
/**
|
|
1369
|
+
* Optional TLS SNI server name override
|
|
1370
|
+
*/
|
|
1371
|
+
serverName?: string;
|
|
1372
|
+
/**
|
|
1373
|
+
* Compression type
|
|
1374
|
+
*/
|
|
1375
|
+
compression?: CompressionType;
|
|
1376
|
+
/**
|
|
1377
|
+
* Rate limit string (e.g., "100/s" for 100 requests per second)
|
|
1378
|
+
*/
|
|
1379
|
+
rateLimit?: string;
|
|
1380
|
+
/**
|
|
1381
|
+
* Keepalive parameters
|
|
1382
|
+
*/
|
|
1383
|
+
keepalive?: KeepaliveConfig;
|
|
1384
|
+
/**
|
|
1385
|
+
* HTTP Proxy configuration
|
|
1386
|
+
*/
|
|
1387
|
+
proxy?: ProxyConfig;
|
|
1388
|
+
/**
|
|
1389
|
+
* Connection timeout
|
|
1390
|
+
*/
|
|
1391
|
+
connectTimeout?: number;
|
|
1392
|
+
/**
|
|
1393
|
+
* Request timeout
|
|
1394
|
+
*/
|
|
1395
|
+
requestTimeout?: number;
|
|
1396
|
+
/**
|
|
1397
|
+
* Read buffer size in bytes
|
|
1398
|
+
*/
|
|
1399
|
+
bufferSize?: bigint;
|
|
1400
|
+
/**
|
|
1401
|
+
* Headers associated with gRPC requests
|
|
1402
|
+
*/
|
|
1403
|
+
headers?: Map<string, string>;
|
|
1404
|
+
/**
|
|
1405
|
+
* Authentication configuration for outgoing RPCs
|
|
1406
|
+
*/
|
|
1407
|
+
auth?: ClientAuthenticationConfig;
|
|
1408
|
+
/**
|
|
1409
|
+
* Backoff retry configuration
|
|
1410
|
+
*/
|
|
1411
|
+
backoff?: BackoffConfig;
|
|
1412
|
+
/**
|
|
1413
|
+
* Arbitrary user-provided metadata as JSON string
|
|
1414
|
+
*/
|
|
1415
|
+
metadata?: string;
|
|
1416
|
+
/**
|
|
1417
|
+
* When true, reject inter-node messages without a valid header MAC (strict mode).
|
|
1418
|
+
*/
|
|
1419
|
+
requireHeaderMac?: boolean;
|
|
1420
|
+
};
|
|
1421
|
+
/**
|
|
1422
|
+
* Generated factory for {@link ClientConfig} record objects.
|
|
1423
|
+
*/
|
|
1424
|
+
export declare const ClientConfig: Readonly<{
|
|
1425
|
+
create: (partial: Partial<ClientConfig> & Required<Omit<ClientConfig, "tls" | "headers" | "endpoint" | "origin" | "serverName" | "compression" | "rateLimit" | "keepalive" | "proxy" | "connectTimeout" | "requestTimeout" | "bufferSize" | "auth" | "backoff" | "metadata" | "requireHeaderMac">>) => ClientConfig;
|
|
1426
|
+
new: (partial: Partial<ClientConfig> & Required<Omit<ClientConfig, "tls" | "headers" | "endpoint" | "origin" | "serverName" | "compression" | "rateLimit" | "keepalive" | "proxy" | "connectTimeout" | "requestTimeout" | "bufferSize" | "auth" | "backoff" | "metadata" | "requireHeaderMac">>) => ClientConfig;
|
|
1427
|
+
defaults: () => Partial<ClientConfig>;
|
|
1428
|
+
}>;
|
|
1429
|
+
/**
|
|
1430
|
+
* TLS configuration for server connections
|
|
1431
|
+
*/
|
|
1432
|
+
export type TlsServerConfig = {
|
|
1433
|
+
/**
|
|
1434
|
+
* Disable TLS entirely (plain text connection)
|
|
1435
|
+
*/
|
|
1436
|
+
insecure: boolean;
|
|
1437
|
+
/**
|
|
1438
|
+
* Certificate and key source for server authentication
|
|
1439
|
+
*/
|
|
1440
|
+
source: TlsSource;
|
|
1441
|
+
/**
|
|
1442
|
+
* CA certificate source for verifying client certificates
|
|
1443
|
+
*/
|
|
1444
|
+
clientCa: CaSource;
|
|
1445
|
+
/**
|
|
1446
|
+
* Include system CA certificates pool (default: true)
|
|
1447
|
+
*/
|
|
1448
|
+
includeSystemCaCertsPool?: boolean;
|
|
1449
|
+
/**
|
|
1450
|
+
* TLS version to use: "tls1.2" or "tls1.3" (default: "tls1.3")
|
|
1451
|
+
*/
|
|
1452
|
+
tlsVersion?: string;
|
|
1453
|
+
/**
|
|
1454
|
+
* Reload client CA file when modified
|
|
1455
|
+
*/
|
|
1456
|
+
reloadClientCaFile?: boolean;
|
|
1457
|
+
};
|
|
1458
|
+
/**
|
|
1459
|
+
* Generated factory for {@link TlsServerConfig} record objects.
|
|
1460
|
+
*/
|
|
1461
|
+
export declare const TlsServerConfig: Readonly<{
|
|
1462
|
+
create: (partial: Partial<TlsServerConfig> & Required<Omit<TlsServerConfig, "insecure" | "source" | "includeSystemCaCertsPool" | "tlsVersion" | "clientCa" | "reloadClientCaFile">>) => TlsServerConfig;
|
|
1463
|
+
new: (partial: Partial<TlsServerConfig> & Required<Omit<TlsServerConfig, "insecure" | "source" | "includeSystemCaCertsPool" | "tlsVersion" | "clientCa" | "reloadClientCaFile">>) => TlsServerConfig;
|
|
1464
|
+
defaults: () => Partial<TlsServerConfig>;
|
|
1465
|
+
}>;
|
|
1466
|
+
/**
|
|
1467
|
+
* Keepalive configuration for the server
|
|
1468
|
+
*/
|
|
1469
|
+
export type KeepaliveServerParameters = {
|
|
1470
|
+
/**
|
|
1471
|
+
* Max connection idle time (time after which an idle connection is closed)
|
|
1472
|
+
*/
|
|
1473
|
+
maxConnectionIdle: number;
|
|
1474
|
+
/**
|
|
1475
|
+
* Max connection age (maximum time a connection may exist before being closed)
|
|
1476
|
+
*/
|
|
1477
|
+
maxConnectionAge: number;
|
|
1478
|
+
/**
|
|
1479
|
+
* Max connection age grace (additional time after max_connection_age before closing)
|
|
1480
|
+
*/
|
|
1481
|
+
maxConnectionAgeGrace: number;
|
|
1482
|
+
/**
|
|
1483
|
+
* Keepalive ping frequency
|
|
1484
|
+
*/
|
|
1485
|
+
time: number;
|
|
1486
|
+
/**
|
|
1487
|
+
* Keepalive ping timeout (time to wait for ack)
|
|
1488
|
+
*/
|
|
1489
|
+
timeout: number;
|
|
1490
|
+
};
|
|
1491
|
+
/**
|
|
1492
|
+
* Generated factory for {@link KeepaliveServerParameters} record objects.
|
|
1493
|
+
*/
|
|
1494
|
+
export declare const KeepaliveServerParameters: Readonly<{
|
|
1495
|
+
create: (partial: Partial<KeepaliveServerParameters> & Required<Omit<KeepaliveServerParameters, "timeout" | "maxConnectionIdle" | "maxConnectionAge" | "maxConnectionAgeGrace" | "time">>) => KeepaliveServerParameters;
|
|
1496
|
+
new: (partial: Partial<KeepaliveServerParameters> & Required<Omit<KeepaliveServerParameters, "timeout" | "maxConnectionIdle" | "maxConnectionAge" | "maxConnectionAgeGrace" | "time">>) => KeepaliveServerParameters;
|
|
1497
|
+
defaults: () => Partial<KeepaliveServerParameters>;
|
|
1498
|
+
}>;
|
|
1499
|
+
/**
|
|
1500
|
+
* JWT authentication configuration for server-side verification
|
|
1501
|
+
*/
|
|
1502
|
+
export type JwtAuth = {
|
|
1503
|
+
/**
|
|
1504
|
+
* JWT key configuration (decoding key for verification)
|
|
1505
|
+
*/
|
|
1506
|
+
key: JwtKeyType;
|
|
1507
|
+
/**
|
|
1508
|
+
* JWT audience claims to verify
|
|
1509
|
+
*/
|
|
1510
|
+
audience?: Array<string>;
|
|
1511
|
+
/**
|
|
1512
|
+
* JWT issuer to verify
|
|
1513
|
+
*/
|
|
1514
|
+
issuer?: string;
|
|
1515
|
+
/**
|
|
1516
|
+
* JWT subject to verify
|
|
1517
|
+
*/
|
|
1518
|
+
subject?: string;
|
|
1519
|
+
/**
|
|
1520
|
+
* Token validity duration (default: 3600 seconds)
|
|
1521
|
+
*/
|
|
1522
|
+
duration: number;
|
|
1523
|
+
};
|
|
1524
|
+
/**
|
|
1525
|
+
* Generated factory for {@link JwtAuth} record objects.
|
|
1526
|
+
*/
|
|
1527
|
+
export declare const JwtAuth: Readonly<{
|
|
1528
|
+
create: (partial: Partial<JwtAuth> & Required<Omit<JwtAuth, "key" | "duration" | "audience" | "issuer" | "subject">>) => JwtAuth;
|
|
1529
|
+
new: (partial: Partial<JwtAuth> & Required<Omit<JwtAuth, "key" | "duration" | "audience" | "issuer" | "subject">>) => JwtAuth;
|
|
1530
|
+
defaults: () => Partial<JwtAuth>;
|
|
1531
|
+
}>;
|
|
1532
|
+
export declare enum ServerAuthenticationConfig_Tags {
|
|
1533
|
+
Basic = "Basic",
|
|
1534
|
+
Jwt = "Jwt",
|
|
1535
|
+
Spire = "Spire",
|
|
1536
|
+
None = "None"
|
|
1537
|
+
}
|
|
1538
|
+
/**
|
|
1539
|
+
* Authentication configuration enum for server
|
|
1540
|
+
*/
|
|
1541
|
+
export declare const ServerAuthenticationConfig: Readonly<{
|
|
1542
|
+
instanceOf: (obj: any) => obj is ServerAuthenticationConfig;
|
|
1543
|
+
Basic: {
|
|
1544
|
+
new (inner: {
|
|
1545
|
+
config: BasicAuth;
|
|
1546
|
+
}): {
|
|
1547
|
+
readonly tag: ServerAuthenticationConfig_Tags.Basic;
|
|
1548
|
+
readonly inner: Readonly<{
|
|
1549
|
+
config: BasicAuth;
|
|
1550
|
+
}>;
|
|
1551
|
+
/**
|
|
1552
|
+
* @private
|
|
1553
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1554
|
+
*/
|
|
1555
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1556
|
+
};
|
|
1557
|
+
"new"(inner: {
|
|
1558
|
+
config: BasicAuth;
|
|
1559
|
+
}): {
|
|
1560
|
+
readonly tag: ServerAuthenticationConfig_Tags.Basic;
|
|
1561
|
+
readonly inner: Readonly<{
|
|
1562
|
+
config: BasicAuth;
|
|
1563
|
+
}>;
|
|
1564
|
+
/**
|
|
1565
|
+
* @private
|
|
1566
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1567
|
+
*/
|
|
1568
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1569
|
+
};
|
|
1570
|
+
instanceOf(obj: any): obj is {
|
|
1571
|
+
readonly tag: ServerAuthenticationConfig_Tags.Basic;
|
|
1572
|
+
readonly inner: Readonly<{
|
|
1573
|
+
config: BasicAuth;
|
|
1574
|
+
}>;
|
|
1575
|
+
/**
|
|
1576
|
+
* @private
|
|
1577
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1578
|
+
*/
|
|
1579
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1580
|
+
};
|
|
1581
|
+
};
|
|
1582
|
+
Jwt: {
|
|
1583
|
+
new (inner: {
|
|
1584
|
+
config: JwtAuth;
|
|
1585
|
+
}): {
|
|
1586
|
+
readonly tag: ServerAuthenticationConfig_Tags.Jwt;
|
|
1587
|
+
readonly inner: Readonly<{
|
|
1588
|
+
config: JwtAuth;
|
|
1589
|
+
}>;
|
|
1590
|
+
/**
|
|
1591
|
+
* @private
|
|
1592
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1593
|
+
*/
|
|
1594
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1595
|
+
};
|
|
1596
|
+
"new"(inner: {
|
|
1597
|
+
config: JwtAuth;
|
|
1598
|
+
}): {
|
|
1599
|
+
readonly tag: ServerAuthenticationConfig_Tags.Jwt;
|
|
1600
|
+
readonly inner: Readonly<{
|
|
1601
|
+
config: JwtAuth;
|
|
1602
|
+
}>;
|
|
1603
|
+
/**
|
|
1604
|
+
* @private
|
|
1605
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1606
|
+
*/
|
|
1607
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1608
|
+
};
|
|
1609
|
+
instanceOf(obj: any): obj is {
|
|
1610
|
+
readonly tag: ServerAuthenticationConfig_Tags.Jwt;
|
|
1611
|
+
readonly inner: Readonly<{
|
|
1612
|
+
config: JwtAuth;
|
|
1613
|
+
}>;
|
|
1614
|
+
/**
|
|
1615
|
+
* @private
|
|
1616
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1617
|
+
*/
|
|
1618
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1619
|
+
};
|
|
1620
|
+
};
|
|
1621
|
+
Spire: {
|
|
1622
|
+
new (inner: {
|
|
1623
|
+
config: SpireConfig;
|
|
1624
|
+
}): {
|
|
1625
|
+
readonly tag: ServerAuthenticationConfig_Tags.Spire;
|
|
1626
|
+
readonly inner: Readonly<{
|
|
1627
|
+
config: SpireConfig;
|
|
1628
|
+
}>;
|
|
1629
|
+
/**
|
|
1630
|
+
* @private
|
|
1631
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1632
|
+
*/
|
|
1633
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1634
|
+
};
|
|
1635
|
+
"new"(inner: {
|
|
1636
|
+
config: SpireConfig;
|
|
1637
|
+
}): {
|
|
1638
|
+
readonly tag: ServerAuthenticationConfig_Tags.Spire;
|
|
1639
|
+
readonly inner: Readonly<{
|
|
1640
|
+
config: SpireConfig;
|
|
1641
|
+
}>;
|
|
1642
|
+
/**
|
|
1643
|
+
* @private
|
|
1644
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1645
|
+
*/
|
|
1646
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1647
|
+
};
|
|
1648
|
+
instanceOf(obj: any): obj is {
|
|
1649
|
+
readonly tag: ServerAuthenticationConfig_Tags.Spire;
|
|
1650
|
+
readonly inner: Readonly<{
|
|
1651
|
+
config: SpireConfig;
|
|
1652
|
+
}>;
|
|
1653
|
+
/**
|
|
1654
|
+
* @private
|
|
1655
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1656
|
+
*/
|
|
1657
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1658
|
+
};
|
|
1659
|
+
};
|
|
1660
|
+
None: {
|
|
1661
|
+
new (): {
|
|
1662
|
+
readonly tag: ServerAuthenticationConfig_Tags.None;
|
|
1663
|
+
/**
|
|
1664
|
+
* @private
|
|
1665
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1666
|
+
*/
|
|
1667
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1668
|
+
};
|
|
1669
|
+
"new"(): {
|
|
1670
|
+
readonly tag: ServerAuthenticationConfig_Tags.None;
|
|
1671
|
+
/**
|
|
1672
|
+
* @private
|
|
1673
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1674
|
+
*/
|
|
1675
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1676
|
+
};
|
|
1677
|
+
instanceOf(obj: any): obj is {
|
|
1678
|
+
readonly tag: ServerAuthenticationConfig_Tags.None;
|
|
1679
|
+
/**
|
|
1680
|
+
* @private
|
|
1681
|
+
* This field is private and should not be used, use `tag` instead.
|
|
1682
|
+
*/
|
|
1683
|
+
readonly [uniffiTypeNameSymbol]: "ServerAuthenticationConfig";
|
|
1684
|
+
};
|
|
1685
|
+
};
|
|
1686
|
+
}>;
|
|
1687
|
+
/**
|
|
1688
|
+
* Authentication configuration enum for server
|
|
1689
|
+
*/
|
|
1690
|
+
export type ServerAuthenticationConfig = InstanceType<typeof ServerAuthenticationConfig['Basic' | 'Jwt' | 'Spire' | 'None']>;
|
|
1691
|
+
/**
|
|
1692
|
+
* Server configuration for running a SLIM server
|
|
1693
|
+
*/
|
|
1694
|
+
export type ServerConfig = {
|
|
1695
|
+
/**
|
|
1696
|
+
* Endpoint address to listen on (e.g., "0.0.0.0:50051" or "[::]:50051").
|
|
1697
|
+
*
|
|
1698
|
+
* The transport protocol is inferred from the endpoint scheme:
|
|
1699
|
+
* `ws://`/`wss://` → WebSocket, otherwise gRPC.
|
|
1700
|
+
*/
|
|
1701
|
+
endpoint: string;
|
|
1702
|
+
/**
|
|
1703
|
+
* TLS server configuration
|
|
1704
|
+
*/
|
|
1705
|
+
tls: TlsServerConfig;
|
|
1706
|
+
/**
|
|
1707
|
+
* Use HTTP/2 only (default: true)
|
|
1708
|
+
*/
|
|
1709
|
+
http2Only?: boolean;
|
|
1710
|
+
/**
|
|
1711
|
+
* Maximum size (in MiB) of messages accepted by the server
|
|
1712
|
+
*/
|
|
1713
|
+
maxFrameSize?: number;
|
|
1714
|
+
/**
|
|
1715
|
+
* Maximum number of concurrent streams per connection
|
|
1716
|
+
*/
|
|
1717
|
+
maxConcurrentStreams?: number;
|
|
1718
|
+
/**
|
|
1719
|
+
* Maximum header list size in bytes
|
|
1720
|
+
*/
|
|
1721
|
+
maxHeaderListSize?: number;
|
|
1722
|
+
/**
|
|
1723
|
+
* Read buffer size in bytes
|
|
1724
|
+
*/
|
|
1725
|
+
readBufferSize?: bigint;
|
|
1726
|
+
/**
|
|
1727
|
+
* Write buffer size in bytes
|
|
1728
|
+
*/
|
|
1729
|
+
writeBufferSize?: bigint;
|
|
1730
|
+
/**
|
|
1731
|
+
* Keepalive parameters
|
|
1732
|
+
*/
|
|
1733
|
+
keepalive?: KeepaliveServerParameters;
|
|
1734
|
+
/**
|
|
1735
|
+
* Authentication configuration for incoming requests
|
|
1736
|
+
*/
|
|
1737
|
+
auth?: ServerAuthenticationConfig;
|
|
1738
|
+
/**
|
|
1739
|
+
* Arbitrary user-provided metadata as JSON string
|
|
1740
|
+
*/
|
|
1741
|
+
metadata?: string;
|
|
1742
|
+
/**
|
|
1743
|
+
* When true, reject inter-node messages without a valid header MAC (strict mode).
|
|
1744
|
+
*/
|
|
1745
|
+
requireHeaderMac?: boolean;
|
|
1746
|
+
/**
|
|
1747
|
+
* Timeout (in seconds) for link negotiation to complete.
|
|
1748
|
+
*/
|
|
1749
|
+
negotiationTimeoutSecs?: bigint;
|
|
1750
|
+
/**
|
|
1751
|
+
* Polling interval (in milliseconds) to wait between HMAC existence checks.
|
|
1752
|
+
*/
|
|
1753
|
+
linkHmacPollIntervalMs?: bigint;
|
|
1754
|
+
};
|
|
1755
|
+
/**
|
|
1756
|
+
* Generated factory for {@link ServerConfig} record objects.
|
|
1757
|
+
*/
|
|
1758
|
+
export declare const ServerConfig: Readonly<{
|
|
1759
|
+
create: (partial: Partial<ServerConfig> & Required<Omit<ServerConfig, "tls" | "endpoint" | "keepalive" | "auth" | "metadata" | "requireHeaderMac" | "http2Only" | "maxFrameSize" | "maxConcurrentStreams" | "maxHeaderListSize" | "readBufferSize" | "writeBufferSize" | "negotiationTimeoutSecs" | "linkHmacPollIntervalMs">>) => ServerConfig;
|
|
1760
|
+
new: (partial: Partial<ServerConfig> & Required<Omit<ServerConfig, "tls" | "endpoint" | "keepalive" | "auth" | "metadata" | "requireHeaderMac" | "http2Only" | "maxFrameSize" | "maxConcurrentStreams" | "maxHeaderListSize" | "readBufferSize" | "writeBufferSize" | "negotiationTimeoutSecs" | "linkHmacPollIntervalMs">>) => ServerConfig;
|
|
1761
|
+
defaults: () => Partial<ServerConfig>;
|
|
1762
|
+
}>;
|
|
1763
|
+
/**
|
|
1764
|
+
* DataPlane configuration wrapper for uniffi bindings
|
|
1765
|
+
*/
|
|
1766
|
+
export type DataplaneConfig = {
|
|
1767
|
+
/**
|
|
1768
|
+
* DataPlane GRPC server settings
|
|
1769
|
+
*/
|
|
1770
|
+
servers: Array<ServerConfig>;
|
|
1771
|
+
/**
|
|
1772
|
+
* DataPlane client configs
|
|
1773
|
+
*/
|
|
1774
|
+
clients: Array<ClientConfig>;
|
|
1775
|
+
};
|
|
1776
|
+
/**
|
|
1777
|
+
* Generated factory for {@link DataplaneConfig} record objects.
|
|
1778
|
+
*/
|
|
1779
|
+
export declare const DataplaneConfig: Readonly<{
|
|
1780
|
+
create: (partial: Partial<DataplaneConfig> & Required<Omit<DataplaneConfig, "servers" | "clients">>) => DataplaneConfig;
|
|
1781
|
+
new: (partial: Partial<DataplaneConfig> & Required<Omit<DataplaneConfig, "servers" | "clients">>) => DataplaneConfig;
|
|
1782
|
+
defaults: () => Partial<DataplaneConfig>;
|
|
1783
|
+
}>;
|
|
1784
|
+
/**
|
|
1785
|
+
* Name type for SLIM (Secure Low-Latency Interactive Messaging)
|
|
1786
|
+
*/
|
|
1787
|
+
export interface NameLike {
|
|
1788
|
+
/**
|
|
1789
|
+
* Get the name components as a vector of strings
|
|
1790
|
+
*/
|
|
1791
|
+
components(): Array<string>;
|
|
1792
|
+
/**
|
|
1793
|
+
* Get the name ID formatted as UUID string
|
|
1794
|
+
*/
|
|
1795
|
+
id(): string;
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
* @deprecated Use `NameLike` instead.
|
|
1799
|
+
*/
|
|
1800
|
+
export type NameInterface = NameLike;
|
|
1801
|
+
/**
|
|
1802
|
+
* Name type for SLIM (Secure Low-Latency Interactive Messaging)
|
|
1803
|
+
*/
|
|
1804
|
+
export declare class Name extends UniffiAbstractObject implements NameLike {
|
|
1805
|
+
readonly [uniffiTypeNameSymbol] = "Name";
|
|
1806
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
1807
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
1808
|
+
/**
|
|
1809
|
+
* Create a new Name from components without an ID
|
|
1810
|
+
*/
|
|
1811
|
+
constructor(component0: string, component1: string, component2: string);
|
|
1812
|
+
/**
|
|
1813
|
+
* Parse a Name from a `"org/namespace/agent"` string
|
|
1814
|
+
*
|
|
1815
|
+
* The string must contain exactly three `/`-separated components.
|
|
1816
|
+
* Returns an error if the format is invalid.
|
|
1817
|
+
*/
|
|
1818
|
+
static fromString(s: string): NameLike;
|
|
1819
|
+
/**
|
|
1820
|
+
* Create a new Name from components with an ID expressed in UUID format
|
|
1821
|
+
*/
|
|
1822
|
+
static newWithId(component0: string, component1: string, component2: string, id: string): NameLike;
|
|
1823
|
+
/**
|
|
1824
|
+
* Get the name components as a vector of strings
|
|
1825
|
+
*/
|
|
1826
|
+
components(): Array<string>;
|
|
1827
|
+
/**
|
|
1828
|
+
* Get the name ID formatted as UUID string
|
|
1829
|
+
*/
|
|
1830
|
+
id(): string;
|
|
1831
|
+
toString(): string;
|
|
1832
|
+
toDebugString(): string;
|
|
1833
|
+
equals(other: Name): boolean;
|
|
1834
|
+
uniffiDestroy(): void;
|
|
1835
|
+
static instanceOf(obj_: any): obj_ is Name;
|
|
1836
|
+
}
|
|
1837
|
+
/**
|
|
1838
|
+
* Generic message context for language bindings (UniFFI-compatible)
|
|
1839
|
+
*
|
|
1840
|
+
* Provides routing and descriptive metadata needed for replying,
|
|
1841
|
+
* auditing, and instrumentation across different language bindings.
|
|
1842
|
+
* This type is exported to foreign languages via UniFFI.
|
|
1843
|
+
*/
|
|
1844
|
+
export type MessageContext = {
|
|
1845
|
+
/**
|
|
1846
|
+
* Fully-qualified sender identity
|
|
1847
|
+
*/
|
|
1848
|
+
sourceName: NameLike;
|
|
1849
|
+
/**
|
|
1850
|
+
* Fully-qualified destination identity (may be empty for broadcast/group scenarios)
|
|
1851
|
+
*/
|
|
1852
|
+
destinationName?: NameLike;
|
|
1853
|
+
/**
|
|
1854
|
+
* Logical/semantic type (defaults to "msg" if unspecified)
|
|
1855
|
+
*/
|
|
1856
|
+
payloadType: string;
|
|
1857
|
+
/**
|
|
1858
|
+
* Arbitrary key/value pairs supplied by the sender (e.g. tracing IDs)
|
|
1859
|
+
*/
|
|
1860
|
+
metadata: Map<string, string>;
|
|
1861
|
+
/**
|
|
1862
|
+
* Numeric identifier of the inbound connection carrying the message
|
|
1863
|
+
*/
|
|
1864
|
+
inputConnection: bigint;
|
|
1865
|
+
/**
|
|
1866
|
+
* Identity contained in the message
|
|
1867
|
+
*/
|
|
1868
|
+
identity: string;
|
|
1869
|
+
};
|
|
1870
|
+
/**
|
|
1871
|
+
* Generated factory for {@link MessageContext} record objects.
|
|
1872
|
+
*/
|
|
1873
|
+
export declare const MessageContext: Readonly<{
|
|
1874
|
+
create: (partial: Partial<MessageContext> & Required<Omit<MessageContext, "metadata" | "sourceName" | "destinationName" | "payloadType" | "inputConnection" | "identity">>) => MessageContext;
|
|
1875
|
+
new: (partial: Partial<MessageContext> & Required<Omit<MessageContext, "metadata" | "sourceName" | "destinationName" | "payloadType" | "inputConnection" | "identity">>) => MessageContext;
|
|
1876
|
+
defaults: () => Partial<MessageContext>;
|
|
1877
|
+
}>;
|
|
1878
|
+
export type MlsSettings = {
|
|
1879
|
+
/**
|
|
1880
|
+
* 0 = disable header-integrity checks; 1–100 = percent of messages to verify after decrypt.
|
|
1881
|
+
*/
|
|
1882
|
+
headerIntegrityValidationPercent: number;
|
|
1883
|
+
};
|
|
1884
|
+
/**
|
|
1885
|
+
* Generated factory for {@link MlsSettings} record objects.
|
|
1886
|
+
*/
|
|
1887
|
+
export declare const MlsSettings: Readonly<{
|
|
1888
|
+
create: (partial: Partial<MlsSettings> & Required<Omit<MlsSettings, "headerIntegrityValidationPercent">>) => MlsSettings;
|
|
1889
|
+
new: (partial: Partial<MlsSettings> & Required<Omit<MlsSettings, "headerIntegrityValidationPercent">>) => MlsSettings;
|
|
1890
|
+
defaults: () => Partial<MlsSettings>;
|
|
1891
|
+
}>;
|
|
1892
|
+
/**
|
|
1893
|
+
* Received message containing context and payload
|
|
1894
|
+
*/
|
|
1895
|
+
export type ReceivedMessage = {
|
|
1896
|
+
context: MessageContext;
|
|
1897
|
+
payload: ArrayBuffer;
|
|
1898
|
+
};
|
|
1899
|
+
/**
|
|
1900
|
+
* Generated factory for {@link ReceivedMessage} record objects.
|
|
1901
|
+
*/
|
|
1902
|
+
export declare const ReceivedMessage: Readonly<{
|
|
1903
|
+
create: (partial: Partial<ReceivedMessage> & Required<Omit<ReceivedMessage, "context" | "payload">>) => ReceivedMessage;
|
|
1904
|
+
new: (partial: Partial<ReceivedMessage> & Required<Omit<ReceivedMessage, "context" | "payload">>) => ReceivedMessage;
|
|
1905
|
+
defaults: () => Partial<ReceivedMessage>;
|
|
1906
|
+
}>;
|
|
1907
|
+
/**
|
|
1908
|
+
* Runtime configuration for the SLIM bindings
|
|
1909
|
+
*
|
|
1910
|
+
* Controls the Tokio runtime behavior including thread count, naming, and shutdown timeout.
|
|
1911
|
+
*/
|
|
1912
|
+
export type RuntimeConfig = {
|
|
1913
|
+
/**
|
|
1914
|
+
* Number of cores to use for the runtime (0 = use all available cores)
|
|
1915
|
+
*/
|
|
1916
|
+
nCores: bigint;
|
|
1917
|
+
/**
|
|
1918
|
+
* Thread name prefix for the runtime
|
|
1919
|
+
*/
|
|
1920
|
+
threadName: string;
|
|
1921
|
+
/**
|
|
1922
|
+
* Timeout duration for draining services during shutdown
|
|
1923
|
+
*/
|
|
1924
|
+
drainTimeout: number;
|
|
1925
|
+
};
|
|
1926
|
+
/**
|
|
1927
|
+
* Generated factory for {@link RuntimeConfig} record objects.
|
|
1928
|
+
*/
|
|
1929
|
+
export declare const RuntimeConfig: Readonly<{
|
|
1930
|
+
create: (partial: Partial<RuntimeConfig> & Required<Omit<RuntimeConfig, "nCores" | "threadName" | "drainTimeout">>) => RuntimeConfig;
|
|
1931
|
+
new: (partial: Partial<RuntimeConfig> & Required<Omit<RuntimeConfig, "nCores" | "threadName" | "drainTimeout">>) => RuntimeConfig;
|
|
1932
|
+
defaults: () => Partial<RuntimeConfig>;
|
|
1933
|
+
}>;
|
|
1934
|
+
/**
|
|
1935
|
+
* Service configuration wrapper for uniffi bindings
|
|
1936
|
+
*/
|
|
1937
|
+
export type ServiceConfig = {
|
|
1938
|
+
/**
|
|
1939
|
+
* Optional node ID for the service
|
|
1940
|
+
*/
|
|
1941
|
+
nodeId?: string;
|
|
1942
|
+
/**
|
|
1943
|
+
* Optional group name for the service
|
|
1944
|
+
*/
|
|
1945
|
+
groupName?: string;
|
|
1946
|
+
/**
|
|
1947
|
+
* DataPlane configuration (servers and clients)
|
|
1948
|
+
*/
|
|
1949
|
+
dataplane: DataplaneConfig;
|
|
1950
|
+
};
|
|
1951
|
+
/**
|
|
1952
|
+
* Generated factory for {@link ServiceConfig} record objects.
|
|
1953
|
+
*/
|
|
1954
|
+
export declare const ServiceConfig: Readonly<{
|
|
1955
|
+
create: (partial: Partial<ServiceConfig> & Required<Omit<ServiceConfig, "nodeId" | "groupName" | "dataplane">>) => ServiceConfig;
|
|
1956
|
+
new: (partial: Partial<ServiceConfig> & Required<Omit<ServiceConfig, "nodeId" | "groupName" | "dataplane">>) => ServiceConfig;
|
|
1957
|
+
defaults: () => Partial<ServiceConfig>;
|
|
1958
|
+
}>;
|
|
1959
|
+
/**
|
|
1960
|
+
* Session type enum
|
|
1961
|
+
*/
|
|
1962
|
+
export declare enum SessionType {
|
|
1963
|
+
PointToPoint = 0,
|
|
1964
|
+
Group = 1
|
|
1965
|
+
}
|
|
1966
|
+
/**
|
|
1967
|
+
* Session configuration
|
|
1968
|
+
*/
|
|
1969
|
+
export type SessionConfig = {
|
|
1970
|
+
/**
|
|
1971
|
+
* Session type (PointToPoint or Group)
|
|
1972
|
+
*/
|
|
1973
|
+
sessionType: SessionType;
|
|
1974
|
+
/**
|
|
1975
|
+
* Maximum number of retries for message transmission (None = use default)
|
|
1976
|
+
*/
|
|
1977
|
+
maxRetries?: number;
|
|
1978
|
+
/**
|
|
1979
|
+
* Interval between retries in milliseconds (None = use default)
|
|
1980
|
+
*/
|
|
1981
|
+
interval?: number;
|
|
1982
|
+
/**
|
|
1983
|
+
* Custom metadata key-value pairs for the session
|
|
1984
|
+
*/
|
|
1985
|
+
metadata: Map<string, string>;
|
|
1986
|
+
/**
|
|
1987
|
+
* MLS options (None disables MLS).
|
|
1988
|
+
*/
|
|
1989
|
+
mlsSettings?: MlsSettings;
|
|
1990
|
+
};
|
|
1991
|
+
/**
|
|
1992
|
+
* Generated factory for {@link SessionConfig} record objects.
|
|
1993
|
+
*/
|
|
1994
|
+
export declare const SessionConfig: Readonly<{
|
|
1995
|
+
create: (partial: Partial<SessionConfig> & Required<Omit<SessionConfig, "interval" | "metadata" | "sessionType" | "maxRetries" | "mlsSettings">>) => SessionConfig;
|
|
1996
|
+
new: (partial: Partial<SessionConfig> & Required<Omit<SessionConfig, "interval" | "metadata" | "sessionType" | "maxRetries" | "mlsSettings">>) => SessionConfig;
|
|
1997
|
+
defaults: () => Partial<SessionConfig>;
|
|
1998
|
+
}>;
|
|
1999
|
+
export declare enum SlimError_Tags {
|
|
2000
|
+
ServiceError = "ServiceError",
|
|
2001
|
+
SessionError = "SessionError",
|
|
2002
|
+
ReceiveError = "ReceiveError",
|
|
2003
|
+
SendError = "SendError",
|
|
2004
|
+
AuthError = "AuthError",
|
|
2005
|
+
ConfigError = "ConfigError",
|
|
2006
|
+
RpcError = "RpcError",
|
|
2007
|
+
Timeout = "Timeout",
|
|
2008
|
+
InvalidArgument = "InvalidArgument",
|
|
2009
|
+
InternalError = "InternalError"
|
|
2010
|
+
}
|
|
2011
|
+
/**
|
|
2012
|
+
* Error types for SLIM operations
|
|
2013
|
+
*/
|
|
2014
|
+
export declare const SlimError: Readonly<{
|
|
2015
|
+
instanceOf: (obj: any) => obj is SlimError;
|
|
2016
|
+
ServiceError: {
|
|
2017
|
+
new (inner: {
|
|
2018
|
+
message: string;
|
|
2019
|
+
}): {
|
|
2020
|
+
readonly tag: SlimError_Tags.ServiceError;
|
|
2021
|
+
readonly inner: Readonly<{
|
|
2022
|
+
message: string;
|
|
2023
|
+
}>;
|
|
2024
|
+
/**
|
|
2025
|
+
* @private
|
|
2026
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2027
|
+
*/
|
|
2028
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2029
|
+
name: string;
|
|
2030
|
+
message: string;
|
|
2031
|
+
stack?: string;
|
|
2032
|
+
};
|
|
2033
|
+
"new"(inner: {
|
|
2034
|
+
message: string;
|
|
2035
|
+
}): {
|
|
2036
|
+
readonly tag: SlimError_Tags.ServiceError;
|
|
2037
|
+
readonly inner: Readonly<{
|
|
2038
|
+
message: string;
|
|
2039
|
+
}>;
|
|
2040
|
+
/**
|
|
2041
|
+
* @private
|
|
2042
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2043
|
+
*/
|
|
2044
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2045
|
+
name: string;
|
|
2046
|
+
message: string;
|
|
2047
|
+
stack?: string;
|
|
2048
|
+
};
|
|
2049
|
+
instanceOf(obj: any): obj is {
|
|
2050
|
+
readonly tag: SlimError_Tags.ServiceError;
|
|
2051
|
+
readonly inner: Readonly<{
|
|
2052
|
+
message: string;
|
|
2053
|
+
}>;
|
|
2054
|
+
/**
|
|
2055
|
+
* @private
|
|
2056
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2057
|
+
*/
|
|
2058
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2059
|
+
name: string;
|
|
2060
|
+
message: string;
|
|
2061
|
+
stack?: string;
|
|
2062
|
+
};
|
|
2063
|
+
hasInner(obj: any): obj is {
|
|
2064
|
+
readonly tag: SlimError_Tags.ServiceError;
|
|
2065
|
+
readonly inner: Readonly<{
|
|
2066
|
+
message: string;
|
|
2067
|
+
}>;
|
|
2068
|
+
/**
|
|
2069
|
+
* @private
|
|
2070
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2071
|
+
*/
|
|
2072
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2073
|
+
name: string;
|
|
2074
|
+
message: string;
|
|
2075
|
+
stack?: string;
|
|
2076
|
+
};
|
|
2077
|
+
getInner(obj: {
|
|
2078
|
+
readonly tag: SlimError_Tags.ServiceError;
|
|
2079
|
+
readonly inner: Readonly<{
|
|
2080
|
+
message: string;
|
|
2081
|
+
}>;
|
|
2082
|
+
/**
|
|
2083
|
+
* @private
|
|
2084
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2085
|
+
*/
|
|
2086
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2087
|
+
name: string;
|
|
2088
|
+
message: string;
|
|
2089
|
+
stack?: string;
|
|
2090
|
+
}): Readonly<{
|
|
2091
|
+
message: string;
|
|
2092
|
+
}>;
|
|
2093
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2094
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2095
|
+
stackTraceLimit: number;
|
|
2096
|
+
};
|
|
2097
|
+
SessionError: {
|
|
2098
|
+
new (inner: {
|
|
2099
|
+
message: string;
|
|
2100
|
+
}): {
|
|
2101
|
+
readonly tag: SlimError_Tags.SessionError;
|
|
2102
|
+
readonly inner: Readonly<{
|
|
2103
|
+
message: string;
|
|
2104
|
+
}>;
|
|
2105
|
+
/**
|
|
2106
|
+
* @private
|
|
2107
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2108
|
+
*/
|
|
2109
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2110
|
+
name: string;
|
|
2111
|
+
message: string;
|
|
2112
|
+
stack?: string;
|
|
2113
|
+
};
|
|
2114
|
+
"new"(inner: {
|
|
2115
|
+
message: string;
|
|
2116
|
+
}): {
|
|
2117
|
+
readonly tag: SlimError_Tags.SessionError;
|
|
2118
|
+
readonly inner: Readonly<{
|
|
2119
|
+
message: string;
|
|
2120
|
+
}>;
|
|
2121
|
+
/**
|
|
2122
|
+
* @private
|
|
2123
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2124
|
+
*/
|
|
2125
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2126
|
+
name: string;
|
|
2127
|
+
message: string;
|
|
2128
|
+
stack?: string;
|
|
2129
|
+
};
|
|
2130
|
+
instanceOf(obj: any): obj is {
|
|
2131
|
+
readonly tag: SlimError_Tags.SessionError;
|
|
2132
|
+
readonly inner: Readonly<{
|
|
2133
|
+
message: string;
|
|
2134
|
+
}>;
|
|
2135
|
+
/**
|
|
2136
|
+
* @private
|
|
2137
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2138
|
+
*/
|
|
2139
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2140
|
+
name: string;
|
|
2141
|
+
message: string;
|
|
2142
|
+
stack?: string;
|
|
2143
|
+
};
|
|
2144
|
+
hasInner(obj: any): obj is {
|
|
2145
|
+
readonly tag: SlimError_Tags.SessionError;
|
|
2146
|
+
readonly inner: Readonly<{
|
|
2147
|
+
message: string;
|
|
2148
|
+
}>;
|
|
2149
|
+
/**
|
|
2150
|
+
* @private
|
|
2151
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2152
|
+
*/
|
|
2153
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2154
|
+
name: string;
|
|
2155
|
+
message: string;
|
|
2156
|
+
stack?: string;
|
|
2157
|
+
};
|
|
2158
|
+
getInner(obj: {
|
|
2159
|
+
readonly tag: SlimError_Tags.SessionError;
|
|
2160
|
+
readonly inner: Readonly<{
|
|
2161
|
+
message: string;
|
|
2162
|
+
}>;
|
|
2163
|
+
/**
|
|
2164
|
+
* @private
|
|
2165
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2166
|
+
*/
|
|
2167
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2168
|
+
name: string;
|
|
2169
|
+
message: string;
|
|
2170
|
+
stack?: string;
|
|
2171
|
+
}): Readonly<{
|
|
2172
|
+
message: string;
|
|
2173
|
+
}>;
|
|
2174
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2175
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2176
|
+
stackTraceLimit: number;
|
|
2177
|
+
};
|
|
2178
|
+
ReceiveError: {
|
|
2179
|
+
new (inner: {
|
|
2180
|
+
message: string;
|
|
2181
|
+
}): {
|
|
2182
|
+
readonly tag: SlimError_Tags.ReceiveError;
|
|
2183
|
+
readonly inner: Readonly<{
|
|
2184
|
+
message: string;
|
|
2185
|
+
}>;
|
|
2186
|
+
/**
|
|
2187
|
+
* @private
|
|
2188
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2189
|
+
*/
|
|
2190
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2191
|
+
name: string;
|
|
2192
|
+
message: string;
|
|
2193
|
+
stack?: string;
|
|
2194
|
+
};
|
|
2195
|
+
"new"(inner: {
|
|
2196
|
+
message: string;
|
|
2197
|
+
}): {
|
|
2198
|
+
readonly tag: SlimError_Tags.ReceiveError;
|
|
2199
|
+
readonly inner: Readonly<{
|
|
2200
|
+
message: string;
|
|
2201
|
+
}>;
|
|
2202
|
+
/**
|
|
2203
|
+
* @private
|
|
2204
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2205
|
+
*/
|
|
2206
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2207
|
+
name: string;
|
|
2208
|
+
message: string;
|
|
2209
|
+
stack?: string;
|
|
2210
|
+
};
|
|
2211
|
+
instanceOf(obj: any): obj is {
|
|
2212
|
+
readonly tag: SlimError_Tags.ReceiveError;
|
|
2213
|
+
readonly inner: Readonly<{
|
|
2214
|
+
message: string;
|
|
2215
|
+
}>;
|
|
2216
|
+
/**
|
|
2217
|
+
* @private
|
|
2218
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2219
|
+
*/
|
|
2220
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2221
|
+
name: string;
|
|
2222
|
+
message: string;
|
|
2223
|
+
stack?: string;
|
|
2224
|
+
};
|
|
2225
|
+
hasInner(obj: any): obj is {
|
|
2226
|
+
readonly tag: SlimError_Tags.ReceiveError;
|
|
2227
|
+
readonly inner: Readonly<{
|
|
2228
|
+
message: string;
|
|
2229
|
+
}>;
|
|
2230
|
+
/**
|
|
2231
|
+
* @private
|
|
2232
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2233
|
+
*/
|
|
2234
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2235
|
+
name: string;
|
|
2236
|
+
message: string;
|
|
2237
|
+
stack?: string;
|
|
2238
|
+
};
|
|
2239
|
+
getInner(obj: {
|
|
2240
|
+
readonly tag: SlimError_Tags.ReceiveError;
|
|
2241
|
+
readonly inner: Readonly<{
|
|
2242
|
+
message: string;
|
|
2243
|
+
}>;
|
|
2244
|
+
/**
|
|
2245
|
+
* @private
|
|
2246
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2247
|
+
*/
|
|
2248
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2249
|
+
name: string;
|
|
2250
|
+
message: string;
|
|
2251
|
+
stack?: string;
|
|
2252
|
+
}): Readonly<{
|
|
2253
|
+
message: string;
|
|
2254
|
+
}>;
|
|
2255
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2256
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2257
|
+
stackTraceLimit: number;
|
|
2258
|
+
};
|
|
2259
|
+
SendError: {
|
|
2260
|
+
new (inner: {
|
|
2261
|
+
message: string;
|
|
2262
|
+
}): {
|
|
2263
|
+
readonly tag: SlimError_Tags.SendError;
|
|
2264
|
+
readonly inner: Readonly<{
|
|
2265
|
+
message: string;
|
|
2266
|
+
}>;
|
|
2267
|
+
/**
|
|
2268
|
+
* @private
|
|
2269
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2270
|
+
*/
|
|
2271
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2272
|
+
name: string;
|
|
2273
|
+
message: string;
|
|
2274
|
+
stack?: string;
|
|
2275
|
+
};
|
|
2276
|
+
"new"(inner: {
|
|
2277
|
+
message: string;
|
|
2278
|
+
}): {
|
|
2279
|
+
readonly tag: SlimError_Tags.SendError;
|
|
2280
|
+
readonly inner: Readonly<{
|
|
2281
|
+
message: string;
|
|
2282
|
+
}>;
|
|
2283
|
+
/**
|
|
2284
|
+
* @private
|
|
2285
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2286
|
+
*/
|
|
2287
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2288
|
+
name: string;
|
|
2289
|
+
message: string;
|
|
2290
|
+
stack?: string;
|
|
2291
|
+
};
|
|
2292
|
+
instanceOf(obj: any): obj is {
|
|
2293
|
+
readonly tag: SlimError_Tags.SendError;
|
|
2294
|
+
readonly inner: Readonly<{
|
|
2295
|
+
message: string;
|
|
2296
|
+
}>;
|
|
2297
|
+
/**
|
|
2298
|
+
* @private
|
|
2299
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2300
|
+
*/
|
|
2301
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2302
|
+
name: string;
|
|
2303
|
+
message: string;
|
|
2304
|
+
stack?: string;
|
|
2305
|
+
};
|
|
2306
|
+
hasInner(obj: any): obj is {
|
|
2307
|
+
readonly tag: SlimError_Tags.SendError;
|
|
2308
|
+
readonly inner: Readonly<{
|
|
2309
|
+
message: string;
|
|
2310
|
+
}>;
|
|
2311
|
+
/**
|
|
2312
|
+
* @private
|
|
2313
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2314
|
+
*/
|
|
2315
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2316
|
+
name: string;
|
|
2317
|
+
message: string;
|
|
2318
|
+
stack?: string;
|
|
2319
|
+
};
|
|
2320
|
+
getInner(obj: {
|
|
2321
|
+
readonly tag: SlimError_Tags.SendError;
|
|
2322
|
+
readonly inner: Readonly<{
|
|
2323
|
+
message: string;
|
|
2324
|
+
}>;
|
|
2325
|
+
/**
|
|
2326
|
+
* @private
|
|
2327
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2328
|
+
*/
|
|
2329
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2330
|
+
name: string;
|
|
2331
|
+
message: string;
|
|
2332
|
+
stack?: string;
|
|
2333
|
+
}): Readonly<{
|
|
2334
|
+
message: string;
|
|
2335
|
+
}>;
|
|
2336
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2337
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2338
|
+
stackTraceLimit: number;
|
|
2339
|
+
};
|
|
2340
|
+
AuthError: {
|
|
2341
|
+
new (inner: {
|
|
2342
|
+
message: string;
|
|
2343
|
+
}): {
|
|
2344
|
+
readonly tag: SlimError_Tags.AuthError;
|
|
2345
|
+
readonly inner: Readonly<{
|
|
2346
|
+
message: string;
|
|
2347
|
+
}>;
|
|
2348
|
+
/**
|
|
2349
|
+
* @private
|
|
2350
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2351
|
+
*/
|
|
2352
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2353
|
+
name: string;
|
|
2354
|
+
message: string;
|
|
2355
|
+
stack?: string;
|
|
2356
|
+
};
|
|
2357
|
+
"new"(inner: {
|
|
2358
|
+
message: string;
|
|
2359
|
+
}): {
|
|
2360
|
+
readonly tag: SlimError_Tags.AuthError;
|
|
2361
|
+
readonly inner: Readonly<{
|
|
2362
|
+
message: string;
|
|
2363
|
+
}>;
|
|
2364
|
+
/**
|
|
2365
|
+
* @private
|
|
2366
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2367
|
+
*/
|
|
2368
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2369
|
+
name: string;
|
|
2370
|
+
message: string;
|
|
2371
|
+
stack?: string;
|
|
2372
|
+
};
|
|
2373
|
+
instanceOf(obj: any): obj is {
|
|
2374
|
+
readonly tag: SlimError_Tags.AuthError;
|
|
2375
|
+
readonly inner: Readonly<{
|
|
2376
|
+
message: string;
|
|
2377
|
+
}>;
|
|
2378
|
+
/**
|
|
2379
|
+
* @private
|
|
2380
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2381
|
+
*/
|
|
2382
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2383
|
+
name: string;
|
|
2384
|
+
message: string;
|
|
2385
|
+
stack?: string;
|
|
2386
|
+
};
|
|
2387
|
+
hasInner(obj: any): obj is {
|
|
2388
|
+
readonly tag: SlimError_Tags.AuthError;
|
|
2389
|
+
readonly inner: Readonly<{
|
|
2390
|
+
message: string;
|
|
2391
|
+
}>;
|
|
2392
|
+
/**
|
|
2393
|
+
* @private
|
|
2394
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2395
|
+
*/
|
|
2396
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2397
|
+
name: string;
|
|
2398
|
+
message: string;
|
|
2399
|
+
stack?: string;
|
|
2400
|
+
};
|
|
2401
|
+
getInner(obj: {
|
|
2402
|
+
readonly tag: SlimError_Tags.AuthError;
|
|
2403
|
+
readonly inner: Readonly<{
|
|
2404
|
+
message: string;
|
|
2405
|
+
}>;
|
|
2406
|
+
/**
|
|
2407
|
+
* @private
|
|
2408
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2409
|
+
*/
|
|
2410
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2411
|
+
name: string;
|
|
2412
|
+
message: string;
|
|
2413
|
+
stack?: string;
|
|
2414
|
+
}): Readonly<{
|
|
2415
|
+
message: string;
|
|
2416
|
+
}>;
|
|
2417
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2418
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2419
|
+
stackTraceLimit: number;
|
|
2420
|
+
};
|
|
2421
|
+
ConfigError: {
|
|
2422
|
+
new (inner: {
|
|
2423
|
+
message: string;
|
|
2424
|
+
}): {
|
|
2425
|
+
readonly tag: SlimError_Tags.ConfigError;
|
|
2426
|
+
readonly inner: Readonly<{
|
|
2427
|
+
message: string;
|
|
2428
|
+
}>;
|
|
2429
|
+
/**
|
|
2430
|
+
* @private
|
|
2431
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2432
|
+
*/
|
|
2433
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2434
|
+
name: string;
|
|
2435
|
+
message: string;
|
|
2436
|
+
stack?: string;
|
|
2437
|
+
};
|
|
2438
|
+
"new"(inner: {
|
|
2439
|
+
message: string;
|
|
2440
|
+
}): {
|
|
2441
|
+
readonly tag: SlimError_Tags.ConfigError;
|
|
2442
|
+
readonly inner: Readonly<{
|
|
2443
|
+
message: string;
|
|
2444
|
+
}>;
|
|
2445
|
+
/**
|
|
2446
|
+
* @private
|
|
2447
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2448
|
+
*/
|
|
2449
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2450
|
+
name: string;
|
|
2451
|
+
message: string;
|
|
2452
|
+
stack?: string;
|
|
2453
|
+
};
|
|
2454
|
+
instanceOf(obj: any): obj is {
|
|
2455
|
+
readonly tag: SlimError_Tags.ConfigError;
|
|
2456
|
+
readonly inner: Readonly<{
|
|
2457
|
+
message: string;
|
|
2458
|
+
}>;
|
|
2459
|
+
/**
|
|
2460
|
+
* @private
|
|
2461
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2462
|
+
*/
|
|
2463
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2464
|
+
name: string;
|
|
2465
|
+
message: string;
|
|
2466
|
+
stack?: string;
|
|
2467
|
+
};
|
|
2468
|
+
hasInner(obj: any): obj is {
|
|
2469
|
+
readonly tag: SlimError_Tags.ConfigError;
|
|
2470
|
+
readonly inner: Readonly<{
|
|
2471
|
+
message: string;
|
|
2472
|
+
}>;
|
|
2473
|
+
/**
|
|
2474
|
+
* @private
|
|
2475
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2476
|
+
*/
|
|
2477
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2478
|
+
name: string;
|
|
2479
|
+
message: string;
|
|
2480
|
+
stack?: string;
|
|
2481
|
+
};
|
|
2482
|
+
getInner(obj: {
|
|
2483
|
+
readonly tag: SlimError_Tags.ConfigError;
|
|
2484
|
+
readonly inner: Readonly<{
|
|
2485
|
+
message: string;
|
|
2486
|
+
}>;
|
|
2487
|
+
/**
|
|
2488
|
+
* @private
|
|
2489
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2490
|
+
*/
|
|
2491
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2492
|
+
name: string;
|
|
2493
|
+
message: string;
|
|
2494
|
+
stack?: string;
|
|
2495
|
+
}): Readonly<{
|
|
2496
|
+
message: string;
|
|
2497
|
+
}>;
|
|
2498
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2499
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2500
|
+
stackTraceLimit: number;
|
|
2501
|
+
};
|
|
2502
|
+
RpcError: {
|
|
2503
|
+
new (inner: {
|
|
2504
|
+
message: string;
|
|
2505
|
+
}): {
|
|
2506
|
+
readonly tag: SlimError_Tags.RpcError;
|
|
2507
|
+
readonly inner: Readonly<{
|
|
2508
|
+
message: string;
|
|
2509
|
+
}>;
|
|
2510
|
+
/**
|
|
2511
|
+
* @private
|
|
2512
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2513
|
+
*/
|
|
2514
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2515
|
+
name: string;
|
|
2516
|
+
message: string;
|
|
2517
|
+
stack?: string;
|
|
2518
|
+
};
|
|
2519
|
+
"new"(inner: {
|
|
2520
|
+
message: string;
|
|
2521
|
+
}): {
|
|
2522
|
+
readonly tag: SlimError_Tags.RpcError;
|
|
2523
|
+
readonly inner: Readonly<{
|
|
2524
|
+
message: string;
|
|
2525
|
+
}>;
|
|
2526
|
+
/**
|
|
2527
|
+
* @private
|
|
2528
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2529
|
+
*/
|
|
2530
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2531
|
+
name: string;
|
|
2532
|
+
message: string;
|
|
2533
|
+
stack?: string;
|
|
2534
|
+
};
|
|
2535
|
+
instanceOf(obj: any): obj is {
|
|
2536
|
+
readonly tag: SlimError_Tags.RpcError;
|
|
2537
|
+
readonly inner: Readonly<{
|
|
2538
|
+
message: string;
|
|
2539
|
+
}>;
|
|
2540
|
+
/**
|
|
2541
|
+
* @private
|
|
2542
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2543
|
+
*/
|
|
2544
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2545
|
+
name: string;
|
|
2546
|
+
message: string;
|
|
2547
|
+
stack?: string;
|
|
2548
|
+
};
|
|
2549
|
+
hasInner(obj: any): obj is {
|
|
2550
|
+
readonly tag: SlimError_Tags.RpcError;
|
|
2551
|
+
readonly inner: Readonly<{
|
|
2552
|
+
message: string;
|
|
2553
|
+
}>;
|
|
2554
|
+
/**
|
|
2555
|
+
* @private
|
|
2556
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2557
|
+
*/
|
|
2558
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2559
|
+
name: string;
|
|
2560
|
+
message: string;
|
|
2561
|
+
stack?: string;
|
|
2562
|
+
};
|
|
2563
|
+
getInner(obj: {
|
|
2564
|
+
readonly tag: SlimError_Tags.RpcError;
|
|
2565
|
+
readonly inner: Readonly<{
|
|
2566
|
+
message: string;
|
|
2567
|
+
}>;
|
|
2568
|
+
/**
|
|
2569
|
+
* @private
|
|
2570
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2571
|
+
*/
|
|
2572
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2573
|
+
name: string;
|
|
2574
|
+
message: string;
|
|
2575
|
+
stack?: string;
|
|
2576
|
+
}): Readonly<{
|
|
2577
|
+
message: string;
|
|
2578
|
+
}>;
|
|
2579
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2580
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2581
|
+
stackTraceLimit: number;
|
|
2582
|
+
};
|
|
2583
|
+
Timeout: {
|
|
2584
|
+
new (): {
|
|
2585
|
+
readonly tag: SlimError_Tags.Timeout;
|
|
2586
|
+
/**
|
|
2587
|
+
* @private
|
|
2588
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2589
|
+
*/
|
|
2590
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2591
|
+
name: string;
|
|
2592
|
+
message: string;
|
|
2593
|
+
stack?: string;
|
|
2594
|
+
};
|
|
2595
|
+
"new"(): {
|
|
2596
|
+
readonly tag: SlimError_Tags.Timeout;
|
|
2597
|
+
/**
|
|
2598
|
+
* @private
|
|
2599
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2600
|
+
*/
|
|
2601
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2602
|
+
name: string;
|
|
2603
|
+
message: string;
|
|
2604
|
+
stack?: string;
|
|
2605
|
+
};
|
|
2606
|
+
instanceOf(obj: any): obj is {
|
|
2607
|
+
readonly tag: SlimError_Tags.Timeout;
|
|
2608
|
+
/**
|
|
2609
|
+
* @private
|
|
2610
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2611
|
+
*/
|
|
2612
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2613
|
+
name: string;
|
|
2614
|
+
message: string;
|
|
2615
|
+
stack?: string;
|
|
2616
|
+
};
|
|
2617
|
+
hasInner(obj: any): obj is {
|
|
2618
|
+
readonly tag: SlimError_Tags.Timeout;
|
|
2619
|
+
/**
|
|
2620
|
+
* @private
|
|
2621
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2622
|
+
*/
|
|
2623
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2624
|
+
name: string;
|
|
2625
|
+
message: string;
|
|
2626
|
+
stack?: string;
|
|
2627
|
+
};
|
|
2628
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2629
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2630
|
+
stackTraceLimit: number;
|
|
2631
|
+
};
|
|
2632
|
+
InvalidArgument: {
|
|
2633
|
+
new (inner: {
|
|
2634
|
+
message: string;
|
|
2635
|
+
}): {
|
|
2636
|
+
readonly tag: SlimError_Tags.InvalidArgument;
|
|
2637
|
+
readonly inner: Readonly<{
|
|
2638
|
+
message: string;
|
|
2639
|
+
}>;
|
|
2640
|
+
/**
|
|
2641
|
+
* @private
|
|
2642
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2643
|
+
*/
|
|
2644
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2645
|
+
name: string;
|
|
2646
|
+
message: string;
|
|
2647
|
+
stack?: string;
|
|
2648
|
+
};
|
|
2649
|
+
"new"(inner: {
|
|
2650
|
+
message: string;
|
|
2651
|
+
}): {
|
|
2652
|
+
readonly tag: SlimError_Tags.InvalidArgument;
|
|
2653
|
+
readonly inner: Readonly<{
|
|
2654
|
+
message: string;
|
|
2655
|
+
}>;
|
|
2656
|
+
/**
|
|
2657
|
+
* @private
|
|
2658
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2659
|
+
*/
|
|
2660
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2661
|
+
name: string;
|
|
2662
|
+
message: string;
|
|
2663
|
+
stack?: string;
|
|
2664
|
+
};
|
|
2665
|
+
instanceOf(obj: any): obj is {
|
|
2666
|
+
readonly tag: SlimError_Tags.InvalidArgument;
|
|
2667
|
+
readonly inner: Readonly<{
|
|
2668
|
+
message: string;
|
|
2669
|
+
}>;
|
|
2670
|
+
/**
|
|
2671
|
+
* @private
|
|
2672
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2673
|
+
*/
|
|
2674
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2675
|
+
name: string;
|
|
2676
|
+
message: string;
|
|
2677
|
+
stack?: string;
|
|
2678
|
+
};
|
|
2679
|
+
hasInner(obj: any): obj is {
|
|
2680
|
+
readonly tag: SlimError_Tags.InvalidArgument;
|
|
2681
|
+
readonly inner: Readonly<{
|
|
2682
|
+
message: string;
|
|
2683
|
+
}>;
|
|
2684
|
+
/**
|
|
2685
|
+
* @private
|
|
2686
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2687
|
+
*/
|
|
2688
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2689
|
+
name: string;
|
|
2690
|
+
message: string;
|
|
2691
|
+
stack?: string;
|
|
2692
|
+
};
|
|
2693
|
+
getInner(obj: {
|
|
2694
|
+
readonly tag: SlimError_Tags.InvalidArgument;
|
|
2695
|
+
readonly inner: Readonly<{
|
|
2696
|
+
message: string;
|
|
2697
|
+
}>;
|
|
2698
|
+
/**
|
|
2699
|
+
* @private
|
|
2700
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2701
|
+
*/
|
|
2702
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2703
|
+
name: string;
|
|
2704
|
+
message: string;
|
|
2705
|
+
stack?: string;
|
|
2706
|
+
}): Readonly<{
|
|
2707
|
+
message: string;
|
|
2708
|
+
}>;
|
|
2709
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2710
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2711
|
+
stackTraceLimit: number;
|
|
2712
|
+
};
|
|
2713
|
+
InternalError: {
|
|
2714
|
+
new (inner: {
|
|
2715
|
+
message: string;
|
|
2716
|
+
}): {
|
|
2717
|
+
readonly tag: SlimError_Tags.InternalError;
|
|
2718
|
+
readonly inner: Readonly<{
|
|
2719
|
+
message: string;
|
|
2720
|
+
}>;
|
|
2721
|
+
/**
|
|
2722
|
+
* @private
|
|
2723
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2724
|
+
*/
|
|
2725
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2726
|
+
name: string;
|
|
2727
|
+
message: string;
|
|
2728
|
+
stack?: string;
|
|
2729
|
+
};
|
|
2730
|
+
"new"(inner: {
|
|
2731
|
+
message: string;
|
|
2732
|
+
}): {
|
|
2733
|
+
readonly tag: SlimError_Tags.InternalError;
|
|
2734
|
+
readonly inner: Readonly<{
|
|
2735
|
+
message: string;
|
|
2736
|
+
}>;
|
|
2737
|
+
/**
|
|
2738
|
+
* @private
|
|
2739
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2740
|
+
*/
|
|
2741
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2742
|
+
name: string;
|
|
2743
|
+
message: string;
|
|
2744
|
+
stack?: string;
|
|
2745
|
+
};
|
|
2746
|
+
instanceOf(obj: any): obj is {
|
|
2747
|
+
readonly tag: SlimError_Tags.InternalError;
|
|
2748
|
+
readonly inner: Readonly<{
|
|
2749
|
+
message: string;
|
|
2750
|
+
}>;
|
|
2751
|
+
/**
|
|
2752
|
+
* @private
|
|
2753
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2754
|
+
*/
|
|
2755
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2756
|
+
name: string;
|
|
2757
|
+
message: string;
|
|
2758
|
+
stack?: string;
|
|
2759
|
+
};
|
|
2760
|
+
hasInner(obj: any): obj is {
|
|
2761
|
+
readonly tag: SlimError_Tags.InternalError;
|
|
2762
|
+
readonly inner: Readonly<{
|
|
2763
|
+
message: string;
|
|
2764
|
+
}>;
|
|
2765
|
+
/**
|
|
2766
|
+
* @private
|
|
2767
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2768
|
+
*/
|
|
2769
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2770
|
+
name: string;
|
|
2771
|
+
message: string;
|
|
2772
|
+
stack?: string;
|
|
2773
|
+
};
|
|
2774
|
+
getInner(obj: {
|
|
2775
|
+
readonly tag: SlimError_Tags.InternalError;
|
|
2776
|
+
readonly inner: Readonly<{
|
|
2777
|
+
message: string;
|
|
2778
|
+
}>;
|
|
2779
|
+
/**
|
|
2780
|
+
* @private
|
|
2781
|
+
* This field is private and should not be used, use `tag` instead.
|
|
2782
|
+
*/
|
|
2783
|
+
readonly [uniffiTypeNameSymbol]: "SlimError";
|
|
2784
|
+
name: string;
|
|
2785
|
+
message: string;
|
|
2786
|
+
stack?: string;
|
|
2787
|
+
}): Readonly<{
|
|
2788
|
+
message: string;
|
|
2789
|
+
}>;
|
|
2790
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
2791
|
+
prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
|
|
2792
|
+
stackTraceLimit: number;
|
|
2793
|
+
};
|
|
2794
|
+
}>;
|
|
2795
|
+
/**
|
|
2796
|
+
* Error types for SLIM operations
|
|
2797
|
+
*/
|
|
2798
|
+
export type SlimError = InstanceType<typeof SlimError['ServiceError' | 'SessionError' | 'ReceiveError' | 'SendError' | 'AuthError' | 'ConfigError' | 'RpcError' | 'Timeout' | 'InvalidArgument' | 'InternalError']>;
|
|
2799
|
+
/**
|
|
2800
|
+
* FFI-compatible completion handle for async operations
|
|
2801
|
+
*
|
|
2802
|
+
* Represents a pending operation that can be awaited to ensure completion.
|
|
2803
|
+
* Used for operations that need delivery confirmation or handshake acknowledgment.
|
|
2804
|
+
*
|
|
2805
|
+
* # Examples
|
|
2806
|
+
*
|
|
2807
|
+
* Basic usage:
|
|
2808
|
+
* ```ignore
|
|
2809
|
+
* let completion = session.publish(data, None, None)?;
|
|
2810
|
+
* completion.wait()?; // Wait for delivery confirmation
|
|
2811
|
+
* ```
|
|
2812
|
+
*/
|
|
2813
|
+
export interface CompletionHandleLike {
|
|
2814
|
+
/**
|
|
2815
|
+
* Wait for the operation to complete indefinitely (blocking version)
|
|
2816
|
+
*
|
|
2817
|
+
* This blocks the calling thread until the operation completes.
|
|
2818
|
+
* Use this from Go or other languages when you need to ensure
|
|
2819
|
+
* an operation has finished before proceeding.
|
|
2820
|
+
*
|
|
2821
|
+
* **Note:** This can only be called once per handle. Subsequent calls
|
|
2822
|
+
* will return an error.
|
|
2823
|
+
*
|
|
2824
|
+
* # Returns
|
|
2825
|
+
* * `Ok(())` - Operation completed successfully
|
|
2826
|
+
* * `Err(SlimError)` - Operation failed or handle already consumed
|
|
2827
|
+
*/
|
|
2828
|
+
wait(): void;
|
|
2829
|
+
/**
|
|
2830
|
+
* Wait for the operation to complete indefinitely (async version)
|
|
2831
|
+
*
|
|
2832
|
+
* This is the async version that integrates with UniFFI's polling mechanism.
|
|
2833
|
+
* The operation will yield control while waiting.
|
|
2834
|
+
*
|
|
2835
|
+
* **Note:** This can only be called once per handle. Subsequent calls
|
|
2836
|
+
* will return an error.
|
|
2837
|
+
*
|
|
2838
|
+
* # Returns
|
|
2839
|
+
* * `Ok(())` - Operation completed successfully
|
|
2840
|
+
* * `Err(SlimError)` - Operation failed or handle already consumed
|
|
2841
|
+
*/
|
|
2842
|
+
waitAsync(asyncOpts_?: {
|
|
2843
|
+
signal: AbortSignal;
|
|
2844
|
+
}): Promise<void>;
|
|
2845
|
+
/**
|
|
2846
|
+
* Wait for the operation to complete with a timeout (blocking version)
|
|
2847
|
+
*
|
|
2848
|
+
* This blocks the calling thread until the operation completes or the timeout expires.
|
|
2849
|
+
* Use this from Go or other languages when you need to ensure
|
|
2850
|
+
* an operation has finished before proceeding with a time limit.
|
|
2851
|
+
*
|
|
2852
|
+
* **Note:** This can only be called once per handle. Subsequent calls
|
|
2853
|
+
* will return an error.
|
|
2854
|
+
*
|
|
2855
|
+
* # Arguments
|
|
2856
|
+
* * `timeout` - Maximum time to wait for completion
|
|
2857
|
+
*
|
|
2858
|
+
* # Returns
|
|
2859
|
+
* * `Ok(())` - Operation completed successfully
|
|
2860
|
+
* * `Err(SlimError::Timeout)` - If the operation timed out
|
|
2861
|
+
* * `Err(SlimError)` - Operation failed or handle already consumed
|
|
2862
|
+
*/
|
|
2863
|
+
waitFor(timeout: number): void;
|
|
2864
|
+
/**
|
|
2865
|
+
* Wait for the operation to complete with a timeout (async version)
|
|
2866
|
+
*
|
|
2867
|
+
* This is the async version that integrates with UniFFI's polling mechanism.
|
|
2868
|
+
* The operation will yield control while waiting until completion or timeout.
|
|
2869
|
+
*
|
|
2870
|
+
* **Note:** This can only be called once per handle. Subsequent calls
|
|
2871
|
+
* will return an error.
|
|
2872
|
+
*
|
|
2873
|
+
* # Arguments
|
|
2874
|
+
* * `timeout` - Maximum time to wait for completion
|
|
2875
|
+
*
|
|
2876
|
+
* # Returns
|
|
2877
|
+
* * `Ok(())` - Operation completed successfully
|
|
2878
|
+
* * `Err(SlimError::Timeout)` - If the operation timed out
|
|
2879
|
+
* * `Err(SlimError)` - Operation failed or handle already consumed
|
|
2880
|
+
*/
|
|
2881
|
+
waitForAsync(timeout: number, asyncOpts_?: {
|
|
2882
|
+
signal: AbortSignal;
|
|
2883
|
+
}): Promise<void>;
|
|
2884
|
+
}
|
|
2885
|
+
/**
|
|
2886
|
+
* @deprecated Use `CompletionHandleLike` instead.
|
|
2887
|
+
*/
|
|
2888
|
+
export type CompletionHandleInterface = CompletionHandleLike;
|
|
2889
|
+
/**
|
|
2890
|
+
* FFI-compatible completion handle for async operations
|
|
2891
|
+
*
|
|
2892
|
+
* Represents a pending operation that can be awaited to ensure completion.
|
|
2893
|
+
* Used for operations that need delivery confirmation or handshake acknowledgment.
|
|
2894
|
+
*
|
|
2895
|
+
* # Examples
|
|
2896
|
+
*
|
|
2897
|
+
* Basic usage:
|
|
2898
|
+
* ```ignore
|
|
2899
|
+
* let completion = session.publish(data, None, None)?;
|
|
2900
|
+
* completion.wait()?; // Wait for delivery confirmation
|
|
2901
|
+
* ```
|
|
2902
|
+
*/
|
|
2903
|
+
export declare class CompletionHandle extends UniffiAbstractObject implements CompletionHandleLike {
|
|
2904
|
+
readonly [uniffiTypeNameSymbol] = "CompletionHandle";
|
|
2905
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
2906
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
2907
|
+
private constructor();
|
|
2908
|
+
/**
|
|
2909
|
+
* Wait for the operation to complete indefinitely (blocking version)
|
|
2910
|
+
*
|
|
2911
|
+
* This blocks the calling thread until the operation completes.
|
|
2912
|
+
* Use this from Go or other languages when you need to ensure
|
|
2913
|
+
* an operation has finished before proceeding.
|
|
2914
|
+
*
|
|
2915
|
+
* **Note:** This can only be called once per handle. Subsequent calls
|
|
2916
|
+
* will return an error.
|
|
2917
|
+
*
|
|
2918
|
+
* # Returns
|
|
2919
|
+
* * `Ok(())` - Operation completed successfully
|
|
2920
|
+
* * `Err(SlimError)` - Operation failed or handle already consumed
|
|
2921
|
+
*/
|
|
2922
|
+
wait(): void;
|
|
2923
|
+
/**
|
|
2924
|
+
* Wait for the operation to complete indefinitely (async version)
|
|
2925
|
+
*
|
|
2926
|
+
* This is the async version that integrates with UniFFI's polling mechanism.
|
|
2927
|
+
* The operation will yield control while waiting.
|
|
2928
|
+
*
|
|
2929
|
+
* **Note:** This can only be called once per handle. Subsequent calls
|
|
2930
|
+
* will return an error.
|
|
2931
|
+
*
|
|
2932
|
+
* # Returns
|
|
2933
|
+
* * `Ok(())` - Operation completed successfully
|
|
2934
|
+
* * `Err(SlimError)` - Operation failed or handle already consumed
|
|
2935
|
+
*/
|
|
2936
|
+
waitAsync(asyncOpts_?: {
|
|
2937
|
+
signal: AbortSignal;
|
|
2938
|
+
}): Promise<void>;
|
|
2939
|
+
/**
|
|
2940
|
+
* Wait for the operation to complete with a timeout (blocking version)
|
|
2941
|
+
*
|
|
2942
|
+
* This blocks the calling thread until the operation completes or the timeout expires.
|
|
2943
|
+
* Use this from Go or other languages when you need to ensure
|
|
2944
|
+
* an operation has finished before proceeding with a time limit.
|
|
2945
|
+
*
|
|
2946
|
+
* **Note:** This can only be called once per handle. Subsequent calls
|
|
2947
|
+
* will return an error.
|
|
2948
|
+
*
|
|
2949
|
+
* # Arguments
|
|
2950
|
+
* * `timeout` - Maximum time to wait for completion
|
|
2951
|
+
*
|
|
2952
|
+
* # Returns
|
|
2953
|
+
* * `Ok(())` - Operation completed successfully
|
|
2954
|
+
* * `Err(SlimError::Timeout)` - If the operation timed out
|
|
2955
|
+
* * `Err(SlimError)` - Operation failed or handle already consumed
|
|
2956
|
+
*/
|
|
2957
|
+
waitFor(timeout: number): void;
|
|
2958
|
+
/**
|
|
2959
|
+
* Wait for the operation to complete with a timeout (async version)
|
|
2960
|
+
*
|
|
2961
|
+
* This is the async version that integrates with UniFFI's polling mechanism.
|
|
2962
|
+
* The operation will yield control while waiting until completion or timeout.
|
|
2963
|
+
*
|
|
2964
|
+
* **Note:** This can only be called once per handle. Subsequent calls
|
|
2965
|
+
* will return an error.
|
|
2966
|
+
*
|
|
2967
|
+
* # Arguments
|
|
2968
|
+
* * `timeout` - Maximum time to wait for completion
|
|
2969
|
+
*
|
|
2970
|
+
* # Returns
|
|
2971
|
+
* * `Ok(())` - Operation completed successfully
|
|
2972
|
+
* * `Err(SlimError::Timeout)` - If the operation timed out
|
|
2973
|
+
* * `Err(SlimError)` - Operation failed or handle already consumed
|
|
2974
|
+
*/
|
|
2975
|
+
waitForAsync(timeout: number, asyncOpts_?: {
|
|
2976
|
+
signal: AbortSignal;
|
|
2977
|
+
}): Promise<void>;
|
|
2978
|
+
uniffiDestroy(): void;
|
|
2979
|
+
static instanceOf(obj_: any): obj_ is CompletionHandle;
|
|
2980
|
+
}
|
|
2981
|
+
/**
|
|
2982
|
+
* Session context for language bindings (UniFFI-compatible)
|
|
2983
|
+
*
|
|
2984
|
+
* Wraps the session context with proper async access patterns for message reception.
|
|
2985
|
+
* Provides both synchronous (blocking) and asynchronous methods for FFI compatibility.
|
|
2986
|
+
*/
|
|
2987
|
+
export interface SessionLike {
|
|
2988
|
+
/**
|
|
2989
|
+
* Get the session configuration
|
|
2990
|
+
*/
|
|
2991
|
+
config(): SessionConfig;
|
|
2992
|
+
/**
|
|
2993
|
+
* Get the destination name for this session
|
|
2994
|
+
*/
|
|
2995
|
+
destination(): NameLike;
|
|
2996
|
+
/**
|
|
2997
|
+
* Receive a message from the session (blocking version for FFI)
|
|
2998
|
+
*
|
|
2999
|
+
* # Arguments
|
|
3000
|
+
* * `timeout` - Optional timeout duration
|
|
3001
|
+
*
|
|
3002
|
+
* # Returns
|
|
3003
|
+
* * `Ok(ReceivedMessage)` - Message with context and payload bytes
|
|
3004
|
+
* * `Err(SlimError)` - If the receive fails or times out
|
|
3005
|
+
*/
|
|
3006
|
+
getMessage(timeout: number | undefined): ReceivedMessage;
|
|
3007
|
+
/**
|
|
3008
|
+
* Receive a message from the session (async version)
|
|
3009
|
+
*/
|
|
3010
|
+
getMessageAsync(timeout: number | undefined, asyncOpts_?: {
|
|
3011
|
+
signal: AbortSignal;
|
|
3012
|
+
}): Promise<ReceivedMessage>;
|
|
3013
|
+
/**
|
|
3014
|
+
* Invite a participant to the session (blocking version)
|
|
3015
|
+
*
|
|
3016
|
+
* Returns a completion handle that can be awaited to ensure the invitation completes.
|
|
3017
|
+
*/
|
|
3018
|
+
invite(participant: NameLike): CompletionHandleLike;
|
|
3019
|
+
/**
|
|
3020
|
+
* Invite a participant and wait for completion (blocking version)
|
|
3021
|
+
*
|
|
3022
|
+
* This method invites a participant and blocks until the invitation completes.
|
|
3023
|
+
*/
|
|
3024
|
+
inviteAndWait(participant: NameLike): void;
|
|
3025
|
+
/**
|
|
3026
|
+
* Invite a participant and wait for completion (async version)
|
|
3027
|
+
*
|
|
3028
|
+
* This method invites a participant and waits until the invitation completes.
|
|
3029
|
+
*/
|
|
3030
|
+
inviteAndWaitAsync(participant: NameLike, asyncOpts_?: {
|
|
3031
|
+
signal: AbortSignal;
|
|
3032
|
+
}): Promise<void>;
|
|
3033
|
+
/**
|
|
3034
|
+
* Invite a participant to the session (async version)
|
|
3035
|
+
*
|
|
3036
|
+
* Returns a completion handle that can be awaited to ensure the invitation completes.
|
|
3037
|
+
*/
|
|
3038
|
+
inviteAsync(participant: NameLike, asyncOpts_?: {
|
|
3039
|
+
signal: AbortSignal;
|
|
3040
|
+
}): Promise<CompletionHandleLike>;
|
|
3041
|
+
/**
|
|
3042
|
+
* Check if this session is the initiator
|
|
3043
|
+
*/
|
|
3044
|
+
isInitiator(): boolean;
|
|
3045
|
+
/**
|
|
3046
|
+
* Get the session metadata
|
|
3047
|
+
*/
|
|
3048
|
+
metadata(): Map<string, string>;
|
|
3049
|
+
/**
|
|
3050
|
+
* Get list of participants in the session (blocking version for FFI)
|
|
3051
|
+
*/
|
|
3052
|
+
participantsList(): Array<NameLike>;
|
|
3053
|
+
/**
|
|
3054
|
+
* Get list of participants in the session
|
|
3055
|
+
*/
|
|
3056
|
+
participantsListAsync(asyncOpts_?: {
|
|
3057
|
+
signal: AbortSignal;
|
|
3058
|
+
}): Promise<Array<NameLike>>;
|
|
3059
|
+
/**
|
|
3060
|
+
* Publish a message to the session's destination (blocking version)
|
|
3061
|
+
*
|
|
3062
|
+
* Returns a completion handle that can be awaited to ensure the message was delivered.
|
|
3063
|
+
*
|
|
3064
|
+
* # Arguments
|
|
3065
|
+
* * `data` - The message payload bytes
|
|
3066
|
+
* * `payload_type` - Optional content type identifier
|
|
3067
|
+
* * `metadata` - Optional key-value metadata pairs
|
|
3068
|
+
*
|
|
3069
|
+
* # Returns
|
|
3070
|
+
* * `Ok(CompletionHandle)` - Handle to await delivery confirmation
|
|
3071
|
+
* * `Err(SlimError)` - If publishing fails
|
|
3072
|
+
*
|
|
3073
|
+
* # Example
|
|
3074
|
+
* ```ignore
|
|
3075
|
+
* let completion = session.publish(data, None, None)?;
|
|
3076
|
+
* completion.wait()?; // Blocks until message is delivered
|
|
3077
|
+
* ```
|
|
3078
|
+
*/
|
|
3079
|
+
publish(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): CompletionHandleLike;
|
|
3080
|
+
/**
|
|
3081
|
+
* Publish a message and wait for completion (blocking version)
|
|
3082
|
+
*
|
|
3083
|
+
* This method publishes a message and blocks until the delivery completes.
|
|
3084
|
+
*/
|
|
3085
|
+
publishAndWait(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
|
|
3086
|
+
/**
|
|
3087
|
+
* Publish a message and wait for completion (async version)
|
|
3088
|
+
*
|
|
3089
|
+
* This method publishes a message and waits until the delivery completes.
|
|
3090
|
+
*/
|
|
3091
|
+
publishAndWaitAsync(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3092
|
+
signal: AbortSignal;
|
|
3093
|
+
}): Promise<void>;
|
|
3094
|
+
/**
|
|
3095
|
+
* Publish a message to the session's destination (async version)
|
|
3096
|
+
*
|
|
3097
|
+
* Returns a completion handle that can be awaited to ensure the message was delivered.
|
|
3098
|
+
*/
|
|
3099
|
+
publishAsync(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3100
|
+
signal: AbortSignal;
|
|
3101
|
+
}): Promise<CompletionHandleLike>;
|
|
3102
|
+
/**
|
|
3103
|
+
* Publish a reply message to the originator of a received message (blocking version for FFI)
|
|
3104
|
+
*
|
|
3105
|
+
* This method uses the routing information from a previously received message
|
|
3106
|
+
* to send a reply back to the sender. This is the preferred way to implement
|
|
3107
|
+
* request/reply patterns.
|
|
3108
|
+
*
|
|
3109
|
+
* Returns a completion handle that can be awaited to ensure the message was delivered.
|
|
3110
|
+
*
|
|
3111
|
+
* # Arguments
|
|
3112
|
+
* * `message_context` - Context from a message received via `get_message()`
|
|
3113
|
+
* * `data` - The reply payload bytes
|
|
3114
|
+
* * `payload_type` - Optional content type identifier
|
|
3115
|
+
* * `metadata` - Optional key-value metadata pairs
|
|
3116
|
+
*
|
|
3117
|
+
* # Returns
|
|
3118
|
+
* * `Ok(CompletionHandle)` - Handle to await delivery confirmation
|
|
3119
|
+
* * `Err(SlimError)` - If publishing fails
|
|
3120
|
+
*/
|
|
3121
|
+
publishTo(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): CompletionHandleLike;
|
|
3122
|
+
/**
|
|
3123
|
+
* Publish a reply message and wait for completion (blocking version)
|
|
3124
|
+
*
|
|
3125
|
+
* This method publishes a reply to a received message and blocks until the delivery completes.
|
|
3126
|
+
*/
|
|
3127
|
+
publishToAndWait(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
|
|
3128
|
+
/**
|
|
3129
|
+
* Publish a reply message and wait for completion (async version)
|
|
3130
|
+
*
|
|
3131
|
+
* This method publishes a reply to a received message and waits until the delivery completes.
|
|
3132
|
+
*/
|
|
3133
|
+
publishToAndWaitAsync(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3134
|
+
signal: AbortSignal;
|
|
3135
|
+
}): Promise<void>;
|
|
3136
|
+
/**
|
|
3137
|
+
* Publish a reply message (async version)
|
|
3138
|
+
*
|
|
3139
|
+
* Returns a completion handle that can be awaited to ensure the message was delivered.
|
|
3140
|
+
*/
|
|
3141
|
+
publishToAsync(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3142
|
+
signal: AbortSignal;
|
|
3143
|
+
}): Promise<CompletionHandleLike>;
|
|
3144
|
+
/**
|
|
3145
|
+
* Low-level publish with full control over all parameters (blocking version for FFI)
|
|
3146
|
+
*
|
|
3147
|
+
* This is an advanced method that provides complete control over routing and delivery.
|
|
3148
|
+
* Most users should use `publish()` or `publish_to()` instead.
|
|
3149
|
+
*
|
|
3150
|
+
* # Arguments
|
|
3151
|
+
* * `destination` - Target name to send to
|
|
3152
|
+
* * `fanout` - Number of copies to send (for multicast)
|
|
3153
|
+
* * `data` - The message payload bytes
|
|
3154
|
+
* * `connection_out` - Optional specific connection ID to use
|
|
3155
|
+
* * `payload_type` - Optional content type identifier
|
|
3156
|
+
* * `metadata` - Optional key-value metadata pairs
|
|
3157
|
+
*/
|
|
3158
|
+
publishWithParams(destination: NameLike, fanout: number, data: ArrayBuffer, connectionOut: bigint | undefined, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
|
|
3159
|
+
/**
|
|
3160
|
+
* Low-level publish with full control (async version)
|
|
3161
|
+
*/
|
|
3162
|
+
publishWithParamsAsync(destination: NameLike, fanout: number, data: ArrayBuffer, connectionOut: bigint | undefined, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3163
|
+
signal: AbortSignal;
|
|
3164
|
+
}): Promise<void>;
|
|
3165
|
+
/**
|
|
3166
|
+
* Remove a participant from the session (blocking version)
|
|
3167
|
+
*
|
|
3168
|
+
* Returns a completion handle that can be awaited to ensure the removal completes.
|
|
3169
|
+
*/
|
|
3170
|
+
remove(participant: NameLike): CompletionHandleLike;
|
|
3171
|
+
/**
|
|
3172
|
+
* Remove a participant and wait for completion (blocking version)
|
|
3173
|
+
*
|
|
3174
|
+
* This method removes a participant and blocks until the removal completes.
|
|
3175
|
+
*/
|
|
3176
|
+
removeAndWait(participant: NameLike): void;
|
|
3177
|
+
/**
|
|
3178
|
+
* Remove a participant and wait for completion (async version)
|
|
3179
|
+
*
|
|
3180
|
+
* This method removes a participant and waits until the removal completes.
|
|
3181
|
+
*/
|
|
3182
|
+
removeAndWaitAsync(participant: NameLike, asyncOpts_?: {
|
|
3183
|
+
signal: AbortSignal;
|
|
3184
|
+
}): Promise<void>;
|
|
3185
|
+
/**
|
|
3186
|
+
* Remove a participant from the session (async version)
|
|
3187
|
+
*
|
|
3188
|
+
* Returns a completion handle that can be awaited to ensure the removal completes.
|
|
3189
|
+
*/
|
|
3190
|
+
removeAsync(participant: NameLike, asyncOpts_?: {
|
|
3191
|
+
signal: AbortSignal;
|
|
3192
|
+
}): Promise<CompletionHandleLike>;
|
|
3193
|
+
/**
|
|
3194
|
+
* Get the session ID
|
|
3195
|
+
*/
|
|
3196
|
+
sessionId(): number;
|
|
3197
|
+
/**
|
|
3198
|
+
* Get the session type (PointToPoint or Group)
|
|
3199
|
+
*/
|
|
3200
|
+
sessionType(): SessionType;
|
|
3201
|
+
/**
|
|
3202
|
+
* Get the source name for this session
|
|
3203
|
+
*/
|
|
3204
|
+
source(): NameLike;
|
|
3205
|
+
}
|
|
3206
|
+
/**
|
|
3207
|
+
* @deprecated Use `SessionLike` instead.
|
|
3208
|
+
*/
|
|
3209
|
+
export type SessionInterface = SessionLike;
|
|
3210
|
+
/**
|
|
3211
|
+
* Session context for language bindings (UniFFI-compatible)
|
|
3212
|
+
*
|
|
3213
|
+
* Wraps the session context with proper async access patterns for message reception.
|
|
3214
|
+
* Provides both synchronous (blocking) and asynchronous methods for FFI compatibility.
|
|
3215
|
+
*/
|
|
3216
|
+
export declare class Session extends UniffiAbstractObject implements SessionLike {
|
|
3217
|
+
readonly [uniffiTypeNameSymbol] = "Session";
|
|
3218
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
3219
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
3220
|
+
private constructor();
|
|
3221
|
+
/**
|
|
3222
|
+
* Get the session configuration
|
|
3223
|
+
*/
|
|
3224
|
+
config(): SessionConfig;
|
|
3225
|
+
/**
|
|
3226
|
+
* Get the destination name for this session
|
|
3227
|
+
*/
|
|
3228
|
+
destination(): NameLike;
|
|
3229
|
+
/**
|
|
3230
|
+
* Receive a message from the session (blocking version for FFI)
|
|
3231
|
+
*
|
|
3232
|
+
* # Arguments
|
|
3233
|
+
* * `timeout` - Optional timeout duration
|
|
3234
|
+
*
|
|
3235
|
+
* # Returns
|
|
3236
|
+
* * `Ok(ReceivedMessage)` - Message with context and payload bytes
|
|
3237
|
+
* * `Err(SlimError)` - If the receive fails or times out
|
|
3238
|
+
*/
|
|
3239
|
+
getMessage(timeout: number | undefined): ReceivedMessage;
|
|
3240
|
+
/**
|
|
3241
|
+
* Receive a message from the session (async version)
|
|
3242
|
+
*/
|
|
3243
|
+
getMessageAsync(timeout: number | undefined, asyncOpts_?: {
|
|
3244
|
+
signal: AbortSignal;
|
|
3245
|
+
}): Promise<ReceivedMessage>;
|
|
3246
|
+
/**
|
|
3247
|
+
* Invite a participant to the session (blocking version)
|
|
3248
|
+
*
|
|
3249
|
+
* Returns a completion handle that can be awaited to ensure the invitation completes.
|
|
3250
|
+
*/
|
|
3251
|
+
invite(participant: NameLike): CompletionHandleLike;
|
|
3252
|
+
/**
|
|
3253
|
+
* Invite a participant and wait for completion (blocking version)
|
|
3254
|
+
*
|
|
3255
|
+
* This method invites a participant and blocks until the invitation completes.
|
|
3256
|
+
*/
|
|
3257
|
+
inviteAndWait(participant: NameLike): void;
|
|
3258
|
+
/**
|
|
3259
|
+
* Invite a participant and wait for completion (async version)
|
|
3260
|
+
*
|
|
3261
|
+
* This method invites a participant and waits until the invitation completes.
|
|
3262
|
+
*/
|
|
3263
|
+
inviteAndWaitAsync(participant: NameLike, asyncOpts_?: {
|
|
3264
|
+
signal: AbortSignal;
|
|
3265
|
+
}): Promise<void>;
|
|
3266
|
+
/**
|
|
3267
|
+
* Invite a participant to the session (async version)
|
|
3268
|
+
*
|
|
3269
|
+
* Returns a completion handle that can be awaited to ensure the invitation completes.
|
|
3270
|
+
*/
|
|
3271
|
+
inviteAsync(participant: NameLike, asyncOpts_?: {
|
|
3272
|
+
signal: AbortSignal;
|
|
3273
|
+
}): Promise<CompletionHandleLike>;
|
|
3274
|
+
/**
|
|
3275
|
+
* Check if this session is the initiator
|
|
3276
|
+
*/
|
|
3277
|
+
isInitiator(): boolean;
|
|
3278
|
+
/**
|
|
3279
|
+
* Get the session metadata
|
|
3280
|
+
*/
|
|
3281
|
+
metadata(): Map<string, string>;
|
|
3282
|
+
/**
|
|
3283
|
+
* Get list of participants in the session (blocking version for FFI)
|
|
3284
|
+
*/
|
|
3285
|
+
participantsList(): Array<NameLike>;
|
|
3286
|
+
/**
|
|
3287
|
+
* Get list of participants in the session
|
|
3288
|
+
*/
|
|
3289
|
+
participantsListAsync(asyncOpts_?: {
|
|
3290
|
+
signal: AbortSignal;
|
|
3291
|
+
}): Promise<Array<NameLike>>;
|
|
3292
|
+
/**
|
|
3293
|
+
* Publish a message to the session's destination (blocking version)
|
|
3294
|
+
*
|
|
3295
|
+
* Returns a completion handle that can be awaited to ensure the message was delivered.
|
|
3296
|
+
*
|
|
3297
|
+
* # Arguments
|
|
3298
|
+
* * `data` - The message payload bytes
|
|
3299
|
+
* * `payload_type` - Optional content type identifier
|
|
3300
|
+
* * `metadata` - Optional key-value metadata pairs
|
|
3301
|
+
*
|
|
3302
|
+
* # Returns
|
|
3303
|
+
* * `Ok(CompletionHandle)` - Handle to await delivery confirmation
|
|
3304
|
+
* * `Err(SlimError)` - If publishing fails
|
|
3305
|
+
*
|
|
3306
|
+
* # Example
|
|
3307
|
+
* ```ignore
|
|
3308
|
+
* let completion = session.publish(data, None, None)?;
|
|
3309
|
+
* completion.wait()?; // Blocks until message is delivered
|
|
3310
|
+
* ```
|
|
3311
|
+
*/
|
|
3312
|
+
publish(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): CompletionHandleLike;
|
|
3313
|
+
/**
|
|
3314
|
+
* Publish a message and wait for completion (blocking version)
|
|
3315
|
+
*
|
|
3316
|
+
* This method publishes a message and blocks until the delivery completes.
|
|
3317
|
+
*/
|
|
3318
|
+
publishAndWait(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
|
|
3319
|
+
/**
|
|
3320
|
+
* Publish a message and wait for completion (async version)
|
|
3321
|
+
*
|
|
3322
|
+
* This method publishes a message and waits until the delivery completes.
|
|
3323
|
+
*/
|
|
3324
|
+
publishAndWaitAsync(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3325
|
+
signal: AbortSignal;
|
|
3326
|
+
}): Promise<void>;
|
|
3327
|
+
/**
|
|
3328
|
+
* Publish a message to the session's destination (async version)
|
|
3329
|
+
*
|
|
3330
|
+
* Returns a completion handle that can be awaited to ensure the message was delivered.
|
|
3331
|
+
*/
|
|
3332
|
+
publishAsync(data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3333
|
+
signal: AbortSignal;
|
|
3334
|
+
}): Promise<CompletionHandleLike>;
|
|
3335
|
+
/**
|
|
3336
|
+
* Publish a reply message to the originator of a received message (blocking version for FFI)
|
|
3337
|
+
*
|
|
3338
|
+
* This method uses the routing information from a previously received message
|
|
3339
|
+
* to send a reply back to the sender. This is the preferred way to implement
|
|
3340
|
+
* request/reply patterns.
|
|
3341
|
+
*
|
|
3342
|
+
* Returns a completion handle that can be awaited to ensure the message was delivered.
|
|
3343
|
+
*
|
|
3344
|
+
* # Arguments
|
|
3345
|
+
* * `message_context` - Context from a message received via `get_message()`
|
|
3346
|
+
* * `data` - The reply payload bytes
|
|
3347
|
+
* * `payload_type` - Optional content type identifier
|
|
3348
|
+
* * `metadata` - Optional key-value metadata pairs
|
|
3349
|
+
*
|
|
3350
|
+
* # Returns
|
|
3351
|
+
* * `Ok(CompletionHandle)` - Handle to await delivery confirmation
|
|
3352
|
+
* * `Err(SlimError)` - If publishing fails
|
|
3353
|
+
*/
|
|
3354
|
+
publishTo(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): CompletionHandleLike;
|
|
3355
|
+
/**
|
|
3356
|
+
* Publish a reply message and wait for completion (blocking version)
|
|
3357
|
+
*
|
|
3358
|
+
* This method publishes a reply to a received message and blocks until the delivery completes.
|
|
3359
|
+
*/
|
|
3360
|
+
publishToAndWait(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
|
|
3361
|
+
/**
|
|
3362
|
+
* Publish a reply message and wait for completion (async version)
|
|
3363
|
+
*
|
|
3364
|
+
* This method publishes a reply to a received message and waits until the delivery completes.
|
|
3365
|
+
*/
|
|
3366
|
+
publishToAndWaitAsync(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3367
|
+
signal: AbortSignal;
|
|
3368
|
+
}): Promise<void>;
|
|
3369
|
+
/**
|
|
3370
|
+
* Publish a reply message (async version)
|
|
3371
|
+
*
|
|
3372
|
+
* Returns a completion handle that can be awaited to ensure the message was delivered.
|
|
3373
|
+
*/
|
|
3374
|
+
publishToAsync(messageContext: MessageContext, data: ArrayBuffer, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3375
|
+
signal: AbortSignal;
|
|
3376
|
+
}): Promise<CompletionHandleLike>;
|
|
3377
|
+
/**
|
|
3378
|
+
* Low-level publish with full control over all parameters (blocking version for FFI)
|
|
3379
|
+
*
|
|
3380
|
+
* This is an advanced method that provides complete control over routing and delivery.
|
|
3381
|
+
* Most users should use `publish()` or `publish_to()` instead.
|
|
3382
|
+
*
|
|
3383
|
+
* # Arguments
|
|
3384
|
+
* * `destination` - Target name to send to
|
|
3385
|
+
* * `fanout` - Number of copies to send (for multicast)
|
|
3386
|
+
* * `data` - The message payload bytes
|
|
3387
|
+
* * `connection_out` - Optional specific connection ID to use
|
|
3388
|
+
* * `payload_type` - Optional content type identifier
|
|
3389
|
+
* * `metadata` - Optional key-value metadata pairs
|
|
3390
|
+
*/
|
|
3391
|
+
publishWithParams(destination: NameLike, fanout: number, data: ArrayBuffer, connectionOut: bigint | undefined, payloadType: string | undefined, metadata: Map<string, string> | undefined): void;
|
|
3392
|
+
/**
|
|
3393
|
+
* Low-level publish with full control (async version)
|
|
3394
|
+
*/
|
|
3395
|
+
publishWithParamsAsync(destination: NameLike, fanout: number, data: ArrayBuffer, connectionOut: bigint | undefined, payloadType: string | undefined, metadata: Map<string, string> | undefined, asyncOpts_?: {
|
|
3396
|
+
signal: AbortSignal;
|
|
3397
|
+
}): Promise<void>;
|
|
3398
|
+
/**
|
|
3399
|
+
* Remove a participant from the session (blocking version)
|
|
3400
|
+
*
|
|
3401
|
+
* Returns a completion handle that can be awaited to ensure the removal completes.
|
|
3402
|
+
*/
|
|
3403
|
+
remove(participant: NameLike): CompletionHandleLike;
|
|
3404
|
+
/**
|
|
3405
|
+
* Remove a participant and wait for completion (blocking version)
|
|
3406
|
+
*
|
|
3407
|
+
* This method removes a participant and blocks until the removal completes.
|
|
3408
|
+
*/
|
|
3409
|
+
removeAndWait(participant: NameLike): void;
|
|
3410
|
+
/**
|
|
3411
|
+
* Remove a participant and wait for completion (async version)
|
|
3412
|
+
*
|
|
3413
|
+
* This method removes a participant and waits until the removal completes.
|
|
3414
|
+
*/
|
|
3415
|
+
removeAndWaitAsync(participant: NameLike, asyncOpts_?: {
|
|
3416
|
+
signal: AbortSignal;
|
|
3417
|
+
}): Promise<void>;
|
|
3418
|
+
/**
|
|
3419
|
+
* Remove a participant from the session (async version)
|
|
3420
|
+
*
|
|
3421
|
+
* Returns a completion handle that can be awaited to ensure the removal completes.
|
|
3422
|
+
*/
|
|
3423
|
+
removeAsync(participant: NameLike, asyncOpts_?: {
|
|
3424
|
+
signal: AbortSignal;
|
|
3425
|
+
}): Promise<CompletionHandleLike>;
|
|
3426
|
+
/**
|
|
3427
|
+
* Get the session ID
|
|
3428
|
+
*/
|
|
3429
|
+
sessionId(): number;
|
|
3430
|
+
/**
|
|
3431
|
+
* Get the session type (PointToPoint or Group)
|
|
3432
|
+
*/
|
|
3433
|
+
sessionType(): SessionType;
|
|
3434
|
+
/**
|
|
3435
|
+
* Get the source name for this session
|
|
3436
|
+
*/
|
|
3437
|
+
source(): NameLike;
|
|
3438
|
+
uniffiDestroy(): void;
|
|
3439
|
+
static instanceOf(obj_: any): obj_ is Session;
|
|
3440
|
+
}
|
|
3441
|
+
/**
|
|
3442
|
+
* Result of creating a session, containing the session context and a completion handle
|
|
3443
|
+
*
|
|
3444
|
+
* The completion handle should be awaited to ensure the session is fully established.
|
|
3445
|
+
*/
|
|
3446
|
+
export type SessionWithCompletion = {
|
|
3447
|
+
/**
|
|
3448
|
+
* The session context for performing operations
|
|
3449
|
+
*/
|
|
3450
|
+
session: SessionLike;
|
|
3451
|
+
/**
|
|
3452
|
+
* Completion handle to wait for session establishment
|
|
3453
|
+
*/
|
|
3454
|
+
completion: CompletionHandleLike;
|
|
3455
|
+
};
|
|
3456
|
+
/**
|
|
3457
|
+
* Generated factory for {@link SessionWithCompletion} record objects.
|
|
3458
|
+
*/
|
|
3459
|
+
export declare const SessionWithCompletion: Readonly<{
|
|
3460
|
+
create: (partial: Partial<SessionWithCompletion> & Required<Omit<SessionWithCompletion, "session" | "completion">>) => SessionWithCompletion;
|
|
3461
|
+
new: (partial: Partial<SessionWithCompletion> & Required<Omit<SessionWithCompletion, "session" | "completion">>) => SessionWithCompletion;
|
|
3462
|
+
defaults: () => Partial<SessionWithCompletion>;
|
|
3463
|
+
}>;
|
|
3464
|
+
/**
|
|
3465
|
+
* Tracing/logging configuration for the SLIM bindings
|
|
3466
|
+
*
|
|
3467
|
+
* Controls logging behavior including log level, thread name/ID display, and filters.
|
|
3468
|
+
*/
|
|
3469
|
+
export type TracingConfig = {
|
|
3470
|
+
/**
|
|
3471
|
+
* Log level (e.g., "debug", "info", "warn", "error")
|
|
3472
|
+
*/
|
|
3473
|
+
logLevel: string;
|
|
3474
|
+
/**
|
|
3475
|
+
* Whether to display thread names in logs
|
|
3476
|
+
*/
|
|
3477
|
+
displayThreadNames: boolean;
|
|
3478
|
+
/**
|
|
3479
|
+
* Whether to display thread IDs in logs
|
|
3480
|
+
*/
|
|
3481
|
+
displayThreadIds: boolean;
|
|
3482
|
+
/**
|
|
3483
|
+
* List of tracing filter directives (e.g., ["slim=debug", "tokio=info"])
|
|
3484
|
+
*/
|
|
3485
|
+
filters: Array<string>;
|
|
3486
|
+
};
|
|
3487
|
+
/**
|
|
3488
|
+
* Generated factory for {@link TracingConfig} record objects.
|
|
3489
|
+
*/
|
|
3490
|
+
export declare const TracingConfig: Readonly<{
|
|
3491
|
+
create: (partial: Partial<TracingConfig> & Required<Omit<TracingConfig, "logLevel" | "displayThreadNames" | "displayThreadIds" | "filters">>) => TracingConfig;
|
|
3492
|
+
new: (partial: Partial<TracingConfig> & Required<Omit<TracingConfig, "logLevel" | "displayThreadNames" | "displayThreadIds" | "filters">>) => TracingConfig;
|
|
3493
|
+
defaults: () => Partial<TracingConfig>;
|
|
3494
|
+
}>;
|
|
3495
|
+
/**
|
|
3496
|
+
* Direction enum
|
|
3497
|
+
* Indicates whether the App can send, receive, both, or neither.
|
|
3498
|
+
*/
|
|
3499
|
+
export declare enum Direction {
|
|
3500
|
+
Send = 0,
|
|
3501
|
+
Recv = 1,
|
|
3502
|
+
Bidirectional = 2,
|
|
3503
|
+
None = 3
|
|
3504
|
+
}
|
|
3505
|
+
export declare enum IdentityProviderConfig_Tags {
|
|
3506
|
+
SharedSecret = "SharedSecret",
|
|
3507
|
+
StaticJwt = "StaticJwt",
|
|
3508
|
+
Jwt = "Jwt",
|
|
3509
|
+
Spire = "Spire",
|
|
3510
|
+
None = "None"
|
|
3511
|
+
}
|
|
3512
|
+
/**
|
|
3513
|
+
* Identity provider configuration - used to prove identity to others
|
|
3514
|
+
*/
|
|
3515
|
+
export declare const IdentityProviderConfig: Readonly<{
|
|
3516
|
+
instanceOf: (obj: any) => obj is IdentityProviderConfig;
|
|
3517
|
+
SharedSecret: {
|
|
3518
|
+
new (inner: {
|
|
3519
|
+
id: string;
|
|
3520
|
+
data: string;
|
|
3521
|
+
}): {
|
|
3522
|
+
readonly tag: IdentityProviderConfig_Tags.SharedSecret;
|
|
3523
|
+
readonly inner: Readonly<{
|
|
3524
|
+
id: string;
|
|
3525
|
+
data: string;
|
|
3526
|
+
}>;
|
|
3527
|
+
/**
|
|
3528
|
+
* @private
|
|
3529
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3530
|
+
*/
|
|
3531
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3532
|
+
};
|
|
3533
|
+
"new"(inner: {
|
|
3534
|
+
id: string;
|
|
3535
|
+
data: string;
|
|
3536
|
+
}): {
|
|
3537
|
+
readonly tag: IdentityProviderConfig_Tags.SharedSecret;
|
|
3538
|
+
readonly inner: Readonly<{
|
|
3539
|
+
id: string;
|
|
3540
|
+
data: string;
|
|
3541
|
+
}>;
|
|
3542
|
+
/**
|
|
3543
|
+
* @private
|
|
3544
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3545
|
+
*/
|
|
3546
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3547
|
+
};
|
|
3548
|
+
instanceOf(obj: any): obj is {
|
|
3549
|
+
readonly tag: IdentityProviderConfig_Tags.SharedSecret;
|
|
3550
|
+
readonly inner: Readonly<{
|
|
3551
|
+
id: string;
|
|
3552
|
+
data: string;
|
|
3553
|
+
}>;
|
|
3554
|
+
/**
|
|
3555
|
+
* @private
|
|
3556
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3557
|
+
*/
|
|
3558
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3559
|
+
};
|
|
3560
|
+
};
|
|
3561
|
+
StaticJwt: {
|
|
3562
|
+
new (inner: {
|
|
3563
|
+
config: StaticJwtAuth;
|
|
3564
|
+
}): {
|
|
3565
|
+
readonly tag: IdentityProviderConfig_Tags.StaticJwt;
|
|
3566
|
+
readonly inner: Readonly<{
|
|
3567
|
+
config: StaticJwtAuth;
|
|
3568
|
+
}>;
|
|
3569
|
+
/**
|
|
3570
|
+
* @private
|
|
3571
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3572
|
+
*/
|
|
3573
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3574
|
+
};
|
|
3575
|
+
"new"(inner: {
|
|
3576
|
+
config: StaticJwtAuth;
|
|
3577
|
+
}): {
|
|
3578
|
+
readonly tag: IdentityProviderConfig_Tags.StaticJwt;
|
|
3579
|
+
readonly inner: Readonly<{
|
|
3580
|
+
config: StaticJwtAuth;
|
|
3581
|
+
}>;
|
|
3582
|
+
/**
|
|
3583
|
+
* @private
|
|
3584
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3585
|
+
*/
|
|
3586
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3587
|
+
};
|
|
3588
|
+
instanceOf(obj: any): obj is {
|
|
3589
|
+
readonly tag: IdentityProviderConfig_Tags.StaticJwt;
|
|
3590
|
+
readonly inner: Readonly<{
|
|
3591
|
+
config: StaticJwtAuth;
|
|
3592
|
+
}>;
|
|
3593
|
+
/**
|
|
3594
|
+
* @private
|
|
3595
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3596
|
+
*/
|
|
3597
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3598
|
+
};
|
|
3599
|
+
};
|
|
3600
|
+
Jwt: {
|
|
3601
|
+
new (inner: {
|
|
3602
|
+
config: ClientJwtAuth;
|
|
3603
|
+
}): {
|
|
3604
|
+
readonly tag: IdentityProviderConfig_Tags.Jwt;
|
|
3605
|
+
readonly inner: Readonly<{
|
|
3606
|
+
config: ClientJwtAuth;
|
|
3607
|
+
}>;
|
|
3608
|
+
/**
|
|
3609
|
+
* @private
|
|
3610
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3611
|
+
*/
|
|
3612
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3613
|
+
};
|
|
3614
|
+
"new"(inner: {
|
|
3615
|
+
config: ClientJwtAuth;
|
|
3616
|
+
}): {
|
|
3617
|
+
readonly tag: IdentityProviderConfig_Tags.Jwt;
|
|
3618
|
+
readonly inner: Readonly<{
|
|
3619
|
+
config: ClientJwtAuth;
|
|
3620
|
+
}>;
|
|
3621
|
+
/**
|
|
3622
|
+
* @private
|
|
3623
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3624
|
+
*/
|
|
3625
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3626
|
+
};
|
|
3627
|
+
instanceOf(obj: any): obj is {
|
|
3628
|
+
readonly tag: IdentityProviderConfig_Tags.Jwt;
|
|
3629
|
+
readonly inner: Readonly<{
|
|
3630
|
+
config: ClientJwtAuth;
|
|
3631
|
+
}>;
|
|
3632
|
+
/**
|
|
3633
|
+
* @private
|
|
3634
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3635
|
+
*/
|
|
3636
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3637
|
+
};
|
|
3638
|
+
};
|
|
3639
|
+
Spire: {
|
|
3640
|
+
new (inner: {
|
|
3641
|
+
config: SpireConfig;
|
|
3642
|
+
}): {
|
|
3643
|
+
readonly tag: IdentityProviderConfig_Tags.Spire;
|
|
3644
|
+
readonly inner: Readonly<{
|
|
3645
|
+
config: SpireConfig;
|
|
3646
|
+
}>;
|
|
3647
|
+
/**
|
|
3648
|
+
* @private
|
|
3649
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3650
|
+
*/
|
|
3651
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3652
|
+
};
|
|
3653
|
+
"new"(inner: {
|
|
3654
|
+
config: SpireConfig;
|
|
3655
|
+
}): {
|
|
3656
|
+
readonly tag: IdentityProviderConfig_Tags.Spire;
|
|
3657
|
+
readonly inner: Readonly<{
|
|
3658
|
+
config: SpireConfig;
|
|
3659
|
+
}>;
|
|
3660
|
+
/**
|
|
3661
|
+
* @private
|
|
3662
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3663
|
+
*/
|
|
3664
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3665
|
+
};
|
|
3666
|
+
instanceOf(obj: any): obj is {
|
|
3667
|
+
readonly tag: IdentityProviderConfig_Tags.Spire;
|
|
3668
|
+
readonly inner: Readonly<{
|
|
3669
|
+
config: SpireConfig;
|
|
3670
|
+
}>;
|
|
3671
|
+
/**
|
|
3672
|
+
* @private
|
|
3673
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3674
|
+
*/
|
|
3675
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3676
|
+
};
|
|
3677
|
+
};
|
|
3678
|
+
None: {
|
|
3679
|
+
new (): {
|
|
3680
|
+
readonly tag: IdentityProviderConfig_Tags.None;
|
|
3681
|
+
/**
|
|
3682
|
+
* @private
|
|
3683
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3684
|
+
*/
|
|
3685
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3686
|
+
};
|
|
3687
|
+
"new"(): {
|
|
3688
|
+
readonly tag: IdentityProviderConfig_Tags.None;
|
|
3689
|
+
/**
|
|
3690
|
+
* @private
|
|
3691
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3692
|
+
*/
|
|
3693
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3694
|
+
};
|
|
3695
|
+
instanceOf(obj: any): obj is {
|
|
3696
|
+
readonly tag: IdentityProviderConfig_Tags.None;
|
|
3697
|
+
/**
|
|
3698
|
+
* @private
|
|
3699
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3700
|
+
*/
|
|
3701
|
+
readonly [uniffiTypeNameSymbol]: "IdentityProviderConfig";
|
|
3702
|
+
};
|
|
3703
|
+
};
|
|
3704
|
+
}>;
|
|
3705
|
+
/**
|
|
3706
|
+
* Identity provider configuration - used to prove identity to others
|
|
3707
|
+
*/
|
|
3708
|
+
export type IdentityProviderConfig = InstanceType<typeof IdentityProviderConfig['SharedSecret' | 'StaticJwt' | 'Jwt' | 'Spire' | 'None']>;
|
|
3709
|
+
export declare enum IdentityVerifierConfig_Tags {
|
|
3710
|
+
SharedSecret = "SharedSecret",
|
|
3711
|
+
Jwt = "Jwt",
|
|
3712
|
+
Spire = "Spire",
|
|
3713
|
+
None = "None"
|
|
3714
|
+
}
|
|
3715
|
+
/**
|
|
3716
|
+
* Identity verifier configuration - used to verify identity of others
|
|
3717
|
+
*/
|
|
3718
|
+
export declare const IdentityVerifierConfig: Readonly<{
|
|
3719
|
+
instanceOf: (obj: any) => obj is IdentityVerifierConfig;
|
|
3720
|
+
SharedSecret: {
|
|
3721
|
+
new (inner: {
|
|
3722
|
+
id: string;
|
|
3723
|
+
data: string;
|
|
3724
|
+
}): {
|
|
3725
|
+
readonly tag: IdentityVerifierConfig_Tags.SharedSecret;
|
|
3726
|
+
readonly inner: Readonly<{
|
|
3727
|
+
id: string;
|
|
3728
|
+
data: string;
|
|
3729
|
+
}>;
|
|
3730
|
+
/**
|
|
3731
|
+
* @private
|
|
3732
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3733
|
+
*/
|
|
3734
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3735
|
+
};
|
|
3736
|
+
"new"(inner: {
|
|
3737
|
+
id: string;
|
|
3738
|
+
data: string;
|
|
3739
|
+
}): {
|
|
3740
|
+
readonly tag: IdentityVerifierConfig_Tags.SharedSecret;
|
|
3741
|
+
readonly inner: Readonly<{
|
|
3742
|
+
id: string;
|
|
3743
|
+
data: string;
|
|
3744
|
+
}>;
|
|
3745
|
+
/**
|
|
3746
|
+
* @private
|
|
3747
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3748
|
+
*/
|
|
3749
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3750
|
+
};
|
|
3751
|
+
instanceOf(obj: any): obj is {
|
|
3752
|
+
readonly tag: IdentityVerifierConfig_Tags.SharedSecret;
|
|
3753
|
+
readonly inner: Readonly<{
|
|
3754
|
+
id: string;
|
|
3755
|
+
data: string;
|
|
3756
|
+
}>;
|
|
3757
|
+
/**
|
|
3758
|
+
* @private
|
|
3759
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3760
|
+
*/
|
|
3761
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3762
|
+
};
|
|
3763
|
+
};
|
|
3764
|
+
Jwt: {
|
|
3765
|
+
new (inner: {
|
|
3766
|
+
config: JwtAuth;
|
|
3767
|
+
}): {
|
|
3768
|
+
readonly tag: IdentityVerifierConfig_Tags.Jwt;
|
|
3769
|
+
readonly inner: Readonly<{
|
|
3770
|
+
config: JwtAuth;
|
|
3771
|
+
}>;
|
|
3772
|
+
/**
|
|
3773
|
+
* @private
|
|
3774
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3775
|
+
*/
|
|
3776
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3777
|
+
};
|
|
3778
|
+
"new"(inner: {
|
|
3779
|
+
config: JwtAuth;
|
|
3780
|
+
}): {
|
|
3781
|
+
readonly tag: IdentityVerifierConfig_Tags.Jwt;
|
|
3782
|
+
readonly inner: Readonly<{
|
|
3783
|
+
config: JwtAuth;
|
|
3784
|
+
}>;
|
|
3785
|
+
/**
|
|
3786
|
+
* @private
|
|
3787
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3788
|
+
*/
|
|
3789
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3790
|
+
};
|
|
3791
|
+
instanceOf(obj: any): obj is {
|
|
3792
|
+
readonly tag: IdentityVerifierConfig_Tags.Jwt;
|
|
3793
|
+
readonly inner: Readonly<{
|
|
3794
|
+
config: JwtAuth;
|
|
3795
|
+
}>;
|
|
3796
|
+
/**
|
|
3797
|
+
* @private
|
|
3798
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3799
|
+
*/
|
|
3800
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3801
|
+
};
|
|
3802
|
+
};
|
|
3803
|
+
Spire: {
|
|
3804
|
+
new (inner: {
|
|
3805
|
+
config: SpireConfig;
|
|
3806
|
+
}): {
|
|
3807
|
+
readonly tag: IdentityVerifierConfig_Tags.Spire;
|
|
3808
|
+
readonly inner: Readonly<{
|
|
3809
|
+
config: SpireConfig;
|
|
3810
|
+
}>;
|
|
3811
|
+
/**
|
|
3812
|
+
* @private
|
|
3813
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3814
|
+
*/
|
|
3815
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3816
|
+
};
|
|
3817
|
+
"new"(inner: {
|
|
3818
|
+
config: SpireConfig;
|
|
3819
|
+
}): {
|
|
3820
|
+
readonly tag: IdentityVerifierConfig_Tags.Spire;
|
|
3821
|
+
readonly inner: Readonly<{
|
|
3822
|
+
config: SpireConfig;
|
|
3823
|
+
}>;
|
|
3824
|
+
/**
|
|
3825
|
+
* @private
|
|
3826
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3827
|
+
*/
|
|
3828
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3829
|
+
};
|
|
3830
|
+
instanceOf(obj: any): obj is {
|
|
3831
|
+
readonly tag: IdentityVerifierConfig_Tags.Spire;
|
|
3832
|
+
readonly inner: Readonly<{
|
|
3833
|
+
config: SpireConfig;
|
|
3834
|
+
}>;
|
|
3835
|
+
/**
|
|
3836
|
+
* @private
|
|
3837
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3838
|
+
*/
|
|
3839
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3840
|
+
};
|
|
3841
|
+
};
|
|
3842
|
+
None: {
|
|
3843
|
+
new (): {
|
|
3844
|
+
readonly tag: IdentityVerifierConfig_Tags.None;
|
|
3845
|
+
/**
|
|
3846
|
+
* @private
|
|
3847
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3848
|
+
*/
|
|
3849
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3850
|
+
};
|
|
3851
|
+
"new"(): {
|
|
3852
|
+
readonly tag: IdentityVerifierConfig_Tags.None;
|
|
3853
|
+
/**
|
|
3854
|
+
* @private
|
|
3855
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3856
|
+
*/
|
|
3857
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3858
|
+
};
|
|
3859
|
+
instanceOf(obj: any): obj is {
|
|
3860
|
+
readonly tag: IdentityVerifierConfig_Tags.None;
|
|
3861
|
+
/**
|
|
3862
|
+
* @private
|
|
3863
|
+
* This field is private and should not be used, use `tag` instead.
|
|
3864
|
+
*/
|
|
3865
|
+
readonly [uniffiTypeNameSymbol]: "IdentityVerifierConfig";
|
|
3866
|
+
};
|
|
3867
|
+
};
|
|
3868
|
+
}>;
|
|
3869
|
+
/**
|
|
3870
|
+
* Identity verifier configuration - used to verify identity of others
|
|
3871
|
+
*/
|
|
3872
|
+
export type IdentityVerifierConfig = InstanceType<typeof IdentityVerifierConfig['SharedSecret' | 'Jwt' | 'Spire' | 'None']>;
|
|
3873
|
+
/**
|
|
3874
|
+
* Transport protocol for dataplane communication.
|
|
3875
|
+
*/
|
|
3876
|
+
export declare enum TransportProtocol {
|
|
3877
|
+
Grpc = 0,
|
|
3878
|
+
Websocket = 1
|
|
3879
|
+
}
|
|
3880
|
+
/**
|
|
3881
|
+
* Adapter that bridges the App API with language-bindings interface
|
|
3882
|
+
*
|
|
3883
|
+
* This adapter uses enum-based auth types (`AuthProvider`/`AuthVerifier`) instead of generics
|
|
3884
|
+
* to be compatible with UniFFI, supporting multiple authentication mechanisms (SharedSecret,
|
|
3885
|
+
* JWT, SPIRE, StaticToken). It provides both synchronous (blocking) and asynchronous methods
|
|
3886
|
+
* for flexibility.
|
|
3887
|
+
*/
|
|
3888
|
+
export interface AppLike {
|
|
3889
|
+
/**
|
|
3890
|
+
* Create a new session (blocking version for FFI)
|
|
3891
|
+
*
|
|
3892
|
+
* Returns a SessionWithCompletion containing the session context and a completion handle.
|
|
3893
|
+
* Call `.wait()` on the completion handle to wait for session establishment.
|
|
3894
|
+
*/
|
|
3895
|
+
createSession(config: SessionConfig, destination: NameLike): SessionWithCompletion;
|
|
3896
|
+
/**
|
|
3897
|
+
* Create a new session and wait for completion (blocking version)
|
|
3898
|
+
*
|
|
3899
|
+
* This method creates a session and blocks until the session establishment completes.
|
|
3900
|
+
* Returns only the session context, as the completion has already been awaited.
|
|
3901
|
+
*/
|
|
3902
|
+
createSessionAndWait(config: SessionConfig, destination: NameLike): SessionLike;
|
|
3903
|
+
/**
|
|
3904
|
+
* Create a new session and wait for completion (async version)
|
|
3905
|
+
*
|
|
3906
|
+
* This method creates a session and waits until the session establishment completes.
|
|
3907
|
+
* Returns only the session context, as the completion has already been awaited.
|
|
3908
|
+
*/
|
|
3909
|
+
createSessionAndWaitAsync(config: SessionConfig, destination: NameLike, asyncOpts_?: {
|
|
3910
|
+
signal: AbortSignal;
|
|
3911
|
+
}): Promise<SessionLike>;
|
|
3912
|
+
/**
|
|
3913
|
+
* Create a new session (async version)
|
|
3914
|
+
*
|
|
3915
|
+
* Returns a SessionWithCompletion containing the session context and a completion handle.
|
|
3916
|
+
* Await the completion handle to wait for session establishment.
|
|
3917
|
+
* For point-to-point sessions, this ensures the remote peer has acknowledged the session.
|
|
3918
|
+
* For multicast sessions, this ensures the initial setup is complete.
|
|
3919
|
+
*/
|
|
3920
|
+
createSessionAsync(config: SessionConfig, destination: NameLike, asyncOpts_?: {
|
|
3921
|
+
signal: AbortSignal;
|
|
3922
|
+
}): Promise<SessionWithCompletion>;
|
|
3923
|
+
/**
|
|
3924
|
+
* Delete a session (blocking version for FFI)
|
|
3925
|
+
*
|
|
3926
|
+
* Returns a completion handle that can be awaited to ensure the deletion completes.
|
|
3927
|
+
*/
|
|
3928
|
+
deleteSession(session: SessionLike): CompletionHandleLike;
|
|
3929
|
+
/**
|
|
3930
|
+
* Delete a session and wait for completion (blocking version)
|
|
3931
|
+
*
|
|
3932
|
+
* This method deletes a session and blocks until the deletion completes.
|
|
3933
|
+
*/
|
|
3934
|
+
deleteSessionAndWait(session: SessionLike): void;
|
|
3935
|
+
/**
|
|
3936
|
+
* Delete a session and wait for completion (async version)
|
|
3937
|
+
*
|
|
3938
|
+
* This method deletes a session and waits until the deletion completes.
|
|
3939
|
+
*/
|
|
3940
|
+
deleteSessionAndWaitAsync(session: SessionLike, asyncOpts_?: {
|
|
3941
|
+
signal: AbortSignal;
|
|
3942
|
+
}): Promise<void>;
|
|
3943
|
+
/**
|
|
3944
|
+
* Delete a session (async version)
|
|
3945
|
+
*
|
|
3946
|
+
* Returns a completion handle that can be awaited to ensure the deletion completes.
|
|
3947
|
+
*/
|
|
3948
|
+
deleteSessionAsync(session: SessionLike, asyncOpts_?: {
|
|
3949
|
+
signal: AbortSignal;
|
|
3950
|
+
}): Promise<CompletionHandleLike>;
|
|
3951
|
+
/**
|
|
3952
|
+
* Get the app ID in UUID format
|
|
3953
|
+
*/
|
|
3954
|
+
id(): string;
|
|
3955
|
+
/**
|
|
3956
|
+
* Listen for incoming sessions (blocking version for FFI)
|
|
3957
|
+
*/
|
|
3958
|
+
listenForSession(timeout: number | undefined): SessionLike;
|
|
3959
|
+
/**
|
|
3960
|
+
* Listen for incoming sessions (async version)
|
|
3961
|
+
*/
|
|
3962
|
+
listenForSessionAsync(timeout: number | undefined, asyncOpts_?: {
|
|
3963
|
+
signal: AbortSignal;
|
|
3964
|
+
}): Promise<SessionLike>;
|
|
3965
|
+
/**
|
|
3966
|
+
* Get the app name
|
|
3967
|
+
*/
|
|
3968
|
+
name(): NameLike;
|
|
3969
|
+
/**
|
|
3970
|
+
* Remove a route (blocking version for FFI)
|
|
3971
|
+
*/
|
|
3972
|
+
removeRoute(name: NameLike, connectionId: bigint): void;
|
|
3973
|
+
/**
|
|
3974
|
+
* Remove a route (async version)
|
|
3975
|
+
*/
|
|
3976
|
+
removeRouteAsync(name: NameLike, connectionId: bigint, asyncOpts_?: {
|
|
3977
|
+
signal: AbortSignal;
|
|
3978
|
+
}): Promise<void>;
|
|
3979
|
+
/**
|
|
3980
|
+
* Set a route to a name for a specific connection (blocking version for FFI)
|
|
3981
|
+
*/
|
|
3982
|
+
setRoute(name: NameLike, connectionId: bigint): void;
|
|
3983
|
+
/**
|
|
3984
|
+
* Set a route to a name for a specific connection (async version)
|
|
3985
|
+
*/
|
|
3986
|
+
setRouteAsync(name: NameLike, connectionId: bigint, asyncOpts_?: {
|
|
3987
|
+
signal: AbortSignal;
|
|
3988
|
+
}): Promise<void>;
|
|
3989
|
+
/**
|
|
3990
|
+
* Subscribe to a session name (blocking version for FFI)
|
|
3991
|
+
*/
|
|
3992
|
+
subscribe(name: NameLike, connectionId: bigint | undefined): void;
|
|
3993
|
+
/**
|
|
3994
|
+
* Subscribe to a name (async version)
|
|
3995
|
+
*/
|
|
3996
|
+
subscribeAsync(name: NameLike, connectionId: bigint | undefined, asyncOpts_?: {
|
|
3997
|
+
signal: AbortSignal;
|
|
3998
|
+
}): Promise<void>;
|
|
3999
|
+
/**
|
|
4000
|
+
* Unsubscribe from a name (blocking version for FFI)
|
|
4001
|
+
*/
|
|
4002
|
+
unsubscribe(name: NameLike, connectionId: bigint | undefined): void;
|
|
4003
|
+
/**
|
|
4004
|
+
* Unsubscribe from a name (async version)
|
|
4005
|
+
*/
|
|
4006
|
+
unsubscribeAsync(name: NameLike, connectionId: bigint | undefined, asyncOpts_?: {
|
|
4007
|
+
signal: AbortSignal;
|
|
4008
|
+
}): Promise<void>;
|
|
4009
|
+
}
|
|
4010
|
+
/**
|
|
4011
|
+
* @deprecated Use `AppLike` instead.
|
|
4012
|
+
*/
|
|
4013
|
+
export type AppInterface = AppLike;
|
|
4014
|
+
/**
|
|
4015
|
+
* Adapter that bridges the App API with language-bindings interface
|
|
4016
|
+
*
|
|
4017
|
+
* This adapter uses enum-based auth types (`AuthProvider`/`AuthVerifier`) instead of generics
|
|
4018
|
+
* to be compatible with UniFFI, supporting multiple authentication mechanisms (SharedSecret,
|
|
4019
|
+
* JWT, SPIRE, StaticToken). It provides both synchronous (blocking) and asynchronous methods
|
|
4020
|
+
* for flexibility.
|
|
4021
|
+
*/
|
|
4022
|
+
export declare class App extends UniffiAbstractObject implements AppLike {
|
|
4023
|
+
readonly [uniffiTypeNameSymbol] = "App";
|
|
4024
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
4025
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
4026
|
+
/**
|
|
4027
|
+
* Create a new App with identity provider and verifier configurations
|
|
4028
|
+
*
|
|
4029
|
+
* This is the main entry point for creating a SLIM application from language bindings.
|
|
4030
|
+
*
|
|
4031
|
+
* # Arguments
|
|
4032
|
+
* * `base_name` - The base name for the app (without ID)
|
|
4033
|
+
* * `identity_provider_config` - Configuration for proving identity to others
|
|
4034
|
+
* * `identity_verifier_config` - Configuration for verifying identity of others
|
|
4035
|
+
*
|
|
4036
|
+
* # Returns
|
|
4037
|
+
* * `Ok(Arc<App>)` - Successfully created adapter
|
|
4038
|
+
* * `Err(SlimError)` - If adapter creation fails
|
|
4039
|
+
*
|
|
4040
|
+
* # Supported Identity Types
|
|
4041
|
+
* - SharedSecret: Symmetric key authentication
|
|
4042
|
+
* - JWT: Dynamic JWT generation/verification with signing/decoding keys
|
|
4043
|
+
* - StaticJWT: Static JWT loaded from file with auto-reload
|
|
4044
|
+
*/
|
|
4045
|
+
constructor(baseName: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig);
|
|
4046
|
+
/**
|
|
4047
|
+
* Create a new App with traffic direction (blocking version)
|
|
4048
|
+
*
|
|
4049
|
+
* This is a convenience function for creating a SLIM application with configurable
|
|
4050
|
+
* traffic direction (send-only, receive-only, bidirectional, or none).
|
|
4051
|
+
*
|
|
4052
|
+
* # Arguments
|
|
4053
|
+
* * `name` - The base name for the app (without ID)
|
|
4054
|
+
* * `identity_provider_config` - Configuration for proving identity to others
|
|
4055
|
+
* * `identity_verifier_config` - Configuration for verifying identity of others
|
|
4056
|
+
* * `direction` - Traffic direction for sessions (Send, Recv, Bidirectional, or None)
|
|
4057
|
+
*
|
|
4058
|
+
* # Returns
|
|
4059
|
+
* * `Ok(Arc<App>)` - Successfully created app
|
|
4060
|
+
* * `Err(SlimError)` - If app creation fails
|
|
4061
|
+
*/
|
|
4062
|
+
static newWithDirection(name: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction): AppLike;
|
|
4063
|
+
/**
|
|
4064
|
+
* Create a new App with SharedSecret authentication (blocking version)
|
|
4065
|
+
*
|
|
4066
|
+
* This is a convenience function for creating a SLIM application using SharedSecret authentication.
|
|
4067
|
+
*
|
|
4068
|
+
* # Arguments
|
|
4069
|
+
* * `name` - The base name for the app (without ID)
|
|
4070
|
+
* * `secret` - The shared secret string for authentication
|
|
4071
|
+
*
|
|
4072
|
+
* # Returns
|
|
4073
|
+
* * `Ok(Arc<App>)` - Successfully created adapter
|
|
4074
|
+
* * `Err(SlimError)` - If adapter creation fails
|
|
4075
|
+
*/
|
|
4076
|
+
static newWithSecret(name: NameLike, secret: string): AppLike;
|
|
4077
|
+
/**
|
|
4078
|
+
* Create a new session (blocking version for FFI)
|
|
4079
|
+
*
|
|
4080
|
+
* Returns a SessionWithCompletion containing the session context and a completion handle.
|
|
4081
|
+
* Call `.wait()` on the completion handle to wait for session establishment.
|
|
4082
|
+
*/
|
|
4083
|
+
createSession(config: SessionConfig, destination: NameLike): SessionWithCompletion;
|
|
4084
|
+
/**
|
|
4085
|
+
* Create a new session and wait for completion (blocking version)
|
|
4086
|
+
*
|
|
4087
|
+
* This method creates a session and blocks until the session establishment completes.
|
|
4088
|
+
* Returns only the session context, as the completion has already been awaited.
|
|
4089
|
+
*/
|
|
4090
|
+
createSessionAndWait(config: SessionConfig, destination: NameLike): SessionLike;
|
|
4091
|
+
/**
|
|
4092
|
+
* Create a new session and wait for completion (async version)
|
|
4093
|
+
*
|
|
4094
|
+
* This method creates a session and waits until the session establishment completes.
|
|
4095
|
+
* Returns only the session context, as the completion has already been awaited.
|
|
4096
|
+
*/
|
|
4097
|
+
createSessionAndWaitAsync(config: SessionConfig, destination: NameLike, asyncOpts_?: {
|
|
4098
|
+
signal: AbortSignal;
|
|
4099
|
+
}): Promise<SessionLike>;
|
|
4100
|
+
/**
|
|
4101
|
+
* Create a new session (async version)
|
|
4102
|
+
*
|
|
4103
|
+
* Returns a SessionWithCompletion containing the session context and a completion handle.
|
|
4104
|
+
* Await the completion handle to wait for session establishment.
|
|
4105
|
+
* For point-to-point sessions, this ensures the remote peer has acknowledged the session.
|
|
4106
|
+
* For multicast sessions, this ensures the initial setup is complete.
|
|
4107
|
+
*/
|
|
4108
|
+
createSessionAsync(config: SessionConfig, destination: NameLike, asyncOpts_?: {
|
|
4109
|
+
signal: AbortSignal;
|
|
4110
|
+
}): Promise<SessionWithCompletion>;
|
|
4111
|
+
/**
|
|
4112
|
+
* Delete a session (blocking version for FFI)
|
|
4113
|
+
*
|
|
4114
|
+
* Returns a completion handle that can be awaited to ensure the deletion completes.
|
|
4115
|
+
*/
|
|
4116
|
+
deleteSession(session: SessionLike): CompletionHandleLike;
|
|
4117
|
+
/**
|
|
4118
|
+
* Delete a session and wait for completion (blocking version)
|
|
4119
|
+
*
|
|
4120
|
+
* This method deletes a session and blocks until the deletion completes.
|
|
4121
|
+
*/
|
|
4122
|
+
deleteSessionAndWait(session: SessionLike): void;
|
|
4123
|
+
/**
|
|
4124
|
+
* Delete a session and wait for completion (async version)
|
|
4125
|
+
*
|
|
4126
|
+
* This method deletes a session and waits until the deletion completes.
|
|
4127
|
+
*/
|
|
4128
|
+
deleteSessionAndWaitAsync(session: SessionLike, asyncOpts_?: {
|
|
4129
|
+
signal: AbortSignal;
|
|
4130
|
+
}): Promise<void>;
|
|
4131
|
+
/**
|
|
4132
|
+
* Delete a session (async version)
|
|
4133
|
+
*
|
|
4134
|
+
* Returns a completion handle that can be awaited to ensure the deletion completes.
|
|
4135
|
+
*/
|
|
4136
|
+
deleteSessionAsync(session: SessionLike, asyncOpts_?: {
|
|
4137
|
+
signal: AbortSignal;
|
|
4138
|
+
}): Promise<CompletionHandleLike>;
|
|
4139
|
+
/**
|
|
4140
|
+
* Get the app ID in UUID format
|
|
4141
|
+
*/
|
|
4142
|
+
id(): string;
|
|
4143
|
+
/**
|
|
4144
|
+
* Listen for incoming sessions (blocking version for FFI)
|
|
4145
|
+
*/
|
|
4146
|
+
listenForSession(timeout: number | undefined): SessionLike;
|
|
4147
|
+
/**
|
|
4148
|
+
* Listen for incoming sessions (async version)
|
|
4149
|
+
*/
|
|
4150
|
+
listenForSessionAsync(timeout: number | undefined, asyncOpts_?: {
|
|
4151
|
+
signal: AbortSignal;
|
|
4152
|
+
}): Promise<SessionLike>;
|
|
4153
|
+
/**
|
|
4154
|
+
* Get the app name
|
|
4155
|
+
*/
|
|
4156
|
+
name(): NameLike;
|
|
4157
|
+
/**
|
|
4158
|
+
* Remove a route (blocking version for FFI)
|
|
4159
|
+
*/
|
|
4160
|
+
removeRoute(name: NameLike, connectionId: bigint): void;
|
|
4161
|
+
/**
|
|
4162
|
+
* Remove a route (async version)
|
|
4163
|
+
*/
|
|
4164
|
+
removeRouteAsync(name: NameLike, connectionId: bigint, asyncOpts_?: {
|
|
4165
|
+
signal: AbortSignal;
|
|
4166
|
+
}): Promise<void>;
|
|
4167
|
+
/**
|
|
4168
|
+
* Set a route to a name for a specific connection (blocking version for FFI)
|
|
4169
|
+
*/
|
|
4170
|
+
setRoute(name: NameLike, connectionId: bigint): void;
|
|
4171
|
+
/**
|
|
4172
|
+
* Set a route to a name for a specific connection (async version)
|
|
4173
|
+
*/
|
|
4174
|
+
setRouteAsync(name: NameLike, connectionId: bigint, asyncOpts_?: {
|
|
4175
|
+
signal: AbortSignal;
|
|
4176
|
+
}): Promise<void>;
|
|
4177
|
+
/**
|
|
4178
|
+
* Subscribe to a session name (blocking version for FFI)
|
|
4179
|
+
*/
|
|
4180
|
+
subscribe(name: NameLike, connectionId: bigint | undefined): void;
|
|
4181
|
+
/**
|
|
4182
|
+
* Subscribe to a name (async version)
|
|
4183
|
+
*/
|
|
4184
|
+
subscribeAsync(name: NameLike, connectionId: bigint | undefined, asyncOpts_?: {
|
|
4185
|
+
signal: AbortSignal;
|
|
4186
|
+
}): Promise<void>;
|
|
4187
|
+
/**
|
|
4188
|
+
* Unsubscribe from a name (blocking version for FFI)
|
|
4189
|
+
*/
|
|
4190
|
+
unsubscribe(name: NameLike, connectionId: bigint | undefined): void;
|
|
4191
|
+
/**
|
|
4192
|
+
* Unsubscribe from a name (async version)
|
|
4193
|
+
*/
|
|
4194
|
+
unsubscribeAsync(name: NameLike, connectionId: bigint | undefined, asyncOpts_?: {
|
|
4195
|
+
signal: AbortSignal;
|
|
4196
|
+
}): Promise<void>;
|
|
4197
|
+
uniffiDestroy(): void;
|
|
4198
|
+
static instanceOf(obj_: any): obj_ is App;
|
|
4199
|
+
}
|
|
4200
|
+
/**
|
|
4201
|
+
* Service wrapper for uniffi bindings
|
|
4202
|
+
*/
|
|
4203
|
+
export interface ServiceLike {
|
|
4204
|
+
/**
|
|
4205
|
+
* Get the service configuration
|
|
4206
|
+
*/
|
|
4207
|
+
config(): ServiceConfig;
|
|
4208
|
+
/**
|
|
4209
|
+
* Connect to a remote endpoint as a client - blocking version
|
|
4210
|
+
*/
|
|
4211
|
+
connect(config: ClientConfig): bigint;
|
|
4212
|
+
/**
|
|
4213
|
+
* Connect to a remote endpoint as a client
|
|
4214
|
+
*/
|
|
4215
|
+
connectAsync(config: ClientConfig, asyncOpts_?: {
|
|
4216
|
+
signal: AbortSignal;
|
|
4217
|
+
}): Promise<bigint>;
|
|
4218
|
+
/**
|
|
4219
|
+
* Create a new App with authentication configuration (blocking version)
|
|
4220
|
+
*
|
|
4221
|
+
* This method initializes authentication providers/verifiers and creates a App
|
|
4222
|
+
* on this service instance. This is a blocking wrapper around create_app_async.
|
|
4223
|
+
*
|
|
4224
|
+
* # Arguments
|
|
4225
|
+
* * `base_name` - The base name for the app (without ID)
|
|
4226
|
+
* * `identity_provider_config` - Configuration for proving identity to others
|
|
4227
|
+
* * `identity_verifier_config` - Configuration for verifying identity of others
|
|
4228
|
+
*
|
|
4229
|
+
* # Returns
|
|
4230
|
+
* * `Ok(Arc<App>)` - Successfully created adapter
|
|
4231
|
+
* * `Err(SlimError)` - If adapter creation fails
|
|
4232
|
+
*/
|
|
4233
|
+
createApp(baseName: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig): AppLike;
|
|
4234
|
+
/**
|
|
4235
|
+
* Create a new App with authentication configuration (async version)
|
|
4236
|
+
*
|
|
4237
|
+
* This method initializes authentication providers/verifiers and creates a App
|
|
4238
|
+
* on this service instance.
|
|
4239
|
+
*
|
|
4240
|
+
* # Arguments
|
|
4241
|
+
* * `base_name` - The base name for the app (without ID)
|
|
4242
|
+
* * `identity_provider_config` - Configuration for proving identity to others
|
|
4243
|
+
* * `identity_verifier_config` - Configuration for verifying identity of others
|
|
4244
|
+
*
|
|
4245
|
+
* # Returns
|
|
4246
|
+
* * `Ok(Arc<App>)` - Successfully created adapter
|
|
4247
|
+
* * `Err(SlimError)` - If adapter creation fails
|
|
4248
|
+
*/
|
|
4249
|
+
createAppAsync(baseName: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, asyncOpts_?: {
|
|
4250
|
+
signal: AbortSignal;
|
|
4251
|
+
}): Promise<AppLike>;
|
|
4252
|
+
/**
|
|
4253
|
+
* Create a new App with authentication configuration and traffic direction (blocking version)
|
|
4254
|
+
*
|
|
4255
|
+
* This method initializes authentication providers/verifiers and creates an App
|
|
4256
|
+
* on this service instance. The direction parameter controls whether the app
|
|
4257
|
+
* can send messages, receive messages, both, or neither.
|
|
4258
|
+
*
|
|
4259
|
+
* # Arguments
|
|
4260
|
+
* * `base_name` - The base name for the app (without ID)
|
|
4261
|
+
* * `identity_provider_config` - Configuration for proving identity to others
|
|
4262
|
+
* * `identity_verifier_config` - Configuration for verifying identity of others
|
|
4263
|
+
* * `direction` - Traffic direction: Send, Recv, Bidirectional, or None
|
|
4264
|
+
*
|
|
4265
|
+
* # Returns
|
|
4266
|
+
* * `Ok(Arc<App>)` - Successfully created adapter
|
|
4267
|
+
* * `Err(SlimError)` - If adapter creation fails
|
|
4268
|
+
*/
|
|
4269
|
+
createAppWithDirection(baseName: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction): AppLike;
|
|
4270
|
+
/**
|
|
4271
|
+
* Create a new App with authentication configuration and traffic direction (async version)
|
|
4272
|
+
*
|
|
4273
|
+
* This method initializes authentication providers/verifiers and creates an App
|
|
4274
|
+
* on this service instance. The direction parameter controls whether the app
|
|
4275
|
+
* can send messages, receive messages, both, or neither.
|
|
4276
|
+
*
|
|
4277
|
+
* # Arguments
|
|
4278
|
+
* * `base_name` - The base name for the app (without ID)
|
|
4279
|
+
* * `identity_provider_config` - Configuration for proving identity to others
|
|
4280
|
+
* * `identity_verifier_config` - Configuration for verifying identity of others
|
|
4281
|
+
* * `direction` - Traffic direction: Send, Recv, Bidirectional, or None
|
|
4282
|
+
*
|
|
4283
|
+
* # Returns
|
|
4284
|
+
* * `Ok(Arc<App>)` - Successfully created adapter
|
|
4285
|
+
* * `Err(SlimError)` - If adapter creation fails
|
|
4286
|
+
*/
|
|
4287
|
+
createAppWithDirectionAsync(name: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction, asyncOpts_?: {
|
|
4288
|
+
signal: AbortSignal;
|
|
4289
|
+
}): Promise<AppLike>;
|
|
4290
|
+
/**
|
|
4291
|
+
* Create a new App with SharedSecret authentication (helper function)
|
|
4292
|
+
*
|
|
4293
|
+
* This is a convenience function for creating a SLIM application using SharedSecret authentication
|
|
4294
|
+
* on this service instance.
|
|
4295
|
+
*
|
|
4296
|
+
* # Arguments
|
|
4297
|
+
* * `name` - The base name for the app (without ID)
|
|
4298
|
+
* * `secret` - The shared secret string for authentication
|
|
4299
|
+
*
|
|
4300
|
+
* # Returns
|
|
4301
|
+
* * `Ok(Arc<App>)` - Successfully created app
|
|
4302
|
+
* * `Err(SlimError)` - If app creation fails
|
|
4303
|
+
*/
|
|
4304
|
+
createAppWithSecret(name: NameLike, secret: string): AppLike;
|
|
4305
|
+
/**
|
|
4306
|
+
* Create a new App with SharedSecret authentication (async version)
|
|
4307
|
+
*
|
|
4308
|
+
* This is a convenience function for creating a SLIM application using SharedSecret authentication
|
|
4309
|
+
* on this service instance. This is the async version.
|
|
4310
|
+
*
|
|
4311
|
+
* # Arguments
|
|
4312
|
+
* * `name` - The base name for the app (without ID)
|
|
4313
|
+
* * `secret` - The shared secret string for authentication
|
|
4314
|
+
*
|
|
4315
|
+
* # Returns
|
|
4316
|
+
* * `Ok(Arc<App>)` - Successfully created app
|
|
4317
|
+
* * `Err(SlimError)` - If app creation fails
|
|
4318
|
+
*/
|
|
4319
|
+
createAppWithSecretAsync(name: NameLike, secret: string, asyncOpts_?: {
|
|
4320
|
+
signal: AbortSignal;
|
|
4321
|
+
}): Promise<AppLike>;
|
|
4322
|
+
/**
|
|
4323
|
+
* Disconnect a client connection by connection ID - blocking version
|
|
4324
|
+
*/
|
|
4325
|
+
disconnect(connId: bigint): void;
|
|
4326
|
+
/**
|
|
4327
|
+
* Get the connection ID for a given endpoint
|
|
4328
|
+
*/
|
|
4329
|
+
getConnectionId(endpoint: string): bigint | undefined;
|
|
4330
|
+
/**
|
|
4331
|
+
* Get the service identifier/name
|
|
4332
|
+
*/
|
|
4333
|
+
getName(): string;
|
|
4334
|
+
/**
|
|
4335
|
+
* Run the service (starts all configured servers and clients) - blocking version
|
|
4336
|
+
*/
|
|
4337
|
+
run(): void;
|
|
4338
|
+
/**
|
|
4339
|
+
* Run the service (starts all configured servers and clients)
|
|
4340
|
+
*/
|
|
4341
|
+
runAsync(asyncOpts_?: {
|
|
4342
|
+
signal: AbortSignal;
|
|
4343
|
+
}): Promise<void>;
|
|
4344
|
+
/**
|
|
4345
|
+
* Start a server with the given configuration - blocking version
|
|
4346
|
+
*/
|
|
4347
|
+
runServer(config: ServerConfig): void;
|
|
4348
|
+
/**
|
|
4349
|
+
* Start a server with the given configuration
|
|
4350
|
+
*/
|
|
4351
|
+
runServerAsync(config: ServerConfig, asyncOpts_?: {
|
|
4352
|
+
signal: AbortSignal;
|
|
4353
|
+
}): Promise<void>;
|
|
4354
|
+
/**
|
|
4355
|
+
* Shutdown the service gracefully - blocking version
|
|
4356
|
+
*/
|
|
4357
|
+
shutdown(): void;
|
|
4358
|
+
/**
|
|
4359
|
+
* Shutdown the service gracefully
|
|
4360
|
+
*/
|
|
4361
|
+
shutdownAsync(asyncOpts_?: {
|
|
4362
|
+
signal: AbortSignal;
|
|
4363
|
+
}): Promise<void>;
|
|
4364
|
+
/**
|
|
4365
|
+
* Stop a server by endpoint - blocking version
|
|
4366
|
+
*/
|
|
4367
|
+
stopServer(endpoint: string): void;
|
|
4368
|
+
}
|
|
4369
|
+
/**
|
|
4370
|
+
* @deprecated Use `ServiceLike` instead.
|
|
4371
|
+
*/
|
|
4372
|
+
export type ServiceInterface = ServiceLike;
|
|
4373
|
+
/**
|
|
4374
|
+
* Service wrapper for uniffi bindings
|
|
4375
|
+
*/
|
|
4376
|
+
export declare class Service extends UniffiAbstractObject implements ServiceLike {
|
|
4377
|
+
readonly [uniffiTypeNameSymbol] = "Service";
|
|
4378
|
+
readonly [destructorGuardSymbol]: UniffiGcObject;
|
|
4379
|
+
readonly [pointerLiteralSymbol]: UniffiHandle;
|
|
4380
|
+
/**
|
|
4381
|
+
* Create a new Service with the given name
|
|
4382
|
+
*/
|
|
4383
|
+
constructor(name: string);
|
|
4384
|
+
/**
|
|
4385
|
+
* Create a new Service with configuration
|
|
4386
|
+
*/
|
|
4387
|
+
static newWithConfig(name: string, config: ServiceConfig): ServiceLike;
|
|
4388
|
+
/**
|
|
4389
|
+
* Get the service configuration
|
|
4390
|
+
*/
|
|
4391
|
+
config(): ServiceConfig;
|
|
4392
|
+
/**
|
|
4393
|
+
* Connect to a remote endpoint as a client - blocking version
|
|
4394
|
+
*/
|
|
4395
|
+
connect(config: ClientConfig): bigint;
|
|
4396
|
+
/**
|
|
4397
|
+
* Connect to a remote endpoint as a client
|
|
4398
|
+
*/
|
|
4399
|
+
connectAsync(config: ClientConfig, asyncOpts_?: {
|
|
4400
|
+
signal: AbortSignal;
|
|
4401
|
+
}): Promise<bigint>;
|
|
4402
|
+
/**
|
|
4403
|
+
* Create a new App with authentication configuration (blocking version)
|
|
4404
|
+
*
|
|
4405
|
+
* This method initializes authentication providers/verifiers and creates a App
|
|
4406
|
+
* on this service instance. This is a blocking wrapper around create_app_async.
|
|
4407
|
+
*
|
|
4408
|
+
* # Arguments
|
|
4409
|
+
* * `base_name` - The base name for the app (without ID)
|
|
4410
|
+
* * `identity_provider_config` - Configuration for proving identity to others
|
|
4411
|
+
* * `identity_verifier_config` - Configuration for verifying identity of others
|
|
4412
|
+
*
|
|
4413
|
+
* # Returns
|
|
4414
|
+
* * `Ok(Arc<App>)` - Successfully created adapter
|
|
4415
|
+
* * `Err(SlimError)` - If adapter creation fails
|
|
4416
|
+
*/
|
|
4417
|
+
createApp(baseName: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig): AppLike;
|
|
4418
|
+
/**
|
|
4419
|
+
* Create a new App with authentication configuration (async version)
|
|
4420
|
+
*
|
|
4421
|
+
* This method initializes authentication providers/verifiers and creates a App
|
|
4422
|
+
* on this service instance.
|
|
4423
|
+
*
|
|
4424
|
+
* # Arguments
|
|
4425
|
+
* * `base_name` - The base name for the app (without ID)
|
|
4426
|
+
* * `identity_provider_config` - Configuration for proving identity to others
|
|
4427
|
+
* * `identity_verifier_config` - Configuration for verifying identity of others
|
|
4428
|
+
*
|
|
4429
|
+
* # Returns
|
|
4430
|
+
* * `Ok(Arc<App>)` - Successfully created adapter
|
|
4431
|
+
* * `Err(SlimError)` - If adapter creation fails
|
|
4432
|
+
*/
|
|
4433
|
+
createAppAsync(baseName: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, asyncOpts_?: {
|
|
4434
|
+
signal: AbortSignal;
|
|
4435
|
+
}): Promise<AppLike>;
|
|
4436
|
+
/**
|
|
4437
|
+
* Create a new App with authentication configuration and traffic direction (blocking version)
|
|
4438
|
+
*
|
|
4439
|
+
* This method initializes authentication providers/verifiers and creates an App
|
|
4440
|
+
* on this service instance. The direction parameter controls whether the app
|
|
4441
|
+
* can send messages, receive messages, both, or neither.
|
|
4442
|
+
*
|
|
4443
|
+
* # Arguments
|
|
4444
|
+
* * `base_name` - The base name for the app (without ID)
|
|
4445
|
+
* * `identity_provider_config` - Configuration for proving identity to others
|
|
4446
|
+
* * `identity_verifier_config` - Configuration for verifying identity of others
|
|
4447
|
+
* * `direction` - Traffic direction: Send, Recv, Bidirectional, or None
|
|
4448
|
+
*
|
|
4449
|
+
* # Returns
|
|
4450
|
+
* * `Ok(Arc<App>)` - Successfully created adapter
|
|
4451
|
+
* * `Err(SlimError)` - If adapter creation fails
|
|
4452
|
+
*/
|
|
4453
|
+
createAppWithDirection(baseName: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction): AppLike;
|
|
4454
|
+
/**
|
|
4455
|
+
* Create a new App with authentication configuration and traffic direction (async version)
|
|
4456
|
+
*
|
|
4457
|
+
* This method initializes authentication providers/verifiers and creates an App
|
|
4458
|
+
* on this service instance. The direction parameter controls whether the app
|
|
4459
|
+
* can send messages, receive messages, both, or neither.
|
|
4460
|
+
*
|
|
4461
|
+
* # Arguments
|
|
4462
|
+
* * `base_name` - The base name for the app (without ID)
|
|
4463
|
+
* * `identity_provider_config` - Configuration for proving identity to others
|
|
4464
|
+
* * `identity_verifier_config` - Configuration for verifying identity of others
|
|
4465
|
+
* * `direction` - Traffic direction: Send, Recv, Bidirectional, or None
|
|
4466
|
+
*
|
|
4467
|
+
* # Returns
|
|
4468
|
+
* * `Ok(Arc<App>)` - Successfully created adapter
|
|
4469
|
+
* * `Err(SlimError)` - If adapter creation fails
|
|
4470
|
+
*/
|
|
4471
|
+
createAppWithDirectionAsync(name: NameLike, identityProviderConfig: IdentityProviderConfig, identityVerifierConfig: IdentityVerifierConfig, direction: Direction, asyncOpts_?: {
|
|
4472
|
+
signal: AbortSignal;
|
|
4473
|
+
}): Promise<AppLike>;
|
|
4474
|
+
/**
|
|
4475
|
+
* Create a new App with SharedSecret authentication (helper function)
|
|
4476
|
+
*
|
|
4477
|
+
* This is a convenience function for creating a SLIM application using SharedSecret authentication
|
|
4478
|
+
* on this service instance.
|
|
4479
|
+
*
|
|
4480
|
+
* # Arguments
|
|
4481
|
+
* * `name` - The base name for the app (without ID)
|
|
4482
|
+
* * `secret` - The shared secret string for authentication
|
|
4483
|
+
*
|
|
4484
|
+
* # Returns
|
|
4485
|
+
* * `Ok(Arc<App>)` - Successfully created app
|
|
4486
|
+
* * `Err(SlimError)` - If app creation fails
|
|
4487
|
+
*/
|
|
4488
|
+
createAppWithSecret(name: NameLike, secret: string): AppLike;
|
|
4489
|
+
/**
|
|
4490
|
+
* Create a new App with SharedSecret authentication (async version)
|
|
4491
|
+
*
|
|
4492
|
+
* This is a convenience function for creating a SLIM application using SharedSecret authentication
|
|
4493
|
+
* on this service instance. This is the async version.
|
|
4494
|
+
*
|
|
4495
|
+
* # Arguments
|
|
4496
|
+
* * `name` - The base name for the app (without ID)
|
|
4497
|
+
* * `secret` - The shared secret string for authentication
|
|
4498
|
+
*
|
|
4499
|
+
* # Returns
|
|
4500
|
+
* * `Ok(Arc<App>)` - Successfully created app
|
|
4501
|
+
* * `Err(SlimError)` - If app creation fails
|
|
4502
|
+
*/
|
|
4503
|
+
createAppWithSecretAsync(name: NameLike, secret: string, asyncOpts_?: {
|
|
4504
|
+
signal: AbortSignal;
|
|
4505
|
+
}): Promise<AppLike>;
|
|
4506
|
+
/**
|
|
4507
|
+
* Disconnect a client connection by connection ID - blocking version
|
|
4508
|
+
*/
|
|
4509
|
+
disconnect(connId: bigint): void;
|
|
4510
|
+
/**
|
|
4511
|
+
* Get the connection ID for a given endpoint
|
|
4512
|
+
*/
|
|
4513
|
+
getConnectionId(endpoint: string): bigint | undefined;
|
|
4514
|
+
/**
|
|
4515
|
+
* Get the service identifier/name
|
|
4516
|
+
*/
|
|
4517
|
+
getName(): string;
|
|
4518
|
+
/**
|
|
4519
|
+
* Run the service (starts all configured servers and clients) - blocking version
|
|
4520
|
+
*/
|
|
4521
|
+
run(): void;
|
|
4522
|
+
/**
|
|
4523
|
+
* Run the service (starts all configured servers and clients)
|
|
4524
|
+
*/
|
|
4525
|
+
runAsync(asyncOpts_?: {
|
|
4526
|
+
signal: AbortSignal;
|
|
4527
|
+
}): Promise<void>;
|
|
4528
|
+
/**
|
|
4529
|
+
* Start a server with the given configuration - blocking version
|
|
4530
|
+
*/
|
|
4531
|
+
runServer(config: ServerConfig): void;
|
|
4532
|
+
/**
|
|
4533
|
+
* Start a server with the given configuration
|
|
4534
|
+
*/
|
|
4535
|
+
runServerAsync(config: ServerConfig, asyncOpts_?: {
|
|
4536
|
+
signal: AbortSignal;
|
|
4537
|
+
}): Promise<void>;
|
|
4538
|
+
/**
|
|
4539
|
+
* Shutdown the service gracefully - blocking version
|
|
4540
|
+
*/
|
|
4541
|
+
shutdown(): void;
|
|
4542
|
+
/**
|
|
4543
|
+
* Shutdown the service gracefully
|
|
4544
|
+
*/
|
|
4545
|
+
shutdownAsync(asyncOpts_?: {
|
|
4546
|
+
signal: AbortSignal;
|
|
4547
|
+
}): Promise<void>;
|
|
4548
|
+
/**
|
|
4549
|
+
* Stop a server by endpoint - blocking version
|
|
4550
|
+
*/
|
|
4551
|
+
stopServer(endpoint: string): void;
|
|
4552
|
+
uniffiDestroy(): void;
|
|
4553
|
+
static instanceOf(obj_: any): obj_ is Service;
|
|
4554
|
+
}
|
|
4555
|
+
/**
|
|
4556
|
+
* This should be called before anything else.
|
|
4557
|
+
*
|
|
4558
|
+
* It is likely that this is being done for you by the library's `index.ts`.
|
|
4559
|
+
*
|
|
4560
|
+
* It checks versions of uniffi between when the Rust scaffolding was generated
|
|
4561
|
+
* and when the bindings were generated.
|
|
4562
|
+
*
|
|
4563
|
+
* It also initializes the machinery to enable Rust to talk back to Javascript.
|
|
4564
|
+
*/
|
|
4565
|
+
declare function uniffiEnsureInitialized(): void;
|
|
4566
|
+
declare const _default: Readonly<{
|
|
4567
|
+
initialize: typeof uniffiEnsureInitialized;
|
|
4568
|
+
converters: {
|
|
4569
|
+
FfiConverterTypeApp: FfiConverterObject<AppLike>;
|
|
4570
|
+
FfiConverterTypeBackoffConfig: {
|
|
4571
|
+
read(from: RustBuffer): BackoffConfig;
|
|
4572
|
+
write(value: BackoffConfig, into: RustBuffer): void;
|
|
4573
|
+
allocationSize(value: BackoffConfig): number;
|
|
4574
|
+
lift(value: UniffiByteArray): BackoffConfig;
|
|
4575
|
+
lower(value: BackoffConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4576
|
+
};
|
|
4577
|
+
FfiConverterTypeBasicAuth: {
|
|
4578
|
+
read(from: RustBuffer): BasicAuth;
|
|
4579
|
+
write(value: BasicAuth, into: RustBuffer): void;
|
|
4580
|
+
allocationSize(value: BasicAuth): number;
|
|
4581
|
+
lift(value: UniffiByteArray): BasicAuth;
|
|
4582
|
+
lower(value: BasicAuth, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4583
|
+
};
|
|
4584
|
+
FfiConverterTypeBuildInfo: {
|
|
4585
|
+
read(from: RustBuffer): BuildInfo;
|
|
4586
|
+
write(value: BuildInfo, into: RustBuffer): void;
|
|
4587
|
+
allocationSize(value: BuildInfo): number;
|
|
4588
|
+
lift(value: UniffiByteArray): BuildInfo;
|
|
4589
|
+
lower(value: BuildInfo, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4590
|
+
};
|
|
4591
|
+
FfiConverterTypeCaSource: {
|
|
4592
|
+
read(from: RustBuffer): CaSource;
|
|
4593
|
+
write(value: CaSource, into: RustBuffer): void;
|
|
4594
|
+
allocationSize(value: CaSource): number;
|
|
4595
|
+
lift(value: UniffiByteArray): CaSource;
|
|
4596
|
+
lower(value: CaSource, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4597
|
+
};
|
|
4598
|
+
FfiConverterTypeClientAuthenticationConfig: {
|
|
4599
|
+
read(from: RustBuffer): ClientAuthenticationConfig;
|
|
4600
|
+
write(value: ClientAuthenticationConfig, into: RustBuffer): void;
|
|
4601
|
+
allocationSize(value: ClientAuthenticationConfig): number;
|
|
4602
|
+
lift(value: UniffiByteArray): ClientAuthenticationConfig;
|
|
4603
|
+
lower(value: ClientAuthenticationConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4604
|
+
};
|
|
4605
|
+
FfiConverterTypeClientConfig: {
|
|
4606
|
+
read(from: RustBuffer): ClientConfig;
|
|
4607
|
+
write(value: ClientConfig, into: RustBuffer): void;
|
|
4608
|
+
allocationSize(value: ClientConfig): number;
|
|
4609
|
+
lift(value: UniffiByteArray): ClientConfig;
|
|
4610
|
+
lower(value: ClientConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4611
|
+
};
|
|
4612
|
+
FfiConverterTypeClientJwtAuth: {
|
|
4613
|
+
read(from: RustBuffer): ClientJwtAuth;
|
|
4614
|
+
write(value: ClientJwtAuth, into: RustBuffer): void;
|
|
4615
|
+
allocationSize(value: ClientJwtAuth): number;
|
|
4616
|
+
lift(value: UniffiByteArray): ClientJwtAuth;
|
|
4617
|
+
lower(value: ClientJwtAuth, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4618
|
+
};
|
|
4619
|
+
FfiConverterTypeCompletionHandle: FfiConverterObject<CompletionHandleLike>;
|
|
4620
|
+
FfiConverterTypeCompressionType: {
|
|
4621
|
+
read(from: RustBuffer): CompressionType;
|
|
4622
|
+
write(value: CompressionType, into: RustBuffer): void;
|
|
4623
|
+
allocationSize(value: CompressionType): number;
|
|
4624
|
+
lift(value: UniffiByteArray): CompressionType;
|
|
4625
|
+
lower(value: CompressionType, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4626
|
+
};
|
|
4627
|
+
FfiConverterTypeDataplaneConfig: {
|
|
4628
|
+
read(from: RustBuffer): DataplaneConfig;
|
|
4629
|
+
write(value: DataplaneConfig, into: RustBuffer): void;
|
|
4630
|
+
allocationSize(value: DataplaneConfig): number;
|
|
4631
|
+
lift(value: UniffiByteArray): DataplaneConfig;
|
|
4632
|
+
lower(value: DataplaneConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4633
|
+
};
|
|
4634
|
+
FfiConverterTypeDirection: {
|
|
4635
|
+
read(from: RustBuffer): Direction;
|
|
4636
|
+
write(value: Direction, into: RustBuffer): void;
|
|
4637
|
+
allocationSize(value: Direction): number;
|
|
4638
|
+
lift(value: UniffiByteArray): Direction;
|
|
4639
|
+
lower(value: Direction, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4640
|
+
};
|
|
4641
|
+
FfiConverterTypeExponentialBackoff: {
|
|
4642
|
+
read(from: RustBuffer): ExponentialBackoff;
|
|
4643
|
+
write(value: ExponentialBackoff, into: RustBuffer): void;
|
|
4644
|
+
allocationSize(value: ExponentialBackoff): number;
|
|
4645
|
+
lift(value: UniffiByteArray): ExponentialBackoff;
|
|
4646
|
+
lower(value: ExponentialBackoff, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4647
|
+
};
|
|
4648
|
+
FfiConverterTypeFixedIntervalBackoff: {
|
|
4649
|
+
read(from: RustBuffer): FixedIntervalBackoff;
|
|
4650
|
+
write(value: FixedIntervalBackoff, into: RustBuffer): void;
|
|
4651
|
+
allocationSize(value: FixedIntervalBackoff): number;
|
|
4652
|
+
lift(value: UniffiByteArray): FixedIntervalBackoff;
|
|
4653
|
+
lower(value: FixedIntervalBackoff, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4654
|
+
};
|
|
4655
|
+
FfiConverterTypeIdentityProviderConfig: {
|
|
4656
|
+
read(from: RustBuffer): IdentityProviderConfig;
|
|
4657
|
+
write(value: IdentityProviderConfig, into: RustBuffer): void;
|
|
4658
|
+
allocationSize(value: IdentityProviderConfig): number;
|
|
4659
|
+
lift(value: UniffiByteArray): IdentityProviderConfig;
|
|
4660
|
+
lower(value: IdentityProviderConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4661
|
+
};
|
|
4662
|
+
FfiConverterTypeIdentityVerifierConfig: {
|
|
4663
|
+
read(from: RustBuffer): IdentityVerifierConfig;
|
|
4664
|
+
write(value: IdentityVerifierConfig, into: RustBuffer): void;
|
|
4665
|
+
allocationSize(value: IdentityVerifierConfig): number;
|
|
4666
|
+
lift(value: UniffiByteArray): IdentityVerifierConfig;
|
|
4667
|
+
lower(value: IdentityVerifierConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4668
|
+
};
|
|
4669
|
+
FfiConverterTypeJwtAlgorithm: {
|
|
4670
|
+
read(from: RustBuffer): JwtAlgorithm;
|
|
4671
|
+
write(value: JwtAlgorithm, into: RustBuffer): void;
|
|
4672
|
+
allocationSize(value: JwtAlgorithm): number;
|
|
4673
|
+
lift(value: UniffiByteArray): JwtAlgorithm;
|
|
4674
|
+
lower(value: JwtAlgorithm, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4675
|
+
};
|
|
4676
|
+
FfiConverterTypeJwtAuth: {
|
|
4677
|
+
read(from: RustBuffer): JwtAuth;
|
|
4678
|
+
write(value: JwtAuth, into: RustBuffer): void;
|
|
4679
|
+
allocationSize(value: JwtAuth): number;
|
|
4680
|
+
lift(value: UniffiByteArray): JwtAuth;
|
|
4681
|
+
lower(value: JwtAuth, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4682
|
+
};
|
|
4683
|
+
FfiConverterTypeJwtKeyConfig: {
|
|
4684
|
+
read(from: RustBuffer): JwtKeyConfig;
|
|
4685
|
+
write(value: JwtKeyConfig, into: RustBuffer): void;
|
|
4686
|
+
allocationSize(value: JwtKeyConfig): number;
|
|
4687
|
+
lift(value: UniffiByteArray): JwtKeyConfig;
|
|
4688
|
+
lower(value: JwtKeyConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4689
|
+
};
|
|
4690
|
+
FfiConverterTypeJwtKeyData: {
|
|
4691
|
+
read(from: RustBuffer): JwtKeyData;
|
|
4692
|
+
write(value: JwtKeyData, into: RustBuffer): void;
|
|
4693
|
+
allocationSize(value: JwtKeyData): number;
|
|
4694
|
+
lift(value: UniffiByteArray): JwtKeyData;
|
|
4695
|
+
lower(value: JwtKeyData, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4696
|
+
};
|
|
4697
|
+
FfiConverterTypeJwtKeyFormat: {
|
|
4698
|
+
read(from: RustBuffer): JwtKeyFormat;
|
|
4699
|
+
write(value: JwtKeyFormat, into: RustBuffer): void;
|
|
4700
|
+
allocationSize(value: JwtKeyFormat): number;
|
|
4701
|
+
lift(value: UniffiByteArray): JwtKeyFormat;
|
|
4702
|
+
lower(value: JwtKeyFormat, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4703
|
+
};
|
|
4704
|
+
FfiConverterTypeJwtKeyType: {
|
|
4705
|
+
read(from: RustBuffer): JwtKeyType;
|
|
4706
|
+
write(value: JwtKeyType, into: RustBuffer): void;
|
|
4707
|
+
allocationSize(value: JwtKeyType): number;
|
|
4708
|
+
lift(value: UniffiByteArray): JwtKeyType;
|
|
4709
|
+
lower(value: JwtKeyType, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4710
|
+
};
|
|
4711
|
+
FfiConverterTypeKeepaliveConfig: {
|
|
4712
|
+
read(from: RustBuffer): KeepaliveConfig;
|
|
4713
|
+
write(value: KeepaliveConfig, into: RustBuffer): void;
|
|
4714
|
+
allocationSize(value: KeepaliveConfig): number;
|
|
4715
|
+
lift(value: UniffiByteArray): KeepaliveConfig;
|
|
4716
|
+
lower(value: KeepaliveConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4717
|
+
};
|
|
4718
|
+
FfiConverterTypeKeepaliveServerParameters: {
|
|
4719
|
+
read(from: RustBuffer): KeepaliveServerParameters;
|
|
4720
|
+
write(value: KeepaliveServerParameters, into: RustBuffer): void;
|
|
4721
|
+
allocationSize(value: KeepaliveServerParameters): number;
|
|
4722
|
+
lift(value: UniffiByteArray): KeepaliveServerParameters;
|
|
4723
|
+
lower(value: KeepaliveServerParameters, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4724
|
+
};
|
|
4725
|
+
FfiConverterTypeMessageContext: {
|
|
4726
|
+
read(from: RustBuffer): MessageContext;
|
|
4727
|
+
write(value: MessageContext, into: RustBuffer): void;
|
|
4728
|
+
allocationSize(value: MessageContext): number;
|
|
4729
|
+
lift(value: UniffiByteArray): MessageContext;
|
|
4730
|
+
lower(value: MessageContext, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4731
|
+
};
|
|
4732
|
+
FfiConverterTypeMlsSettings: {
|
|
4733
|
+
read(from: RustBuffer): MlsSettings;
|
|
4734
|
+
write(value: MlsSettings, into: RustBuffer): void;
|
|
4735
|
+
allocationSize(value: MlsSettings): number;
|
|
4736
|
+
lift(value: UniffiByteArray): MlsSettings;
|
|
4737
|
+
lower(value: MlsSettings, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4738
|
+
};
|
|
4739
|
+
FfiConverterTypeName: FfiConverterObject<NameLike>;
|
|
4740
|
+
FfiConverterTypeProxyConfig: {
|
|
4741
|
+
read(from: RustBuffer): ProxyConfig;
|
|
4742
|
+
write(value: ProxyConfig, into: RustBuffer): void;
|
|
4743
|
+
allocationSize(value: ProxyConfig): number;
|
|
4744
|
+
lift(value: UniffiByteArray): ProxyConfig;
|
|
4745
|
+
lower(value: ProxyConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4746
|
+
};
|
|
4747
|
+
FfiConverterTypeReceivedMessage: {
|
|
4748
|
+
read(from: RustBuffer): ReceivedMessage;
|
|
4749
|
+
write(value: ReceivedMessage, into: RustBuffer): void;
|
|
4750
|
+
allocationSize(value: ReceivedMessage): number;
|
|
4751
|
+
lift(value: UniffiByteArray): ReceivedMessage;
|
|
4752
|
+
lower(value: ReceivedMessage, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4753
|
+
};
|
|
4754
|
+
FfiConverterTypeRuntimeConfig: {
|
|
4755
|
+
read(from: RustBuffer): RuntimeConfig;
|
|
4756
|
+
write(value: RuntimeConfig, into: RustBuffer): void;
|
|
4757
|
+
allocationSize(value: RuntimeConfig): number;
|
|
4758
|
+
lift(value: UniffiByteArray): RuntimeConfig;
|
|
4759
|
+
lower(value: RuntimeConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4760
|
+
};
|
|
4761
|
+
FfiConverterTypeServerAuthenticationConfig: {
|
|
4762
|
+
read(from: RustBuffer): ServerAuthenticationConfig;
|
|
4763
|
+
write(value: ServerAuthenticationConfig, into: RustBuffer): void;
|
|
4764
|
+
allocationSize(value: ServerAuthenticationConfig): number;
|
|
4765
|
+
lift(value: UniffiByteArray): ServerAuthenticationConfig;
|
|
4766
|
+
lower(value: ServerAuthenticationConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4767
|
+
};
|
|
4768
|
+
FfiConverterTypeServerConfig: {
|
|
4769
|
+
read(from: RustBuffer): ServerConfig;
|
|
4770
|
+
write(value: ServerConfig, into: RustBuffer): void;
|
|
4771
|
+
allocationSize(value: ServerConfig): number;
|
|
4772
|
+
lift(value: UniffiByteArray): ServerConfig;
|
|
4773
|
+
lower(value: ServerConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4774
|
+
};
|
|
4775
|
+
FfiConverterTypeService: FfiConverterObject<ServiceLike>;
|
|
4776
|
+
FfiConverterTypeServiceConfig: {
|
|
4777
|
+
read(from: RustBuffer): ServiceConfig;
|
|
4778
|
+
write(value: ServiceConfig, into: RustBuffer): void;
|
|
4779
|
+
allocationSize(value: ServiceConfig): number;
|
|
4780
|
+
lift(value: UniffiByteArray): ServiceConfig;
|
|
4781
|
+
lower(value: ServiceConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4782
|
+
};
|
|
4783
|
+
FfiConverterTypeSession: FfiConverterObject<SessionLike>;
|
|
4784
|
+
FfiConverterTypeSessionConfig: {
|
|
4785
|
+
read(from: RustBuffer): SessionConfig;
|
|
4786
|
+
write(value: SessionConfig, into: RustBuffer): void;
|
|
4787
|
+
allocationSize(value: SessionConfig): number;
|
|
4788
|
+
lift(value: UniffiByteArray): SessionConfig;
|
|
4789
|
+
lower(value: SessionConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4790
|
+
};
|
|
4791
|
+
FfiConverterTypeSessionType: {
|
|
4792
|
+
read(from: RustBuffer): SessionType;
|
|
4793
|
+
write(value: SessionType, into: RustBuffer): void;
|
|
4794
|
+
allocationSize(value: SessionType): number;
|
|
4795
|
+
lift(value: UniffiByteArray): SessionType;
|
|
4796
|
+
lower(value: SessionType, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4797
|
+
};
|
|
4798
|
+
FfiConverterTypeSessionWithCompletion: {
|
|
4799
|
+
read(from: RustBuffer): SessionWithCompletion;
|
|
4800
|
+
write(value: SessionWithCompletion, into: RustBuffer): void;
|
|
4801
|
+
allocationSize(value: SessionWithCompletion): number;
|
|
4802
|
+
lift(value: UniffiByteArray): SessionWithCompletion;
|
|
4803
|
+
lower(value: SessionWithCompletion, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4804
|
+
};
|
|
4805
|
+
FfiConverterTypeSlimError: {
|
|
4806
|
+
read(from: RustBuffer): SlimError;
|
|
4807
|
+
write(value: SlimError, into: RustBuffer): void;
|
|
4808
|
+
allocationSize(value: SlimError): number;
|
|
4809
|
+
lift(value: UniffiByteArray): SlimError;
|
|
4810
|
+
lower(value: SlimError, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4811
|
+
};
|
|
4812
|
+
FfiConverterTypeSpireConfig: {
|
|
4813
|
+
read(from: RustBuffer): SpireConfig;
|
|
4814
|
+
write(value: SpireConfig, into: RustBuffer): void;
|
|
4815
|
+
allocationSize(value: SpireConfig): number;
|
|
4816
|
+
lift(value: UniffiByteArray): SpireConfig;
|
|
4817
|
+
lower(value: SpireConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4818
|
+
};
|
|
4819
|
+
FfiConverterTypeStaticJwtAuth: {
|
|
4820
|
+
read(from: RustBuffer): StaticJwtAuth;
|
|
4821
|
+
write(value: StaticJwtAuth, into: RustBuffer): void;
|
|
4822
|
+
allocationSize(value: StaticJwtAuth): number;
|
|
4823
|
+
lift(value: UniffiByteArray): StaticJwtAuth;
|
|
4824
|
+
lower(value: StaticJwtAuth, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4825
|
+
};
|
|
4826
|
+
FfiConverterTypeTlsClientConfig: {
|
|
4827
|
+
read(from: RustBuffer): TlsClientConfig;
|
|
4828
|
+
write(value: TlsClientConfig, into: RustBuffer): void;
|
|
4829
|
+
allocationSize(value: TlsClientConfig): number;
|
|
4830
|
+
lift(value: UniffiByteArray): TlsClientConfig;
|
|
4831
|
+
lower(value: TlsClientConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4832
|
+
};
|
|
4833
|
+
FfiConverterTypeTlsServerConfig: {
|
|
4834
|
+
read(from: RustBuffer): TlsServerConfig;
|
|
4835
|
+
write(value: TlsServerConfig, into: RustBuffer): void;
|
|
4836
|
+
allocationSize(value: TlsServerConfig): number;
|
|
4837
|
+
lift(value: UniffiByteArray): TlsServerConfig;
|
|
4838
|
+
lower(value: TlsServerConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4839
|
+
};
|
|
4840
|
+
FfiConverterTypeTlsSource: {
|
|
4841
|
+
read(from: RustBuffer): TlsSource;
|
|
4842
|
+
write(value: TlsSource, into: RustBuffer): void;
|
|
4843
|
+
allocationSize(value: TlsSource): number;
|
|
4844
|
+
lift(value: UniffiByteArray): TlsSource;
|
|
4845
|
+
lower(value: TlsSource, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4846
|
+
};
|
|
4847
|
+
FfiConverterTypeTracingConfig: {
|
|
4848
|
+
read(from: RustBuffer): TracingConfig;
|
|
4849
|
+
write(value: TracingConfig, into: RustBuffer): void;
|
|
4850
|
+
allocationSize(value: TracingConfig): number;
|
|
4851
|
+
lift(value: UniffiByteArray): TracingConfig;
|
|
4852
|
+
lower(value: TracingConfig, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4853
|
+
};
|
|
4854
|
+
FfiConverterTypeTransportProtocol: {
|
|
4855
|
+
read(from: RustBuffer): TransportProtocol;
|
|
4856
|
+
write(value: TransportProtocol, into: RustBuffer): void;
|
|
4857
|
+
allocationSize(value: TransportProtocol): number;
|
|
4858
|
+
lift(value: UniffiByteArray): TransportProtocol;
|
|
4859
|
+
lower(value: TransportProtocol, alloc: import("@ubjs/core").RustBufferAllocator): UniffiByteArray;
|
|
4860
|
+
};
|
|
4861
|
+
};
|
|
4862
|
+
}>;
|
|
4863
|
+
export default _default;
|