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