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

@bccampus/kaltura-client

v1.1.0

Published

Kaltura Typescript client (readonly)

Readme

Kaltura Typescript Client

A read-only facade to Kaltura server with typescript support for read/query action requests, classes and enums.

Instructions

Getting Started

This build is read-only. Actions that upload, create, edit or delete server resources are intentionally not exposed. Authentication/session bootstrap actions remain available so you can obtain a KS for reading data.

Building the sources

This library is auto-generated using kaltura/clients-generator php engine, and then modified to use modern tools and to make it read-only and dependency-free.

The package is built with Vite (npm run build), which emits one module file plus one .d.ts file per source module so deep imports keep working. TypeScript interfaces re-exported from barrel files must be marked with the inline type modifier (for example export { Foo, type FooArgs } from './Foo'), otherwise Rolldown treats them as missing runtime exports.

Code is formatted with Oxfmt: npm run format rewrites files and npm run format:check verifies them (used by CI).

Running tests

The test suite is powered by Vitest and requires Node.js 22.12 or newer.

  • Run npm test to run the unit tests. They use a mocked HTTP transport and don't require network access.
  • Use npm run test:watch while developing.

Running integration tests

Live integration tests are skipped by default. They call a real Kaltura server and depend on the data available in the configured account.

Enable them with KALTURA_INTEGRATION_TEST=1:

KALTURA_INTEGRATION_TEST=1 npm test

On PowerShell:

$env:KALTURA_INTEGRATION_TEST="1"; npm test

The following environment variables can be used to point the integration tests at another account:

| Variable | Purpose | | -------------------------- | --------------------------------- | | KALTURA_ENDPOINT | API endpoint | | KALTURA_PARTNER_ID | Partner id | | KALTURA_USER | User id used to start the session | | KALTURA_ADMIN_SECRET | Admin secret | | KALTURA_SESSION_TYPE | user (default) or admin | | KALTURA_CLIENT_TAG | Value sent as clientTag | | KALTURA_INTEGRATION_TEST | Running integration tests |

If you want to test the library against the production server, set KALTURA_ENDPOINT to your production API endpoint.

Example

import { KalturaClient } from "@bccampus/kaltura-client";
import { SessionStartAction } from "@bccampus/kaltura-client/api/types/SessionStartAction";
import { KalturaSessionType } from "@bccampus/kaltura-client/api/types/KalturaSessionType";
import { MediaGetAction } from "@bccampus/kaltura-client/api/types/MediaGetAction";

const client = new KalturaClient({
  clientTag: "BCcampus_Resource_Importer",
  endpointUrl: "https://api.ca.kaltura.com",
});

async function startSession() {
  const sessionStartAction = new SessionStartAction({
    partnerId: 0,
    secret: "xxxxxxxxxxxxxxxxxxxxxxxxx",
    userId: "test-user",
    type: KalturaSessionType.admin,
    expiry: 3600,
    privileges: "disableentitlement",
  });

  try {
    const session = await client.request(sessionStartAction);

    if (session) {
      client.setDefaultRequestOptions({ ks: session });
      return true;
    }

    console.log("Failed to start kaltura session");
    return false;
  } catch (error) {
    console.log(`Kaltura session error: \n ${error}`);
    return false;
  }
}

async function getVideoById(id: string) {
  if (!(await startSession())) return null;

  const media = await client.request(
    new MediaGetAction({
      entryId: id,
    }),
  );

  return media;
}

await getVideoById("0_qwerty");