@elqnt/admin 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../models/admin.ts","../../models/billing.ts"],"sourcesContent":["// Code generated by tygo. DO NOT EDIT.\n// Code generated by tygo. DO NOT EDIT.\n// Migrated from @elqnt/types/models/admin-models.ts to @elqnt/admin\nimport { ResponseMetadata } from \"@elqnt/types\";\n\n//////////\n// source: admin-models.go\n\nexport interface Address {\n line1: string;\n line2: string;\n city: string;\n state: string;\n country: string;\n zip: string;\n}\n/**\n * Org is one organization. With per-product DB + row-level tenancy,\n * the DB the org lives in (admin_eloquent / admin_pumba / …) implies\n * the product — there is no longer a product column on the row. With\n * the system_*\\/org_* artifact split, there's also no per-org artifact\n * provisioning state to track. See docs/_db_v2/03_system_org_split.md.\n */\nexport interface Org {\n id?: string /* uuid */;\n title: string;\n description?: string;\n logoUrl: string;\n mainDomain: string;\n address: Address;\n /**\n * Localization & runtime preferences\n */\n defaultLang?: string;\n timezone?: string;\n settings?: { [key: string]: any};\n /**\n * Status & Control\n */\n status: OrgStatusTS;\n enabled: boolean;\n /**\n * Classification\n */\n type: OrgTypeTS;\n size?: OrgSizeTS;\n industry?: string;\n /**\n * Country is the org's jurisdiction code (e.g. \"UAE\", \"KSA\", \"QA\"). It\n * scopes which system compliance libraries the org sees in the library\n * section. Empty = unset (all system libraries visible). Validated against\n * SupportedCountries; see common/admin/countries.go and\n * docs/_db_v2/08_country_scoped_libraries.md.\n */\n country?: string;\n tags?: string[];\n /**\n * Subscription (Stripe)\n */\n subscription?: OrgSubscription;\n userCount: number /* int64 */;\n /**\n * Onboarding wizard state (per-user UX flow, not artifact provisioning)\n */\n onboarding?: OrgOnboarding;\n /**\n * Template & Roles\n */\n template?: OrgTemplate;\n roles: string[];\n /**\n * Flexible metadata\n */\n metadata?: { [key: string]: any};\n /**\n * Audit fields\n */\n createdAt?: number /* int64 */;\n updatedAt?: number /* int64 */;\n createdBy?: string;\n updatedBy?: string;\n}\nexport type OrgStatus = string;\nexport const OrgStatusActive: OrgStatus = \"active\";\nexport const OrgStatusSuspended: OrgStatus = \"suspended\";\n\nexport const OrgStatuses = {\n active: { value: 'active', label: 'Active' },\n suspended: { value: 'suspended', label: 'Suspended' },\n} as const;\nexport type OrgStatusTS = keyof typeof OrgStatuses;\nexport type OrgStatusOptionTS = typeof OrgStatuses[OrgStatusTS];\n\n/**\n * OrgType represents whether the org is self-serve or enterprise\n */\nexport type OrgType = string;\nexport const OrgTypeSelfServe: OrgType = \"self-serve\";\nexport const OrgTypeEnterprise: OrgType = \"enterprise\";\n\nexport const OrgTypes = {\n \"self-serve\": { value: 'self-serve', label: 'Self-Serve' },\n enterprise: { value: 'enterprise', label: 'Enterprise' },\n} as const;\nexport type OrgTypeTS = keyof typeof OrgTypes;\nexport type OrgTypeOptionTS = typeof OrgTypes[OrgTypeTS];\n\n/**\n * OrgSize represents the size of the organization\n */\nexport type OrgSize = string;\nexport const OrgSizeSolo: OrgSize = \"solo\";\nexport const OrgSizeSmall: OrgSize = \"small\";\nexport const OrgSizeMedium: OrgSize = \"medium\";\nexport const OrgSizeLarge: OrgSize = \"large\";\nexport const OrgSizeEnterprise: OrgSize = \"enterprise\";\n\nexport const OrgSizes = {\n solo: { value: 'solo', label: 'Just me' },\n small: { value: 'small', label: '2-10' },\n medium: { value: 'medium', label: '11-50' },\n large: { value: 'large', label: '51-200' },\n enterprise: { value: 'enterprise', label: '200+' },\n} as const;\nexport type OrgSizeTS = keyof typeof OrgSizes;\nexport type OrgSizeOptionTS = typeof OrgSizes[OrgSizeTS];\n\n\n\n/**\n * OnboardingStatus represents the status of an onboarding flow\n */\nexport type OnboardingStatus = string;\nexport const OnboardingStatusPending: OnboardingStatus = \"pending\";\nexport const OnboardingStatusInProgress: OnboardingStatus = \"in_progress\";\nexport const OnboardingStatusCompleted: OnboardingStatus = \"completed\";\nexport const OnboardingStatusSkipped: OnboardingStatus = \"skipped\";\nexport const OnboardingStatusLegacy: OnboardingStatus = \"legacy\"; // For users created before onboarding\n\nexport const OnboardingStatuses = {\n pending: { value: 'pending', label: 'Pending' },\n in_progress: { value: 'in_progress', label: 'In Progress' },\n completed: { value: 'completed', label: 'Completed' },\n skipped: { value: 'skipped', label: 'Skipped' },\n legacy: { value: 'legacy', label: 'Legacy' },\n} as const;\nexport type OnboardingStatusTS = keyof typeof OnboardingStatuses;\nexport type OnboardingStatusOptionTS = typeof OnboardingStatuses[OnboardingStatusTS];\n\n/**\n * OrgOnboarding tracks the onboarding progress for an organization\n */\nexport interface OrgOnboarding {\n status: OnboardingStatus;\n currentStep: number /* int */;\n completedAt?: number /* int64 */;\n skippedSteps?: number /* int */[];\n}\nexport interface OrgSubscription {\n plan: string;\n platform: SubscriptionPlatform;\n status: OrgSubscriptionStatus;\n trialEndsAt?: number /* int64 */;\n currentPeriodEnd?: number /* int64 */;\n seats?: number /* int */;\n stripeCustomerId?: string;\n stripeSubscriptionId?: string;\n cancelledAt?: number /* int64 */;\n cancelReason?: string;\n gracePeriodEndsAt?: number /* int64 */;\n}\nexport type OrgSubscriptionStatus = string;\nexport const OrgSubscriptionStatusTrialing: OrgSubscriptionStatus = \"trialing\";\nexport const OrgSubscriptionStatusActive: OrgSubscriptionStatus = \"active\";\nexport const OrgSubscriptionStatusPastDue: OrgSubscriptionStatus = \"past_due\";\nexport const OrgSubscriptionStatusCancelled: OrgSubscriptionStatus = \"cancelled\";\nexport const OrgSubscriptionStatusUnpaid: OrgSubscriptionStatus = \"unpaid\";\n\nexport const OrgSubscriptionStatuses = {\n trialing: { value: 'trialing', label: 'Trialing' },\n active: { value: 'active', label: 'Active' },\n past_due: { value: 'past_due', label: 'Past Due' },\n cancelled: { value: 'cancelled', label: 'Cancelled' },\n unpaid: { value: 'unpaid', label: 'Unpaid' },\n} as const;\nexport type OrgSubscriptionStatusTS = keyof typeof OrgSubscriptionStatuses;\nexport type OrgSubscriptionStatusOptionTS = typeof OrgSubscriptionStatuses[OrgSubscriptionStatusTS];\n\nexport interface OrgResponse {\n org: Org;\n metadata: ResponseMetadata;\n}\nexport interface OrgInfoResponse {\n orgInfo: OrgInfo;\n metadata: ResponseMetadata;\n}\nexport interface OrgRoleResponse {\n role: OrgRole;\n metadata: ResponseMetadata;\n}\nexport interface ListOrgsResponse {\n orgs: Org[];\n metadata: ResponseMetadata;\n}\nexport interface ListOrgRolesResponse {\n roles: OrgRole[];\n metadata: ResponseMetadata;\n}\nexport interface OrgInfo {\n id?: string;\n title: string;\n logoUrl: string;\n mainDomain?: string;\n}\nexport interface AzureSettings {\n appClientId?: string;\n appClientSecret?: string;\n azureTenantId?: string;\n}\nexport interface OrgTemplate {\n id: string /* uuid */;\n slug: string;\n title: string;\n}\nexport interface UserOrgAccess {\n orgId?: string /* uuid */;\n orgTitle?: string;\n roles: string[];\n isSingleAccount: boolean;\n entityRecordFilter?: { entityName: string; recordId: string; displayValue?: string };\n}\n/**\n * UserSettings represents user preferences (elastic JSON structure)\n */\nexport interface UserSettings {\n theme?: string; // \"system\" | \"light\" | \"dark\"\n language?: string; // \"auto\" | \"en\" | \"ar\" | etc.\n timezone?: string; // \"auto\" | \"America/New_York\" | etc.\n occupation?: string; // User's occupation/role\n company?: string; // User's company/organization\n}\n\nexport const ThemeOptions = {\n system: { value: 'system', label: 'System' },\n light: { value: 'light', label: 'Light' },\n dark: { value: 'dark', label: 'Dark' },\n} as const;\nexport type ThemeOptionTS = keyof typeof ThemeOptions;\n\n/**\n * NotificationPreferences represents user notification settings\n */\nexport interface NotificationPreferences {\n pushEnabled: boolean;\n newChatAssignment: boolean;\n newMessages: boolean;\n escalations: boolean;\n urgentOnly: boolean;\n soundEnabled: boolean;\n doNotDisturb: boolean;\n dndStart?: string; // \"22:00\" format\n dndEnd?: string; // \"08:00\" format\n}\n/**\n * UserSource represents how a user was created\n */\nexport type UserSource = string;\nexport const UserSourceSignup: UserSource = \"signup\"; // Self-registered\nexport const UserSourceInvite: UserSource = \"invite\"; // Invited by team member\nexport const UserSourceSSO: UserSource = \"sso\"; // Auto-provisioned via SSO\nexport const UserSourceAPI: UserSource = \"api\"; // Created via API\n\nexport const UserSources = {\n signup: { value: 'signup', label: 'Signup' },\n invite: { value: 'invite', label: 'Invite' },\n sso: { value: 'sso', label: 'SSO' },\n api: { value: 'api', label: 'API' },\n} as const;\nexport type UserSourceTS = keyof typeof UserSources;\nexport type UserSourceOptionTS = typeof UserSources[UserSourceTS];\n\n/**\n * InviteStatus represents the status of an invitation\n */\nexport type InviteStatus = string;\nexport const InviteStatusPending: InviteStatus = \"pending\";\nexport const InviteStatusAccepted: InviteStatus = \"accepted\";\nexport const InviteStatusExpired: InviteStatus = \"expired\";\nexport const InviteStatusRevoked: InviteStatus = \"revoked\";\n\nexport const InviteStatuses = {\n pending: { value: 'pending', label: 'Pending' },\n accepted: { value: 'accepted', label: 'Accepted' },\n expired: { value: 'expired', label: 'Expired' },\n revoked: { value: 'revoked', label: 'Revoked' },\n} as const;\nexport type InviteStatusTS = keyof typeof InviteStatuses;\nexport type InviteStatusOptionTS = typeof InviteStatuses[InviteStatusTS];\n\n/**\n * Invite represents a team/org invitation\n */\nexport interface Invite {\n id?: string /* uuid */;\n orgId: string /* uuid */;\n email: string;\n role: string;\n invitedBy: string /* uuid */;\n status: InviteStatusTS;\n acceptedBy?: string /* uuid */;\n acceptedAt?: number /* int64 */;\n expiresAt?: number /* int64 */;\n createdAt?: number /* int64 */;\n updatedAt?: number /* int64 */;\n}\nexport interface InviteResponse {\n invite: Invite;\n metadata: ResponseMetadata;\n}\nexport interface ListInvitesResponse {\n invites: Invite[];\n metadata: ResponseMetadata;\n}\n/**\n * UserOnboarding tracks the onboarding progress for a user\n */\nexport interface UserOnboarding {\n status: OnboardingStatus;\n completedAt?: number /* int64 */;\n}\n/**\n * User represents a user in the system\n */\nexport interface User {\n id?: string /* uuid */;\n email: string;\n firstName: string;\n lastName: string;\n authProviderName: string;\n orgAccess?: UserOrgAccess[];\n /**\n * Status & Control\n */\n enabled?: boolean;\n /**\n * Source tracking\n */\n source?: UserSourceTS;\n invitedBy?: string /* uuid */;\n inviteStatus?: InviteStatusTS;\n /**\n * Team membership - LEGACY, DO NOT USE\n * These fields are deprecated and will be removed.\n * Use Org and OrgAccess patterns instead.\n */\n isTeamAdmin?: boolean;\n teamId?: string;\n teamName?: string;\n /**\n * System admin flag\n */\n isSysAdmin?: boolean;\n /**\n * Preferences\n */\n settings?: UserSettings;\n notificationPreferences?: NotificationPreferences;\n /**\n * Onboarding tracking\n */\n onboarding?: UserOnboarding;\n /**\n * Flexible metadata\n */\n metadata?: { [key: string]: any};\n /**\n * Activity tracking (Unix ms). FirstActiveAt is the activation moment —\n * the first agent message sent after signup (web chat, or WhatsApp routed\n * to a real org rather than the onboarding funnel). LastActiveAt is\n * refreshed on every later message, throttled at the sender. Written ONLY\n * via the dedicated TouchActivity UPDATE, never by full-row user updates,\n * so concurrent profile edits can't clobber them.\n */\n firstActiveAt?: number /* int64 */;\n lastActiveAt?: number /* int64 */;\n /**\n * Audit fields\n */\n createdAt?: number /* int64 */;\n updatedAt?: number /* int64 */;\n createdBy?: string;\n updatedBy?: string;\n}\nexport interface UserResponse {\n user: User;\n metadata: ResponseMetadata;\n}\nexport interface ListUsersResponse {\n users: User[];\n metadata: ResponseMetadata;\n}\nexport interface Team {\n id?: string /* uuid */;\n name: string;\n isSubscribed: boolean;\n subscribedAt?: number /* int64 */;\n plan: string;\n ownerName?: string;\n ownerEmail?: string;\n subscriptionPlatform?: SubscriptionPlatform;\n subscriptionId?: string;\n onboardingDone?: boolean;\n onboardingData?: string;\n}\nexport type SubscriptionPlatform = string;\nexport const SubscriptionPlatformStripe: SubscriptionPlatform = \"stripe\";\nexport const SubscriptionPlatformCustom: SubscriptionPlatform = \"custom\";\nexport interface OrgRole {\n id?: string /* uuid */;\n orgId?: string /* uuid */;\n title: string;\n permissions: Permission[];\n isSystem: boolean;\n createdAt?: number /* int64 */;\n updatedAt?: number /* int64 */;\n createdBy?: string;\n updatedBy?: string;\n}\n/**\n * org db - copied from sys db\n */\nexport interface Permission {\n /**\n * ID *primitive.ObjectID `bson:\"_id,omitempty\" json:\"id\"`\n */\n name: string;\n title: string;\n isSystem: boolean;\n}\n/**\n * UpdateUserSettingsRequest is the request payload for updating user settings\n */\nexport interface UpdateUserSettingsRequest {\n id: string /* uuid */;\n settings?: UserSettings;\n notificationPreferences?: NotificationPreferences;\n}\n/**\n * UserSettingsResponse is the response for settings operations\n */\nexport interface UserSettingsResponse {\n settings?: UserSettings;\n notificationPreferences?: NotificationPreferences;\n metadata: ResponseMetadata;\n}\n/**\n * OnboardingStep represents a step in the onboarding flow\n */\nexport interface OnboardingStep {\n step: number /* int */;\n name: string;\n status: string; // pending, in_progress, completed, skipped\n required: boolean;\n}\n/**\n * OnboardingState represents the current state of a user's onboarding\n */\nexport interface OnboardingState {\n status: string; // pending, in_progress, completed\n currentStep: number /* int */;\n steps: OnboardingStep[];\n user?: User;\n org?: Org;\n}\n/**\n * OnboardingStateResponse is the response for onboarding status\n */\nexport interface OnboardingStateResponse {\n state: OnboardingState;\n metadata: ResponseMetadata;\n}\n/**\n * OrgInput contains the input for creating an organization\n */\nexport interface OrgInput {\n name: string;\n country?: string; // org jurisdiction; see common/admin/countries.go\n affiliateCode?: string; // referral attribution, validated then stamped on org metadata\n mainDomain?: string;\n industry?: string;\n size?: string;\n stripeSessionId?: string;\n}\n/**\n * OrgResult contains the result of organization creation\n */\nexport interface OrgResult {\n org?: Org;\n nextStep: string;\n metadata: ResponseMetadata;\n}\n/**\n * WorkspaceInput is an alias for OrgInput (deprecated)\n */\nexport type WorkspaceInput = OrgInput;\n/**\n * WorkspaceResult is an alias for OrgResult (deprecated)\n */\nexport type WorkspaceResult = OrgResult;\n/**\n * InviteInput contains the input for sending invites\n */\nexport interface InviteInput {\n email: string;\n role: string;\n}\n/**\n * InvitesResult contains the result of sending invites\n */\nexport interface InvitesResult {\n sent: InviteSentStatus[];\n failed: string[];\n nextStep: string;\n metadata: ResponseMetadata;\n}\n/**\n * InviteSentStatus represents status of a sent invite\n */\nexport interface InviteSentStatus {\n email: string;\n status: string;\n}\n/**\n * KnowledgeInput contains the input for creating knowledge graph\n */\nexport interface KnowledgeInput {\n name?: string;\n skipUpload: boolean;\n}\n/**\n * KnowledgeGraphInfo contains info about a knowledge graph\n */\nexport interface KnowledgeGraphInfo {\n id: string;\n name: string;\n status: string;\n documentCount: number /* int */;\n}\n/**\n * KnowledgeResult contains the result of knowledge graph creation\n */\nexport interface KnowledgeResult {\n knowledgeGraph: KnowledgeGraphInfo;\n nextStep: string;\n metadata: ResponseMetadata;\n}\n/**\n * AgentInput contains the input for creating an agent\n */\nexport interface AgentInput {\n name: string;\n goal: string;\n personality: string; // professional, friendly, concise, custom\n skills?: string[]; // skill names to enable (e.g., \"web_search\", \"knowledge_graph\")\n}\n/**\n * AgentInfo contains info about an agent\n */\nexport interface AgentInfo {\n id: string;\n name: string;\n goal: string;\n personality: string;\n status: string;\n knowledgeGraphId?: string;\n}\n/**\n * AgentResult contains the result of agent creation\n */\nexport interface AgentResult {\n agent: AgentInfo;\n nextStep: string;\n metadata: ResponseMetadata;\n}\n/**\n * OnboardingCompleteResult contains the result of completing onboarding\n */\nexport interface OnboardingCompleteResult {\n status: string;\n completedAt: number /* int64 */;\n org?: Org;\n redirectUrl: string;\n metadata: ResponseMetadata;\n}\n/**\n * PaymentSessionInput contains input for creating a payment session\n */\nexport interface PaymentSessionInput {\n plan: string; // pro, max\n billingCycle: string; // monthly, annual\n seats: number /* int */;\n successUrl: string;\n cancelUrl: string;\n affiliateCode?: string; // Referral code for affiliate tracking\n}\n/**\n * PaymentSessionResult contains the result of creating a payment session\n */\nexport interface PaymentSessionResult {\n url: string;\n sessionId: string;\n customerId: string;\n metadata: ResponseMetadata;\n}\n/**\n * OnboardingPlanInput contains subscription plan selection for provisioning\n */\nexport interface OnboardingPlanInput {\n plan: string; // \"pro\" | \"max\"\n billingCycle: string; // \"monthly\" | \"annual\"\n seats: number /* int */;\n stripeSessionId?: string; // From completed Stripe checkout\n}\n/**\n * OnboardingOrgInput contains organization data for the onboarding wizard.\n * The product is implicit in the admin DB the request lands in\n * (admin_eloquent / admin_pumba / …) — no need to pass it on the body.\n */\nexport interface OnboardingOrgInput {\n title: string; // Org display name (e.g., \"Acme Corp\")\n mainDomain: string; // Unique domain slug (e.g., \"acme-corp\")\n industry?: string;\n size?: string; // \"1-10\", \"11-50\", etc.\n}\n/**\n * OnboardingDocumentInput contains a document to be ingested during onboarding\n */\nexport interface OnboardingDocumentInput {\n title: string; // Document display name\n fileUrl: string; // Azure blob URL (uploaded during KB step)\n}\n/**\n * OnboardingKnowledgeInput contains knowledge base configuration with optional documents\n */\nexport interface OnboardingKnowledgeInput {\n name: string; // Knowledge base name\n documents?: OnboardingDocumentInput[]; // Documents to ingest\n}\n/**\n * OnboardingProvisionRequest contains all data collected during onboarding\n * to create org and provision all resources in one request\n */\nexport interface OnboardingProvisionRequest {\n plan: OnboardingPlanInput;\n org: OnboardingOrgInput;\n invites?: InviteInput[];\n knowledge: OnboardingKnowledgeInput;\n agent: AgentInput;\n}\n/**\n * OnboardingProvisionResponse is returned after starting provisioning\n */\nexport interface OnboardingProvisionResponse {\n orgId: string;\n userId: string;\n status: string; // \"provisioning\"\n metadata: ResponseMetadata;\n}\n/**\n * CreateOrgRequest is the request payload for creating an organization.\n * Under per-product DB + row-level tenancy this is a pure row INSERT —\n * no per-org schema provisioning, no artifact install. The product is\n * implicit in the admin DB the request lands in.\n */\nexport interface CreateOrgRequest {\n title: string;\n mainDomain: string;\n type?: OrgTypeTS;\n size?: OrgSizeTS;\n industry?: string;\n logoUrl?: string;\n address?: Address;\n subscription?: OrgSubscription;\n metadata?: { [key: string]: any};\n}\n/**\n * CreateOrgResponse is the response for org creation\n */\nexport interface CreateOrgResponse {\n org: Org;\n metadata: ResponseMetadata;\n}\n\n//////////\n// source: admin-subjects.go\n\nexport const AdminOrgCreate = \"admin.orgs.create\";\nexport const AdminOrgList = \"admin.orgs.list\";\nexport const AdminOrgListByMetadata = \"admin.orgs.listByMetadata\";\nexport const AdminOrgGet = \"admin.orgs.get\";\nexport const AdminOrgGetInfo = \"admin.orgs.getInfo\";\nexport const AdminOrgGetByDomain = \"admin.orgs.getByDomain\";\nexport const AdminOrgUpdate = \"admin.orgs.update\";\nexport const AdminOrgDelete = \"admin.orgs.delete\";\nexport const AdminOrgCreated = \"system.admin.org.created\";\nexport const AdminOrgRolesGet = \"admin.orgRoles.get\";\nexport const AdminOrgRolesCreate = \"admin.orgRoles.create\";\nexport const AdminOrgRolesUpdate = \"admin.orgRoles.update\";\nexport const AdminOrgRolesDelete = \"admin.orgRoles.delete\";\nexport const AdminUsersGet = \"admin.users.get\";\nexport const AdminUsersGetForOrg = \"admin.users.getUsersForOrg\";\nexport const AdminUsersGetOne = \"admin.users.getOne\";\nexport const AdminUsersGetOneByEmail = \"admin.users.getOneByEmail\";\nexport const AdminUsersGetOneByPhone = \"admin.users.getOneByPhone\";\nexport const AdminUsersCreate = \"admin.users.create\";\nexport const AdminUsersUpdate = \"admin.users.update\";\nexport const AdminUsersDelete = \"admin.users.delete\";\nexport const AdminUsersUpdateSettings = \"admin.users.updateSettings\";\nexport const AdminUsersGetSettings = \"admin.users.getSettings\";\nexport const AdminUsersTouchActivity = \"admin.users.touchActivity\";\nexport const AdminTeamsCreate = \"admin.teams.create\";\nexport const AdminTeamsGetOne = \"admin.teams.getOne\";\nexport const AdminTeamsGetForOrg = \"admin.teams.getTeamsForOrg\";\nexport const AdminTeamsUpdateOnboarding = \"admin.teams.updateOnboardingData\";\n\n//////////\n// source: countries.go\n\n/**\n * Country is a supported jurisdiction for org-level scoping of system\n * document libraries. The Code is the canonical, machine value stored on\n * Org.Country and matched against system_doc_libraries.metadata->>'country'\n * (see backend/services/admin/artifacts/eloquent/system_libraries.go and\n * docs/_db_v2/08_country_scoped_libraries.md).\n * To onboard a new jurisdiction: append a row here, then add the matching\n * <code>_<dept>_library entries in the artifact registry. No enum, no\n * migration — Org.Country is a plain varchar.\n */\nexport interface Country {\n code: string; // canonical jurisdiction code, e.g. \"UAE\"\n name: string; // human label, e.g. \"United Arab Emirates\"\n}\n\n//////////\n// source: subscription.go\n\n/**\n * DefaultTrialDays is the self-serve trial length. Override with TRIAL_DAYS.\n */\nexport const DefaultTrialDays = 7;\n","// Billing types - MANUALLY MAINTAINED\n// Originally generated by tygo, but Go source files were removed.\n// These types are now manually maintained in TypeScript.\n// Migrated from @elqnt/types/models/billing-models.ts to @elqnt/admin\nimport { ResponseMetadata } from \"@elqnt/types\";\n\n//////////\n// source: billing-models.go\n\n/**\n * Billing event handlers\n */\nexport const BillingRecordEvent = \"billing.events.record\";\n/**\n * NATS Subject constants\n */\nexport const BillingGetUsageReport = \"billing.usage.report\";\n/**\n * NATS Subject constants\n */\nexport const BillingGetInvoice = \"billing.invoice.get\";\n/**\n * NATS Subject constants\n */\nexport const BillingProcessBillingPeriod = \"billing.period.process\";\n/**\n * Usage handlers\n */\nexport const UsageGetCurrentUsage = \"billing.usage.current\";\n/**\n * NATS Subject constants\n */\nexport const UsageGetUsageHistory = \"billing.usage.history\";\n/**\n * NATS Subject constants\n */\nexport const UsageGetCostBreakdown = \"billing.usage.breakdown\";\n/**\n * NATS Subject constants\n */\nexport const UsageGetTopCostCenters = \"billing.usage.top_centers\";\n/**\n * Rules handlers\n */\nexport const RulesGetBillingRules = \"billing.rules.get\";\n/**\n * NATS Subject constants\n */\nexport const RulesCreateBillingRule = \"billing.rules.create\";\n/**\n * NATS Subject constants\n */\nexport const RulesUpdateBillingRule = \"billing.rules.update\";\n/**\n * NATS Subject constants\n */\nexport const RulesDeleteBillingRule = \"billing.rules.delete\";\nexport interface BillingEvent {\n /**\n * Core identifiers\n */\n org_id: string;\n event_id: string;\n user_id: string;\n customer_id: string;\n /**\n * Event details\n */\n event_type: string;\n event_subtype: string;\n timestamp: string /* RFC3339 */;\n /**\n * Billing metrics\n */\n billable_units: number /* int */;\n unit_type: string;\n cost_per_unit: number /* float64 */;\n total_cost: number /* float64 */;\n /**\n * Context\n */\n service_name: string;\n session_id: string;\n parent_event_id: string;\n /**\n * Resource consumption\n */\n input_tokens: number /* int */;\n output_tokens: number /* int */;\n processing_time_ms: number /* int */;\n /**\n * Product context\n */\n product_tier: string;\n feature_name: string;\n plan_id: string;\n /**\n * Metadata\n */\n metadata: { [key: string]: any};\n created_by: string;\n}\nexport interface UsageReport {\n org_id: string;\n period_start: string /* RFC3339 */;\n period_end: string /* RFC3339 */;\n total_cost: number /* float64 */;\n currency: string;\n service_breakdowns: ServiceUsage[];\n generated_at: string /* RFC3339 */;\n}\nexport interface ServiceUsage {\n service_name: string;\n event_type: string;\n unit_type: string;\n total_units: number /* int64 */;\n total_cost: number /* float64 */;\n total_events: number /* int32 */;\n unique_users: number /* int32 */;\n unique_sessions: number /* int32 */;\n total_input_tokens: number /* int64 */;\n total_output_tokens: number /* int64 */;\n total_processing_time: number /* int64 */;\n}\nexport interface BillingRule {\n rule_id: string;\n org_id: string;\n service_name: string;\n event_type: string;\n unit_type: string;\n /**\n * Tiered pricing\n */\n base_cost: number /* float64 */;\n tier_1_threshold: number /* int */;\n tier_1_cost: number /* float64 */;\n tier_2_threshold: number /* int */;\n tier_2_cost: number /* float64 */;\n tier_3_threshold: number /* int */;\n tier_3_cost: number /* float64 */;\n /**\n * Validity\n */\n effective_from: string /* RFC3339 */;\n effective_to: string /* RFC3339 */;\n is_active: boolean;\n created_at: string /* RFC3339 */;\n updated_at: string /* RFC3339 */;\n}\nexport interface BillingPeriod {\n period_id: string;\n org_id: string;\n period_start: string /* RFC3339 */;\n period_end: string /* RFC3339 */;\n status: string; // 'active', 'closed', 'processing'\n billing_cycle: string; // 'monthly', 'annual', 'usage'\n created_at: string /* RFC3339 */;\n}\nexport interface Invoice {\n invoice_id: string;\n org_id: string;\n period_id: string;\n period_start: string /* RFC3339 */;\n period_end: string /* RFC3339 */;\n line_items: InvoiceLineItem[];\n subtotal_amount: number /* float64 */;\n tax_amount: number /* float64 */;\n total_amount: number /* float64 */;\n currency: string;\n status: string; // 'draft', 'sent', 'paid', 'failed'\n generated_at: string /* RFC3339 */;\n due_date: string /* RFC3339 */;\n payment_method_id: string;\n}\nexport interface InvoiceLineItem {\n line_item_id: string;\n service_name: string;\n event_type: string;\n unit_type: string;\n description: string;\n quantity: number /* int64 */;\n unit_price: number /* float64 */;\n total_price: number /* float64 */;\n}\nexport interface BillingEventRequest {\n BillingEvent: BillingEvent;\n}\nexport interface BillingEventResponse {\n success: boolean;\n error?: string;\n}\nexport interface UsageReportRequest {\n org_id: string;\n period_start: string /* RFC3339 */;\n period_end: string /* RFC3339 */;\n}\nexport interface UsageReportResponse {\n success: boolean;\n data?: UsageReport;\n error?: string;\n}\nexport interface CurrentUsageRequest {\n org_id: string;\n service_name: string;\n event_type: string;\n}\nexport interface CurrentUsageResponse {\n success: boolean;\n data?: { [key: string]: any};\n error?: string;\n}\nexport interface CostBreakdownRequest {\n org_id: string;\n period_start: string /* RFC3339 */;\n period_end: string /* RFC3339 */;\n group_by: string; // 'service', 'user', 'day', 'hour'\n}\nexport interface CostBreakdownResponse {\n success: boolean;\n data?: CostBreakdown[];\n error?: string;\n}\nexport interface CostBreakdown {\n group_value: string;\n total_cost: number /* float64 */;\n total_units: number /* int64 */;\n event_count: number /* int32 */;\n}\nexport interface BillingRuleRequest {\n BillingRule: BillingRule;\n}\nexport interface BillingRuleResponse {\n success: boolean;\n data?: BillingRule;\n error?: string;\n}\nexport interface BillingRulesRequest {\n org_id: string;\n service_name: string;\n event_type: string;\n}\nexport interface BillingRulesResponse {\n success: boolean;\n data?: (BillingRule | undefined)[];\n error?: string;\n}\nexport interface InvoiceRequest {\n org_id: string;\n period_id: string;\n invoice_id: string;\n}\nexport interface InvoiceResponse {\n success: boolean;\n data?: Invoice;\n error?: string;\n}\nexport interface BillingPeriodProcessRequest {\n org_id: string;\n period_id: string;\n}\nexport interface BillingPeriodProcessResponse {\n success: boolean;\n invoice_id?: string;\n error?: string;\n}\nexport interface UsageAggregation {\n org_id: string;\n period_id: string;\n date: string;\n hour: number /* int */;\n service_name: string;\n event_type: string;\n unit_type: string;\n total_units: number /* int64 */;\n total_events: number /* int32 */;\n total_cost: number /* float64 */;\n unique_users: number /* int32 */;\n unique_sessions: number /* int32 */;\n total_input_tokens: number /* int64 */;\n total_output_tokens: number /* int64 */;\n total_processing_time: number /* int64 */;\n created_at: string /* RFC3339 */;\n}\nexport interface TopCostCenter {\n service_name: string;\n event_type: string;\n total_cost: number /* float64 */;\n total_units: number /* int64 */;\n event_count: number /* int32 */;\n percentage: number /* float64 */;\n}\nexport interface UsageHistory {\n date: string;\n total_cost: number /* float64 */;\n total_units: number /* int64 */;\n event_count: number /* int32 */;\n unique_users: number /* int32 */;\n}\nexport interface UserUsage {\n user_id: string;\n total_cost: number /* float64 */;\n total_units: number /* int64 */;\n event_count: number /* int32 */;\n last_activity: string /* RFC3339 */;\n}\n/**\n * Usage trends and analytics models\n */\nexport interface UsageTrends {\n org_id: string;\n days: number /* int */;\n trend: string; // \"increasing\", \"decreasing\", \"stable\"\n direction: string; // \"up\", \"down\", \"flat\"\n change_percent: number /* float64 */;\n recent_week_cost: number /* float64 */;\n previous_week_cost: number /* float64 */;\n}\nexport interface UsageAlert {\n type: string; // \"cost_spike\", \"volume_spike\", etc.\n severity: string; // \"low\", \"medium\", \"high\"\n message: string;\n current_value: number /* float64 */;\n threshold_value: number /* float64 */;\n created_at: string /* RFC3339 */;\n}\n/**\n * Cost preview models\n */\nexport interface CostPreview {\n units: number /* int */;\n total_cost: number /* float64 */;\n cost_per_unit: number /* float64 */;\n tier_breakdown: TierCost[];\n rule?: BillingRule;\n}\nexport interface TierCost {\n tier: string;\n units: number /* int */;\n rate: number /* float64 */;\n cost: number /* float64 */;\n}\n/**\n * Rule coverage models\n */\nexport interface RuleCoverage {\n org_id: string;\n total_services: number /* int */;\n covered_services: { [key: string]: boolean};\n missing_rules: string[];\n rule_count: number /* int */;\n coverage_percentage: number /* float64 */;\n}\n/**\n * Generic Response\n */\nexport interface BillingResponse {\n success: boolean;\n data?: any;\n error?: string;\n}\n\n//////////\n// source: stripe-models.go\n\n/**\n * Subscription management\n */\nexport const SubscriptionCreate = \"billing.subscription.create\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const SubscriptionGet = \"billing.subscription.get\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const SubscriptionUpdate = \"billing.subscription.update\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const SubscriptionCancel = \"billing.subscription.cancel\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const SubscriptionList = \"billing.subscription.list\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const SubscriptionCheckout = \"billing.subscription.checkout\";\n/**\n * Payment links\n */\nexport const PaymentLinkCreate = \"billing.payment-link.create\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const PaymentLinkList = \"billing.payment-link.list\";\n/**\n * Customer portal\n */\nexport const PortalSessionCreate = \"billing.portal.create\";\n/**\n * Customer management\n */\nexport const CustomerCreate = \"billing.customer.create\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const CustomerGet = \"billing.customer.get\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const CustomerUpdate = \"billing.customer.update\";\n/**\n * Credits\n */\nexport const CreditsBalance = \"billing.credits.balance\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const CreditsPurchase = \"billing.credits.purchase\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const CreditsConsume = \"billing.credits.consume\";\n/**\n * Plans\n */\nexport const PlansGet = \"billing.plans.get\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const PlansGetAll = \"billing.plans.list\";\n/**\n * Usage alerts\n */\nexport const UsageAlertThreshold = \"billing.usage.alert\";\n/**\n * Webhooks (internal events)\n */\nexport const WebhookSubscriptionCreated = \"billing.webhook.subscription.created\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const WebhookSubscriptionUpdated = \"billing.webhook.subscription.updated\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const WebhookSubscriptionCanceled = \"billing.webhook.subscription.canceled\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const WebhookInvoicePaid = \"billing.webhook.invoice.paid\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const WebhookInvoiceFailed = \"billing.webhook.invoice.failed\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const WebhookPaymentSucceeded = \"billing.webhook.payment.succeeded\";\n/**\n * Affiliates\n */\nexport const AffiliateCreate = \"billing.affiliate.create\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateGet = \"billing.affiliate.get\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateList = \"billing.affiliate.list\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateUpdate = \"billing.affiliate.update\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateOnboard = \"billing.affiliate.onboard\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateCommissions = \"billing.affiliate.commissions\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateAnalytics = \"billing.affiliate.analytics\";\n/**\n * Analytics\n */\nexport const AnalyticsRevenue = \"billing.analytics.revenue\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AnalyticsUsage = \"billing.analytics.usage\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AnalyticsChurn = \"billing.analytics.churn\";\n/**\n * Plan represents a subscription plan\n */\nexport interface Plan {\n id: string;\n stripeProductId?: string;\n stripePriceId?: string;\n name: string;\n tier: string;\n priceCents: number /* int64 */;\n currency: string;\n billingInterval: string;\n chatSessionsLimit: number /* int */;\n tokenAllowance: number /* int64 */;\n agentsLimit: number /* int */;\n usersLimit: number /* int */;\n knowledgeGraphMb: number /* int */;\n tokenOverageRateCents: number /* int */;\n sessionOverageRateCents: number /* int */;\n features: { [key: string]: any};\n isActive: boolean;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * OrganizationBilling represents an organization's billing info\n */\nexport interface OrganizationBilling {\n orgId: string;\n stripeCustomerId?: string;\n stripeSubscriptionId?: string;\n planId?: string;\n plan?: Plan;\n status: string;\n currentPeriodStart?: string /* RFC3339 */;\n currentPeriodEnd?: string /* RFC3339 */;\n trialStart?: string /* RFC3339 */;\n trialEnd?: string /* RFC3339 */;\n billingEmail?: string;\n billingName?: string;\n affiliateCode?: string;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * CreditBalance represents a credit balance entry\n */\nexport interface CreditBalance {\n id: string;\n orgId: string;\n creditType: string;\n amount: number /* int64 */;\n remaining: number /* int64 */;\n description?: string;\n expiresAt?: string /* RFC3339 */;\n stripePaymentId?: string;\n createdAt: string /* RFC3339 */;\n}\n/**\n * CreditPackage represents a purchasable credit package\n */\nexport interface CreditPackage {\n id: string;\n stripeProductId?: string;\n stripePriceId?: string;\n name: string;\n tokens: number /* int64 */;\n priceCents: number /* int64 */;\n currency: string;\n bonusTokens: number /* int64 */;\n isActive: boolean;\n createdAt: string /* RFC3339 */;\n}\n/**\n * UsagePeriod represents usage within a billing period\n */\nexport interface UsagePeriod {\n id: string;\n orgId: string;\n periodStart: string /* RFC3339 */;\n periodEnd: string /* RFC3339 */;\n tokensUsed: number /* int64 */;\n sessionsUsed: number /* int */;\n tokensAllowance: number /* int64 */;\n sessionsAllowance: number /* int */;\n tokensOverage: number /* int64 */;\n sessionsOverage: number /* int */;\n overageChargedCents: number /* int64 */;\n status: string;\n stripeUsageRecordId?: string;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * UsageSummary provides a summary of current usage\n */\nexport interface UsageSummary {\n orgId: string;\n planTier: string;\n billingPeriodStart: string /* RFC3339 */;\n billingPeriodEnd: string /* RFC3339 */;\n daysRemaining: number /* int */;\n /**\n * Token usage\n */\n tokensUsed: number /* int64 */;\n tokensAllowance: number /* int64 */;\n tokensPercentage: number /* float64 */;\n tokensRemaining: number /* int64 */;\n /**\n * Session usage\n */\n sessionsUsed: number /* int */;\n sessionsAllowance: number /* int */;\n sessionsPercentage: number /* float64 */;\n sessionsRemaining: number /* int */;\n /**\n * Credits\n */\n creditsRemaining: number /* int64 */;\n /**\n * Projected overage\n */\n projectedTokenOverage: number /* int64 */;\n projectedSessionOverage: number /* int */;\n projectedOverageCents: number /* int64 */;\n}\n/**\n * Affiliate represents an affiliate partner\n */\nexport interface Affiliate {\n id: string;\n name: string;\n email: string;\n stripeAccountId?: string;\n status: string;\n commissionRate: number /* float64 */;\n commissionType: string;\n referralCode: string;\n referralLink: string;\n totalEarningsCents: number /* int64 */;\n pendingPayoutCents: number /* int64 */;\n onboardingCompleted: boolean;\n onboardingCompletedAt?: string /* RFC3339 */;\n country?: string;\n phone?: string;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * AffiliateReferral represents a customer referred by an affiliate\n */\nexport interface AffiliateReferral {\n id: string;\n affiliateId: string;\n customerOrgId: string;\n stripeCustomerId?: string;\n status: string;\n firstPurchaseAt?: string /* RFC3339 */;\n totalRevenueCents: number /* int64 */;\n totalCommissionCents: number /* int64 */;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * AffiliateCommission represents a commission payment to an affiliate\n */\nexport interface AffiliateCommission {\n id: string;\n affiliateId: string;\n referralId: string;\n stripePaymentId?: string;\n stripeTransferId?: string;\n stripeInvoiceId?: string;\n grossAmountCents: number /* int64 */;\n commissionAmountCents: number /* int64 */;\n commissionRate: number /* float64 */;\n currency: string;\n status: string;\n createdAt: string /* RFC3339 */;\n paidAt?: string /* RFC3339 */;\n}\n/**\n * Payment represents a payment record\n */\nexport interface Payment {\n id: string;\n orgId: string;\n stripePaymentIntentId?: string;\n stripeInvoiceId?: string;\n stripeSubscriptionId?: string;\n amountCents: number /* int64 */;\n currency: string;\n status: string;\n paymentType: string;\n customerEmail?: string;\n paymentMethod?: string;\n description?: string;\n metadata?: { [key: string]: any};\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * CreatePaymentLinkRequest is the request to create a payment link\n */\nexport interface CreatePaymentLinkRequest {\n orgId: string;\n priceId: string;\n successUrl: string;\n cancelUrl: string;\n customerEmail?: string;\n affiliateCode?: string;\n quantity?: number /* int64 */;\n metadata?: { [key: string]: string};\n}\n/**\n * CreatePaymentLinkResponse is the response from creating a payment link\n */\nexport interface CreatePaymentLinkResponse {\n success: boolean;\n url?: string;\n paymentLinkId?: string;\n error?: string;\n}\n/**\n * CreatePortalSessionRequest is the request to create a billing portal session\n */\nexport interface CreatePortalSessionRequest {\n orgId: string;\n returnUrl: string;\n}\n/**\n * CreatePortalSessionResponse is the response from creating a portal session\n */\nexport interface CreatePortalSessionResponse {\n success: boolean;\n url?: string;\n error?: string;\n}\n/**\n * CreateCheckoutSessionRequest is the request to create a checkout session\n */\nexport interface CreateCheckoutSessionRequest {\n orgId: string;\n priceId: string;\n successUrl: string;\n cancelUrl: string;\n customerEmail?: string;\n affiliateCode?: string;\n trialDays?: number /* int64 */;\n metadata?: { [key: string]: string};\n}\n/**\n * CreateCheckoutSessionResponse is the response from creating a checkout session\n */\nexport interface CreateCheckoutSessionResponse {\n success: boolean;\n sessionId?: string;\n url?: string;\n error?: string;\n}\n/**\n * GetSubscriptionRequest is the request to get subscription info\n */\nexport interface GetSubscriptionRequest {\n orgId: string;\n}\n/**\n * GetSubscriptionResponse is the response with subscription info\n */\nexport interface GetSubscriptionResponse {\n success: boolean;\n subscription?: OrganizationBilling;\n usage?: UsageSummary;\n error?: string;\n}\n/**\n * CancelSubscriptionRequest is the request to cancel a subscription\n */\nexport interface CancelSubscriptionRequest {\n orgId: string;\n cancelAtEnd: boolean;\n reason?: string;\n}\n/**\n * CancelSubscriptionResponse is the response from canceling a subscription\n */\nexport interface CancelSubscriptionResponse {\n success: boolean;\n cancelAt?: string /* RFC3339 */;\n error?: string;\n}\n/**\n * GetCreditsRequest is the request to get credit balance\n */\nexport interface GetCreditsRequest {\n orgId: string;\n}\n/**\n * GetCreditsResponse is the response with credit balance\n */\nexport interface GetCreditsResponse {\n success: boolean;\n totalRemaining: number /* int64 */;\n balances?: (CreditBalance | undefined)[];\n error?: string;\n}\n/**\n * PurchaseCreditsRequest is the request to purchase credits\n */\nexport interface PurchaseCreditsRequest {\n orgId: string;\n packageId: string;\n successUrl: string;\n cancelUrl: string;\n}\n/**\n * PurchaseCreditsResponse is the response from purchasing credits\n */\nexport interface PurchaseCreditsResponse {\n success: boolean;\n sessionId?: string;\n url?: string;\n error?: string;\n}\n/**\n * ConsumeCreditsRequest is the request to consume credits\n */\nexport interface ConsumeCreditsRequest {\n orgId: string;\n amount: number /* int64 */;\n reason?: string;\n}\n/**\n * ConsumeCreditsResponse is the response from consuming credits\n */\nexport interface ConsumeCreditsResponse {\n success: boolean;\n consumed: number /* int64 */;\n remaining: number /* int64 */;\n error?: string;\n}\n/**\n * GetPlansRequest is the request to get available plans\n */\nexport interface GetPlansRequest {\n activeOnly: boolean;\n}\n/**\n * GetPlansResponse is the response with available plans\n */\nexport interface GetPlansResponse {\n success: boolean;\n plans?: (Plan | undefined)[];\n error?: string;\n}\n/**\n * CreateAffiliateRequest is the request to create an affiliate\n */\nexport interface CreateAffiliateRequest {\n name: string;\n email: string;\n country: string;\n commissionRate?: number /* float64 */;\n phone?: string;\n}\n/**\n * CreateAffiliateResponse is the response from creating an affiliate\n */\nexport interface CreateAffiliateResponse {\n success: boolean;\n affiliate?: Affiliate;\n error?: string;\n}\n/**\n * GetAffiliateRequest is the request to get an affiliate\n */\nexport interface GetAffiliateRequest {\n affiliateId?: string;\n referralCode?: string;\n}\n/**\n * GetAffiliateResponse is the response with affiliate info\n */\nexport interface GetAffiliateResponse {\n success: boolean;\n affiliate?: Affiliate;\n error?: string;\n}\n/**\n * ListAffiliatesRequest is the request to list affiliates\n */\nexport interface ListAffiliatesRequest {\n status?: string;\n page?: number /* int */;\n pageSize?: number /* int */;\n}\n/**\n * ListAffiliatesResponse is the response with affiliate list\n */\nexport interface ListAffiliatesResponse {\n success: boolean;\n affiliates?: (Affiliate | undefined)[];\n total: number /* int */;\n page: number /* int */;\n pageSize: number /* int */;\n error?: string;\n}\n/**\n * CreateAffiliateOnboardingLinkRequest is the request to create an onboarding link\n */\nexport interface CreateAffiliateOnboardingLinkRequest {\n affiliateId: string;\n refreshUrl: string;\n returnUrl: string;\n}\n/**\n * CreateAffiliateOnboardingLinkResponse is the response with onboarding link\n */\nexport interface CreateAffiliateOnboardingLinkResponse {\n success: boolean;\n url?: string;\n error?: string;\n}\n/**\n * GetAffiliateCommissionsRequest is the request to get affiliate commissions\n */\nexport interface GetAffiliateCommissionsRequest {\n affiliateId: string;\n startDate?: string /* RFC3339 */;\n endDate?: string /* RFC3339 */;\n status?: string;\n page?: number /* int */;\n pageSize?: number /* int */;\n}\n/**\n * GetAffiliateCommissionsResponse is the response with affiliate commissions\n */\nexport interface GetAffiliateCommissionsResponse {\n success: boolean;\n commissions?: (AffiliateCommission | undefined)[];\n total: number /* int */;\n totalAmount: number /* int64 */;\n page: number /* int */;\n pageSize: number /* int */;\n error?: string;\n}\n/**\n * GetAffiliateAnalyticsRequest is the request to get affiliate analytics\n */\nexport interface GetAffiliateAnalyticsRequest {\n affiliateId: string;\n period?: string; // 'day', 'week', 'month', 'year'\n startDate?: string /* RFC3339 */;\n endDate?: string /* RFC3339 */;\n}\n/**\n * AffiliateAnalytics represents affiliate analytics data\n */\nexport interface AffiliateAnalytics {\n affiliateId: string;\n period: string;\n totalReferrals: number /* int */;\n activeReferrals: number /* int */;\n churnedReferrals: number /* int */;\n totalRevenueCents: number /* int64 */;\n totalCommissionsCents: number /* int64 */;\n conversionRate: number /* float64 */;\n avgCustomerLtvCents: number /* int64 */;\n}\n/**\n * GetAffiliateAnalyticsResponse is the response with affiliate analytics\n */\nexport interface GetAffiliateAnalyticsResponse {\n success: boolean;\n analytics?: AffiliateAnalytics;\n error?: string;\n}\n/**\n * RevenueAnalyticsRequest is the request to get revenue analytics\n */\nexport interface RevenueAnalyticsRequest {\n period?: string; // 'day', 'week', 'month', 'year'\n startDate?: string /* RFC3339 */;\n endDate?: string /* RFC3339 */;\n}\n/**\n * RevenueAnalytics represents revenue analytics data\n */\nexport interface RevenueAnalytics {\n period: string;\n mrrCents: number /* int64 */;\n arrCents: number /* int64 */;\n newMrrCents: number /* int64 */;\n churnedMrrCents: number /* int64 */;\n expansionMrrCents: number /* int64 */;\n contractionMrrCents: number /* int64 */;\n netMrrCents: number /* int64 */;\n totalCustomers: number /* int */;\n newCustomers: number /* int */;\n churnedCustomers: number /* int */;\n churnRate: number /* float64 */;\n}\n/**\n * RevenueAnalyticsResponse is the response with revenue analytics\n */\nexport interface RevenueAnalyticsResponse {\n success: boolean;\n analytics?: RevenueAnalytics;\n error?: string;\n}\n/**\n * Webhook event types\n */\nexport interface StripeWebhookEvent {\n type: string;\n data: { [key: string]: any};\n eventId: string;\n createdAt: string /* RFC3339 */;\n}\n\n//////////\n// source: subjects.go\n\n/**\n * Base subject prefix\n */\nexport const BillingSubjectPrefix = \"billing\";\n/**\n * Event recording subjects\n */\nexport const BillingEventsRecord = \"billing.events.record\";\n/**\n * Usage reporting subjects\n */\nexport const BillingUsageReport = \"billing.usage.report\";\nexport const BillingUsageCurrent = \"billing.usage.current\";\nexport const BillingUsageHistory = \"billing.usage.history\";\nexport const BillingUsageCostBreakdown = \"billing.usage.breakdown\";\nexport const BillingUsageTopCenters = \"billing.usage.top_centers\";\n/**\n * Invoice subjects\n */\nexport const BillingInvoiceGet = \"billing.invoice.get\";\nexport const BillingInvoiceCreate = \"billing.invoice.create\";\nexport const BillingInvoiceProcess = \"billing.invoice.process\";\n/**\n * Billing period subjects\n */\nexport const BillingPeriodCreate = \"billing.period.create\";\nexport const BillingPeriodClose = \"billing.period.close\";\nexport const BillingPeriodProcess = \"billing.period.process\";\n/**\n * Billing rules subjects\n */\nexport const BillingRulesGet = \"billing.rules.get\";\nexport const BillingRulesCreate = \"billing.rules.create\";\nexport const BillingRulesUpdate = \"billing.rules.update\";\nexport const BillingRulesDelete = \"billing.rules.delete\";\n/**\n * Organization provisioning\n */\nexport const BillingOrgProvision = \"billing.org.provision\";\n/**\n * Health check\n */\nexport const BillingHealthCheck = \"billing.health.check\";\n"],"mappings":"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","names":[]}
1
+ {"version":3,"sources":["../../models/admin.ts","../../models/billing.ts"],"sourcesContent":["// Code generated by tygo. DO NOT EDIT.\n// Code generated by tygo. DO NOT EDIT.\n// Migrated from @elqnt/types/models/admin-models.ts to @elqnt/admin\nimport { ResponseMetadata } from \"@elqnt/types\";\n\n//////////\n// source: admin-models.go\n\nexport interface Address {\n line1: string;\n line2: string;\n city: string;\n state: string;\n country: string;\n zip: string;\n}\n/**\n * Org is one organization. With per-product DB + row-level tenancy,\n * the DB the org lives in (admin_eloquent / admin_pumba / …) implies\n * the product — there is no longer a product column on the row. With\n * the system_*\\/org_* artifact split, there's also no per-org artifact\n * provisioning state to track. See docs/_db_v2/03_system_org_split.md.\n */\nexport interface Org {\n id?: string /* uuid */;\n title: string;\n description?: string;\n logoUrl: string;\n mainDomain: string;\n address: Address;\n /**\n * Localization & runtime preferences\n */\n defaultLang?: string;\n timezone?: string;\n settings?: { [key: string]: any};\n /**\n * Status & Control\n */\n status: OrgStatusTS;\n enabled: boolean;\n /**\n * Classification\n */\n type: OrgTypeTS;\n size?: OrgSizeTS;\n industry?: string;\n /**\n * Country is the org's jurisdiction code (e.g. \"UAE\", \"KSA\", \"QA\"). It\n * scopes which system compliance libraries the org sees in the library\n * section. Empty = unset (all system libraries visible). Validated against\n * SupportedCountries; see common/admin/countries.go and\n * docs/_db_v2/08_country_scoped_libraries.md.\n */\n country?: string;\n tags?: string[];\n /**\n * Subscription (Stripe)\n */\n subscription?: OrgSubscription;\n userCount: number /* int64 */;\n /**\n * Onboarding wizard state (per-user UX flow, not artifact provisioning)\n */\n onboarding?: OrgOnboarding;\n /**\n * Template & Roles\n */\n template?: OrgTemplate;\n roles: string[];\n /**\n * Flexible metadata\n */\n metadata?: { [key: string]: any};\n /**\n * Audit fields\n */\n createdAt?: number /* int64 */;\n updatedAt?: number /* int64 */;\n createdBy?: string;\n updatedBy?: string;\n}\nexport type OrgStatus = string;\nexport const OrgStatusActive: OrgStatus = \"active\";\nexport const OrgStatusSuspended: OrgStatus = \"suspended\";\n\nexport const OrgStatuses = {\n active: { value: 'active', label: 'Active' },\n suspended: { value: 'suspended', label: 'Suspended' },\n} as const;\nexport type OrgStatusTS = keyof typeof OrgStatuses;\nexport type OrgStatusOptionTS = typeof OrgStatuses[OrgStatusTS];\n\n/**\n * OrgType represents whether the org is self-serve or enterprise\n */\nexport type OrgType = string;\nexport const OrgTypeSelfServe: OrgType = \"self-serve\";\nexport const OrgTypeEnterprise: OrgType = \"enterprise\";\n\nexport const OrgTypes = {\n \"self-serve\": { value: 'self-serve', label: 'Self-Serve' },\n enterprise: { value: 'enterprise', label: 'Enterprise' },\n} as const;\nexport type OrgTypeTS = keyof typeof OrgTypes;\nexport type OrgTypeOptionTS = typeof OrgTypes[OrgTypeTS];\n\n/**\n * OrgSize represents the size of the organization\n */\nexport type OrgSize = string;\nexport const OrgSizeSolo: OrgSize = \"solo\";\nexport const OrgSizeSmall: OrgSize = \"small\";\nexport const OrgSizeMedium: OrgSize = \"medium\";\nexport const OrgSizeLarge: OrgSize = \"large\";\nexport const OrgSizeEnterprise: OrgSize = \"enterprise\";\n\nexport const OrgSizes = {\n solo: { value: 'solo', label: 'Just me' },\n small: { value: 'small', label: '2-10' },\n medium: { value: 'medium', label: '11-50' },\n large: { value: 'large', label: '51-200' },\n enterprise: { value: 'enterprise', label: '200+' },\n} as const;\nexport type OrgSizeTS = keyof typeof OrgSizes;\nexport type OrgSizeOptionTS = typeof OrgSizes[OrgSizeTS];\n\n\n\n/**\n * OnboardingStatus represents the status of an onboarding flow\n */\nexport type OnboardingStatus = string;\nexport const OnboardingStatusPending: OnboardingStatus = \"pending\";\nexport const OnboardingStatusInProgress: OnboardingStatus = \"in_progress\";\nexport const OnboardingStatusCompleted: OnboardingStatus = \"completed\";\nexport const OnboardingStatusSkipped: OnboardingStatus = \"skipped\";\nexport const OnboardingStatusLegacy: OnboardingStatus = \"legacy\"; // For users created before onboarding\n\nexport const OnboardingStatuses = {\n pending: { value: 'pending', label: 'Pending' },\n in_progress: { value: 'in_progress', label: 'In Progress' },\n completed: { value: 'completed', label: 'Completed' },\n skipped: { value: 'skipped', label: 'Skipped' },\n legacy: { value: 'legacy', label: 'Legacy' },\n} as const;\nexport type OnboardingStatusTS = keyof typeof OnboardingStatuses;\nexport type OnboardingStatusOptionTS = typeof OnboardingStatuses[OnboardingStatusTS];\n\n/**\n * OrgOnboarding tracks the onboarding progress for an organization\n */\nexport interface OrgOnboarding {\n status: OnboardingStatus;\n currentStep: number /* int */;\n completedAt?: number /* int64 */;\n skippedSteps?: number /* int */[];\n}\nexport interface OrgSubscription {\n plan: string;\n platform: SubscriptionPlatform;\n status: OrgSubscriptionStatus;\n trialEndsAt?: number /* int64 */;\n currentPeriodEnd?: number /* int64 */;\n seats?: number /* int */;\n stripeCustomerId?: string;\n stripeSubscriptionId?: string;\n cancelledAt?: number /* int64 */;\n cancelReason?: string;\n gracePeriodEndsAt?: number /* int64 */;\n}\nexport type OrgSubscriptionStatus = string;\nexport const OrgSubscriptionStatusTrialing: OrgSubscriptionStatus = \"trialing\";\nexport const OrgSubscriptionStatusActive: OrgSubscriptionStatus = \"active\";\nexport const OrgSubscriptionStatusPastDue: OrgSubscriptionStatus = \"past_due\";\nexport const OrgSubscriptionStatusCancelled: OrgSubscriptionStatus = \"cancelled\";\nexport const OrgSubscriptionStatusUnpaid: OrgSubscriptionStatus = \"unpaid\";\n\nexport const OrgSubscriptionStatuses = {\n trialing: { value: 'trialing', label: 'Trialing' },\n active: { value: 'active', label: 'Active' },\n past_due: { value: 'past_due', label: 'Past Due' },\n cancelled: { value: 'cancelled', label: 'Cancelled' },\n unpaid: { value: 'unpaid', label: 'Unpaid' },\n} as const;\nexport type OrgSubscriptionStatusTS = keyof typeof OrgSubscriptionStatuses;\nexport type OrgSubscriptionStatusOptionTS = typeof OrgSubscriptionStatuses[OrgSubscriptionStatusTS];\n\nexport interface OrgResponse {\n org: Org;\n metadata: ResponseMetadata;\n}\nexport interface OrgInfoResponse {\n orgInfo: OrgInfo;\n metadata: ResponseMetadata;\n}\nexport interface OrgRoleResponse {\n role: OrgRole;\n metadata: ResponseMetadata;\n}\nexport interface ListOrgsResponse {\n orgs: Org[];\n metadata: ResponseMetadata;\n}\nexport interface ListOrgRolesResponse {\n roles: OrgRole[];\n metadata: ResponseMetadata;\n}\nexport interface OrgInfo {\n id?: string;\n title: string;\n logoUrl: string;\n mainDomain?: string;\n}\nexport interface AzureSettings {\n appClientId?: string;\n appClientSecret?: string;\n azureTenantId?: string;\n}\nexport interface OrgTemplate {\n id: string /* uuid */;\n slug: string;\n title: string;\n}\nexport interface UserOrgAccess {\n orgId?: string /* uuid */;\n orgTitle?: string;\n roles: string[];\n isSingleAccount: boolean;\n entityRecordFilter?: { entityName: string; recordId: string; displayValue?: string };\n}\n/**\n * UserSettings represents user preferences (elastic JSON structure)\n */\nexport interface UserSettings {\n theme?: string; // \"system\" | \"light\" | \"dark\"\n language?: string; // \"auto\" | \"en\" | \"ar\" | etc.\n timezone?: string; // \"auto\" | \"America/New_York\" | etc.\n occupation?: string; // User's occupation/role\n company?: string; // User's company/organization\n}\n\nexport const ThemeOptions = {\n system: { value: 'system', label: 'System' },\n light: { value: 'light', label: 'Light' },\n dark: { value: 'dark', label: 'Dark' },\n} as const;\nexport type ThemeOptionTS = keyof typeof ThemeOptions;\n\n/**\n * NotificationPreferences represents user notification settings\n */\nexport interface NotificationPreferences {\n pushEnabled: boolean;\n newChatAssignment: boolean;\n newMessages: boolean;\n escalations: boolean;\n urgentOnly: boolean;\n soundEnabled: boolean;\n doNotDisturb: boolean;\n dndStart?: string; // \"22:00\" format\n dndEnd?: string; // \"08:00\" format\n}\n/**\n * UserSource represents how a user was created\n */\nexport type UserSource = string;\nexport const UserSourceSignup: UserSource = \"signup\"; // Self-registered\nexport const UserSourceInvite: UserSource = \"invite\"; // Invited by team member\nexport const UserSourceSSO: UserSource = \"sso\"; // Auto-provisioned via SSO\nexport const UserSourceAPI: UserSource = \"api\"; // Created via API\n\nexport const UserSources = {\n signup: { value: 'signup', label: 'Signup' },\n invite: { value: 'invite', label: 'Invite' },\n sso: { value: 'sso', label: 'SSO' },\n api: { value: 'api', label: 'API' },\n} as const;\nexport type UserSourceTS = keyof typeof UserSources;\nexport type UserSourceOptionTS = typeof UserSources[UserSourceTS];\n\n/**\n * InviteStatus represents the status of an invitation\n */\nexport type InviteStatus = string;\nexport const InviteStatusPending: InviteStatus = \"pending\";\nexport const InviteStatusAccepted: InviteStatus = \"accepted\";\nexport const InviteStatusExpired: InviteStatus = \"expired\";\nexport const InviteStatusRevoked: InviteStatus = \"revoked\";\n\nexport const InviteStatuses = {\n pending: { value: 'pending', label: 'Pending' },\n accepted: { value: 'accepted', label: 'Accepted' },\n expired: { value: 'expired', label: 'Expired' },\n revoked: { value: 'revoked', label: 'Revoked' },\n} as const;\nexport type InviteStatusTS = keyof typeof InviteStatuses;\nexport type InviteStatusOptionTS = typeof InviteStatuses[InviteStatusTS];\n\n/**\n * Invite represents a team/org invitation\n */\nexport interface Invite {\n id?: string /* uuid */;\n orgId: string /* uuid */;\n email: string;\n role: string;\n invitedBy: string /* uuid */;\n status: InviteStatusTS;\n acceptedBy?: string /* uuid */;\n acceptedAt?: number /* int64 */;\n expiresAt?: number /* int64 */;\n createdAt?: number /* int64 */;\n updatedAt?: number /* int64 */;\n}\nexport interface InviteResponse {\n invite: Invite;\n metadata: ResponseMetadata;\n}\nexport interface ListInvitesResponse {\n invites: Invite[];\n metadata: ResponseMetadata;\n}\n/**\n * UserOnboarding tracks the onboarding progress for a user\n */\nexport interface UserOnboarding {\n status: OnboardingStatus;\n completedAt?: number /* int64 */;\n}\n/**\n * User represents a user in the system\n */\nexport interface User {\n id?: string /* uuid */;\n email: string;\n firstName: string;\n lastName: string;\n authProviderName: string;\n orgAccess?: UserOrgAccess[];\n /**\n * Status & Control\n */\n enabled?: boolean;\n /**\n * Source tracking\n */\n source?: UserSourceTS;\n invitedBy?: string /* uuid */;\n inviteStatus?: InviteStatusTS;\n /**\n * Team membership - LEGACY, DO NOT USE\n * These fields are deprecated and will be removed.\n * Use Org and OrgAccess patterns instead.\n */\n isTeamAdmin?: boolean;\n teamId?: string;\n teamName?: string;\n /**\n * System admin flag\n */\n isSysAdmin?: boolean;\n /**\n * Preferences\n */\n settings?: UserSettings;\n notificationPreferences?: NotificationPreferences;\n /**\n * Onboarding tracking\n */\n onboarding?: UserOnboarding;\n /**\n * Flexible metadata\n */\n metadata?: { [key: string]: any};\n /**\n * Activity tracking (Unix ms). FirstActiveAt is the activation moment —\n * the first agent message sent after signup (web chat, or WhatsApp routed\n * to a real org rather than the onboarding funnel). LastActiveAt is\n * refreshed on every later message, throttled at the sender. Written ONLY\n * via the dedicated TouchActivity UPDATE, never by full-row user updates,\n * so concurrent profile edits can't clobber them.\n */\n firstActiveAt?: number /* int64 */;\n lastActiveAt?: number /* int64 */;\n /**\n * Audit fields\n */\n createdAt?: number /* int64 */;\n updatedAt?: number /* int64 */;\n createdBy?: string;\n updatedBy?: string;\n}\nexport interface UserResponse {\n user: User;\n metadata: ResponseMetadata;\n}\nexport interface ListUsersResponse {\n users: User[];\n metadata: ResponseMetadata;\n}\nexport interface Team {\n id?: string /* uuid */;\n name: string;\n isSubscribed: boolean;\n subscribedAt?: number /* int64 */;\n plan: string;\n ownerName?: string;\n ownerEmail?: string;\n subscriptionPlatform?: SubscriptionPlatform;\n subscriptionId?: string;\n onboardingDone?: boolean;\n onboardingData?: string;\n}\nexport type SubscriptionPlatform = string;\nexport const SubscriptionPlatformStripe: SubscriptionPlatform = \"stripe\";\nexport const SubscriptionPlatformCustom: SubscriptionPlatform = \"custom\";\nexport interface OrgRole {\n id?: string /* uuid */;\n orgId?: string /* uuid */;\n title: string;\n permissions: Permission[];\n isSystem: boolean;\n createdAt?: number /* int64 */;\n updatedAt?: number /* int64 */;\n createdBy?: string;\n updatedBy?: string;\n}\n/**\n * org db - copied from sys db\n */\nexport interface Permission {\n /**\n * ID *primitive.ObjectID `bson:\"_id,omitempty\" json:\"id\"`\n */\n name: string;\n title: string;\n isSystem: boolean;\n}\n/**\n * UpdateUserSettingsRequest is the request payload for updating user settings\n */\nexport interface UpdateUserSettingsRequest {\n id: string /* uuid */;\n settings?: UserSettings;\n notificationPreferences?: NotificationPreferences;\n}\n/**\n * UserSettingsResponse is the response for settings operations\n */\nexport interface UserSettingsResponse {\n settings?: UserSettings;\n notificationPreferences?: NotificationPreferences;\n metadata: ResponseMetadata;\n}\n/**\n * OnboardingStep represents a step in the onboarding flow\n */\nexport interface OnboardingStep {\n step: number /* int */;\n name: string;\n status: string; // pending, in_progress, completed, skipped\n required: boolean;\n}\n/**\n * OnboardingState represents the current state of a user's onboarding\n */\nexport interface OnboardingState {\n status: string; // pending, in_progress, completed\n currentStep: number /* int */;\n steps: OnboardingStep[];\n user?: User;\n org?: Org;\n}\n/**\n * OnboardingStateResponse is the response for onboarding status\n */\nexport interface OnboardingStateResponse {\n state: OnboardingState;\n metadata: ResponseMetadata;\n}\n/**\n * OrgInput contains the input for creating an organization\n */\nexport interface OrgInput {\n name: string;\n country?: string; // org jurisdiction; see common/admin/countries.go\n affiliateCode?: string; // referral attribution, validated then stamped on org metadata\n mainDomain?: string;\n industry?: string;\n size?: string;\n stripeSessionId?: string;\n}\n/**\n * OrgResult contains the result of organization creation\n */\nexport interface OrgResult {\n org?: Org;\n nextStep: string;\n metadata: ResponseMetadata;\n}\n/**\n * WorkspaceInput is an alias for OrgInput (deprecated)\n */\nexport type WorkspaceInput = OrgInput;\n/**\n * WorkspaceResult is an alias for OrgResult (deprecated)\n */\nexport type WorkspaceResult = OrgResult;\n/**\n * InviteInput contains the input for sending invites\n */\nexport interface InviteInput {\n email: string;\n role: string;\n}\n/**\n * InvitesResult contains the result of sending invites\n */\nexport interface InvitesResult {\n sent: InviteSentStatus[];\n failed: string[];\n nextStep: string;\n metadata: ResponseMetadata;\n}\n/**\n * InviteSentStatus represents status of a sent invite\n */\nexport interface InviteSentStatus {\n email: string;\n status: string;\n}\n/**\n * KnowledgeInput contains the input for creating knowledge graph\n */\nexport interface KnowledgeInput {\n name?: string;\n skipUpload: boolean;\n}\n/**\n * KnowledgeGraphInfo contains info about a knowledge graph\n */\nexport interface KnowledgeGraphInfo {\n id: string;\n name: string;\n status: string;\n documentCount: number /* int */;\n}\n/**\n * KnowledgeResult contains the result of knowledge graph creation\n */\nexport interface KnowledgeResult {\n knowledgeGraph: KnowledgeGraphInfo;\n nextStep: string;\n metadata: ResponseMetadata;\n}\n/**\n * AgentInput contains the input for creating an agent\n */\nexport interface AgentInput {\n name: string;\n goal: string;\n personality: string; // professional, friendly, concise, custom\n skills?: string[]; // skill names to enable (e.g., \"web_search\", \"knowledge_graph\")\n}\n/**\n * AgentInfo contains info about an agent\n */\nexport interface AgentInfo {\n id: string;\n name: string;\n goal: string;\n personality: string;\n status: string;\n knowledgeGraphId?: string;\n}\n/**\n * AgentResult contains the result of agent creation\n */\nexport interface AgentResult {\n agent: AgentInfo;\n nextStep: string;\n metadata: ResponseMetadata;\n}\n/**\n * OnboardingCompleteResult contains the result of completing onboarding\n */\nexport interface OnboardingCompleteResult {\n status: string;\n completedAt: number /* int64 */;\n org?: Org;\n redirectUrl: string;\n metadata: ResponseMetadata;\n}\n/**\n * PaymentSessionInput contains input for creating a payment session\n */\nexport interface PaymentSessionInput {\n plan: string; // pro, max\n billingCycle: string; // monthly, annual\n seats: number /* int */;\n successUrl: string;\n cancelUrl: string;\n affiliateCode?: string; // Referral code for affiliate tracking\n}\n/**\n * PaymentSessionResult contains the result of creating a payment session\n */\nexport interface PaymentSessionResult {\n url: string;\n sessionId: string;\n customerId: string;\n metadata: ResponseMetadata;\n}\n/**\n * OnboardingPlanInput contains subscription plan selection for provisioning\n */\nexport interface OnboardingPlanInput {\n plan: string; // \"pro\" | \"max\"\n billingCycle: string; // \"monthly\" | \"annual\"\n seats: number /* int */;\n stripeSessionId?: string; // From completed Stripe checkout\n}\n/**\n * OnboardingOrgInput contains organization data for the onboarding wizard.\n * The product is implicit in the admin DB the request lands in\n * (admin_eloquent / admin_pumba / …) — no need to pass it on the body.\n */\nexport interface OnboardingOrgInput {\n title: string; // Org display name (e.g., \"Acme Corp\")\n mainDomain: string; // Unique domain slug (e.g., \"acme-corp\")\n industry?: string;\n size?: string; // \"1-10\", \"11-50\", etc.\n}\n/**\n * OnboardingDocumentInput contains a document to be ingested during onboarding\n */\nexport interface OnboardingDocumentInput {\n title: string; // Document display name\n fileUrl: string; // Azure blob URL (uploaded during KB step)\n}\n/**\n * OnboardingKnowledgeInput contains knowledge base configuration with optional documents\n */\nexport interface OnboardingKnowledgeInput {\n name: string; // Knowledge base name\n documents?: OnboardingDocumentInput[]; // Documents to ingest\n}\n/**\n * OnboardingProvisionRequest contains all data collected during onboarding\n * to create org and provision all resources in one request\n */\nexport interface OnboardingProvisionRequest {\n plan: OnboardingPlanInput;\n org: OnboardingOrgInput;\n invites?: InviteInput[];\n knowledge: OnboardingKnowledgeInput;\n agent: AgentInput;\n}\n/**\n * OnboardingProvisionResponse is returned after starting provisioning\n */\nexport interface OnboardingProvisionResponse {\n orgId: string;\n userId: string;\n status: string; // \"provisioning\"\n metadata: ResponseMetadata;\n}\n/**\n * CreateOrgRequest is the request payload for creating an organization.\n * Under per-product DB + row-level tenancy this is a pure row INSERT —\n * no per-org schema provisioning, no artifact install. The product is\n * implicit in the admin DB the request lands in.\n */\nexport interface CreateOrgRequest {\n title: string;\n mainDomain: string;\n type?: OrgTypeTS;\n size?: OrgSizeTS;\n industry?: string;\n logoUrl?: string;\n address?: Address;\n subscription?: OrgSubscription;\n metadata?: { [key: string]: any};\n}\n/**\n * CreateOrgResponse is the response for org creation\n */\nexport interface CreateOrgResponse {\n org: Org;\n metadata: ResponseMetadata;\n}\n\n//////////\n// source: admin-subjects.go\n\nexport const AdminOrgCreate = \"admin.orgs.create\";\nexport const AdminOrgList = \"admin.orgs.list\";\nexport const AdminOrgListByMetadata = \"admin.orgs.listByMetadata\";\nexport const AdminOrgGet = \"admin.orgs.get\";\nexport const AdminOrgGetInfo = \"admin.orgs.getInfo\";\nexport const AdminOrgGetByDomain = \"admin.orgs.getByDomain\";\nexport const AdminOrgUpdate = \"admin.orgs.update\";\nexport const AdminOrgDelete = \"admin.orgs.delete\";\nexport const AdminOrgCreated = \"system.admin.org.created\";\nexport const AdminOrgRolesGet = \"admin.orgRoles.get\";\nexport const AdminOrgRolesCreate = \"admin.orgRoles.create\";\nexport const AdminOrgRolesUpdate = \"admin.orgRoles.update\";\nexport const AdminOrgRolesDelete = \"admin.orgRoles.delete\";\nexport const AdminUsersGet = \"admin.users.get\";\nexport const AdminUsersGetForOrg = \"admin.users.getUsersForOrg\";\nexport const AdminUsersGetOne = \"admin.users.getOne\";\nexport const AdminUsersGetOneByEmail = \"admin.users.getOneByEmail\";\nexport const AdminUsersGetOneByPhone = \"admin.users.getOneByPhone\";\nexport const AdminUsersCreate = \"admin.users.create\";\nexport const AdminUsersUpdate = \"admin.users.update\";\nexport const AdminUsersDelete = \"admin.users.delete\";\nexport const AdminUsersUpdateSettings = \"admin.users.updateSettings\";\nexport const AdminUsersGetSettings = \"admin.users.getSettings\";\nexport const AdminUsersTouchActivity = \"admin.users.touchActivity\";\nexport const AdminTeamsCreate = \"admin.teams.create\";\nexport const AdminTeamsGetOne = \"admin.teams.getOne\";\nexport const AdminTeamsGetForOrg = \"admin.teams.getTeamsForOrg\";\nexport const AdminTeamsUpdateOnboarding = \"admin.teams.updateOnboardingData\";\n/**\n * AdminBillingSuperAgentCheckout mints a per-user Super Agent Stripe checkout\n * URL. Requested by the chat service for the WhatsApp free-limit wall.\n */\nexport const AdminBillingSuperAgentCheckout = \"admin.billing.superagent-checkout\";\n\n//////////\n// source: countries.go\n\n/**\n * Country is a supported jurisdiction for org-level scoping of system\n * document libraries. The Code is the canonical, machine value stored on\n * Org.Country and matched against system_doc_libraries.metadata->>'country'\n * (see backend/services/admin/artifacts/eloquent/system_libraries.go and\n * docs/_db_v2/08_country_scoped_libraries.md).\n * To onboard a new jurisdiction: append a row here, then add the matching\n * <code>_<dept>_library entries in the artifact registry. No enum, no\n * migration — Org.Country is a plain varchar.\n */\nexport interface Country {\n code: string; // canonical jurisdiction code, e.g. \"UAE\"\n name: string; // human label, e.g. \"United Arab Emirates\"\n}\n\n//////////\n// source: subscription.go\n\n/**\n * DefaultTrialDays is the self-serve trial length. Override with TRIAL_DAYS.\n */\nexport const DefaultTrialDays = 7;\n","// Billing types - MANUALLY MAINTAINED\n// Originally generated by tygo, but Go source files were removed.\n// These types are now manually maintained in TypeScript.\n// Migrated from @elqnt/types/models/billing-models.ts to @elqnt/admin\nimport { ResponseMetadata } from \"@elqnt/types\";\n\n//////////\n// source: billing-models.go\n\n/**\n * Billing event handlers\n */\nexport const BillingRecordEvent = \"billing.events.record\";\n/**\n * NATS Subject constants\n */\nexport const BillingGetUsageReport = \"billing.usage.report\";\n/**\n * NATS Subject constants\n */\nexport const BillingGetInvoice = \"billing.invoice.get\";\n/**\n * NATS Subject constants\n */\nexport const BillingProcessBillingPeriod = \"billing.period.process\";\n/**\n * Usage handlers\n */\nexport const UsageGetCurrentUsage = \"billing.usage.current\";\n/**\n * NATS Subject constants\n */\nexport const UsageGetUsageHistory = \"billing.usage.history\";\n/**\n * NATS Subject constants\n */\nexport const UsageGetCostBreakdown = \"billing.usage.breakdown\";\n/**\n * NATS Subject constants\n */\nexport const UsageGetTopCostCenters = \"billing.usage.top_centers\";\n/**\n * Rules handlers\n */\nexport const RulesGetBillingRules = \"billing.rules.get\";\n/**\n * NATS Subject constants\n */\nexport const RulesCreateBillingRule = \"billing.rules.create\";\n/**\n * NATS Subject constants\n */\nexport const RulesUpdateBillingRule = \"billing.rules.update\";\n/**\n * NATS Subject constants\n */\nexport const RulesDeleteBillingRule = \"billing.rules.delete\";\nexport interface BillingEvent {\n /**\n * Core identifiers\n */\n org_id: string;\n event_id: string;\n user_id: string;\n customer_id: string;\n /**\n * Event details\n */\n event_type: string;\n event_subtype: string;\n timestamp: string /* RFC3339 */;\n /**\n * Billing metrics\n */\n billable_units: number /* int */;\n unit_type: string;\n cost_per_unit: number /* float64 */;\n total_cost: number /* float64 */;\n /**\n * Context\n */\n service_name: string;\n session_id: string;\n parent_event_id: string;\n /**\n * Resource consumption\n */\n input_tokens: number /* int */;\n output_tokens: number /* int */;\n processing_time_ms: number /* int */;\n /**\n * Product context\n */\n product_tier: string;\n feature_name: string;\n plan_id: string;\n /**\n * Metadata\n */\n metadata: { [key: string]: any};\n created_by: string;\n}\nexport interface UsageReport {\n org_id: string;\n period_start: string /* RFC3339 */;\n period_end: string /* RFC3339 */;\n total_cost: number /* float64 */;\n currency: string;\n service_breakdowns: ServiceUsage[];\n generated_at: string /* RFC3339 */;\n}\nexport interface ServiceUsage {\n service_name: string;\n event_type: string;\n unit_type: string;\n total_units: number /* int64 */;\n total_cost: number /* float64 */;\n total_events: number /* int32 */;\n unique_users: number /* int32 */;\n unique_sessions: number /* int32 */;\n total_input_tokens: number /* int64 */;\n total_output_tokens: number /* int64 */;\n total_processing_time: number /* int64 */;\n}\nexport interface BillingRule {\n rule_id: string;\n org_id: string;\n service_name: string;\n event_type: string;\n unit_type: string;\n /**\n * Tiered pricing\n */\n base_cost: number /* float64 */;\n tier_1_threshold: number /* int */;\n tier_1_cost: number /* float64 */;\n tier_2_threshold: number /* int */;\n tier_2_cost: number /* float64 */;\n tier_3_threshold: number /* int */;\n tier_3_cost: number /* float64 */;\n /**\n * Validity\n */\n effective_from: string /* RFC3339 */;\n effective_to: string /* RFC3339 */;\n is_active: boolean;\n created_at: string /* RFC3339 */;\n updated_at: string /* RFC3339 */;\n}\nexport interface BillingPeriod {\n period_id: string;\n org_id: string;\n period_start: string /* RFC3339 */;\n period_end: string /* RFC3339 */;\n status: string; // 'active', 'closed', 'processing'\n billing_cycle: string; // 'monthly', 'annual', 'usage'\n created_at: string /* RFC3339 */;\n}\nexport interface Invoice {\n invoice_id: string;\n org_id: string;\n period_id: string;\n period_start: string /* RFC3339 */;\n period_end: string /* RFC3339 */;\n line_items: InvoiceLineItem[];\n subtotal_amount: number /* float64 */;\n tax_amount: number /* float64 */;\n total_amount: number /* float64 */;\n currency: string;\n status: string; // 'draft', 'sent', 'paid', 'failed'\n generated_at: string /* RFC3339 */;\n due_date: string /* RFC3339 */;\n payment_method_id: string;\n}\nexport interface InvoiceLineItem {\n line_item_id: string;\n service_name: string;\n event_type: string;\n unit_type: string;\n description: string;\n quantity: number /* int64 */;\n unit_price: number /* float64 */;\n total_price: number /* float64 */;\n}\nexport interface BillingEventRequest {\n BillingEvent: BillingEvent;\n}\nexport interface BillingEventResponse {\n success: boolean;\n error?: string;\n}\nexport interface UsageReportRequest {\n org_id: string;\n period_start: string /* RFC3339 */;\n period_end: string /* RFC3339 */;\n}\nexport interface UsageReportResponse {\n success: boolean;\n data?: UsageReport;\n error?: string;\n}\nexport interface CurrentUsageRequest {\n org_id: string;\n service_name: string;\n event_type: string;\n}\nexport interface CurrentUsageResponse {\n success: boolean;\n data?: { [key: string]: any};\n error?: string;\n}\nexport interface CostBreakdownRequest {\n org_id: string;\n period_start: string /* RFC3339 */;\n period_end: string /* RFC3339 */;\n group_by: string; // 'service', 'user', 'day', 'hour'\n}\nexport interface CostBreakdownResponse {\n success: boolean;\n data?: CostBreakdown[];\n error?: string;\n}\nexport interface CostBreakdown {\n group_value: string;\n total_cost: number /* float64 */;\n total_units: number /* int64 */;\n event_count: number /* int32 */;\n}\nexport interface BillingRuleRequest {\n BillingRule: BillingRule;\n}\nexport interface BillingRuleResponse {\n success: boolean;\n data?: BillingRule;\n error?: string;\n}\nexport interface BillingRulesRequest {\n org_id: string;\n service_name: string;\n event_type: string;\n}\nexport interface BillingRulesResponse {\n success: boolean;\n data?: (BillingRule | undefined)[];\n error?: string;\n}\nexport interface InvoiceRequest {\n org_id: string;\n period_id: string;\n invoice_id: string;\n}\nexport interface InvoiceResponse {\n success: boolean;\n data?: Invoice;\n error?: string;\n}\nexport interface BillingPeriodProcessRequest {\n org_id: string;\n period_id: string;\n}\nexport interface BillingPeriodProcessResponse {\n success: boolean;\n invoice_id?: string;\n error?: string;\n}\nexport interface UsageAggregation {\n org_id: string;\n period_id: string;\n date: string;\n hour: number /* int */;\n service_name: string;\n event_type: string;\n unit_type: string;\n total_units: number /* int64 */;\n total_events: number /* int32 */;\n total_cost: number /* float64 */;\n unique_users: number /* int32 */;\n unique_sessions: number /* int32 */;\n total_input_tokens: number /* int64 */;\n total_output_tokens: number /* int64 */;\n total_processing_time: number /* int64 */;\n created_at: string /* RFC3339 */;\n}\nexport interface TopCostCenter {\n service_name: string;\n event_type: string;\n total_cost: number /* float64 */;\n total_units: number /* int64 */;\n event_count: number /* int32 */;\n percentage: number /* float64 */;\n}\nexport interface UsageHistory {\n date: string;\n total_cost: number /* float64 */;\n total_units: number /* int64 */;\n event_count: number /* int32 */;\n unique_users: number /* int32 */;\n}\nexport interface UserUsage {\n user_id: string;\n total_cost: number /* float64 */;\n total_units: number /* int64 */;\n event_count: number /* int32 */;\n last_activity: string /* RFC3339 */;\n}\n/**\n * Usage trends and analytics models\n */\nexport interface UsageTrends {\n org_id: string;\n days: number /* int */;\n trend: string; // \"increasing\", \"decreasing\", \"stable\"\n direction: string; // \"up\", \"down\", \"flat\"\n change_percent: number /* float64 */;\n recent_week_cost: number /* float64 */;\n previous_week_cost: number /* float64 */;\n}\nexport interface UsageAlert {\n type: string; // \"cost_spike\", \"volume_spike\", etc.\n severity: string; // \"low\", \"medium\", \"high\"\n message: string;\n current_value: number /* float64 */;\n threshold_value: number /* float64 */;\n created_at: string /* RFC3339 */;\n}\n/**\n * Cost preview models\n */\nexport interface CostPreview {\n units: number /* int */;\n total_cost: number /* float64 */;\n cost_per_unit: number /* float64 */;\n tier_breakdown: TierCost[];\n rule?: BillingRule;\n}\nexport interface TierCost {\n tier: string;\n units: number /* int */;\n rate: number /* float64 */;\n cost: number /* float64 */;\n}\n/**\n * Rule coverage models\n */\nexport interface RuleCoverage {\n org_id: string;\n total_services: number /* int */;\n covered_services: { [key: string]: boolean};\n missing_rules: string[];\n rule_count: number /* int */;\n coverage_percentage: number /* float64 */;\n}\n/**\n * Generic Response\n */\nexport interface BillingResponse {\n success: boolean;\n data?: any;\n error?: string;\n}\n\n//////////\n// source: stripe-models.go\n\n/**\n * Subscription management\n */\nexport const SubscriptionCreate = \"billing.subscription.create\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const SubscriptionGet = \"billing.subscription.get\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const SubscriptionUpdate = \"billing.subscription.update\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const SubscriptionCancel = \"billing.subscription.cancel\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const SubscriptionList = \"billing.subscription.list\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const SubscriptionCheckout = \"billing.subscription.checkout\";\n/**\n * Payment links\n */\nexport const PaymentLinkCreate = \"billing.payment-link.create\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const PaymentLinkList = \"billing.payment-link.list\";\n/**\n * Customer portal\n */\nexport const PortalSessionCreate = \"billing.portal.create\";\n/**\n * Customer management\n */\nexport const CustomerCreate = \"billing.customer.create\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const CustomerGet = \"billing.customer.get\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const CustomerUpdate = \"billing.customer.update\";\n/**\n * Credits\n */\nexport const CreditsBalance = \"billing.credits.balance\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const CreditsPurchase = \"billing.credits.purchase\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const CreditsConsume = \"billing.credits.consume\";\n/**\n * Plans\n */\nexport const PlansGet = \"billing.plans.get\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const PlansGetAll = \"billing.plans.list\";\n/**\n * Usage alerts\n */\nexport const UsageAlertThreshold = \"billing.usage.alert\";\n/**\n * Webhooks (internal events)\n */\nexport const WebhookSubscriptionCreated = \"billing.webhook.subscription.created\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const WebhookSubscriptionUpdated = \"billing.webhook.subscription.updated\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const WebhookSubscriptionCanceled = \"billing.webhook.subscription.canceled\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const WebhookInvoicePaid = \"billing.webhook.invoice.paid\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const WebhookInvoiceFailed = \"billing.webhook.invoice.failed\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const WebhookPaymentSucceeded = \"billing.webhook.payment.succeeded\";\n/**\n * Affiliates\n */\nexport const AffiliateCreate = \"billing.affiliate.create\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateGet = \"billing.affiliate.get\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateList = \"billing.affiliate.list\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateUpdate = \"billing.affiliate.update\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateOnboard = \"billing.affiliate.onboard\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateCommissions = \"billing.affiliate.commissions\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AffiliateAnalytics = \"billing.affiliate.analytics\";\n/**\n * Analytics\n */\nexport const AnalyticsRevenue = \"billing.analytics.revenue\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AnalyticsUsage = \"billing.analytics.usage\";\n/**\n * NATS Subjects for Stripe/Subscription operations\n */\nexport const AnalyticsChurn = \"billing.analytics.churn\";\n/**\n * Plan represents a subscription plan\n */\nexport interface Plan {\n id: string;\n stripeProductId?: string;\n stripePriceId?: string;\n name: string;\n tier: string;\n priceCents: number /* int64 */;\n currency: string;\n billingInterval: string;\n chatSessionsLimit: number /* int */;\n tokenAllowance: number /* int64 */;\n agentsLimit: number /* int */;\n usersLimit: number /* int */;\n knowledgeGraphMb: number /* int */;\n tokenOverageRateCents: number /* int */;\n sessionOverageRateCents: number /* int */;\n features: { [key: string]: any};\n isActive: boolean;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * OrganizationBilling represents an organization's billing info\n */\nexport interface OrganizationBilling {\n orgId: string;\n stripeCustomerId?: string;\n stripeSubscriptionId?: string;\n planId?: string;\n plan?: Plan;\n status: string;\n currentPeriodStart?: string /* RFC3339 */;\n currentPeriodEnd?: string /* RFC3339 */;\n trialStart?: string /* RFC3339 */;\n trialEnd?: string /* RFC3339 */;\n billingEmail?: string;\n billingName?: string;\n affiliateCode?: string;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * CreditBalance represents a credit balance entry\n */\nexport interface CreditBalance {\n id: string;\n orgId: string;\n creditType: string;\n amount: number /* int64 */;\n remaining: number /* int64 */;\n description?: string;\n expiresAt?: string /* RFC3339 */;\n stripePaymentId?: string;\n createdAt: string /* RFC3339 */;\n}\n/**\n * CreditPackage represents a purchasable credit package\n */\nexport interface CreditPackage {\n id: string;\n stripeProductId?: string;\n stripePriceId?: string;\n name: string;\n tokens: number /* int64 */;\n priceCents: number /* int64 */;\n currency: string;\n bonusTokens: number /* int64 */;\n isActive: boolean;\n createdAt: string /* RFC3339 */;\n}\n/**\n * UsagePeriod represents usage within a billing period\n */\nexport interface UsagePeriod {\n id: string;\n orgId: string;\n periodStart: string /* RFC3339 */;\n periodEnd: string /* RFC3339 */;\n tokensUsed: number /* int64 */;\n sessionsUsed: number /* int */;\n tokensAllowance: number /* int64 */;\n sessionsAllowance: number /* int */;\n tokensOverage: number /* int64 */;\n sessionsOverage: number /* int */;\n overageChargedCents: number /* int64 */;\n status: string;\n stripeUsageRecordId?: string;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * UsageSummary provides a summary of current usage\n */\nexport interface UsageSummary {\n orgId: string;\n planTier: string;\n billingPeriodStart: string /* RFC3339 */;\n billingPeriodEnd: string /* RFC3339 */;\n daysRemaining: number /* int */;\n /**\n * Token usage\n */\n tokensUsed: number /* int64 */;\n tokensAllowance: number /* int64 */;\n tokensPercentage: number /* float64 */;\n tokensRemaining: number /* int64 */;\n /**\n * Session usage\n */\n sessionsUsed: number /* int */;\n sessionsAllowance: number /* int */;\n sessionsPercentage: number /* float64 */;\n sessionsRemaining: number /* int */;\n /**\n * Credits\n */\n creditsRemaining: number /* int64 */;\n /**\n * Projected overage\n */\n projectedTokenOverage: number /* int64 */;\n projectedSessionOverage: number /* int */;\n projectedOverageCents: number /* int64 */;\n}\n/**\n * Affiliate represents an affiliate partner\n */\nexport interface Affiliate {\n id: string;\n name: string;\n email: string;\n stripeAccountId?: string;\n status: string;\n commissionRate: number /* float64 */;\n commissionType: string;\n referralCode: string;\n referralLink: string;\n totalEarningsCents: number /* int64 */;\n pendingPayoutCents: number /* int64 */;\n onboardingCompleted: boolean;\n onboardingCompletedAt?: string /* RFC3339 */;\n country?: string;\n phone?: string;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * AffiliateReferral represents a customer referred by an affiliate\n */\nexport interface AffiliateReferral {\n id: string;\n affiliateId: string;\n customerOrgId: string;\n stripeCustomerId?: string;\n status: string;\n firstPurchaseAt?: string /* RFC3339 */;\n totalRevenueCents: number /* int64 */;\n totalCommissionCents: number /* int64 */;\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * AffiliateCommission represents a commission payment to an affiliate\n */\nexport interface AffiliateCommission {\n id: string;\n affiliateId: string;\n referralId: string;\n stripePaymentId?: string;\n stripeTransferId?: string;\n stripeInvoiceId?: string;\n grossAmountCents: number /* int64 */;\n commissionAmountCents: number /* int64 */;\n commissionRate: number /* float64 */;\n currency: string;\n status: string;\n createdAt: string /* RFC3339 */;\n paidAt?: string /* RFC3339 */;\n}\n/**\n * Payment represents a payment record\n */\nexport interface Payment {\n id: string;\n orgId: string;\n stripePaymentIntentId?: string;\n stripeInvoiceId?: string;\n stripeSubscriptionId?: string;\n amountCents: number /* int64 */;\n currency: string;\n status: string;\n paymentType: string;\n customerEmail?: string;\n paymentMethod?: string;\n description?: string;\n metadata?: { [key: string]: any};\n createdAt: string /* RFC3339 */;\n updatedAt: string /* RFC3339 */;\n}\n/**\n * CreatePaymentLinkRequest is the request to create a payment link\n */\nexport interface CreatePaymentLinkRequest {\n orgId: string;\n priceId: string;\n successUrl: string;\n cancelUrl: string;\n customerEmail?: string;\n affiliateCode?: string;\n quantity?: number /* int64 */;\n metadata?: { [key: string]: string};\n}\n/**\n * CreatePaymentLinkResponse is the response from creating a payment link\n */\nexport interface CreatePaymentLinkResponse {\n success: boolean;\n url?: string;\n paymentLinkId?: string;\n error?: string;\n}\n/**\n * CreatePortalSessionRequest is the request to create a billing portal session\n */\nexport interface CreatePortalSessionRequest {\n orgId: string;\n returnUrl: string;\n}\n/**\n * CreatePortalSessionResponse is the response from creating a portal session\n */\nexport interface CreatePortalSessionResponse {\n success: boolean;\n url?: string;\n error?: string;\n}\n/**\n * CreateCheckoutSessionRequest is the request to create a checkout session\n */\nexport interface CreateCheckoutSessionRequest {\n orgId: string;\n priceId: string;\n successUrl: string;\n cancelUrl: string;\n customerEmail?: string;\n affiliateCode?: string;\n trialDays?: number /* int64 */;\n metadata?: { [key: string]: string};\n}\n/**\n * CreateCheckoutSessionResponse is the response from creating a checkout session\n */\nexport interface CreateCheckoutSessionResponse {\n success: boolean;\n sessionId?: string;\n url?: string;\n error?: string;\n}\n/**\n * GetSubscriptionRequest is the request to get subscription info\n */\nexport interface GetSubscriptionRequest {\n orgId: string;\n}\n/**\n * GetSubscriptionResponse is the response with subscription info\n */\nexport interface GetSubscriptionResponse {\n success: boolean;\n subscription?: OrganizationBilling;\n usage?: UsageSummary;\n error?: string;\n}\n/**\n * CancelSubscriptionRequest is the request to cancel a subscription\n */\nexport interface CancelSubscriptionRequest {\n orgId: string;\n cancelAtEnd: boolean;\n reason?: string;\n}\n/**\n * CancelSubscriptionResponse is the response from canceling a subscription\n */\nexport interface CancelSubscriptionResponse {\n success: boolean;\n cancelAt?: string /* RFC3339 */;\n error?: string;\n}\n/**\n * GetCreditsRequest is the request to get credit balance\n */\nexport interface GetCreditsRequest {\n orgId: string;\n}\n/**\n * GetCreditsResponse is the response with credit balance\n */\nexport interface GetCreditsResponse {\n success: boolean;\n totalRemaining: number /* int64 */;\n balances?: (CreditBalance | undefined)[];\n error?: string;\n}\n/**\n * PurchaseCreditsRequest is the request to purchase credits\n */\nexport interface PurchaseCreditsRequest {\n orgId: string;\n packageId: string;\n successUrl: string;\n cancelUrl: string;\n}\n/**\n * PurchaseCreditsResponse is the response from purchasing credits\n */\nexport interface PurchaseCreditsResponse {\n success: boolean;\n sessionId?: string;\n url?: string;\n error?: string;\n}\n/**\n * ConsumeCreditsRequest is the request to consume credits\n */\nexport interface ConsumeCreditsRequest {\n orgId: string;\n amount: number /* int64 */;\n reason?: string;\n}\n/**\n * ConsumeCreditsResponse is the response from consuming credits\n */\nexport interface ConsumeCreditsResponse {\n success: boolean;\n consumed: number /* int64 */;\n remaining: number /* int64 */;\n error?: string;\n}\n/**\n * GetPlansRequest is the request to get available plans\n */\nexport interface GetPlansRequest {\n activeOnly: boolean;\n}\n/**\n * GetPlansResponse is the response with available plans\n */\nexport interface GetPlansResponse {\n success: boolean;\n plans?: (Plan | undefined)[];\n error?: string;\n}\n/**\n * CreateAffiliateRequest is the request to create an affiliate\n */\nexport interface CreateAffiliateRequest {\n name: string;\n email: string;\n country: string;\n commissionRate?: number /* float64 */;\n phone?: string;\n}\n/**\n * CreateAffiliateResponse is the response from creating an affiliate\n */\nexport interface CreateAffiliateResponse {\n success: boolean;\n affiliate?: Affiliate;\n error?: string;\n}\n/**\n * GetAffiliateRequest is the request to get an affiliate\n */\nexport interface GetAffiliateRequest {\n affiliateId?: string;\n referralCode?: string;\n}\n/**\n * GetAffiliateResponse is the response with affiliate info\n */\nexport interface GetAffiliateResponse {\n success: boolean;\n affiliate?: Affiliate;\n error?: string;\n}\n/**\n * ListAffiliatesRequest is the request to list affiliates\n */\nexport interface ListAffiliatesRequest {\n status?: string;\n page?: number /* int */;\n pageSize?: number /* int */;\n}\n/**\n * ListAffiliatesResponse is the response with affiliate list\n */\nexport interface ListAffiliatesResponse {\n success: boolean;\n affiliates?: (Affiliate | undefined)[];\n total: number /* int */;\n page: number /* int */;\n pageSize: number /* int */;\n error?: string;\n}\n/**\n * CreateAffiliateOnboardingLinkRequest is the request to create an onboarding link\n */\nexport interface CreateAffiliateOnboardingLinkRequest {\n affiliateId: string;\n refreshUrl: string;\n returnUrl: string;\n}\n/**\n * CreateAffiliateOnboardingLinkResponse is the response with onboarding link\n */\nexport interface CreateAffiliateOnboardingLinkResponse {\n success: boolean;\n url?: string;\n error?: string;\n}\n/**\n * GetAffiliateCommissionsRequest is the request to get affiliate commissions\n */\nexport interface GetAffiliateCommissionsRequest {\n affiliateId: string;\n startDate?: string /* RFC3339 */;\n endDate?: string /* RFC3339 */;\n status?: string;\n page?: number /* int */;\n pageSize?: number /* int */;\n}\n/**\n * GetAffiliateCommissionsResponse is the response with affiliate commissions\n */\nexport interface GetAffiliateCommissionsResponse {\n success: boolean;\n commissions?: (AffiliateCommission | undefined)[];\n total: number /* int */;\n totalAmount: number /* int64 */;\n page: number /* int */;\n pageSize: number /* int */;\n error?: string;\n}\n/**\n * GetAffiliateAnalyticsRequest is the request to get affiliate analytics\n */\nexport interface GetAffiliateAnalyticsRequest {\n affiliateId: string;\n period?: string; // 'day', 'week', 'month', 'year'\n startDate?: string /* RFC3339 */;\n endDate?: string /* RFC3339 */;\n}\n/**\n * AffiliateAnalytics represents affiliate analytics data\n */\nexport interface AffiliateAnalytics {\n affiliateId: string;\n period: string;\n totalReferrals: number /* int */;\n activeReferrals: number /* int */;\n churnedReferrals: number /* int */;\n totalRevenueCents: number /* int64 */;\n totalCommissionsCents: number /* int64 */;\n conversionRate: number /* float64 */;\n avgCustomerLtvCents: number /* int64 */;\n}\n/**\n * GetAffiliateAnalyticsResponse is the response with affiliate analytics\n */\nexport interface GetAffiliateAnalyticsResponse {\n success: boolean;\n analytics?: AffiliateAnalytics;\n error?: string;\n}\n/**\n * RevenueAnalyticsRequest is the request to get revenue analytics\n */\nexport interface RevenueAnalyticsRequest {\n period?: string; // 'day', 'week', 'month', 'year'\n startDate?: string /* RFC3339 */;\n endDate?: string /* RFC3339 */;\n}\n/**\n * RevenueAnalytics represents revenue analytics data\n */\nexport interface RevenueAnalytics {\n period: string;\n mrrCents: number /* int64 */;\n arrCents: number /* int64 */;\n newMrrCents: number /* int64 */;\n churnedMrrCents: number /* int64 */;\n expansionMrrCents: number /* int64 */;\n contractionMrrCents: number /* int64 */;\n netMrrCents: number /* int64 */;\n totalCustomers: number /* int */;\n newCustomers: number /* int */;\n churnedCustomers: number /* int */;\n churnRate: number /* float64 */;\n}\n/**\n * RevenueAnalyticsResponse is the response with revenue analytics\n */\nexport interface RevenueAnalyticsResponse {\n success: boolean;\n analytics?: RevenueAnalytics;\n error?: string;\n}\n/**\n * Webhook event types\n */\nexport interface StripeWebhookEvent {\n type: string;\n data: { [key: string]: any};\n eventId: string;\n createdAt: string /* RFC3339 */;\n}\n\n//////////\n// source: subjects.go\n\n/**\n * Base subject prefix\n */\nexport const BillingSubjectPrefix = \"billing\";\n/**\n * Event recording subjects\n */\nexport const BillingEventsRecord = \"billing.events.record\";\n/**\n * Usage reporting subjects\n */\nexport const BillingUsageReport = \"billing.usage.report\";\nexport const BillingUsageCurrent = \"billing.usage.current\";\nexport const BillingUsageHistory = \"billing.usage.history\";\nexport const BillingUsageCostBreakdown = \"billing.usage.breakdown\";\nexport const BillingUsageTopCenters = \"billing.usage.top_centers\";\n/**\n * Invoice subjects\n */\nexport const BillingInvoiceGet = \"billing.invoice.get\";\nexport const BillingInvoiceCreate = \"billing.invoice.create\";\nexport const BillingInvoiceProcess = \"billing.invoice.process\";\n/**\n * Billing period subjects\n */\nexport const BillingPeriodCreate = \"billing.period.create\";\nexport const BillingPeriodClose = \"billing.period.close\";\nexport const BillingPeriodProcess = \"billing.period.process\";\n/**\n * Billing rules subjects\n */\nexport const BillingRulesGet = \"billing.rules.get\";\nexport const BillingRulesCreate = \"billing.rules.create\";\nexport const BillingRulesUpdate = \"billing.rules.update\";\nexport const BillingRulesDelete = \"billing.rules.delete\";\n/**\n * Organization provisioning\n */\nexport const BillingOrgProvision = \"billing.org.provision\";\n/**\n * Health check\n */\nexport const BillingHealthCheck = \"billing.health.check\";\n"],"mappings":"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","names":[]}
@@ -1,5 +1,5 @@
1
1
  import { ApiClientOptions, ApiResponse } from '@elqnt/api-client';
