@qlik/api 1.30.0 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/api-keys.d.ts +2 -2
  2. package/api-keys.js +2 -2
  3. package/apps.d.ts +4 -2
  4. package/apps.js +2 -2
  5. package/assistants.d.ts +1301 -0
  6. package/assistants.js +273 -0
  7. package/audits.d.ts +2 -2
  8. package/audits.js +2 -2
  9. package/{auth-types-PkN9CAF_.d.ts → auth-types-DqfMuSRX.d.ts} +1 -0
  10. package/auth.d.ts +27 -3
  11. package/auth.js +8 -4
  12. package/automation-connections.d.ts +366 -0
  13. package/automation-connections.js +91 -0
  14. package/automations.d.ts +2 -2
  15. package/automations.js +2 -2
  16. package/automl-deployments.d.ts +97 -0
  17. package/automl-deployments.js +27 -0
  18. package/automl-predictions.d.ts +214 -0
  19. package/automl-predictions.js +72 -0
  20. package/brands.d.ts +2 -2
  21. package/brands.js +2 -2
  22. package/chunks/{JIX6RMFP.js → 6ZONDHRN.js} +1 -1
  23. package/chunks/ETNHFALU.js +61 -0
  24. package/chunks/{G6QUM5WQ.js → FKDGGR2O.js} +137 -45
  25. package/chunks/{TXC5XORK.js → LTNGXTXG.js} +3 -3
  26. package/chunks/{OTTC4QSX.js → LY7RP2HA.js} +7 -3
  27. package/chunks/{FKCZFVJL.js → M64RLKVG.js} +2074 -12
  28. package/chunks/{F5UDCCRD.js → PLVPW5IR.js} +1 -1
  29. package/chunks/{QK4TMJ64.js → RCLKKVYB.js} +11 -1
  30. package/chunks/{QWQLGDMI.js → UZTIZ4H5.js} +392 -372
  31. package/chunks/{PTDXR7AY.js → VVD2DPKQ.js} +2 -2
  32. package/chunks/{IQBP2PKS.js → YTT2FEVE.js} +1 -1
  33. package/collections.d.ts +3 -3
  34. package/collections.js +2 -2
  35. package/conditions.d.ts +662 -0
  36. package/conditions.js +113 -0
  37. package/consumption.d.ts +182 -0
  38. package/consumption.js +24 -0
  39. package/csp-origins.d.ts +2 -2
  40. package/csp-origins.js +2 -2
  41. package/csrf-token.d.ts +62 -0
  42. package/csrf-token.js +23 -0
  43. package/data-alerts.d.ts +1004 -0
  44. package/data-alerts.js +155 -0
  45. package/data-assets.d.ts +2 -2
  46. package/data-assets.js +2 -2
  47. package/data-connections.d.ts +7 -7
  48. package/data-connections.js +2 -2
  49. package/data-credentials.d.ts +2 -2
  50. package/data-credentials.js +2 -2
  51. package/data-files.d.ts +2 -2
  52. package/data-files.js +2 -2
  53. package/data-qualities.d.ts +175 -0
  54. package/data-qualities.js +44 -0
  55. package/data-sets.d.ts +424 -0
  56. package/data-sets.js +75 -0
  57. package/data-sources.d.ts +268 -0
  58. package/data-sources.js +39 -0
  59. package/data-stores.d.ts +537 -0
  60. package/data-stores.js +108 -0
  61. package/dcaas.d.ts +192 -0
  62. package/dcaas.js +39 -0
  63. package/di-projects.d.ts +673 -0
  64. package/di-projects.js +164 -0
  65. package/docs/authentication.md +47 -0
  66. package/encryption.d.ts +370 -0
  67. package/encryption.js +98 -0
  68. package/extensions.d.ts +2 -2
  69. package/extensions.js +2 -2
  70. package/glossaries.d.ts +2 -2
  71. package/glossaries.js +2 -2
  72. package/groups.d.ts +5 -4
  73. package/groups.js +2 -2
  74. package/identity-providers.d.ts +2 -2
  75. package/identity-providers.js +2 -2
  76. package/index.d.ts +110 -4
  77. package/index.js +556 -4
  78. package/interceptors.d.ts +2 -2
  79. package/{invoke-fetch-types-BXn-uSF5.d.ts → invoke-fetch-types-Cq7bjkqn.d.ts} +10 -2
  80. package/items.d.ts +3 -3
  81. package/items.js +2 -2
  82. package/knowledgebases.d.ts +890 -0
  83. package/knowledgebases.js +169 -0
  84. package/licenses.d.ts +6 -3
  85. package/licenses.js +2 -2
  86. package/lineage-graphs.d.ts +712 -0
  87. package/lineage-graphs.js +92 -0
  88. package/ml.d.ts +2628 -0
  89. package/ml.js +384 -0
  90. package/notes.d.ts +110 -0
  91. package/notes.js +31 -0
  92. package/notifications.d.ts +98 -0
  93. package/notifications.js +24 -0
  94. package/oauth-clients.d.ts +7 -2
  95. package/oauth-clients.js +2 -2
  96. package/oauth-tokens.d.ts +126 -0
  97. package/oauth-tokens.js +31 -0
  98. package/package.json +29 -2
  99. package/qix.d.ts +421 -26
  100. package/qix.js +2 -2
  101. package/questions.d.ts +364 -0
  102. package/questions.js +34 -0
  103. package/quotas.d.ts +2 -2
  104. package/quotas.js +2 -2
  105. package/reload-tasks.d.ts +4 -2
  106. package/reload-tasks.js +2 -2
  107. package/reloads.d.ts +4 -2
  108. package/reloads.js +2 -2
  109. package/report-templates.d.ts +287 -0
  110. package/report-templates.js +80 -0
  111. package/reports.d.ts +2 -2
  112. package/reports.js +2 -2
  113. package/roles.d.ts +2 -2
  114. package/roles.js +2 -2
  115. package/sharing-tasks.d.ts +952 -0
  116. package/sharing-tasks.js +105 -0
  117. package/spaces.d.ts +3 -7
  118. package/spaces.js +2 -2
  119. package/tasks.d.ts +564 -0
  120. package/tasks.js +106 -0
  121. package/temp-contents.d.ts +2 -2
  122. package/temp-contents.js +2 -2
  123. package/tenants.d.ts +2 -2
  124. package/tenants.js +2 -2
  125. package/themes.d.ts +2 -2
  126. package/themes.js +2 -2
  127. package/transports.d.ts +2 -2
  128. package/transports.js +2 -2
  129. package/ui-config.d.ts +274 -0
  130. package/ui-config.js +77 -0
  131. package/users.d.ts +2 -2
  132. package/users.js +2 -2
  133. package/web-integrations.d.ts +2 -2
  134. package/web-integrations.js +2 -2
  135. package/web-notifications.d.ts +2 -2
  136. package/web-notifications.js +2 -2
  137. package/webhooks.d.ts +2 -2
  138. package/webhooks.js +2 -2
