UNPKG

ltfi-wsap

Version:

Official Node.js/TypeScript SDK for LTFI-WSAP (Web System Alignment Protocol) by Kief Studio - Part of the LTFI ecosystem

151 lines (135 loc) 3.08 kB
/** * LTFI-WSAP Type Definitions */ export interface WSAPConfig { apiKey: string; baseURL: string; timeout: number; retries: number; debug: boolean; } export enum DisclosureLevel { BASIC = 'basic', STANDARD = 'standard', DETAILED = 'detailed', COMPLETE = 'complete' } export enum VerificationStatus { PENDING = 'pending', VERIFIED = 'verified', FAILED = 'failed', EXPIRED = 'expired' } export enum EntityType { // Commercial entities COMPANY = 'company', SOLE_PROP = 'sole_prop', PARTNERSHIP = 'partnership', FRANCHISE = 'franchise', SUBSIDIARY = 'subsidiary', // Non-commercial entities NONPROFIT = 'nonprofit', GOVERNMENT = 'government', EDUCATION = 'education', HEALTHCARE = 'healthcare', RELIGIOUS = 'religious', ASSOCIATION = 'association', COMMUNITY = 'community', // Digital/Individual entities PERSONAL = 'personal', CREATOR = 'creator', OPENSOURCE = 'opensource', ONLINE_COMMUNITY = 'online_community', SAAS = 'saas', DAO = 'dao', AI_AGENT = 'ai_agent', // Special entities PORTFOLIO = 'portfolio', MARKETPLACE = 'marketplace', PLATFORM = 'platform', EVENT = 'event', CAMPAIGN = 'campaign', PROJECT = 'project', OTHER = 'other' } export interface Entity { id: number; entity_id: string; // UUID field entity_type: string; legal_name?: string; display_name: string; slug: string; // 16-char unique identifier parent_entity?: number; created_by: number; is_active: boolean; is_published: boolean; is_verified: boolean; template_id?: string; inherits_from_parent: boolean; wsap_data?: Record<string, any>; created_at: Date; updated_at: Date; } export interface Domain { domain: string; is_verified: boolean; is_primary: boolean; verified_at?: Date; } export interface Verification { status: VerificationStatus; method?: string; verified_at?: Date; verification_token?: string; txt_record_name?: string; txt_record_value?: string; } export interface WSAPData { version: string; entity: Entity; domains: Domain[]; verification: Verification; disclosure_level: DisclosureLevel; generated_at: Date; basic_info?: Record<string, any>; contact_info?: Record<string, any>; legal_info?: Record<string, any>; business_info?: Record<string, any>; } export interface CreateEntityRequest { entity_type: string; legal_name?: string; display_name: string; domains?: string[]; description?: string; } export interface UpdateEntityRequest { legal_name?: string; display_name?: string; description?: string; is_active?: boolean; is_published?: boolean; } export interface PaginatedResponse<T> { count: number; next?: string; previous?: string; results: T[]; } export interface AuthTokens { access: string; refresh: string; } export interface User { id: number; username: string; email: string; first_name?: string; last_name?: string; is_active: boolean; is_staff: boolean; is_superuser: boolean; groups: string[]; permissions: string[]; date_joined: Date; }