@elqnt/admin 2.1.0 → 2.2.0

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.
@@ -23,6 +23,64 @@ var OrgSizes = {
23
23
  large: { value: "large", label: "51-200" },
24
24
  enterprise: { value: "enterprise", label: "200+" }
25
25
  };
26
+ var OrgProductEloquent = "eloquent";
27
+ var OrgProductShopAssist = "shop-assist";
28
+ var OrgProductConsumer = "consumer";
29
+ var OrgProductCustom = "custom";
30
+ var OrgProductAafya = "aafya";
31
+ var OrgProductFahim = "fahim";
32
+ var OrgProducts = {
33
+ eloquent: { value: "eloquent", label: "Eloquent", description: "Full-featured enterprise AI platform with all capabilities" },
34
+ "shop-assist": { value: "shop-assist", label: "Shop Assist", description: "E-commerce focused AI assistant for online stores" },
35
+ consumer: { value: "consumer", label: "Consumer", description: "Consumer-facing AI applications" },
36
+ custom: { value: "custom", label: "Custom", description: "Custom configuration for specific requirements" },
37
+ aafya: { value: "aafya", label: "Aafya", description: "AI-powered healthcare triage and medical assistance platform" },
38
+ fahim: { value: "fahim", label: "Fahim \u0641\u0627\u0647\u0645", description: "AI-powered tutor for personalized learning across subjects" }
39
+ };
40
+ var OrgArtifactPostgresEntities = "postgres_entities";
41
+ var OrgArtifactPostgresAgents = "postgres_agents";
42
+ var OrgArtifactPostgresOrgConfig = "postgres_org_config";
43
+ var OrgArtifactClickHouseOrg = "clickhouse_org";
44
+ var OrgArtifactNATSChatBuckets = "nats_chat_buckets";
45
+ var OrgArtifactEntityDefsEloquent = "entity_defs_eloquent";
46
+ var OrgArtifactEntityDefsDocs = "entity_defs_docs";
47
+ var OrgArtifactEntityDefsBoards = "entity_defs_boards";
48
+ var OrgArtifactOrgSettings = "org_settings";
49
+ var OrgArtifactKnowledgeGraph = "knowledge_graph";
50
+ var OrgArtifactKGSchema = "kg_schema";
51
+ var OrgArtifactDefaultSkills = "default_skills";
52
+ var OrgArtifactDefaultAgent = "default_agent";
53
+ var OrgArtifactChatWidget = "chat_widget";
54
+ var OrgArtifactDefaultOrgLibrary = "default_org_library";
55
+ var OrgArtifactTypes = {
56
+ postgres_entities: { value: "postgres_entities", label: "PostgreSQL Entities" },
57
+ postgres_agents: { value: "postgres_agents", label: "PostgreSQL Agents" },
58
+ postgres_org_config: { value: "postgres_org_config", label: "PostgreSQL Org Config" },
59
+ clickhouse_org: { value: "clickhouse_org", label: "ClickHouse Analytics" },
60
+ nats_chat_buckets: { value: "nats_chat_buckets", label: "NATS Chat Buckets" },
61
+ entity_defs_eloquent: { value: "entity_defs_eloquent", label: "Eloquent Entities" },
62
+ entity_defs_docs: { value: "entity_defs_docs", label: "Documents Entities" },
63
+ entity_defs_boards: { value: "entity_defs_boards", label: "Boards Entities" },
64
+ org_settings: { value: "org_settings", label: "Organization Settings" },
65
+ knowledge_graph: { value: "knowledge_graph", label: "Knowledge Graph" },
66
+ kg_schema: { value: "kg_schema", label: "KG Default Schema" },
67
+ default_skills: { value: "default_skills", label: "Default Skills" },
68
+ default_agent: { value: "default_agent", label: "Default Agent" },
69
+ chat_widget: { value: "chat_widget", label: "Chat Widget" },
70
+ default_org_library: { value: "default_org_library", label: "Org Documents Library" }
71
+ };
72
+ var OrgArtifactStatusPending = "pending";
73
+ var OrgArtifactStatusInProgress = "in_progress";
74
+ var OrgArtifactStatusCompleted = "completed";
75
+ var OrgArtifactStatusFailed = "failed";
76
+ var OrgArtifactStatusSkipped = "skipped";
77
+ var OrgArtifactStatuses = {
78
+ pending: { value: "pending", label: "Pending" },
79
+ in_progress: { value: "in_progress", label: "In Progress" },
80
+ completed: { value: "completed", label: "Completed" },
81
+ failed: { value: "failed", label: "Failed" },
82
+ skipped: { value: "skipped", label: "Skipped" }
83
+ };
26
84
  var OnboardingStatusPending = "pending";