@@ -0,0 +1,214 @@
1
+ import { A as ApiCallOptions } from './invoke-fetch-types-Cq7bjkqn.js';
2
+ import './auth-types-DqfMuSRX.js';
3
+
4
+ type AppErrorResponse = {
5
+ errors?: Error[];
6
+ };
7
+ type Error = {
8
+ /** The argument */
9
+ argument?: string;
10
+ /** The unique code for the error */
11
+ code: string;
12
+ /** The unique id of the error instance */
13
+ errorId?: string;
14
+ /** The issue code */
15
+ issue?: string;
16
+ meta?: {
17
+ /** The argument */
18
+ argument?: string;
19
+ /** Extra details for what may have caused the error */
20
+ details?: string;
21
+ /** The unique id of the error instance */
22
+ errorId?: string;
23
+ /** The resource type that the error occurred on */
24
+ resource?: string;
25
+ /** The resource id that the error occurred on */
26
+ resourceId?: string;
27
+ };
28
+ /** The resource type that the error occurred on */
29
+ resource?: string;
30
+ /** The resource id that the error occurred on */
31
+ resourceId?: string;
32
+ /** A summary of what went wrong */
33
+ title?: string;
34
+ };
35
+ /**
36
+ * Returns a file containing the shapley values in coordinate form that are associated with a prediction ID.
37
+ *
38
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
39
+ * @param query an object with query parameters
40
+ * @throws GetAutomlPredictionCoordinateShapHttpError
41
+ */
42
+ declare const getAutomlPredictionCoordinateShap: (predictionId: string, query: {
43
+ refId?: string;
44
+ }, options?: ApiCallOptions) => Promise<GetAutomlPredictionCoordinateShapHttpResponse>;
45
+ type GetAutomlPredictionCoordinateShapHttpResponse = {
46
+ data: string;
47
+ headers: Headers;
48
+ status: 200;
49
+ };
50
+ type GetAutomlPredictionCoordinateShapHttpError = {
51
+ data: AppErrorResponse;
52
+ headers: Headers;
53
+ status: 400 | 401 | 403 | 404 | 409 | 503;
54
+ };
55
+ /**
56
+ * Retrieve jobs that are associated with a prediction. Job with correlation type `prediction`.
57
+ *
58
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
59
+ * @throws CreateAutomlPredictionJobHttpError
60
+ */
61
+ declare const createAutomlPredictionJob: (predictionId: string, options?: ApiCallOptions) => Promise<CreateAutomlPredictionJobHttpResponse>;
62
+ type CreateAutomlPredictionJobHttpResponse = {
63
+ data: void;
64
+ headers: Headers;
65
+ status: 200;
66
+ };
67
+ type CreateAutomlPredictionJobHttpError = {
68
+ data: AppErrorResponse;
69
+ headers: Headers;
70
+ status: 400 | 401 | 403 | 404 | 409 | 503;
71
+ };
72
+ /**
73
+ * Returns a file containing any rows in a prediction operation where a prediction was unable to be produced.
74
+ *
75
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
76
+ * @param query an object with query parameters
77
+ * @throws GetAutomlPredictionNotPredictedReasonsHttpError
78
+ */
79
+ declare const getAutomlPredictionNotPredictedReasons: (predictionId: string, query: {
80
+ refId?: string;
81
+ }, options?: ApiCallOptions) => Promise<GetAutomlPredictionNotPredictedReasonsHttpResponse>;
82
+ type GetAutomlPredictionNotPredictedReasonsHttpResponse = {
83
+ data: string;
84
+ headers: Headers;
85
+ status: 200;
86
+ };
87
+ type GetAutomlPredictionNotPredictedReasonsHttpError = {
88
+ data: AppErrorResponse;
89
+ headers: Headers;
90
+ status: 400 | 401 | 403 | 404 | 409 | 503;
91
+ };
92
+ /**
93
+ * Returns a file containing the predicted values that are associated with a prediction ID.
94
+ *
95
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
96
+ * @param query an object with query parameters
97
+ * @throws GetAutomlPredictionPredictionsHttpError
98
+ */
99
+ declare const getAutomlPredictionPredictions: (predictionId: string, query: {
100
+ refId?: string;
101
+ }, options?: ApiCallOptions) => Promise<GetAutomlPredictionPredictionsHttpResponse>;
102
+ type GetAutomlPredictionPredictionsHttpResponse = {
103
+ data: void;
104
+ headers: Headers;
105
+ status: 200;
106
+ };
107
+ type GetAutomlPredictionPredictionsHttpError = {
108
+ data: AppErrorResponse;
109
+ headers: Headers;
110
+ status: 400 | 401 | 403 | 404 | 409 | 503;
111
+ };
112
+ /**
113
+ * Returns a file containing the shapley values that are associated with a prediction ID.
114
+ *
115
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
116
+ * @param query an object with query parameters
117
+ * @throws GetAutomlPredictionShapHttpError
118
+ */
119
+ declare const getAutomlPredictionShap: (predictionId: string, query: {
120
+ refId?: string;
121
+ }, options?: ApiCallOptions) => Promise<GetAutomlPredictionShapHttpResponse>;
122
+ type GetAutomlPredictionShapHttpResponse = {
123
+ data: void;
124
+ headers: Headers;
125
+ status: 200;
126
+ };
127
+ type GetAutomlPredictionShapHttpError = {
128
+ data: AppErrorResponse;
129
+ headers: Headers;
130
+ status: 400 | 401 | 403 | 404 | 409 | 503;
131
+ };
132
+ /**
133
+ * Returns a file containing the source values and an index field that are associated with a prediction ID.
134
+ *
135
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
136
+ * @param query an object with query parameters
137
+ * @throws GetAutomlPredictionSourceHttpError
138
+ */
139
+ declare const getAutomlPredictionSource: (predictionId: string, query: {
140
+ refId?: string;
141
+ }, options?: ApiCallOptions) => Promise<GetAutomlPredictionSourceHttpResponse>;
142
+ type GetAutomlPredictionSourceHttpResponse = {
143
+ data: string;
144
+ headers: Headers;
145
+ status: 200;
146
+ };
147
+ type GetAutomlPredictionSourceHttpError = {
148
+ data: AppErrorResponse;
149
+ headers: Headers;
150
+ status: 400 | 401 | 403 | 404 | 409 | 503;
151
+ };
152
+ /**
153
+ * Clears the cache for automl-predictions api requests.
154
+ */
155
+ declare function clearCache(): void;
156
+ interface AutomlPredictionsAPI {
157
+ /**
158
+ * Returns a file containing the shapley values in coordinate form that are associated with a prediction ID.
159
+ *
160
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
161
+ * @param query an object with query parameters
162
+ * @throws GetAutomlPredictionCoordinateShapHttpError
163
+ */
164
+ getAutomlPredictionCoordinateShap: typeof getAutomlPredictionCoordinateShap;
165
+ /**
166
+ * Retrieve jobs that are associated with a prediction. Job with correlation type `prediction`.
167
+ *
168
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
169
+ * @throws CreateAutomlPredictionJobHttpError
170
+ */
171
+ createAutomlPredictionJob: typeof createAutomlPredictionJob;
172
+ /**
173
+ * Returns a file containing any rows in a prediction operation where a prediction was unable to be produced.
174
+ *
175
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
176
+ * @param query an object with query parameters
177
+ * @throws GetAutomlPredictionNotPredictedReasonsHttpError
178
+ */
179
+ getAutomlPredictionNotPredictedReasons: typeof getAutomlPredictionNotPredictedReasons;
180
+ /**
181
+ * Returns a file containing the predicted values that are associated with a prediction ID.
182
+ *
183
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
184
+ * @param query an object with query parameters
185
+ * @throws GetAutomlPredictionPredictionsHttpError
186
+ */
187
+ getAutomlPredictionPredictions: typeof getAutomlPredictionPredictions;
188
+ /**
189
+ * Returns a file containing the shapley values that are associated with a prediction ID.
190
+ *
191
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
192
+ * @param query an object with query parameters
193
+ * @throws GetAutomlPredictionShapHttpError
194
+ */
195
+ getAutomlPredictionShap: typeof getAutomlPredictionShap;
196
+ /**
197
+ * Returns a file containing the source values and an index field that are associated with a prediction ID.
198
+ *
199
+ * @param predictionId The ID of the prediction configuration object that provides parameters to be applied when the prediction is produced.
200
+ * @param query an object with query parameters
201
+ * @throws GetAutomlPredictionSourceHttpError
202
+ */
203
+ getAutomlPredictionSource: typeof getAutomlPredictionSource;
204
+ /**
205
+ * Clears the cache for automl-predictions api requests.
206
+ */
207
+ clearCache: typeof clearCache;
208
+ }
209
+ /**
210
+ * Functions for the automl-predictions api
211
+ */
212
+ declare const automlPredictionsExport: AutomlPredictionsAPI;
213
+
214
+ export { type AppErrorResponse, type AutomlPredictionsAPI, type CreateAutomlPredictionJobHttpError, type CreateAutomlPredictionJobHttpResponse, type Error, type GetAutomlPredictionCoordinateShapHttpError, type GetAutomlPredictionCoordinateShapHttpResponse, type GetAutomlPredictionNotPredictedReasonsHttpError, type GetAutomlPredictionNotPredictedReasonsHttpResponse, type GetAutomlPredictionPredictionsHttpError, type GetAutomlPredictionPredictionsHttpResponse, type GetAutomlPredictionShapHttpError, type GetAutomlPredictionShapHttpResponse, type GetAutomlPredictionSourceHttpError, type GetAutomlPredictionSourceHttpResponse, clearCache, createAutomlPredictionJob, automlPredictionsExport as default, getAutomlPredictionCoordinateShap, getAutomlPredictionNotPredictedReasons, getAutomlPredictionPredictions, getAutomlPredictionShap, getAutomlPredictionSource };
@@ -0,0 +1,72 @@
1
+ import {
2
+ clearApiCache,
3
+ invokeFetch
4
+ } from "./chunks/VVD2DPKQ.js";
5
+ import "./chunks/LTNGXTXG.js";
6
+ import "./chunks/2ZQ3ZX7F.js";
7
+
8
+ // src/public/rest/automl-predictions.ts
9
+ var getAutomlPredictionCoordinateShap = async (predictionId, query, options) => invokeFetch("automl-predictions", {
10
+ method: "get",
11
+ pathTemplate: "/api/v1/automl-predictions/{predictionId}/coordinate-shap",
12
+ pathVariables: { predictionId },
13
+ query,
14
+ options
15
+ });
16
+ var createAutomlPredictionJob = async (predictionId, options) => invokeFetch("automl-predictions", {
17
+ method: "post",
18
+ pathTemplate: "/api/v1/automl-predictions/{predictionId}/jobs",
19
+ pathVariables: { predictionId },
20
+ options
21
+ });
22
+ var getAutomlPredictionNotPredictedReasons = async (predictionId, query, options) => invokeFetch("automl-predictions", {
23
+ method: "get",
24
+ pathTemplate: "/api/v1/automl-predictions/{predictionId}/not-predicted-reasons",
25
+ pathVariables: { predictionId },
26
+ query,
27
+ options
28
+ });
29
+ var getAutomlPredictionPredictions = async (predictionId, query, options) => invokeFetch("automl-predictions", {
30
+ method: "get",
31
+ pathTemplate: "/api/v1/automl-predictions/{predictionId}/predictions",
32
+ pathVariables: { predictionId },
33
+ query,
34
+ options
35
+ });
36
+ var getAutomlPredictionShap = async (predictionId, query, options) => invokeFetch("automl-predictions", {
37
+ method: "get",
38
+ pathTemplate: "/api/v1/automl-predictions/{predictionId}/shap",
39
+ pathVariables: { predictionId },
40
+ query,
41
+ options
42
+ });
43
+ var getAutomlPredictionSource = async (predictionId, query, options) => invokeFetch("automl-predictions", {
44
+ method: "get",
45
+ pathTemplate: "/api/v1/automl-predictions/{predictionId}/source",
46
+ pathVariables: { predictionId },
47
+ query,
48
+ options
49
+ });
50
+ function clearCache() {
51
+ return clearApiCache("automl-predictions");
52
+ }
53
+ var automlPredictionsExport = {
54
+ getAutomlPredictionCoordinateShap,
55
+ createAutomlPredictionJob,
56
+ getAutomlPredictionNotPredictedReasons,
57
+ getAutomlPredictionPredictions,
58
+ getAutomlPredictionShap,
59
+ getAutomlPredictionSource,
60
+ clearCache
61
+ };
62
+ var automl_predictions_default = automlPredictionsExport;
63
+ export {
64
+ clearCache,
65
+ createAutomlPredictionJob,
66
+ automl_predictions_default as default,
67
+ getAutomlPredictionCoordinateShap,
68
+ getAutomlPredictionNotPredictedReasons,
69
+ getAutomlPredictionPredictions,
70
+ getAutomlPredictionShap,
71
+ getAutomlPredictionSource
72
+ };
package/brands.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as ApiCallOptions, D as DownloadableBlob } from './invoke-fetch-types-BXn-uSF5.js';
2
- import './auth-types-PkN9CAF_.js';
1
+ import { A as ApiCallOptions, D as DownloadableBlob } from './invoke-fetch-types-Cq7bjkqn.js';
2
+ import './auth-types-DqfMuSRX.js';
3
3
 
