@truenas/api-client 9.0.5 → 9.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,152 +1,152 @@
1
1
  'use strict';
2
2
 
3
- var chunkKME2PLIQ_cjs = require('./chunk-KME2PLIQ.cjs');
3
+ var chunkUOTSHE2J_cjs = require('./chunk-UOTSHE2J.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "AppState", {
8
8
  enumerable: true,
9
- get: function () { return chunkKME2PLIQ_cjs.AppState; }
9
+ get: function () { return chunkUOTSHE2J_cjs.AppState; }
10
10
  });
11
11
  Object.defineProperty(exports, "AuthError", {
12
12
  enumerable: true,
13
- get: function () { return chunkKME2PLIQ_cjs.AuthError; }
13
+ get: function () { return chunkUOTSHE2J_cjs.AuthError; }
14
14
  });
15
15
  Object.defineProperty(exports, "AuthErrorCode", {
16
16
  enumerable: true,
17
- get: function () { return chunkKME2PLIQ_cjs.AuthErrorCode; }
17
+ get: function () { return chunkUOTSHE2J_cjs.AuthErrorCode; }
18
18
  });
19
19
  Object.defineProperty(exports, "AuthResponseType", {
20
20
  enumerable: true,
21
- get: function () { return chunkKME2PLIQ_cjs.AuthResponseType; }
21
+ get: function () { return chunkUOTSHE2J_cjs.AuthResponseType; }
22
22
  });
23
23
  Object.defineProperty(exports, "InvalidVersionResponseError", {
24
24
  enumerable: true,
25
- get: function () { return chunkKME2PLIQ_cjs.InvalidVersionResponseError; }
25
+ get: function () { return chunkUOTSHE2J_cjs.InvalidVersionResponseError; }
26
26
  });
27
27
  Object.defineProperty(exports, "JobState", {
28
28
  enumerable: true,
29
- get: function () { return chunkKME2PLIQ_cjs.JobState; }
29
+ get: function () { return chunkUOTSHE2J_cjs.JobState; }
30
30
  });
31
31
  Object.defineProperty(exports, "NoCompatibleVersionsError", {
32
32
  enumerable: true,
33
- get: function () { return chunkKME2PLIQ_cjs.NoCompatibleVersionsError; }
33
+ get: function () { return chunkUOTSHE2J_cjs.NoCompatibleVersionsError; }
34
34
  });
35
35
  Object.defineProperty(exports, "SUPPORTED_API_VERSIONS", {
36
36
  enumerable: true,
37
- get: function () { return chunkKME2PLIQ_cjs.SUPPORTED_API_VERSIONS; }
37
+ get: function () { return chunkUOTSHE2J_cjs.SUPPORTED_API_VERSIONS; }
38
38
  });
39
39
  Object.defineProperty(exports, "TrueNasApiClient", {
40
40
  enumerable: true,
41
- get: function () { return chunkKME2PLIQ_cjs.TrueNasApiClient; }
41
+ get: function () { return chunkUOTSHE2J_cjs.TrueNasApiClient; }
42
42
  });
43
43
  Object.defineProperty(exports, "TrueNasApiClientV2510", {
44
44
  enumerable: true,
45
- get: function () { return chunkKME2PLIQ_cjs.TrueNasApiClientV2510; }
45
+ get: function () { return chunkUOTSHE2J_cjs.TrueNasApiClientV2510; }
46
46
  });
47
47
  Object.defineProperty(exports, "TrueNasApiClientV27", {
48
48
  enumerable: true,
49
- get: function () { return chunkKME2PLIQ_cjs.TrueNasApiClientV27; }
49
+ get: function () { return chunkUOTSHE2J_cjs.TrueNasApiClientV27; }
50
50
  });
51
51
  Object.defineProperty(exports, "TrueNasApiClientV28", {
52
52
  enumerable: true,
53
- get: function () { return chunkKME2PLIQ_cjs.TrueNasApiClientV28; }
53
+ get: function () { return chunkUOTSHE2J_cjs.TrueNasApiClientV28; }
54
54
  });
55
55
  Object.defineProperty(exports, "TrueNasApiError", {
56
56
  enumerable: true,
57
- get: function () { return chunkKME2PLIQ_cjs.TrueNasApiError; }
57
+ get: function () { return chunkUOTSHE2J_cjs.TrueNasApiError; }
58
58
  });
59
59
  Object.defineProperty(exports, "TrueNasAuthMechanism", {
60
60
  enumerable: true,
61
- get: function () { return chunkKME2PLIQ_cjs.TrueNasAuthMechanism; }
61
+ get: function () { return chunkUOTSHE2J_cjs.TrueNasAuthMechanism; }
62
62
  });
63
63
  Object.defineProperty(exports, "UserRole", {
64
64
  enumerable: true,
65
- get: function () { return chunkKME2PLIQ_cjs.UserRole; }
65
+ get: function () { return chunkUOTSHE2J_cjs.UserRole; }
66
66
  });
67
67
  Object.defineProperty(exports, "VersionCompatibility", {
68
68
  enumerable: true,
69
- get: function () { return chunkKME2PLIQ_cjs.VersionCompatibility; }
69
+ get: function () { return chunkUOTSHE2J_cjs.VersionCompatibility; }
70
70
  });
71
71
  Object.defineProperty(exports, "VersionDiscovery", {
72
72
  enumerable: true,
73
- get: function () { return chunkKME2PLIQ_cjs.VersionDiscovery; }
73
+ get: function () { return chunkUOTSHE2J_cjs.VersionDiscovery; }
74
74
  });
75
75
  Object.defineProperty(exports, "VersionDiscoveryError", {
76
76
  enumerable: true,
77
- get: function () { return chunkKME2PLIQ_cjs.VersionDiscoveryError; }
77
+ get: function () { return chunkUOTSHE2J_cjs.VersionDiscoveryError; }
78
78
  });
79
79
  Object.defineProperty(exports, "VersionDiscoveryNetworkError", {
80
80
  enumerable: true,
81
- get: function () { return chunkKME2PLIQ_cjs.VersionDiscoveryNetworkError; }
81
+ get: function () { return chunkUOTSHE2J_cjs.VersionDiscoveryNetworkError; }
82
82
  });
83
83
  Object.defineProperty(exports, "VersionDiscoveryTimeoutError", {
84
84
  enumerable: true,
85
- get: function () { return chunkKME2PLIQ_cjs.VersionDiscoveryTimeoutError; }
85
+ get: function () { return chunkUOTSHE2J_cjs.VersionDiscoveryTimeoutError; }
86
86
  });
