@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.
@@ -1,9 +1,3 @@
1
- interface ResponseMetadata {
2
- success: boolean;
3
- timestamp: any;
4
- message?: string;
5
- error?: string;
6
- }
7
1
  type ProductName = string;
8
2
  declare const ProductNameShopAssist: ProductName;
9
3
  declare const ProductNamePublicSector: ProductName;
@@ -54,6 +48,39 @@ declare const ProductNames: {
54
48
  };
55
49
  type ProductNameTS = keyof typeof ProductNames;
56
50
  type ProductNameOptionTS = typeof ProductNames[ProductNameTS];
51
+ /**
52
+ * APIResponse is the unified response wrapper for all HTTP endpoints.
53
+ * Either Data or Error is present, never both (mutually exclusive).
54
+ * This type is generated to TypeScript via tygo for frontend consumption.
55
+ */
56
+ interface APIResponse {
57
+ data?: any;
58
+ error?: APIError;
59
+ metadata?: ResponseMetadata;
60
+ }
61
+ /**
62
+ * APIError contains structured error information sent to clients.
63
+ * Code maps to syserrors error codes (e.g., "VALIDATION_ERROR", "NOT_FOUND").
64
+ */
65
+ interface APIError {
66
+ code: string;
67
+ message: string;
68
+ details?: {
69
+ [key: string]: any;
70
+ };
71
+ }
72
+ /**
73
+ * ResponseMetadata contains response metadata for both HTTP and NATS responses.
74
+ * For HTTP: typically only RequestID and Timestamp are used (success indicated by HTTP status)
75
+ * For NATS: Success, Message, and Error fields are used for RPC-style communication
76
+ */
77
+ interface ResponseMetadata {
78
+ success: boolean;
79
+ timestamp: number;
80
+ message?: string;
81
+ error?: string;
82
+ requestId?: string;
83
+ }
57
84
  /**
58
85
  * Base JSON Schema type for reuse
59
86
  */
@@ -96,7 +123,6 @@ interface JSONSchema {
96
123
  'x-searchable'?: boolean;
97
124
  'x-unique'?: boolean;
98
125
  'x-displayOrder'?: number;
99
- 'x-component'?: string;
100
126
  }
