ssjs-data 0.3.3 → 0.3.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.
@@ -691,9 +691,9 @@ declare namespace Platform {
691
691
  */
692
692
  function MD5(string: string, charset?: string): string;
693
693
  /**
694
- * Converts a JavaScript object into its JSON string representation. Works only with known JSON-serializable types. Not to be confused with `String()`, which converts CLR response objects to plain strings.
694
+ * Converts a JavaScript object into its JSON string representation. Works only with known JSON-serializable types. Not to be confused with `String()`, which converts CLR response objects to plain strings. The bare-name Stringify() global is equivalent but requires Platform.Load("core","1.1.5"); this Platform.Function form works without it.
695
695
  *
696
- * [ssjs.guide reference](https://ssjs.guide/global-functions/stringify/)
696
+ * [ssjs.guide reference](https://ssjs.guide/platform-functions/stringify/)
697
697
  *
698
698
  * @param object - JavaScript object to serialize to JSON.
699
699
  * @returns JSON string representation of the object.
@@ -703,7 +703,7 @@ declare namespace Platform {
703
703
  */
704
704
  function Stringify(object: object): string;
705
705
  /**
706
- * Retrieves content from a specified classic Content Area by numeric ID. Deprecated — Content Areas are no longer supported on current SFMC infrastructure.
706
+ * Retrieves content from a specified classic Content Area by numeric ID. Deprecated — Content Areas are no longer supported on current SFMC infrastructure. Note: the bare-name ContentArea() global uses a string errorMsg as the 3rd parameter and requires Platform.Load("core","1.1.5"); this Platform.Function form does not.
707
707
  *
708
708
  * [ssjs.guide reference](https://ssjs.guide/platform-functions/contentarea/)
709
709
  *
@@ -718,7 +718,7 @@ declare namespace Platform {
718
718
  */
719
719
  function ContentArea(id: number, regionName?: string, stopOnError?: boolean, fallbackContent?: string): string;
720
720
  /**
721
- * Retrieves content from a specified classic Content Area by name. Deprecated — Content Areas are no longer supported on current SFMC infrastructure.
721
+ * Retrieves content from a specified classic Content Area by name. Deprecated — Content Areas are no longer supported on current SFMC infrastructure. Note: the bare-name ContentAreaByName() global uses a string errorMsg as the 3rd parameter and requires Platform.Load("core","1.1.5"); this Platform.Function form does not.
722
722
  *
723
723
  * [ssjs.guide reference](https://ssjs.guide/platform-functions/contentareabyname/)
724
724
  *
@@ -937,7 +937,7 @@ declare namespace Platform {
937
937
  }
938
938
  }
939
939
 
940
- // ── Bare-name globals (aliasOf Platform.*) ──────────────────────────────────
940
+ // ── Bare-name globals ────────────────────────────────────────────────────────
941
941
  declare namespace Variable {
942
942
  /**
943
943
  * Retrieves the value of an AMPscript variable from the SSJS context.
@@ -1141,35 +1141,102 @@ declare namespace Recipient {
1141
1141
  }
1142
1142
 
1143
1143
  /**
1144
- * Retrieves content from a specified classic Content Area by numeric ID. Deprecated Content Areas are no longer supported on current SFMC infrastructure.
1144
+ * Native JavaScript function that converts any value to its string representation. Essential in SSJS for converting the CLR response object returned by Script.Util.HttpRequest.send().content into a JavaScript string that can be passed to Platform.Function.ParseJSON(). Unlike Stringify(), String() works on CLR/.NET objects and does not produce JSON output.
1145
1145
  *
1146
- * [ssjs.guide reference](https://ssjs.guide/platform-functions/contentarea/)
1146
+ * [ssjs.guide reference](https://ssjs.guide/global-functions/string/)
1147
+ *
1148
+ * @param value - Value to convert to string (any type, including CLR objects)
1149
+ * @example
1150
+ * // Convert a CLR response object to a JavaScript string for JSON parsing:
1151
+ * var req = new Script.Util.HttpRequest("https://api.example.com/data");
1152
+ * req.method = "GET";
1153
+ * var resp = req.send();
1154
+ * var responseStr = String(resp.content); // CLR -> JS string
1155
+ * var responseJSON = Platform.Function.ParseJSON(responseStr);
1156
+ *
1157
+ * // Also works for numbers and other primitives:
1158
+ * var num = 42;
1159
+ * var str = String(num); // "42"
1160
+ */
1161
+ declare function String(value: any): string;
1162
+ /**
1163
+ * Native JavaScript Error constructor. Creates an Error object that can be thrown or caught. Use inside try/catch blocks for structured error handling in SSJS. The caught error object has a message property.
1164
+ *
1165
+ * [ssjs.guide reference](https://ssjs.guide/global-functions/error/)
1166
+ *
1167
+ * @param message - Human-readable description of the error
1168
+ * @example
1169
+ * try {
1170
+ * var req = new Script.Util.HttpRequest("https://api.example.com/data");
1171
+ * req.method = "GET";
1172
+ * req.continueOnError = false;
1173
+ * var resp = req.send();
1174
+ * if (resp.statusCode !== 200) {
1175
+ * throw new Error("Request failed with status: " + resp.statusCode);
1176
+ * }
1177
+ * } catch (e) {
1178
+ * Write("Error: " + e.message);
1179
+ * }
1180
+ */
1181
+ declare function Error(message?: string): object;
1182
+ /**
1183
+ * Encodes plain text to a Base64 encoded string. Requires `Platform.Load("core", "1.1.5")` before use. For charset control, use `Platform.Function.Base64Encode(string, charset)` instead.
1184
+ *
1185
+ * [ssjs.guide reference](https://ssjs.guide/global-functions/base64encode/)
1186
+ *
1187
+ * @remarks Requires `Platform.Load("Core", "1")` before use.
1188
+ * @param string - Text to encode
1189
+ * @example
1190
+ * var decoded = 'Convert to Base64';
1191
+ * var encoded = Base64Encode(decoded); // "Q29udmVydCB0byBCYXNlNjQ="
1192
+ */
1193
+ declare function Base64Encode(string: string): string;
1194
+ /**
1195
+ * Decodes a Base64 encoded string to plain text. Requires `Platform.Load("core", "1.1.5")` before use. For charset control, use `Platform.Function.Base64Decode(encodedString, charset)` instead.
1196
+ *
1197
+ * [ssjs.guide reference](https://ssjs.guide/global-functions/base64decode/)
1198
+ *
1199
+ * @remarks Requires `Platform.Load("Core", "1")` before use.
1200
+ * @param encodedString - Base64 encoded string to decode
1201
+ * @example
1202
+ * var encoded = 'VGhpcyB3YXMgYSBCYXNlNjQgZW5jb2RlZCBzdHJpbmcu';
1203
+ * var decoded = Base64Decode(encoded); // "This was a Base64 encoded string."
1204
+ */
1205
+ declare function Base64Decode(encodedString: string): string;
1206
+ /**
1207
+ * Retrieves content from a classic Content Area by numeric ID. Deprecated — Content Areas are no longer supported on current SFMC infrastructure. Note: the Platform.Function.ContentArea() variant does not require Platform.Load and accepts a boolean stopOnError parameter instead of a string errorMsg.
1208
+ *
1209
+ * [ssjs.guide reference](https://ssjs.guide/global-functions/contentarea/)
1147
1210
  *
1148
1211
  * @deprecated
1212
+ * @remarks Requires `Platform.Load("Core", "1")` before use.
1149
1213
  * @param id - Numeric ID of the Content Area.
1150
1214
  * @param regionName - Impression region for content.
1151
- * @param stopOnError - When true, throws on failure; when false the call proceeds.
1215
+ * @param errorMsg - Error message string returned on failure.
1152
1216
  * @param fallbackContent - Default content to display when the area cannot be retrieved.
1153
1217
  * @returns Rendered content from the Content Area.
1154
1218
  * @example
1155
- * var content = Platform.Function.ContentArea(123456, "impressionRegion", false, "defaultContentHere");
1219
+ * Platform.Load("core", "1.1.5");
1220
+ * var content = ContentArea(123456, "impressionRegion", "fallback error msg", "defaultContentHere");
1156
1221
  */
1157
- declare function ContentArea(id: number, regionName?: string, stopOnError?: boolean, fallbackContent?: string): string;
1222
+ declare function ContentArea(id: number, regionName?: string, errorMsg?: string, fallbackContent?: string): string;
1158
1223
  /**
1159
- * Retrieves content from a specified classic Content Area by name. Deprecated — Content Areas are no longer supported on current SFMC infrastructure.
1224
+ * Retrieves content from a classic Content Area by name. Deprecated — Content Areas are no longer supported on current SFMC infrastructure. Note: the Platform.Function.ContentAreaByName() variant does not require Platform.Load and accepts a boolean stopOnError parameter instead of a string errorMsg.
1160
1225
  *
1161
- * [ssjs.guide reference](https://ssjs.guide/platform-functions/contentareabyname/)
1226
+ * [ssjs.guide reference](https://ssjs.guide/global-functions/contentareabyname/)
1162
1227
  *
1163
1228
  * @deprecated
1229
+ * @remarks Requires `Platform.Load("Core", "1")` before use.
1164
1230
  * @param name - Name of the Content Area.
1165
1231
  * @param regionName - Impression region for content.
1166
- * @param stopOnError - When true, throws on failure; when false the call proceeds.
1232
+ * @param errorMsg - Error message string returned on failure.
1167
1233
  * @param fallbackContent - Default content to display when the area cannot be retrieved.
1168
1234
  * @returns Rendered content from the Content Area.
1169
1235
  * @example
1170
- * var content = Platform.Function.ContentAreaByName("My Content\\myContentArea", "impressionRegion", false, "defaultContentHere");
1236
+ * Platform.Load("core", "1.1.5");
1237
+ * var content = ContentAreaByName("My Content\\myContentArea", "impressionRegion", "fallback error msg", "defaultContentHere");
1171
1238
  */
1172
- declare function ContentAreaByName(name: string, regionName?: string, stopOnError?: boolean, fallbackContent?: string): string;
1239
+ declare function ContentAreaByName(name: string, regionName?: string, errorMsg?: string, fallbackContent?: string): string;
1173
1240
  /**
1174
1241
  * Marks the start of a named impression tracking region within content.
1175
1242
  *
@@ -1295,7 +1362,6 @@ declare function IsPhoneNumber(value: string): boolean;
1295
1362
  *
1296
1363
  * [ssjs.guide reference](https://ssjs.guide/global-functions/write/)
1297
1364
  *
1298
- * @remarks Requires `Platform.Load("Core", "1")` before use.
1299
1365
  * @param content - Content string to write to the response.
1300
1366
  * @example
1301
1367
  * var data = { name: "Jane", status: "active" };
@@ -1303,7 +1369,7 @@ declare function IsPhoneNumber(value: string): boolean;
1303
1369
  */
1304
1370
  declare function Write(content: string): void;
1305
1371
  /**
1306
- * Converts a JavaScript object into its JSON string representation. Works only with known JSON-serializable types. Not to be confused with `String()`, which converts CLR response objects to plain strings.
1372
+ * Converts a JavaScript object into its JSON string representation. Works only with known JSON-serializable types. Not to be confused with `String()`, which converts CLR response objects to plain strings. The bare-name Stringify() global is equivalent but requires Platform.Load("core","1.1.5"); this Platform.Function form works without it.
1307
1373
  *
1308
1374
  * [ssjs.guide reference](https://ssjs.guide/global-functions/stringify/)
1309
1375
  *
@@ -1315,6 +1381,21 @@ declare function Write(content: string): void;
1315
1381
  * Platform.Function.Write(json);
1316
1382
  */
1317
1383
  declare function Stringify(object: object): string;
1384
+ /**
1385
+ * Applies a formatting rule to a string or numeric value. Use format codes such as `C` (currency), `D` (decimal), `N` (number with separators), `P` (percentage), `O` (ISO 8601 date), `s` (sortable date), `d` (short date), `t` (12-hour time), etc. Append a digit to control decimal places, e.g. `C2` for two decimal places.
1386
+ *
1387
+ * [ssjs.guide reference](https://ssjs.guide/global-functions/format/)
1388
+ *
1389
+ * @remarks Requires `Platform.Load("Core", "1")` before use.
1390
+ * @param textToFormat - The string or number to apply a formatting rule to.
1391
+ * @param formatCode - A format code to apply. Numeric: C, D, E, F, G, N, P (append digit for decimal places). Date/time: d, M, f, g, O, r, s, t, T, or a custom pattern.
1392
+ * @example
1393
+ * Platform.Load("core", "1.1.5");
1394
+ * var price = Format(4213.65, "C2"); // "$4,213.65"
1395
+ * var isoDate = Format("2024-08-05T13:41:23", "O"); // "2024-08-05T13:41:23.0000000"
1396
+ * Write(price + " / " + isoDate);
1397
+ */
1398
+ declare function Format(textToFormat: string | number, formatCode: string): string;
1318
1399
 
1319
1400
  // ── DataExtension instance interfaces ───────────────────────────────────────
1320
1401
  interface DataExtensionFields {
@@ -3649,7 +3730,7 @@ declare namespace Script {
3649
3730
  /**
3650
3731
  * Executes a perform action on a single Marketing Cloud object.
3651
3732
  *
3652
- * [ssjs.guide reference](https://ssjs.guide/wsproxy/perform/)
3733
+ * [ssjs.guide reference](https://ssjs.guide/wsproxy/performitem/)
3653
3734
  *
3654
3735
  * @param objectType - SOAP API object type name.
3655
3736
  * @param properties - Object properties identifying the target item (e.g. { ObjectID: "..." }).
@@ -591,7 +591,7 @@
591
591
  },
592
592
  {
593
593
  "name": "Stringify",
594
- "url": "/global-functions/stringify/",
594
+ "url": "/platform-functions/stringify/",
595
595
  "section": "Platform Functions",
596
596
  "type": "function",
597
597
  "description": "Converts a JavaScript object into its JSON string representation.",
@@ -600,6 +600,36 @@
600
600
  ],
601
601
  "returnType": "string"
602
602
  },
603
+ {
604
+ "name": "ContentArea",
605
+ "url": "/platform-functions/contentarea/",
606
+ "section": "Platform Functions",
607
+ "type": "function",
608
+ "description": "Retrieves content from a specified classic Content Area by numeric ID.",
609
+ "params": [
610
+ "id",
611
+ "regionName",
612
+ "stopOnError",
613
+ "fallbackContent"
614
+ ],
615
+ "returnType": "string",
616
+ "deprecated": true
617
+ },
618
+ {
619
+ "name": "ContentAreaByName",
620
+ "url": "/platform-functions/contentareabyname/",
621
+ "section": "Platform Functions",
622
+ "type": "function",
623
+ "description": "Retrieves content from a specified classic Content Area by name.",
624
+ "params": [
625
+ "name",
626
+ "regionName",
627
+ "stopOnError",
628
+ "fallbackContent"
629
+ ],
630
+ "returnType": "string",
631
+ "deprecated": true
632
+ },
603
633
  {
604
634
  "name": "IsCHTMLBrowser",
605
635
  "url": "/platform-functions/ischtmlbrowser/",
@@ -640,7 +670,7 @@
640
670
  "returnType": "object"
641
671
  },
642
672
  {
643
- "name": "proxy.createItem",
673
+ "name": "<WSProxyInstance>.createItem",
644
674
  "url": "/wsproxy/createitem/",
645
675
  "section": "WSProxy",
646
676
  "type": "method",
@@ -652,7 +682,7 @@
652
682
  "returnType": "object"
653
683
  },
654
684
  {
655
- "name": "proxy.updateItem",
685
+ "name": "<WSProxyInstance>.updateItem",
656
686
  "url": "/wsproxy/updateitem/",
657
687
  "section": "WSProxy",
658
688
  "type": "method",
@@ -664,7 +694,7 @@
664
694
  "returnType": "object"
665
695
  },
666
696
  {
667
- "name": "proxy.deleteItem",
697
+ "name": "<WSProxyInstance>.deleteItem",
668
698
  "url": "/wsproxy/deleteitem/",
669
699
  "section": "WSProxy",
670
700
  "type": "method",
@@ -676,7 +706,7 @@
676
706
  "returnType": "object"
677
707
  },
678
708
  {
679
- "name": "proxy.retrieve",
709
+ "name": "<WSProxyInstance>.retrieve",
680
710
  "url": "/wsproxy/retrieve/",
681
711
  "section": "WSProxy",
682
712
  "type": "method",
@@ -691,7 +721,7 @@
691
721
  "returnType": "object"
692
722
  },
693
723
  {
694
- "name": "proxy.getNextBatch",
724
+ "name": "<WSProxyInstance>.getNextBatch",
695
725
  "url": "/wsproxy/getnextbatch/",
696
726
  "section": "WSProxy",
697
727
  "type": "method",
@@ -703,8 +733,8 @@
703
733
  "returnType": "object"
704
734
  },
705
735
  {
706
- "name": "proxy.performItem",
707
- "url": "/wsproxy/perform/",
736
+ "name": "<WSProxyInstance>.performItem",
737
+ "url": "/wsproxy/performitem/",
708
738
  "section": "WSProxy",
709
739
  "type": "method",
710
740
  "description": "Executes a perform action on a single Marketing Cloud object.",
@@ -717,7 +747,7 @@
717
747
  "returnType": "object"
718
748
  },
719
749
  {
720
- "name": "proxy.performBatch",
750
+ "name": "<WSProxyInstance>.performBatch",
721
751
  "url": "/wsproxy/performbatch/",
722
752
  "section": "WSProxy",
723
753
  "type": "method",
@@ -731,7 +761,7 @@
731
761
  "returnType": "object"
732
762
  },
733
763
  {
734
- "name": "proxy.describe",
764
+ "name": "<WSProxyInstance>.describe",
735
765
  "url": "/wsproxy/describe/",
736
766
  "section": "WSProxy",
737
767
  "type": "method",
@@ -742,7 +772,7 @@
742
772
  "returnType": "object"
743
773
  },
744
774
  {
745
- "name": "proxy.execute",
775
+ "name": "<WSProxyInstance>.execute",
746
776
  "url": "/wsproxy/execute/",
747
777
  "section": "WSProxy",
748
778
  "type": "method",
@@ -754,7 +784,7 @@
754
784
  "returnType": "object"
755
785
  },
756
786
  {
757
- "name": "proxy.setBatchSize",
787
+ "name": "<WSProxyInstance>.setBatchSize",
758
788
  "url": "/wsproxy/setbatchsize/",
759
789
  "section": "WSProxy",
760
790
  "type": "method",
@@ -765,7 +795,7 @@
765
795
  "returnType": "void"
766
796
  },
767
797
  {
768
- "name": "proxy.setClientId",
798
+ "name": "<WSProxyInstance>.setClientId",
769
799
  "url": "/wsproxy/setclientid/",
770
800
  "section": "WSProxy",
771
801
  "type": "method",
@@ -776,7 +806,7 @@
776
806
  "returnType": "void"
777
807
  },
778
808
  {
779
- "name": "proxy.resetClientIds",
809
+ "name": "<WSProxyInstance>.resetClientIds",
780
810
  "url": "/wsproxy/resetclientids/",
781
811
  "section": "WSProxy",
782
812
  "type": "method",
@@ -784,7 +814,7 @@
784
814
  "returnType": "void"
785
815
  },
786
816
  {
787
- "name": "proxy.createBatch",
817
+ "name": "<WSProxyInstance>.createBatch",
788
818
  "url": "/wsproxy/createbatch/",
789
819
  "section": "WSProxy",
790
820
  "type": "method",
@@ -796,7 +826,7 @@
796
826
  "returnType": "object"
797
827
  },
798
828
  {
799
- "name": "proxy.updateBatch",
829
+ "name": "<WSProxyInstance>.updateBatch",
800
830
  "url": "/wsproxy/updatebatch/",
801
831
  "section": "WSProxy",
802
832
  "type": "method",
@@ -808,7 +838,7 @@
808
838
  "returnType": "object"
809
839
  },
810
840
  {
811
- "name": "proxy.deleteBatch",
841
+ "name": "<WSProxyInstance>.deleteBatch",
812
842
  "url": "/wsproxy/deletebatch/",
813
843
  "section": "WSProxy",
814
844
  "type": "method",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ssjs-data",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
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
@@ -1,4 +1,4 @@
1
- /**
1
+ /**
2
2
  * Canonical SSJS (Server-Side JavaScript) catalog for SFMC tooling.
3
3
  *
4
4
  * Single source of truth consumed by:
@@ -178,8 +178,85 @@ export const SSJS_GLOBALS = [
178
178
  // Every Platform.Function.X() is also callable as X(). The canonical
179
179
  // definition lives in PLATFORM_FUNCTIONS. A subset requires a preceding
180
180
  // Platform.Load("core", "1.1.5") call (requiresCoreLoad: true).
181
- { name: 'ContentArea', aliasOf: 'Platform.Function.ContentArea', deprecated: true },
182
- { name: 'ContentAreaByName', aliasOf: 'Platform.Function.ContentAreaByName', deprecated: true },
181
+ {
182
+ name: 'ContentArea',
183
+ minArgs: 1,
184
+ maxArgs: 4,
185
+ deprecated: true,
186
+ requiresCoreLoad: true,
187
+ description:
188
+ 'Retrieves content from a classic Content Area by numeric ID. ' +
189
+ 'Deprecated — Content Areas are no longer supported on current SFMC infrastructure. ' +
190
+ 'Note: the Platform.Function.ContentArea() variant does not require Platform.Load and ' +
191
+ 'accepts a boolean stopOnError parameter instead of a string errorMsg.',
192
+ params: [
193
+ { name: 'id', description: 'Numeric ID of the Content Area.', type: 'number' },
194
+ {
195
+ name: 'regionName',
196
+ description: 'Impression region for content.',
197
+ type: 'string',
198
+ optional: true,
199
+ },
200
+ {
201
+ name: 'errorMsg',
202
+ description: 'Error message string returned on failure.',
203
+ type: 'string',
204
+ optional: true,
205
+ },
206
+ {
207
+ name: 'fallbackContent',
208
+ description: 'Default content to display when the area cannot be retrieved.',
209
+ type: 'string',
210
+ optional: true,
211
+ },
212
+ ],
213
+ returnType: 'string',
214
+ returnDescription: 'Rendered content from the Content Area.',
215
+ syntax: 'ContentArea(id[, regionName, errorMsg, fallbackContent])',
216
+ example:
217
+ 'Platform.Load("core", "1.1.5");\n' +
218
+ 'var content = ContentArea(123456, "impressionRegion", "fallback error msg", "defaultContentHere");',
219
+ },
220
+ {
221
+ name: 'ContentAreaByName',
222
+ minArgs: 1,
223
+ maxArgs: 4,
224
+ deprecated: true,
225
+ requiresCoreLoad: true,
226
+ description:
227
+ 'Retrieves content from a classic Content Area by name. ' +
228
+ 'Deprecated — Content Areas are no longer supported on current SFMC infrastructure. ' +
229
+ 'Note: the Platform.Function.ContentAreaByName() variant does not require Platform.Load and ' +
230
+ 'accepts a boolean stopOnError parameter instead of a string errorMsg.',
231
+ params: [
232
+ { name: 'name', description: 'Name of the Content Area.', type: 'string' },
233
+ {
234
+ name: 'regionName',
235
+ description: 'Impression region for content.',
236
+ type: 'string',
237
+ optional: true,
238
+ },
239
+ {
240
+ name: 'errorMsg',
241
+ description: 'Error message string returned on failure.',
242
+ type: 'string',
243
+ optional: true,
244
+ },
245
+ {
246
+ name: 'fallbackContent',
247
+ description: 'Default content to display when the area cannot be retrieved.',
248
+ type: 'string',
249
+ optional: true,
250
+ },
251
+ ],
252
+ returnType: 'string',
253
+ returnDescription: 'Rendered content from the Content Area.',
254
+ syntax: 'ContentAreaByName(name[, regionName, errorMsg, fallbackContent])',
255
+ example:
256
+ String.raw`Platform.Load("core", "1.1.5");` +
257
+ '\n' +
258
+ String.raw`var content = ContentAreaByName("My Content\\myContentArea", "impressionRegion", "fallback error msg", "defaultContentHere");`,
259
+ },
183
260
  {
184
261
  name: 'BeginImpressionRegion',
185
262
  aliasOf: 'Platform.Function.BeginImpressionRegion',
@@ -213,7 +290,7 @@ export const SSJS_GLOBALS = [
213
290
  aliasOf: 'Platform.Function.IsPhoneNumber',
214
291
  requiresCoreLoad: true,
215
292
  },
216
- { name: 'Write', aliasOf: 'Platform.Response.Write', requiresCoreLoad: true },
293
+ { name: 'Write', aliasOf: 'Platform.Response.Write' },
217
294
  { name: 'Stringify', aliasOf: 'Platform.Function.Stringify', requiresCoreLoad: true },
218
295
  // ── Core-library namespace markers ───────────────────────────────────────
219
296
  {
@@ -1584,7 +1661,9 @@ export const PLATFORM_FUNCTIONS = [
1584
1661
  description:
1585
1662
  'Converts a JavaScript object into its JSON string representation. ' +
1586
1663
  'Works only with known JSON-serializable types. ' +
1587
- 'Not to be confused with `String()`, which converts CLR response objects to plain strings.',
1664
+ 'Not to be confused with `String()`, which converts CLR response objects to plain strings. ' +
1665
+ 'The bare-name Stringify() global is equivalent but requires Platform.Load("core","1.1.5"); ' +
1666
+ 'this Platform.Function form works without it.',
1588
1667
  params: [
1589
1668
  {
1590
1669
  name: 'object',
@@ -1605,7 +1684,9 @@ export const PLATFORM_FUNCTIONS = [
1605
1684
  deprecated: true,
1606
1685
  description:
1607
1686
  'Retrieves content from a specified classic Content Area by numeric ID. ' +
1608
- 'Deprecated — Content Areas are no longer supported on current SFMC infrastructure.',
1687
+ 'Deprecated — Content Areas are no longer supported on current SFMC infrastructure. ' +
1688
+ 'Note: the bare-name ContentArea() global uses a string errorMsg as the 3rd parameter ' +
1689
+ 'and requires Platform.Load("core","1.1.5"); this Platform.Function form does not.',
1609
1690
  params: [
1610
1691
  { name: 'id', description: 'Numeric ID of the Content Area.', type: 'number' },
1611
1692
  {
@@ -1640,7 +1721,9 @@ export const PLATFORM_FUNCTIONS = [
1640
1721
  deprecated: true,
1641
1722
  description:
1642
1723
  'Retrieves content from a specified classic Content Area by name. ' +
1643
- 'Deprecated — Content Areas are no longer supported on current SFMC infrastructure.',
1724
+ 'Deprecated — Content Areas are no longer supported on current SFMC infrastructure. ' +
1725
+ 'Note: the bare-name ContentAreaByName() global uses a string errorMsg as the 3rd parameter ' +
1726
+ 'and requires Platform.Load("core","1.1.5"); this Platform.Function form does not.',
1644
1727
  params: [
1645
1728
  { name: 'name', description: 'Name of the Content Area.', type: 'string' },
1646
1729
  {
package/src/urls.js CHANGED
@@ -32,28 +32,13 @@ export const platformFunctionUrl = (name) => `/platform-functions/${name.toLower
32
32
  */
33
33
  export const httpMethodUrl = (name) => `/http/${name.toLowerCase()}/`;
34
34
 
35
- /**
36
- * Overrides for WSProxy method URLs where the page slug differs from name.toLowerCase().
37
- * Key: method name in lowercase. Value: site-relative URL.
38
- *
39
- * @type {Record<string, string>}
40
- */
41
- export const WSPROXY_METHOD_URL_OVERRIDES = {
42
- // performItem's page is named "perform" (file: perform.md, permalink: /wsproxy/perform/)
43
- performitem: '/wsproxy/perform/',
44
- };
45
-
46
35
  /**
47
36
  * URL for a WSProxy method page.
48
- * Checks WSPROXY_METHOD_URL_OVERRIDES first, then falls back to /wsproxy/<name.toLowerCase()>/.
49
37
  *
50
38
  * @param {string} name - Method name (any case)
51
39
  * @returns {string} Site-relative URL
52
40
  */
53
- export const wsproxyMethodUrl = (name) => {
54
- const lower = name.toLowerCase();
55
- return WSPROXY_METHOD_URL_OVERRIDES[lower] ?? `/wsproxy/${lower}/`;
56
- };
41
+ export const wsproxyMethodUrl = (name) => `/wsproxy/${name.toLowerCase()}/`;
57
42
 
58
43
  /**
59
44
  * URL for a global-function page.
@@ -182,6 +167,8 @@ export const GLOBAL_FUNCTION_PAGES = new Set([
182
167
  'error',
183
168
  'variable',
184
169
  'attribute',
170
+ 'contentarea',
171
+ 'contentareabyname',
185
172
  ]);
186
173
 
187
174
  /**
@@ -192,12 +179,4 @@ export const GLOBAL_FUNCTION_PAGES = new Set([
192
179
  *
193
180
  * @type {Set.<string>}
194
181
  */
195
- export const PLATFORM_FUNCTION_GLOBAL_ALIAS = new Set(['stringify']);
196
-
197
- /**
198
- * Platform.Function names (all lowercase) that have no dedicated ssjs.guide page.
199
- * Omit these from the site-index to avoid dead links.
200
- *
201
- * @type {Set.<string>}
202
- */
203
- export const PLATFORM_FUNCTION_NO_PAGE = new Set(['contentarea', 'contentareabyname']);
182
+ export const PLATFORM_FUNCTION_GLOBAL_ALIAS = new Set([]);