87
87
  Object.defineProperty(exports, "VersionEndpointNotFoundError", {
88
88
  enumerable: true,
89
- get: function () { return chunkKME2PLIQ_cjs.VersionEndpointNotFoundError; }
89
+ get: function () { return chunkUOTSHE2J_cjs.VersionEndpointNotFoundError; }
90
90
  });
91
91
  Object.defineProperty(exports, "VersionTooNewError", {
92
92
  enumerable: true,
93
- get: function () { return chunkKME2PLIQ_cjs.VersionTooNewError; }
93
+ get: function () { return chunkUOTSHE2J_cjs.VersionTooNewError; }
94
94
  });
95
95
  Object.defineProperty(exports, "VersionTooOldError", {
96
96
  enumerable: true,
97
- get: function () { return chunkKME2PLIQ_cjs.VersionTooOldError; }
97
+ get: function () { return chunkUOTSHE2J_cjs.VersionTooOldError; }
98
98
  });
99
99
  Object.defineProperty(exports, "consoleLogger", {
100
100
  enumerable: true,
101
- get: function () { return chunkKME2PLIQ_cjs.consoleLogger; }
101
+ get: function () { return chunkUOTSHE2J_cjs.consoleLogger; }
102
102
  });
103
103
  Object.defineProperty(exports, "createTrueNasClient", {
104
104
  enumerable: true,
105
- get: function () { return chunkKME2PLIQ_cjs.createTrueNasClient; }
105
+ get: function () { return chunkUOTSHE2J_cjs.createTrueNasClient; }
106
106
  });
107
107
  Object.defineProperty(exports, "getApiErrorMessage", {
108
108
  enumerable: true,
109
- get: function () { return chunkKME2PLIQ_cjs.getApiErrorMessage; }
109
+ get: function () { return chunkUOTSHE2J_cjs.getApiErrorMessage; }
110
110
  });
111
111
  Object.defineProperty(exports, "isJobFinished", {
112
112
  enumerable: true,
113
- get: function () { return chunkKME2PLIQ_cjs.isJobFinished; }
113
+ get: function () { return chunkUOTSHE2J_cjs.isJobFinished; }
114
114
  });
115
115
  Object.defineProperty(exports, "noopLogger", {
116
116
  enumerable: true,
117
- get: function () { return chunkKME2PLIQ_cjs.noopLogger; }
117
+ get: function () { return chunkUOTSHE2J_cjs.noopLogger; }
118
118
  });
119
119
  Object.defineProperty(exports, "v25_10_0", {
120
120
  enumerable: true,
121
- get: function () { return chunkKME2PLIQ_cjs.v25_10_0_exports; }
121
+ get: function () { return chunkUOTSHE2J_cjs.v25_10_0_exports; }
122
122
  });
123
123
  Object.defineProperty(exports, "v25_10_1", {
124
124
  enumerable: true,
125
- get: function () { return chunkKME2PLIQ_cjs.v25_10_1_exports; }
125
+ get: function () { return chunkUOTSHE2J_cjs.v25_10_1_exports; }
126
126
  });
127
127
  Object.defineProperty(exports, "v25_10_2", {
128
128
  enumerable: true,
129
- get: function () { return chunkKME2PLIQ_cjs.v25_10_2_exports; }
129
+ get: function () { return chunkUOTSHE2J_cjs.v25_10_2_exports; }
130
130
  });
131
131
  Object.defineProperty(exports, "v25_10_3", {
132
132
  enumerable: true,
133
- get: function () { return chunkKME2PLIQ_cjs.v25_10_3_exports; }
133
+ get: function () { return chunkUOTSHE2J_cjs.v25_10_3_exports; }
134
134
  });
135
135
  Object.defineProperty(exports, "v25_10_4", {
136
136
  enumerable: true,
137
- get: function () { return chunkKME2PLIQ_cjs.v25_10_4_exports; }
137
+ get: function () { return chunkUOTSHE2J_cjs.v25_10_4_exports; }
138
138
  });
139
139
  Object.defineProperty(exports, "v25_10_5", {
140
140
  enumerable: true,
141
- get: function () { return chunkKME2PLIQ_cjs.v25_10_5_exports; }
141
+ get: function () { return chunkUOTSHE2J_cjs.v25_10_5_exports; }
142
142
  });
143
143
  Object.defineProperty(exports, "v27_0_0", {
144
144
  enumerable: true,
145
- get: function () { return chunkKME2PLIQ_cjs.v27_0_0_exports; }
145
+ get: function () { return chunkUOTSHE2J_cjs.v27_0_0_exports; }
146
146
  });
147
147
  Object.defineProperty(exports, "v28_0_0", {
148
148
  enumerable: true,
149
- get: function () { return chunkKME2PLIQ_cjs.v28_0_0_exports; }
149
+ get: function () { return chunkUOTSHE2J_cjs.v28_0_0_exports; }
150
150
  });
151
151
  //# sourceMappingURL=index.cjs.map