101
127
  /**
102
128
  * ServiceEventMetadata contains metadata for service events
@@ -166,4 +192,844 @@ interface UpdateUserStatusResponse {
166
192
  }
167
193
  declare const UpdateUserStatusSubject = "chat.user.status.update";
168
194
 
169
- export { type DataType, DataTypeArray, DataTypeBoolean, DataTypeDate, DataTypeFile, DataTypeFloat, DataTypeInputFields, DataTypeInt, DataTypeJSON, DataTypeObjectList, DataTypeString, type JSONSchema, type ProductName, ProductNameDocBrain, ProductNameDoneProjects, ProductNameFinance, ProductNameHub, ProductNameLegal, type ProductNameOptionTS, ProductNamePublicSector, ProductNameQuickMind, ProductNameRealEstate, ProductNameShopAssist, type ProductNameTS, ProductNames, type ResponseMetadata, type ServiceEvent, type ServiceEventMetadata, type UpdateUserStatusRequest, type UpdateUserStatusResponse, UpdateUserStatusSubject, type UserStatusTS, type Variable, type VariableReference, type VariableScope, VariableScopeEdge, VariableScopeGlobal, VariableScopeNode, type VariableValidation };
195
+ type WidgetType = string;
196
+ declare const WidgetTypeCalendar: WidgetType;
197
+ declare const WidgetTypeActivities: WidgetType;
198
+ declare const WidgetTypeEmail: WidgetType;
199
+ declare const WidgetTypeTasks: WidgetType;
200
+ declare const WidgetTypeNotes: WidgetType;
201
+ declare const WidgetTypeFiles: WidgetType;
202
+ declare const WidgetTypeContacts: WidgetType;
203
+ declare const WidgetTypeAccounts: WidgetType;
204
+ declare const WidgetTypeLeads: WidgetType;
205
+ declare const WidgetTypeOpportunities: WidgetType;
206
+ declare const WidgetTypeChart: WidgetType;
207
+ declare const WidgetTypeOrders: WidgetType;
208
+ interface Widget {
209
+ id?: string;
210
+ userId: string;
211
+ title: string;
212
+ subTitle?: string;
213
+ type: WidgetType;
214
+ chartSettings?: ChartSettings;
215
+ slotIndex: number;
216
+ }
217
+ type ChartType = string;
218
+ declare const ChartTypeBar: ChartType;
219
+ declare const ChartTypeLine: ChartType;
220
+ declare const ChartTypePie: ChartType;
221
+ declare const ChartTypeDoughnut: ChartType;
222
+ declare const ChartTypeMetic: ChartType;
223
+ type AggregateType = string;
224
+ declare const AggregateTypeSum: AggregateType;
225
+ declare const AggregateTypeCount: AggregateType;
226
+ declare const AggregateTypeAverage: AggregateType;
227
+ declare const AggregateTypeMin: AggregateType;
228
+ declare const AggregateTypeMax: AggregateType;
229
+ declare const AggregateTypeDistinct: AggregateType;
230
+ interface MetricResult {
231
+ aggregateType: AggregateType;
232
+ value: any;
233
+ compareAggregateType: AggregateType;
234
+ compareValue: any;
235
+ }
236
+ interface DateValue {
237
+ date: string;
238
+ value: number;
239
+ }
240
+ interface ChartSettings {
241
+ chartType: ChartType;
242
+ aggregateType: AggregateType;
243
+ tableName: string;
244
+ groupByFieldName: string;
245
+ valueFieldName: string;
246
+ filterFieldName: string;
247
+ filterFieldValue: string;
248
+ enableCompare: boolean;
249
+ compareTitle: string;
250
+ compareAggregateType: AggregateType;
251
+ compareTableName: string;
252
+ compareValueFieldName: string;
253
+ compareFilterFieldName: string;
254
+ compareFilterFieldValue: string;
255
+ }
256
+ interface Address {
257
+ line1: string;
258
+ line2: string;
259
+ city: string;
260
+ state: string;
261
+ country: string;
262
+ zip: string;
263
+ }
264
+ interface Org {
265
+ id?: string;
266
+ title: string;
267
+ logoUrl: string;
268
+ mainDomain: string;
269
+ address: Address;
270
+ apps: SystemAppTS[];
271
+ /**
272
+ * Status & Control
273
+ */
274
+ status: OrgStatusTS;
275
+ enabled: boolean;
276
+ /**
277
+ * Classification
278
+ */
279
+ type: OrgTypeTS;
280
+ size?: OrgSizeTS;
281
+ industry?: string;
282
+ tags?: string[];
283
+ /**
284
+ * Subscription (Stripe)
285
+ */
286
+ subscription?: OrgSubscription;
287
+ userCount: number;
288
+ /**
289
+ * Onboarding & Provisioning
290
+ */
291
+ onboarding?: OrgOnboarding;
292
+ provisioning?: OrgProvisioning;
293
+ /**
294
+ * Template & Roles
295
+ */
296
+ template?: OrgTemplate;
297
+ roles: string[];
298
+ /**
299
+ * Flexible metadata
300
+ */
301
+ metadata?: {
302
+ [key: string]: any;
303
+ };
304
+ /**
305
+ * Audit fields
306
+ */
307
+ createdAt?: number;
308
+ updatedAt?: number;
309
+ createdBy?: string;
310
+ updatedBy?: string;
311
+ }
312
+ type OrgStatus = string;
313
+ declare const OrgStatusActive: OrgStatus;
314
+ declare const OrgStatusSuspended: OrgStatus;
315
+ declare const OrgStatuses: {
316
+ readonly active: {
317
+ readonly value: "active";
318
+ readonly label: "Active";
319
+ };
320
+ readonly suspended: {
321
+ readonly value: "suspended";
322
+ readonly label: "Suspended";
323
+ };
324
+ };
325
+ type OrgStatusTS = keyof typeof OrgStatuses;
326
+ type OrgStatusOptionTS = typeof OrgStatuses[OrgStatusTS];
327
+ /**
328
+ * OrgType represents whether the org is self-serve or enterprise
329
+ */
330
+ type OrgType = string;
331
+ declare const OrgTypeSelfServe: OrgType;
332
+ declare const OrgTypeEnterprise: OrgType;
333
+ declare const OrgTypes: {
334
+ readonly "self-serve": {
335
+ readonly value: "self-serve";
336
+ readonly label: "Self-Serve";
337
+ };
338
+ readonly enterprise: {
339
+ readonly value: "enterprise";
340
+ readonly label: "Enterprise";
341
+ };
342
+ };
343
+ type OrgTypeTS = keyof typeof OrgTypes;
344
+ type OrgTypeOptionTS = typeof OrgTypes[OrgTypeTS];
345
+ /**
346
+ * OrgSize represents the size of the organization
347
+ */
348
+ type OrgSize = string;
349
+ declare const OrgSizeSolo: OrgSize;
350
+ declare const OrgSizeSmall: OrgSize;
351
+ declare const OrgSizeMedium: OrgSize;
352
+ declare const OrgSizeLarge: OrgSize;
353
+ declare const OrgSizeEnterprise: OrgSize;
354
+ declare const OrgSizes: {
355
+ readonly solo: {
356
+ readonly value: "solo";
357
+ readonly label: "Just me";
358
+ };
359
+ readonly small: {
360
+ readonly value: "small";
361
+ readonly label: "2-10";
362
+ };
363
+ readonly medium: {
364
+ readonly value: "medium";
365
+ readonly label: "11-50";
366
+ };
367
+ readonly large: {
368
+ readonly value: "large";
369
+ readonly label: "51-200";
370
+ };
371
+ readonly enterprise: {
372
+ readonly value: "enterprise";
373
+ readonly label: "200+";
374
+ };
375
+ };
376
+ type OrgSizeTS = keyof typeof OrgSizes;
377
+ type OrgSizeOptionTS = typeof OrgSizes[OrgSizeTS];
378
+ /**
379
+ * OnboardingStatus represents the status of an onboarding flow
380
+ */
381
+ type OnboardingStatus = string;
382
+ declare const OnboardingStatusPending: OnboardingStatus;
383
+ declare const OnboardingStatusInProgress: OnboardingStatus;
384
+ declare const OnboardingStatusCompleted: OnboardingStatus;
385
+ declare const OnboardingStatusSkipped: OnboardingStatus;
386
+ declare const OnboardingStatusLegacy: OnboardingStatus;
387
+ declare const OnboardingStatuses: {
388
+ readonly pending: {
389
+ readonly value: "pending";
390
+ readonly label: "Pending";
391
+ };
392
+ readonly in_progress: {
393
+ readonly value: "in_progress";
394
+ readonly label: "In Progress";
395
+ };
396
+ readonly completed: {
397
+ readonly value: "completed";
398
+ readonly label: "Completed";
399
+ };
400
+ readonly skipped: {
401
+ readonly value: "skipped";
402
+ readonly label: "Skipped";
403
+ };
404
+ readonly legacy: {
405
+ readonly value: "legacy";
406
+ readonly label: "Legacy";
407
+ };
408
+ };
409
+ type OnboardingStatusTS = keyof typeof OnboardingStatuses;
410
+ type OnboardingStatusOptionTS = typeof OnboardingStatuses[OnboardingStatusTS];
411
+ /**
412
+ * ProvisioningStatus represents the status of resource provisioning
413
+ */
414
+ type ProvisioningStatus = string;
415
+ declare const ProvisioningStatusPending: ProvisioningStatus;
416
+ declare const ProvisioningStatusRunning: ProvisioningStatus;
417
+ declare const ProvisioningStatusCompleted: ProvisioningStatus;
418
+ declare const ProvisioningStatusFailed: ProvisioningStatus;
419
+ declare const ProvisioningStatuses: {
420
+ readonly pending: {
421
+ readonly value: "pending";
422
+ readonly label: "Pending";
423
+ };
424
+ readonly running: {
425
+ readonly value: "running";
426
+ readonly label: "Running";
427
+ };
428
+ readonly completed: {
429
+ readonly value: "completed";
430
+ readonly label: "Completed";
431
+ };
432
+ readonly failed: {
433
+ readonly value: "failed";
434
+ readonly label: "Failed";
435
+ };
436
+ };
437
+ type ProvisioningStatusTS = keyof typeof ProvisioningStatuses;
438
+ type ProvisioningStatusOptionTS = typeof ProvisioningStatuses[ProvisioningStatusTS];
439
+ /**
440
+ * OrgOnboarding tracks the onboarding progress for an organization
441
+ */
442
+ interface OrgOnboarding {
443
+ status: OnboardingStatus;
444
+ currentStep: number;
445
+ completedAt?: number;
446
+ skippedSteps?: number[];
447
+ }
448
+ /**
449
+ * OrgProvisioning tracks the provisioning status of default resources
450
+ */
451
+ interface OrgProvisioning {
452
+ status: ProvisioningStatus;
453
+ defaultAgentId?: string;
454
+ defaultKnowledgeGraphId?: string;
455
+ completedAt?: number;
456
+ error?: string;
457
+ }
458
+ interface OrgSubscription {
459
+ id: string;
460
+ plan: string;
461
+ platform: SubscriptionPlatform;
462
+ status: OrgSubscriptionStatus;
463
+ trialEndsAt?: number;
464
+ currentPeriodEnd?: number;
465
+ seats?: number;
466
+ stripeCustomerId?: string;
467
+ stripeSubscriptionId?: string;
468
+ }
469
+ type OrgSubscriptionStatus = string;
470
+ declare const OrgSubscriptionStatusTrialing: OrgSubscriptionStatus;
471
+ declare const OrgSubscriptionStatusActive: OrgSubscriptionStatus;
472
+ declare const OrgSubscriptionStatusPastDue: OrgSubscriptionStatus;
473
+ declare const OrgSubscriptionStatusCancelled: OrgSubscriptionStatus;
474
+ declare const OrgSubscriptionStatusUnpaid: OrgSubscriptionStatus;
475
+ declare const OrgSubscriptionStatuses: {
476
+ readonly trialing: {
477
+ readonly value: "trialing";
478
+ readonly label: "Trialing";
479
+ };
480
+ readonly active: {
481
+ readonly value: "active";
482
+ readonly label: "Active";
483
+ };
484
+ readonly past_due: {
485
+ readonly value: "past_due";
486
+ readonly label: "Past Due";
487
+ };
488
+ readonly cancelled: {
489
+ readonly value: "cancelled";
490
+ readonly label: "Cancelled";
491
+ };
492
+ readonly unpaid: {
493
+ readonly value: "unpaid";
494
+ readonly label: "Unpaid";
495
+ };
496
+ };
497
+ type OrgSubscriptionStatusTS = keyof typeof OrgSubscriptionStatuses;
498
+ type OrgSubscriptionStatusOptionTS = typeof OrgSubscriptionStatuses[OrgSubscriptionStatusTS];
499
+ interface OrgInfoResponse {
500
+ orgInfo: OrgInfo;
501
+ metadata: ResponseMetadata;
502
+ }
503
+ interface OrgRoleResponse {
504
+ role: OrgRole;
505
+ metadata: ResponseMetadata;
506
+ }
507
+ interface ListOrgsResponse {
508
+ orgs: Org[];
509
+ metadata: ResponseMetadata;
510
+ }
511
+ interface ListOrgRolesResponse {
512
+ roles: OrgRole[];
513
+ metadata: ResponseMetadata;
514
+ }
515
+ interface OrgInfo {
516
+ id?: string;
517
+ title: string;
518
+ logoUrl: string;
519
+ mainDomain?: string;
520
+ apps: SystemAppTS[];
521
+ }
522
+ interface AzureSettings {
523
+ appClientId?: string;
524
+ appClientSecret?: string;
525
+ azureTenantId?: string;
526
+ }
527
+ interface OrgTemplate {
528
+ id: string;
529
+ slug: string;
530
+ title: string;
531
+ }
532
+ interface UserOrgAccess {
533
+ orgId?: string;
534
+ orgTitle?: string;
535
+ roles: string[];
536
+ isSingleAccount: boolean;
537
+ entityRecordFilter?: {
538
+ entityName: string;
539
+ recordId: string;
540
+ displayValue?: string;
541
+ };
542
+ }
543
+ /**
544
+ * UserSettings represents user preferences (elastic JSON structure)
545
+ */
546
+ interface UserSettings {
547
+ theme?: string;
548
+ language?: string;
549
+ timezone?: string;
550
+ occupation?: string;
551
+ company?: string;
552
+ }
553
+ declare const ThemeOptions: {
554
+ readonly system: {
555
+ readonly value: "system";
556
+ readonly label: "System";
557
+ };
558
+ readonly light: {
559
+ readonly value: "light";
560
+ readonly label: "Light";
561
+ };
562
+ readonly dark: {
563
+ readonly value: "dark";
564
+ readonly label: "Dark";
565
+ };
566
+ };
567
+ type ThemeOptionTS = keyof typeof ThemeOptions;
568
+ /**
569
+ * NotificationPreferences represents user notification settings
570
+ */
571
+ interface NotificationPreferences {
572
+ pushEnabled: boolean;
573
+ newChatAssignment: boolean;
574
+ newMessages: boolean;
575
+ escalations: boolean;
576
+ urgentOnly: boolean;
577
+ soundEnabled: boolean;
578
+ doNotDisturb: boolean;
579
+ dndStart?: string;
580
+ dndEnd?: string;
581
+ }
582
+ /**
583
+ * UserSource represents how a user was created
584
+ */
585
+ type UserSource = string;
586
+ declare const UserSourceSignup: UserSource;
587
+ declare const UserSourceInvite: UserSource;
588
+ declare const UserSourceSSO: UserSource;
589
+ declare const UserSourceAPI: UserSource;
590
+ declare const UserSources: {
591
+ readonly signup: {
592
+ readonly value: "signup";
593
+ readonly label: "Signup";
594
+ };
595
+ readonly invite: {
596
+ readonly value: "invite";
597
+ readonly label: "Invite";
598
+ };
599
+ readonly sso: {
600
+ readonly value: "sso";
601
+ readonly label: "SSO";
602
+ };
603
+ readonly api: {
604
+ readonly value: "api";
605
+ readonly label: "API";
606
+ };
607
+ };
608
+ type UserSourceTS = keyof typeof UserSources;
609
+ type UserSourceOptionTS = typeof UserSources[UserSourceTS];
610
+ /**
611
+ * InviteStatus represents the status of an invitation
612
+ */
613
+ type InviteStatus = string;
614
+ declare const InviteStatusPending: InviteStatus;
615
+ declare const InviteStatusAccepted: InviteStatus;
616
+ declare const InviteStatusExpired: InviteStatus;
617
+ declare const InviteStatusRevoked: InviteStatus;
618
+ declare const InviteStatuses: {
619
+ readonly pending: {
620
+ readonly value: "pending";
621
+ readonly label: "Pending";
622
+ };
623
+ readonly accepted: {
624
+ readonly value: "accepted";
625
+ readonly label: "Accepted";
626
+ };
627
+ readonly expired: {
628
+ readonly value: "expired";
629
+ readonly label: "Expired";
630
+ };
631
+ readonly revoked: {
632
+ readonly value: "revoked";
633
+ readonly label: "Revoked";
634
+ };
635
+ };
636
+ type InviteStatusTS = keyof typeof InviteStatuses;
637
+ type InviteStatusOptionTS = typeof InviteStatuses[InviteStatusTS];
638
+ /**
639
+ * Invite represents a team/org invitation
640
+ */
641
+ interface Invite {
642
+ id?: string;
643
+ orgId: string;
644
+ email: string;
645
+ role: string;
646
+ invitedBy: string;
647
+ status: InviteStatusTS;
648
+ acceptedBy?: string;
649
+ acceptedAt?: number;
650
+ expiresAt?: number;
651
+ createdAt?: number;
652
+ updatedAt?: number;
653
+ }
654
+ interface InviteResponse {
655
+ invite: Invite;
656
+ metadata: ResponseMetadata;
657
+ }
658
+ interface ListInvitesResponse {
659
+ invites: Invite[];
660
+ metadata: ResponseMetadata;
661
+ }
662
+ /**
663
+ * UserOnboarding tracks the onboarding progress for a user
664
+ */
665
+ interface UserOnboarding {
666
+ status: OnboardingStatus;
667
+ completedAt?: number;
668
+ }
669
+ /**
670
+ * User represents a user in the system
671
+ */
672
+ interface User {
673
+ id?: string;
674
+ email: string;
675
+ firstName: string;
676
+ lastName: string;
677
+ authProviderName: string;
678
+ orgAccess?: UserOrgAccess[];
679
+ /**
680
+ * Status & Control
681
+ */
682
+ enabled?: boolean;
683
+ /**
684
+ * Source tracking
685
+ */
686
+ source?: UserSourceTS;
687
+ invitedBy?: string;
688
+ inviteStatus?: InviteStatusTS;
689
+ /**
690
+ * Team membership - LEGACY, DO NOT USE
691
+ * These fields are deprecated and will be removed.
692
+ * Use Org and OrgAccess patterns instead.
693
+ */
694
+ isTeamAdmin?: boolean;
695
+ teamId?: string;
696
+ teamName?: string;
697
+ /**
698
+ * System admin flag
699
+ */
700
+ isSysAdmin?: boolean;
701
+ /**
702
+ * Preferences
703
+ */
704
+ settings?: UserSettings;
705
+ notificationPreferences?: NotificationPreferences;
706
+ /**
707
+ * Onboarding tracking
708
+ */
709
+ onboarding?: UserOnboarding;
710
+ /**
711
+ * Flexible metadata
712
+ */
713
+ metadata?: {
714
+ [key: string]: any;
715
+ };
716
+ /**
717
+ * Audit fields
718
+ */
719
+ createdAt?: number;
720
+ updatedAt?: number;
721
+ createdBy?: string;
722
+ updatedBy?: string;
723
+ }
724
+ interface UserResponse {
725
+ user: User;
726
+ metadata: ResponseMetadata;
727
+ }
728
+ interface ListUsersResponse {
729
+ users: User[];
730
+ metadata: ResponseMetadata;
731
+ }
732
+ interface Team {
733
+ id?: string;
734
+ name: string;
735
+ isSubscribed: boolean;
736
+ subscribedAt?: number;
737
+ plan: string;
738
+ ownerName?: string;
739
+ ownerEmail?: string;
740
+ subscriptionPlatform?: SubscriptionPlatform;
741
+ subscriptionId?: string;
742
+ onboardingDone?: boolean;
743
+ onboardingData?: string;
744
+ }
745
+ type SubscriptionPlatform = string;
746
+ declare const SubscriptionPlatformStripe: SubscriptionPlatform;
747
+ declare const SubscriptionPlatformCustom: SubscriptionPlatform;
748
+ interface OrgRole {
749
+ id?: string;
750
+ orgId?: string;
751
+ title: string;
752
+ permissions: Permission[];
753
+ isSystem: boolean;
754
+ createdAt?: number;
755
+ updatedAt?: number;
756
+ createdBy?: string;
757
+ updatedBy?: string;
758
+ }
759
+ /**
760
+ * org db - copied from sys db
761
+ */
762
+ interface Permission {
763
+ /**
764
+ * ID *primitive.ObjectID `bson:"_id,omitempty" json:"id"`
765
+ */
766
+ name: string;
767
+ title: string;
768
+ isSystem: boolean;
769
+ }
770
+ type SystemApp = string;
771
+ declare const SystemAppAdmin: SystemApp;
772
+ declare const SystemAppCRM: SystemApp;
773
+ declare const SystemAppHelpdesk: SystemApp;
774
+ declare const SystemAppMarketing: SystemApp;
775
+ declare const SystemAppWorkflow: SystemApp;
776
+ declare const SystemAppAnalytics: SystemApp;
777
+ declare const SystemAppKnowledgeGraph: SystemApp;
778
+ declare const SystemAppDocumentProcessor: SystemApp;
779
+ declare const SystemApps: {
780
+ readonly admin: {
781
+ readonly value: "admin";
782
+ readonly label: "Admin";
783
+ };
784
+ readonly crm: {
785
+ readonly value: "crm";
786
+ readonly label: "CRM";
787
+ };
788
+ readonly helpdesk: {
789
+ readonly value: "helpdesk";
790
+ readonly label: "Helpdesk";
791
+ };
792
+ readonly marketing: {
793
+ readonly value: "marketing";
794
+ readonly label: "Marketing";
795
+ };
796
+ readonly workflow: {
797
+ readonly value: "workflow";
798
+ readonly label: "Workflow";
799
+ };
800
+ readonly analytics: {
801
+ readonly value: "analytics";
802
+ readonly label: "Analytics";
803
+ };
804
+ readonly "knowledge-graph": {
805
+ readonly value: "knowledge-graph";
806
+ readonly label: "Knowledge Graph";
807
+ };
808
+ readonly "document-processor": {
809
+ readonly value: "document-processor";
810
+ readonly label: "Document Processor";
811
+ };
812
+ };
813
+ type SystemAppTS = keyof typeof SystemApps;
814
+ type SystemAppOptionTS = typeof SystemApps[SystemAppTS];
815
+ /**
816
+ * UpdateUserSettingsRequest is the request payload for updating user settings
817
+ */
818
+ interface UpdateUserSettingsRequest {
819
+ id: string;
820
+ settings?: UserSettings;
821
+ notificationPreferences?: NotificationPreferences;
822
+ }
823
+ /**
824
+ * UserSettingsResponse is the response for settings operations
825
+ */
826
+ interface UserSettingsResponse {
827
+ settings?: UserSettings;
828
+ notificationPreferences?: NotificationPreferences;
829
+ metadata: ResponseMetadata;
830
+ }
831
+ /**
832
+ * OnboardingStep represents a step in the onboarding flow
833
+ */
834
+ interface OnboardingStep {
835
+ step: number;
836
+ name: string;
837
+ status: string;
838
+ required: boolean;
839
+ }
840
+ /**
841
+ * OnboardingState represents the current state of a user's onboarding
842
+ */
843
+ interface OnboardingState {
844
+ status: string;
845
+ currentStep: number;
846
+ steps: OnboardingStep[];
847
+ user?: User;
848
+ org?: Org;
849
+ }
850
+ /**
851
+ * OnboardingStateResponse is the response for onboarding status
852
+ */
853
+ interface OnboardingStateResponse {
854
+ state: OnboardingState;
855
+ metadata: ResponseMetadata;
856
+ }
857
+ /**
858
+ * OrgInput contains the input for creating an organization
859
+ */
860
+ interface OrgInput {
861
+ name: string;
862
+ industry?: string;
863
+ size: string;
864
+ stripeSessionId?: string;
865
+ }
866
+ /**
867
+ * OrgResult contains the result of organization creation
868
+ */
869
+ interface OrgResult {
870
+ org?: Org;
871
+ nextStep: string;
872
+ metadata: ResponseMetadata;
873
+ }
874
+ /** @deprecated Use OrgInput instead */
875
+ type WorkspaceInput = OrgInput;
876
+ /** @deprecated Use OrgResult instead */
877
+ type WorkspaceResult = OrgResult;
878
+ /**
879
+ * InviteInput contains the input for sending invites
880
+ */
881
+ interface InviteInput {
882
+ email: string;
883
+ role: string;
884
+ }
885
+ /**
886
+ * InvitesResult contains the result of sending invites
887
+ */
888
+ interface InvitesResult {
889
+ sent: InviteSentStatus[];
890
+ failed: string[];
891
+ nextStep: string;
892
+ metadata: ResponseMetadata;
893
+ }
894
+ /**
895
+ * InviteSentStatus represents status of a sent invite
896
+ */
897
+ interface InviteSentStatus {
898
+ email: string;
899
+ status: string;
900
+ }
901
+ /**
902
+ * KnowledgeInput contains the input for creating knowledge graph
903
+ */
904
+ interface KnowledgeInput {
905
+ name?: string;
906
+ skipUpload: boolean;
907
+ }
908
+ /**
909
+ * KnowledgeGraphInfo contains info about a knowledge graph
910
+ */
911
+ interface KnowledgeGraphInfo {
912
+ id: string;
913
+ name: string;
914
+ status: string;
915
+ documentCount: number;
916
+ }
917
+ /**
918
+ * KnowledgeResult contains the result of knowledge graph creation
919
+ */
920
+ interface KnowledgeResult {
921
+ knowledgeGraph: KnowledgeGraphInfo;
922
+ nextStep: string;
923
+ metadata: ResponseMetadata;
924
+ }
925
+ /**
926
+ * AgentInput contains the input for creating an agent
927
+ */
928
+ interface AgentInput {
929
+ name: string;
930
+ goal: string;
931
+ personality: string;
932
+ skills?: string[];
933
+ }
934
+ /**
935
+ * AgentInfo contains info about an agent
936
+ */
937
+ interface AgentInfo {
938
+ id: string;
939
+ name: string;
940
+ goal: string;
941
+ personality: string;
942
+ status: string;
943
+ knowledgeGraphId?: string;
944
+ }
945
+ /**
946
+ * AgentResult contains the result of agent creation
947
+ */
948
+ interface AgentResult {
949
+ agent: AgentInfo;
950
+ nextStep: string;
951
+ metadata: ResponseMetadata;
952
+ }
953
+ /**
954
+ * OnboardingCompleteResult contains the result of completing onboarding
955
+ */
956
+ interface OnboardingCompleteResult {
957
+ status: string;
958
+ completedAt: number;
959
+ org?: Org;
960
+ redirectUrl: string;
961
+ metadata: ResponseMetadata;
962
+ }
963
+ /**
964
+ * PaymentSessionInput contains input for creating a payment session
965
+ */
966
+ interface PaymentSessionInput {
967
+ plan: string;
968
+ billingCycle: string;
969
+ seats: number;
970
+ successUrl: string;
971
+ cancelUrl: string;
972
+ }
973
+ /**
974
+ * PaymentSessionResult contains the result of creating a payment session
975
+ */
976
+ interface PaymentSessionResult {
977
+ url: string;
978
+ sessionId: string;
979
+ customerId: string;
980
+ metadata: ResponseMetadata;
981
+ }
982
+ /**
983
+ * OrgResponse is the response for organization operations
984
+ */
985
+ interface OrgResponse {
986
+ org: Org;
987
+ metadata: ResponseMetadata;
988
+ }
989
+
990
+ interface KGNode {
991
+ id: string;
992
+ label: string;
993
+ fields: {
994
+ [key: string]: any;
995
+ };
996
+ relationships?: KGEdge[];
997
+ score?: number;
998
+ }
999
+ interface KGEdge {
1000
+ id: string;
1001
+ label: string;
1002
+ fields: {
1003
+ [key: string]: any;
1004
+ };
1005
+ from: string;
1006
+ to: string;
1007
+ }
1008
+
1009
+ interface DocumentMetadata {
1010
+ doc_id: string;
1011
+ title: string;
1012
+ doc_url: string;
1013
+ total_chunks: number;
1014
+ page_count: number;
1015
+ from_page: number;
1016
+ to_page: number;
1017
+ status: string;
1018
+ model: string;
1019
+ owner_email: string;
1020
+ visibility_level: string;
1021
+ created_at: string;
1022
+ updated_at: string;
1023
+ }
1024
+ interface DocumentAnalysisResult {
1025
+ docId: string;
1026
+ success: boolean;
1027
+ message: string;
1028
+ metadata: DocumentMetadata;
1029
+ totalChunks: number;
1030
+ successCount: number;
1031
+ errorCount: number;
1032
+ status: string;
1033
+ }
1034
+
1035
+ export { type APIError, type APIResponse, type Address, type AgentInfo, type AgentInput, type AgentResult, type AggregateType, AggregateTypeAverage, AggregateTypeCount, AggregateTypeDistinct, AggregateTypeMax, AggregateTypeMin, AggregateTypeSum, type AzureSettings, type ChartSettings, type ChartType, ChartTypeBar, ChartTypeDoughnut, ChartTypeLine, ChartTypeMetic, ChartTypePie, type DataType, DataTypeArray, DataTypeBoolean, DataTypeDate, DataTypeFile, DataTypeFloat, DataTypeInputFields, DataTypeInt, DataTypeJSON, DataTypeObjectList, DataTypeString, type DateValue, type DocumentAnalysisResult, type DocumentMetadata, type Invite, type InviteInput, type InviteResponse, type InviteSentStatus, type InviteStatus, InviteStatusAccepted, InviteStatusExpired, type InviteStatusOptionTS, InviteStatusPending, InviteStatusRevoked, type InviteStatusTS, InviteStatuses, type InvitesResult, type JSONSchema, type KGEdge, type KGNode, type KnowledgeGraphInfo, type KnowledgeInput, type KnowledgeResult, type ListInvitesResponse, type ListOrgRolesResponse, type ListOrgsResponse, type ListUsersResponse, type MetricResult, type NotificationPreferences, type OnboardingCompleteResult, type OnboardingState, type OnboardingStateResponse, type OnboardingStatus, OnboardingStatusCompleted, OnboardingStatusInProgress, OnboardingStatusLegacy, type OnboardingStatusOptionTS, OnboardingStatusPending, OnboardingStatusSkipped, type OnboardingStatusTS, OnboardingStatuses, type OnboardingStep, type Org, type OrgInfo, type OrgInfoResponse, type OrgInput, type OrgOnboarding, type OrgProvisioning, type OrgResponse, type OrgResult, type OrgRole, type OrgRoleResponse, type OrgSize, OrgSizeEnterprise, OrgSizeLarge, OrgSizeMedium, type OrgSizeOptionTS, OrgSizeSmall, OrgSizeSolo, type OrgSizeTS, OrgSizes, type OrgStatus, OrgStatusActive, type OrgStatusOptionTS, OrgStatusSuspended, type OrgStatusTS, OrgStatuses, type OrgSubscription, type OrgSubscriptionStatus, OrgSubscriptionStatusActive, OrgSubscriptionStatusCancelled, type OrgSubscriptionStatusOptionTS, OrgSubscriptionStatusPastDue, type OrgSubscriptionStatusTS, OrgSubscriptionStatusTrialing, OrgSubscriptionStatusUnpaid, OrgSubscriptionStatuses, type OrgTemplate, type OrgType, OrgTypeEnterprise, type OrgTypeOptionTS, OrgTypeSelfServe, type OrgTypeTS, OrgTypes, type PaymentSessionInput, type PaymentSessionResult, type Permission, type ProductName, ProductNameDocBrain, ProductNameDoneProjects, ProductNameFinance, ProductNameHub, ProductNameLegal, type ProductNameOptionTS, ProductNamePublicSector, ProductNameQuickMind, ProductNameRealEstate, ProductNameShopAssist, type ProductNameTS, ProductNames, type ProvisioningStatus, ProvisioningStatusCompleted, ProvisioningStatusFailed, type ProvisioningStatusOptionTS, ProvisioningStatusPending, ProvisioningStatusRunning, type ProvisioningStatusTS, ProvisioningStatuses, type ResponseMetadata, type ServiceEvent, type ServiceEventMetadata, type SubscriptionPlatform, SubscriptionPlatformCustom, SubscriptionPlatformStripe, type SystemApp, SystemAppAdmin, SystemAppAnalytics, SystemAppCRM, SystemAppDocumentProcessor, SystemAppHelpdesk, SystemAppKnowledgeGraph, SystemAppMarketing, type SystemAppOptionTS, type SystemAppTS, SystemAppWorkflow, SystemApps, type Team, type ThemeOptionTS, ThemeOptions, type UpdateUserSettingsRequest, type UpdateUserStatusRequest, type UpdateUserStatusResponse, UpdateUserStatusSubject, type User, type UserOnboarding, type UserOrgAccess, type UserResponse, type UserSettings, type UserSettingsResponse, type UserSource, UserSourceAPI, UserSourceInvite, type UserSourceOptionTS, UserSourceSSO, UserSourceSignup, type UserSourceTS, UserSources, type UserStatusTS, type Variable, type VariableReference, type VariableScope, VariableScopeEdge, VariableScopeGlobal, VariableScopeNode, type VariableValidation, type Widget, type WidgetType, WidgetTypeAccounts, WidgetTypeActivities, WidgetTypeCalendar, WidgetTypeChart, WidgetTypeContacts, WidgetTypeEmail, WidgetTypeFiles, WidgetTypeLeads, WidgetTypeNotes, WidgetTypeOpportunities, WidgetTypeOrders, WidgetTypeTasks, type WorkspaceInput, type WorkspaceResult };