@matech/thebigpos-sdk 2.44.4-rc0 → 2.45.0-rc5

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.ts CHANGED
@@ -28,7 +28,7 @@ export type LoanNameSuffix = "Jr" | "Sr" | "II" | "III" | "IV" | "V" | "VI" | "V
28
28
  export type LoanNamePrefix = "Mr" | "Mrs" | "Ms";
29
29
  export type LoanMilitaryServiceType = "Current" | "RetiredDischargedSeparated" | "NonActivatedNationalGuard" | "SurvivingSpouse";
30
30
  export type LoanMaritalStatus = "Married" | "Separated" | "Unmarried";
31
- export type LoanLogType = "Loan" | "Queue" | "POSFlagChanged" | "Verification" | "DocumentUploaded" | "LoanCreated" | "WorkflowSubmitted" | "UserInvitationSent" | "CoBorrowerAdded" | "TaskCompleted" | "LoanStatusChanged" | "Consent" | "SensitiveDataPurge" | "ClosingDateUpdated" | "ConsumerConnectAssociation" | "TaskReminderSent";
31
+ export type LoanLogType = "Loan" | "Queue" | "POSFlagChanged" | "Verification" | "DocumentUploaded" | "LoanCreated" | "WorkflowSubmitted" | "UserInvitationSent" | "CoBorrowerAdded" | "TaskCompleted" | "LoanStatusChanged" | "Consent" | "SensitiveDataPurge" | "ClosingDateUpdated" | "ConsumerConnectAssociation" | "TaskReminderSent" | "DocumentClassified";
32
32
  export type LoanLienPosition = "First" | "Subordinate";
33
33
  export type LoanLiabilityType = "Revolving" | "Installment" | "Open30Day" | "Lease" | "Other";
34
34
  export type LoanLanguagePreference = "English" | "Chinese" | "Korean" | "Spanish" | "Tagalog" | "Vietnamese" | "Other";
@@ -41,6 +41,7 @@ export type LoanHispanicEthnicity = "Mexican" | "PuertoRican" | "Cuban" | "Other
41
41
  export type LoanGiftSource = "CommunityNonProfit" | "Employer" | "FederalAgency" | "LocalAgency" | "Relative" | "ReligiousNonProfit" | "StateAgency" | "UnmarriedPartner" | "Lender" | "Other";
42
42
  export type LoanGiftAssetType = "Cash" | "Asset" | "Equity";
43
43
  export type LoanGenderType = "Male" | "Female";
44
+ export type LoanDocumentType = "W2" | "Paystub" | "Form1099" | "Form1099Int" | "Form1099Misc" | "Form1099Nec" | "Form1099R" | "Form1099G" | "Form1099Div" | "Form1099Ssa" | "FederalTaxReturn1040" | "TaxReturnScheduleC" | "TaxReturnScheduleD" | "TaxReturnScheduleE" | "Form1065" | "Form1120" | "Form1120S" | "ProfitAndLossStatement" | "VerificationOfEmployment" | "BankStatement" | "InvestmentStatement" | "CreditCardStatement" | "MortgageStatement" | "PayoffStatement" | "HoaDocuments" | "UtilityBill" | "IdentityDocument" | "DemographicAddendum" | "Ssa89" | "Vba260551" | "Hud92900B" | "Check" | "Invoice" | "Receipt" | "LoanApplication1003" | "UnderwritingTransmittal1008" | "Other" | "SalesContract" | "TitleCommitment" | "DriversLicense" | "VerificationOfIncome" | "VerificationOfAssets" | "FloodCertificate" | "FraudReport" | "AddendumToSalesContract" | "GiftLetter" | "CpaLetter" | "TaxBill" | "CondoQuestionnaire" | "CondoBudget" | "CondoBylaws" | "RentalAgreements" | "Lease" | "HazardInsurance" | "VaCertificateOfEligibility" | "Appraisal" | "CreditReport" | "CondoMasterPolicy";
44
45
  export type LoanDocumentFolderPermissionLevel = "None" | "Read" | "Write" | "Manage";
45
46
  export type LoanCitizenship = "USCitizen" | "PermanentResidentAlien" | "NonPermanentResidentAlien";
46
47
  export type LoanBankruptcyType = "Chapter7" | "Chapter11" | "Chapter12" | "Chapter13";
@@ -62,12 +63,25 @@ export type CustomFieldAccessLevel = "NoAccess" | "ReadOnly" | "ReadWrite";
62
63
  export type ConsentType = "Econsent" | "CreditAuthorization" | "Tcpa";
63
64
  export type ConsentSource = "TheBigPOS" | "ConsumerConnect";
64
65
  export type ConsentLosSyncStatus = "NotStarted" | "Failed" | "Success";
66
+ export type ClassificationSource = "Textract" | "Llm" | "Manual";
65
67
  export type BranchType = "Mortgage" | "RealEstate";
66
68
  export type BorrowerType = "Borrower" | "CoBorrower" | "Unknown";
67
69
  export type BorrowerRelationship = "NotApplicable" | "Spouse" | "NonSpouse";
68
70
  export type BorrowerApplicationStatus = "Draft" | "Complete";
69
71
  export type BillingType = "ClosedLoan" | "LoanOfficer";
70
72
  export type AuditChangeType = "Created" | "Modified" | "SoftDeleted" | "HardDeleted" | "Restored" | "Deactivated" | "Reactivated";
73
+ export type AiUrlSourceScope = "FullDomain" | "SpecificPath";
74
+ export type AiUrlSourceCategory = "Regulatory" | "Guidelines" | "MarketData" | "Custom";
75
+ export type AiStructuredDataType = "Table" | "DocumentAnalysis" | "DocumentList" | "GeneratedDocument";
76
+ export type AiQueryTemplateName = "PipelineSummary" | "LoanDetail" | "LoansClosing" | "StaleLoans" | "LoansByType" | "LoansByOfficer" | "AverageLoanAmount" | "LockedVsUnlocked" | "LoansByPurpose" | "LoansByPropertyState" | "LoansByRate" | "DtiLtvRisk" | "DisclosureTracking" | "NewLoans" | "ExpiringLocks" | "ClosedLoans" | "VerificationGaps" | "CreditScoreDistribution" | "OccupancyMix" | "PropertyTypeMix" | "FirstTimeHomebuyer" | "SelfEmployed" | "ReferralSourcePerformance" | "AmortizationMix" | "TimeToClose" | "ConversionFunnel" | "MonthlyProduction" | "PaymentAffordability" | "DownPaymentCashToClose" | "ApprovalExpirations" | "ApplicationCompleteness" | "LosSyncHealth" | "DeclarationsRisk" | "MilitaryEligibility" | "OutstandingTasks" | "ConsentTracking";
77
+ export type AiPromptCategory = "DocumentAnalysis" | "DataQuery" | "General" | "Action";
78
+ export type AiOutputType = "Text" | "Document";
79
+ export type AiIntent = "Greeting" | "Invalid" | "Relevant" | "LoanSpecific" | "DocumentList" | "GeneralKnowledge" | "Blocked" | "Action" | "ConversationMeta" | "Capabilities" | "UsageReport";
80
+ export type AiGuardrailCategory = "ContentSafety" | "PromptInjection" | "Privacy" | "Legal";
81
+ export type AiDisplayHint = "Table" | "SummaryCards" | "RankedList" | "Comparison" | "ExecutiveBrief";
82
+ export type AiConfigEntityType = "Prompt" | "Guardrail" | "CanonicalField" | "UrlSource" | "AdminSettings" | "AccountTokenSettings" | "AccountSettings";
83
+ export type AiConfigChangeAction = "Created" | "Updated" | "Deleted" | "Toggled";
84
+ export type AiAuditEventType = "Error" | "GuardrailBlockedPre" | "GuardrailPassedPre" | "IntentClassified" | "LoanResolvedFromMessage" | "DocumentNotFound" | "GuardrailBlockedPost" | "GuardrailPassedPost" | "DocumentAnalyzed" | "DocumentList" | "DocumentResolutionAmbiguous" | "ResponseGenerated" | "ParametersExtracted" | "QueryExecuted" | "LoanContextNotFound" | "LoanContextLoaded" | "GuardrailBlockedBedrock" | "PromptMatched" | "QueryCondensed" | "IntentParseFailed" | "LoanSearchTermDiscarded" | "CanonicalFieldsSelected";
71
85
  export type AddressFamily = "Unspecified" | "Unix" | "InterNetwork" | "ImpLink" | "Pup" | "Chaos" | "NS" | "Ipx" | "Iso" | "Osi" | "Ecma" | "DataKit" | "Ccitt" | "Sna" | "DecNet" | "DataLink" | "Lat" | "HyperChannel" | "AppleTalk" | "NetBios" | "VoiceView" | "FireFox" | "Banyan" | "Atm" | "InterNetworkV6" | "Cluster" | "Ieee12844" | "Irda" | "NetworkDesigners" | "Max" | "Packet" | "ControllerAreaNetwork" | "Unknown";