152
152
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TrueNasApiClient, A as ApiDirectory, O as OperationMappings, a as ApiDirectory$1, b as ApiDirectory$2, L as Logger, c as ApplianceProtocol, d as ApiVersion, e as AuthResponse, f as TrueNasErrorFrame, g as TrueNasErrorData } from './truenas-auth-mechanism.enum-DXwKN4R6.cjs';
2
- export { h as ApiCallDirectoryV25_10_0, i as ApiCallDirectoryV25_10_1, j as ApiCallDirectoryV25_10_2, k as ApiCallDirectoryV25_10_3, l as ApiCallDirectoryV25_10_4, m as ApiCallDirectoryV25_10_5, n as ApiCallDirectoryV27_0_0, o as ApiCallDirectoryV28_0_0, p as ApiDirectoryByVersion, q as ApiDirectoryShape, r as ApiDirectoryV25_10_1, s as ApiDirectoryV25_10_2, t as ApiDirectoryV25_10_3, u as ApiDirectoryV25_10_4, v as ApiDirectoryV25_10_5, w as ApiError, x as ApiEventDirectoryV25_10_0, y as ApiEventDirectoryV25_10_1, z as ApiEventDirectoryV25_10_2, B as ApiEventDirectoryV25_10_3, C as ApiEventDirectoryV25_10_4, D as ApiEventDirectoryV25_10_5, E as ApiEventDirectoryV27_0_0, F as ApiEventDirectoryV28_0_0, G as ApiJobDirectoryV25_10_0, H as ApiJobDirectoryV25_10_1, I as ApiJobDirectoryV25_10_2, J as ApiJobDirectoryV25_10_3, K as ApiJobDirectoryV25_10_4, M as ApiJobDirectoryV25_10_5, N as ApiJobDirectoryV27_0_0, P as ApiJobDirectoryV28_0_0, Q as ApiKeyCreate, R as ApiVersionResponse, S as AppState, U as ArgsOf, V as AuthResponseType, W as BaseApiDirectory, X as CallMethod, Y as CallParams, Z as CallResponse, _ as ConnectionClose, $ as ConnectionEndpoint, a0 as ConnectionInterceptor, a1 as ConnectionOptions, a2 as Container, a3 as CreateClientOptions, a4 as DefaultApiDirectory, a5 as EventKind, a6 as EventName, a7 as EventSourceName, a8 as EventUnion, a9 as Job, aa as JobMethod, ab as JobParams, ac as JobProgress, ad as JobResult, ae as JobState, af as PasswordLoginOptions, ag as QueryDirectory, ah as QueryEntity, ai as QueryListOptions, aj as QueryMethod, ak as QuerySingleOptions, al as ReconnectOptions, am as SUPPORTED_API_VERSIONS, an as SmbStatusInfoLevel, ao as SmbStatusOptions, ap as SmbStatusRequest, aq as SmbStatusResponse, ar as SmbStatusRow, as as SubscribableEvent, at as SubscriptionArgs, au as SubscriptionParams, av as SupportedApiVersion, aw as TrueNasAuthMechanism, ax as TrueNasDate, ay as TrueNasMessage, az as UserRole, aA as UserRoleName, aB as VersionCompatibility, aC as consoleLogger, aD as createTrueNasClient, aE as getApiErrorMessage, aF as isJobFinished, aG as noopLogger, aH as v25_10_0, aI as v25_10_1, aJ as v25_10_2, aK as v25_10_3, aL as v25_10_4, aM as v25_10_5, aN as v27_0_0, aO as v28_0_0 } from './truenas-auth-mechanism.enum-DXwKN4R6.cjs';
1
+ import { T as TrueNasApiClient, A as ApiDirectory, O as OperationMappings, a as ApiDirectory$1, b as ApiDirectory$2, L as Logger, c as ApplianceProtocol, d as ApiVersion, e as AuthResponse, f as TrueNasErrorFrame, g as TrueNasErrorData } from './truenas-auth-mechanism.enum-CtU2b15s.cjs';
2
+ export { h as ApiCallDirectoryV25_10_0, i as ApiCallDirectoryV25_10_1, j as ApiCallDirectoryV25_10_2, k as ApiCallDirectoryV25_10_3, l as ApiCallDirectoryV25_10_4, m as ApiCallDirectoryV25_10_5, n as ApiCallDirectoryV27_0_0, o as ApiCallDirectoryV28_0_0, p as ApiDirectoryByVersion, q as ApiDirectoryShape, r as ApiDirectoryV25_10_1, s as ApiDirectoryV25_10_2, t as ApiDirectoryV25_10_3, u as ApiDirectoryV25_10_4, v as ApiDirectoryV25_10_5, w as ApiError, x as ApiEventDirectoryV25_10_0, y as ApiEventDirectoryV25_10_1, z as ApiEventDirectoryV25_10_2, B as ApiEventDirectoryV25_10_3, C as ApiEventDirectoryV25_10_4, D as ApiEventDirectoryV25_10_5, E as ApiEventDirectoryV27_0_0, F as ApiEventDirectoryV28_0_0, G as ApiJobDirectoryV25_10_0, H as ApiJobDirectoryV25_10_1, I as ApiJobDirectoryV25_10_2, J as ApiJobDirectoryV25_10_3, K as ApiJobDirectoryV25_10_4, M as ApiJobDirectoryV25_10_5, N as ApiJobDirectoryV27_0_0, P as ApiJobDirectoryV28_0_0, Q as ApiKeyCreate, R as ApiVersionResponse, S as AppState, U as ArgsOf, V as AuthResponseType, W as BaseApiDirectory, X as CallMethod, Y as CallParams, Z as CallResponse, _ as ConnectionClose, $ as ConnectionEndpoint, a0 as ConnectionInterceptor, a1 as ConnectionOptions, a2 as Container, a3 as CreateClientOptions, a4 as DefaultApiDirectory, a5 as EventKind, a6 as EventName, a7 as EventSourceName, a8 as EventUnion, a9 as Job, aa as JobMethod, ab as JobParams, ac as JobProgress, ad as JobResult, ae as JobState, af as PasswordLoginOptions, ag as QueryDirectory, ah as QueryEntity, ai as QueryListOptions, aj as QueryMethod, ak as QuerySingleOptions, al as ReconnectOptions, am as SUPPORTED_API_VERSIONS, an as SmbStatusInfoLevel, ao as SmbStatusOptions, ap as SmbStatusRequest, aq as SmbStatusResponse, ar as SmbStatusRow, as as SubscribableEvent, at as SubscriptionArgs, au as SubscriptionParams, av as SupportedApiVersion, aw as TrueNasAuthMechanism, ax as TrueNasDate, ay as TrueNasMessage, az as UserRole, aA as UserRoleName, aB as VersionCompatibility, aC as consoleLogger, aD as createTrueNasClient, aE as getApiErrorMessage, aF as isJobFinished, aG as noopLogger, aH as v25_10_0, aI as v25_10_1, aJ as v25_10_2, aK as v25_10_3, aL as v25_10_4, aM as v25_10_5, aN as v27_0_0, aO as v28_0_0 } from './truenas-auth-mechanism.enum-CtU2b15s.cjs';
3
3
  import { Observable } from 'rxjs';