2
- import { O as OrgStatusTS, a as OrgTypeTS, b as Org, c as OrgResponse, d as OrgInfoResponse, L as ListOrgsResponse } from './analytics-CZ0LmSlf.js';
2
+ import { O as OrgStatusTS, a as OrgTypeTS, b as Org, c as OrgResponse, d as OrgInfoResponse, L as ListOrgsResponse } from './admin-C1iVQe2d.js';
3
3
 
4
4
  /**
5
5
  * Organizations Admin API
@@ -1,5 +1,5 @@
1
1
  import { ApiClientOptions, ApiResponse } from '@elqnt/api-client';
2
- import { O as OrgStatusTS, a as OrgTypeTS, b as Org, c as OrgResponse, d as OrgInfoResponse, L as ListOrgsResponse } from './analytics-CZ0LmSlf.cjs';
2
+ import { O as OrgStatusTS, a as OrgTypeTS, b as Org, c as OrgResponse, d as OrgInfoResponse, L as ListOrgsResponse } from './admin-C1iVQe2d.cjs';
3
3
 
4
4
  /**
5
5
  * Organizations Admin API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elqnt/admin",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Admin APIs for Eloquent platform (onboarding, org-settings, billing)",
5
5
  "type": "module",
6
6
  "exports": {
@@ -26,12 +26,13 @@
26
26
  }
27
27
  },
28
28
  "files": [
29
- "dist"
29
+ "dist",
30
+ "SKILL.md"
30
31
  ],
31
32
  "dependencies": {
33
+ "@elqnt/agents": "4.0.0",
32
34
  "@elqnt/types": "2.2.0",
33
- "@elqnt/agents": "3.6.0",
34
- "@elqnt/api-client": "2.1.0"
35
+ "@elqnt/api-client": "2.2.0"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@types/react": "^19.0.0",