{"id":47718697,"url":"https://github.com/joernberkefeld/ssjs-data","last_synced_at":"2026-05-22T21:00:48.144Z","repository":{"id":348138442,"uuid":"1196662848","full_name":"JoernBerkefeld/ssjs-data","owner":"JoernBerkefeld","description":"Canonical SSJS (Server-Side JavaScript) function catalog, Core library objects, Platform methods, and globals for SFMC tooling","archived":false,"fork":false,"pushed_at":"2026-05-20T05:22:59.000Z","size":264,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-20T07:16:25.173Z","etag":null,"topics":["marketing-cloud","platform-functions","salesforce","server-side-javascript","sfmc","ssjs","wsproxy"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ssjs-data","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JoernBerkefeld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-30T23:18:46.000Z","updated_at":"2026-05-20T05:18:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d06ecc5-49d2-4534-9a23-bd688608a74b","html_url":"https://github.com/JoernBerkefeld/ssjs-data","commit_stats":null,"previous_names":["joernberkefeld/ssjs-data"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/JoernBerkefeld/ssjs-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoernBerkefeld%2Fssjs-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoernBerkefeld%2Fssjs-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoernBerkefeld%2Fssjs-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoernBerkefeld%2Fssjs-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoernBerkefeld","download_url":"https://codeload.github.com/JoernBerkefeld/ssjs-data/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoernBerkefeld%2Fssjs-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33368581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["marketing-cloud","platform-functions","salesforce","server-side-javascript","sfmc","ssjs","wsproxy"],"created_at":"2026-04-02T19:12:28.183Z","updated_at":"2026-05-22T21:00:48.128Z","avatar_url":"https://github.com/JoernBerkefeld.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssjs-data\n\nCanonical SSJS (Server-Side JavaScript) function catalog, Core library objects, Platform methods, and globals for Salesforce Marketing Cloud (SFMC) tooling.\n\nThis package is the single source of truth consumed by:\n\n- [eslint-plugin-sfmc](https://www.npmjs.com/package/eslint-plugin-sfmc) — globals registration, unknown-function detection, platform-load checks\n- [prettier-plugin-sfmc](https://www.npmjs.com/package/prettier-plugin-sfmc) — language registration\n- [VSCode: sfmc-language](https://marketplace.visualstudio.com/items?itemName=joernberkefeld.sfmc-language) — completions, hover, and diagnostics\n\n## Installation\n\n```sh\nnpm install ssjs-data\n```\n\n## Usage\n\n```js\nimport {\n    // Globals\n    SSJS_GLOBALS,\n    SSJS_GLOBALS_MAP,\n    ssjsGlobalsLookup,\n    // Platform methods\n    PLATFORM_METHODS,\n    PLATFORM_FUNCTIONS,\n    platformFunctionLookup,\n    platformFunctionNames,\n    // Platform objects\n    PLATFORM_VARIABLE_METHODS,\n    platformVariableLookup,\n    PLATFORM_RESPONSE_METHODS,\n    platformResponseLookup,\n    PLATFORM_REQUEST_METHODS,\n    platformRequestLookup,\n    PLATFORM_RECIPIENT_METHODS,\n    platformRecipientMethodNames,\n    platformRecipientLookup,\n    // Core library objects\n    CORE_LIBRARY_OBJECTS,\n    coreObjectNames,\n    coreObjectLookup,\n    coreMethodArityLookup,\n    // HTTP + HTTPHeader\n    HTTP_METHODS,\n    httpMethodNames,\n    httpMethodLookup,\n    HTTPHEADER_METHODS,\n    httpHeaderMethodNames,\n    httpHeaderMethodLookup,\n    // WSProxy\n    WSPROXY_METHODS,\n    wsproxyMethodNames,\n    wsproxyMethodLookup,\n    // WSProxy object-specific method arrays\n    ACCOUNT_METHODS,\n    ACCOUNT_TRACKING_METHODS,\n    ACCOUNT_USER_METHODS,\n    ATTRIBUTE_METHODS,\n    attributeMethodNames,\n    attributeMethodLookup,\n    CONTENT_AREA_OBJ_METHODS,\n    DATA_EXTENSION_METHODS,\n    DATA_EXTENSION_FIELDS_METHODS,\n    DATA_EXTENSION_ROWS_METHODS,\n    DELIVERY_PROFILE_METHODS,\n    EMAIL_METHODS,\n    EVENT_METHODS,\n    FILTER_DEFINITION_METHODS,\n    FOLDER_METHODS,\n    LIST_METHODS,\n    LIST_SUBSCRIBERS_METHODS,\n    LIST_SUBSCRIBERS_TRACKING_METHODS,\n    PORTFOLIO_METHODS,\n    QUERY_DEFINITION_METHODS,\n    SEND_METHODS,\n    SEND_CLASSIFICATION_METHODS,\n    SEND_DEFINITION_METHODS,\n    SEND_TRACKING_METHODS,\n    SENDER_PROFILE_METHODS,\n    SUBSCRIBER_METHODS,\n    SUBSCRIBER_ATTRIBUTES_METHODS,\n    SUBSCRIBER_LISTS_METHODS,\n    TEMPLATE_METHODS,\n    TRIGGERED_SEND_METHODS,\n    TRIGGERED_SEND_TRACKING_METHODS,\n    TRIGGERED_SEND_TRACKING_CLICKS_METHODS,\n    TRIGGERED_SEND_TRACKING_TOTAL_BY_INTERVAL_METHODS,\n    // DateTime / ErrorUtil\n    DATE_TIME_TIMEZONE_METHODS,\n    ERROR_UTIL_METHODS,\n    // Script.Util\n    SCRIPT_UTIL_CONSTRUCTORS,\n    SCRIPT_UTIL_REQUEST_METHODS,\n    // ECMAScript / polyfills / unsupported syntax\n    ECMASCRIPT_BUILTINS,\n    UNSUPPORTED_SYNTAX,\n    unsupportedByNodeType,\n    POLYFILLABLE_METHODS,\n    polyfillByPrototypeName,\n    polyfillByStaticName,\n} from 'ssjs-data';\n```\n\n### `SSJS_GLOBALS` / `SSJS_GLOBALS_MAP`\n\nGlobal functions and objects available at the top scope of any SSJS execution context (no `Platform.Load` required):\n\n```js\nimport { SSJS_GLOBALS, SSJS_GLOBALS_MAP } from 'ssjs-data';\n\nfor (const global of SSJS_GLOBALS) {\n    console.log(global.name);        // e.g. 'Write', 'Stringify'\n    console.log(global.type);        // 'function' | 'object'\n    console.log(global.description);\n}\n\n// SSJS_GLOBALS_MAP is shaped for ESLint's globals config:\n// { Write: 'readonly', Platform: 'readonly', ... }\nconsole.log(SSJS_GLOBALS_MAP['Write']); // 'readonly'\n```\n\n### `PLATFORM_METHODS`\n\nTop-level `Platform.*` methods (e.g. `Platform.Load`):\n\n```js\nimport { PLATFORM_METHODS } from 'ssjs-data';\n\nfor (const method of PLATFORM_METHODS) {\n    console.log(method.name);     // e.g. 'Load'\n    console.log(method.syntax);   // e.g. 'Platform.Load(libraryName, version)'\n    console.log(method.minArgs);\n    console.log(method.maxArgs);\n}\n```\n\n### `PLATFORM_FUNCTIONS` / `platformFunctionLookup` / `platformFunctionNames`\n\nThe `Platform.Function.*` catalog — available without `Platform.Load`:\n\n```js\nimport { PLATFORM_FUNCTIONS, platformFunctionLookup, platformFunctionNames } from 'ssjs-data';\n\n// Full catalog\nfor (const fn of PLATFORM_FUNCTIONS) {\n    console.log(fn.name);        // e.g. 'Lookup'\n    console.log(fn.minArgs);\n    console.log(fn.maxArgs);\n    console.log(fn.description);\n    console.log(fn.params);      // array of { name, description, type?, optional? }\n    console.log(fn.returnType);\n    console.log(fn.syntax);\n}\n\n// O(1) lookup by lowercase name\nconst entry = platformFunctionLookup.get('lookup');\n\n// Existence check\nif (platformFunctionNames.has('lookup')) { /* ... */ }\n```\n\n### `CORE_LIBRARY_OBJECTS` / `coreObjectNames` / `coreObjectLookup`\n\nObjects that require `Platform.Load(\"core\", \"1\")` before use (e.g. `DataExtension`, `Subscriber`):\n\n```js\nimport { CORE_LIBRARY_OBJECTS, coreObjectNames, coreObjectLookup } from 'ssjs-data';\n\nfor (const obj of CORE_LIBRARY_OBJECTS) {\n    console.log(obj.name);        // e.g. 'DataExtension', 'DataExtension.Rows'\n    console.log(obj.methods);     // e.g. ['Init', 'Add', 'Remove', 'Update', 'Retrieve']\n    console.log(obj.description);\n}\n\n// Existence check\nif (coreObjectNames.has('DataExtension')) { /* ... */ }\n\n// O(1) lookup\nconst de = coreObjectLookup.get('DataExtension');\n```\n\n### `HTTP_METHODS` / `httpMethodNames` / `httpMethodLookup`\n\nMethods available on the `HTTP` platform object:\n\n```js\nimport { HTTP_METHODS, httpMethodNames, httpMethodLookup } from 'ssjs-data';\n\nfor (const method of HTTP_METHODS) {\n    console.log(method.name);   // e.g. 'Get', 'Post'\n    console.log(method.syntax);\n}\n\nif (httpMethodNames.has('get')) { /* ... */ }\n\nconst m = httpMethodLookup.get('get');\n```\n\n### `WSPROXY_METHODS` / `wsproxyMethodNames` / `wsproxyMethodLookup`\n\nSOAP API methods available on the `WSProxy` object:\n\n```js\nimport { WSPROXY_METHODS, wsproxyMethodNames, wsproxyMethodLookup } from 'ssjs-data';\n\nfor (const method of WSPROXY_METHODS) {\n    console.log(method.name);   // e.g. 'retrieve', 'create', 'update'\n    console.log(method.syntax);\n}\n\nif (wsproxyMethodNames.has('retrieve')) { /* ... */ }\n\nconst method = wsproxyMethodLookup.get('retrieve');\n```\n\n### `HTTPHEADER_METHODS` / `httpHeaderMethodNames` / `httpHeaderMethodLookup`\n\nMethods on the `HTTPHeader` Core object (requires `Platform.Load(\"core\", \"1\")`):\n\n```js\nimport { HTTPHEADER_METHODS, httpHeaderMethodNames, httpHeaderMethodLookup } from 'ssjs-data';\n\nfor (const method of HTTPHEADER_METHODS) {\n    console.log(method.name);   // 'GetValue', 'SetValue'\n    console.log(method.syntax);\n}\n\nif (httpHeaderMethodNames.has('getvalue')) { /* ... */ }\nconst method2 = httpHeaderMethodLookup.get('getvalue');\n```\n\n### `PLATFORM_VARIABLE_METHODS` / `platformVariableLookup`\n\nMethods on the `Platform.Variable` bridge (reads and writes AMPscript variables from SSJS):\n\n```js\nimport { PLATFORM_VARIABLE_METHODS, platformVariableLookup } from 'ssjs-data';\n\nfor (const method of PLATFORM_VARIABLE_METHODS) {\n    console.log(method.name);   // 'GetValue', 'SetValue'\n}\nconst m = platformVariableLookup.get('getvalue');\n```\n\n### `PLATFORM_RESPONSE_METHODS` / `platformResponseLookup`\n\nMethods on the `Platform.Response` object (HTTP response control):\n\n```js\nimport { PLATFORM_RESPONSE_METHODS, platformResponseLookup } from 'ssjs-data';\n\nfor (const method of PLATFORM_RESPONSE_METHODS) {\n    console.log(method.name);   // e.g. 'Write', 'Redirect', 'SetResponseHeader'\n}\nconst m = platformResponseLookup.get('write');\n```\n\n### `PLATFORM_REQUEST_METHODS` / `platformRequestLookup`\n\nMethods on the `Platform.Request` object (HTTP request introspection):\n\n```js\nimport { PLATFORM_REQUEST_METHODS, platformRequestLookup } from 'ssjs-data';\n\nfor (const method of PLATFORM_REQUEST_METHODS) {\n    console.log(method.name);   // e.g. 'GetQueryStringParameter', 'GetPostData'\n}\nconst m = platformRequestLookup.get('getquerystringparameter');\n```\n\n### `PLATFORM_RECIPIENT_METHODS` / `platformRecipientMethodNames` / `platformRecipientLookup`\n\nMethods on the `Platform.Recipient` object (subscriber / recipient data):\n\n```js\nimport { PLATFORM_RECIPIENT_METHODS, platformRecipientMethodNames, platformRecipientLookup } from 'ssjs-data';\n\nfor (const method of PLATFORM_RECIPIENT_METHODS) {\n    console.log(method.name);   // e.g. 'GetAttributeValue'\n}\nif (platformRecipientMethodNames.has('getattributevalue')) { /* ... */ }\nconst m = platformRecipientLookup.get('getattributevalue');\n```\n\n### `ATTRIBUTE_METHODS` / `attributeMethodNames` / `attributeMethodLookup`\n\nMethods on the `Attribute` Core object (requires `Platform.Load(\"core\", \"1.1.5\")`):\n\n```js\nimport { ATTRIBUTE_METHODS, attributeMethodNames, attributeMethodLookup } from 'ssjs-data';\n\nfor (const method of ATTRIBUTE_METHODS) {\n    console.log(method.name);        // 'GetValue'\n    console.log(method.description); // reads subscriber attribute / DE field for current recipient\n}\nif (attributeMethodNames.has('getvalue')) { /* ... */ }\nconst m = attributeMethodLookup.get('getvalue');\n```\n\n### `DATE_TIME_TIMEZONE_METHODS`\n\nMethods on the `DateTime.TimeZone` namespace (requires `Platform.Load(\"core\", \"1.1.5\")`):\n\n```js\nimport { DATE_TIME_TIMEZONE_METHODS } from 'ssjs-data';\n\nfor (const method of DATE_TIME_TIMEZONE_METHODS) {\n    console.log(method.name);   // 'Retrieve'\n    console.log(method.syntax); // 'DateTime.TimeZone.Retrieve(filter)'\n}\n```\n\n### `ERROR_UTIL_METHODS`\n\nUtility methods on the `ErrorUtil` namespace for WSProxy error handling (requires `Platform.Load(\"core\", \"1.1.5\")`):\n\n```js\nimport { ERROR_UTIL_METHODS } from 'ssjs-data';\n\nfor (const method of ERROR_UTIL_METHODS) {\n    console.log(method.name);   // 'ThrowWSProxyError'\n    console.log(method.syntax);\n}\n```\n\n### WSProxy object-specific method arrays\n\nEach WSProxy-accessible object has its own named export. These follow the same shape as `WSPROXY_METHODS` and are used by tooling for per-object completions and hover.\n\n| Export | WSProxy object |\n|---|---|\n| `ACCOUNT_METHODS` | `Account` |\n| `ACCOUNT_TRACKING_METHODS` | `Account.Tracking` |\n| `ACCOUNT_USER_METHODS` | `AccountUser` |\n| `CONTENT_AREA_OBJ_METHODS` | `ContentAreaObj` |\n| `DATA_EXTENSION_METHODS` | `DataExtension` |\n| `DATA_EXTENSION_FIELDS_METHODS` | `DataExtension.Fields` |\n| `DATA_EXTENSION_ROWS_METHODS` | `DataExtension.Rows` |\n| `DELIVERY_PROFILE_METHODS` | `DeliveryProfile` |\n| `EMAIL_METHODS` | `Email` |\n| `EVENT_METHODS` | `Event` |\n| `FILTER_DEFINITION_METHODS` | `FilterDefinition` |\n| `FOLDER_METHODS` | `Folder` |\n| `LIST_METHODS` | `List` |\n| `LIST_SUBSCRIBERS_METHODS` | `List.Subscribers` |\n| `LIST_SUBSCRIBERS_TRACKING_METHODS` | `List.Subscribers.Tracking` |\n| `PORTFOLIO_METHODS` | `Portfolio` |\n| `QUERY_DEFINITION_METHODS` | `QueryDefinition` |\n| `SEND_METHODS` | `Send` |\n| `SEND_CLASSIFICATION_METHODS` | `SendClassification` |\n| `SEND_DEFINITION_METHODS` | `SendDefinition` |\n| `SEND_TRACKING_METHODS` | `Send.Tracking` |\n| `SENDER_PROFILE_METHODS` | `SenderProfile` |\n| `SUBSCRIBER_METHODS` | `Subscriber` |\n| `SUBSCRIBER_ATTRIBUTES_METHODS` | `Subscriber.Attributes` |\n| `SUBSCRIBER_LISTS_METHODS` | `Subscriber.Lists` |\n| `TEMPLATE_METHODS` | `Template` |\n| `TRIGGERED_SEND_METHODS` | `TriggeredSend` |\n| `TRIGGERED_SEND_TRACKING_METHODS` | `TriggeredSend.Tracking` |\n| `TRIGGERED_SEND_TRACKING_CLICKS_METHODS` | `TriggeredSend.Tracking.Clicks` |\n| `TRIGGERED_SEND_TRACKING_TOTAL_BY_INTERVAL_METHODS` | `TriggeredSend.Tracking.TotalByInterval` |\n\n### `ssjsGlobalsLookup` / `coreMethodArityLookup`\n\nAdditional O(1) lookup maps:\n\n```js\nimport { ssjsGlobalsLookup, coreMethodArityLookup } from 'ssjs-data';\n\n// Lookup a global by lowercase name\nconst writeGlobal = ssjsGlobalsLookup.get('write');\n\n// Lookup arity (min/max args) of a Core library method by 'ObjectName.methodName'\nconst arity = coreMethodArityLookup.get('DataExtension.Init');\n// e.g. { minArgs: 1, maxArgs: 1 }\n```\n\n### `SCRIPT_UTIL_CONSTRUCTORS` / `SCRIPT_UTIL_REQUEST_METHODS`\n\n`Script.Util` constructors (e.g. `Script.Util.HttpRequest`) and their instance methods:\n\n```js\nimport { SCRIPT_UTIL_CONSTRUCTORS, SCRIPT_UTIL_REQUEST_METHODS } from 'ssjs-data';\n\nfor (const ctor of SCRIPT_UTIL_CONSTRUCTORS) {\n    console.log(ctor.name);       // e.g. 'HttpRequest'\n    console.log(ctor.returnType); // e.g. 'HttpRequest'\n}\n\nfor (const method of SCRIPT_UTIL_REQUEST_METHODS) {\n    console.log(method.name);     // e.g. 'send', 'setHeader'\n}\n```\n\n### `ECMASCRIPT_BUILTINS`\n\nECMAScript built-in methods and properties supported by the SSJS engine:\n\n```js\nimport { ECMASCRIPT_BUILTINS } from 'ssjs-data';\n\nfor (const builtin of ECMASCRIPT_BUILTINS) {\n    console.log(builtin.name);    // e.g. 'push', 'slice'\n    console.log(builtin.owner);   // e.g. 'Array', 'String', 'Math'\n    console.log(builtin.description);\n}\n```\n\n### `UNSUPPORTED_SYNTAX` / `unsupportedByNodeType`\n\nJavaScript syntax constructs that the SSJS engine does not support:\n\n```js\nimport { UNSUPPORTED_SYNTAX, unsupportedByNodeType } from 'ssjs-data';\n\nfor (const item of UNSUPPORTED_SYNTAX) {\n    console.log(item.nodeType);   // AST node type, e.g. 'ArrowFunctionExpression'\n    console.log(item.name);       // human-readable name\n    console.log(item.description);\n}\n\n// Keyed lookup by AST node type\nconst info = unsupportedByNodeType.get('ArrowFunctionExpression');\n```\n\n### `POLYFILLABLE_METHODS` / `polyfillByPrototypeName` / `polyfillByStaticName`\n\nMethods that are absent from the SSJS engine but can be polyfilled:\n\n```js\nimport { POLYFILLABLE_METHODS, polyfillByPrototypeName, polyfillByStaticName } from 'ssjs-data';\n\nfor (const method of POLYFILLABLE_METHODS) {\n    console.log(method.name);       // e.g. 'startsWith'\n    console.log(method.owner);      // e.g. 'String'\n    console.log(method.description);\n}\n\n// Lookup by prototype method name (e.g. 'startsWith')\nconst info = polyfillByPrototypeName.get('startsWith');\n\n// Lookup by static invocation name (e.g. 'Array.isArray')\nconst info2 = polyfillByStaticName.get('Array.isArray');\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoernberkefeld%2Fssjs-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoernberkefeld%2Fssjs-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoernberkefeld%2Fssjs-data/lists"}