4
4
  import 'rxjs/webSocket';
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TrueNasApiClient, A as ApiDirectory, O as OperationMappings, a as ApiDirectory$1, b as ApiDirectory$2, L as Logger, c as ApplianceProtocol, d as ApiVersion, e as AuthResponse, f as TrueNasErrorFrame, g as TrueNasErrorData } from './truenas-auth-mechanism.enum-DXwKN4R6.js';
2
- export { h as ApiCallDirectoryV25_10_0, i as ApiCallDirectoryV25_10_1, j as ApiCallDirectoryV25_10_2, k as ApiCallDirectoryV25_10_3, l as ApiCallDirectoryV25_10_4, m as ApiCallDirectoryV25_10_5, n as ApiCallDirectoryV27_0_0, o as ApiCallDirectoryV28_0_0, p as ApiDirectoryByVersion, q as ApiDirectoryShape, r as ApiDirectoryV25_10_1, s as ApiDirectoryV25_10_2, t as ApiDirectoryV25_10_3, u as ApiDirectoryV25_10_4, v as ApiDirectoryV25_10_5, w as ApiError, x as ApiEventDirectoryV25_10_0, y as ApiEventDirectoryV25_10_1, z as ApiEventDirectoryV25_10_2, B as ApiEventDirectoryV25_10_3, C as ApiEventDirectoryV25_10_4, D as ApiEventDirectoryV25_10_5, E as ApiEventDirectoryV27_0_0, F as ApiEventDirectoryV28_0_0, G as ApiJobDirectoryV25_10_0, H as ApiJobDirectoryV25_10_1, I as ApiJobDirectoryV25_10_2, J as ApiJobDirectoryV25_10_3, K as ApiJobDirectoryV25_10_4, M as ApiJobDirectoryV25_10_5, N as ApiJobDirectoryV27_0_0, P as ApiJobDirectoryV28_0_0, Q as ApiKeyCreate, R as ApiVersionResponse, S as AppState, U as ArgsOf, V as AuthResponseType, W as BaseApiDirectory, X as CallMethod, Y as CallParams, Z as CallResponse, _ as ConnectionClose, $ as ConnectionEndpoint, a0 as ConnectionInterceptor, a1 as ConnectionOptions, a2 as Container, a3 as CreateClientOptions, a4 as DefaultApiDirectory, a5 as EventKind, a6 as EventName, a7 as EventSourceName, a8 as EventUnion, a9 as Job, aa as JobMethod, ab as JobParams, ac as JobProgress, ad as JobResult, ae as JobState, af as PasswordLoginOptions, ag as QueryDirectory, ah as QueryEntity, ai as QueryListOptions, aj as QueryMethod, ak as QuerySingleOptions, al as ReconnectOptions, am as SUPPORTED_API_VERSIONS, an as SmbStatusInfoLevel, ao as SmbStatusOptions, ap as SmbStatusRequest, aq as SmbStatusResponse, ar as SmbStatusRow, as as SubscribableEvent, at as SubscriptionArgs, au as SubscriptionParams, av as SupportedApiVersion, aw as TrueNasAuthMechanism, ax as TrueNasDate, ay as TrueNasMessage, az as UserRole, aA as UserRoleName, aB as VersionCompatibility, aC as consoleLogger, aD as createTrueNasClient, aE as getApiErrorMessage, aF as isJobFinished, aG as noopLogger, aH as v25_10_0, aI as v25_10_1, aJ as v25_10_2, aK as v25_10_3, aL as v25_10_4, aM as v25_10_5, aN as v27_0_0, aO as v28_0_0 } from './truenas-auth-mechanism.enum-DXwKN4R6.js';
1
+ import { T as TrueNasApiClient, A as ApiDirectory, O as OperationMappings, a as ApiDirectory$1, b as ApiDirectory$2, L as Logger, c as ApplianceProtocol, d as ApiVersion, e as AuthResponse, f as TrueNasErrorFrame, g as TrueNasErrorData } from './truenas-auth-mechanism.enum-CtU2b15s.js';
2
+ export { h as ApiCallDirectoryV25_10_0, i as ApiCallDirectoryV25_10_1, j as ApiCallDirectoryV25_10_2, k as ApiCallDirectoryV25_10_3, l as ApiCallDirectoryV25_10_4, m as ApiCallDirectoryV25_10_5, n as ApiCallDirectoryV27_0_0, o as ApiCallDirectoryV28_0_0, p as ApiDirectoryByVersion, q as ApiDirectoryShape, r as ApiDirectoryV25_10_1, s as ApiDirectoryV25_10_2, t as ApiDirectoryV25_10_3, u as ApiDirectoryV25_10_4, v as ApiDirectoryV25_10_5, w as ApiError, x as ApiEventDirectoryV25_10_0, y as ApiEventDirectoryV25_10_1, z as ApiEventDirectoryV25_10_2, B as ApiEventDirectoryV25_10_3, C as ApiEventDirectoryV25_10_4, D as ApiEventDirectoryV25_10_5, E as ApiEventDirectoryV27_0_0, F as ApiEventDirectoryV28_0_0, G as ApiJobDirectoryV25_10_0, H as ApiJobDirectoryV25_10_1, I as ApiJobDirectoryV25_10_2, J as ApiJobDirectoryV25_10_3, K as ApiJobDirectoryV25_10_4, M as ApiJobDirectoryV25_10_5, N as ApiJobDirectoryV27_0_0, P as ApiJobDirectoryV28_0_0, Q as ApiKeyCreate, R as ApiVersionResponse, S as AppState, U as ArgsOf, V as AuthResponseType, W as BaseApiDirectory, X as CallMethod, Y as CallParams, Z as CallResponse, _ as ConnectionClose, $ as ConnectionEndpoint, a0 as ConnectionInterceptor, a1 as ConnectionOptions, a2 as Container, a3 as CreateClientOptions, a4 as DefaultApiDirectory, a5 as EventKind, a6 as EventName, a7 as EventSourceName, a8 as EventUnion, a9 as Job, aa as JobMethod, ab as JobParams, ac as JobProgress, ad as JobResult, ae as JobState, af as PasswordLoginOptions, ag as QueryDirectory, ah as QueryEntity, ai as QueryListOptions, aj as QueryMethod, ak as QuerySingleOptions, al as ReconnectOptions, am as SUPPORTED_API_VERSIONS, an as SmbStatusInfoLevel, ao as SmbStatusOptions, ap as SmbStatusRequest, aq as SmbStatusResponse, ar as SmbStatusRow, as as SubscribableEvent, at as SubscriptionArgs, au as SubscriptionParams, av as SupportedApiVersion, aw as TrueNasAuthMechanism, ax as TrueNasDate, ay as TrueNasMessage, az as UserRole, aA as UserRoleName, aB as VersionCompatibility, aC as consoleLogger, aD as createTrueNasClient, aE as getApiErrorMessage, aF as isJobFinished, aG as noopLogger, aH as v25_10_0, aI as v25_10_1, aJ as v25_10_2, aK as v25_10_3, aL as v25_10_4, aM as v25_10_5, aN as v27_0_0, aO as v28_0_0 } from './truenas-auth-mechanism.enum-CtU2b15s.js';
3
3
  import { Observable } from 'rxjs';
4
4
  import 'rxjs/webSocket';
