Skip to content

Types Reference

The SDK exports service request, response, entity, filter, analytics, and provider-specific types from the package root.

typescript
import type {
  ApiListResponse,
  ApiResponse,
  Campaign,
  CampaignActionType,
  Client,
  CreateClientRequest,
  CreatePassRequest,
  EventCategory,
  Pass,
  PassTemplate,
  SegmentFilter,
  Transaction,
  WalletType,
  Workspace,
} from "@wallethero/sdk";

References

  • Entities — clients, passes, templates, projects, campaigns, and other resources
  • Requests — representative create/update inputs
  • Filters — current segment filter configurations

Common response types

typescript
interface ApiResponse<T> {
  data: T;
}

interface ApiListResponse<T> {
  data: T[];
  meta?: {
    total_count?: number;
    filter_count?: number;
  };
}

Some convenience and analytics methods return their value directly. Use the installed declarations as the authoritative contract for each method.

Current unions

typescript
type PassType = "LOYALTY" | "GIFT_CARD" | "EVENT_TICKET" | "OFFER" | "GENERIC";
type BarcodeType = "none" | "qr" | "aztec" | "code128" | "pdf417";

type CampaignStatus =
  | "draft"
  | "scheduled"
  | "active"
  | "completed"
  | "cancelled";

type CampaignActionType =
  | "push_notification"
  | "template_switch"
  | "custom_field_update"
  | "give_reward"
  | "assign_tier";

type EventCategory =
  | "field_change"
  | "transaction"
  | "engagement"
  | "loyalty"
  | "pass_lifecycle"
  | "integration"
  | "referral";

Types for provider modules, mobile configuration, automation rules, loyalty, tiers, rewards, referrals, reporting, and public clients are also exported from @wallethero/sdk.

WalletHero Documentation