@elqnt/types 1.0.9 → 2.0.5
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.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +278 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +203 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models/index.d.mts +874 -8
- package/dist/models/index.d.ts +874 -8
- package/dist/models/index.js +278 -2
- package/dist/models/index.js.map +1 -1
- package/dist/models/index.mjs +203 -1
- package/dist/models/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../models/types.ts","../../models/user-status.ts"],"sourcesContent":["// Code generated by tygo. DO NOT EDIT.\n\n//////////\n// source: common-types.go\n\nexport interface ResponseMetadata {\n success: boolean;\n timestamp: any /* time.Time */;\n message?: string;\n error?: string;\n}\n\n//////////\n// source: product-models.go\n\nexport type ProductName = string;\nexport const ProductNameShopAssist: ProductName = \"shop-assist\";\nexport const ProductNamePublicSector: ProductName = \"public-sector\";\nexport const ProductNameHub: ProductName = \"hub\";\nexport const ProductNameFinance: ProductName = \"finance\";\nexport const ProductNameLegal: ProductName = \"legal\";\nexport const ProductNameRealEstate: ProductName = \"real-estate\";\nexport const ProductNameQuickMind: ProductName = \"quick-mind\";\nexport const ProductNameDocBrain: ProductName = \"doc-brain\";\nexport const ProductNameDoneProjects: ProductName = \"done-projects\";\n\nexport const ProductNames = {\n \"shop-assist\": { value: 'shop-assist', label: 'Shop Assist' },\n \"public-sector\": { value: 'public-sector', label: 'Public Sector' },\n \"hub\": { value: 'hub', label: 'Hub' },\n \"finance\": { value: 'finance', label: 'Finance' },\n \"legal\": { value: 'legal', label: 'Legal' },\n \"real-estate\": { value: 'real-estate', label: 'Real Estate' },\n \"quick-mind\": { value: 'quick-mind', label: 'Quick Mind' },\n \"doc-brain\": { value: 'doc-brain', label: 'Doc Brain' },\n \"done-projects\": { value: 'done-projects', label: 'Done Projects' },\n} as const;\nexport type ProductNameTS = keyof typeof ProductNames;\nexport type ProductNameOptionTS = typeof ProductNames[ProductNameTS];\n\n\n//////////\n// source: schema.go\n\n/**\n * Base JSON Schema type for reuse\n */\nexport interface JSONSchema {\n /**\n * Core Schema Metadata\n */\n type: string;\n title?: string;\n description?: string;\n default?: any;\n /**\n * Schema Composition\n */\n properties?: { [key: string]: JSONSchema};\n items?: JSONSchema; // For arrays\n required?: string[];\n '$ref'?: string;\n /**\n * Validation\n */\n minLength?: number /* int */;\n maxLength?: number /* int */;\n minimum?: number /* float64 */;\n maximum?: number /* float64 */;\n pattern?: string;\n format?: string; // email, date-time, etc\n enum?: any[];\n /**\n * Extended Properties\n */\n 'x-enumLabels'?: string[];\n 'x-enumColors'?: string[];\n 'x-enumDescriptions'?: string[];\n 'x-refDisplayFields'?: string[];\n 'x-refSearchFields'?: string[];\n 'x-refMultiple'?: boolean;\n 'x-searchable'?: boolean;\n 'x-unique'?: boolean;\n 'x-displayOrder'?: number /* int */;\n 'x-component'?: string; // Custom UI component to render for this field\n}\n\n//////////\n// source: service-types.go\n\n/**\n * ServiceEventMetadata contains metadata for service events\n */\nexport interface ServiceEventMetadata {\n id: string;\n timestamp: any /* time.Time */;\n version: string;\n source: string;\n}\n/**\n * ServiceEvent represents an event published by a service\n */\nexport interface ServiceEvent {\n metadata: ServiceEventMetadata;\n data: any /* json.RawMessage */;\n}\n\n//////////\n// source: types.go\n\n/**\n * todo: remove this\n */\nexport interface Variable {\n type: DataType;\n value: any;\n defaultValue?: any;\n validation?: VariableValidation;\n scope: VariableScope;\n reference?: VariableReference;\n description?: string;\n required: boolean;\n}\nexport type DataType = string;\nexport const DataTypeString: DataType = \"string\";\nexport const DataTypeInt: DataType = \"int\";\nexport const DataTypeFloat: DataType = \"float\";\nexport const DataTypeBoolean: DataType = \"boolean\";\nexport const DataTypeDate: DataType = \"date\";\nexport const DataTypeJSON: DataType = \"json\";\nexport const DataTypeArray: DataType = \"array\";\nexport const DataTypeInputFields: DataType = \"inputFields\";\nexport const DataTypeFile: DataType = \"file\";\nexport const DataTypeObjectList: DataType = \"objectList\";\nexport type VariableScope = string;\nexport const VariableScopeGlobal: VariableScope = \"global\";\nexport const VariableScopeNode: VariableScope = \"node\";\nexport const VariableScopeEdge: VariableScope = \"edge\";\nexport interface VariableValidation {\n minLength?: number /* int */;\n maxLength?: number /* int */;\n pattern?: string;\n min?: number /* float64 */;\n max?: number /* float64 */;\n options?: string[];\n}\nexport interface VariableReference {\n nodeId?: string;\n fieldPath: string; // dot notation for nested fields\n}\n","// User status types - shared between auth and chat packages\n// These are manually maintained to avoid circular dependencies\n\nimport { ResponseMetadata } from \"./types\";\n\nexport type UserStatusTS = \"online\" | \"away\" | \"busy\" | \"offline\";\n\nexport interface UpdateUserStatusRequest {\n orgId: string;\n userId: string;\n status: UserStatusTS;\n}\n\nexport interface UpdateUserStatusResponse {\n metadata: ResponseMetadata;\n}\n\nexport const UpdateUserStatusSubject = \"chat.user.status.update\";\n"],"mappings":";AAgBO,IAAM,wBAAqC;AAC3C,IAAM,0BAAuC;AAC7C,IAAM,iBAA8B;AACpC,IAAM,qBAAkC;AACxC,IAAM,mBAAgC;AACtC,IAAM,wBAAqC;AAC3C,IAAM,uBAAoC;AAC1C,IAAM,sBAAmC;AACzC,IAAM,0BAAuC;AAE7C,IAAM,eAAe;AAAA,EAC1B,eAAe,EAAE,OAAO,eAAe,OAAO,cAAc;AAAA,EAC5D,iBAAiB,EAAE,OAAO,iBAAiB,OAAO,gBAAgB;AAAA,EAClE,OAAO,EAAE,OAAO,OAAO,OAAO,MAAM;AAAA,EACpC,WAAW,EAAE,OAAO,WAAW,OAAO,UAAU;AAAA,EAChD,SAAS,EAAE,OAAO,SAAS,OAAO,QAAQ;AAAA,EAC1C,eAAe,EAAE,OAAO,eAAe,OAAO,cAAc;AAAA,EAC5D,cAAc,EAAE,OAAO,cAAc,OAAO,aAAa;AAAA,EACzD,aAAa,EAAE,OAAO,aAAa,OAAO,YAAY;AAAA,EACtD,iBAAiB,EAAE,OAAO,iBAAiB,OAAO,gBAAgB;AACpE;AAwFO,IAAM,iBAA2B;AACjC,IAAM,cAAwB;AAC9B,IAAM,gBAA0B;AAChC,IAAM,kBAA4B;AAClC,IAAM,eAAyB;AAC/B,IAAM,eAAyB;AAC/B,IAAM,gBAA0B;AAChC,IAAM,sBAAgC;AACtC,IAAM,eAAyB;AAC/B,IAAM,qBAA+B;AAErC,IAAM,sBAAqC;AAC3C,IAAM,oBAAmC;AACzC,IAAM,oBAAmC;;;ACxHzC,IAAM,0BAA0B;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../models/types.ts","../../models/user-status.ts","../../models/auth.ts"],"sourcesContent":["// Code generated by tygo. DO NOT EDIT.\n\n//////////\n// source: product-models.go\n\nexport type ProductName = string;\nexport const ProductNameShopAssist: ProductName = \"shop-assist\";\nexport const ProductNamePublicSector: ProductName = \"public-sector\";\nexport const ProductNameHub: ProductName = \"hub\";\nexport const ProductNameFinance: ProductName = \"finance\";\nexport const ProductNameLegal: ProductName = \"legal\";\nexport const ProductNameRealEstate: ProductName = \"real-estate\";\nexport const ProductNameQuickMind: ProductName = \"quick-mind\";\nexport const ProductNameDocBrain: ProductName = \"doc-brain\";\nexport const ProductNameDoneProjects: ProductName = \"done-projects\";\n\nexport const ProductNames = {\n \"shop-assist\": { value: 'shop-assist', label: 'Shop Assist' },\n \"public-sector\": { value: 'public-sector', label: 'Public Sector' },\n \"hub\": { value: 'hub', label: 'Hub' },\n \"finance\": { value: 'finance', label: 'Finance' },\n \"legal\": { value: 'legal', label: 'Legal' },\n \"real-estate\": { value: 'real-estate', label: 'Real Estate' },\n \"quick-mind\": { value: 'quick-mind', label: 'Quick Mind' },\n \"doc-brain\": { value: 'doc-brain', label: 'Doc Brain' },\n \"done-projects\": { value: 'done-projects', label: 'Done Projects' },\n} as const;\nexport type ProductNameTS = keyof typeof ProductNames;\nexport type ProductNameOptionTS = typeof ProductNames[ProductNameTS];\n\n\n//////////\n// source: response.go\n\n/**\n * APIResponse is the unified response wrapper for all HTTP endpoints.\n * Either Data or Error is present, never both (mutually exclusive).\n * This type is generated to TypeScript via tygo for frontend consumption.\n */\nexport interface APIResponse {\n data?: any;\n error?: APIError;\n metadata?: ResponseMetadata;\n}\n/**\n * APIError contains structured error information sent to clients.\n * Code maps to syserrors error codes (e.g., \"VALIDATION_ERROR\", \"NOT_FOUND\").\n */\nexport interface APIError {\n code: string;\n message: string;\n details?: { [key: string]: any};\n}\n/**\n * ResponseMetadata contains response metadata for both HTTP and NATS responses.\n * For HTTP: typically only RequestID and Timestamp are used (success indicated by HTTP status)\n * For NATS: Success, Message, and Error fields are used for RPC-style communication\n */\nexport interface ResponseMetadata {\n success: boolean;\n timestamp: number /* int64 */;\n message?: string;\n error?: string;\n requestId?: string;\n}\n\n//////////\n// source: schema.go\n\n/**\n * Base JSON Schema type for reuse\n */\nexport interface JSONSchema {\n /**\n * Core Schema Metadata\n */\n type: string;\n title?: string;\n description?: string;\n default?: any;\n /**\n * Schema Composition\n */\n properties?: { [key: string]: JSONSchema};\n items?: JSONSchema; // For arrays\n required?: string[];\n '$ref'?: string;\n /**\n * Validation\n */\n minLength?: number /* int */;\n maxLength?: number /* int */;\n minimum?: number /* float64 */;\n maximum?: number /* float64 */;\n pattern?: string;\n format?: string; // email, date-time, etc\n enum?: any[];\n /**\n * Extended Properties\n */\n 'x-enumLabels'?: string[];\n 'x-enumColors'?: string[];\n 'x-enumDescriptions'?: string[];\n 'x-refDisplayFields'?: string[];\n 'x-refSearchFields'?: string[];\n 'x-refMultiple'?: boolean;\n 'x-searchable'?: boolean;\n 'x-unique'?: boolean;\n 'x-displayOrder'?: number /* int */;\n}\n\n//////////\n// source: service-types.go\n\n/**\n * ServiceEventMetadata contains metadata for service events\n */\nexport interface ServiceEventMetadata {\n id: string;\n timestamp: any /* time.Time */;\n version: string;\n source: string;\n}\n/**\n * ServiceEvent represents an event published by a service\n */\nexport interface ServiceEvent {\n metadata: ServiceEventMetadata;\n data: any /* json.RawMessage */;\n}\n\n//////////\n// source: types.go\n\n/**\n * todo: remove this\n */\nexport interface Variable {\n type: DataType;\n value: any;\n defaultValue?: any;\n validation?: VariableValidation;\n scope: VariableScope;\n reference?: VariableReference;\n description?: string;\n required: boolean;\n}\nexport type DataType = string;\nexport const DataTypeString: DataType = \"string\";\nexport const DataTypeInt: DataType = \"int\";\nexport const DataTypeFloat: DataType = \"float\";\nexport const DataTypeBoolean: DataType = \"boolean\";\nexport const DataTypeDate: DataType = \"date\";\nexport const DataTypeJSON: DataType = \"json\";\nexport const DataTypeArray: DataType = \"array\";\nexport const DataTypeInputFields: DataType = \"inputFields\";\nexport const DataTypeFile: DataType = \"file\";\nexport const DataTypeObjectList: DataType = \"objectList\";\nexport type VariableScope = string;\nexport const VariableScopeGlobal: VariableScope = \"global\";\nexport const VariableScopeNode: VariableScope = \"node\";\nexport const VariableScopeEdge: VariableScope = \"edge\";\nexport interface VariableValidation {\n minLength?: number /* int */;\n maxLength?: number /* int */;\n pattern?: string;\n min?: number /* float64 */;\n max?: number /* float64 */;\n options?: string[];\n}\nexport interface VariableReference {\n nodeId?: string;\n fieldPath: string; // dot notation for nested fields\n}\n","// User status types - shared between auth and chat packages\n// These are manually maintained to avoid circular dependencies\n\nimport { ResponseMetadata } from \"./types\";\n\nexport type UserStatusTS = \"online\" | \"away\" | \"busy\" | \"offline\";\n\nexport interface UpdateUserStatusRequest {\n orgId: string;\n userId: string;\n status: UserStatusTS;\n}\n\nexport interface UpdateUserStatusResponse {\n metadata: ResponseMetadata;\n}\n\nexport const UpdateUserStatusSubject = \"chat.user.status.update\";\n","// Code generated by tygo. DO NOT EDIT.\n// Consolidated from @elqnt/auth package\n\nimport { ResponseMetadata } from \"./types\";\n\n//////////\n// source: user.go\n\nexport type WidgetType = string;\nexport const WidgetTypeCalendar: WidgetType = \"calendar\";\nexport const WidgetTypeActivities: WidgetType = \"activities\";\nexport const WidgetTypeEmail: WidgetType = \"email\";\nexport const WidgetTypeTasks: WidgetType = \"tasks\";\nexport const WidgetTypeNotes: WidgetType = \"notes\";\nexport const WidgetTypeFiles: WidgetType = \"files\";\nexport const WidgetTypeContacts: WidgetType = \"contacts\";\nexport const WidgetTypeAccounts: WidgetType = \"accounts\";\nexport const WidgetTypeLeads: WidgetType = \"leads\";\nexport const WidgetTypeOpportunities: WidgetType = \"opportunities\";\nexport const WidgetTypeChart: WidgetType = \"chart\";\nexport const WidgetTypeOrders: WidgetType = \"orders\";\nexport interface Widget {\n id?: string /* ObjectID */;\n userId: string;\n title: string;\n subTitle?: string;\n type: WidgetType;\n chartSettings?: ChartSettings;\n slotIndex: number /* int */;\n}\nexport type ChartType = string;\nexport const ChartTypeBar: ChartType = \"Bar chart\";\nexport const ChartTypeLine: ChartType = \"Line chart\";\nexport const ChartTypePie: ChartType = \"Pie chart\";\nexport const ChartTypeDoughnut: ChartType = \"Doughnut chart\";\nexport const ChartTypeMetic: ChartType = \"Metric\";\nexport type AggregateType = string;\nexport const AggregateTypeSum: AggregateType = \"Sum\";\nexport const AggregateTypeCount: AggregateType = \"Count\";\nexport const AggregateTypeAverage: AggregateType = \"Average\";\nexport const AggregateTypeMin: AggregateType = \"Min\";\nexport const AggregateTypeMax: AggregateType = \"Max\";\nexport const AggregateTypeDistinct: AggregateType = \"Distinct\";\nexport interface MetricResult {\n aggregateType: AggregateType;\n value: any;\n compareAggregateType: AggregateType;\n compareValue: any;\n}\nexport interface DateValue {\n date: string;\n value: number /* float64 */;\n}\nexport interface ChartSettings {\n chartType: ChartType;\n aggregateType: AggregateType;\n tableName: string;\n groupByFieldName: string;\n valueFieldName: string;\n filterFieldName: string;\n filterFieldValue: string;\n enableCompare: boolean;\n compareTitle: string;\n compareAggregateType: AggregateType;\n compareTableName: string;\n compareValueFieldName: string;\n compareFilterFieldName: string;\n compareFilterFieldValue: string;\n}\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 id: string /* uuid */;\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}\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 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// Backwards compatibility aliases\n/** @deprecated Use OrgInput instead */\nexport type WorkspaceInput = OrgInput;\n/** @deprecated Use OrgResult instead */\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}\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 * OrgResponse is the response for organization operations\n */\nexport interface OrgResponse {\n org: Org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