Sign In

ampscript-data

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampscript-data - npm Package Compare versions

Comparing version
3.1.1
to
3.2.0
+1
-1
package.json
{
"name": "ampscript-data",
"version": "3.1.1",
"version": "3.2.0",
"description": "Canonical AMPscript function catalog, keywords, and personalization strings for SFMC tooling",

@@ -5,0 +5,0 @@ "type": "module",

@@ -35,2 +35,3 @@ # ampscript-data

getMcnNotes,
VERIFICATION_BLOCKED_REASONS,
} from 'ampscript-data';

@@ -65,2 +66,46 @@ ```

#### Optional: `validArities`
Most functions accept any argument count in the contiguous `minArgs..maxArgs` range. A function with a **discontinuous overload** — where intermediate counts are invalid — additionally sets `validArities`, the exact set of permitted argument counts:
```js
import { functionLookup } from 'ampscript-data';
const entry = functionLookup.get('somefunction');
if (entry.validArities) {
// e.g. minArgs: 1, maxArgs: 6, validArities: [1, 6] — 2-5 arguments are invalid
const isValidCall = entry.validArities.includes(argumentCount);
}
```
The array is always strictly ascending integers and includes both `minArgs` (first element) and `maxArgs` (last element). When absent, the arity range is purely contiguous — which is currently the case for every AMPscript function.
#### Optional: verification state
| Field | Type | Description |
|---|---|---|
| `isConfirmed` | `boolean` | `true` when the behavior was verified against the live AMPscript engine; absent means never checked |
| `verificationBlocked` | `boolean` | `true` when verification was attempted but could not complete; requires `isConfirmed: false` and a `verificationBlockedReason` |
| `verificationBlockedReason` | `string` | One of `VERIFICATION_BLOCKED_REASONS`; only valid together with `verificationBlocked: true` |
| `differsFromOfficialDocs` | `boolean` | `true` when the verified runtime behavior contradicts the official Salesforce reference; requires `officialDocsNote` |
| `officialDocsNote` | `string` | What the official docs claim, what the runtime actually did, and what was tried |
### `VERIFICATION_BLOCKED_REASONS`
A frozen array of the blocker categories that may be used as `verificationBlockedReason`:
```js
import { VERIFICATION_BLOCKED_REASONS } from 'ampscript-data';
// ['no-working-invocation', 'needs-auth-context', 'no-test-data',
// 'classic-only-no-assets', 'destructive-unsafe']
```
| Value | Meaning |
|---|---|
| `no-working-invocation` | Probing found no invocation shape that works |
| `needs-auth-context` | Requires an authenticated / session / subscriber state the probe context cannot supply |
| `no-test-data` | Requires pre-existing data or an integration not provisioned on the BU |
| `classic-only-no-assets` | Only works with classic (legacy) assets and none exist to test against |
| `destructive-unsafe` | Cannot be exercised without unacceptable side effects |
### `functionLookup`

@@ -67,0 +112,0 @@

Sorry, the diff of this file is too big to display