@lpextend/lp-types
v0.1.0
Published
Canonical TypeScript types for the LivePerson REST APIs. Pure types, zero runtime. Single source of truth across the extend monorepo.
Downloads
280
Readme
@lpextend/lp-types
Canonical TypeScript types for the LivePerson REST APIs. Pure types, zero runtime. Single source of truth across the extend-ai monorepo.
What this is
A pure-types package that captures the real shapes returned by LP REST APIs across account config, campaigns, Conversation Builder, KnowledgeAI, AI Studio, messaging history, FaaS, and connectors. Types are derived from the most-complete sources in the codebase (node-sdk, copilot-api, copilot-web) with conflicts resolved and documented.
How to import
// Preferred — import by domain (tree-shakable)
import type { LpSkillFull, LpSkillCreate } from '@lpextend/lp-types/account-config';
import type { LpCampaign, LpEngagement } from '@lpextend/lp-types/campaigns';
import type { LpCbBot, LpCbInteraction } from '@lpextend/lp-types/conversation-builder';
import type { LpKaiKnowledgeBase, LpKaiArticle } from '@lpextend/lp-types/kai';
import type { LpAisFlow } from '@lpextend/lp-types/ai-studio';
import type { LpConversationRecord } from '@lpextend/lp-types/messaging-history';
// Or import everything from root
import type { LpSkillFull, LpCampaign, LpCbBot } from '@lpextend/lp-types';
// API paths and version notes
import { LP_API_PATHS, LP_CAMPAIGN_STATUS } from '@lpextend/lp-types';Summary vs Full convention
LP Account Config list endpoints return thin summaries by default (id, name, deleted only). Adding select=$all returns the full record.
// Thin list — GET /le-users/skills?v=2.0
type LpSkillSummary = { id: number; name: string; deleted?: boolean };
// Full record — GET /le-users/skills?v=2.0&select=$all
type LpSkillFull = LpSkillSummary & { lobIds?, workingHoursId?, ... };Exception: LpCampaign and LpEngagement — these do NOT have separate Summary/Full variants because the LP API does not support select=$all for campaigns and engagements (it returns 400).
Key API version notes
| Resource | List version | Mutation version |
|---|---|---|
| Skills, LOBs, Profiles, Groups | ?v=2.0&select=$all | ?v=2.0 |
| Users | ?v=5.0&select=$all | ?v=6.0 |
| Campaigns, Engagements | ?v=3.4 (NO select=$all) | ?v=3.4 |
| Goals, Entry Points | ?v=3.0 | ?v=3.0 |
| Predefined Content | ?v=1.0&select=$all (NOT v=2.0) | ?v=1.0 |
Reconciliation log
Conflicts between sources are documented in:
e:\apps\lp-extend\extend-ai\docs\LP_TYPES_RECONCILE.md
Each conflict entry shows all sources, which shape was chosen, and whether a user decision is needed.
Domains covered
account-config, campaigns, conversation-builder, kai, ai-studio, messaging-history, faas, connectors, shared (enums + base types)
