ssjs-data 0.2.0 → 0.2.2

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +34 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ssjs-data",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Canonical SSJS (Server-Side JavaScript) function catalog, Core library objects, Platform methods, and globals for SFMC tooling",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -1539,6 +1539,40 @@ export const WSPROXY_METHODS = [
1539
1539
  syntax: 'api.performItem(objectType, action, properties)',
1540
1540
  example: 'var api = new WSProxy();\nvar result = api.performItem("QueryDefinition", "start", { ObjectID: queryObjectId });\nWrite(result.Status);',
1541
1541
  },
1542
+ {
1543
+ name: 'performBatch',
1544
+ minArgs: 3,
1545
+ maxArgs: 4,
1546
+ description: 'Executes a perform action on multiple Marketing Cloud objects in a single SOAP API call.',
1547
+ params: [
1548
+ { name: 'objectType', description: 'SOAP API object type name', type: 'string' },
1549
+ { name: 'propertiesArray', description: 'Array of property objects for the action', type: 'array' },
1550
+ { name: 'verb', description: 'Action verb to execute (e.g. "start")', type: 'string' },
1551
+ { name: 'performOptions', description: 'Properties of the SOAP PerformOptions object', type: 'object', optional: true },
1552
+ ],
1553
+ returnType: 'object',
1554
+ syntax: 'api.performBatch(objectType, propertiesArray, verb[, performOptions])',
1555
+ example:
1556
+ 'var api = new Script.Util.WSProxy();\n' +
1557
+ 'var items = [{ ObjectID: id1 }, { ObjectID: id2 }];\n' +
1558
+ 'var result = api.performBatch("QueryDefinition", items, "start");\n' +
1559
+ 'Write(result.Status);',
1560
+ },
1561
+ {
1562
+ name: 'describe',
1563
+ minArgs: 1,
1564
+ maxArgs: 1,
1565
+ description: 'Returns structural metadata (ObjectDefinition) for one or more SOAP API object types.',
1566
+ params: [
1567
+ { name: 'objectType', description: 'Object type name or array of type names to describe', type: 'string' },
1568
+ ],
1569
+ returnType: 'object',
1570
+ syntax: 'api.describe(objectType)',
1571
+ example:
1572
+ 'var api = new Script.Util.WSProxy();\n' +
1573
+ 'var result = api.describe("DataExtension");\n' +
1574
+ 'Write(Stringify(result.Results));',
1575
+ },
1542
1576
  {
1543
1577
  name: 'execute',
1544
1578
  minArgs: 2,