27
85
  var OnboardingStatusInProgress = "in_progress";
28
86
  var OnboardingStatusCompleted = "completed";
@@ -36,13 +94,15 @@ var OnboardingStatuses = {
36
94
  legacy: { value: "legacy", label: "Legacy" }
37
95
  };
38
96
  var ProvisioningStatusPending = "pending";
39
- var ProvisioningStatusRunning = "running";
97
+ var ProvisioningStatusInProgress = "in_progress";
40
98
  var ProvisioningStatusCompleted = "completed";
99
+ var ProvisioningStatusPartial = "partial";
41
100
  var ProvisioningStatusFailed = "failed";
42
101
  var ProvisioningStatuses = {
43
102
  pending: { value: "pending", label: "Pending" },
44
- running: { value: "running", label: "Running" },
103
+ in_progress: { value: "in_progress", label: "In Progress" },
45
104
  completed: { value: "completed", label: "Completed" },
105
+ partial: { value: "partial", label: "Partial" },
46
106
  failed: { value: "failed", label: "Failed" }
47
107
  };
48
108
  var OrgSubscriptionStatusTrialing = "trialing";
@@ -102,6 +162,14 @@ var SystemApps = {
102
162
  "knowledge-graph": { value: "knowledge-graph", label: "Knowledge Graph" },
103
163
  "document-processor": { value: "document-processor", label: "Document Processor" }
104
164
  };
165
+ var SchemaTypeEntities = "entities";
166
+ var SchemaTypeAgents = "agents";
167
+ var SchemaTypeOrgConfig = "org-config";
168
+ var OrgSchemaTypes = {
169
+ entities: { value: "entities", label: "Entities Database" },
170
+ agents: { value: "agents", label: "Agents Database" },
171
+ "org-config": { value: "org-config", label: "Org Config Database" }
172
+ };
105
173
  var AdminOrgCreate = "admin.orgs.create";
106
174
  var AdminOrgList = "admin.orgs.list";
107
175
  var AdminOrgListByMetadata = "admin.orgs.listByMetadata";
@@ -119,6 +187,7 @@ var AdminUsersGet = "admin.users.get";
119
187
  var AdminUsersGetForOrg = "admin.users.getUsersForOrg";
120
188
  var AdminUsersGetOne = "admin.users.getOne";
121
189
  var AdminUsersGetOneByEmail = "admin.users.getOneByEmail";
190
+ var AdminUsersGetOneByPhone = "admin.users.getOneByPhone";
122
191
  var AdminUsersCreate = "admin.users.create";
123
192
  var AdminUsersUpdate = "admin.users.update";
124
193
  var AdminUsersDelete = "admin.users.delete";