5
5
 
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { AppState, AuthError, AuthErrorCode, AuthResponseType, InvalidVersionResponseError, JobState, NoCompatibleVersionsError, SUPPORTED_API_VERSIONS, TrueNasApiClient, TrueNasApiClientV2510, TrueNasApiClientV27, TrueNasApiClientV28, TrueNasApiError, TrueNasAuthMechanism, UserRole, VersionCompatibility, VersionDiscovery, VersionDiscoveryError, VersionDiscoveryNetworkError, VersionDiscoveryTimeoutError, VersionEndpointNotFoundError, VersionTooNewError, VersionTooOldError, consoleLogger, createTrueNasClient, getApiErrorMessage, isJobFinished, noopLogger, v25_10_0_exports as v25_10_0, v25_10_1_exports as v25_10_1, v25_10_2_exports as v25_10_2, v25_10_3_exports as v25_10_3, v25_10_4_exports as v25_10_4, v25_10_5_exports as v25_10_5, v27_0_0_exports as v27_0_0, v28_0_0_exports as v28_0_0 } from './chunk-A2RDZXMF.js';
1
+ export { AppState, AuthError, AuthErrorCode, AuthResponseType, InvalidVersionResponseError, JobState, NoCompatibleVersionsError, SUPPORTED_API_VERSIONS, TrueNasApiClient, TrueNasApiClientV2510, TrueNasApiClientV27, TrueNasApiClientV28, TrueNasApiError, TrueNasAuthMechanism, UserRole, VersionCompatibility, VersionDiscovery, VersionDiscoveryError, VersionDiscoveryNetworkError, VersionDiscoveryTimeoutError, VersionEndpointNotFoundError, VersionTooNewError, VersionTooOldError, consoleLogger, createTrueNasClient, getApiErrorMessage, isJobFinished, noopLogger, v25_10_0_exports as v25_10_0, v25_10_1_exports as v25_10_1, v25_10_2_exports as v25_10_2, v25_10_3_exports as v25_10_3, v25_10_4_exports as v25_10_4, v25_10_5_exports as v25_10_5, v27_0_0_exports as v27_0_0, v28_0_0_exports as v28_0_0 } from './chunk-R4VP3HBB.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkKME2PLIQ_cjs = require('../chunk-KME2PLIQ.cjs');
3
+ var chunkUOTSHE2J_cjs = require('../chunk-UOTSHE2J.cjs');
4
4
  var rxjs = require('rxjs');
5
5
 
6
6
  // src/testing/unmocked-call-error.ts
