npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@adobe/vega-aepcore

v1.0.1

Published

Adobe Experience Platform support for vega apps.

Readme

Adobe Experience Platform Vega SDK — Core API Reference

This document lists the public APIs provided by @adobe/vega-aepcore for Adobe Experience Platform on Amazon Vega (Kepler) React Native applications, with TypeScript-oriented usage samples.

IMPORTANT: Call AEPSDK.initialize() before calling any other SDK API. Provide a valid edge.configId (Datastream ID) in initialize or updateConfiguration so Edge-related calls can succeed.


Contents


Core APIs

initialize

Initializes the SDK. Must be invoked before other SDK APIs.

The optional options object can include configuration, log level, and extensions: an array of Extension instances to register when the SDK starts (optional; omit if you do not use additional extensions).

Syntax

interface InitOptions {
  config?: Record<string, unknown>;
  logLevel?: LogLevel;
  extensions?: Array<Extension>;
}

function initialize(options?: InitOptions): Promise<void>;

Parameters

  • options (optional)
    • config: Configuration keys — see Configuration keys.
    • logLevel: Logging level (LogLevel enum).
    • extensions: Array of Extension instances to register at startup.

Example

import { AEPSDK, LogLevel } from '@adobe/vega-aepcore';

await AEPSDK.initialize({
  config: {
    'edge.configId': '<YOUR_DATASTREAM_ID>',
  },
  logLevel: LogLevel.VERBOSE,
});

To register optional extensions, pass extensions: [yourExtension, ...] using Extension instances from your integration packages.


updateConfiguration

Updates SDK configuration. If configuration was passed to initialize, calling updateConfiguration merges/overrides as implemented by the configuration module.

Syntax

function updateConfiguration(config: Record<string, unknown>): void;

Example

import { AEPSDK } from '@adobe/vega-aepcore';

AEPSDK.updateConfiguration({
  'edge.configId': '<YOUR_DATASTREAM_ID>',
  'edge.domain': '<YOUR_COMPANY_SUBDOMAIN>',
  'consent.default': {
    consents: {
      collect: {
        val: 'p',
      },
    },
  },
});

NOTE Some APIs require valid configuration before network calls; hits may be queued until edge.configId is set.


setLogLevel

Sets the SDK log level.

Syntax

enum LogLevel {
  ERROR = 0,
  WARNING = 1,
  DEBUG = 2,
  VERBOSE = 3,
}

function setLogLevel(logLevel: LogLevel): void;

LogLevel is exported from:

import { LogLevel } from '@adobe/vega-aepcore';

Example

import { AEPSDK, LogLevel } from '@adobe/vega-aepcore';

AEPSDK.setLogLevel(LogLevel.VERBOSE);

getLogLevel

Returns the current log level.

Syntax

function getLogLevel(): LogLevel;

Example

import { AEPSDK } from '@adobe/vega-aepcore';

const level = AEPSDK.getLogLevel();

version

The SDK exposes a string version on the AEPSDK object (aligned with the core extension version).

Syntax

// AEPSDK.version is a readonly string on the exported object

Example

import { AEPSDK } from '@adobe/vega-aepcore';

console.log(AEPSDK.version);

Edge APIs

getExperienceCloudId

Returns the Experience Cloud ID (ECID) for the user, or null if unavailable.

Syntax

function getExperienceCloudId(): Promise<string | null>;

Example (async/await)

import { AEPSDK } from '@adobe/vega-aepcore';

const ecid = await AEPSDK.getExperienceCloudId();
if (ecid) {
  // use ecid
}

Example (then)

AEPSDK.getExperienceCloudId().then((ecid) => {
  if (ecid) {
    // use ecid
  }
});

sendEvent

Sends an Experience Event to Adobe Experience Edge. Payload should include XDM data as required by your schema.

Syntax

function sendEvent(event: Record<string, unknown>): void;

Example

import { AEPSDK } from '@adobe/vega-aepcore';

AEPSDK.sendEvent({
  xdm: {
    eventType: 'commerce.orderPlaced',
    commerce: {
      /* ... */
    },
  },
  data: {
    customKey: 'customValue',
  },
});

sendEventWithResponse

Sends an event and returns a Promise of Edge responses. Invalid payloads may cause the promise to reject — use try/catch or .catch().

Syntax

function sendEventWithResponse(
  event: Record<string, unknown>
): Promise<Array<Record<string, unknown>>>;

Example

import { AEPSDK } from '@adobe/vega-aepcore';

try {
  const responses = await AEPSDK.sendEventWithResponse({
    xdm: { eventType: 'example.event' },
    data: { customKey: 'customValue' },
  });
  console.log(JSON.stringify(responses));
} catch (error) {
  console.log('sendEventWithResponse error:', error);
}

setConsent

Sends consent preferences to the Edge Network. Use a payload that matches your organization’s consent schema (e.g. Adobe standard 2.0 where applicable).

Syntax

function setConsent(consent: Record<string, unknown>): void;

Example

import { AEPSDK } from '@adobe/vega-aepcore';

AEPSDK.setConsent({
  consent: [
    {
      standard: 'Adobe',
      version: '2.0',
      value: {
        collect: {
          val: 'y',
        },
        metadata: {
          time: new Date().toISOString(),
        },
      },
    },
  ],
});

Configuration keys

Reserved keys for the configuration object passed to initialize / updateConfiguration:

| Key | Type | Required | Description | | --- | --- | --- | --- | | edge.configId | String | Yes | Datastream ID. Shown as Datastream ID in Datastream details. | | edge.domain | String | No | First-party domain mapped to Adobe Edge — see Edge Network domain configuration. | | consent.default | Object | No | Default consent when user preference is unknown or pending. |


More documentation