@@ -219,6 +288,7 @@ export {
219
288
  AdminUsersGetForOrg,
220
289
  AdminUsersGetOne,
221
290
  AdminUsersGetOneByEmail,
291
+ AdminUsersGetOneByPhone,
222
292
  AdminUsersGetSettings,
223
293
  AdminUsersUpdate,
224
294
  AdminUsersUpdateSettings,
@@ -272,6 +342,36 @@ export {
272
342
  OnboardingStatusPending,
273
343
  OnboardingStatusSkipped,
274
344
  OnboardingStatuses,
345
+ OrgArtifactChatWidget,
346
+ OrgArtifactClickHouseOrg,
347
+ OrgArtifactDefaultAgent,
348
+ OrgArtifactDefaultOrgLibrary,
349
+ OrgArtifactDefaultSkills,
350
+ OrgArtifactEntityDefsBoards,
351
+ OrgArtifactEntityDefsDocs,
352
+ OrgArtifactEntityDefsEloquent,
353
+ OrgArtifactKGSchema,
354
+ OrgArtifactKnowledgeGraph,
355
+ OrgArtifactNATSChatBuckets,
356
+ OrgArtifactOrgSettings,
357
+ OrgArtifactPostgresAgents,
358
+ OrgArtifactPostgresEntities,
359
+ OrgArtifactPostgresOrgConfig,
360
+ OrgArtifactStatusCompleted,
361
+ OrgArtifactStatusFailed,
362
+ OrgArtifactStatusInProgress,
363
+ OrgArtifactStatusPending,
364
+ OrgArtifactStatusSkipped,
365
+ OrgArtifactStatuses,
366
+ OrgArtifactTypes,
367
+ OrgProductAafya,
368
+ OrgProductConsumer,
369
+ OrgProductCustom,
370
+ OrgProductEloquent,
371
+ OrgProductFahim,
372
+ OrgProductShopAssist,
373
+ OrgProducts,
374
+ OrgSchemaTypes,
275
375
  OrgSizeEnterprise,
276
376
  OrgSizeLarge,
277
377
  OrgSizeMedium,
@@ -297,13 +397,17 @@ export {
297
397
  PortalSessionCreate,
298
398
  ProvisioningStatusCompleted,
299
399
  ProvisioningStatusFailed,
400
+ ProvisioningStatusInProgress,
401
+ ProvisioningStatusPartial,
300
402
  ProvisioningStatusPending,
301
- ProvisioningStatusRunning,
302
403
  ProvisioningStatuses,
303
404
  RulesCreateBillingRule,
304
405
  RulesDeleteBillingRule,
305
406
  RulesGetBillingRules,
306
407
  RulesUpdateBillingRule,
408
+ SchemaTypeAgents,
409
+ SchemaTypeEntities,
410
+ SchemaTypeOrgConfig,
307
411
  SubscriptionCancel,
308
412
  SubscriptionCheckout,
309
413
  SubscriptionCreate,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../models/admin.ts","../../models/billing.ts"],"sourcesContent":["// 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}\nexport interface Org {\n id?: string /* uuid */;\n title: string;\n logoUrl: string;\n mainDomain: string;\n address: Address;\n apps: SystemAppTS[];\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 tags?: string[];\n /**\n * Subscription (Stripe)\n */\n subscription?: OrgSubscription;\n userCount: number /* int64 */;\n /**\n * Onboarding & Provisioning\n */\n onboarding?: OrgOnboarding;\n provisioning?: OrgProvisioning;\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 * 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 * ProvisioningStatus represents the status of resource provisioning\n */\nexport type ProvisioningStatus = string;\nexport const ProvisioningStatusPending: ProvisioningStatus = \"pending\";\nexport const ProvisioningStatusRunning: ProvisioningStatus = \"running\";\nexport const ProvisioningStatusCompleted: ProvisioningStatus = \"completed\";\nexport const ProvisioningStatusFailed: ProvisioningStatus = \"failed\";\n\nexport const ProvisioningStatuses = {\n pending: { value: 'pending', label: 'Pending' },\n running: { value: 'running', label: 'Running' },\n completed: { value: 'completed', label: 'Completed' },\n failed: { value: 'failed', label: 'Failed' },\n} as const;\nexport type ProvisioningStatusTS = keyof typeof ProvisioningStatuses;\nexport type ProvisioningStatusOptionTS = typeof ProvisioningStatuses[ProvisioningStatusTS];\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}\n/**\n * OrgProvisioning tracks the provisioning status of default resources\n */\nexport interface OrgProvisioning {\n status: ProvisioningStatus;\n defaultAgentId?: string;\n defaultKnowledgeGraphId?: string;\n completedAt?: number /* int64 */;\n error?: string;\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 apps: SystemAppTS[];\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 * 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}\nexport type SystemApp = string;\nexport const SystemAppAdmin: SystemApp = \"admin\";\nexport const SystemAppCRM: SystemApp = \"crm\";\nexport const SystemAppHelpdesk: SystemApp = \"helpdesk\";\nexport const SystemAppMarketing: SystemApp = \"marketing\";\nexport const SystemAppWorkflow: SystemApp = \"workflow\";\nexport const SystemAppAnalytics: SystemApp = \"analytics\";\nexport const SystemAppKnowledgeGraph: SystemApp = \"knowledge-graph\";\nexport const SystemAppDocumentProcessor: SystemApp = \"document-processor\";\n\nexport const SystemApps = {\n admin: { value: 'admin', label: 'Admin' },\n crm: { value: 'crm', label: 'CRM' },\n helpdesk: { value: 'helpdesk', label: 'Helpdesk' },\n marketing: { value: 'marketing', label: 'Marketing' },\n workflow: { value: 'workflow', label: 'Workflow' },\n analytics: { value: 'analytics', label: 'Analytics' },\n \"knowledge-graph\": { value: 'knowledge-graph', label: 'Knowledge Graph' },\n \"document-processor\": { value: 'document-processor', label: 'Document Processor' },\n} as const;\nexport type SystemAppTS = keyof typeof SystemApps;\nexport type SystemAppOptionTS = typeof SystemApps[SystemAppTS];\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 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//////////\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 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 AdminTeamsCreate = \"admin.teams.create\";\nexport const AdminTeamsGetOne = \"admin.teams.getOne\";\nexport const AdminTeamsGetForOrg = \"admin.teams.getTeamsForOrg\";\nexport const AdminTeamsUpdateOnboarding = \"admin.teams.updateOnboardingData\";\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":";AA8DO,IAAM,kBAA6B;AACnC,IAAM,qBAAgC;AAEtC,IAAM,cAAc;AAAA,EACzB,QAAQ,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,EAC3C,WAAW,EAAE,OAAO,aAAa,OAAO,YAAY;AACtD;AAQO,IAAM,mBAA4B;AAClC,IAAM,oBAA6B;AAEnC,IAAM,WAAW;AAAA,EACtB,cAAc,EAAE,OAAO,cAAc,OAAO,aAAa;AAAA,EACzD,YAAY,EAAE,OAAO,cAAc,OAAO,aAAa;AACzD;AAQO,IAAM,cAAuB;AAC7B,IAAM,eAAwB;AAC9B,IAAM,gBAAyB;AAC/B,IAAM,eAAwB;AAC9B,IAAM,oBAA6B;AAEnC,IAAM,WAAW;AAAA,EACtB,MAAM,EAAE,OAAO,QAAQ,OAAO,UAAU;AAAA,EACxC,OAAO,EAAE,OAAO,SAAS,OAAO,OAAO;AAAA,EACvC,QAAQ,EAAE,OAAO,UAAU,OAAO,QAAQ;AAAA,EAC1C,OAAO,EAAE,OAAO,SAAS,OAAO,SAAS;AAAA,EACzC,YAAY,EAAE,OAAO,cAAc,OAAO,OAAO;AACnD;AAQO,IAAM,0BAA4C;AAClD,IAAM,6BAA+C;AACrD,IAAM,4BAA8C;AACpD,IAAM,0BAA4C;AAClD,IAAM,yBAA2C;AAEjD,IAAM,qBAAqB;AAAA,EAChC,SAAS,EAAE,OAAO,WAAW,OAAO,UAAU;AAAA,EAC9C,aAAa,EAAE,OAAO,eAAe,OAAO,cAAc;AAAA,EAC1D,WAAW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AAM,qBAAqB;AAI3B,IAAM,mBAAmB;AAIzB,IAAM,iBAAiB;AAIvB,IAAM,iBAAiB;AAghBvB,IAAM,uBAAuB;AAI7B,IAAM,sBAAsB;AAI5B,IAAM,qBAAqB;AAC3B,IAAM,sBAAsB;AAC5B,IAAM,sBAAsB;AAC5B,IAAM,4BAA4B;AAClC,IAAM,yBAAyB;AAI/B,IAAM,oBAAoB;AAC1B,IAAM,uBAAuB;AAC7B,IAAM,wBAAwB;AAI9B,IAAM,sBAAsB;AAC5B,IAAM,qBAAqB;AAC3B,IAAM,uBAAuB;AAI7B,IAAM,kBAAkB;AACxB,IAAM,qBAAqB;AAC3B,IAAM,qBAAqB;AAC3B,IAAM,qBAAqB;AAI3B,IAAM,sBAAsB;AAI5B,IAAM,qBAAqB;","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}\nexport interface Org {\n id?: string /* uuid */;\n title: string;\n logoUrl: string;\n mainDomain: string;\n address: Address;\n apps: SystemAppTS[];\n /**\n * Status & Control\n */\n status: OrgStatusTS;\n enabled: boolean;\n /**\n * Classification\n */\n product?: OrgProductTS;\n type: OrgTypeTS;\n size?: OrgSizeTS;\n industry?: string;\n tags?: string[];\n /**\n * Subscription (Stripe)\n */\n subscription?: OrgSubscription;\n userCount: number /* int64 */;\n /**\n * Onboarding & Provisioning\n */\n onboarding?: OrgOnboarding;\n provisioning?: OrgProvisioning;\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 * OrgProduct represents the product type for an organization\n */\nexport type OrgProduct = string;\nexport const OrgProductEloquent: OrgProduct = \"eloquent\";\nexport const OrgProductShopAssist: OrgProduct = \"shop-assist\";\nexport const OrgProductConsumer: OrgProduct = \"consumer\";\nexport const OrgProductCustom: OrgProduct = \"custom\";\nexport const OrgProductAafya: OrgProduct = \"aafya\";\nexport const OrgProductFahim: OrgProduct = \"fahim\";\n\nexport const OrgProducts = {\n eloquent: { value: 'eloquent', label: 'Eloquent', description: 'Full-featured enterprise AI platform with all capabilities' },\n \"shop-assist\": { value: 'shop-assist', label: 'Shop Assist', description: 'E-commerce focused AI assistant for online stores' },\n consumer: { value: 'consumer', label: 'Consumer', description: 'Consumer-facing AI applications' },\n custom: { value: 'custom', label: 'Custom', description: 'Custom configuration for specific requirements' },\n aafya: { value: 'aafya', label: 'Aafya', description: 'AI-powered healthcare triage and medical assistance platform' },\n fahim: { value: 'fahim', label: 'Fahim فاهم', description: 'AI-powered tutor for personalized learning across subjects' },\n} as const;\nexport type OrgProductTS = keyof typeof OrgProducts;\nexport type OrgProductOptionTS = typeof OrgProducts[OrgProductTS];\n\n/**\n * OrgArtifactType represents the type of artifact to provision\n */\nexport type OrgArtifactType = string;\n/**\n * PostgreSQL schemas (3 databases)\n */\nexport const OrgArtifactPostgresEntities: OrgArtifactType = \"postgres_entities\";\nexport const OrgArtifactPostgresAgents: OrgArtifactType = \"postgres_agents\";\nexport const OrgArtifactPostgresOrgConfig: OrgArtifactType = \"postgres_org_config\";\n/**\n * ClickHouse\n */\nexport const OrgArtifactClickHouseOrg: OrgArtifactType = \"clickhouse_org\";\n/**\n * NATS\n */\nexport const OrgArtifactNATSChatBuckets: OrgArtifactType = \"nats_chat_buckets\";\n/**\n * Entity definitions\n */\nexport const OrgArtifactEntityDefsEloquent: OrgArtifactType = \"entity_defs_eloquent\";\nexport const OrgArtifactEntityDefsDocs: OrgArtifactType = \"entity_defs_docs\";\nexport const OrgArtifactEntityDefsBoards: OrgArtifactType = \"entity_defs_boards\";\n/**\n * Settings\n */\nexport const OrgArtifactOrgSettings: OrgArtifactType = \"org_settings\";\n/**\n * Knowledge Graph\n */\nexport const OrgArtifactKnowledgeGraph: OrgArtifactType = \"knowledge_graph\";\nexport const OrgArtifactKGSchema: OrgArtifactType = \"kg_schema\";\n/**\n * Agents\n */\nexport const OrgArtifactDefaultSkills: OrgArtifactType = \"default_skills\";\nexport const OrgArtifactDefaultAgent: OrgArtifactType = \"default_agent\";\nexport const OrgArtifactChatWidget: OrgArtifactType = \"chat_widget\";\n/**\n * Default Resources\n */\nexport const OrgArtifactDefaultOrgLibrary: OrgArtifactType = \"default_org_library\";\n\nexport const OrgArtifactTypes = {\n postgres_entities: { value: 'postgres_entities', label: 'PostgreSQL Entities' },\n postgres_agents: { value: 'postgres_agents', label: 'PostgreSQL Agents' },\n postgres_org_config: { value: 'postgres_org_config', label: 'PostgreSQL Org Config' },\n clickhouse_org: { value: 'clickhouse_org', label: 'ClickHouse Analytics' },\n nats_chat_buckets: { value: 'nats_chat_buckets', label: 'NATS Chat Buckets' },\n entity_defs_eloquent: { value: 'entity_defs_eloquent', label: 'Eloquent Entities' },\n entity_defs_docs: { value: 'entity_defs_docs', label: 'Documents Entities' },\n entity_defs_boards: { value: 'entity_defs_boards', label: 'Boards Entities' },\n org_settings: { value: 'org_settings', label: 'Organization Settings' },\n knowledge_graph: { value: 'knowledge_graph', label: 'Knowledge Graph' },\n kg_schema: { value: 'kg_schema', label: 'KG Default Schema' },\n default_skills: { value: 'default_skills', label: 'Default Skills' },\n default_agent: { value: 'default_agent', label: 'Default Agent' },\n chat_widget: { value: 'chat_widget', label: 'Chat Widget' },\n default_org_library: { value: 'default_org_library', label: 'Org Documents Library' },\n} as const;\nexport type OrgArtifactTypeTS = keyof typeof OrgArtifactTypes;\nexport type OrgArtifactTypeOptionTS = typeof OrgArtifactTypes[OrgArtifactTypeTS];\n\n/**\n * OrgArtifactStatus represents the status of an artifact\n */\nexport type OrgArtifactStatus = string;\nexport const OrgArtifactStatusPending: OrgArtifactStatus = \"pending\";\nexport const OrgArtifactStatusInProgress: OrgArtifactStatus = \"in_progress\";\nexport const OrgArtifactStatusCompleted: OrgArtifactStatus = \"completed\";\nexport const OrgArtifactStatusFailed: OrgArtifactStatus = \"failed\";\nexport const OrgArtifactStatusSkipped: OrgArtifactStatus = \"skipped\";\n\nexport const OrgArtifactStatuses = {\n pending: { value: 'pending', label: 'Pending' },\n in_progress: { value: 'in_progress', label: 'In Progress' },\n completed: { value: 'completed', label: 'Completed' },\n failed: { value: 'failed', label: 'Failed' },\n skipped: { value: 'skipped', label: 'Skipped' },\n} as const;\nexport type OrgArtifactStatusTS = keyof typeof OrgArtifactStatuses;\nexport type OrgArtifactStatusOptionTS = typeof OrgArtifactStatuses[OrgArtifactStatusTS];\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 * ProvisioningStatus represents the status of resource provisioning\n */\nexport type ProvisioningStatus = string;\nexport const ProvisioningStatusPending: ProvisioningStatus = \"pending\";\nexport const ProvisioningStatusInProgress: ProvisioningStatus = \"in_progress\";\nexport const ProvisioningStatusCompleted: ProvisioningStatus = \"completed\";\nexport const ProvisioningStatusPartial: ProvisioningStatus = \"partial\"; // Some artifacts failed\nexport const ProvisioningStatusFailed: ProvisioningStatus = \"failed\";\n\nexport const ProvisioningStatuses = {\n pending: { value: 'pending', label: 'Pending' },\n in_progress: { value: 'in_progress', label: 'In Progress' },\n completed: { value: 'completed', label: 'Completed' },\n partial: { value: 'partial', label: 'Partial' },\n failed: { value: 'failed', label: 'Failed' },\n} as const;\nexport type ProvisioningStatusTS = keyof typeof ProvisioningStatuses;\nexport type ProvisioningStatusOptionTS = typeof ProvisioningStatuses[ProvisioningStatusTS];\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}\n/**\n * OrgArtifact represents a single provisioned artifact\n */\nexport interface OrgArtifact {\n type: OrgArtifactTypeTS;\n status: OrgArtifactStatusTS;\n critical: boolean;\n error?: string;\n duration?: number /* int64 */; // Actual duration in ms\n estimatedDuration?: number /* int64 */; // Estimated duration in ms\n startedAt?: number /* int64 */;\n completedAt?: number /* int64 */;\n metadata?: { [key: string]: any};\n}\n/**\n * OrgProvisioning tracks the provisioning status of org resources\n */\nexport interface OrgProvisioning {\n status: ProvisioningStatusTS;\n totalArtifacts: number /* int */;\n completedArtifacts: number /* int */;\n failedArtifacts: number /* int */;\n artifacts?: OrgArtifact[];\n startedAt?: number /* int64 */;\n completedAt?: number /* int64 */;\n /**\n * Legacy fields for backwards compatibility\n */\n defaultAgentId?: string;\n defaultKnowledgeGraphId?: string;\n error?: string;\n /**\n * Metadata for passing data between provisioners (e.g., skill IDs)\n */\n metadata?: { [key: string]: any};\n}\n/**\n * OrgProvisioningProgress represents real-time progress for SSE\n */\nexport interface OrgProvisioningProgress {\n orgId: string;\n artifact?: OrgArtifactTypeTS;\n status: OrgArtifactStatusTS;\n error?: string;\n progress: number /* int */; // 0-100 overall\n totalArtifacts: number /* int */;\n completedCount: number /* int */;\n failedCount: number /* int */;\n currentStep?: string;\n elapsedMs: number /* int64 */;\n estimatedMs?: number /* int64 */;\n}\n/**\n * OrgProvisioningOptions allows customizing provisioning behavior\n */\nexport interface OrgProvisioningOptions {\n skipArtifacts?: OrgArtifactTypeTS[];\n onlyArtifacts?: OrgArtifactTypeTS[];\n customArtifacts?: OrgArtifactTypeTS[];\n skipKnowledgeGraph?: boolean;\n skipDefaultAgent?: boolean;\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 apps: SystemAppTS[];\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 * 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}\nexport type SystemApp = string;\nexport const SystemAppAdmin: SystemApp = \"admin\";\nexport const SystemAppCRM: SystemApp = \"crm\";\nexport const SystemAppHelpdesk: SystemApp = \"helpdesk\";\nexport const SystemAppMarketing: SystemApp = \"marketing\";\nexport const SystemAppWorkflow: SystemApp = \"workflow\";\nexport const SystemAppAnalytics: SystemApp = \"analytics\";\nexport const SystemAppKnowledgeGraph: SystemApp = \"knowledge-graph\";\nexport const SystemAppDocumentProcessor: SystemApp = \"document-processor\";\n\nexport const SystemApps = {\n admin: { value: 'admin', label: 'Admin' },\n crm: { value: 'crm', label: 'CRM' },\n helpdesk: { value: 'helpdesk', label: 'Helpdesk' },\n marketing: { value: 'marketing', label: 'Marketing' },\n workflow: { value: 'workflow', label: 'Workflow' },\n analytics: { value: 'analytics', label: 'Analytics' },\n \"knowledge-graph\": { value: 'knowledge-graph', label: 'Knowledge Graph' },\n \"document-processor\": { value: 'document-processor', label: 'Document Processor' },\n} as const;\nexport type SystemAppTS = keyof typeof SystemApps;\nexport type SystemAppOptionTS = typeof SystemApps[SystemAppTS];\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 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 provisioning\n * Aligned with SeedOrgRequest structure\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 product?: OrgProduct; // Product identifier (eloquent, shop-assist, etc.)\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 with provisioning\n */\nexport interface CreateOrgRequest {\n title: string;\n mainDomain: string;\n product: OrgProductTS;\n type?: OrgTypeTS;\n size?: OrgSizeTS;\n industry?: string;\n logoUrl?: string;\n address?: Address;\n subscription?: OrgSubscription;\n provisioningOptions?: OrgProvisioningOptions;\n metadata?: { [key: string]: any};\n}\n/**\n * CreateOrgResponse is the response for org creation with provisioning\n */\nexport interface CreateOrgResponse {\n org: Org;\n metadata: ResponseMetadata;\n}\n/**\n * RetryProvisioningRequest is the request for retrying failed artifacts\n */\nexport interface RetryProvisioningRequest {\n artifacts?: OrgArtifactTypeTS[];\n}\n/**\n * RetryProvisioningResponse is the response for retry operation\n */\nexport interface RetryProvisioningResponse {\n metadata: ResponseMetadata;\n}\n/**\n * OrgSchemaType represents a database schema type for bare schema provisioning.\n * Unlike OrgArtifactType, this only creates empty org_<uuid> schemas.\n */\nexport type OrgSchemaType = string;\nexport const SchemaTypeEntities: OrgSchemaType = \"entities\";\nexport const SchemaTypeAgents: OrgSchemaType = \"agents\";\nexport const SchemaTypeOrgConfig: OrgSchemaType = \"org-config\";\n\nexport const OrgSchemaTypes = {\n entities: { value: 'entities', label: 'Entities Database' },\n agents: { value: 'agents', label: 'Agents Database' },\n \"org-config\": { value: 'org-config', label: 'Org Config Database' },\n} as const;\nexport type OrgSchemaTypeTS = keyof typeof OrgSchemaTypes;\n\n/**\n * CreateOrgWithSchemasRequest creates an org with bare database schemas\n */\nexport interface CreateOrgWithSchemasRequest {\n org: Org;\n schemas: OrgSchemaTypeTS[];\n}\n/**\n * CreateOrgWithSchemasResponse contains the result of creating an org with schemas\n */\nexport interface CreateOrgWithSchemasResponse {\n success: boolean;\n org: Org;\n createdSchemas: OrgSchemaTypeTS[];\n failedSchemas?: OrgSchemaTypeTS[];\n errors?: { [key: string]: string};\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 AdminTeamsCreate = \"admin.teams.create\";\nexport const AdminTeamsGetOne = \"admin.teams.getOne\";\nexport const AdminTeamsGetForOrg = \"admin.teams.getTeamsForOrg\";\nexport const AdminTeamsUpdateOnboarding = \"admin.teams.updateOnboardingData\";\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":";AAgEO,IAAM,kBAA6B;AACnC,IAAM,qBAAgC;AAEtC,IAAM,cAAc;AAAA,EACzB,QAAQ,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,EAC3C,WAAW,EAAE,OAAO,aAAa,OAAO,YAAY;AACtD;AAQO,IAAM,mBAA4B;AAClC,IAAM,oBAA6B;AAEnC,IAAM,WAAW;AAAA,EACtB,cAAc,EAAE,OAAO,cAAc,OAAO,aAAa;AAAA,EACzD,YAAY,EAAE,OAAO,cAAc,OAAO,aAAa;AACzD;AAQO,IAAM,cAAuB;AAC7B,IAAM,eAAwB;AAC9B,IAAM,gBAAyB;AAC/B,IAAM,eAAwB;AAC9B,IAAM,oBAA6B;AAEnC,IAAM,WAAW;AAAA,EACtB,MAAM,EAAE,OAAO,QAAQ,OAAO,UAAU;AAAA,EACxC,OAAO,EAAE,OAAO,SAAS,OAAO,OAAO;AAAA,EACvC,QAAQ,EAAE,OAAO,UAAU,OAAO,QAAQ;A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