@@ -17,7 +17,7 @@ var UnmockedCallError = class extends Error {
17
17
 
18
18
  // src/testing/fake-connection.ts
19
19
  var CLIENT_HOUSEKEEPING = /* @__PURE__ */ new Set(["core.subscribe", "core.unsubscribe"]);
20
- var FakeConnection = class extends chunkKME2PLIQ_cjs.TrueNasConnection {
20
+ var FakeConnection = class extends chunkUOTSHE2J_cjs.TrueNasConnection {
21
21
  constructor(options = {}) {
22
22
  super(
23
23
  // Disabled: `connection$` derives from this, so no socket is ever built
@@ -29,7 +29,7 @@ var FakeConnection = class extends chunkKME2PLIQ_cjs.TrueNasConnection {
29
29
  void 0,
30
30
  0,
31
31
  0,
32
- chunkKME2PLIQ_cjs.noopLogger
32
+ chunkUOTSHE2J_cjs.noopLogger
33
33
  );
34
34
  this.incoming = new rxjs.Subject();
35
35
  this.frames = [];
@@ -192,10 +192,10 @@ var FakeConnection = class extends chunkKME2PLIQ_cjs.TrueNasConnection {
192
192
  this.closesSubject.next({
193
193
  code,
194
194
  reason,
195
- message: chunkKME2PLIQ_cjs.getCloseMessage(code, reason),
195
+ message: chunkUOTSHE2J_cjs.getCloseMessage(code, reason),
196
196
  hostname: this.endpoint.hostnames[0] ?? "",
197
197
  wasOpen: true,
198
- refused: code === chunkKME2PLIQ_cjs.policyViolationCloseCode
198
+ refused: code === chunkUOTSHE2J_cjs.policyViolationCloseCode
199
199
  });
200
200
  }
201
201
  /**
@@ -224,7 +224,7 @@ var FakeConnection = class extends chunkKME2PLIQ_cjs.TrueNasConnection {
224
224
  };
225
225
 
226
226
  // src/testing/fake-authenticator.ts
227
- var FakeAuthenticator = class extends chunkKME2PLIQ_cjs.TrueNasAuthenticator {
227
+ var FakeAuthenticator = class extends chunkUOTSHE2J_cjs.TrueNasAuthenticator {
228
228
  constructor(fakeConnection, version) {
229
229
  super(fakeConnection, version);
230
230
  this.fakeConnection = fakeConnection;
@@ -551,7 +551,7 @@ function createMockAnswers(connection) {
551
551
  connection.receive({
552
552
  jsonrpc: "2.0",
553
553
  method: "collection_update",
554
- params: { collection: chunkKME2PLIQ_cjs.subscriptionName(event, params), ...change }
554
+ params: { collection: chunkUOTSHE2J_cjs.subscriptionName(event, params), ...change }
555
555
  });
556
556
  }
557
557
  };
@@ -574,12 +574,12 @@ function withFakeCollaborators(Base, options) {
574
574
  };
575
575
  }
576
576
  function createFakeClient(options = {}) {
577
- const versionString = options.version ?? chunkKME2PLIQ_cjs.SUPPORTED_API_VERSIONS[0];
578
- const version = chunkKME2PLIQ_cjs.parseApiVersion(versionString);
577
+ const versionString = options.version ?? chunkUOTSHE2J_cjs.SUPPORTED_API_VERSIONS[0];
578
+ const version = chunkUOTSHE2J_cjs.parseApiVersion(versionString);
579
579
  if (!version) {
580
580
  throw new Error(`'${versionString}' is not a version this package parses.`);
581
581
  }
582
- const Base = chunkKME2PLIQ_cjs.clientClassFor(version);
582
+ const Base = chunkUOTSHE2J_cjs.clientClassFor(version);
583
583
  if (!Base) {
584
584
  throw new Error(
585
585
  `No client implementation for '${versionString}'. The real factory would have refused it too.`
@@ -665,8 +665,8 @@ function withSpies(client, spy) {
665
665
  }
666
666
 
667
667
  // src/testing/fake-api-version.ts
668
- function fakeApiVersion(version = chunkKME2PLIQ_cjs.SUPPORTED_API_VERSIONS[0], overrides = {}) {
669
- const parsed = chunkKME2PLIQ_cjs.parseApiVersion(version);
668
+ function fakeApiVersion(version = chunkUOTSHE2J_cjs.SUPPORTED_API_VERSIONS[0], overrides = {}) {
669
+ const parsed = chunkUOTSHE2J_cjs.parseApiVersion(version);
670
670
  if (!parsed) {
671
671
  throw new Error(
672
672
  `fakeApiVersion('${version}'): not a version this package parses. Expected vYY.MINOR.PATCH \u2014 v25.10.0, v27.0.0. For a version the parser rejects, pass one it accepts and override its fields.`
@@ -735,7 +735,7 @@ function fakeAuthResponse(overrides = {}) {
735
735
 
736
736
  Object.defineProperty(exports, "AuthResponseType", {
737
737
  enumerable: true,
738
- get: function () { return chunkKME2PLIQ_cjs.AuthResponseType; }
738
+ get: function () { return chunkUOTSHE2J_cjs.AuthResponseType; }
739
739
  });
740
740
  exports.FakeAuthenticator = FakeAuthenticator;
741
741
  exports.FakeConnection = FakeConnection;
@@ -1,6 +1,6 @@
1
1
  import * as rxjs from 'rxjs';
2
2
  import { Subscription, Observable } from 'rxjs';
3
- import { aP as TrueNasConnection, ay as TrueNasMessage, f as TrueNasErrorFrame, aQ as TrueNasAuthenticator, d as ApiVersion, aw as TrueNasAuthMechanism, e as AuthResponse, V as AuthResponseType, af as PasswordLoginOptions, a9 as Job, ac as JobProgress, q as ApiDirectoryShape, X as CallMethod, aj as QueryMethod, Z as CallResponse, Y as CallParams, ah as QueryEntity, aa as JobMethod, ad as JobResult, a6 as EventName, a8 as EventUnion, a7 as EventSourceName, at as SubscriptionArgs, av as SupportedApiVersion, T as TrueNasApiClient, aR as DerivedDirectory, g as TrueNasErrorData } from '../truenas-auth-mechanism.enum-DXwKN4R6.cjs';
3
+ import { aP as TrueNasConnection, ay as TrueNasMessage, f as TrueNasErrorFrame, aQ as TrueNasAuthenticator, d as ApiVersion, aw as TrueNasAuthMechanism, e as AuthResponse, V as AuthResponseType, af as PasswordLoginOptions, a9 as Job, ac as JobProgress, q as ApiDirectoryShape, X as CallMethod, aj as QueryMethod, Z as CallResponse, Y as CallParams, ah as QueryEntity, aa as JobMethod, ad as JobResult, a6 as EventName, a8 as EventUnion, a7 as EventSourceName, at as SubscriptionArgs, av as SupportedApiVersion, T as TrueNasApiClient, aR as DerivedDirectory, g as TrueNasErrorData } from '../truenas-auth-mechanism.enum-CtU2b15s.cjs';
4
4
  import 'rxjs/webSocket';
5
5
 
6
6
  /** How a fake connection is set up. Every field has a usable default. */
@@ -1,6 +1,6 @@
1
1
  import * as rxjs from 'rxjs';
2
2
  import { Subscription, Observable } from 'rxjs';
3
- import { aP as TrueNasConnection, ay as TrueNasMessage, f as TrueNasErrorFrame, aQ as TrueNasAuthenticator, d as ApiVersion, aw as TrueNasAuthMechanism, e as AuthResponse, V as AuthResponseType, af as PasswordLoginOptions, a9 as Job, ac as JobProgress, q as ApiDirectoryShape, X as CallMethod, aj as QueryMethod, Z as CallResponse, Y as CallParams, ah as QueryEntity, aa as JobMethod, ad as JobResult, a6 as EventName, a8 as EventUnion, a7 as EventSourceName, at as SubscriptionArgs, av as SupportedApiVersion, T as TrueNasApiClient, aR as DerivedDirectory, g as TrueNasErrorData } from '../truenas-auth-mechanism.enum-DXwKN4R6.js';
3
+ import { aP as TrueNasConnection, ay as TrueNasMessage, f as TrueNasErrorFrame, aQ as TrueNasAuthenticator, d as ApiVersion, aw as TrueNasAuthMechanism, e as AuthResponse, V as AuthResponseType, af as PasswordLoginOptions, a9 as Job, ac as JobProgress, q as ApiDirectoryShape, X as CallMethod, aj as QueryMethod, Z as CallResponse, Y as CallParams, ah as QueryEntity, aa as JobMethod, ad as JobResult, a6 as EventName, a8 as EventUnion, a7 as EventSourceName, at as SubscriptionArgs, av as SupportedApiVersion, T as TrueNasApiClient, aR as DerivedDirectory, g as TrueNasErrorData } from '../truenas-auth-mechanism.enum-CtU2b15s.js';
4
4
  import 'rxjs/webSocket';
5
5
 
6
6
  /** How a fake connection is set up. Every field has a usable default. */
@@ -1,5 +1,5 @@
1
- import { SUPPORTED_API_VERSIONS, TrueNasConnection, noopLogger, policyViolationCloseCode, getCloseMessage, TrueNasAuthenticator, parseApiVersion, clientClassFor, subscriptionName } from '../chunk-A2RDZXMF.js';
2
- export { AuthResponseType } from '../chunk-A2RDZXMF.js';
1
+ import { SUPPORTED_API_VERSIONS, TrueNasConnection, noopLogger, policyViolationCloseCode, getCloseMessage, TrueNasAuthenticator, parseApiVersion, clientClassFor, subscriptionName } from '../chunk-R4VP3HBB.js';
2
+ export { AuthResponseType } from '../chunk-R4VP3HBB.js';
3
3
  import { Subject, distinctUntilChanged, takeUntil, filter, map, Subscription } from 'rxjs';
4
4
 
5
5
  // src/testing/unmocked-call-error.ts
@@ -31575,6 +31575,16 @@ interface ConnectionInterceptor {
31575
31575
  interface ConnectionOptions extends ReconnectOptions {
31576
31576
  /** See {@link ConnectionInterceptor}. Unset (the default), nothing is intercepted. */
31577
31577
  interceptor?: ConnectionInterceptor;
31578
+ /**
31579
+ * How many requests may await an answer at once; beyond it they wait, in
31580
+ * order, for an answer to make room. Unset (the default), nothing waits.
31581
+ * Middleware refuses calls past 20 per connection on current releases, so an
31582
+ * app that bursts past that sets 20. Every frame the client writes counts, its
31583
+ * `core.ping` included (skipped, not queued, while every place is taken).
31584
+ * Calls waiting when a socket is lost are held until the session is
31585
+ * authenticated again; `connection.refuseHeldCalls()` ends them instead.
31586
+ */
31587
+ maxConcurrentCalls?: number;
31578
31588
  }
31579
31589
  /** One socket closing, as `connection.closes$` reports it. */
31580
31590
  interface ConnectionClose {
@@ -31629,6 +31639,11 @@ declare class TrueNasConnection {
31629
31639
  readonly logger: Logger;
31630
31640
  /** Sees every frame in and out, and can answer in the appliance's place. */
31631
31641
  private readonly interceptor?;
31642
+ /**
31643
+ * How many requests may await an answer at once; the rest wait their turn.
31644
+ * Unset, nothing is held back. See `ConnectionOptions.maxConcurrentCalls`.
31645
+ */
31646
+ readonly maxConcurrentCalls?: number | undefined;
31632
31647
  opened: BehaviorSubject<boolean>;
31633
31648
  closed: Subject<void>;
31634
31649
  hostname: BehaviorSubject<string>;
@@ -31702,14 +31717,24 @@ declare class TrueNasConnection {
31702
31717
  hasConnectionError$: Observable<boolean>;
31703
31718
  /** What the appliance sends, on whichever socket is current. */
31704
31719
  private readonly socketMessages$;
31720
+ /** Answers given here, to calls ended without being sent. See `refuseHeldCalls()`. */
31721
+ private readonly refusals$;
31705
31722
  /**
31706
- * observable which always emits messages from the current socket, and the
31707
- * frames an `interceptor` injects. Assigned in the constructor, which has it.
31723
+ * observable which always emits messages from the current socket, the
31724
+ * refusals `refuseHeldCalls()` gives, and the frames an `interceptor`
31725
+ * injects. Assigned in the constructor, which has it.
31708
31726
  */
31709
31727
  messages$: Observable<TrueNasMessage>;
31728
+ /** Set when `maxConcurrentCalls` is; see there. */
31729
+ private readonly limiter;
31710
31730
  constructor(initialEnabled: boolean, hostnames: string[], systemUuid: string, websocketPath: string, systemName?: string | undefined, retryDelay?: number, maxRetry?: number, logger?: Logger, protocol?: ApplianceProtocol,
31711
31731
  /** Sees every frame in and out, and can answer in the appliance's place. */
31712
- interceptor?: ConnectionInterceptor | undefined);
31732
+ interceptor?: ConnectionInterceptor | undefined,
31733
+ /**
31734
+ * How many requests may await an answer at once; the rest wait their turn.
31735
+ * Unset, nothing is held back. See `ConnectionOptions.maxConcurrentCalls`.
31736
+ */
31737
+ maxConcurrentCalls?: number | undefined);
31713
31738
  /** The hostnames and protocol the connection currently points at. */
31714
31739
  get endpoint(): ResolvedEndpoint;
31715
31740
  /** The appliance's scheme; changed through `setEndpoint()`. */
@@ -31749,8 +31774,35 @@ declare class TrueNasConnection {
31749
31774
  * sends a message over the current websocket OR queues it to send once
31750
31775
  * the next websocket is opened. messages sent via `send` will not be lost until after
31751
31776
  * the next `closed$` emission.
31777
+ *
31778
+ * With `maxConcurrentCalls` set, a request beyond the limit waits for an
31779
+ * answer to make room. Unsubscribing the returned handle takes back a frame
31780
+ * not written yet, waiting or queued.
31752
31781
  */
31753
31782
  send(message: TrueNasMessage): Subscription;
31783
+ /**
31784
+ * Lets calls held from a lost socket go out again. The client calls this
31785
+ * whenever the session is authenticated, so a consumer does not need to;
31786
+ * a no-op without `maxConcurrentCalls`, or with nothing held.
31787
+ *
31788
+ * Calls waiting for a place when a socket is lost are held, not sent on the
31789
+ * next one: a new socket starts signed out, so middleware would refuse them
31790
+ * with `ENOTAUTHENTICATED`.
31791
+ */
31792
+ releaseHeldCalls(): void;
31793
+ /**
31794
+ * Ends every call held from a lost socket without sending it, answering each
31795
+ * on `messages()` with the refusal middleware would have given it on a socket
31796
+ * that is not signed in: `ENOTAUTHENTICATED`. Returns how many it ended.
31797
+ *
31798
+ * For an app whose next sign-in may be a different user than the one who made
31799
+ * those calls, e.g. a password prompt after the session was lost. Call it
31800
+ * before that sign-in; otherwise the calls go out once it succeeds. A no-op
31801
+ * while nothing is held, so a healthy session's waiting calls are not touched.
31802
+ */
31803
+ refuseHeldCalls(): number;
31804
+ /** Writes to the current socket, or to the next one once it opens. */
31805
+ private writeToNextSocket;
31754
31806
  /**
31755
31807
  * manually closes this connection and prevents it from retrying/opening any more.
31756
31808
  */
@@ -32513,7 +32565,7 @@ declare abstract class TrueNasApiClient<D extends ApiDirectoryShape = BaseApiDir
32513
32565
  /** Logger forwarded to the connection (defaults to a no-op). */
32514
32566
  protected readonly logger: Logger;
32515
32567
  protected readonly protocol: ApplianceProtocol;
32516
- /** Retry pacing and the interceptor, forwarded to the connection; unset fields take its defaults. */
32568
+ /** Retry pacing, call pacing and the interceptor, forwarded to the connection; unset fields take its defaults. */
32517
32569
  protected readonly reconnect: ConnectionOptions;
32518
32570
  constructor(uuid: string, hostnames: string[], version: ApiVersion, enabled: boolean, systemName?: string, logger?: Logger, protocol?: ApplianceProtocol, reconnect?: ConnectionOptions);
32519
32571
  /**
@@ -32586,6 +32638,7 @@ type DerivedDirectory<V extends SupportedApiVersion> = SupportedApiVersion exten
32586
32638
  * Options for {@link createTrueNasClient}. `retryDelay` and `maxRetry` pace
32587
32639
  * reconnection, which never stops on its own; see {@link ReconnectOptions}.
32588
32640
  * `interceptor` sees the traffic; see {@link ConnectionInterceptor}.
32641
+ * `maxConcurrentCalls` paces requests; see {@link ConnectionOptions}.
32589
32642
  */
32590
32643
  interface CreateClientOptions extends ConnectionOptions {
32591
32644
  /** System UUID. */
@@ -31575,6 +31575,16 @@ interface ConnectionInterceptor {
31575
31575
  interface ConnectionOptions extends ReconnectOptions {
31576
31576
  /** See {@link ConnectionInterceptor}. Unset (the default), nothing is intercepted. */
31577
31577
  interceptor?: ConnectionInterceptor;
31578
+ /**
31579
+ * How many requests may await an answer at once; beyond it they wait, in
31580
+ * order, for an answer to make room. Unset (the default), nothing waits.
31581
+ * Middleware refuses calls past 20 per connection on current releases, so an
31582
+ * app that bursts past that sets 20. Every frame the client writes counts, its
31583
+ * `core.ping` included (skipped, not queued, while every place is taken).
31584
+ * Calls waiting when a socket is lost are held until the session is
31585
+ * authenticated again; `connection.refuseHeldCalls()` ends them instead.
31586
+ */
31587
+ maxConcurrentCalls?: number;
31578
31588
  }
31579
31589
  /** One socket closing, as `connection.closes$` reports it. */
31580
31590
  interface ConnectionClose {
@@ -31629,6 +31639,11 @@ declare class TrueNasConnection {
31629
31639
  readonly logger: Logger;
31630
31640
  /** Sees every frame in and out, and can answer in the appliance's place. */
31631
31641
  private readonly interceptor?;
31642
+ /**
31643
+ * How many requests may await an answer at once; the rest wait their turn.
31644
+ * Unset, nothing is held back. See `ConnectionOptions.maxConcurrentCalls`.
31645
+ */
31646
+ readonly maxConcurrentCalls?: number | undefined;
31632
31647
  opened: BehaviorSubject<boolean>;
31633
31648
  closed: Subject<void>;
31634
31649
  hostname: BehaviorSubject<string>;
@@ -31702,14 +31717,24 @@ declare class TrueNasConnection {
31702
31717
  hasConnectionError$: Observable<boolean>;
31703
31718
  /** What the appliance sends, on whichever socket is current. */
31704
31719
  private readonly socketMessages$;
31720
+ /** Answers given here, to calls ended without being sent. See `refuseHeldCalls()`. */
31721
+ private readonly refusals$;
31705
31722
  /**
31706
- * observable which always emits messages from the current socket, and the
31707
- * frames an `interceptor` injects. Assigned in the constructor, which has it.
31723
+ * observable which always emits messages from the current socket, the
31724
+ * refusals `refuseHeldCalls()` gives, and the frames an `interceptor`
31725
+ * injects. Assigned in the constructor, which has it.
31708
31726
  */
31709
31727
  messages$: Observable<TrueNasMessage>;
31728
+ /** Set when `maxConcurrentCalls` is; see there. */
31729
+ private readonly limiter;
31710
31730
  constructor(initialEnabled: boolean, hostnames: string[], systemUuid: string, websocketPath: string, systemName?: string | undefined, retryDelay?: number, maxRetry?: number, logger?: Logger, protocol?: ApplianceProtocol,
31711
31731
  /** Sees every frame in and out, and can answer in the appliance's place. */
31712
- interceptor?: ConnectionInterceptor | undefined);
31732
+ interceptor?: ConnectionInterceptor | undefined,
31733
+ /**
31734
+ * How many requests may await an answer at once; the rest wait their turn.
31735
+ * Unset, nothing is held back. See `ConnectionOptions.maxConcurrentCalls`.
31736
+ */
31737
+ maxConcurrentCalls?: number | undefined);
31713
31738
  /** The hostnames and protocol the connection currently points at. */
31714
31739
  get endpoint(): ResolvedEndpoint;
31715
31740
  /** The appliance's scheme; changed through `setEndpoint()`. */
@@ -31749,8 +31774,35 @@ declare class TrueNasConnection {
31749
31774
  * sends a message over the current websocket OR queues it to send once
31750
31775
  * the next websocket is opened. messages sent via `send` will not be lost until after
31751
31776
  * the next `closed$` emission.
31777
+ *
31778
+ * With `maxConcurrentCalls` set, a request beyond the limit waits for an
31779
+ * answer to make room. Unsubscribing the returned handle takes back a frame
31780
+ * not written yet, waiting or queued.
31752
31781
  */
31753
31782
  send(message: TrueNasMessage): Subscription;
31783
+ /**
31784
+ * Lets calls held from a lost socket go out again. The client calls this
31785
+ * whenever the session is authenticated, so a consumer does not need to;
31786
+ * a no-op without `maxConcurrentCalls`, or with nothing held.
31787
+ *
31788
+ * Calls waiting for a place when a socket is lost are held, not sent on the
31789
+ * next one: a new socket starts signed out, so middleware would refuse them
31790
+ * with `ENOTAUTHENTICATED`.
31791
+ */
31792
+ releaseHeldCalls(): void;
31793
+ /**
31794
+ * Ends every call held from a lost socket without sending it, answering each
31795
+ * on `messages()` with the refusal middleware would have given it on a socket
31796
+ * that is not signed in: `ENOTAUTHENTICATED`. Returns how many it ended.
31797
+ *
31798
+ * For an app whose next sign-in may be a different user than the one who made
31799
+ * those calls, e.g. a password prompt after the session was lost. Call it
31800
+ * before that sign-in; otherwise the calls go out once it succeeds. A no-op
31801
+ * while nothing is held, so a healthy session's waiting calls are not touched.
31802
+ */
31803
+ refuseHeldCalls(): number;
31804
+ /** Writes to the current socket, or to the next one once it opens. */
31805
+ private writeToNextSocket;
31754
31806
  /**
31755
31807
  * manually closes this connection and prevents it from retrying/opening any more.
31756
31808
  */
@@ -32513,7 +32565,7 @@ declare abstract class TrueNasApiClient<D extends ApiDirectoryShape = BaseApiDir
32513
32565
  /** Logger forwarded to the connection (defaults to a no-op). */
32514
32566
  protected readonly logger: Logger;
32515
32567
  protected readonly protocol: ApplianceProtocol;
32516
- /** Retry pacing and the interceptor, forwarded to the connection; unset fields take its defaults. */
32568
+ /** Retry pacing, call pacing and the interceptor, forwarded to the connection; unset fields take its defaults. */
32517
32569
  protected readonly reconnect: ConnectionOptions;
32518
32570
  constructor(uuid: string, hostnames: string[], version: ApiVersion, enabled: boolean, systemName?: string, logger?: Logger, protocol?: ApplianceProtocol, reconnect?: ConnectionOptions);
32519
32571
  /**
@@ -32586,6 +32638,7 @@ type DerivedDirectory<V extends SupportedApiVersion> = SupportedApiVersion exten
32586
32638
  * Options for {@link createTrueNasClient}. `retryDelay` and `maxRetry` pace
32587
32639
  * reconnection, which never stops on its own; see {@link ReconnectOptions}.
32588
32640
  * `interceptor` sees the traffic; see {@link ConnectionInterceptor}.
32641
+ * `maxConcurrentCalls` paces requests; see {@link ConnectionOptions}.
32589
32642
  */
32590
32643
  interface CreateClientOptions extends ConnectionOptions {
32591
32644
  /** System UUID. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truenas/api-client",
3
- "version": "9.0.5",
3
+ "version": "9.0.6",
4
4
  "description": "Framework-agnostic TypeScript client for the TrueNAS JSON-RPC 2.0 WebSocket API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",