@elqnt/admin 2.2.1 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,816 @@
1
+ import { ResponseMetadata } from '@elqnt/types';
2
+
3
+ interface Address {
4
+ line1: string;
5
+ line2: string;
6
+ city: string;
7
+ state: string;
8
+ country: string;
9
+ zip: string;
10
+ }
11
+ /**
12
+ * Org is one organization. With per-product DB + row-level tenancy,
13
+ * the DB the org lives in (admin_eloquent / admin_pumba / …) implies
14
+ * the product — there is no longer a product column on the row. With
15
+ * the system_*\/org_* artifact split, there's also no per-org artifact
16
+ * provisioning state to track. See docs/_db_v2/03_system_org_split.md.
17
+ */
18
+ interface Org {
19
+ id?: string;
20
+ title: string;
21
+ description?: string;
22
+ logoUrl: string;
23
+ mainDomain: string;
24
+ address: Address;
25
+ /**
26
+ * Localization & runtime preferences
27
+ */
28
+ defaultLang?: string;
29
+ timezone?: string;
30
+ settings?: {
31
+ [key: string]: any;
32
+ };
33
+ /**
34
+ * Status & Control
35
+ */
36
+ status: OrgStatusTS;
37
+ enabled: boolean;
38
+ /**
39
+ * Classification
40
+ */
41
+ type: OrgTypeTS;
42
+ size?: OrgSizeTS;
43
+ industry?: string;
44
+ /**
45
+ * Country is the org's jurisdiction code (e.g. "UAE", "KSA", "QA"). It
46
+ * scopes which system compliance libraries the org sees in the library
47
+ * section. Empty = unset (all system libraries visible). Validated against
48
+ * SupportedCountries; see common/admin/countries.go and
49
+ * docs/_db_v2/08_country_scoped_libraries.md.
50
+ */
51
+ country?: string;
52
+ tags?: string[];
53
+ /**
54
+ * Subscription (Stripe)
55
+ */
56
+ subscription?: OrgSubscription;
57
+ userCount: number;
58
+ /**
59
+ * Onboarding wizard state (per-user UX flow, not artifact provisioning)
60
+ */
61
+ onboarding?: OrgOnboarding;
62
+ /**
63
+ * Template & Roles
64
+ */
65
+ template?: OrgTemplate;
66
+ roles: string[];
67
+ /**
68
+ * Flexible metadata
69
+ */
70
+ metadata?: {
71
+ [key: string]: any;
72
+ };
73
+ /**
74
+ * Audit fields
75
+ */
76
+ createdAt?: number;
77
+ updatedAt?: number;
78
+ createdBy?: string;
79
+ updatedBy?: string;
80
+ }
81
+ type OrgStatus = string;
82
+ declare const OrgStatusActive: OrgStatus;
83
+ declare const OrgStatusSuspended: OrgStatus;
84
+ declare const OrgStatuses: {
85
+ readonly active: {
86
+ readonly value: "active";
87
+ readonly label: "Active";
88
+ };
89
+ readonly suspended: {
90
+ readonly value: "suspended";
91
+ readonly label: "Suspended";
92
+ };
93
+ };
94
+ type OrgStatusTS = keyof typeof OrgStatuses;
95
+ type OrgStatusOptionTS = typeof OrgStatuses[OrgStatusTS];
96
+ /**
97
+ * OrgType represents whether the org is self-serve or enterprise
98
+ */
99
+ type OrgType = string;
100
+ declare const OrgTypeSelfServe: OrgType;
101
+ declare const OrgTypeEnterprise: OrgType;
102
+ declare const OrgTypes: {
103
+ readonly "self-serve": {
104
+ readonly value: "self-serve";
105
+ readonly label: "Self-Serve";
106
+ };
107
+ readonly enterprise: {
108
+ readonly value: "enterprise";
109
+ readonly label: "Enterprise";
110
+ };
111
+ };
112
+ type OrgTypeTS = keyof typeof OrgTypes;
113
+ type OrgTypeOptionTS = typeof OrgTypes[OrgTypeTS];
114
+ /**
115
+ * OrgSize represents the size of the organization
116
+ */
117
+ type OrgSize = string;
118
+ declare const OrgSizeSolo: OrgSize;
119
+ declare const OrgSizeSmall: OrgSize;
120
+ declare const OrgSizeMedium: OrgSize;
121
+ declare const OrgSizeLarge: OrgSize;
122
+ declare const OrgSizeEnterprise: OrgSize;
123
+ declare const OrgSizes: {
124
+ readonly solo: {
125
+ readonly value: "solo";
126
+ readonly label: "Just me";
127
+ };
128
+ readonly small: {
129
+ readonly value: "small";
130
+ readonly label: "2-10";
131
+ };
132
+ readonly medium: {
133
+ readonly value: "medium";
134
+ readonly label: "11-50";
135
+ };
136
+ readonly large: {
137
+ readonly value: "large";
138
+ readonly label: "51-200";
139
+ };
140
+ readonly enterprise: {
141
+ readonly value: "enterprise";
142
+ readonly label: "200+";
143
+ };
144
+ };
145
+ type OrgSizeTS = keyof typeof OrgSizes;
146
+ type OrgSizeOptionTS = typeof OrgSizes[OrgSizeTS];
147
+ /**
148
+ * OnboardingStatus represents the status of an onboarding flow
149
+ */
150
+ type OnboardingStatus = string;
151
+ declare const OnboardingStatusPending: OnboardingStatus;
152
+ declare const OnboardingStatusInProgress: OnboardingStatus;
153
+ declare const OnboardingStatusCompleted: OnboardingStatus;
154
+ declare const OnboardingStatusSkipped: OnboardingStatus;
155
+ declare const OnboardingStatusLegacy: OnboardingStatus;
156
+ declare const OnboardingStatuses: {
157
+ readonly pending: {
158
+ readonly value: "pending";
159
+ readonly label: "Pending";
160
+ };
161
+ readonly in_progress: {
162
+ readonly value: "in_progress";
163
+ readonly label: "In Progress";
164
+ };
165
+ readonly completed: {
166
+ readonly value: "completed";
167
+ readonly label: "Completed";
168
+ };
169
+ readonly skipped: {
170
+ readonly value: "skipped";
171
+ readonly label: "Skipped";
172
+ };
173
+ readonly legacy: {
174
+ readonly value: "legacy";
175
+ readonly label: "Legacy";
176
+ };
177
+ };
178
+ type OnboardingStatusTS = keyof typeof OnboardingStatuses;
179
+ type OnboardingStatusOptionTS = typeof OnboardingStatuses[OnboardingStatusTS];
180
+ /**
181
+ * OrgOnboarding tracks the onboarding progress for an organization
182
+ */
183
+ interface OrgOnboarding {
184
+ status: OnboardingStatus;
185
+ currentStep: number;
186
+ completedAt?: number;
187
+ skippedSteps?: number[];
188
+ }
189
+ interface OrgSubscription {
190
+ plan: string;
191
+ platform: SubscriptionPlatform;
192
+ status: OrgSubscriptionStatus;
193
+ trialEndsAt?: number;
194
+ currentPeriodEnd?: number;
195
+ seats?: number;
196
+ stripeCustomerId?: string;
197
+ stripeSubscriptionId?: string;
198
+ cancelledAt?: number;
199
+ cancelReason?: string;
200
+ gracePeriodEndsAt?: number;
201
+ }
202
+ type OrgSubscriptionStatus = string;
203
+ declare const OrgSubscriptionStatusTrialing: OrgSubscriptionStatus;
204
+ declare const OrgSubscriptionStatusActive: OrgSubscriptionStatus;
205
+ declare const OrgSubscriptionStatusPastDue: OrgSubscriptionStatus;
206
+ declare const OrgSubscriptionStatusCancelled: OrgSubscriptionStatus;
207
+ declare const OrgSubscriptionStatusUnpaid: OrgSubscriptionStatus;
208
+ declare const OrgSubscriptionStatuses: {
209
+ readonly trialing: {
210
+ readonly value: "trialing";
211
+ readonly label: "Trialing";
212
+ };
213
+ readonly active: {
214
+ readonly value: "active";
215
+ readonly label: "Active";
216
+ };
217
+ readonly past_due: {
218
+ readonly value: "past_due";
219
+ readonly label: "Past Due";
220
+ };
221
+ readonly cancelled: {
222
+ readonly value: "cancelled";
223
+ readonly label: "Cancelled";
224
+ };
225
+ readonly unpaid: {
226
+ readonly value: "unpaid";
227
+ readonly label: "Unpaid";
228
+ };
229
+ };
230
+ type OrgSubscriptionStatusTS = keyof typeof OrgSubscriptionStatuses;
231
+ type OrgSubscriptionStatusOptionTS = typeof OrgSubscriptionStatuses[OrgSubscriptionStatusTS];
232
+ interface OrgResponse {
233
+ org: Org;
234
+ metadata: ResponseMetadata;
235
+ }
236
+ interface OrgInfoResponse {
237
+ orgInfo: OrgInfo;
238
+ metadata: ResponseMetadata;
239
+ }
240
+ interface OrgRoleResponse {
241
+ role: OrgRole;
242
+ metadata: ResponseMetadata;
243
+ }
244
+ interface ListOrgsResponse {
245
+ orgs: Org[];
246
+ metadata: ResponseMetadata;
247
+ }
248
+ interface ListOrgRolesResponse {
249
+ roles: OrgRole[];
250
+ metadata: ResponseMetadata;
251
+ }
252
+ interface OrgInfo {
253
+ id?: string;
254
+ title: string;
255
+ logoUrl: string;
256
+ mainDomain?: string;
257
+ }
258
+ interface AzureSettings {
259
+ appClientId?: string;
260
+ appClientSecret?: string;
261
+ azureTenantId?: string;
262
+ }
263
+ interface OrgTemplate {
264
+ id: string;
265
+ slug: string;
266
+ title: string;
267
+ }
268
+ interface UserOrgAccess {
269
+ orgId?: string;
270
+ orgTitle?: string;
271
+ roles: string[];
272
+ isSingleAccount: boolean;
273
+ entityRecordFilter?: {
274
+ entityName: string;
275
+ recordId: string;
276
+ displayValue?: string;
277
+ };
278
+ }
279
+ /**
280
+ * UserSettings represents user preferences (elastic JSON structure)
281
+ */
282
+ interface UserSettings {
283
+ theme?: string;
284
+ language?: string;
285
+ timezone?: string;
286
+ occupation?: string;
287
+ company?: string;
288
+ }
289
+ declare const ThemeOptions: {
290
+ readonly system: {
291
+ readonly value: "system";
292
+ readonly label: "System";
293
+ };
294
+ readonly light: {
295
+ readonly value: "light";
296
+ readonly label: "Light";
297
+ };
298
+ readonly dark: {
299
+ readonly value: "dark";
300
+ readonly label: "Dark";
301
+ };
302
+ };
303
+ type ThemeOptionTS = keyof typeof ThemeOptions;
304
+ /**
305
+ * NotificationPreferences represents user notification settings
306
+ */
307
+ interface NotificationPreferences {
308
+ pushEnabled: boolean;
309
+ newChatAssignment: boolean;
310
+ newMessages: boolean;
311
+ escalations: boolean;
312
+ urgentOnly: boolean;
313
+ soundEnabled: boolean;
314
+ doNotDisturb: boolean;
315
+ dndStart?: string;
316
+ dndEnd?: string;
317
+ }
318
+ /**
319
+ * UserSource represents how a user was created
320
+ */
321
+ type UserSource = string;
322
+ declare const UserSourceSignup: UserSource;
323
+ declare const UserSourceInvite: UserSource;
324
+ declare const UserSourceSSO: UserSource;
325
+ declare const UserSourceAPI: UserSource;
326
+ declare const UserSources: {
327
+ readonly signup: {
328
+ readonly value: "signup";
329
+ readonly label: "Signup";
330
+ };
331
+ readonly invite: {
332
+ readonly value: "invite";
333
+ readonly label: "Invite";
334
+ };
335
+ readonly sso: {
336
+ readonly value: "sso";
337
+ readonly label: "SSO";
338
+ };
339
+ readonly api: {
340
+ readonly value: "api";
341
+ readonly label: "API";
342
+ };
343
+ };
344
+ type UserSourceTS = keyof typeof UserSources;
345
+ type UserSourceOptionTS = typeof UserSources[UserSourceTS];
346
+ /**
347
+ * InviteStatus represents the status of an invitation
348
+ */
349
+ type InviteStatus = string;
350
+ declare const InviteStatusPending: InviteStatus;
351
+ declare const InviteStatusAccepted: InviteStatus;
352
+ declare const InviteStatusExpired: InviteStatus;
353
+ declare const InviteStatusRevoked: InviteStatus;
354
+ declare const InviteStatuses: {
355
+ readonly pending: {
356
+ readonly value: "pending";
357
+ readonly label: "Pending";
358
+ };
359
+ readonly accepted: {
360
+ readonly value: "accepted";
361
+ readonly label: "Accepted";
362
+ };
363
+ readonly expired: {
364
+ readonly value: "expired";
365
+ readonly label: "Expired";
366
+ };
367
+ readonly revoked: {
368
+ readonly value: "revoked";
369
+ readonly label: "Revoked";
370
+ };
371
+ };
372
+ type InviteStatusTS = keyof typeof InviteStatuses;
373
+ type InviteStatusOptionTS = typeof InviteStatuses[InviteStatusTS];
374
+ /**
375
+ * Invite represents a team/org invitation
376
+ */
377
+ interface Invite {
378
+ id?: string;
379
+ orgId: string;
380
+ email: string;
381
+ role: string;
382
+ invitedBy: string;
383
+ status: InviteStatusTS;
384
+ acceptedBy?: string;
385
+ acceptedAt?: number;
386
+ expiresAt?: number;
387
+ createdAt?: number;
388
+ updatedAt?: number;
389
+ }
390
+ interface InviteResponse {
391
+ invite: Invite;
392
+ metadata: ResponseMetadata;
393
+ }
394
+ interface ListInvitesResponse {
395
+ invites: Invite[];
396
+ metadata: ResponseMetadata;
397
+ }
398
+ /**
399
+ * UserOnboarding tracks the onboarding progress for a user
400
+ */
401
+ interface UserOnboarding {
402
+ status: OnboardingStatus;
403
+ completedAt?: number;
404
+ }
405
+ /**
406
+ * User represents a user in the system
407
+ */
408
+ interface User {
409
+ id?: string;
410
+ email: string;
411
+ firstName: string;
412
+ lastName: string;
413
+ authProviderName: string;
414
+ orgAccess?: UserOrgAccess[];
415
+ /**
416
+ * Status & Control
417
+ */
418
+ enabled?: boolean;
419
+ /**
420
+ * Source tracking
421
+ */
422
+ source?: UserSourceTS;
423
+ invitedBy?: string;
424
+ inviteStatus?: InviteStatusTS;
425
+ /**
426
+ * Team membership - LEGACY, DO NOT USE
427
+ * These fields are deprecated and will be removed.
428
+ * Use Org and OrgAccess patterns instead.
429
+ */
430
+ isTeamAdmin?: boolean;
431
+ teamId?: string;
432
+ teamName?: string;
433
+ /**
434
+ * System admin flag
435
+ */
436
+ isSysAdmin?: boolean;
437
+ /**
438
+ * Preferences
439
+ */
440
+ settings?: UserSettings;
441
+ notificationPreferences?: NotificationPreferences;
442
+ /**
443
+ * Onboarding tracking
444
+ */
445
+ onboarding?: UserOnboarding;
446
+ /**
447
+ * Flexible metadata
448
+ */
449
+ metadata?: {
450
+ [key: string]: any;
451
+ };
452
+ /**
453
+ * Activity tracking (Unix ms). FirstActiveAt is the activation moment —
454
+ * the first agent message sent after signup (web chat, or WhatsApp routed
455
+ * to a real org rather than the onboarding funnel). LastActiveAt is
456
+ * refreshed on every later message, throttled at the sender. Written ONLY
457
+ * via the dedicated TouchActivity UPDATE, never by full-row user updates,
458
+ * so concurrent profile edits can't clobber them.
459
+ */
460
+ firstActiveAt?: number;
461
+ lastActiveAt?: number;
462
+ /**
463
+ * Audit fields
464
+ */
465
+ createdAt?: number;
466
+ updatedAt?: number;
467
+ createdBy?: string;
468
+ updatedBy?: string;
469
+ }
470
+ interface UserResponse {
471
+ user: User;
472
+ metadata: ResponseMetadata;
473
+ }
474
+ interface ListUsersResponse {
475
+ users: User[];
476
+ metadata: ResponseMetadata;
477
+ }
478
+ interface Team {
479
+ id?: string;
480
+ name: string;
481
+ isSubscribed: boolean;
482
+ subscribedAt?: number;
483
+ plan: string;
484
+ ownerName?: string;
485
+ ownerEmail?: string;
486
+ subscriptionPlatform?: SubscriptionPlatform;
487
+ subscriptionId?: string;
488
+ onboardingDone?: boolean;
489
+ onboardingData?: string;
490
+ }
491
+ type SubscriptionPlatform = string;
492
+ declare const SubscriptionPlatformStripe: SubscriptionPlatform;
493
+ declare const SubscriptionPlatformCustom: SubscriptionPlatform;
494
+ interface OrgRole {
495
+ id?: string;
496
+ orgId?: string;
497
+ title: string;
498
+ permissions: Permission[];
499
+ isSystem: boolean;
500
+ createdAt?: number;
501
+ updatedAt?: number;
502
+ createdBy?: string;
503
+ updatedBy?: string;
504
+ }
505
+ /**
506
+ * org db - copied from sys db
507
+ */
508
+ interface Permission {
509
+ /**
510
+ * ID *primitive.ObjectID `bson:"_id,omitempty" json:"id"`
511
+ */
512
+ name: string;
513
+ title: string;
514
+ isSystem: boolean;
515
+ }
516
+ /**
517
+ * UpdateUserSettingsRequest is the request payload for updating user settings
518
+ */
519
+ interface UpdateUserSettingsRequest {
520
+ id: string;
521
+ settings?: UserSettings;
522
+ notificationPreferences?: NotificationPreferences;
523
+ }
524
+ /**
525
+ * UserSettingsResponse is the response for settings operations
526
+ */
527
+ interface UserSettingsResponse {
528
+ settings?: UserSettings;
529
+ notificationPreferences?: NotificationPreferences;
530
+ metadata: ResponseMetadata;
531
+ }
532
+ /**
533
+ * OnboardingStep represents a step in the onboarding flow
534
+ */
535
+ interface OnboardingStep {
536
+ step: number;
537
+ name: string;
538
+ status: string;
539
+ required: boolean;
540
+ }
541
+ /**
542
+ * OnboardingState represents the current state of a user's onboarding
543
+ */
544
+ interface OnboardingState {
545
+ status: string;
546
+ currentStep: number;
547
+ steps: OnboardingStep[];
548
+ user?: User;
549
+ org?: Org;
550
+ }
551
+ /**
552
+ * OnboardingStateResponse is the response for onboarding status
553
+ */
554
+ interface OnboardingStateResponse {
555
+ state: OnboardingState;
556
+ metadata: ResponseMetadata;
557
+ }
558
+ /**
559
+ * OrgInput contains the input for creating an organization
560
+ */
561
+ interface OrgInput {
562
+ name: string;
563
+ country?: string;
564
+ affiliateCode?: string;
565
+ mainDomain?: string;
566
+ industry?: string;
567
+ size?: string;
568
+ stripeSessionId?: string;
569
+ }
570
+ /**
571
+ * OrgResult contains the result of organization creation
572
+ */
573
+ interface OrgResult {
574
+ org?: Org;
575
+ nextStep: string;
576
+ metadata: ResponseMetadata;
577
+ }
578
+ /**
579
+ * WorkspaceInput is an alias for OrgInput (deprecated)
580
+ */
581
+ type WorkspaceInput = OrgInput;
582
+ /**
583
+ * WorkspaceResult is an alias for OrgResult (deprecated)
584
+ */
585
+ type WorkspaceResult = OrgResult;
586
+ /**
587
+ * InviteInput contains the input for sending invites
588
+ */
589
+ interface InviteInput {
590
+ email: string;
591
+ role: string;
592
+ }
593
+ /**
594
+ * InvitesResult contains the result of sending invites
595
+ */
596
+ interface InvitesResult {
597
+ sent: InviteSentStatus[];
598
+ failed: string[];
599
+ nextStep: string;
600
+ metadata: ResponseMetadata;
601
+ }
602
+ /**
603
+ * InviteSentStatus represents status of a sent invite
604
+ */
605
+ interface InviteSentStatus {
606
+ email: string;
607
+ status: string;
608
+ }
609
+ /**
610
+ * KnowledgeInput contains the input for creating knowledge graph
611
+ */
612
+ interface KnowledgeInput {
613
+ name?: string;
614
+ skipUpload: boolean;
615
+ }
616
+ /**
617
+ * KnowledgeGraphInfo contains info about a knowledge graph
618
+ */
619
+ interface KnowledgeGraphInfo {
620
+ id: string;
621
+ name: string;
622
+ status: string;
623
+ documentCount: number;
624
+ }
625
+ /**
626
+ * KnowledgeResult contains the result of knowledge graph creation
627
+ */
628
+ interface KnowledgeResult {
629
+ knowledgeGraph: KnowledgeGraphInfo;
630
+ nextStep: string;
631
+ metadata: ResponseMetadata;
632
+ }
633
+ /**
634
+ * AgentInput contains the input for creating an agent
635
+ */
636
+ interface AgentInput {
637
+ name: string;
638
+ goal: string;
639
+ personality: string;
640
+ skills?: string[];
641
+ }
642
+ /**
643
+ * AgentInfo contains info about an agent
644
+ */
645
+ interface AgentInfo {
646
+ id: string;
647
+ name: string;
648
+ goal: string;
649
+ personality: string;
650
+ status: string;
651
+ knowledgeGraphId?: string;
652
+ }
653
+ /**
654
+ * AgentResult contains the result of agent creation
655
+ */
656
+ interface AgentResult {
657
+ agent: AgentInfo;
658
+ nextStep: string;
659
+ metadata: ResponseMetadata;
660
+ }
661
+ /**
662
+ * OnboardingCompleteResult contains the result of completing onboarding
663
+ */
664
+ interface OnboardingCompleteResult {
665
+ status: string;
666
+ completedAt: number;
667
+ org?: Org;
668
+ redirectUrl: string;
669
+ metadata: ResponseMetadata;
670
+ }
671
+ /**
672
+ * PaymentSessionInput contains input for creating a payment session
673
+ */
674
+ interface PaymentSessionInput {
675
+ plan: string;
676
+ billingCycle: string;
677
+ seats: number;
678
+ successUrl: string;
679
+ cancelUrl: string;
680
+ affiliateCode?: string;
681
+ }
682
+ /**
683
+ * PaymentSessionResult contains the result of creating a payment session
684
+ */
685
+ interface PaymentSessionResult {
686
+ url: string;
687
+ sessionId: string;
688
+ customerId: string;
689
+ metadata: ResponseMetadata;
690
+ }
691
+ /**
692
+ * OnboardingPlanInput contains subscription plan selection for provisioning
693
+ */
694
+ interface OnboardingPlanInput {
695
+ plan: string;
696
+ billingCycle: string;
697
+ seats: number;
698
+ stripeSessionId?: string;
699
+ }
700
+ /**
701
+ * OnboardingOrgInput contains organization data for the onboarding wizard.
702
+ * The product is implicit in the admin DB the request lands in
703
+ * (admin_eloquent / admin_pumba / …) — no need to pass it on the body.
704
+ */
705
+ interface OnboardingOrgInput {
706
+ title: string;
707
+ mainDomain: string;
708
+ industry?: string;
709
+ size?: string;
710
+ }
711
+ /**
712
+ * OnboardingDocumentInput contains a document to be ingested during onboarding
713
+ */
714
+ interface OnboardingDocumentInput {
715
+ title: string;
716
+ fileUrl: string;
717
+ }
718
+ /**
719
+ * OnboardingKnowledgeInput contains knowledge base configuration with optional documents
720
+ */
721
+ interface OnboardingKnowledgeInput {
722
+ name: string;
723
+ documents?: OnboardingDocumentInput[];
724
+ }
725
+ /**
726
+ * OnboardingProvisionRequest contains all data collected during onboarding
727
+ * to create org and provision all resources in one request
728
+ */
729
+ interface OnboardingProvisionRequest {
730
+ plan: OnboardingPlanInput;
731
+ org: OnboardingOrgInput;
732
+ invites?: InviteInput[];
733
+ knowledge: OnboardingKnowledgeInput;
734
+ agent: AgentInput;
735
+ }
736
+ /**
737
+ * OnboardingProvisionResponse is returned after starting provisioning
738
+ */
739
+ interface OnboardingProvisionResponse {
740
+ orgId: string;
741
+ userId: string;
742
+ status: string;
743
+ metadata: ResponseMetadata;
744
+ }
745
+ /**
746
+ * CreateOrgRequest is the request payload for creating an organization.
747
+ * Under per-product DB + row-level tenancy this is a pure row INSERT —
748
+ * no per-org schema provisioning, no artifact install. The product is
749
+ * implicit in the admin DB the request lands in.
750
+ */
751
+ interface CreateOrgRequest {
752
+ title: string;
753
+ mainDomain: string;
754
+ type?: OrgTypeTS;
755
+ size?: OrgSizeTS;
756
+ industry?: string;
757
+ logoUrl?: string;
758
+ address?: Address;
759
+ subscription?: OrgSubscription;
760
+ metadata?: {
761
+ [key: string]: any;
762
+ };
763
+ }
764
+ declare const AdminOrgCreate = "admin.orgs.create";
765
+ declare const AdminOrgList = "admin.orgs.list";
766
+ declare const AdminOrgListByMetadata = "admin.orgs.listByMetadata";
767
+ declare const AdminOrgGet = "admin.orgs.get";
768
+ declare const AdminOrgGetInfo = "admin.orgs.getInfo";
769
+ declare const AdminOrgGetByDomain = "admin.orgs.getByDomain";
770
+ declare const AdminOrgUpdate = "admin.orgs.update";
771
+ declare const AdminOrgDelete = "admin.orgs.delete";
772
+ declare const AdminOrgCreated = "system.admin.org.created";
773
+ declare const AdminOrgRolesGet = "admin.orgRoles.get";
774
+ declare const AdminOrgRolesCreate = "admin.orgRoles.create";
775
+ declare const AdminOrgRolesUpdate = "admin.orgRoles.update";
776
+ declare const AdminOrgRolesDelete = "admin.orgRoles.delete";
777
+ declare const AdminUsersGet = "admin.users.get";
778
+ declare const AdminUsersGetForOrg = "admin.users.getUsersForOrg";
779
+ declare const AdminUsersGetOne = "admin.users.getOne";
780
+ declare const AdminUsersGetOneByEmail = "admin.users.getOneByEmail";
781
+ declare const AdminUsersGetOneByPhone = "admin.users.getOneByPhone";
782
+ declare const AdminUsersCreate = "admin.users.create";
783
+ declare const AdminUsersUpdate = "admin.users.update";
784
+ declare const AdminUsersDelete = "admin.users.delete";
785
+ declare const AdminUsersUpdateSettings = "admin.users.updateSettings";
786
+ declare const AdminUsersGetSettings = "admin.users.getSettings";
787
+ declare const AdminUsersTouchActivity = "admin.users.touchActivity";
788
+ declare const AdminTeamsCreate = "admin.teams.create";
789
+ declare const AdminTeamsGetOne = "admin.teams.getOne";
790
+ declare const AdminTeamsGetForOrg = "admin.teams.getTeamsForOrg";
791
+ declare const AdminTeamsUpdateOnboarding = "admin.teams.updateOnboardingData";
792
+ /**
793
+ * AdminBillingSuperAgentCheckout mints a per-user Super Agent Stripe checkout
794
+ * URL. Requested by the chat service for the WhatsApp free-limit wall.
795
+ */
796
+ declare const AdminBillingSuperAgentCheckout = "admin.billing.superagent-checkout";
797
+ /**
798
+ * Country is a supported jurisdiction for org-level scoping of system
799
+ * document libraries. The Code is the canonical, machine value stored on
800
+ * Org.Country and matched against system_doc_libraries.metadata->>'country'
801
+ * (see backend/services/admin/artifacts/eloquent/system_libraries.go and
802
+ * docs/_db_v2/08_country_scoped_libraries.md).
803
+ * To onboard a new jurisdiction: append a row here, then add the matching
804
+ * <code>_<dept>_library entries in the artifact registry. No enum, no
805
+ * migration — Org.Country is a plain varchar.
806
+ */
807
+ interface Country {
808
+ code: string;
809
+ name: string;
810
+ }
811
+ /**
812
+ * DefaultTrialDays is the self-serve trial length. Override with TRIAL_DAYS.
813
+ */
814
+ declare const DefaultTrialDays = 7;
815
+
816
+ export { InviteStatusRevoked as $, type Address as A, AdminUsersGetForOrg as B, AdminUsersGetOne as C, AdminUsersGetOneByEmail as D, AdminUsersGetOneByPhone as E, AdminUsersGetSettings as F, AdminUsersTouchActivity as G, AdminUsersUpdate as H, AdminUsersUpdateSettings as I, type AgentInfo as J, type AgentInput as K, type ListOrgsResponse as L, type AgentResult as M, type AzureSettings as N, type OrgStatusTS as O, type Country as P, type CreateOrgRequest as Q, DefaultTrialDays as R, type Invite as S, type InviteInput as T, type InviteResponse as U, type InviteSentStatus as V, type InviteStatus as W, InviteStatusAccepted as X, InviteStatusExpired as Y, type InviteStatusOptionTS as Z, InviteStatusPending as _, type OrgTypeTS as a, OrgTypes as a$, type InviteStatusTS as a0, InviteStatuses as a1, type InvitesResult as a2, type KnowledgeGraphInfo as a3, type KnowledgeInput as a4, type KnowledgeResult as a5, type ListInvitesResponse as a6, type ListOrgRolesResponse as a7, type ListUsersResponse as a8, type NotificationPreferences as a9, OrgSizeLarge as aA, OrgSizeMedium as aB, type OrgSizeOptionTS as aC, OrgSizeSmall as aD, OrgSizeSolo as aE, type OrgSizeTS as aF, OrgSizes as aG, type OrgStatus as aH, OrgStatusActive as aI, type OrgStatusOptionTS as aJ, OrgStatusSuspended as aK, OrgStatuses as aL, type OrgSubscription as aM, type OrgSubscriptionStatus as aN, OrgSubscriptionStatusActive as aO, OrgSubscriptionStatusCancelled as aP, type OrgSubscriptionStatusOptionTS as aQ, OrgSubscriptionStatusPastDue as aR, type OrgSubscriptionStatusTS as aS, OrgSubscriptionStatusTrialing as aT, OrgSubscriptionStatusUnpaid as aU, OrgSubscriptionStatuses as aV, type OrgTemplate as aW, type OrgType as aX, OrgTypeEnterprise as aY, type OrgTypeOptionTS as aZ, OrgTypeSelfServe as a_, type OnboardingCompleteResult as aa, type OnboardingDocumentInput as ab, type OnboardingKnowledgeInput as ac, type OnboardingOrgInput as ad, type OnboardingPlanInput as ae, type OnboardingProvisionRequest as af, type OnboardingProvisionResponse as ag, type OnboardingStateResponse as ah, type OnboardingStatus as ai, OnboardingStatusCompleted as aj, OnboardingStatusInProgress as ak, OnboardingStatusLegacy as al, type OnboardingStatusOptionTS as am, OnboardingStatusPending as an, OnboardingStatusSkipped as ao, type OnboardingStatusTS as ap, OnboardingStatuses as aq, type OnboardingStep as ar, type OrgInfo as as, type OrgInput as at, type OrgOnboarding as au, type OrgResult as av, type OrgRole as aw, type OrgRoleResponse as ax, type OrgSize as ay, OrgSizeEnterprise as az, type Org as b, type PaymentSessionInput as b0, type PaymentSessionResult as b1, type Permission as b2, type SubscriptionPlatform as b3, SubscriptionPlatformCustom as b4, SubscriptionPlatformStripe as b5, type Team as b6, type ThemeOptionTS as b7, ThemeOptions as b8, type UpdateUserSettingsRequest as b9, type User as ba, type UserOnboarding as bb, type UserOrgAccess as bc, type UserResponse as bd, type UserSettings as be, type UserSettingsResponse as bf, type UserSource as bg, UserSourceAPI as bh, UserSourceInvite as bi, type UserSourceOptionTS as bj, UserSourceSSO as bk, UserSourceSignup as bl, type UserSourceTS as bm, UserSources as bn, type WorkspaceInput as bo, type WorkspaceResult as bp, type OrgResponse as c, type OrgInfoResponse as d, type OnboardingState as e, AdminBillingSuperAgentCheckout as f, AdminOrgCreate as g, AdminOrgCreated as h, AdminOrgDelete as i, AdminOrgGet as j, AdminOrgGetByDomain as k, AdminOrgGetInfo as l, AdminOrgList as m, AdminOrgListByMetadata as n, AdminOrgRolesCreate as o, AdminOrgRolesDelete as p, AdminOrgRolesGet as q, AdminOrgRolesUpdate as r, AdminOrgUpdate as s, AdminTeamsCreate as t, AdminTeamsGetForOrg as u, AdminTeamsGetOne as v, AdminTeamsUpdateOnboarding as w, AdminUsersCreate as x, AdminUsersDelete as y, AdminUsersGet as z };