purecloud-flow-scripting-api-sdk-javascript 0.66.3 → 0.66.5

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/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "purecloud-flow-scripting-api-sdk-javascript",
3
- "version": "0.66.3",
3
+ "version": "0.66.5",
4
4
  "description": "JavaScript library for creating, editing, and managing Genesys Cloud Architect flows",
5
5
  "main": "build-scripting/release/scripting.bundle.js",
6
6
  "author": "Genesys",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "ws": "^8.18.0"
9
+ "ws": "8.20.1"
10
10
  },
11
11
  "devDependencies": {
12
- "axios": "^0.27.2",
12
+ "axios": "1.16.1",
13
13
  "chai": "4.2.0",
14
- "mocha": "^5.2.0",
15
- "mocha-jenkins-reporter": "^0.4.1",
14
+ "mocha": "5.2.0",
15
+ "mocha-jenkins-reporter": "0.4.1",
16
16
  "q": "1.5.1",
17
17
  "underscore": "1.9.1"
18
18
  },
@@ -20,4 +20,4 @@
20
20
  "node": ">=20.0.0"
21
21
  },
22
22
  "types": "types.d.ts"
23
- }
23
+ }
package/types.d.ts CHANGED
@@ -12539,6 +12539,23 @@ export class ArchBaseActionWithSilenceDetection extends ArchBaseActionWithOutput
12539
12539
  traverse(callbackFunction: callbackTraverseInfo, traverseFilter?: ArchFilterObject): number;
12540
12540
  }
12541
12541
 
12542
+ /**
12543
+ * Produces a key safe to use on plain objects used as string-keyed maps during scripting traversal.
12544
+ *
12545
+ * **Security purpose:** Dynamic property names from flow/scripting objects are sometimes used as keys on
12546
+ * bookkeeping maps (`propNamesProcessed`, `traversePropNameValMap`, hierarchy buckets). Without guarding,
12547
+ * keys such as `__proto__`, `constructor`, or `prototype` can alter prototype chain behavior (prototype
12548
+ * pollution) when assigned with bracket notation. This helper maps those dangerous names to an equivalent
12549
+ * string that is not a prototype-polluting key (zero-width space prefix), preserving uniqueness for traversal
12550
+ * bookkeeping while avoiding accidental prototype mutation.
12551
+ *
12552
+ * **Note:** Real property access on scripting objects still uses the original `propName`; only map keys are
12553
+ * transformed so internal dedupe/visited sets remain safe.
12554
+ * @param key - Property or hierarchy string intended for use as an object map key.
12555
+ * @returns A string safe to use as a map key; dangerous names receive a `\u200B` prefix.
12556
+ */
12557
+ declare function safeTraversalMapKey(key: any): any;
12558
+
12542
12559
  /**
12543
12560
  * This callback function type is invoked by Architect Scripting where the callback function is passed a
12544
12561
  * [traverse info]{@link ArchTraverseInfo} object.
@@ -13046,6 +13063,26 @@ export class ArchBaseFlow extends ArchBaseCoreObjectWithId {
13046
13063
  * values in {@link ArchEnums#FLOW_TYPES} lists valid flow type values.
13047
13064
  */
13048
13065
  readonly flowType: string;
13066
+ /**
13067
+ * Resolves a filesystem path supplied by the Architect **scripting** API (Node) after the usual
13068
+ * `_checkItemIsValidLiteralString` checks on the caller side.
13069
+ *
13070
+ * **Security purpose:** Static analysis flags raw `path.resolve` / `path.join` with scripting parameters
13071
+ * as possible path traversal. This method centralizes defense-in-depth:
13072
+ * - Strips NUL (`\\0`) bytes so paths cannot embed embedded-truncation tricks.
13073
+ * - Applies `path.normalize` before resolving.
13074
+ * - Resolves once via `path.resolve(cwd, normalized)` (Node: absolute `normalized` replaces the cwd prefix).
13075
+ * - For **relative** input only, rejects results that sit **above** `process.cwd()` using `path.relative`
13076
+ * (blocks `..` segments that escape the working directory). **Absolute** paths are allowed as-is after
13077
+ * resolve (same behavior as typical CLI tools exporting outside the project tree).
13078
+ *
13079
+ * **Not a substitute for OS ACLs:** authors can still pass absolute paths to writable locations; this
13080
+ * blocks a class of relative-path traversal from the scripting surface.
13081
+ * @param inputPath - Directory or file path string from scripting (already validated as a literal string by callers).
13082
+ * @param callerLabel - Label for error messages (e.g. method name + parameter).
13083
+ * @returns Canonical resolved path string.
13084
+ */
13085
+ _resolveValidatedScriptFileSystemPath(inputPath: any, callerLabel: any): any;
13049
13086
  /**
13050
13087
  * This function will return the file path where a flow export will be written when calling the {@link ArchBaseFlow#exportToDirAsync}
13051
13088
  * method for the supplied destination directory and export flow format. A typical use case for this function would be