72
86
  export interface ASOSettings {
73
87
  enabled: boolean;
@@ -147,11 +161,13 @@ export interface AccountSettings {
147
161
  smsNumber?: string | null;
148
162
  ssoHostOverride?: string | null;
149
163
  isEarlyAdopter: boolean;
164
+ isAIEnabled: boolean;
150
165
  }
151
166
  export interface AccountSettingsRequest {
152
167
  isSmsEnabled: boolean;
153
168
  smsNumber?: string | null;
154
169
  isEarlyAdopter: boolean;
170
+ isAIEnabled: boolean;
155
171
  }
156
172
  export interface Action {
157
173
  /** @format uuid */
@@ -295,6 +311,404 @@ export interface AffordabilityCalculatorRequest {
295
311
  /** @format double */
296
312
  annualInsurance: number;
297
313
  }
314
+ export interface AiAccountSettings {
315
+ bedrockModelId: string;
316
+ isUsingAppDefault: boolean;
317
+ }
318
+ export interface AiAccountSettingsRequest {
319
+ bedrockModelId?: string | null;
320
+ }
321
+ export interface AiAccountUsageOverview {
322
+ /** @format uuid */
323
+ accountId: string;
324
+ accountName: string;
325
+ /** @format int32 */
326
+ limit: number;
327
+ /** @format int64 */
328
+ used: number;
329
+ /** @format int64 */
330
+ remaining: number;
331
+ /** @format double */
332
+ percentUsed: number;
333
+ limitReached: boolean;
334
+ /** @format date-time */
335
+ windowStart: string;
336
+ /** @format date-time */
337
+ windowEnd: string;
338
+ }
339
+ export interface AiAccountUsageOverviewPaginated {
340
+ rows: AiAccountUsageOverview[];
341
+ pagination: Pagination;
342
+ /** @format int64 */
343
+ count: number;
344
+ }
345
+ export interface AiAdminSettings {
346
+ bedrockModelId: string;
347
+ /** @format int32 */
348
+ maxTokens: number;
349
+ /** @format double */
350
+ temperature: number;
351
+ /** @format int32 */
352
+ conversationContextTurns: number;
353
+ /** @format int32 */
354
+ requestTimeoutSeconds: number;
355
+ /** @format int32 */
356
+ defaultTokenLimit: number;
357
+ bedrockRegion: string;
358
+ }
359
+ export interface AiAdminSettingsRequest {
360
+ bedrockModelId?: string | null;
361
+ /** @format int32 */
362
+ maxTokens?: number | null;
363
+ /** @format double */
364
+ temperature?: number | null;
365
+ /** @format int32 */
366
+ conversationContextTurns?: number | null;
367
+ /** @format int32 */
368
+ requestTimeoutSeconds?: number | null;
369
+ /** @format int32 */
370
+ defaultTokenLimit?: number | null;
371
+ }
372
+ export interface AiAdminStats {
373
+ /** @format int32 */
374
+ totalRequests: number;
375
+ /** @format int32 */
376
+ blockedRequests: number;
377
+ /** @format double */
378
+ averageResponseTimeMs: number;
379
+ /** @format int32 */
380
+ totalInputTokens: number;
381
+ /** @format int32 */
382
+ totalOutputTokens: number;
383
+ /** @format int32 */
384
+ totalTokens: number;
385
+ intentDistribution: Record<string, number>;
386
+ topQueryTemplates: Record<string, number>;
387
+ period: string;
388
+ }
389
+ export interface AiAuditLog {
390
+ /** @format uuid */
391
+ id: string;
392
+ /** @format uuid */
393
+ requestId: string;
394
+ /** @format uuid */
395
+ userId: string;
396
+ /** @format uuid */
397
+ conversationId?: string | null;
398
+ /** @format uuid */
399
+ messageId?: string | null;
400
+ eventType: AiAuditLogEventTypeEnum;
401
+ modelId?: string | null;
402
+ /** @format int32 */
403
+ inputTokens?: number | null;
404
+ /** @format int32 */
405
+ outputTokens?: number | null;
406
+ /** @format int32 */
407
+ latencyMs?: number | null;
408
+ bedrockRequestId?: string | null;
409
+ guardrailName?: string | null;
410
+ guardrailCategory?: string | null;
411
+ rawRequest?: string | null;
412
+ rawResponse?: string | null;
413
+ details?: any | null;
414
+ /** @format date-time */
415
+ createdAt: string;
416
+ }
417
+ export interface AiAuditLogPaginated {
418
+ rows: AiAuditLog[];
419
+ pagination: Pagination;
420
+ /** @format int64 */
421
+ count: number;
422
+ }
423
+ export interface AiCanonicalField {
424
+ /** @format uuid */
425
+ id: string;
426
+ canonicalName: string;
427
+ displayName: string;
428
+ description: string;
429
+ allowedRoles: string[];
430
+ efPath?: string | null;
431
+ isPii: boolean;
432
+ isActive: boolean;
433
+ dataSource: string;
434
+ isDefault: boolean;
435
+ category?: string | null;
436
+ jsonPropertyName?: string | null;
437
+ textractKey?: string | null;
438
+ textractKeyAliases: string[];
439
+ hasAccountOverride: boolean;
440
+ /** @format date-time */
441
+ createdAt: string;
442
+ /** @format date-time */
443
+ updatedAt?: string | null;
444
+ }
445
+ export interface AiChat {
446
+ /** @format uuid */
447
+ conversationId: string;
448
+ /** @format uuid */
449
+ messageId: string;
450
+ response: AiChatBody;
451
+ metadata: AiChatMetadata;
452
+ }
453
+ export interface AiChatBody {
454
+ text: string;
455
+ data?: AiChatStructuredData | null;
456
+ }
457
+ export interface AiChatMessage {
458
+ /** @format uuid */
459
+ id: string;
460
+ userMessage: string;
461
+ assistantResponse: string;
462
+ intent?: AiIntent | null;
463
+ fieldsAccessed?: string[] | null;
464
+ data?: AiChatStructuredData | null;
465
+ /** @format date-time */
466
+ createdAt: string;
467
+ }
468
+ export interface AiChatMessagePaginated {
469
+ rows: AiChatMessage[];
470
+ pagination: Pagination;
471
+ /** @format int64 */
472
+ count: number;
473
+ }
474
+ export interface AiChatMetadata {
475
+ intent: AiChatMetadataIntentEnum;
476
+ fieldsAccessed: string[];
477
+ /** @format int64 */
478
+ queryTimeMs: number;
479
+ /** @format int64 */
480
+ llmTimeMs: number;
481
+ /** @format int32 */
482
+ inputTokens: number;
483
+ /** @format int32 */
484
+ outputTokens: number;
485
+ modelId?: string | null;
486
+ wasBlocked: boolean;
487
+ blockedReason?: string | null;
488
+ tokenBudget?: AiTokenBudgetStatus | null;
489
+ }
490
+ export interface AiChatRequest {
491
+ message: string;
492
+ /** @format uuid */
493
+ conversationId?: string | null;
494
+ /** @format uuid */
495
+ loanId?: string | null;
496
+ documentIds?: string[] | null;
497
+ /** @format uuid */
498
+ promptId?: string | null;
499
+ }
500
+ export interface AiChatStructuredData {
501
+ type: AiChatStructuredDataTypeEnum;
502
+ displayHint?: AiDisplayHint | null;
503
+ detectedDocumentType?: string | null;
504
+ columns: string[];
505
+ rows: string[][];
506
+ /** @format uuid */
507
+ generatedDocumentId?: string | null;
508
+ generatedFileName?: string | null;
509
+ }
510
+ export interface AiConfigChangeLog {
511
+ /** @format uuid */
512
+ id: string;
513
+ /** @format uuid */
514
+ accountId?: string | null;
515
+ /** @format uuid */
516
+ actorUserId: string;
517
+ entityType: AiConfigChangeLogEntityTypeEnum;
518
+ /** @format uuid */
519
+ entityId?: string | null;
520
+ action: AiConfigChangeLogActionEnum;
521
+ before?: any | null;
522
+ after?: any | null;
523
+ /** @format date-time */
524
+ createdAt: string;
525
+ }
526
+ export interface AiConfigChangeLogPaginated {
527
+ rows: AiConfigChangeLog[];
528
+ pagination: Pagination;
529
+ /** @format int64 */
530
+ count: number;
531
+ }
532
+ export interface AiConversationAuditSummary {
533
+ /** @format uuid */
534
+ conversationId: string;
535
+ /** @format uuid */
536
+ userId: string;
537
+ userName?: string | null;
538
+ userRole?: string | null;
539
+ name?: string | null;
540
+ /** @format int32 */
541
+ turnCount: number;
542
+ /** @format int32 */
543
+ completedCount: number;
544
+ /** @format int32 */
545
+ blockedCount: number;
546
+ /** @format int32 */
547
+ errorCount: number;
548
+ /** @format int32 */
549
+ totalTokens: number;
550
+ /** @format date-time */
551
+ lastActivityAt: string;
552
+ }
553
+ export interface AiConversationAuditSummaryPaginated {
554
+ rows: AiConversationAuditSummary[];
555
+ pagination: Pagination;
556
+ /** @format int64 */
557
+ count: number;
558
+ }
559
+ export interface AiConversationDetail {
560
+ /** @format uuid */
561
+ id: string;
562
+ name?: string | null;
563
+ isPinned: boolean;
564
+ /** @format date-time */
565
+ createdAt: string;
566
+ /** @format date-time */
567
+ updatedAt?: string | null;
568
+ /** @format int32 */
569
+ messageCount: number;
570
+ }
571
+ export interface AiConversationListItem {
572
+ /** @format uuid */
573
+ id: string;
574
+ /** @format uuid */
575
+ userId: string;
576
+ name?: string | null;
577
+ preview: string;
578
+ /** @format int32 */
579
+ messageCount: number;
580
+ isPinned: boolean;
581
+ /** @format date-time */
582
+ createdAt: string;
583
+ /** @format date-time */
584
+ updatedAt?: string | null;
585
+ }
586
+ export interface AiConversationListItemPaginated {
587
+ rows: AiConversationListItem[];
588
+ pagination: Pagination;
589
+ /** @format int64 */
590
+ count: number;
591
+ }
592
+ export interface AiGuardrail {
593
+ /** @format uuid */
594
+ id: string;
595
+ name: string;
596
+ category: AiGuardrailCategoryEnum;
597
+ description?: string | null;
598
+ keywords: string[];
599
+ responseTemplate: string;
600
+ isDefault: boolean;
601
+ isEnabled: boolean;
602
+ hasAccountOverride: boolean;
603
+ /** @format date-time */
604
+ createdAt: string;
605
+ /** @format date-time */
606
+ updatedAt?: string | null;
607
+ }
608
+ export interface AiPrompt {
609
+ /** @format uuid */
610
+ id: string;
611
+ title: string;
612
+ slug?: string | null;
613
+ description: string;
614
+ documentTypes: string[];
615
+ applicableUrlSourceIds: string[];
616
+ allowedRoles: string[];
617
+ systemPrompt: string;
618
+ /** @format int32 */
619
+ sortOrder: number;
620
+ isDefault: boolean;
621
+ /** @format uuid */
622
+ accountId?: string | null;
623
+ isActive: boolean;
624
+ category?: AiPromptCategory | null;
625
+ queryTemplateName?: AiQueryTemplateName | null;
626
+ displayHint?: AiDisplayHint | null;
627
+ bedrockModelId?: string | null;
628
+ requiredDataSources?: string[] | null;
629
+ outputType?: AiOutputType | null;
630
+ hasAccountOverride: boolean;
631
+ /** @format date-time */
632
+ createdAt: string;
633
+ /** @format date-time */
634
+ updatedAt?: string | null;
635
+ }
636
+ export interface AiPromptSummary {
637
+ /** @format uuid */
638
+ id: string;
639
+ title: string;
640
+ slug?: string | null;
641
+ description: string;
642
+ documentTypes: string[];
643
+ applicableUrlSourceIds: string[];
644
+ /** @format int32 */
645
+ sortOrder: number;
646
+ category?: AiPromptCategory | null;
647
+ queryTemplateName?: AiQueryTemplateName | null;
648
+ displayHint?: AiDisplayHint | null;
649
+ bedrockModelId?: string | null;
650
+ requiredDataSources?: string[] | null;
651
+ outputType?: AiOutputType | null;
652
+ }
653
+ export interface AiTokenBudgetStatus {
654
+ /** @format int32 */
655
+ limit: number;
656
+ /** @format int64 */
657
+ used: number;
658
+ /** @format int64 */
659
+ inputTokens: number;
660
+ /** @format int64 */
661
+ outputTokens: number;
662
+ /** @format int64 */
663
+ remaining: number;
664
+ /** @format double */
665
+ percentUsed: number;
666
+ /** @format date-time */
667
+ windowStart: string;
668
+ /** @format date-time */
669
+ windowEnd: string;
670
+ limitReached: boolean;
671
+ }
672
+ export interface AiTokenUsageWindow {
673
+ /** @format date-time */
674
+ windowStart: string;
675
+ /** @format date-time */
676
+ windowEnd: string;
677
+ /** @format int32 */
678
+ limit: number;
679
+ /** @format int64 */
680
+ used: number;
681
+ /** @format int64 */
682
+ inputTokens: number;
683
+ /** @format int64 */
684
+ outputTokens: number;
685
+ /** @format double */
686
+ percentUsed: number;
687
+ limitReached: boolean;
688
+ }
689
+ export interface AiTokenUsageWindowPaginated {
690
+ rows: AiTokenUsageWindow[];
691
+ pagination: Pagination;
692
+ /** @format int64 */
693
+ count: number;
694
+ }
695
+ export interface AiUrlSource {
696
+ /** @format uuid */
697
+ id: string;
698
+ slug?: string | null;
699
+ name: string;
700
+ url: string;
701
+ description?: string | null;
702
+ category: AiUrlSourceCategoryEnum;
703
+ scope: AiUrlSourceScopeEnum;
704
+ isActive: boolean;
705
+ isDefault: boolean;
706
+ hasAccountOverride: boolean;
707
+ /** @format date-time */
708
+ createdAt: string;
709
+ /** @format date-time */
710
+ updatedAt?: string | null;
711
+ }
298
712
  export interface AllowImpersonationRequest {
299
713
  email: string;
300
714
  }
@@ -710,6 +1124,45 @@ export interface CreateAccountRequest {
710
1124
  losIntegration: LOSIntegration;
711
1125
  billingSettings: AccountBillingRequest;
712
1126
  }
1127
+ export interface CreateAiCanonicalFieldRequest {
1128
+ displayName: string;
1129
+ description: string;
1130
+ allowedRoles: string[];
1131
+ isPii: boolean;
1132
+ dataSource: string;
1133
+ category?: string | null;
1134
+ }
1135
+ export interface CreateAiGuardrailRequest {
1136
+ name: string;
1137
+ category: CreateAiGuardrailRequestCategoryEnum;
1138
+ description?: string | null;
1139
+ keywords: string[];
1140
+ responseTemplate: string;
1141
+ }
1142
+ export interface CreateAiPromptRequest {
1143
+ title: string;
1144
+ slug?: string | null;
1145
+ description: string;
1146
+ documentTypes: string[];
1147
+ applicableUrlSourceIds: string[];
1148
+ allowedRoles: string[];
1149
+ systemPrompt: string;
1150
+ /** @format int32 */
1151
+ sortOrder: number;
1152
+ category?: AiPromptCategory | null;
1153
+ queryTemplateName?: AiQueryTemplateName | null;
1154
+ displayHint?: AiDisplayHint | null;
1155
+ bedrockModelId?: string | null;
1156
+ requiredDataSources?: string[] | null;
1157
+ outputType?: AiOutputType | null;
1158
+ }
1159
+ export interface CreateAiUrlSourceRequest {
1160
+ name: string;
1161
+ url: string;
1162
+ description?: string | null;
1163
+ category: CreateAiUrlSourceRequestCategoryEnum;
1164
+ scope: CreateAiUrlSourceRequestScopeEnum;
1165
+ }
713
1166
  export interface CreateBranchRequest {
714
1167
  name: string;
715
1168
  /** @format uuid */
@@ -1602,6 +2055,13 @@ export interface GenerateDocumentRequest {
1602
2055
  preview: boolean;
1603
2056
  recipients: string[];
1604
2057
  }
2058
+ export interface GenerateSystemPrompt {
2059
+ systemPrompt: string;
2060
+ }
2061
+ export interface GenerateSystemPromptRequest {
2062
+ description: string;
2063
+ category: GenerateSystemPromptRequestCategoryEnum;
2064
+ }
1605
2065
  export interface GetApplications {
1606
2066
  applications: ApplicationRowData[];
1607
2067
  }
@@ -2516,9 +2976,18 @@ export interface LoanBorrowerRealEstateAsset {
2516
2976
  /** @format double */
2517
2977
  marketValue?: number | null;
2518
2978
  /** @format double */
2979
+ purchasePrice?: number | null;
2980
+ /** @format int32 */
2981
+ yearBuilt?: number | null;
2982
+ /** @format int32 */
2983
+ numberOfUnits?: number | null;
2984
+ /** @format double */
2519
2985
  monthlyInsTaxDues?: number | null;
2520
2986
  /** @format double */
2521
2987
  monthlyRentalIncome?: number | null;
2988
+ /** @format double */
2989
+ maintenanceExpense?: number | null;
2990
+ dispositionStatus?: string | null;
2522
2991
  address?: AddressV3 | null;
2523
2992
  mortgages?: LoanBorrowerRealEstateAssetMortgage[] | null;
2524
2993
  }
@@ -2737,6 +3206,13 @@ export interface LoanDocument {
2737
3206
  failoverDocumentPath?: string | null;
2738
3207
  /** @format date-time */
2739
3208
  sensitiveDataPurgedOn?: string | null;
3209
+ observedDocumentType?: LoanDocumentType | null;
3210
+ classificationSource?: ClassificationSource | null;
3211
+ verified: boolean;
3212
+ /** @format date-time */
3213
+ classifiedAt?: string | null;
3214
+ classificationMismatch: boolean;
3215
+ classificationMismatchReason?: string | null;
2740
3216
  }
2741
3217
  export interface LoanDocumentFolder {
2742
3218
  /** @format uuid */
@@ -3335,6 +3811,9 @@ export interface LosWebhook {
3335
3811
  events: string[];
3336
3812
  enableSubscription: boolean;
3337
3813
  }
3814
+ export interface ManualDocumentClassificationRequest {
3815
+ documentType: ManualDocumentClassificationRequestDocumentTypeEnum;
3816
+ }
3338
3817
  export interface MdmUser {
3339
3818
  user_email?: string | null;
3340
3819
  user_id?: string | null;
@@ -3630,6 +4109,9 @@ export interface PendingTasksSummary {
3630
4109
  total: number;
3631
4110
  borrowers: BorrowerCount[];
3632
4111
  }
4112
+ export interface PinAiConversationRequest {
4113
+ isPinned: boolean;
4114
+ }
3633
4115
  export interface PostLoanComparisonPdfRequest {
3634
4116
  /** @format uuid */
3635
4117
  siteConfigurationID: string;
@@ -3779,6 +4261,9 @@ export interface RegisterUserRequest {
3779
4261
  /** @format uuid */
3780
4262
  inviteCode?: string | null;
3781
4263
  }
4264
+ export interface RenameAiConversationRequest {
4265
+ name: string;
4266
+ }
3782
4267
  export interface RequestImpersonationRequest {
3783
4268
  email: string;
3784
4269
  }
@@ -3858,6 +4343,13 @@ export interface SSOTokenRequest {
3858
4343
  email: string;
3859
4344
  redirectUri?: string | null;
3860
4345
  }
4346
+ export interface SearchCriteria {
4347
+ searchText?: string | null;
4348
+ }
4349
+ export interface SendESignatureReminderRequest {
4350
+ /** @format uuid */
4351
+ userId: string;
4352
+ }
3861
4353
  export interface SendForgotPasswordRequest {
3862
4354
  email: string;
3863
4355
  }
@@ -4541,6 +5033,13 @@ export interface SocialSurveyRecord {
4541
5033
  /** @format date-time */
4542
5034
  reviewCompletedTimeStamp?: string | null;
4543
5035
  }
5036
+ export interface SupportedModel {
5037
+ modelId: string;
5038
+ displayName: string;
5039
+ provider: string;
5040
+ description?: string | null;
5041
+ isDefault: boolean;
5042
+ }
4544
5043
  export interface SurveyEmailRequest {
4545
5044
  loanOfficerEmailAddress: string;
4546
5045
  }
@@ -4764,18 +5263,59 @@ export interface UpdateAccountRequest {
4764
5263
  asoSettings?: ASOSettings | null;
4765
5264
  settings: AccountSettingsRequest;
4766
5265
  }
4767
- export interface UpdateCustomFieldDefinitionRequest {
4768
- isRequired: boolean;
4769
- /** @format int32 */
4770
- displayOrder: number;
4771
- /** @format int32 */
4772
- minLength?: number | null;
5266
+ export interface UpdateAiAccountTokenLimitRequest {
4773
5267
  /** @format int32 */
4774
- maxLength?: number | null;
4775
- /** @format double */
4776
- minValue?: number | null;
4777
- /** @format double */
4778
- maxValue?: number | null;
5268
+ tokenLimit: number;
5269
+ }
5270
+ export interface UpdateAiCanonicalFieldRequest {
5271
+ displayName: string;
5272
+ description: string;
5273
+ allowedRoles: string[];
5274
+ isPii: boolean;
5275
+ category?: string | null;
5276
+ }
5277
+ export interface UpdateAiGuardrailRequest {
5278
+ name: string;
5279
+ category: UpdateAiGuardrailRequestCategoryEnum;
5280
+ description?: string | null;
5281
+ keywords: string[];
5282
+ responseTemplate: string;
5283
+ }
5284
+ export interface UpdateAiPromptRequest {
5285
+ title: string;
5286
+ description: string;
5287
+ documentTypes: string[];
5288
+ applicableUrlSourceIds: string[];
5289
+ allowedRoles: string[];
5290
+ systemPrompt: string;
5291
+ /** @format int32 */
5292
+ sortOrder: number;
5293
+ category?: AiPromptCategory | null;
5294
+ queryTemplateName?: AiQueryTemplateName | null;
5295
+ displayHint?: AiDisplayHint | null;
5296
+ bedrockModelId?: string | null;
5297
+ requiredDataSources?: string[] | null;
5298
+ outputType?: AiOutputType | null;
5299
+ }
5300
+ export interface UpdateAiUrlSourceRequest {
5301
+ name: string;
5302
+ url: string;
5303
+ description?: string | null;
5304
+ category: UpdateAiUrlSourceRequestCategoryEnum;
5305
+ scope: UpdateAiUrlSourceRequestScopeEnum;
5306
+ }
5307
+ export interface UpdateCustomFieldDefinitionRequest {
5308
+ isRequired: boolean;
5309
+ /** @format int32 */
5310
+ displayOrder: number;
5311
+ /** @format int32 */
5312
+ minLength?: number | null;
5313
+ /** @format int32 */
5314
+ maxLength?: number | null;
5315
+ /** @format double */
5316
+ minValue?: number | null;
5317
+ /** @format double */
5318
+ maxValue?: number | null;
4779
5319
  name: string;
4780
5320
  defaultValue?: string | null;
4781
5321
  regexPattern?: string | null;
@@ -5280,11 +5820,22 @@ export interface Workflow {
5280
5820
  icon: string;
5281
5821
  }
5282
5822
  export type AccountBillingRequestBillingTypeEnum = "ClosedLoan" | "LoanOfficer";
5823
+ export type AiAuditLogEventTypeEnum = "Error" | "GuardrailBlockedPre" | "GuardrailPassedPre" | "IntentClassified" | "LoanResolvedFromMessage" | "DocumentNotFound" | "GuardrailBlockedPost" | "GuardrailPassedPost" | "DocumentAnalyzed" | "DocumentList" | "DocumentResolutionAmbiguous" | "ResponseGenerated" | "ParametersExtracted" | "QueryExecuted" | "LoanContextNotFound" | "LoanContextLoaded" | "GuardrailBlockedBedrock" | "PromptMatched" | "QueryCondensed" | "IntentParseFailed" | "LoanSearchTermDiscarded" | "CanonicalFieldsSelected";
5824
+ export type AiChatMetadataIntentEnum = "Greeting" | "Invalid" | "Relevant" | "LoanSpecific" | "DocumentList" | "GeneralKnowledge" | "Blocked" | "Action" | "ConversationMeta" | "Capabilities" | "UsageReport";
5825
+ export type AiChatStructuredDataTypeEnum = "Table" | "DocumentAnalysis" | "DocumentList" | "GeneratedDocument";
5826
+ export type AiConfigChangeLogEntityTypeEnum = "Prompt" | "Guardrail" | "CanonicalField" | "UrlSource" | "AdminSettings" | "AccountTokenSettings" | "AccountSettings";
5827
+ export type AiConfigChangeLogActionEnum = "Created" | "Updated" | "Deleted" | "Toggled";
5828
+ export type AiGuardrailCategoryEnum = "ContentSafety" | "PromptInjection" | "Privacy" | "Legal";
5829
+ export type AiUrlSourceCategoryEnum = "Regulatory" | "Guidelines" | "MarketData" | "Custom";
5830
+ export type AiUrlSourceScopeEnum = "FullDomain" | "SpecificPath";
5283
5831
  export type AuditLogEntryChangeTypeEnum = "Created" | "Modified" | "SoftDeleted" | "HardDeleted" | "Restored" | "Deactivated" | "Reactivated";
5284
5832
  export type BorrowerCountRoleEnum = "Borrower" | "CoBorrower" | "NonBorrower" | "LoanOfficer" | "LoanProcessor" | "LoanOfficerAssistant" | "SupportingLoanOfficer" | "BuyerAgent" | "SellerAgent" | "TitleInsuranceAgent" | "EscrowAgent" | "SettlementAgent" | "Admin";
5285
5833
  export type BorrowerIdentityRoleEnum = "Borrower" | "CoBorrower" | "NonBorrower" | "LoanOfficer" | "LoanProcessor" | "LoanOfficerAssistant" | "SupportingLoanOfficer" | "BuyerAgent" | "SellerAgent" | "TitleInsuranceAgent" | "EscrowAgent" | "SettlementAgent" | "Admin";
5286
5834
  export type CreateAccessScopeRequestScopeTypeEnum = "User" | "Branch";
5287
5835
  export type CreateAccountRequestEnvironmentEnum = "Development" | "Staging" | "UAT" | "Production";
5836
+ export type CreateAiGuardrailRequestCategoryEnum = "ContentSafety" | "PromptInjection" | "Privacy" | "Legal";
5837
+ export type CreateAiUrlSourceRequestCategoryEnum = "Regulatory" | "Guidelines" | "MarketData" | "Custom";
5838
+ export type CreateAiUrlSourceRequestScopeEnum = "FullDomain" | "SpecificPath";
5288
5839
  export type CreateCustomFieldDefinitionRequestDataTypeEnum = "String" | "Number" | "Decimal" | "Boolean" | "Date" | "SingleSelect" | "MultiSelect";
5289
5840
  export type CreateCustomFieldDefinitionRequestEntityTypeEnum = "Loan";
5290
5841
  export type CreateGroupMemberRequestLoanRoleEnum = "Borrower" | "CoBorrower" | "NonBorrower" | "LoanOfficer" | "LoanProcessor" | "LoanOfficerAssistant" | "SupportingLoanOfficer" | "BuyerAgent" | "SellerAgent" | "TitleInsuranceAgent" | "EscrowAgent" | "SettlementAgent" | "Admin";
@@ -5309,6 +5860,7 @@ export type EncompassCredentialsRequestSigningMethodEnum = "ConsumerConnect" | "
5309
5860
  export type EncompassRequestLogOperationTypeEnum = "FieldUpdate" | "ConsentUpdate" | "DocumentSync" | "MilestoneUpdate" | "DocumentAttachment" | "General" | "FieldReader";
5310
5861
  export type EncompassRequestLogOutcomeEnum = "Success" | "Failure" | "PartialSuccess";
5311
5862
  export type FusionReportFilterFilterTypeEnum = "DateGreaterThanOrEqualTo" | "DateGreaterThan" | "DateLessThan" | "DateLessThanOrEqualTo" | "DateEquals" | "DateDoesntEqual" | "DateNonEmpty" | "DateEmpty" | "StringContains" | "StringEquals" | "StringNotEmpty" | "StringNotEquals" | "StringNotContains";
5863
+ export type GenerateSystemPromptRequestCategoryEnum = "DocumentAnalysis" | "DataQuery" | "General" | "Action";
5312
5864
  export type IpAddressAddressFamilyEnum = "Unspecified" | "Unix" | "InterNetwork" | "ImpLink" | "Pup" | "Chaos" | "NS" | "Ipx" | "Iso" | "Osi" | "Ecma" | "DataKit" | "Ccitt" | "Sna" | "DecNet" | "DataLink" | "Lat" | "HyperChannel" | "AppleTalk" | "NetBios" | "VoiceView" | "FireFox" | "Banyan" | "Atm" | "InterNetworkV6" | "Cluster" | "Ieee12844" | "Irda" | "NetworkDesigners" | "Max" | "Packet" | "ControllerAreaNetwork" | "Unknown";
5313
5865
  export type LoanSigningMethodEnum = "ConsumerConnect" | "POSF";
5314
5866
  export type LoanBorrowerApplicationStatusEnum = "Draft" | "Complete";
@@ -5321,19 +5873,23 @@ export type LoanImportStatusEnum = "WaitingProcess" | "InProgress" | "Completed"
5321
5873
  export type LoanImportImportModeEnum = "All" | "NewOnly" | "UpdateOnly";
5322
5874
  export type LoanImportLogLevelEnum = "None" | "Info" | "Warning" | "Error";
5323
5875
  export type LoanLogLevelEnum = "None" | "Info" | "Warning" | "Error";
5324
- export type LoanLogTypeEnum = "Loan" | "Queue" | "POSFlagChanged" | "Verification" | "DocumentUploaded" | "LoanCreated" | "WorkflowSubmitted" | "UserInvitationSent" | "CoBorrowerAdded" | "TaskCompleted" | "LoanStatusChanged" | "Consent" | "SensitiveDataPurge" | "ClosingDateUpdated" | "ConsumerConnectAssociation" | "TaskReminderSent";
5876
+ export type LoanLogTypeEnum = "Loan" | "Queue" | "POSFlagChanged" | "Verification" | "DocumentUploaded" | "LoanCreated" | "WorkflowSubmitted" | "UserInvitationSent" | "CoBorrowerAdded" | "TaskCompleted" | "LoanStatusChanged" | "Consent" | "SensitiveDataPurge" | "ClosingDateUpdated" | "ConsumerConnectAssociation" | "TaskReminderSent" | "DocumentClassified";
5325
5877
  export type LoanLogDetailLevelEnum = "None" | "Info" | "Warning" | "Error";
5326
- export type LoanLogDetailTypeEnum = "Loan" | "Queue" | "POSFlagChanged" | "Verification" | "DocumentUploaded" | "LoanCreated" | "WorkflowSubmitted" | "UserInvitationSent" | "CoBorrowerAdded" | "TaskCompleted" | "LoanStatusChanged" | "Consent" | "SensitiveDataPurge" | "ClosingDateUpdated" | "ConsumerConnectAssociation" | "TaskReminderSent";
5878
+ export type LoanLogDetailTypeEnum = "Loan" | "Queue" | "POSFlagChanged" | "Verification" | "DocumentUploaded" | "LoanCreated" | "WorkflowSubmitted" | "UserInvitationSent" | "CoBorrowerAdded" | "TaskCompleted" | "LoanStatusChanged" | "Consent" | "SensitiveDataPurge" | "ClosingDateUpdated" | "ConsumerConnectAssociation" | "TaskReminderSent" | "DocumentClassified";
5327
5879
  export type LoanTaskStatusSummaryStatusEnum = "Outstanding" | "Pending" | "Completed" | "Rejected" | "Unknown";
5328
5880
  export type LoanUserLoanRoleEnum = "Borrower" | "CoBorrower" | "NonBorrower" | "LoanOfficer" | "LoanProcessor" | "LoanOfficerAssistant" | "SupportingLoanOfficer" | "BuyerAgent" | "SellerAgent" | "TitleInsuranceAgent" | "EscrowAgent" | "SettlementAgent" | "Admin";
5329
5881
  export type LosOperationTrackingStatusEnum = "Pending" | "Success" | "Failed" | "ConfigurationError" | "PermanentFailure" | "Locked";
5330
5882
  export type LosSyncStepSeverityEnum = "Success" | "Info" | "Warning" | "Error";
5883
+ export type ManualDocumentClassificationRequestDocumentTypeEnum = "W2" | "Paystub" | "Form1099" | "Form1099Int" | "Form1099Misc" | "Form1099Nec" | "Form1099R" | "Form1099G" | "Form1099Div" | "Form1099Ssa" | "FederalTaxReturn1040" | "TaxReturnScheduleC" | "TaxReturnScheduleD" | "TaxReturnScheduleE" | "Form1065" | "Form1120" | "Form1120S" | "ProfitAndLossStatement" | "VerificationOfEmployment" | "BankStatement" | "InvestmentStatement" | "CreditCardStatement" | "MortgageStatement" | "PayoffStatement" | "HoaDocuments" | "UtilityBill" | "IdentityDocument" | "DemographicAddendum" | "Ssa89" | "Vba260551" | "Hud92900B" | "Check" | "Invoice" | "Receipt" | "LoanApplication1003" | "UnderwritingTransmittal1008" | "Other" | "SalesContract" | "TitleCommitment" | "DriversLicense" | "VerificationOfIncome" | "VerificationOfAssets" | "FloodCertificate" | "FraudReport" | "AddendumToSalesContract" | "GiftLetter" | "CpaLetter" | "TaxBill" | "CondoQuestionnaire" | "CondoBudget" | "CondoBylaws" | "RentalAgreements" | "Lease" | "HazardInsurance" | "VaCertificateOfEligibility" | "Appraisal" | "CreditReport" | "CondoMasterPolicy";
5331
5884
  export type SiteConfigurationTypeEnum = "None" | "Account" | "Corporate" | "Branch" | "LoanOfficer" | "Partner";
5332
5885
  export type SiteConfigurationByUrlTypeEnum = "None" | "Account" | "Corporate" | "Branch" | "LoanOfficer" | "Partner";
5333
5886
  export type SiteConfigurationReducedTypeEnum = "None" | "Account" | "Corporate" | "Branch" | "LoanOfficer" | "Partner";
5334
5887
  export type SiteConfigurationRequestTypeEnum = "None" | "Account" | "Corporate" | "Branch" | "LoanOfficer" | "Partner";
5335
5888
  export type SiteConfigurationSummaryTypeEnum = "None" | "Account" | "Corporate" | "Branch" | "LoanOfficer" | "Partner";
5336
5889
  export type UnregisteredBorrowerRoleEnum = "Borrower" | "CoBorrower" | "NonBorrower" | "LoanOfficer" | "LoanProcessor" | "LoanOfficerAssistant" | "SupportingLoanOfficer" | "BuyerAgent" | "SellerAgent" | "TitleInsuranceAgent" | "EscrowAgent" | "SettlementAgent" | "Admin";
5890
+ export type UpdateAiGuardrailRequestCategoryEnum = "ContentSafety" | "PromptInjection" | "Privacy" | "Legal";
5891
+ export type UpdateAiUrlSourceRequestCategoryEnum = "Regulatory" | "Guidelines" | "MarketData" | "Custom";
5892
+ export type UpdateAiUrlSourceRequestScopeEnum = "FullDomain" | "SpecificPath";
5337
5893
  export type UserDraftRoleEnum = "Borrower" | "CoBorrower" | "NonBorrower" | "LoanOfficer" | "LoanProcessor" | "LoanOfficerAssistant" | "SupportingLoanOfficer" | "BuyerAgent" | "SellerAgent" | "TitleInsuranceAgent" | "EscrowAgent" | "SettlementAgent" | "Admin";
5338
5894
  export type UserGroupAccessScopeScopeTypeEnum = "User" | "Branch";
5339
5895
  export type UserLoanRoleEnum = "Borrower" | "CoBorrower" | "NonBorrower" | "LoanOfficer" | "LoanProcessor" | "LoanOfficerAssistant" | "SupportingLoanOfficer" | "BuyerAgent" | "SellerAgent" | "TitleInsuranceAgent" | "EscrowAgent" | "SettlementAgent" | "Admin";
@@ -5385,7 +5941,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
5385
5941
  }
5386
5942
  /**
5387
5943
  * @title The Big POS API
5388
- * @version v2.44.2
5944
+ * @version v2.45.0
5389
5945
  * @termsOfService https://www.thebigpos.com/terms-of-use/
5390
5946
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
5391
5947
  */
@@ -5546,6 +6102,838 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5546
6102
  * @response `422` `ProblemDetails` Unprocessable Content
5547
6103
  */
5548
6104
  updateAccountBilling: (id: string, data: AccountBillingRequest, params?: RequestParams) => Promise<AxiosResponse<AccountBilling, any, {}>>;
6105
+ /**
6106
+ * No description
6107
+ *
6108
+ * @tags AiAccountSettings
6109
+ * @name GetAiAccountSettings
6110
+ * @summary Get account AI settings
6111
+ * @request GET:/api/ai/admin/account-settings
6112
+ * @secure
6113
+ * @response `200` `AiAccountSettings` OK
6114
+ */
6115
+ getAiAccountSettings: (params?: RequestParams) => Promise<AxiosResponse<AiAccountSettings, any, {}>>;
6116
+ /**
6117
+ * No description
6118
+ *
6119
+ * @tags AiAccountSettings
6120
+ * @name UpdateAiAccountSettings
6121
+ * @summary Update account AI settings
6122
+ * @request PUT:/api/ai/admin/account-settings
6123
+ * @secure
6124
+ * @response `200` `AiAccountSettings` OK
6125
+ * @response `400` `ProblemDetails` Bad Request
6126
+ */
6127
+ updateAiAccountSettings: (data: AiAccountSettingsRequest, params?: RequestParams) => Promise<AxiosResponse<AiAccountSettings, any, {}>>;
6128
+ /**
6129
+ * No description
6130
+ *
6131
+ * @tags AiAdmin
6132
+ * @name GetAiAuditLogs
6133
+ * @summary Get paginated audit logs
6134
+ * @request GET:/api/ai/admin/audit-logs
6135
+ * @secure
6136
+ * @response `200` `AiAuditLogPaginated` OK
6137
+ */
6138
+ getAiAuditLogs: (query?: {
6139
+ eventType?: AiAuditEventType;
6140
+ /** @format uuid */
6141
+ requestId?: string;
6142
+ /** @format uuid */
6143
+ userId?: string;
6144
+ /** @format uuid */
6145
+ conversationId?: string;
6146
+ blockedOnly?: boolean;
6147
+ /** @format date-time */
6148
+ startDate?: string;
6149
+ /** @format date-time */
6150
+ endDate?: string;
6151
+ /** @format int32 */
6152
+ pageSize?: number;
6153
+ /** @format int32 */
6154
+ pageNumber?: number;
6155
+ sortBy?: string;
6156
+ sortDirection?: string;
6157
+ }, params?: RequestParams) => Promise<AxiosResponse<AiAuditLogPaginated, any, {}>>;
6158
+ /**
6159
+ * No description
6160
+ *
6161
+ * @tags AiAdmin
6162
+ * @name GetAiRequestLifecycle
6163
+ * @summary Get the full event lifecycle of a single AI request
6164
+ * @request GET:/api/ai/admin/audit-logs/request/{requestId}
6165
+ * @secure
6166
+ * @response `200` `(AiAuditLog)[]` OK
6167
+ */
6168
+ getAiRequestLifecycle: (requestId: string, params?: RequestParams) => Promise<AxiosResponse<AiAuditLog[], any, {}>>;
6169
+ /**
6170
+ * No description
6171
+ *
6172
+ * @tags AiAdmin
6173
+ * @name GetAiAuditConversations
6174
+ * @summary List conversations with their audit roll-up — origin user, turns, status, tokens
6175
+ * @request GET:/api/ai/admin/audit-conversations
6176
+ * @secure
6177
+ * @response `200` `AiConversationAuditSummaryPaginated` OK
6178
+ */
6179
+ getAiAuditConversations: (query?: {
6180
+ searchText?: string;
6181
+ /** @format date-time */
6182
+ startDate?: string;
6183
+ /** @format date-time */
6184
+ endDate?: string;
6185
+ /** @format int32 */
6186
+ pageSize?: number;
6187
+ /** @format int32 */
6188
+ pageNumber?: number;
6189
+ sortBy?: string;
6190
+ sortDirection?: string;
6191
+ }, params?: RequestParams) => Promise<AxiosResponse<AiConversationAuditSummaryPaginated, any, {}>>;
6192
+ /**
6193
+ * No description
6194
+ *
6195
+ * @tags AiAdmin
6196
+ * @name GetAiAdminStats
6197
+ * @summary Get AI admin dashboard stats
6198
+ * @request GET:/api/ai/admin/stats
6199
+ * @secure
6200
+ * @response `200` `AiAdminStats` OK
6201
+ */
6202
+ getAiAdminStats: (query?: {
6203
+ /** @format date-time */
6204
+ startDate?: string;
6205
+ /** @format date-time */
6206
+ endDate?: string;
6207
+ }, params?: RequestParams) => Promise<AxiosResponse<AiAdminStats, any, {}>>;
6208
+ /**
6209
+ * No description
6210
+ *
6211
+ * @tags AiAdmin
6212
+ * @name GetAiConfigChanges
6213
+ * @summary Get the AI configuration change history (who changed prompts, guardrails, fields, sources)
6214
+ * @request GET:/api/ai/admin/config-changes
6215
+ * @secure
6216
+ * @response `200` `AiConfigChangeLogPaginated` OK
6217
+ */
6218
+ getAiConfigChanges: (query?: {
6219
+ entityType?: AiConfigEntityType;
6220
+ /** @format uuid */
6221
+ entityId?: string;
6222
+ /** @format uuid */
6223
+ actorUserId?: string;
6224
+ action?: AiConfigChangeAction;
6225
+ /** @format date-time */
6226
+ startDate?: string;
6227
+ /** @format date-time */
6228
+ endDate?: string;
6229
+ /** @format int32 */
6230
+ pageSize?: number;
6231
+ /** @format int32 */
6232
+ pageNumber?: number;
6233
+ sortBy?: string;
6234
+ sortDirection?: string;
6235
+ }, params?: RequestParams) => Promise<AxiosResponse<AiConfigChangeLogPaginated, any, {}>>;
6236
+ /**
6237
+ * No description
6238
+ *
6239
+ * @tags AiAdminPrompt
6240
+ * @name GetAiPrompts
6241
+ * @summary Get all prompts
6242
+ * @request GET:/api/ai/admin/prompts
6243
+ * @secure
6244
+ * @response `200` `(AiPrompt)[]` OK
6245
+ */
6246
+ getAiPrompts: (params?: RequestParams) => Promise<AxiosResponse<AiPrompt[], any, {}>>;
6247
+ /**
6248
+ * No description
6249
+ *
6250
+ * @tags AiAdminPrompt
6251
+ * @name CreateAiPrompt
6252
+ * @summary Create custom prompt
6253
+ * @request POST:/api/ai/admin/prompts
6254
+ * @secure
6255
+ * @response `201` `AiPrompt` Created
6256
+ * @response `400` `ProblemDetails` Bad Request
6257
+ */
6258
+ createAiPrompt: (data: CreateAiPromptRequest, params?: RequestParams) => Promise<AxiosResponse<AiPrompt, any, {}>>;
6259
+ /**
6260
+ * No description
6261
+ *
6262
+ * @tags AiAdminPrompt
6263
+ * @name GetAiPrompt
6264
+ * @summary Get prompt by ID
6265
+ * @request GET:/api/ai/admin/prompts/{id}
6266
+ * @secure
6267
+ * @response `200` `AiPrompt` OK
6268
+ * @response `404` `ProblemDetails` Not Found
6269
+ */
6270
+ getAiPrompt: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiPrompt, any, {}>>;
6271
+ /**
6272
+ * No description
6273
+ *
6274
+ * @tags AiAdminPrompt
6275
+ * @name UpdateAiPrompt
6276
+ * @summary Update prompt
6277
+ * @request PUT:/api/ai/admin/prompts/{id}
6278
+ * @secure
6279
+ * @response `200` `AiPrompt` OK
6280
+ * @response `400` `ProblemDetails` Bad Request
6281
+ * @response `404` `ProblemDetails` Not Found
6282
+ */
6283
+ updateAiPrompt: (id: string, data: UpdateAiPromptRequest, params?: RequestParams) => Promise<AxiosResponse<AiPrompt, any, {}>>;
6284
+ /**
6285
+ * No description
6286
+ *
6287
+ * @tags AiAdminPrompt
6288
+ * @name DeleteAiPrompt
6289
+ * @summary Delete prompt
6290
+ * @request DELETE:/api/ai/admin/prompts/{id}
6291
+ * @secure
6292
+ * @response `204` `void` No Content
6293
+ * @response `400` `ProblemDetails` Bad Request
6294
+ * @response `404` `ProblemDetails` Not Found
6295
+ */
6296
+ deleteAiPrompt: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6297
+ /**
6298
+ * No description
6299
+ *
6300
+ * @tags AiAdminPrompt
6301
+ * @name ToggleAiPrompt
6302
+ * @summary Toggle prompt active/inactive
6303
+ * @request PATCH:/api/ai/admin/prompts/{id}/toggle
6304
+ * @secure
6305
+ * @response `200` `AiPrompt` OK
6306
+ * @response `404` `ProblemDetails` Not Found
6307
+ */
6308
+ toggleAiPrompt: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiPrompt, any, {}>>;
6309
+ /**
6310
+ * No description
6311
+ *
6312
+ * @tags AiAdminPrompt
6313
+ * @name GenerateAiSystemPrompt
6314
+ * @summary Generate a system prompt from description
6315
+ * @request POST:/api/ai/admin/prompts/generate
6316
+ * @secure
6317
+ * @response `200` `GenerateSystemPrompt` OK
6318
+ * @response `400` `ProblemDetails` Bad Request
6319
+ */
6320
+ generateAiSystemPrompt: (data: GenerateSystemPromptRequest, params?: RequestParams) => Promise<AxiosResponse<GenerateSystemPrompt, any, {}>>;
6321
+ /**
6322
+ * No description
6323
+ *
6324
+ * @tags AiAdminPrompt
6325
+ * @name GetSupportedModels
6326
+ * @summary Get supported LLM models
6327
+ * @request GET:/api/ai/admin/prompts/supported-models
6328
+ * @secure
6329
+ * @response `200` `(SupportedModel)[]` OK
6330
+ */
6331
+ getSupportedModels: (params?: RequestParams) => Promise<AxiosResponse<SupportedModel[], any, {}>>;
6332
+ /**
6333
+ * No description
6334
+ *
6335
+ * @tags AiAdminSettings
6336
+ * @name GetAiAdminSettings
6337
+ * @summary Get global AI settings
6338
+ * @request GET:/api/ai/admin/settings
6339
+ * @secure
6340
+ * @response `200` `AiAdminSettings` OK
6341
+ */
6342
+ getAiAdminSettings: (params?: RequestParams) => Promise<AxiosResponse<AiAdminSettings, any, {}>>;
6343
+ /**
6344
+ * No description
6345
+ *
6346
+ * @tags AiAdminSettings
6347
+ * @name UpdateAiAdminSettings
6348
+ * @summary Update global AI settings
6349
+ * @request PUT:/api/ai/admin/settings
6350
+ * @secure
6351
+ * @response `200` `AiAdminSettings` OK
6352
+ * @response `400` `ProblemDetails` Bad Request
6353
+ */
6354
+ updateAiAdminSettings: (data: AiAdminSettingsRequest, params?: RequestParams) => Promise<AxiosResponse<AiAdminSettings, any, {}>>;
6355
+ /**
6356
+ * No description
6357
+ *
6358
+ * @tags AiCanonicalField
6359
+ * @name GetAiCanonicalFields
6360
+ * @summary Get all canonical fields
6361
+ * @request GET:/api/ai/admin/fields
6362
+ * @secure
6363
+ * @response `200` `(AiCanonicalField)[]` OK
6364
+ */
6365
+ getAiCanonicalFields: (params?: RequestParams) => Promise<AxiosResponse<AiCanonicalField[], any, {}>>;
6366
+ /**
6367
+ * No description
6368
+ *
6369
+ * @tags AiCanonicalField
6370
+ * @name CreateAiCanonicalField
6371
+ * @summary Create canonical field
6372
+ * @request POST:/api/ai/admin/fields
6373
+ * @secure
6374
+ * @response `201` `AiCanonicalField` Created
6375
+ * @response `400` `ProblemDetails` Bad Request
6376
+ */
6377
+ createAiCanonicalField: (data: CreateAiCanonicalFieldRequest, params?: RequestParams) => Promise<AxiosResponse<AiCanonicalField, any, {}>>;
6378
+ /**
6379
+ * No description
6380
+ *
6381
+ * @tags AiCanonicalField
6382
+ * @name GetAiCanonicalField
6383
+ * @summary Get canonical field by ID
6384
+ * @request GET:/api/ai/admin/fields/{id}
6385
+ * @secure
6386
+ * @response `200` `AiCanonicalField` OK
6387
+ * @response `404` `ProblemDetails` Not Found
6388
+ */
6389
+ getAiCanonicalField: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiCanonicalField, any, {}>>;
6390
+ /**
6391
+ * No description
6392
+ *
6393
+ * @tags AiCanonicalField
6394
+ * @name UpdateAiCanonicalField
6395
+ * @summary Update canonical field
6396
+ * @request PUT:/api/ai/admin/fields/{id}
6397
+ * @secure
6398
+ * @response `200` `AiCanonicalField` OK
6399
+ * @response `400` `ProblemDetails` Bad Request
6400
+ * @response `404` `ProblemDetails` Not Found
6401
+ */
6402
+ updateAiCanonicalField: (id: string, data: UpdateAiCanonicalFieldRequest, params?: RequestParams) => Promise<AxiosResponse<AiCanonicalField, any, {}>>;
6403
+ /**
6404
+ * No description
6405
+ *
6406
+ * @tags AiCanonicalField
6407
+ * @name DeleteAiCanonicalField
6408
+ * @summary Delete canonical field
6409
+ * @request DELETE:/api/ai/admin/fields/{id}
6410
+ * @secure
6411
+ * @response `204` `void` No Content
6412
+ * @response `404` `ProblemDetails` Not Found
6413
+ */
6414
+ deleteAiCanonicalField: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6415
+ /**
6416
+ * No description
6417
+ *
6418
+ * @tags AiCanonicalField
6419
+ * @name ToggleAiCanonicalField
6420
+ * @summary Toggle canonical field active/inactive
6421
+ * @request PATCH:/api/ai/admin/fields/{id}/toggle
6422
+ * @secure
6423
+ * @response `200` `AiCanonicalField` OK
6424
+ * @response `404` `ProblemDetails` Not Found
6425
+ */
6426
+ toggleAiCanonicalField: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiCanonicalField, any, {}>>;
6427
+ /**
6428
+ * No description
6429
+ *
6430
+ * @tags AiChat
6431
+ * @name AiChat
6432
+ * @summary Send AI chat message
6433
+ * @request POST:/api/ai/chat
6434
+ * @secure
6435
+ * @response `200` `AiChat` OK
6436
+ * @response `400` `ProblemDetails` Bad Request
6437
+ * @response `401` `ProblemDetails` Unauthorized
6438
+ */
6439
+ aiChat: (data: AiChatRequest, params?: RequestParams) => Promise<AxiosResponse<AiChat, any, {}>>;
6440
+ /**
6441
+ * No description
6442
+ *
6443
+ * @tags AiConversation
6444
+ * @name GetAiConversations
6445
+ * @summary Get user conversations
6446
+ * @request GET:/api/ai/conversations
6447
+ * @secure
6448
+ * @response `200` `AiConversationListItemPaginated` OK
6449
+ */
6450
+ getAiConversations: (query?: {
6451
+ /** @format int32 */
6452
+ pageSize?: number;
6453
+ /** @format int32 */
6454
+ pageNumber?: number;
6455
+ sortBy?: string;
6456
+ sortDirection?: string;
6457
+ }, params?: RequestParams) => Promise<AxiosResponse<AiConversationListItemPaginated, any, {}>>;
6458
+ /**
6459
+ * No description
6460
+ *
6461
+ * @tags AiConversation
6462
+ * @name GetAiConversation
6463
+ * @summary Get conversation metadata
6464
+ * @request GET:/api/ai/conversations/{id}
6465
+ * @secure
6466
+ * @response `200` `AiConversationDetail` OK
6467
+ * @response `403` `ProblemDetails` Forbidden
6468
+ * @response `404` `ProblemDetails` Not Found
6469
+ */
6470
+ getAiConversation: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiConversationDetail, any, {}>>;
6471
+ /**
6472
+ * No description
6473
+ *
6474
+ * @tags AiConversation
6475
+ * @name RenameAiConversation
6476
+ * @summary Rename conversation
6477
+ * @request PATCH:/api/ai/conversations/{id}
6478
+ * @secure
6479
+ * @response `200` `AiConversationDetail` OK
6480
+ * @response `400` `ProblemDetails` Bad Request
6481
+ * @response `403` `ProblemDetails` Forbidden
6482
+ * @response `404` `ProblemDetails` Not Found
6483
+ */
6484
+ renameAiConversation: (id: string, data: JsonPatchDocument, params?: RequestParams) => Promise<AxiosResponse<AiConversationDetail, any, {}>>;
6485
+ /**
6486
+ * No description
6487
+ *
6488
+ * @tags AiConversation
6489
+ * @name DeleteAiConversation
6490
+ * @summary Delete conversation
6491
+ * @request DELETE:/api/ai/conversations/{id}
6492
+ * @secure
6493
+ * @response `204` `void` No Content
6494
+ * @response `403` `ProblemDetails` Forbidden
6495
+ * @response `404` `ProblemDetails` Not Found
6496
+ */
6497
+ deleteAiConversation: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6498
+ /**
6499
+ * No description
6500
+ *
6501
+ * @tags AiConversation
6502
+ * @name GetAiConversationMessages
6503
+ * @summary Get conversation messages
6504
+ * @request GET:/api/ai/conversations/{id}/messages
6505
+ * @secure
6506
+ * @response `200` `AiChatMessagePaginated` OK
6507
+ * @response `403` `ProblemDetails` Forbidden
6508
+ * @response `404` `ProblemDetails` Not Found
6509
+ */
6510
+ getAiConversationMessages: (id: string, query?: {
6511
+ /** @format int32 */
6512
+ pageSize?: number;
6513
+ /** @format int32 */
6514
+ pageNumber?: number;
6515
+ sortBy?: string;
6516
+ sortDirection?: string;
6517
+ }, params?: RequestParams) => Promise<AxiosResponse<AiChatMessagePaginated, any, {}>>;
6518
+ /**
6519
+ * No description
6520
+ *
6521
+ * @tags AiConversation
6522
+ * @name ClearAiConversationHistory
6523
+ * @summary Clear conversation history
6524
+ * @request DELETE:/api/ai/conversations/{id}/messages
6525
+ * @secure
6526
+ * @response `204` `void` No Content
6527
+ * @response `403` `ProblemDetails` Forbidden
6528
+ * @response `404` `ProblemDetails` Not Found
6529
+ */
6530
+ clearAiConversationHistory: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6531
+ /**
6532
+ * No description
6533
+ *
6534
+ * @tags AiConversation
6535
+ * @name PinAiConversation
6536
+ * @summary Pin or unpin conversation
6537
+ * @request PUT:/api/ai/conversations/{id}/pin
6538
+ * @secure
6539
+ * @response `200` `AiConversationDetail` OK
6540
+ * @response `403` `ProblemDetails` Forbidden
6541
+ * @response `404` `ProblemDetails` Not Found
6542
+ */
6543
+ pinAiConversation: (id: string, data: PinAiConversationRequest, params?: RequestParams) => Promise<AxiosResponse<AiConversationDetail, any, {}>>;
6544
+ /**
6545
+ * No description
6546
+ *
6547
+ * @tags AiConversationAdmin
6548
+ * @name GetAiAccountConversations
6549
+ * @summary List AI conversations across the account, optionally filtered by user (admin supervision)
6550
+ * @request GET:/api/ai/admin/conversations
6551
+ * @secure
6552
+ * @response `200` `AiConversationListItemPaginated` OK
6553
+ */
6554
+ getAiAccountConversations: (query?: {
6555
+ /** @format uuid */
6556
+ userId?: string;
6557
+ /** @format int32 */
6558
+ pageSize?: number;
6559
+ /** @format int32 */
6560
+ pageNumber?: number;
6561
+ sortBy?: string;
6562
+ sortDirection?: string;
6563
+ }, params?: RequestParams) => Promise<AxiosResponse<AiConversationListItemPaginated, any, {}>>;
6564
+ /**
6565
+ * No description
6566
+ *
6567
+ * @tags AiConversationAdmin
6568
+ * @name GetAiAccountConversation
6569
+ * @summary Get an account conversation's detail (admin supervision)
6570
+ * @request GET:/api/ai/admin/conversations/{id}
6571
+ * @secure
6572
+ * @response `200` `AiConversationDetail` OK
6573
+ * @response `404` `ProblemDetails` Not Found
6574
+ */
6575
+ getAiAccountConversation: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiConversationDetail, any, {}>>;
6576
+ /**
6577
+ * No description
6578
+ *
6579
+ * @tags AiConversationAdmin
6580
+ * @name GetAiAccountConversationMessages
6581
+ * @summary Get an account conversation's messages (admin supervision)
6582
+ * @request GET:/api/ai/admin/conversations/{id}/messages
6583
+ * @secure
6584
+ * @response `200` `AiChatMessagePaginated` OK
6585
+ * @response `404` `ProblemDetails` Not Found
6586
+ */
6587
+ getAiAccountConversationMessages: (id: string, query?: {
6588
+ /** @format int32 */
6589
+ pageSize?: number;
6590
+ /** @format int32 */
6591
+ pageNumber?: number;
6592
+ sortBy?: string;
6593
+ sortDirection?: string;
6594
+ }, params?: RequestParams) => Promise<AxiosResponse<AiChatMessagePaginated, any, {}>>;
6595
+ /**
6596
+ * No description
6597
+ *
6598
+ * @tags AiGuardrail
6599
+ * @name GetAiGuardrails
6600
+ * @summary Get all guardrails
6601
+ * @request GET:/api/ai/admin/guardrails
6602
+ * @secure
6603
+ * @response `200` `(AiGuardrail)[]` OK
6604
+ */
6605
+ getAiGuardrails: (params?: RequestParams) => Promise<AxiosResponse<AiGuardrail[], any, {}>>;
6606
+ /**
6607
+ * No description
6608
+ *
6609
+ * @tags AiGuardrail
6610
+ * @name CreateAiGuardrail
6611
+ * @summary Create custom guardrail
6612
+ * @request POST:/api/ai/admin/guardrails
6613
+ * @secure
6614
+ * @response `201` `AiGuardrail` Created
6615
+ * @response `400` `ProblemDetails` Bad Request
6616
+ */
6617
+ createAiGuardrail: (data: CreateAiGuardrailRequest, params?: RequestParams) => Promise<AxiosResponse<AiGuardrail, any, {}>>;
6618
+ /**
6619
+ * No description
6620
+ *
6621
+ * @tags AiGuardrail
6622
+ * @name GetAiGuardrail
6623
+ * @summary Get guardrail by ID
6624
+ * @request GET:/api/ai/admin/guardrails/{id}
6625
+ * @secure
6626
+ * @response `200` `AiGuardrail` OK
6627
+ * @response `404` `ProblemDetails` Not Found
6628
+ */
6629
+ getAiGuardrail: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiGuardrail, any, {}>>;
6630
+ /**
6631
+ * No description
6632
+ *
6633
+ * @tags AiGuardrail
6634
+ * @name UpdateAiGuardrail
6635
+ * @summary Update guardrail
6636
+ * @request PUT:/api/ai/admin/guardrails/{id}
6637
+ * @secure
6638
+ * @response `200` `AiGuardrail` OK
6639
+ * @response `400` `ProblemDetails` Bad Request
6640
+ * @response `404` `ProblemDetails` Not Found
6641
+ */
6642
+ updateAiGuardrail: (id: string, data: UpdateAiGuardrailRequest, params?: RequestParams) => Promise<AxiosResponse<AiGuardrail, any, {}>>;
6643
+ /**
6644
+ * No description
6645
+ *
6646
+ * @tags AiGuardrail
6647
+ * @name DeleteAiGuardrail
6648
+ * @summary Delete guardrail
6649
+ * @request DELETE:/api/ai/admin/guardrails/{id}
6650
+ * @secure
6651
+ * @response `204` `void` No Content
6652
+ * @response `400` `ProblemDetails` Bad Request
6653
+ * @response `404` `ProblemDetails` Not Found
6654
+ */
6655
+ deleteAiGuardrail: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6656
+ /**
6657
+ * No description
6658
+ *
6659
+ * @tags AiGuardrail
6660
+ * @name ToggleAiGuardrail
6661
+ * @summary Toggle guardrail enabled/disabled
6662
+ * @request PATCH:/api/ai/admin/guardrails/{id}/toggle
6663
+ * @secure
6664
+ * @response `200` `AiGuardrail` OK
6665
+ * @response `404` `ProblemDetails` Not Found
6666
+ */
6667
+ toggleAiGuardrail: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiGuardrail, any, {}>>;
6668
+ /**
6669
+ * No description
6670
+ *
6671
+ * @tags AiPrompt
6672
+ * @name GetAvailablePrompts
6673
+ * @summary Get available prompts for current user
6674
+ * @request GET:/api/ai/prompts
6675
+ * @secure
6676
+ * @response `200` `(AiPromptSummary)[]` OK
6677
+ */
6678
+ getAvailablePrompts: (query?: {
6679
+ documentType?: string;
6680
+ }, params?: RequestParams) => Promise<AxiosResponse<AiPromptSummary[], any, {}>>;
6681
+ /**
6682
+ * No description
6683
+ *
6684
+ * @tags AiSuperAdmin
6685
+ * @name GetAiAuditLogsCrossAccount
6686
+ * @summary Get AI audit logs for a specific account or across all accounts
6687
+ * @request GET:/api/ai/superadmin/audit-logs
6688
+ * @secure
6689
+ * @response `200` `AiAuditLogPaginated` OK
6690
+ */
6691
+ getAiAuditLogsCrossAccount: (query?: {
6692
+ /** @format uuid */
6693
+ accountId?: string;
6694
+ eventType?: AiAuditEventType;
6695
+ /** @format uuid */
6696
+ requestId?: string;
6697
+ /** @format uuid */
6698
+ userId?: string;
6699
+ /** @format uuid */
6700
+ conversationId?: string;
6701
+ blockedOnly?: boolean;
6702
+ /** @format date-time */
6703
+ startDate?: string;
6704
+ /** @format date-time */
6705
+ endDate?: string;
6706
+ /** @format int32 */
6707
+ pageSize?: number;
6708
+ /** @format int32 */
6709
+ pageNumber?: number;
6710
+ sortBy?: string;
6711
+ sortDirection?: string;
6712
+ }, params?: RequestParams) => Promise<AxiosResponse<AiAuditLogPaginated, any, {}>>;
6713
+ /**
6714
+ * No description
6715
+ *
6716
+ * @tags AiSuperAdmin
6717
+ * @name GetAiRequestLifecycleCrossAccount
6718
+ * @summary Get the full event lifecycle of a single AI request from any account
6719
+ * @request GET:/api/ai/superadmin/audit-logs/request/{requestId}
6720
+ * @secure
6721
+ * @response `200` `(AiAuditLog)[]` OK
6722
+ */
6723
+ getAiRequestLifecycleCrossAccount: (requestId: string, query?: {
6724
+ /** @format uuid */
6725
+ accountId?: string;
6726
+ }, params?: RequestParams) => Promise<AxiosResponse<AiAuditLog[], any, {}>>;
6727
+ /**
6728
+ * No description
6729
+ *
6730
+ * @tags AiSuperAdmin
6731
+ * @name GetAiStatsCrossAccount
6732
+ * @summary Get AI stats for a specific account or platform-wide
6733
+ * @request GET:/api/ai/superadmin/stats
6734
+ * @secure
6735
+ * @response `200` `AiAdminStats` OK
6736
+ */
6737
+ getAiStatsCrossAccount: (query?: {
6738
+ /** @format uuid */
6739
+ accountId?: string;
6740
+ /** @format date-time */
6741
+ startDate?: string;
6742
+ /** @format date-time */
6743
+ endDate?: string;
6744
+ }, params?: RequestParams) => Promise<AxiosResponse<AiAdminStats, any, {}>>;
6745
+ /**
6746
+ * No description
6747
+ *
6748
+ * @tags AiSuperAdmin
6749
+ * @name GetAiConfigChangesCrossAccount
6750
+ * @summary Get AI configuration change history for a specific account or across all accounts (incl. global defaults)
6751
+ * @request GET:/api/ai/superadmin/config-changes
6752
+ * @secure
6753
+ * @response `200` `AiConfigChangeLogPaginated` OK
6754
+ */
6755
+ getAiConfigChangesCrossAccount: (query?: {
6756
+ /** @format uuid */
6757
+ accountId?: string;
6758
+ entityType?: AiConfigEntityType;
6759
+ /** @format uuid */
6760
+ entityId?: string;
6761
+ /** @format uuid */
6762
+ actorUserId?: string;
6763
+ action?: AiConfigChangeAction;
6764
+ /** @format date-time */
6765
+ startDate?: string;
6766
+ /** @format date-time */
6767
+ endDate?: string;
6768
+ /** @format int32 */
6769
+ pageSize?: number;
6770
+ /** @format int32 */
6771
+ pageNumber?: number;
6772
+ sortBy?: string;
6773
+ sortDirection?: string;
6774
+ }, params?: RequestParams) => Promise<AxiosResponse<AiConfigChangeLogPaginated, any, {}>>;
6775
+ /**
6776
+ * No description
6777
+ *
6778
+ * @tags AiTokenUsageAdmin
6779
+ * @name SearchAiAccountTokenUsage
6780
+ * @summary Search accounts by current-month AI token usage and classification
6781
+ * @request POST:/api/ai/admin/token-usage/search
6782
+ * @secure
6783
+ * @response `200` `AiAccountUsageOverviewPaginated` OK
6784
+ */
6785
+ searchAiAccountTokenUsage: (data: SearchCriteria, query?: {
6786
+ /** @format int32 */
6787
+ pageSize?: number;
6788
+ /** @format int32 */
6789
+ pageNumber?: number;
6790
+ sortBy?: string;
6791
+ sortDirection?: string;
6792
+ }, params?: RequestParams) => Promise<AxiosResponse<AiAccountUsageOverviewPaginated, any, {}>>;
6793
+ /**
6794
+ * No description
6795
+ *
6796
+ * @tags AiTokenUsageAdmin
6797
+ * @name GetAiAccountTokenUsage
6798
+ * @summary Get an account's current-month AI token usage
6799
+ * @request GET:/api/ai/admin/token-usage/{accountId}
6800
+ * @secure
6801
+ * @response `200` `AiTokenBudgetStatus` OK
6802
+ */
6803
+ getAiAccountTokenUsage: (accountId: string, params?: RequestParams) => Promise<AxiosResponse<AiTokenBudgetStatus, any, {}>>;
6804
+ /**
6805
+ * No description
6806
+ *
6807
+ * @tags AiTokenUsageAdmin
6808
+ * @name GetAiAccountTokenUsageHistory
6809
+ * @summary Get an account's monthly AI token usage history
6810
+ * @request GET:/api/ai/admin/token-usage/{accountId}/history
6811
+ * @secure
6812
+ * @response `200` `AiTokenUsageWindowPaginated` OK
6813
+ */
6814
+ getAiAccountTokenUsageHistory: (accountId: string, query?: {
6815
+ /** @format int32 */
6816
+ pageSize?: number;
6817
+ /** @format int32 */
6818
+ pageNumber?: number;
6819
+ sortBy?: string;
6820
+ sortDirection?: string;
6821
+ }, params?: RequestParams) => Promise<AxiosResponse<AiTokenUsageWindowPaginated, any, {}>>;
6822
+ /**
6823
+ * No description
6824
+ *
6825
+ * @tags AiTokenUsageAdmin
6826
+ * @name SetAiAccountTokenLimit
6827
+ * @summary Set or raise an account's monthly AI token limit
6828
+ * @request PUT:/api/ai/admin/token-usage/{accountId}/limit
6829
+ * @secure
6830
+ * @response `200` `AiTokenBudgetStatus` OK
6831
+ * @response `400` `ProblemDetails` Bad Request
6832
+ */
6833
+ setAiAccountTokenLimit: (accountId: string, data: UpdateAiAccountTokenLimitRequest, params?: RequestParams) => Promise<AxiosResponse<AiTokenBudgetStatus, any, {}>>;
6834
+ /**
6835
+ * No description
6836
+ *
6837
+ * @tags AiUrlSource
6838
+ * @name GetAiUrlSources
6839
+ * @summary Get all URL sources
6840
+ * @request GET:/api/ai/admin/url-sources
6841
+ * @secure
6842
+ * @response `200` `(AiUrlSource)[]` OK
6843
+ */
6844
+ getAiUrlSources: (params?: RequestParams) => Promise<AxiosResponse<AiUrlSource[], any, {}>>;
6845
+ /**
6846
+ * No description
6847
+ *
6848
+ * @tags AiUrlSource
6849
+ * @name CreateAiUrlSource
6850
+ * @summary Create URL source
6851
+ * @request POST:/api/ai/admin/url-sources
6852
+ * @secure
6853
+ * @response `201` `AiUrlSource` Created
6854
+ * @response `400` `ProblemDetails` Bad Request
6855
+ * @response `409` `ProblemDetails` Conflict
6856
+ */
6857
+ createAiUrlSource: (data: CreateAiUrlSourceRequest, params?: RequestParams) => Promise<AxiosResponse<AiUrlSource, any, {}>>;
6858
+ /**
6859
+ * No description
6860
+ *
6861
+ * @tags AiUrlSource
6862
+ * @name GetAiUrlSource
6863
+ * @summary Get URL source by ID
6864
+ * @request GET:/api/ai/admin/url-sources/{id}
6865
+ * @secure
6866
+ * @response `200` `AiUrlSource` OK
6867
+ * @response `404` `ProblemDetails` Not Found
6868
+ */
6869
+ getAiUrlSource: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiUrlSource, any, {}>>;
6870
+ /**
6871
+ * No description
6872
+ *
6873
+ * @tags AiUrlSource
6874
+ * @name UpdateAiUrlSource
6875
+ * @summary Update URL source
6876
+ * @request PUT:/api/ai/admin/url-sources/{id}
6877
+ * @secure
6878
+ * @response `200` `AiUrlSource` OK
6879
+ * @response `400` `ProblemDetails` Bad Request
6880
+ * @response `404` `ProblemDetails` Not Found
6881
+ * @response `409` `ProblemDetails` Conflict
6882
+ */
6883
+ updateAiUrlSource: (id: string, data: UpdateAiUrlSourceRequest, params?: RequestParams) => Promise<AxiosResponse<AiUrlSource, any, {}>>;
6884
+ /**
6885
+ * No description
6886
+ *
6887
+ * @tags AiUrlSource
6888
+ * @name DeleteAiUrlSource
6889
+ * @summary Delete URL source
6890
+ * @request DELETE:/api/ai/admin/url-sources/{id}
6891
+ * @secure
6892
+ * @response `204` `void` No Content
6893
+ * @response `404` `ProblemDetails` Not Found
6894
+ */
6895
+ deleteAiUrlSource: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6896
+ /**
6897
+ * No description
6898
+ *
6899
+ * @tags AiUrlSource
6900
+ * @name ToggleAiUrlSource
6901
+ * @summary Toggle URL source active/inactive
6902
+ * @request PATCH:/api/ai/admin/url-sources/{id}/toggle
6903
+ * @secure
6904
+ * @response `200` `AiUrlSource` OK
6905
+ * @response `404` `ProblemDetails` Not Found
6906
+ */
6907
+ toggleAiUrlSource: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiUrlSource, any, {}>>;
6908
+ /**
6909
+ * No description
6910
+ *
6911
+ * @tags AiUsage
6912
+ * @name GetAiUsage
6913
+ * @summary Get the current account's AI token usage for the active monthly window
6914
+ * @request GET:/api/ai/usage
6915
+ * @secure
6916
+ * @response `200` `AiTokenBudgetStatus` OK
6917
+ */
6918
+ getAiUsage: (params?: RequestParams) => Promise<AxiosResponse<AiTokenBudgetStatus, any, {}>>;
6919
+ /**
6920
+ * No description
6921
+ *
6922
+ * @tags AiUsage
6923
+ * @name GetAiUsageHistory
6924
+ * @summary Get the current account's monthly AI token usage history
6925
+ * @request GET:/api/ai/usage/history
6926
+ * @secure
6927
+ * @response `200` `AiTokenUsageWindowPaginated` OK
6928
+ */
6929
+ getAiUsageHistory: (query?: {
6930
+ /** @format int32 */
6931
+ pageSize?: number;
6932
+ /** @format int32 */
6933
+ pageNumber?: number;
6934
+ sortBy?: string;
6935
+ sortDirection?: string;
6936
+ }, params?: RequestParams) => Promise<AxiosResponse<AiTokenUsageWindowPaginated, any, {}>>;
5549
6937
  /**
5550
6938
  * No description
5551
6939
  *
@@ -7650,6 +9038,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7650
9038
  * @response `404` `ProblemDetails` Not Found
7651
9039
  */
7652
9040
  syncLoanDocumentsFromLos: (loanId: string, params?: RequestParams) => Promise<AxiosResponse<DocumentSync, any, {}>>;
9041
+ /**
9042
+ * No description
9043
+ *
9044
+ * @tags LoanDocuments
9045
+ * @name ClassifyLoanDocumentManually
9046
+ * @summary Manually classify a loan document
9047
+ * @request POST:/api/loans/{loanId}/documents/{documentId}/classify-manual
9048
+ * @secure
9049
+ * @response `200` `LoanDocument` OK
9050
+ * @response `404` `ProblemDetails` Not Found
9051
+ * @response `422` `UnprocessableEntity` Unprocessable Content
9052
+ */
9053
+ classifyLoanDocumentManually: (loanId: string, documentId: string, data: ManualDocumentClassificationRequest, params?: RequestParams) => Promise<AxiosResponse<LoanDocument, any, {}>>;
7653
9054
  /**
7654
9055
  * @description Re-attempts to push a failed document to LOS
7655
9056
  *
@@ -7885,6 +9286,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7885
9286
  * @response `404` `ProblemDetails` Not Found
7886
9287
  */
7887
9288
  sendLoanOptInReminder: (loanId: string, data: SendLoanOptInReminderRequest, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
9289
+ /**
9290
+ * No description
9291
+ *
9292
+ * @tags LoanNotification
9293
+ * @name SendESignatureReminder
9294
+ * @summary Send eSignature Reminder
9295
+ * @request POST:/api/loans/{loanID}/notifications/esignature-reminders
9296
+ * @secure
9297
+ * @response `204` `void` No Content
9298
+ * @response `400` `ProblemDetails` Bad Request
9299
+ * @response `404` `ProblemDetails` Not Found
9300
+ */
9301
+ sendESignatureReminder: (loanId: string, data: SendESignatureReminderRequest, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
7888
9302
  /**
7889
9303
  * No description
7890
9304
  *