4
4
  /**
5
5
  * A brand is a collection of assets for applying custom branding. Only a single brand can be active in a tenant.
package/brands.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearApiCache,
3
3
  invokeFetch
4
- } from "./chunks/PTDXR7AY.js";
5
- import "./chunks/TXC5XORK.js";
4
+ } from "./chunks/VVD2DPKQ.js";
5
+ import "./chunks/LTNGXTXG.js";
6
6
  import "./chunks/2ZQ3ZX7F.js";
7
7
 
8
8
  // src/public/rest/brands.ts
@@ -5,7 +5,7 @@ import {
5
5
  invokeFetch,
6
6
  invoke_fetch_default,
7
7
  parseFetchResponse
8
- } from "./G6QUM5WQ.js";
8
+ } from "./FKDGGR2O.js";
9
9
  import "./3RGGGGAR.js";
10
10
  import "./2ZQ3ZX7F.js";
11
11
  export {
@@ -0,0 +1,61 @@
1
+ // src/qix/session/websocket-errors.ts
2
+ var closeCodeEngineTerminating = 4003;
3
+ var closeCodeEngineProxyGeneric = 4200;
4
+ var closeCodeClientTimeout = 4201;
5
+ var closeCodeBadRequest = 4202;
6
+ var closeCodePermissions = 4203;
7
+ var closeCodeNotFound = 4204;
8
+ var closeCodeTooManyRequests = 4205;
9
+ var closeCodeNetwork = 4206;
10
+ var closeCodeDependencyGeneric = 4210;
11
+ var closeCodeDependencyUnavailable = 4211;
12
+ var closeCodeEngineGeneric = 4220;
13
+ var closeCodeEntitlement = 4230;
14
+ var closeCodeNoEnginesAvailable = 4240;
15
+ var CloseCodeSessionReservationMissing = 4222;
16
+ var closeCodeMessages = {
17
+ 1e3: "Connection closed normally.",
18
+ 1001: "Going away.",
19
+ 1002: "Protocol error.",
20
+ 1003: "Unsupported data.",
21
+ 1005: "No status received.",
22
+ 1006: "Abnormal closure.",
23
+ 1007: "Invalid frame payload data.",
24
+ 1008: "Policy violation.",
25
+ 1009: "Message too big.",
26
+ 1010: "Mandatory extension missing.",
27
+ 1011: "Server internal error.",
28
+ 1012: "Service restart.",
29
+ 1013: "Try again later.",
30
+ 1014: "Bad gateway.",
31
+ 1015: "TLS handshake failure.",
32
+ [closeCodeEngineTerminating]: "The engine is in terminating state",
33
+ [closeCodeEngineProxyGeneric]: "A problem occurred in engine-proxy",
34
+ [closeCodeClientTimeout]: "The client has closed the connection",
35
+ [closeCodeBadRequest]: "The provided request is invalid and/or malformed",
36
+ [closeCodePermissions]: "No permission to open the app",
37
+ [closeCodeNotFound]: "App not found",
38
+ [closeCodeTooManyRequests]: "Too many requests have been sent in a given amount of time",
39
+ [closeCodeNetwork]: "Networking issues",
40
+ [closeCodeDependencyGeneric]: "A problem occurred in a dependency of engine-proxy",
41
+ [closeCodeDependencyUnavailable]: "A dependency is unavailable and not serving any requests",
42
+ [closeCodeEngineGeneric]: "A problem occurred in an engine",
43
+ [closeCodeEntitlement]: "You are not entitled to perform that operation",
44
+ [closeCodeNoEnginesAvailable]: "There are currently no engines available",
45
+ [CloseCodeSessionReservationMissing]: "The reserved session is missing"
46
+ };
47
+ var uknownCloseErrorMessage = "websocket closed for unknown reason";
48
+ function getHumanReadableSocketClosedErrorMessage(err, { appId, hostConfig }) {
49
+ const closeCode = err?.original?.code || err?.code;
50
+ const reason = err?.original?.reason || err?.reason;
51
+ const closeMessage = closeCode && closeCodeMessages[closeCode] || reason || err.message || uknownCloseErrorMessage;
52
+ if (hostConfig?.host) {
53
+ return `Failed to open app ${appId} on ${hostConfig?.host}: ${closeMessage}`;
54
+ } else {
55
+ return `Failed to open app ${appId}: ${closeMessage}`;
56
+ }
57
+ }
58
+
59
+ export {
60
+ getHumanReadableSocketClosedErrorMessage
61
+ };