@zuplo/runtime 5.1812.0 → 5.1814.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.
package/index.d.ts CHANGED
@@ -4151,6 +4151,23 @@ export declare interface VersionData {
4151
4151
 
4152
4152
  declare interface VMWareLogInsightLoggingOptions {
4153
4153
  url: string;
4154
+ /**
4155
+ * An array of string tuples to replace within the text field of a log entry.
4156
+ * @example
4157
+ * ```
4158
+ * [
4159
+ * ["'", ""],
4160
+ * ['"', ""],
4161
+ * ["\\n", ""],
4162
+ * ["\\", ""],
4163
+ * ["*", ""],
4164
+ * ["&", ""],
4165
+ * [":", "="],
4166
+ * ]
4167
+ * ```
4168
+ */
4169
+ textReplacements?: [string, string][];
4170
+ agentId?: string;
4154
4171
  fields?: Record<string, string | number | boolean>;
4155
4172
  onMessageSending?: (event: LogInsightLogEntry) => LogInsightLogEntry;
4156
4173
  }
@@ -4184,9 +4201,12 @@ export declare function webSocketHandler(request: ZuploRequest, context: ZuploCo
4184
4201
  export declare function webSocketPipelineHandler(request: ZuploRequest, context: ZuploContext): Promise<Response>;
4185
4202
 
4186
4203
  /**
4187
- * Parses XML and converts it to JSON
4204
+ * Parses XML and converts it to JSON. This policy is useful for converting
4205
+ * legacy XML or SOAP APIs into modern REST APIs. It can be useful to add a
4206
+ * custom outbound policy that runs after this policy to further transform the
4207
+ * raw converted content into something more user friendly.
4188
4208
  *
4189
- * @title Xml to JSON Outbound
4209
+ * @title XML to JSON Outbound
4190
4210
  * @public
4191
4211
  * @param request - The ZuploRequest
4192
4212
  * @param context - The ZuploContext
@@ -4194,12 +4214,53 @@ export declare function webSocketPipelineHandler(request: ZuploRequest, context:
4194
4214
  * @param policyName - The name of the policy as set in policies.json
4195
4215
  * @returns A Request or a Response
4196
4216
  */
4197
- export declare const XmlToJsonOutboundPolicy: OutboundPolicyHandler<XmlToJsonPolicyOptions>;
4217
+ export declare class XmlToJsonOutboundPolicy extends OutboundPolicy<XmlToJsonPolicyOptions> {
4218
+ private parser;
4219
+ private parseOnStatusCodes;
4220
+ constructor(options: XmlToJsonPolicyOptions, policyName: string);
4221
+ handler(response: Response, request: ZuploRequest, context: ZuploContext): Promise<Response>;
4222
+ }
4198
4223
 
4199
4224
  /**
4200
4225
  * The options for this policy.
4201
4226
  */
4202
4227
  export declare interface XmlToJsonPolicyOptions {
4228
+ /**
4229
+ * Remove namespace string from tag and attribute names.
4230
+ */
4231
+ removeNSPrefix?: boolean;
4232
+ /**
4233
+ * Ignore processing instruction tags. i.e. <?elementnames <fred>, <bert>, <harry> ?>
4234
+ */
4235
+ ignoreProcessingInstructions?: boolean;
4236
+ /**
4237
+ * Ignore declarations. i.e. <?xml version="1.0"?>
4238
+ */
4239
+ ignoreDeclarations?: boolean;
4240
+ /**
4241
+ * Ignore tag attributes.
4242
+ */
4243
+ ignoreAttributes?: boolean;
4244
+ /**
4245
+ * At particular point, if you don't want to parse a tag and it's nested tags then you can set their path in stopNodes. You can also set tags which should not be processed irrespective of their path using * as the wildcard.
4246
+ */
4247
+ stopNodes?: string[];
4248
+ /**
4249
+ * The prefix of attribute names in the resulting JS object
4250
+ */
4251
+ attributeNamePrefix?: string;
4252
+ /**
4253
+ * Text value of a tag is parsed to #text property by default.
4254
+ */
4255
+ textNodeName?: string;
4256
+ /**
4257
+ * Remove surrounding whitespace from tag or attribute value.
4258
+ */
4259
+ trimValues?: boolean;
4260
+ /**
4261
+ * A list of status codes and ranges "200-299, 304" that should the XML parser should run on. If not set, the parser will run on all status codes.
4262
+ */
4263
+ parseOnStatusCodes?: string | number[];
4203
4264
  }
4204
4265
 
4205
4266
  /**