@uipath/agent-tool 1.202.1 → 1.203.0-preview.180

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.
@@ -0,0 +1,262 @@
1
+ // ../../node_modules/@uipath/resource-builder-sdk/dist/clients/generated/first-party-service.js
2
+ var first_party_service_DeploymentAction = /* @__PURE__ */ function(DeploymentAction) {
3
+ DeploymentAction["Install"] = "Install";
4
+ DeploymentAction["Link"] = "Link";
5
+ DeploymentAction["Uninstall"] = "Uninstall";
6
+ DeploymentAction["Unlink"] = "Unlink";
7
+ DeploymentAction["Merge"] = "Merge";
8
+ DeploymentAction["UseExisting"] = "UseExisting";
9
+ DeploymentAction["Activate"] = "Activate";
10
+ return DeploymentAction;
11
+ }({});
12
+ var first_party_service_SolutionDeploymentAction = /* @__PURE__ */ function(SolutionDeploymentAction) {
13
+ SolutionDeploymentAction["Install"] = "Install";
14
+ SolutionDeploymentAction["Uninstall"] = "Uninstall";
15
+ SolutionDeploymentAction["Upgrade"] = "Upgrade";
16
+ SolutionDeploymentAction["Rollback"] = "Rollback";
17
+ SolutionDeploymentAction["Activate"] = "Activate";
18
+ return SolutionDeploymentAction;
19
+ }({});
20
+ var first_party_service_SolutionStatus = /* @__PURE__ */ function(SolutionStatus) {
21
+ SolutionStatus["Installed"] = "Installed";
22
+ SolutionStatus["Uninstalled"] = "Uninstalled";
23
+ SolutionStatus["Installing"] = "Installing";
24
+ SolutionStatus["Uninstalling"] = "Uninstalling";
25
+ SolutionStatus["InstallError"] = "InstallError";
26
+ SolutionStatus["UninstallError"] = "UninstallError";
27
+ SolutionStatus["Unknown"] = "Unknown";
28
+ return SolutionStatus;
29
+ }({});
30
+ var first_party_service_QueryOptions = /* @__PURE__ */ function(QueryOptions) {
31
+ QueryOptions["Contains"] = "Contains";
32
+ QueryOptions["Equals"] = "Equals";
33
+ return QueryOptions;
34
+ }({});
35
+ var first_party_service_DeploymentResourceValidationErrorLevel = /* @__PURE__ */ function(DeploymentResourceValidationErrorLevel) {
36
+ DeploymentResourceValidationErrorLevel["Error"] = "Error";
37
+ DeploymentResourceValidationErrorLevel["Warning"] = "Warning";
38
+ DeploymentResourceValidationErrorLevel["Info"] = "Info";
39
+ return DeploymentResourceValidationErrorLevel;
40
+ }({});
41
+ var first_party_service_DeploymentResourceValidationErrorKind = /* @__PURE__ */ function(DeploymentResourceValidationErrorKind) {
42
+ DeploymentResourceValidationErrorKind["Conflict"] = "Conflict";
43
+ DeploymentResourceValidationErrorKind["ConfigurationError"] = "ConfigurationError";
44
+ return DeploymentResourceValidationErrorKind;
45
+ }({});
46
+ var first_party_service_DeploymentResourceValidationAction = /* @__PURE__ */ function(DeploymentResourceValidationAction) {
47
+ DeploymentResourceValidationAction["RenameExisting"] = "RenameExisting";
48
+ DeploymentResourceValidationAction["RenameInSolution"] = "RenameInSolution";
49
+ DeploymentResourceValidationAction["UseExisting"] = "UseExisting";
50
+ DeploymentResourceValidationAction["FixConfiguration"] = "FixConfiguration";
51
+ DeploymentResourceValidationAction["Delete"] = "Delete";
52
+ DeploymentResourceValidationAction["SkipDelete"] = "SkipDelete";
53
+ DeploymentResourceValidationAction["MergeConfiguration"] = "MergeConfiguration";
54
+ DeploymentResourceValidationAction["Replace"] = "Replace";
55
+ return DeploymentResourceValidationAction;
56
+ }({});
57
+ var first_party_service_ContentType = /* @__PURE__ */ function(ContentType) {
58
+ ContentType["Json"] = "application/json";
59
+ ContentType["JsonApi"] = "application/vnd.api+json";
60
+ ContentType["FormData"] = "multipart/form-data";
61
+ ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
62
+ ContentType["Text"] = "text/plain";
63
+ return ContentType;
64
+ }({});
65
+
66
+ class HttpClient {
67
+ encodeQueryParam(key, value) {
68
+ const encodedKey = encodeURIComponent(key);
69
+ return `${encodedKey}=${encodeURIComponent(typeof value == "number" ? value : `${value}`)}`;
70
+ }
71
+ addQueryParam(query, key) {
72
+ return this.encodeQueryParam(key, query[key]);
73
+ }
74
+ addArrayQueryParam(query, key) {
75
+ const value = query[key];
76
+ return value.map((v) => this.encodeQueryParam(key, v)).join("&");
77
+ }
78
+ toQueryString(rawQuery) {
79
+ const query = rawQuery || {};
80
+ const keys = Object.keys(query).filter((key) => query[key] !== undefined);
81
+ return keys.map((key) => Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)).join("&");
82
+ }
83
+ addQueryParams(rawQuery) {
84
+ const queryString = this.toQueryString(rawQuery);
85
+ return queryString ? `?${queryString}` : "";
86
+ }
87
+ mergeRequestParams(params1, params2) {
88
+ return {
89
+ ...this.baseApiParams,
90
+ ...params1,
91
+ ...params2 || {},
92
+ headers: {
93
+ ...this.baseApiParams.headers || {},
94
+ ...params1.headers || {},
95
+ ...params2 && params2.headers || {}
96
+ }
97
+ };
98
+ }
99
+ constructor(apiConfig = {}) {
100
+ this.baseUrl = "https://localhost:7008";
101
+ this.securityData = null;
102
+ this.abortControllers = new Map;
103
+ this.customFetch = (...fetchParams) => fetch(...fetchParams);
104
+ this.baseApiParams = {
105
+ credentials: "same-origin",
106
+ headers: {},
107
+ redirect: "follow",
108
+ referrerPolicy: "no-referrer"
109
+ };
110
+ this.setSecurityData = (data) => {
111
+ this.securityData = data;
112
+ };
113
+ this.contentFormatters = {
114
+ ["application/json"]: (input) => input !== null && (typeof input == "object" || typeof input == "string") ? JSON.stringify(input) : input,
115
+ ["application/vnd.api+json"]: (input) => input !== null && (typeof input == "object" || typeof input == "string") ? JSON.stringify(input) : input,
116
+ ["text/plain"]: (input) => input !== null && typeof input != "string" ? JSON.stringify(input) : input,
117
+ ["multipart/form-data"]: (input) => {
118
+ if (input instanceof FormData)
119
+ return input;
120
+ return Object.keys(input || {}).reduce((formData, key) => {
121
+ const property = input[key];
122
+ formData.append(key, property instanceof Blob ? property : typeof property == "object" && property !== null ? JSON.stringify(property) : `${property}`);
123
+ return formData;
124
+ }, new FormData);
125
+ },
126
+ ["application/x-www-form-urlencoded"]: (input) => this.toQueryString(input)
127
+ };
128
+ this.createAbortSignal = (cancelToken) => {
129
+ if (this.abortControllers.has(cancelToken)) {
130
+ const abortController2 = this.abortControllers.get(cancelToken);
131
+ if (abortController2)
132
+ return abortController2.signal;
133
+ return;
134
+ }
135
+ const abortController = new AbortController;
136
+ this.abortControllers.set(cancelToken, abortController);
137
+ return abortController.signal;
138
+ };
139
+ this.abortRequest = (cancelToken) => {
140
+ const abortController = this.abortControllers.get(cancelToken);
141
+ if (abortController) {
142
+ abortController.abort();
143
+ this.abortControllers.delete(cancelToken);
144
+ }
145
+ };
146
+ this.request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {
147
+ const secureParams = (typeof secure == "boolean" ? secure : this.baseApiParams.secure) && this.securityWorker && await this.securityWorker(this.securityData) || {};
148
+ const requestParams = this.mergeRequestParams(params, secureParams);
149
+ const queryString = query && this.toQueryString(query);
150
+ const payloadFormatter = this.contentFormatters[type || "application/json"];
151
+ const responseFormat = format || requestParams.format;
152
+ return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
153
+ ...requestParams,
154
+ headers: {
155
+ ...requestParams.headers || {},
156
+ ...type && type !== "multipart/form-data" ? {
157
+ "Content-Type": type
158
+ } : {}
159
+ },
160
+ signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
161
+ body: body == null ? null : payloadFormatter(body)
162
+ }).then(async (response) => {
163
+ const r = response;
164
+ r.data = null;
165
+ r.error = null;
166
+ const responseToParse = responseFormat ? response.clone() : response;
167
+ const data = responseFormat ? await responseToParse[responseFormat]().then((data2) => {
168
+ if (r.ok)
169
+ r.data = data2;
170
+ else
171
+ r.error = data2;
172
+ return r;
173
+ }).catch((e) => {
174
+ r.error = e;
175
+ return r;
176
+ }) : r;
177
+ if (cancelToken)
178
+ this.abortControllers.delete(cancelToken);
179
+ if (!response.ok)
180
+ throw data;
181
+ return data.data;
182
+ });
183
+ };
184
+ Object.assign(this, apiConfig);
185
+ }
186
+ }
187
+
188
+ class FirstPartyServiceApi extends HttpClient {
189
+ constructor(...args) {
190
+ super(...args), this.v2 = {
191
+ automationSolutionsGetMetadata: (params = {}) => this.request({
192
+ path: "/v2/automationsolutions/metadata",
193
+ method: "GET",
194
+ ...params
195
+ }),
196
+ automationSolutionsHeadMetadata: (params = {}) => this.request({
197
+ path: "/v2/automationsolutions/metadata",
198
+ method: "HEAD",
199
+ ...params
200
+ }),
201
+ automationSolutionsSetState: (data, query, params = {}) => this.request({
202
+ path: "/v2/automationsolutions",
203
+ method: "PATCH",
204
+ query,
205
+ body: data,
206
+ type: "application/json",
207
+ ...params
208
+ }),
209
+ automationSolutionsInstall: (data, query, params = {}) => this.request({
210
+ path: "/v2/automationsolutions",
211
+ method: "PUT",
212
+ query,
213
+ body: data,
214
+ format: "json",
215
+ ...params
216
+ }),
217
+ automationSolutionsUninstall: (data, query, params = {}) => this.request({
218
+ path: "/v2/automationsolutions",
219
+ method: "DELETE",
220
+ query,
221
+ body: data,
222
+ type: "application/json",
223
+ format: "json",
224
+ ...params
225
+ }),
226
+ automationSolutionsExport: (data, params = {}) => this.request({
227
+ path: "/v2/automationsolutions/export",
228
+ method: "POST",
229
+ body: data,
230
+ type: "application/json",
231
+ format: "json",
232
+ ...params
233
+ }),
234
+ automationSolutionsGetTranslations: (query, params = {}) => this.request({
235
+ path: "/v2/automationsolutions/translations",
236
+ method: "GET",
237
+ query,
238
+ format: "json",
239
+ ...params
240
+ }),
241
+ automationSolutionsValidate: (data, query, params = {}) => this.request({
242
+ path: "/v2/automationsolutions/validate",
243
+ method: "POST",
244
+ query,
245
+ body: data,
246
+ type: "application/json",
247
+ format: "json",
248
+ ...params
249
+ }),
250
+ automationSolutionsLookup: (query, params = {}) => this.request({
251
+ path: "/v2/automationsolutions/lookup",
252
+ method: "GET",
253
+ query,
254
+ format: "json",
255
+ ...params
256
+ })
257
+ };
258
+ }
259
+ }
260
+ export { first_party_service_DeploymentAction, first_party_service_SolutionDeploymentAction, first_party_service_SolutionStatus, first_party_service_QueryOptions, first_party_service_DeploymentResourceValidationErrorLevel, first_party_service_DeploymentResourceValidationErrorKind, first_party_service_DeploymentResourceValidationAction, first_party_service_ContentType, HttpClient, FirstPartyServiceApi };
261
+
262
+ //# debugId=AC88CC622210E15664756E2164756E21
@@ -0,0 +1,342 @@
1
+ // ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/json-serializer-names.js
2
+ var JsonSerializerNames = {
3
+ DefaultCaseInsensitive: "DefaultCaseInsensitive",
4
+ CaseInsensitive: "CaseInsensitive",
5
+ Indented: "Indented",
6
+ CamelCase: "CamelCase",
7
+ CaseInsensitiveIndented: "CaseInsensitiveIndented",
8
+ IndentedIgnoreNull: "IndentedIgnoreNull",
9
+ PreservePropertyNames: "PreservePropertyNames",
10
+ CamelCaseIndented: "CamelCaseIndented",
11
+ AllNames: [
12
+ "DefaultCaseInsensitive",
13
+ "CaseInsensitive",
14
+ "Indented",
15
+ "CamelCase",
16
+ "CaseInsensitiveIndented",
17
+ "IndentedIgnoreNull",
18
+ "PreservePropertyNames",
19
+ "CamelCaseIndented"
20
+ ]
21
+ };
22
+
23
+ // ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/json-serializer.js
24
+ class JsonSerializer {
25
+ serialize(value) {
26
+ if (value == null)
27
+ return null;
28
+ let toSerialize = value;
29
+ if (this.options.ignoreNull)
30
+ toSerialize = this.removeNullValues(value);
31
+ if (this.options.camelCase && !this.options.preservePropertyNames)
32
+ toSerialize = this.toCamelCase(toSerialize);
33
+ if (this.options.enumCamelCase !== false)
34
+ toSerialize = this.convertEnumValuesToCamelCase(toSerialize);
35
+ const json = JSON.stringify(toSerialize, null, this.options.indented ? 2 : undefined);
36
+ return json;
37
+ }
38
+ async serializeAsync(stream, value, cancellationToken) {
39
+ cancellationToken?.throwIfAborted?.();
40
+ const json = this.serialize(value);
41
+ if (json === null)
42
+ return;
43
+ const writer = stream.getWriter();
44
+ try {
45
+ const bytes = this.encoder.encode(json);
46
+ await writer.write(bytes);
47
+ } finally {
48
+ writer.releaseLock();
49
+ }
50
+ }
51
+ serializeToUtf8Bytes(value) {
52
+ const json = this.serialize(value);
53
+ if (json === null)
54
+ return new Uint8Array(0);
55
+ return this.encoder.encode(json);
56
+ }
57
+ deserialize(value) {
58
+ if (value == null || value === "")
59
+ return null;
60
+ try {
61
+ let cleanValue = value.charCodeAt(0) === 65279 ? value.slice(1) : value;
62
+ if (cleanValue.charCodeAt(cleanValue.length - 1) === 26)
63
+ cleanValue = cleanValue.slice(0, -1);
64
+ const parsed = JSON.parse(cleanValue);
65
+ return parsed;
66
+ } catch {
67
+ return null;
68
+ }
69
+ }
70
+ deserializeAsType(value, _type) {
71
+ return this.deserialize(value);
72
+ }
73
+ removeNullValues(obj) {
74
+ if (obj == null)
75
+ return obj;
76
+ if (Array.isArray(obj))
77
+ return obj.map((item) => this.removeNullValues(item));
78
+ if (typeof obj == "object") {
79
+ const result = {};
80
+ for (const [key, val] of Object.entries(obj))
81
+ if (val != null)
82
+ result[key] = this.removeNullValues(val);
83
+ return result;
84
+ }
85
+ return obj;
86
+ }
87
+ toCamelCase(obj) {
88
+ if (obj == null)
89
+ return obj;
90
+ if (Array.isArray(obj))
91
+ return obj.map((item) => this.toCamelCase(item));
92
+ if (typeof obj == "object") {
93
+ const result = {};
94
+ for (const [key, val] of Object.entries(obj)) {
95
+ const camelKey = key.charAt(0).toLowerCase() + key.slice(1);
96
+ result[camelKey] = this.toCamelCase(val);
97
+ }
98
+ return result;
99
+ }
100
+ return obj;
101
+ }
102
+ convertEnumValuesToCamelCase(obj, className) {
103
+ if (obj == null)
104
+ return obj;
105
+ if (typeof obj == "string")
106
+ return this.tryConvertEnumStringToCamelCase(obj, undefined, undefined);
107
+ if (Array.isArray(obj))
108
+ return obj.map((item) => this.convertEnumValuesToCamelCase(item, className));
109
+ if (typeof obj == "object") {
110
+ const result = {};
111
+ const currentClassName = obj.constructor?.name !== "Object" ? obj.constructor.name : className;
112
+ for (const [key, val] of Object.entries(obj))
113
+ if (typeof val == "string")
114
+ result[key] = this.tryConvertEnumStringToCamelCase(val, currentClassName, key);
115
+ else if (Array.isArray(val))
116
+ result[key] = val.map((item) => {
117
+ if (typeof item == "string")
118
+ return this.tryConvertEnumStringToCamelCase(item, currentClassName, key);
119
+ return this.convertEnumValuesToCamelCase(item, currentClassName);
120
+ });
121
+ else
122
+ result[key] = this.convertEnumValuesToCamelCase(val, currentClassName);
123
+ return result;
124
+ }
125
+ return obj;
126
+ }
127
+ tryConvertEnumStringToCamelCase(value, className, propertyName) {
128
+ if (this.camelCaseEnumProperties.size > 0) {
129
+ if (!propertyName || !this.isKnownCamelCaseEnum(className, propertyName))
130
+ return value;
131
+ } else if (propertyName && this.isInPropertySet(this.pascalCaseEnumProperties, className, propertyName))
132
+ return value;
133
+ if (/^[A-Z][a-zA-Z0-9]*$/.test(value))
134
+ return value.charAt(0).toLowerCase() + value.slice(1);
135
+ return value;
136
+ }
137
+ isKnownCamelCaseEnum(className, propertyName) {
138
+ if (this.isInPropertySet(this.pascalCaseEnumProperties, className, propertyName))
139
+ return false;
140
+ return this.isInPropertySet(this.camelCaseEnumProperties, className, propertyName);
141
+ }
142
+ isInPropertySet(propertySet, className, propertyName) {
143
+ if (className && propertySet.has(`${className}.${propertyName}`))
144
+ return true;
145
+ return propertySet.has(propertyName);
146
+ }
147
+ constructor(options = {}) {
148
+ this.isContextBased = false;
149
+ this.encoder = new TextEncoder;
150
+ this.options = options;
151
+ this.camelCaseEnumProperties = new Set(options.camelCaseEnumProperties ?? []);
152
+ this.pascalCaseEnumProperties = new Set(options.pascalCaseEnumProperties ?? []);
153
+ }
154
+ }
155
+
156
+ // ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/pascal-case-enum-properties.js
157
+ var CAMEL_CASE_ENUM_PROPERTIES = [
158
+ "scope",
159
+ "replaceOption",
160
+ "lookupStrategy",
161
+ "folderType"
162
+ ];
163
+ var SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES = [
164
+ "propertyCategory"
165
+ ];
166
+ var RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES = [
167
+ "ValidationState.errorSeverity",
168
+ "ValidationState.errorType",
169
+ "AddOrUpdateResourceToSolutionResponse.status",
170
+ "Overwrite.type",
171
+ "OverwriteValidationError.severity",
172
+ "ProjectResourceDescriptor.provisionType"
173
+ ];
174
+ var PASCAL_CASE_ENUM_PROPERTIES = [
175
+ ...SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES,
176
+ ...RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES
177
+ ];
178
+
179
+ // ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/json-serializer-factory.js
180
+ class JsonSerializerFactory {
181
+ get() {
182
+ return this.defaultSerializer;
183
+ }
184
+ getByName(name) {
185
+ if (!name)
186
+ return this.defaultSerializer;
187
+ let serializer = this.namedSerializers.get(name);
188
+ if (!serializer) {
189
+ serializer = this.createNamedSerializer(name);
190
+ this.namedSerializers.set(name, serializer);
191
+ }
192
+ return serializer;
193
+ }
194
+ initializePredefinedSerializers() {
195
+ for (const name of JsonSerializerNames.AllNames)
196
+ this.namedSerializers.set(name, this.createNamedSerializer(name));
197
+ }
198
+ createNamedSerializer(name) {
199
+ const options = this.createOptionsForName(name);
200
+ return new JsonSerializer(options);
201
+ }
202
+ createOptionsForName(name) {
203
+ const options = {
204
+ ...this.baseOptions
205
+ };
206
+ switch (name) {
207
+ case JsonSerializerNames.DefaultCaseInsensitive:
208
+ return {
209
+ caseInsensitive: true
210
+ };
211
+ case JsonSerializerNames.CaseInsensitive:
212
+ options.caseInsensitive = true;
213
+ break;
214
+ case JsonSerializerNames.Indented:
215
+ options.indented = true;
216
+ break;
217
+ case JsonSerializerNames.CamelCase:
218
+ options.camelCase = true;
219
+ break;
220
+ case JsonSerializerNames.CaseInsensitiveIndented:
221
+ options.caseInsensitive = true;
222
+ options.indented = true;
223
+ break;
224
+ case JsonSerializerNames.IndentedIgnoreNull:
225
+ options.indented = true;
226
+ options.ignoreNull = true;
227
+ break;
228
+ case JsonSerializerNames.PreservePropertyNames:
229
+ options.preservePropertyNames = true;
230
+ options.camelCase = false;
231
+ break;
232
+ case JsonSerializerNames.CamelCaseIndented:
233
+ options.indented = true;
234
+ options.camelCase = true;
235
+ options.ignoreNull = true;
236
+ break;
237
+ default:
238
+ break;
239
+ }
240
+ return options;
241
+ }
242
+ constructor(options) {
243
+ const defaults = {
244
+ camelCase: true,
245
+ enumCamelCase: true,
246
+ camelCaseEnumProperties: CAMEL_CASE_ENUM_PROPERTIES,
247
+ pascalCaseEnumProperties: PASCAL_CASE_ENUM_PROPERTIES
248
+ };
249
+ this.baseOptions = options ? {
250
+ ...defaults,
251
+ ...options
252
+ } : defaults;
253
+ this.defaultSerializer = new JsonSerializer(this.baseOptions);
254
+ this.namedSerializers = new Map;
255
+ this.initializePredefinedSerializers();
256
+ }
257
+ }
258
+
259
+ // ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/serializer-proxy.js
260
+ class JsonSerializerProxy {
261
+ serialize(value) {
262
+ return this.jsonSerializer.serialize(value);
263
+ }
264
+ serializeAsync(stream, value, cancellationToken) {
265
+ return this.jsonSerializer.serializeAsync(stream, value, cancellationToken);
266
+ }
267
+ serializeToUtf8Bytes(value) {
268
+ return this.jsonSerializer.serializeToUtf8Bytes(value);
269
+ }
270
+ deserialize(value) {
271
+ return this.jsonSerializer.deserialize(value);
272
+ }
273
+ tryDeserializeObject(json) {
274
+ if (!json || json.trim() === "")
275
+ return null;
276
+ try {
277
+ return this.jsonSerializer.isContextBased ? this.jsonSerializer.deserialize(json) : this.caseInsensitiveSerializer.deserialize(json);
278
+ } catch (ex) {
279
+ this.logger.info("Deserialization failed with exception.", ex);
280
+ return null;
281
+ }
282
+ }
283
+ tryDeserialize(value) {
284
+ if (!value || value.trim() === "")
285
+ return [
286
+ false,
287
+ null
288
+ ];
289
+ try {
290
+ const result = this.jsonSerializer.deserialize(value);
291
+ return [
292
+ true,
293
+ result
294
+ ];
295
+ } catch (ex) {
296
+ this.logger.info("Deserialization failed with exception.", ex);
297
+ return [
298
+ false,
299
+ null
300
+ ];
301
+ }
302
+ }
303
+ constructor(jsonSerializerFactory, loggerFactory) {
304
+ this.jsonSerializer = jsonSerializerFactory.get();
305
+ this.caseInsensitiveSerializer = jsonSerializerFactory.getByName(JsonSerializerNames.CaseInsensitive);
306
+ this.logger = loggerFactory.create("JsonSerializerProxy");
307
+ }
308
+ }
309
+
310
+ // ../../node_modules/@uipath/resource-builder-sdk/dist/serialization/stream-serializer.js
311
+ class StreamSerializer {
312
+ async serializeAsync(data, cancellationToken) {
313
+ cancellationToken?.throwIfAborted?.();
314
+ const serializer = this.jsonSerializerFactory.getByName(JsonSerializerNames.PreservePropertyNames);
315
+ const serializedContent = serializer.serialize(data);
316
+ const encoder = new TextEncoder;
317
+ const bytes = serializedContent ? encoder.encode(serializedContent) : new Uint8Array(0);
318
+ let streamClosed = false;
319
+ const stream = new ReadableStream({
320
+ start(controller) {
321
+ controller.enqueue(bytes);
322
+ controller.close();
323
+ streamClosed = true;
324
+ }
325
+ });
326
+ const disposeStream = this.disposeStream;
327
+ return {
328
+ stream,
329
+ dispose() {
330
+ if (disposeStream && !streamClosed)
331
+ stream.cancel().catch(() => {});
332
+ }
333
+ };
334
+ }
335
+ constructor(jsonSerializerFactory, disposeStream = true) {
336
+ this.jsonSerializerFactory = jsonSerializerFactory;
337
+ this.disposeStream = disposeStream;
338
+ }
339
+ }
340
+ export { JsonSerializerNames, JsonSerializer, CAMEL_CASE_ENUM_PROPERTIES, SHARED_CORE_ABSTRACTIONS_PASCAL_CASE_PROPERTIES, RESOURCE_BUILDER_PASCAL_CASE_PROPERTIES, PASCAL_CASE_ENUM_PROPERTIES, JsonSerializerFactory, JsonSerializerProxy, StreamSerializer };
341
+
342
+ //# debugId=B9E68BD7718EF2DB64756E2164756E21