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

@1440io/msp-types

v0.4.0

Published

TypeScript types generated from the 1440 Apple Messages for Business MSP API OpenAPI spec, plus curated aliases and enum vocabularies.

Readme

@1440io/msp-types

TypeScript types for the 1440 Apple Messages for Business MSP API, generated from the OpenAPI 3.1 document with openapi-typescript.

npm install --save-dev @1440io/msp-types

You usually do not need to install this directly — @1440io/msp-api and @1440io/msp-webhooks both depend on it and re-export what they use. Install it when you want the raw spec types in code that does not use either client.

Curated aliases

The short names for the shapes you actually touch:

import type {
  Conversation,
  ConversationMessage,
  SendMessageBody,
  SendMessageSuccess,
  MessagingInvitation,
  RichTemplateDetail,
  WebhookEvent,
  WebhookMessageReceivedEvent,
  InboundMessage,
  InboundContent,
  InboundContentOfKind,
} from '@1440io/msp-types';

Message content

Every content variant is a named type, so a function can be annotated with the exact shape it handles:

import type {
  InboundText, InboundQuickReplyResponse, InboundTimePickerResponse,
  InboundFormResponse, InboundAuthenticationResponse,
  InboundContent, InboundContentOfKind,
  OutboundContent, RawContent,
} from '@1440io/msp-types';

function onSlotChosen(reply: InboundTimePickerResponse) { /* … */ }

// Or pull a variant out of the union by its tag.
type OptOut = InboundContentOfKind<'opt_out'>;

InboundMessageVisible and InboundMessageRedacted split an inbound message by whether its body was delivered; redacted and content move together, so narrowing on one settles the other.

RawContentOfKind does the same job for the raw send union — including RawContentOfKind<'amb.url_payload'>, the Apple Music / Apple Maps / App Clip URL that Apple turns into a rich link at send time.

Raw generated surface

Everything the spec declares, unmodified:

import type { components, operations, paths, webhooks } from '@1440io/msp-types';

type Conversation = components['schemas']['ConversationListItem'];
type SendParams = operations['sendConversationMessage'];

Or by name, through the helpers:

import type { Schema, Operation } from '@1440io/msp-types';

type Detail = Schema<'RichTemplateDetail'>;
type Send = Operation<'sendConversationMessage'>;

The complete generated module is also exported at @1440io/msp-types/openapi.

Enum vocabularies

The spec declares its enums as string unions, which vanish at runtime. This package pairs each with a frozen array you can iterate, validate against, or drive a UI from:

import {
  CHANNEL_PLATFORMS,
  CONVERSATION_STATUSES,
  AGENT_STATUSES,
  INVITATION_STATUSES,
  TERMINAL_INVITATION_STATUSES,
  RICH_TEMPLATE_STATUSES,
  RICH_TEMPLATE_TYPES,
  RICH_ASSET_USAGES,
  RICH_REASON_CODES,
  INBOUND_CONTENT_KINDS,
  INTERACTIVE_CONTENT_KINDS,
  DEVICE_CAPABILITIES,
  isTerminalInvitationStatus,
} from '@1440io/msp-types';

if (isTerminalInvitationStatus(invitation.status)) {
  // No further transitions are coming.
}

Each array is satisfies readonly T[], so if the spec adds a value and the array is not updated, the build fails rather than drifting quietly.

Regenerating

npm run generate   # from the repo root

src/openapi.ts is generated wholesale from spec/1440-cloud-openapi.json — never hand-edit it. Curated aliases live in src/index.ts.

License

MIT