@matech/thebigpos-sdk 2.44.4-rc0 → 2.45.1-rc0

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/src/index.ts CHANGED
@@ -211,7 +211,8 @@ export type LoanLogType =
211
211
  | "SensitiveDataPurge"
212
212
  | "ClosingDateUpdated"
213
213
  | "ConsumerConnectAssociation"
214
- | "TaskReminderSent";
214
+ | "TaskReminderSent"
215
+ | "DocumentClassified";
215
216
 
216
217
  export type LoanLienPosition = "First" | "Subordinate";
217
218
 
@@ -268,6 +269,66 @@ export type LoanGiftAssetType = "Cash" | "Asset" | "Equity";
268
269
 
269
270
  export type LoanGenderType = "Male" | "Female";
270
271
 
272
+ export type LoanDocumentType =
273
+ | "W2"
274
+ | "Paystub"
275
+ | "Form1099"
276
+ | "Form1099Int"
277
+ | "Form1099Misc"
278
+ | "Form1099Nec"
279
+ | "Form1099R"
280
+ | "Form1099G"
281
+ | "Form1099Div"
282
+ | "Form1099Ssa"
283
+ | "FederalTaxReturn1040"
284
+ | "TaxReturnScheduleC"
285
+ | "TaxReturnScheduleD"
286
+ | "TaxReturnScheduleE"
287
+ | "Form1065"
288
+ | "Form1120"
289
+ | "Form1120S"
290
+ | "ProfitAndLossStatement"
291
+ | "VerificationOfEmployment"
292
+ | "BankStatement"
293
+ | "InvestmentStatement"
294
+ | "CreditCardStatement"
295
+ | "MortgageStatement"
296
+ | "PayoffStatement"
297
+ | "HoaDocuments"
298
+ | "UtilityBill"
299
+ | "IdentityDocument"
300
+ | "DemographicAddendum"
301
+ | "Ssa89"
302
+ | "Vba260551"
303
+ | "Hud92900B"
304
+ | "Check"
305
+ | "Invoice"
306
+ | "Receipt"
307
+ | "LoanApplication1003"
308
+ | "UnderwritingTransmittal1008"
309
+ | "Other"
310
+ | "SalesContract"
311
+ | "TitleCommitment"
312
+ | "DriversLicense"
313
+ | "VerificationOfIncome"
314
+ | "VerificationOfAssets"
315
+ | "FloodCertificate"
316
+ | "FraudReport"
317
+ | "AddendumToSalesContract"
318
+ | "GiftLetter"
319
+ | "CpaLetter"
320
+ | "TaxBill"
321
+ | "CondoQuestionnaire"
322
+ | "CondoBudget"
323
+ | "CondoBylaws"
324
+ | "RentalAgreements"
325
+ | "Lease"
326
+ | "HazardInsurance"
327
+ | "VaCertificateOfEligibility"
328
+ | "Appraisal"
329
+ | "CreditReport"
330
+ | "CondoMasterPolicy";
331
+
271
332
  export type LoanDocumentFolderPermissionLevel =
272
333
  | "None"
273
334
  | "Read"
@@ -381,6 +442,8 @@ export type ConsentSource = "TheBigPOS" | "ConsumerConnect";
381
442
 
382
443
  export type ConsentLosSyncStatus = "NotStarted" | "Failed" | "Success";
383
444
 
445
+ export type ClassificationSource = "Textract" | "Llm" | "Manual";
446
+
384
447
  export type BranchType = "Mortgage" | "RealEstate";
385
448
 
386
449
  export type BorrowerType = "Borrower" | "CoBorrower" | "Unknown";
@@ -400,6 +463,131 @@ export type AuditChangeType =
400
463
  | "Deactivated"
401
464
  | "Reactivated";
402
465
 
466
+ export type AiUrlSourceScope = "FullDomain" | "SpecificPath";
467
+
468
+ export type AiUrlSourceCategory =
469
+ | "Regulatory"
470
+ | "Guidelines"
471
+ | "MarketData"
472
+ | "Custom";
473
+
474
+ export type AiStructuredDataType =
475
+ | "Table"
476
+ | "DocumentAnalysis"
477
+ | "DocumentList"
478
+ | "GeneratedDocument";
479
+
480
+ export type AiQueryTemplateName =
481
+ | "PipelineSummary"
482
+ | "LoanDetail"
483
+ | "LoansClosing"
484
+ | "StaleLoans"
485
+ | "LoansByType"
486
+ | "LoansByOfficer"
487
+ | "AverageLoanAmount"
488
+ | "LockedVsUnlocked"
489
+ | "LoansByPurpose"
490
+ | "LoansByPropertyState"
491
+ | "LoansByRate"
492
+ | "DtiLtvRisk"
493
+ | "DisclosureTracking"
494
+ | "NewLoans"
495
+ | "ExpiringLocks"
496
+ | "ClosedLoans"
497
+ | "VerificationGaps"
498
+ | "CreditScoreDistribution"
499
+ | "OccupancyMix"
500
+ | "PropertyTypeMix"
501
+ | "FirstTimeHomebuyer"
502
+ | "SelfEmployed"
503
+ | "ReferralSourcePerformance"
504
+ | "AmortizationMix"
505
+ | "TimeToClose"
506
+ | "ConversionFunnel"
507
+ | "MonthlyProduction"
508
+ | "PaymentAffordability"
509
+ | "DownPaymentCashToClose"
510
+ | "ApprovalExpirations"
511
+ | "ApplicationCompleteness"
512
+ | "LosSyncHealth"
513
+ | "DeclarationsRisk"
514
+ | "MilitaryEligibility"
515
+ | "OutstandingTasks"
516
+ | "ConsentTracking";
517
+
518
+ export type AiPromptCategory =
519
+ | "DocumentAnalysis"
520
+ | "DataQuery"
521
+ | "General"
522
+ | "Action";
523
+
524
+ export type AiOutputType = "Text" | "Document";
525
+
526
+ export type AiIntent =
527
+ | "Greeting"
528
+ | "Invalid"
529
+ | "Relevant"
530
+ | "LoanSpecific"
531
+ | "DocumentList"
532
+ | "GeneralKnowledge"
533
+ | "Blocked"
534
+ | "Action"
535
+ | "ConversationMeta"
536
+ | "Capabilities"
537
+ | "UsageReport";
538
+
539
+ export type AiGuardrailCategory =
540
+ | "ContentSafety"
541
+ | "PromptInjection"
542
+ | "Privacy"
543
+ | "Legal";
544
+
545
+ export type AiDisplayHint =
546
+ | "Table"
547
+ | "SummaryCards"
548
+ | "RankedList"
549
+ | "Comparison"
550
+ | "ExecutiveBrief";
551
+
552
+ export type AiConfigEntityType =
553
+ | "Prompt"
554
+ | "Guardrail"
555
+ | "CanonicalField"
556
+ | "UrlSource"
557
+ | "AdminSettings"
558
+ | "AccountTokenSettings"
559
+ | "AccountSettings";
560
+
561
+ export type AiConfigChangeAction =
562
+ | "Created"
563
+ | "Updated"
564
+ | "Deleted"
565
+ | "Toggled";
566
+
567
+ export type AiAuditEventType =
568
+ | "Error"
569
+ | "GuardrailBlockedPre"
570
+ | "GuardrailPassedPre"
571
+ | "IntentClassified"
572
+ | "LoanResolvedFromMessage"
573
+ | "DocumentNotFound"
574
+ | "GuardrailBlockedPost"
575
+ | "GuardrailPassedPost"
576
+ | "DocumentAnalyzed"
577
+ | "DocumentList"
578
+ | "DocumentResolutionAmbiguous"
579
+ | "ResponseGenerated"
580
+ | "ParametersExtracted"
581
+ | "QueryExecuted"
582
+ | "LoanContextNotFound"
583
+ | "LoanContextLoaded"
584
+ | "GuardrailBlockedBedrock"
585
+ | "PromptMatched"
586
+ | "QueryCondensed"
587
+ | "IntentParseFailed"
588
+ | "LoanSearchTermDiscarded"
589
+ | "CanonicalFieldsSelected";
590
+
403
591
  export type AddressFamily =
404
592
  | "Unspecified"
405
593
  | "Unix"
@@ -520,12 +708,14 @@ export interface AccountSettings {
520
708
  smsNumber?: string | null;
521
709
  ssoHostOverride?: string | null;
522
710
  isEarlyAdopter: boolean;
711
+ isAIEnabled: boolean;
523
712
  }
524
713
 
525
714
  export interface AccountSettingsRequest {
526
715
  isSmsEnabled: boolean;
527
716
  smsNumber?: string | null;
528
717
  isEarlyAdopter: boolean;
718
+ isAIEnabled: boolean;
529
719
  }
530
720
 
531
721
  export interface Action {
@@ -679,6 +869,435 @@ export interface AffordabilityCalculatorRequest {
679
869
  annualInsurance: number;
680
870
  }
681
871
 
872
+ export interface AiAccountSettings {
873
+ bedrockModelId: string;
874
+ isUsingAppDefault: boolean;
875
+ }
876
+
877
+ export interface AiAccountSettingsRequest {
878
+ bedrockModelId?: string | null;
879
+ }
880
+
881
+ export interface AiAccountUsageOverview {
882
+ /** @format uuid */
883
+ accountId: string;
884
+ accountName: string;
885
+ /** @format int32 */
886
+ limit: number;
887
+ /** @format int64 */
888
+ used: number;
889
+ /** @format int64 */
890
+ remaining: number;
891
+ /** @format double */
892
+ percentUsed: number;
893
+ limitReached: boolean;
894
+ /** @format date-time */
895
+ windowStart: string;
896
+ /** @format date-time */
897
+ windowEnd: string;
898
+ }
899
+
900
+ export interface AiAccountUsageOverviewPaginated {
901
+ rows: AiAccountUsageOverview[];
902
+ pagination: Pagination;
903
+ /** @format int64 */
904
+ count: number;
905
+ }
906
+
907
+ export interface AiAdminSettings {
908
+ bedrockModelId: string;
909
+ /** @format int32 */
910
+ maxTokens: number;
911
+ /** @format double */
912
+ temperature: number;
913
+ /** @format int32 */
914
+ conversationContextTurns: number;
915
+ /** @format int32 */
916
+ requestTimeoutSeconds: number;
917
+ /** @format int32 */
918
+ defaultTokenLimit: number;
919
+ bedrockRegion: string;
920
+ }
921
+
922
+ export interface AiAdminSettingsRequest {
923
+ bedrockModelId?: string | null;
924
+ /** @format int32 */
925
+ maxTokens?: number | null;
926
+ /** @format double */
927
+ temperature?: number | null;
928
+ /** @format int32 */
929
+ conversationContextTurns?: number | null;
930
+ /** @format int32 */
931
+ requestTimeoutSeconds?: number | null;
932
+ /** @format int32 */
933
+ defaultTokenLimit?: number | null;
934
+ }
935
+
936
+ export interface AiAdminStats {
937
+ /** @format int32 */
938
+ totalRequests: number;
939
+ /** @format int32 */
940
+ blockedRequests: number;
941
+ /** @format double */
942
+ averageResponseTimeMs: number;
943
+ /** @format int32 */
944
+ totalInputTokens: number;
945
+ /** @format int32 */
946
+ totalOutputTokens: number;
947
+ /** @format int32 */
948
+ totalTokens: number;
949
+ intentDistribution: Record<string, number>;
950
+ topQueryTemplates: Record<string, number>;
951
+ period: string;
952
+ }
953
+
954
+ export interface AiAuditLog {
955
+ /** @format uuid */
956
+ id: string;
957
+ /** @format uuid */
958
+ requestId: string;
959
+ /** @format uuid */
960
+ userId: string;
961
+ /** @format uuid */
962
+ conversationId?: string | null;
963
+ /** @format uuid */
964
+ messageId?: string | null;
965
+ eventType: AiAuditLogEventTypeEnum;
966
+ modelId?: string | null;
967
+ /** @format int32 */
968
+ inputTokens?: number | null;
969
+ /** @format int32 */
970
+ outputTokens?: number | null;
971
+ /** @format int32 */
972
+ latencyMs?: number | null;
973
+ bedrockRequestId?: string | null;
974
+ guardrailName?: string | null;
975
+ guardrailCategory?: string | null;
976
+ rawRequest?: string | null;
977
+ rawResponse?: string | null;
978
+ details?: any | null;
979
+ /** @format date-time */
980
+ createdAt: string;
981
+ }
982
+
983
+ export interface AiAuditLogPaginated {
984
+ rows: AiAuditLog[];
985
+ pagination: Pagination;
986
+ /** @format int64 */
987
+ count: number;
988
+ }
989
+
990
+ export interface AiCanonicalField {
991
+ /** @format uuid */
992
+ id: string;
993
+ canonicalName: string;
994
+ displayName: string;
995
+ description: string;
996
+ allowedRoles: string[];
997
+ efPath?: string | null;
998
+ isPii: boolean;
999
+ isActive: boolean;
1000
+ dataSource: string;
1001
+ isDefault: boolean;
1002
+ category?: string | null;
1003
+ jsonPropertyName?: string | null;
1004
+ textractKey?: string | null;
1005
+ textractKeyAliases: string[];
1006
+ hasAccountOverride: boolean;
1007
+ /** @format date-time */
1008
+ createdAt: string;
1009
+ /** @format date-time */
1010
+ updatedAt?: string | null;
1011
+ }
1012
+
1013
+ export interface AiChat {
1014
+ /** @format uuid */
1015
+ conversationId: string;
1016
+ /** @format uuid */
1017
+ messageId: string;
1018
+ response: AiChatBody;
1019
+ metadata: AiChatMetadata;
1020
+ }
1021
+
1022
+ export interface AiChatBody {
1023
+ text: string;
1024
+ data?: AiChatStructuredData | null;
1025
+ }
1026
+
1027
+ export interface AiChatMessage {
1028
+ /** @format uuid */
1029
+ id: string;
1030
+ userMessage: string;
1031
+ assistantResponse: string;
1032
+ intent?: AiIntent | null;
1033
+ fieldsAccessed?: string[] | null;
1034
+ data?: AiChatStructuredData | null;
1035
+ /** @format date-time */
1036
+ createdAt: string;
1037
+ }
1038
+
1039
+ export interface AiChatMessagePaginated {
1040
+ rows: AiChatMessage[];
1041
+ pagination: Pagination;
1042
+ /** @format int64 */
1043
+ count: number;
1044
+ }
1045
+
1046
+ export interface AiChatMetadata {
1047
+ intent: AiChatMetadataIntentEnum;
1048
+ fieldsAccessed: string[];
1049
+ /** @format int64 */
1050
+ queryTimeMs: number;
1051
+ /** @format int64 */
1052
+ llmTimeMs: number;
1053
+ /** @format int32 */
1054
+ inputTokens: number;
1055
+ /** @format int32 */
1056
+ outputTokens: number;
1057
+ modelId?: string | null;
1058
+ wasBlocked: boolean;
1059
+ blockedReason?: string | null;
1060
+ tokenBudget?: AiTokenBudgetStatus | null;
1061
+ }
1062
+
1063
+ export interface AiChatRequest {
1064
+ message: string;
1065
+ /** @format uuid */
1066
+ conversationId?: string | null;
1067
+ /** @format uuid */
1068
+ loanId?: string | null;
1069
+ documentIds?: string[] | null;
1070
+ /** @format uuid */
1071
+ promptId?: string | null;
1072
+ }
1073
+
1074
+ export interface AiChatStructuredData {
1075
+ type: AiChatStructuredDataTypeEnum;
1076
+ displayHint?: AiDisplayHint | null;
1077
+ detectedDocumentType?: string | null;
1078
+ columns: string[];
1079
+ rows: string[][];
1080
+ /** @format uuid */
1081
+ generatedDocumentId?: string | null;
1082
+ generatedFileName?: string | null;
1083
+ }
1084
+
1085
+ export interface AiConfigChangeLog {
1086
+ /** @format uuid */
1087
+ id: string;
1088
+ /** @format uuid */
1089
+ accountId?: string | null;
1090
+ /** @format uuid */
1091
+ actorUserId: string;
1092
+ entityType: AiConfigChangeLogEntityTypeEnum;
1093
+ /** @format uuid */
1094
+ entityId?: string | null;
1095
+ action: AiConfigChangeLogActionEnum;
1096
+ before?: any | null;
1097
+ after?: any | null;
1098
+ /** @format date-time */
1099
+ createdAt: string;
1100
+ }
1101
+
1102
+ export interface AiConfigChangeLogPaginated {
1103
+ rows: AiConfigChangeLog[];
1104
+ pagination: Pagination;
1105
+ /** @format int64 */
1106
+ count: number;
1107
+ }
1108
+
1109
+ export interface AiConversationAuditSummary {
1110
+ /** @format uuid */
1111
+ conversationId: string;
1112
+ /** @format uuid */
1113
+ userId: string;
1114
+ userName?: string | null;
1115
+ userRole?: string | null;
1116
+ name?: string | null;
1117
+ /** @format int32 */
1118
+ turnCount: number;
1119
+ /** @format int32 */
1120
+ completedCount: number;
1121
+ /** @format int32 */
1122
+ blockedCount: number;
1123
+ /** @format int32 */
1124
+ errorCount: number;
1125
+ /** @format int32 */
1126
+ totalTokens: number;
1127
+ /** @format date-time */
1128
+ lastActivityAt: string;
1129
+ }
1130
+
1131
+ export interface AiConversationAuditSummaryPaginated {
1132
+ rows: AiConversationAuditSummary[];
1133
+ pagination: Pagination;
1134
+ /** @format int64 */
1135
+ count: number;
1136
+ }
1137
+
1138
+ export interface AiConversationDetail {
1139
+ /** @format uuid */
1140
+ id: string;
1141
+ name?: string | null;
1142
+ isPinned: boolean;
1143
+ /** @format date-time */
1144
+ createdAt: string;
1145
+ /** @format date-time */
1146
+ updatedAt?: string | null;
1147
+ /** @format int32 */
1148
+ messageCount: number;
1149
+ }
1150
+
1151
+ export interface AiConversationListItem {
1152
+ /** @format uuid */
1153
+ id: string;
1154
+ /** @format uuid */
1155
+ userId: string;
1156
+ name?: string | null;
1157
+ preview: string;
1158
+ /** @format int32 */
1159
+ messageCount: number;
1160
+ isPinned: boolean;
1161
+ /** @format date-time */
1162
+ createdAt: string;
1163
+ /** @format date-time */
1164
+ updatedAt?: string | null;
1165
+ }
1166
+
1167
+ export interface AiConversationListItemPaginated {
1168
+ rows: AiConversationListItem[];
1169
+ pagination: Pagination;
1170
+ /** @format int64 */
1171
+ count: number;
1172
+ }
1173
+
1174
+ export interface AiGuardrail {
1175
+ /** @format uuid */
1176
+ id: string;
1177
+ name: string;
1178
+ category: AiGuardrailCategoryEnum;
1179
+ description?: string | null;
1180
+ keywords: string[];
1181
+ responseTemplate: string;
1182
+ isDefault: boolean;
1183
+ isEnabled: boolean;
1184
+ hasAccountOverride: boolean;
1185
+ /** @format date-time */
1186
+ createdAt: string;
1187
+ /** @format date-time */
1188
+ updatedAt?: string | null;
1189
+ }
1190
+
1191
+ export interface AiPrompt {
1192
+ /** @format uuid */
1193
+ id: string;
1194
+ title: string;
1195
+ slug?: string | null;
1196
+ description: string;
1197
+ documentTypes: string[];
1198
+ applicableUrlSourceIds: string[];
1199
+ allowedRoles: string[];
1200
+ systemPrompt: string;
1201
+ /** @format int32 */
1202
+ sortOrder: number;
1203
+ isDefault: boolean;
1204
+ /** @format uuid */
1205
+ accountId?: string | null;
1206
+ isActive: boolean;
1207
+ category?: AiPromptCategory | null;
1208
+ queryTemplateName?: AiQueryTemplateName | null;
1209
+ displayHint?: AiDisplayHint | null;
1210
+ bedrockModelId?: string | null;
1211
+ requiredDataSources?: string[] | null;
1212
+ outputType?: AiOutputType | null;
1213
+ hasAccountOverride: boolean;
1214
+ /** @format date-time */
1215
+ createdAt: string;
1216
+ /** @format date-time */
1217
+ updatedAt?: string | null;
1218
+ }
1219
+
1220
+ export interface AiPromptSummary {
1221
+ /** @format uuid */
1222
+ id: string;
1223
+ title: string;
1224
+ slug?: string | null;
1225
+ description: string;
1226
+ documentTypes: string[];
1227
+ applicableUrlSourceIds: string[];
1228
+ /** @format int32 */
1229
+ sortOrder: number;
1230
+ category?: AiPromptCategory | null;
1231
+ queryTemplateName?: AiQueryTemplateName | null;
1232
+ displayHint?: AiDisplayHint | null;
1233
+ bedrockModelId?: string | null;
1234
+ requiredDataSources?: string[] | null;
1235
+ outputType?: AiOutputType | null;
1236
+ }
1237
+
1238
+ export interface AiTokenBudgetStatus {
1239
+ /** @format int32 */
1240
+ limit: number;
1241
+ /** @format int64 */
1242
+ used: number;
1243
+ /** @format int64 */
1244
+ inputTokens: number;
1245
+ /** @format int64 */
1246
+ outputTokens: number;
1247
+ /** @format int64 */
1248
+ remaining: number;
1249
+ /** @format double */
1250
+ percentUsed: number;
1251
+ /** @format date-time */
1252
+ windowStart: string;
1253
+ /** @format date-time */
1254
+ windowEnd: string;
1255
+ limitReached: boolean;
1256
+ }
1257
+
1258
+ export interface AiTokenUsageWindow {
1259
+ /** @format date-time */
1260
+ windowStart: string;
1261
+ /** @format date-time */
1262
+ windowEnd: string;
1263
+ /** @format int32 */
1264
+ limit: number;
1265
+ /** @format int64 */
1266
+ used: number;
1267
+ /** @format int64 */
1268
+ inputTokens: number;
1269
+ /** @format int64 */
1270
+ outputTokens: number;
1271
+ /** @format double */
1272
+ percentUsed: number;
1273
+ limitReached: boolean;
1274
+ }
1275
+
1276
+ export interface AiTokenUsageWindowPaginated {
1277
+ rows: AiTokenUsageWindow[];
1278
+ pagination: Pagination;
1279
+ /** @format int64 */
1280
+ count: number;
1281
+ }
1282
+
1283
+ export interface AiUrlSource {
1284
+ /** @format uuid */
1285
+ id: string;
1286
+ slug?: string | null;
1287
+ name: string;
1288
+ url: string;
1289
+ description?: string | null;
1290
+ category: AiUrlSourceCategoryEnum;
1291
+ scope: AiUrlSourceScopeEnum;
1292
+ isActive: boolean;
1293
+ isDefault: boolean;
1294
+ hasAccountOverride: boolean;
1295
+ /** @format date-time */
1296
+ createdAt: string;
1297
+ /** @format date-time */
1298
+ updatedAt?: string | null;
1299
+ }
1300
+
682
1301
  export interface AllowImpersonationRequest {
683
1302
  email: string;
684
1303
  }
@@ -1135,15 +1754,58 @@ export interface CreateAccountRequest {
1135
1754
  billingSettings: AccountBillingRequest;
1136
1755
  }
1137
1756
 
1138
- export interface CreateBranchRequest {
1757
+ export interface CreateAiCanonicalFieldRequest {
1758
+ displayName: string;
1759
+ description: string;
1760
+ allowedRoles: string[];
1761
+ isPii: boolean;
1762
+ dataSource: string;
1763
+ category?: string | null;
1764
+ }
1765
+
1766
+ export interface CreateAiGuardrailRequest {
1139
1767
  name: string;
1140
- /** @format uuid */
1141
- corporateID: string;
1142
- type: string;
1768
+ category: CreateAiGuardrailRequestCategoryEnum;
1769
+ description?: string | null;
1770
+ keywords: string[];
1771
+ responseTemplate: string;
1143
1772
  }
1144
1773
 
1145
- export interface CreateCustomFieldDefinitionRequest {
1146
- isRequired: boolean;
1774
+ export interface CreateAiPromptRequest {
1775
+ title: string;
1776
+ slug?: string | null;
1777
+ description: string;
1778
+ documentTypes: string[];
1779
+ applicableUrlSourceIds: string[];
1780
+ allowedRoles: string[];
1781
+ systemPrompt: string;
1782
+ /** @format int32 */
1783
+ sortOrder: number;
1784
+ category?: AiPromptCategory | null;
1785
+ queryTemplateName?: AiQueryTemplateName | null;
1786
+ displayHint?: AiDisplayHint | null;
1787
+ bedrockModelId?: string | null;
1788
+ requiredDataSources?: string[] | null;
1789
+ outputType?: AiOutputType | null;
1790
+ }
1791
+
1792
+ export interface CreateAiUrlSourceRequest {
1793
+ name: string;
1794
+ url: string;
1795
+ description?: string | null;
1796
+ category: CreateAiUrlSourceRequestCategoryEnum;
1797
+ scope: CreateAiUrlSourceRequestScopeEnum;
1798
+ }
1799
+
1800
+ export interface CreateBranchRequest {
1801
+ name: string;
1802
+ /** @format uuid */
1803
+ corporateID: string;
1804
+ type: string;
1805
+ }
1806
+
1807
+ export interface CreateCustomFieldDefinitionRequest {
1808
+ isRequired: boolean;
1147
1809
  /** @format int32 */
1148
1810
  displayOrder: number;
1149
1811
  /** @format int32 */
@@ -2111,6 +2773,15 @@ export interface GenerateDocumentRequest {
2111
2773
  recipients: string[];
2112
2774
  }
2113
2775
 
2776
+ export interface GenerateSystemPrompt {
2777
+ systemPrompt: string;
2778
+ }
2779
+
2780
+ export interface GenerateSystemPromptRequest {
2781
+ description: string;
2782
+ category: GenerateSystemPromptRequestCategoryEnum;
2783
+ }
2784
+
2114
2785
  export interface GetApplications {
2115
2786
  applications: ApplicationRowData[];
2116
2787
  }
@@ -3347,6 +4018,13 @@ export interface LoanDocument {
3347
4018
  failoverDocumentPath?: string | null;
3348
4019
  /** @format date-time */
3349
4020
  sensitiveDataPurgedOn?: string | null;
4021
+ observedDocumentType?: LoanDocumentType | null;
4022
+ classificationSource?: ClassificationSource | null;
4023
+ verified: boolean;
4024
+ /** @format date-time */
4025
+ classifiedAt?: string | null;
4026
+ classificationMismatch: boolean;
4027
+ classificationMismatchReason?: string | null;
3350
4028
  }
3351
4029
 
3352
4030
  export interface LoanDocumentFolder {
@@ -4004,6 +4682,10 @@ export interface LosWebhook {
4004
4682
  enableSubscription: boolean;
4005
4683
  }
4006
4684
 
4685
+ export interface ManualDocumentClassificationRequest {
4686
+ documentType: ManualDocumentClassificationRequestDocumentTypeEnum;
4687
+ }
4688
+
4007
4689
  export interface MdmUser {
4008
4690
  user_email?: string | null;
4009
4691
  user_id?: string | null;
@@ -4327,6 +5009,10 @@ export interface PendingTasksSummary {
4327
5009
  borrowers: BorrowerCount[];
4328
5010
  }
4329
5011
 
5012
+ export interface PinAiConversationRequest {
5013
+ isPinned: boolean;
5014
+ }
5015
+
4330
5016
  export interface PostLoanComparisonPdfRequest {
4331
5017
  /** @format uuid */
4332
5018
  siteConfigurationID: string;
@@ -4487,6 +5173,10 @@ export interface RegisterUserRequest {
4487
5173
  inviteCode?: string | null;
4488
5174
  }
4489
5175
 
5176
+ export interface RenameAiConversationRequest {
5177
+ name: string;
5178
+ }
5179
+
4490
5180
  export interface RequestImpersonationRequest {
4491
5181
  email: string;
4492
5182
  }
@@ -4571,6 +5261,15 @@ export interface SSOTokenRequest {
4571
5261
  redirectUri?: string | null;
4572
5262
  }
4573
5263
 
5264
+ export interface SearchCriteria {
5265
+ searchText?: string | null;
5266
+ }
5267
+
5268
+ export interface SendESignatureReminderRequest {
5269
+ /** @format uuid */
5270
+ userId: string;
5271
+ }
5272
+
4574
5273
  export interface SendForgotPasswordRequest {
4575
5274
  email: string;
4576
5275
  }
@@ -5271,6 +5970,14 @@ export interface SocialSurveyRecord {
5271
5970
  reviewCompletedTimeStamp?: string | null;
5272
5971
  }
5273
5972
 
5973
+ export interface SupportedModel {
5974
+ modelId: string;
5975
+ displayName: string;
5976
+ provider: string;
5977
+ description?: string | null;
5978
+ isDefault: boolean;
5979
+ }
5980
+
5274
5981
  export interface SurveyEmailRequest {
5275
5982
  loanOfficerEmailAddress: string;
5276
5983
  }
@@ -5519,6 +6226,52 @@ export interface UpdateAccountRequest {
5519
6226
  settings: AccountSettingsRequest;
5520
6227
  }
5521
6228
 
6229
+ export interface UpdateAiAccountTokenLimitRequest {
6230
+ /** @format int32 */
6231
+ tokenLimit: number;
6232
+ }
6233
+
6234
+ export interface UpdateAiCanonicalFieldRequest {
6235
+ displayName: string;
6236
+ description: string;
6237
+ allowedRoles: string[];
6238
+ isPii: boolean;
6239
+ category?: string | null;
6240
+ }
6241
+
6242
+ export interface UpdateAiGuardrailRequest {
6243
+ name: string;
6244
+ category: UpdateAiGuardrailRequestCategoryEnum;
6245
+ description?: string | null;
6246
+ keywords: string[];
6247
+ responseTemplate: string;
6248
+ }
6249
+
6250
+ export interface UpdateAiPromptRequest {
6251
+ title: string;
6252
+ description: string;
6253
+ documentTypes: string[];
6254
+ applicableUrlSourceIds: string[];
6255
+ allowedRoles: string[];
6256
+ systemPrompt: string;
6257
+ /** @format int32 */
6258
+ sortOrder: number;
6259
+ category?: AiPromptCategory | null;
6260
+ queryTemplateName?: AiQueryTemplateName | null;
6261
+ displayHint?: AiDisplayHint | null;
6262
+ bedrockModelId?: string | null;
6263
+ requiredDataSources?: string[] | null;
6264
+ outputType?: AiOutputType | null;
6265
+ }
6266
+
6267
+ export interface UpdateAiUrlSourceRequest {
6268
+ name: string;
6269
+ url: string;
6270
+ description?: string | null;
6271
+ category: UpdateAiUrlSourceRequestCategoryEnum;
6272
+ scope: UpdateAiUrlSourceRequestScopeEnum;
6273
+ }
6274
+
5522
6275
  export interface UpdateCustomFieldDefinitionRequest {
5523
6276
  isRequired: boolean;
5524
6277
  /** @format int32 */
@@ -6084,6 +6837,78 @@ export interface Workflow {
6084
6837
 
6085
6838
  export type AccountBillingRequestBillingTypeEnum = "ClosedLoan" | "LoanOfficer";
6086
6839
 
6840
+ export type AiAuditLogEventTypeEnum =
6841
+ | "Error"
6842
+ | "GuardrailBlockedPre"
6843
+ | "GuardrailPassedPre"
6844
+ | "IntentClassified"
6845
+ | "LoanResolvedFromMessage"
6846
+ | "DocumentNotFound"
6847
+ | "GuardrailBlockedPost"
6848
+ | "GuardrailPassedPost"
6849
+ | "DocumentAnalyzed"
6850
+ | "DocumentList"
6851
+ | "DocumentResolutionAmbiguous"
6852
+ | "ResponseGenerated"
6853
+ | "ParametersExtracted"
6854
+ | "QueryExecuted"
6855
+ | "LoanContextNotFound"
6856
+ | "LoanContextLoaded"
6857
+ | "GuardrailBlockedBedrock"
6858
+ | "PromptMatched"
6859
+ | "QueryCondensed"
6860
+ | "IntentParseFailed"
6861
+ | "LoanSearchTermDiscarded"
6862
+ | "CanonicalFieldsSelected";
6863
+
6864
+ export type AiChatMetadataIntentEnum =
6865
+ | "Greeting"
6866
+ | "Invalid"
6867
+ | "Relevant"
6868
+ | "LoanSpecific"
6869
+ | "DocumentList"
6870
+ | "GeneralKnowledge"
6871
+ | "Blocked"
6872
+ | "Action"
6873
+ | "ConversationMeta"
6874
+ | "Capabilities"
6875
+ | "UsageReport";
6876
+
6877
+ export type AiChatStructuredDataTypeEnum =
6878
+ | "Table"
6879
+ | "DocumentAnalysis"
6880
+ | "DocumentList"
6881
+ | "GeneratedDocument";
6882
+
6883
+ export type AiConfigChangeLogEntityTypeEnum =
6884
+ | "Prompt"
6885
+ | "Guardrail"
6886
+ | "CanonicalField"
6887
+ | "UrlSource"
6888
+ | "AdminSettings"
6889
+ | "AccountTokenSettings"
6890
+ | "AccountSettings";
6891
+
6892
+ export type AiConfigChangeLogActionEnum =
6893
+ | "Created"
6894
+ | "Updated"
6895
+ | "Deleted"
6896
+ | "Toggled";
6897
+
6898
+ export type AiGuardrailCategoryEnum =
6899
+ | "ContentSafety"
6900
+ | "PromptInjection"
6901
+ | "Privacy"
6902
+ | "Legal";
6903
+
6904
+ export type AiUrlSourceCategoryEnum =
6905
+ | "Regulatory"
6906
+ | "Guidelines"
6907
+ | "MarketData"
6908
+ | "Custom";
6909
+
6910
+ export type AiUrlSourceScopeEnum = "FullDomain" | "SpecificPath";
6911
+
6087
6912
  export type AuditLogEntryChangeTypeEnum =
6088
6913
  | "Created"
6089
6914
  | "Modified"
@@ -6131,6 +6956,20 @@ export type CreateAccountRequestEnvironmentEnum =
6131
6956
  | "UAT"
6132
6957
  | "Production";
6133
6958
 
6959
+ export type CreateAiGuardrailRequestCategoryEnum =
6960
+ | "ContentSafety"
6961
+ | "PromptInjection"
6962
+ | "Privacy"
6963
+ | "Legal";
6964
+
6965
+ export type CreateAiUrlSourceRequestCategoryEnum =
6966
+ | "Regulatory"
6967
+ | "Guidelines"
6968
+ | "MarketData"
6969
+ | "Custom";
6970
+
6971
+ export type CreateAiUrlSourceRequestScopeEnum = "FullDomain" | "SpecificPath";
6972
+
6134
6973
  export type CreateCustomFieldDefinitionRequestDataTypeEnum =
6135
6974
  | "String"
6136
6975
  | "Number"
@@ -6293,6 +7132,12 @@ export type FusionReportFilterFilterTypeEnum =
6293
7132
  | "StringNotEquals"
6294
7133
  | "StringNotContains";
6295
7134
 
7135
+ export type GenerateSystemPromptRequestCategoryEnum =
7136
+ | "DocumentAnalysis"
7137
+ | "DataQuery"
7138
+ | "General"
7139
+ | "Action";
7140
+
6296
7141
  export type IpAddressAddressFamilyEnum =
6297
7142
  | "Unspecified"
6298
7143
  | "Unix"
@@ -6418,7 +7263,8 @@ export type LoanLogTypeEnum =
6418
7263
  | "SensitiveDataPurge"
6419
7264
  | "ClosingDateUpdated"
6420
7265
  | "ConsumerConnectAssociation"
6421
- | "TaskReminderSent";
7266
+ | "TaskReminderSent"
7267
+ | "DocumentClassified";
6422
7268
 
6423
7269
  export type LoanLogDetailLevelEnum = "None" | "Info" | "Warning" | "Error";
6424
7270
 
@@ -6438,7 +7284,8 @@ export type LoanLogDetailTypeEnum =
6438
7284
  | "SensitiveDataPurge"
6439
7285
  | "ClosingDateUpdated"
6440
7286
  | "ConsumerConnectAssociation"
6441
- | "TaskReminderSent";
7287
+ | "TaskReminderSent"
7288
+ | "DocumentClassified";
6442
7289
 
6443
7290
  export type LoanTaskStatusSummaryStatusEnum =
6444
7291
  | "Outstanding"
@@ -6472,6 +7319,66 @@ export type LosOperationTrackingStatusEnum =
6472
7319
 
6473
7320
  export type LosSyncStepSeverityEnum = "Success" | "Info" | "Warning" | "Error";
6474
7321
 
7322
+ export type ManualDocumentClassificationRequestDocumentTypeEnum =
7323
+ | "W2"
7324
+ | "Paystub"
7325
+ | "Form1099"
7326
+ | "Form1099Int"
7327
+ | "Form1099Misc"
7328
+ | "Form1099Nec"
7329
+ | "Form1099R"
7330
+ | "Form1099G"
7331
+ | "Form1099Div"
7332
+ | "Form1099Ssa"
7333
+ | "FederalTaxReturn1040"
7334
+ | "TaxReturnScheduleC"
7335
+ | "TaxReturnScheduleD"
7336
+ | "TaxReturnScheduleE"
7337
+ | "Form1065"
7338
+ | "Form1120"
7339
+ | "Form1120S"
7340
+ | "ProfitAndLossStatement"
7341
+ | "VerificationOfEmployment"
7342
+ | "BankStatement"
7343
+ | "InvestmentStatement"
7344
+ | "CreditCardStatement"
7345
+ | "MortgageStatement"
7346
+ | "PayoffStatement"
7347
+ | "HoaDocuments"
7348
+ | "UtilityBill"
7349
+ | "IdentityDocument"
7350
+ | "DemographicAddendum"
7351
+ | "Ssa89"
7352
+ | "Vba260551"
7353
+ | "Hud92900B"
7354
+ | "Check"
7355
+ | "Invoice"
7356
+ | "Receipt"
7357
+ | "LoanApplication1003"
7358
+ | "UnderwritingTransmittal1008"
7359
+ | "Other"
7360
+ | "SalesContract"
7361
+ | "TitleCommitment"
7362
+ | "DriversLicense"
7363
+ | "VerificationOfIncome"
7364
+ | "VerificationOfAssets"
7365
+ | "FloodCertificate"
7366
+ | "FraudReport"
7367
+ | "AddendumToSalesContract"
7368
+ | "GiftLetter"
7369
+ | "CpaLetter"
7370
+ | "TaxBill"
7371
+ | "CondoQuestionnaire"
7372
+ | "CondoBudget"
7373
+ | "CondoBylaws"
7374
+ | "RentalAgreements"
7375
+ | "Lease"
7376
+ | "HazardInsurance"
7377
+ | "VaCertificateOfEligibility"
7378
+ | "Appraisal"
7379
+ | "CreditReport"
7380
+ | "CondoMasterPolicy";
7381
+
6475
7382
  export type SiteConfigurationTypeEnum =
6476
7383
  | "None"
6477
7384
  | "Account"
@@ -6527,6 +7434,20 @@ export type UnregisteredBorrowerRoleEnum =
6527
7434
  | "SettlementAgent"
6528
7435
  | "Admin";
6529
7436
 
7437
+ export type UpdateAiGuardrailRequestCategoryEnum =
7438
+ | "ContentSafety"
7439
+ | "PromptInjection"
7440
+ | "Privacy"
7441
+ | "Legal";
7442
+
7443
+ export type UpdateAiUrlSourceRequestCategoryEnum =
7444
+ | "Regulatory"
7445
+ | "Guidelines"
7446
+ | "MarketData"
7447
+ | "Custom";
7448
+
7449
+ export type UpdateAiUrlSourceRequestScopeEnum = "FullDomain" | "SpecificPath";
7450
+
6530
7451
  export type UserDraftRoleEnum =
6531
7452
  | "Borrower"
6532
7453
  | "CoBorrower"
@@ -6790,7 +7711,7 @@ export class HttpClient<SecurityDataType = unknown> {
6790
7711
 
6791
7712
  /**
6792
7713
  * @title The Big POS API
6793
- * @version v2.44.2
7714
+ * @version v2.45.0
6794
7715
  * @termsOfService https://www.thebigpos.com/terms-of-use/
6795
7716
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
6796
7717
  */
@@ -6831,22 +7752,1395 @@ export class Api<
6831
7752
  ...params,
6832
7753
  });
6833
7754
 
6834
- api = {
7755
+ api = {
7756
+ /**
7757
+ * No description
7758
+ *
7759
+ * @tags Account
7760
+ * @name GetMyAccount
7761
+ * @summary Get
7762
+ * @request GET:/api/account
7763
+ * @secure
7764
+ * @response `200` `Account` OK
7765
+ * @response `404` `ProblemDetails` Not Found
7766
+ */
7767
+ getMyAccount: (params: RequestParams = {}) =>
7768
+ this.request<Account, ProblemDetails>({
7769
+ path: `/api/account`,
7770
+ method: "GET",
7771
+ secure: true,
7772
+ format: "json",
7773
+ ...params,
7774
+ }),
7775
+
7776
+ /**
7777
+ * No description
7778
+ *
7779
+ * @tags Account
7780
+ * @name ReplaceMyAccount
7781
+ * @summary Replace
7782
+ * @request PUT:/api/account
7783
+ * @secure
7784
+ * @response `200` `Account` OK
7785
+ * @response `404` `ProblemDetails` Not Found
7786
+ * @response `422` `ProblemDetails` Unprocessable Content
7787
+ */
7788
+ replaceMyAccount: (
7789
+ data: UpdateAccountRequest,
7790
+ params: RequestParams = {},
7791
+ ) =>
7792
+ this.request<Account, ProblemDetails>({
7793
+ path: `/api/account`,
7794
+ method: "PUT",
7795
+ body: data,
7796
+ secure: true,
7797
+ type: "application/json",
7798
+ format: "json",
7799
+ ...params,
7800
+ }),
7801
+
7802
+ /**
7803
+ * No description
7804
+ *
7805
+ * @tags Account
7806
+ * @name GetSiteConfigurationByAccount
7807
+ * @summary Get Site Configuration
7808
+ * @request GET:/api/account/site-configurations
7809
+ * @secure
7810
+ * @response `200` `SiteConfiguration` OK
7811
+ */
7812
+ getSiteConfigurationByAccount: (params: RequestParams = {}) =>
7813
+ this.request<SiteConfiguration, any>({
7814
+ path: `/api/account/site-configurations`,
7815
+ method: "GET",
7816
+ secure: true,
7817
+ format: "json",
7818
+ ...params,
7819
+ }),
7820
+
7821
+ /**
7822
+ * No description
7823
+ *
7824
+ * @tags Account
7825
+ * @name UpdateSiteConfigurationForAccount
7826
+ * @summary Update Site Configuration
7827
+ * @request PUT:/api/account/site-configurations
7828
+ * @secure
7829
+ * @response `200` `SiteConfiguration` OK
7830
+ * @response `422` `UnprocessableEntity` Unprocessable Content
7831
+ */
7832
+ updateSiteConfigurationForAccount: (
7833
+ data: SiteConfiguration,
7834
+ params: RequestParams = {},
7835
+ ) =>
7836
+ this.request<SiteConfiguration, UnprocessableEntity>({
7837
+ path: `/api/account/site-configurations`,
7838
+ method: "PUT",
7839
+ body: data,
7840
+ secure: true,
7841
+ type: "application/json",
7842
+ format: "json",
7843
+ ...params,
7844
+ }),
7845
+
7846
+ /**
7847
+ * No description
7848
+ *
7849
+ * @tags AccountReactivation
7850
+ * @name RequestAccountReactivation
7851
+ * @summary Request account reactivation
7852
+ * @request POST:/api/account/reactivation/request
7853
+ * @secure
7854
+ * @response `204` `void` No Content
7855
+ */
7856
+ requestAccountReactivation: (
7857
+ data: AccountReactivationRequest,
7858
+ params: RequestParams = {},
7859
+ ) =>
7860
+ this.request<void, any>({
7861
+ path: `/api/account/reactivation/request`,
7862
+ method: "POST",
7863
+ body: data,
7864
+ secure: true,
7865
+ type: "application/json",
7866
+ ...params,
7867
+ }),
7868
+
7869
+ /**
7870
+ * No description
7871
+ *
7872
+ * @tags AccountReactivation
7873
+ * @name CompleteAccountReactivation
7874
+ * @summary Complete account reactivation with new password
7875
+ * @request POST:/api/account/reactivation/complete
7876
+ * @secure
7877
+ * @response `204` `void` No Content
7878
+ * @response `400` `ProblemDetails` Bad Request
7879
+ */
7880
+ completeAccountReactivation: (
7881
+ data: AccountReactivationCompleteRequest,
7882
+ params: RequestParams = {},
7883
+ ) =>
7884
+ this.request<void, ProblemDetails>({
7885
+ path: `/api/account/reactivation/complete`,
7886
+ method: "POST",
7887
+ body: data,
7888
+ secure: true,
7889
+ type: "application/json",
7890
+ ...params,
7891
+ }),
7892
+
7893
+ /**
7894
+ * No description
7895
+ *
7896
+ * @tags Accounts
7897
+ * @name GetAccounts
7898
+ * @summary Get All
7899
+ * @request GET:/api/accounts
7900
+ * @secure
7901
+ * @response `200` `(Account)[]` OK
7902
+ */
7903
+ getAccounts: (params: RequestParams = {}) =>
7904
+ this.request<Account[], any>({
7905
+ path: `/api/accounts`,
7906
+ method: "GET",
7907
+ secure: true,
7908
+ format: "json",
7909
+ ...params,
7910
+ }),
7911
+
7912
+ /**
7913
+ * No description
7914
+ *
7915
+ * @tags Accounts
7916
+ * @name CreateAccount
7917
+ * @summary Create
7918
+ * @request POST:/api/accounts
7919
+ * @secure
7920
+ * @response `201` `Account` Created
7921
+ * @response `422` `ProblemDetails` Unprocessable Content
7922
+ */
7923
+ createAccount: (data: CreateAccountRequest, params: RequestParams = {}) =>
7924
+ this.request<Account, ProblemDetails>({
7925
+ path: `/api/accounts`,
7926
+ method: "POST",
7927
+ body: data,
7928
+ secure: true,
7929
+ type: "application/json",
7930
+ format: "json",
7931
+ ...params,
7932
+ }),
7933
+
7934
+ /**
7935
+ * No description
7936
+ *
7937
+ * @tags Accounts
7938
+ * @name GetAccount
7939
+ * @summary Get by ID
7940
+ * @request GET:/api/accounts/{id}
7941
+ * @secure
7942
+ * @response `201` `Account` Created
7943
+ * @response `422` `ProblemDetails` Unprocessable Content
7944
+ */
7945
+ getAccount: (id: string, params: RequestParams = {}) =>
7946
+ this.request<Account, ProblemDetails>({
7947
+ path: `/api/accounts/${id}`,
7948
+ method: "GET",
7949
+ secure: true,
7950
+ format: "json",
7951
+ ...params,
7952
+ }),
7953
+
7954
+ /**
7955
+ * No description
7956
+ *
7957
+ * @tags Accounts
7958
+ * @name DeleteAccount
7959
+ * @summary Delete
7960
+ * @request DELETE:/api/accounts/{id}
7961
+ * @secure
7962
+ * @response `204` `Account` No Content
7963
+ * @response `404` `ProblemDetails` Not Found
7964
+ * @response `422` `ProblemDetails` Unprocessable Content
7965
+ */
7966
+ deleteAccount: (
7967
+ id: string,
7968
+ query?: {
7969
+ /** @default false */
7970
+ hardDelete?: boolean;
7971
+ },
7972
+ params: RequestParams = {},
7973
+ ) =>
7974
+ this.request<Account, ProblemDetails>({
7975
+ path: `/api/accounts/${id}`,
7976
+ method: "DELETE",
7977
+ query: query,
7978
+ secure: true,
7979
+ format: "json",
7980
+ ...params,
7981
+ }),
7982
+
7983
+ /**
7984
+ * No description
7985
+ *
7986
+ * @tags Accounts
7987
+ * @name UpdateAccountBilling
7988
+ * @summary Update billing configuration
7989
+ * @request PUT:/api/accounts/{id}/billing
7990
+ * @secure
7991
+ * @response `200` `AccountBilling` OK
7992
+ * @response `404` `ProblemDetails` Not Found
7993
+ * @response `422` `ProblemDetails` Unprocessable Content
7994
+ */
7995
+ updateAccountBilling: (
7996
+ id: string,
7997
+ data: AccountBillingRequest,
7998
+ params: RequestParams = {},
7999
+ ) =>
8000
+ this.request<AccountBilling, ProblemDetails>({
8001
+ path: `/api/accounts/${id}/billing`,
8002
+ method: "PUT",
8003
+ body: data,
8004
+ secure: true,
8005
+ type: "application/json",
8006
+ format: "json",
8007
+ ...params,
8008
+ }),
8009
+
8010
+ /**
8011
+ * No description
8012
+ *
8013
+ * @tags AiAccountSettings
8014
+ * @name GetAiAccountSettings
8015
+ * @summary Get account AI settings
8016
+ * @request GET:/api/ai/admin/account-settings
8017
+ * @secure
8018
+ * @response `200` `AiAccountSettings` OK
8019
+ */
8020
+ getAiAccountSettings: (params: RequestParams = {}) =>
8021
+ this.request<AiAccountSettings, any>({
8022
+ path: `/api/ai/admin/account-settings`,
8023
+ method: "GET",
8024
+ secure: true,
8025
+ format: "json",
8026
+ ...params,
8027
+ }),
8028
+
8029
+ /**
8030
+ * No description
8031
+ *
8032
+ * @tags AiAccountSettings
8033
+ * @name UpdateAiAccountSettings
8034
+ * @summary Update account AI settings
8035
+ * @request PUT:/api/ai/admin/account-settings
8036
+ * @secure
8037
+ * @response `200` `AiAccountSettings` OK
8038
+ * @response `400` `ProblemDetails` Bad Request
8039
+ */
8040
+ updateAiAccountSettings: (
8041
+ data: AiAccountSettingsRequest,
8042
+ params: RequestParams = {},
8043
+ ) =>
8044
+ this.request<AiAccountSettings, ProblemDetails>({
8045
+ path: `/api/ai/admin/account-settings`,
8046
+ method: "PUT",
8047
+ body: data,
8048
+ secure: true,
8049
+ type: "application/json",
8050
+ format: "json",
8051
+ ...params,
8052
+ }),
8053
+
8054
+ /**
8055
+ * No description
8056
+ *
8057
+ * @tags AiAdmin
8058
+ * @name GetAiAuditLogs
8059
+ * @summary Get paginated audit logs
8060
+ * @request GET:/api/ai/admin/audit-logs
8061
+ * @secure
8062
+ * @response `200` `AiAuditLogPaginated` OK
8063
+ */
8064
+ getAiAuditLogs: (
8065
+ query?: {
8066
+ eventType?: AiAuditEventType;
8067
+ /** @format uuid */
8068
+ requestId?: string;
8069
+ /** @format uuid */
8070
+ userId?: string;
8071
+ /** @format uuid */
8072
+ conversationId?: string;
8073
+ blockedOnly?: boolean;
8074
+ /** @format date-time */
8075
+ startDate?: string;
8076
+ /** @format date-time */
8077
+ endDate?: string;
8078
+ /** @format int32 */
8079
+ pageSize?: number;
8080
+ /** @format int32 */
8081
+ pageNumber?: number;
8082
+ sortBy?: string;
8083
+ sortDirection?: string;
8084
+ },
8085
+ params: RequestParams = {},
8086
+ ) =>
8087
+ this.request<AiAuditLogPaginated, any>({
8088
+ path: `/api/ai/admin/audit-logs`,
8089
+ method: "GET",
8090
+ query: query,
8091
+ secure: true,
8092
+ format: "json",
8093
+ ...params,
8094
+ }),
8095
+
8096
+ /**
8097
+ * No description
8098
+ *
8099
+ * @tags AiAdmin
8100
+ * @name GetAiRequestLifecycle
8101
+ * @summary Get the full event lifecycle of a single AI request
8102
+ * @request GET:/api/ai/admin/audit-logs/request/{requestId}
8103
+ * @secure
8104
+ * @response `200` `(AiAuditLog)[]` OK
8105
+ */
8106
+ getAiRequestLifecycle: (requestId: string, params: RequestParams = {}) =>
8107
+ this.request<AiAuditLog[], any>({
8108
+ path: `/api/ai/admin/audit-logs/request/${requestId}`,
8109
+ method: "GET",
8110
+ secure: true,
8111
+ format: "json",
8112
+ ...params,
8113
+ }),
8114
+
8115
+ /**
8116
+ * No description
8117
+ *
8118
+ * @tags AiAdmin
8119
+ * @name GetAiAuditConversations
8120
+ * @summary List conversations with their audit roll-up — origin user, turns, status, tokens
8121
+ * @request GET:/api/ai/admin/audit-conversations
8122
+ * @secure
8123
+ * @response `200` `AiConversationAuditSummaryPaginated` OK
8124
+ */
8125
+ getAiAuditConversations: (
8126
+ query?: {
8127
+ searchText?: string;
8128
+ /** @format date-time */
8129
+ startDate?: string;
8130
+ /** @format date-time */
8131
+ endDate?: string;
8132
+ /** @format int32 */
8133
+ pageSize?: number;
8134
+ /** @format int32 */
8135
+ pageNumber?: number;
8136
+ sortBy?: string;
8137
+ sortDirection?: string;
8138
+ },
8139
+ params: RequestParams = {},
8140
+ ) =>
8141
+ this.request<AiConversationAuditSummaryPaginated, any>({
8142
+ path: `/api/ai/admin/audit-conversations`,
8143
+ method: "GET",
8144
+ query: query,
8145
+ secure: true,
8146
+ format: "json",
8147
+ ...params,
8148
+ }),
8149
+
8150
+ /**
8151
+ * No description
8152
+ *
8153
+ * @tags AiAdmin
8154
+ * @name GetAiAdminStats
8155
+ * @summary Get AI admin dashboard stats
8156
+ * @request GET:/api/ai/admin/stats
8157
+ * @secure
8158
+ * @response `200` `AiAdminStats` OK
8159
+ */
8160
+ getAiAdminStats: (
8161
+ query?: {
8162
+ /** @format date-time */
8163
+ startDate?: string;
8164
+ /** @format date-time */
8165
+ endDate?: string;
8166
+ },
8167
+ params: RequestParams = {},
8168
+ ) =>
8169
+ this.request<AiAdminStats, any>({
8170
+ path: `/api/ai/admin/stats`,
8171
+ method: "GET",
8172
+ query: query,
8173
+ secure: true,
8174
+ format: "json",
8175
+ ...params,
8176
+ }),
8177
+
8178
+ /**
8179
+ * No description
8180
+ *
8181
+ * @tags AiAdmin
8182
+ * @name GetAiConfigChanges
8183
+ * @summary Get the AI configuration change history (who changed prompts, guardrails, fields, sources)
8184
+ * @request GET:/api/ai/admin/config-changes
8185
+ * @secure
8186
+ * @response `200` `AiConfigChangeLogPaginated` OK
8187
+ */
8188
+ getAiConfigChanges: (
8189
+ query?: {
8190
+ entityType?: AiConfigEntityType;
8191
+ /** @format uuid */
8192
+ entityId?: string;
8193
+ /** @format uuid */
8194
+ actorUserId?: string;
8195
+ action?: AiConfigChangeAction;
8196
+ /** @format date-time */
8197
+ startDate?: string;
8198
+ /** @format date-time */
8199
+ endDate?: string;
8200
+ /** @format int32 */
8201
+ pageSize?: number;
8202
+ /** @format int32 */
8203
+ pageNumber?: number;
8204
+ sortBy?: string;
8205
+ sortDirection?: string;
8206
+ },
8207
+ params: RequestParams = {},
8208
+ ) =>
8209
+ this.request<AiConfigChangeLogPaginated, any>({
8210
+ path: `/api/ai/admin/config-changes`,
8211
+ method: "GET",
8212
+ query: query,
8213
+ secure: true,
8214
+ format: "json",
8215
+ ...params,
8216
+ }),
8217
+
8218
+ /**
8219
+ * No description
8220
+ *
8221
+ * @tags AiAdminPrompt
8222
+ * @name GetAiPrompts
8223
+ * @summary Get all prompts
8224
+ * @request GET:/api/ai/admin/prompts
8225
+ * @secure
8226
+ * @response `200` `(AiPrompt)[]` OK
8227
+ */
8228
+ getAiPrompts: (params: RequestParams = {}) =>
8229
+ this.request<AiPrompt[], any>({
8230
+ path: `/api/ai/admin/prompts`,
8231
+ method: "GET",
8232
+ secure: true,
8233
+ format: "json",
8234
+ ...params,
8235
+ }),
8236
+
8237
+ /**
8238
+ * No description
8239
+ *
8240
+ * @tags AiAdminPrompt
8241
+ * @name CreateAiPrompt
8242
+ * @summary Create custom prompt
8243
+ * @request POST:/api/ai/admin/prompts
8244
+ * @secure
8245
+ * @response `201` `AiPrompt` Created
8246
+ * @response `400` `ProblemDetails` Bad Request
8247
+ */
8248
+ createAiPrompt: (data: CreateAiPromptRequest, params: RequestParams = {}) =>
8249
+ this.request<AiPrompt, ProblemDetails>({
8250
+ path: `/api/ai/admin/prompts`,
8251
+ method: "POST",
8252
+ body: data,
8253
+ secure: true,
8254
+ type: "application/json",
8255
+ format: "json",
8256
+ ...params,
8257
+ }),
8258
+
8259
+ /**
8260
+ * No description
8261
+ *
8262
+ * @tags AiAdminPrompt
8263
+ * @name GetAiPrompt
8264
+ * @summary Get prompt by ID
8265
+ * @request GET:/api/ai/admin/prompts/{id}
8266
+ * @secure
8267
+ * @response `200` `AiPrompt` OK
8268
+ * @response `404` `ProblemDetails` Not Found
8269
+ */
8270
+ getAiPrompt: (id: string, params: RequestParams = {}) =>
8271
+ this.request<AiPrompt, ProblemDetails>({
8272
+ path: `/api/ai/admin/prompts/${id}`,
8273
+ method: "GET",
8274
+ secure: true,
8275
+ format: "json",
8276
+ ...params,
8277
+ }),
8278
+
8279
+ /**
8280
+ * No description
8281
+ *
8282
+ * @tags AiAdminPrompt
8283
+ * @name UpdateAiPrompt
8284
+ * @summary Update prompt
8285
+ * @request PUT:/api/ai/admin/prompts/{id}
8286
+ * @secure
8287
+ * @response `200` `AiPrompt` OK
8288
+ * @response `400` `ProblemDetails` Bad Request
8289
+ * @response `404` `ProblemDetails` Not Found
8290
+ */
8291
+ updateAiPrompt: (
8292
+ id: string,
8293
+ data: UpdateAiPromptRequest,
8294
+ params: RequestParams = {},
8295
+ ) =>
8296
+ this.request<AiPrompt, ProblemDetails>({
8297
+ path: `/api/ai/admin/prompts/${id}`,
8298
+ method: "PUT",
8299
+ body: data,
8300
+ secure: true,
8301
+ type: "application/json",
8302
+ format: "json",
8303
+ ...params,
8304
+ }),
8305
+
8306
+ /**
8307
+ * No description
8308
+ *
8309
+ * @tags AiAdminPrompt
8310
+ * @name DeleteAiPrompt
8311
+ * @summary Delete prompt
8312
+ * @request DELETE:/api/ai/admin/prompts/{id}
8313
+ * @secure
8314
+ * @response `204` `void` No Content
8315
+ * @response `400` `ProblemDetails` Bad Request
8316
+ * @response `404` `ProblemDetails` Not Found
8317
+ */
8318
+ deleteAiPrompt: (id: string, params: RequestParams = {}) =>
8319
+ this.request<void, ProblemDetails>({
8320
+ path: `/api/ai/admin/prompts/${id}`,
8321
+ method: "DELETE",
8322
+ secure: true,
8323
+ ...params,
8324
+ }),
8325
+
8326
+ /**
8327
+ * No description
8328
+ *
8329
+ * @tags AiAdminPrompt
8330
+ * @name ToggleAiPrompt
8331
+ * @summary Toggle prompt active/inactive
8332
+ * @request PATCH:/api/ai/admin/prompts/{id}/toggle
8333
+ * @secure
8334
+ * @response `200` `AiPrompt` OK
8335
+ * @response `404` `ProblemDetails` Not Found
8336
+ */
8337
+ toggleAiPrompt: (id: string, params: RequestParams = {}) =>
8338
+ this.request<AiPrompt, ProblemDetails>({
8339
+ path: `/api/ai/admin/prompts/${id}/toggle`,
8340
+ method: "PATCH",
8341
+ secure: true,
8342
+ format: "json",
8343
+ ...params,
8344
+ }),
8345
+
8346
+ /**
8347
+ * No description
8348
+ *
8349
+ * @tags AiAdminPrompt
8350
+ * @name GenerateAiSystemPrompt
8351
+ * @summary Generate a system prompt from description
8352
+ * @request POST:/api/ai/admin/prompts/generate
8353
+ * @secure
8354
+ * @response `200` `GenerateSystemPrompt` OK
8355
+ * @response `400` `ProblemDetails` Bad Request
8356
+ */
8357
+ generateAiSystemPrompt: (
8358
+ data: GenerateSystemPromptRequest,
8359
+ params: RequestParams = {},
8360
+ ) =>
8361
+ this.request<GenerateSystemPrompt, ProblemDetails>({
8362
+ path: `/api/ai/admin/prompts/generate`,
8363
+ method: "POST",
8364
+ body: data,
8365
+ secure: true,
8366
+ type: "application/json",
8367
+ format: "json",
8368
+ ...params,
8369
+ }),
8370
+
8371
+ /**
8372
+ * No description
8373
+ *
8374
+ * @tags AiAdminPrompt
8375
+ * @name GetSupportedModels
8376
+ * @summary Get supported LLM models
8377
+ * @request GET:/api/ai/admin/prompts/supported-models
8378
+ * @secure
8379
+ * @response `200` `(SupportedModel)[]` OK
8380
+ */
8381
+ getSupportedModels: (params: RequestParams = {}) =>
8382
+ this.request<SupportedModel[], any>({
8383
+ path: `/api/ai/admin/prompts/supported-models`,
8384
+ method: "GET",
8385
+ secure: true,
8386
+ format: "json",
8387
+ ...params,
8388
+ }),
8389
+
8390
+ /**
8391
+ * No description
8392
+ *
8393
+ * @tags AiAdminSettings
8394
+ * @name GetAiAdminSettings
8395
+ * @summary Get global AI settings
8396
+ * @request GET:/api/ai/admin/settings
8397
+ * @secure
8398
+ * @response `200` `AiAdminSettings` OK
8399
+ */
8400
+ getAiAdminSettings: (params: RequestParams = {}) =>
8401
+ this.request<AiAdminSettings, any>({
8402
+ path: `/api/ai/admin/settings`,
8403
+ method: "GET",
8404
+ secure: true,
8405
+ format: "json",
8406
+ ...params,
8407
+ }),
8408
+
8409
+ /**
8410
+ * No description
8411
+ *
8412
+ * @tags AiAdminSettings
8413
+ * @name UpdateAiAdminSettings
8414
+ * @summary Update global AI settings
8415
+ * @request PUT:/api/ai/admin/settings
8416
+ * @secure
8417
+ * @response `200` `AiAdminSettings` OK
8418
+ * @response `400` `ProblemDetails` Bad Request
8419
+ */
8420
+ updateAiAdminSettings: (
8421
+ data: AiAdminSettingsRequest,
8422
+ params: RequestParams = {},
8423
+ ) =>
8424
+ this.request<AiAdminSettings, ProblemDetails>({
8425
+ path: `/api/ai/admin/settings`,
8426
+ method: "PUT",
8427
+ body: data,
8428
+ secure: true,
8429
+ type: "application/json",
8430
+ format: "json",
8431
+ ...params,
8432
+ }),
8433
+
8434
+ /**
8435
+ * No description
8436
+ *
8437
+ * @tags AiCanonicalField
8438
+ * @name GetAiCanonicalFields
8439
+ * @summary Get all canonical fields
8440
+ * @request GET:/api/ai/admin/fields
8441
+ * @secure
8442
+ * @response `200` `(AiCanonicalField)[]` OK
8443
+ */
8444
+ getAiCanonicalFields: (params: RequestParams = {}) =>
8445
+ this.request<AiCanonicalField[], any>({
8446
+ path: `/api/ai/admin/fields`,
8447
+ method: "GET",
8448
+ secure: true,
8449
+ format: "json",
8450
+ ...params,
8451
+ }),
8452
+
8453
+ /**
8454
+ * No description
8455
+ *
8456
+ * @tags AiCanonicalField
8457
+ * @name CreateAiCanonicalField
8458
+ * @summary Create canonical field
8459
+ * @request POST:/api/ai/admin/fields
8460
+ * @secure
8461
+ * @response `201` `AiCanonicalField` Created
8462
+ * @response `400` `ProblemDetails` Bad Request
8463
+ */
8464
+ createAiCanonicalField: (
8465
+ data: CreateAiCanonicalFieldRequest,
8466
+ params: RequestParams = {},
8467
+ ) =>
8468
+ this.request<AiCanonicalField, ProblemDetails>({
8469
+ path: `/api/ai/admin/fields`,
8470
+ method: "POST",
8471
+ body: data,
8472
+ secure: true,
8473
+ type: "application/json",
8474
+ format: "json",
8475
+ ...params,
8476
+ }),
8477
+
8478
+ /**
8479
+ * No description
8480
+ *
8481
+ * @tags AiCanonicalField
8482
+ * @name GetAiCanonicalField
8483
+ * @summary Get canonical field by ID
8484
+ * @request GET:/api/ai/admin/fields/{id}
8485
+ * @secure
8486
+ * @response `200` `AiCanonicalField` OK
8487
+ * @response `404` `ProblemDetails` Not Found
8488
+ */
8489
+ getAiCanonicalField: (id: string, params: RequestParams = {}) =>
8490
+ this.request<AiCanonicalField, ProblemDetails>({
8491
+ path: `/api/ai/admin/fields/${id}`,
8492
+ method: "GET",
8493
+ secure: true,
8494
+ format: "json",
8495
+ ...params,
8496
+ }),
8497
+
8498
+ /**
8499
+ * No description
8500
+ *
8501
+ * @tags AiCanonicalField
8502
+ * @name UpdateAiCanonicalField
8503
+ * @summary Update canonical field
8504
+ * @request PUT:/api/ai/admin/fields/{id}
8505
+ * @secure
8506
+ * @response `200` `AiCanonicalField` OK
8507
+ * @response `400` `ProblemDetails` Bad Request
8508
+ * @response `404` `ProblemDetails` Not Found
8509
+ */
8510
+ updateAiCanonicalField: (
8511
+ id: string,
8512
+ data: UpdateAiCanonicalFieldRequest,
8513
+ params: RequestParams = {},
8514
+ ) =>
8515
+ this.request<AiCanonicalField, ProblemDetails>({
8516
+ path: `/api/ai/admin/fields/${id}`,
8517
+ method: "PUT",
8518
+ body: data,
8519
+ secure: true,
8520
+ type: "application/json",
8521
+ format: "json",
8522
+ ...params,
8523
+ }),
8524
+
8525
+ /**
8526
+ * No description
8527
+ *
8528
+ * @tags AiCanonicalField
8529
+ * @name DeleteAiCanonicalField
8530
+ * @summary Delete canonical field
8531
+ * @request DELETE:/api/ai/admin/fields/{id}
8532
+ * @secure
8533
+ * @response `204` `void` No Content
8534
+ * @response `404` `ProblemDetails` Not Found
8535
+ */
8536
+ deleteAiCanonicalField: (id: string, params: RequestParams = {}) =>
8537
+ this.request<void, ProblemDetails>({
8538
+ path: `/api/ai/admin/fields/${id}`,
8539
+ method: "DELETE",
8540
+ secure: true,
8541
+ ...params,
8542
+ }),
8543
+
8544
+ /**
8545
+ * No description
8546
+ *
8547
+ * @tags AiCanonicalField
8548
+ * @name ToggleAiCanonicalField
8549
+ * @summary Toggle canonical field active/inactive
8550
+ * @request PATCH:/api/ai/admin/fields/{id}/toggle
8551
+ * @secure
8552
+ * @response `200` `AiCanonicalField` OK
8553
+ * @response `404` `ProblemDetails` Not Found
8554
+ */
8555
+ toggleAiCanonicalField: (id: string, params: RequestParams = {}) =>
8556
+ this.request<AiCanonicalField, ProblemDetails>({
8557
+ path: `/api/ai/admin/fields/${id}/toggle`,
8558
+ method: "PATCH",
8559
+ secure: true,
8560
+ format: "json",
8561
+ ...params,
8562
+ }),
8563
+
8564
+ /**
8565
+ * No description
8566
+ *
8567
+ * @tags AiChat
8568
+ * @name AiChat
8569
+ * @summary Send AI chat message
8570
+ * @request POST:/api/ai/chat
8571
+ * @secure
8572
+ * @response `200` `AiChat` OK
8573
+ * @response `400` `ProblemDetails` Bad Request
8574
+ * @response `401` `ProblemDetails` Unauthorized
8575
+ */
8576
+ aiChat: (data: AiChatRequest, params: RequestParams = {}) =>
8577
+ this.request<AiChat, ProblemDetails>({
8578
+ path: `/api/ai/chat`,
8579
+ method: "POST",
8580
+ body: data,
8581
+ secure: true,
8582
+ type: "application/json",
8583
+ format: "json",
8584
+ ...params,
8585
+ }),
8586
+
8587
+ /**
8588
+ * No description
8589
+ *
8590
+ * @tags AiConversation
8591
+ * @name GetAiConversations
8592
+ * @summary Get user conversations
8593
+ * @request GET:/api/ai/conversations
8594
+ * @secure
8595
+ * @response `200` `AiConversationListItemPaginated` OK
8596
+ */
8597
+ getAiConversations: (
8598
+ query?: {
8599
+ /** @format int32 */
8600
+ pageSize?: number;
8601
+ /** @format int32 */
8602
+ pageNumber?: number;
8603
+ sortBy?: string;
8604
+ sortDirection?: string;
8605
+ },
8606
+ params: RequestParams = {},
8607
+ ) =>
8608
+ this.request<AiConversationListItemPaginated, any>({
8609
+ path: `/api/ai/conversations`,
8610
+ method: "GET",
8611
+ query: query,
8612
+ secure: true,
8613
+ format: "json",
8614
+ ...params,
8615
+ }),
8616
+
8617
+ /**
8618
+ * No description
8619
+ *
8620
+ * @tags AiConversation
8621
+ * @name GetAiConversation
8622
+ * @summary Get conversation metadata
8623
+ * @request GET:/api/ai/conversations/{id}
8624
+ * @secure
8625
+ * @response `200` `AiConversationDetail` OK
8626
+ * @response `403` `ProblemDetails` Forbidden
8627
+ * @response `404` `ProblemDetails` Not Found
8628
+ */
8629
+ getAiConversation: (id: string, params: RequestParams = {}) =>
8630
+ this.request<AiConversationDetail, ProblemDetails>({
8631
+ path: `/api/ai/conversations/${id}`,
8632
+ method: "GET",
8633
+ secure: true,
8634
+ format: "json",
8635
+ ...params,
8636
+ }),
8637
+
8638
+ /**
8639
+ * No description
8640
+ *
8641
+ * @tags AiConversation
8642
+ * @name RenameAiConversation
8643
+ * @summary Rename conversation
8644
+ * @request PATCH:/api/ai/conversations/{id}
8645
+ * @secure
8646
+ * @response `200` `AiConversationDetail` OK
8647
+ * @response `400` `ProblemDetails` Bad Request
8648
+ * @response `403` `ProblemDetails` Forbidden
8649
+ * @response `404` `ProblemDetails` Not Found
8650
+ */
8651
+ renameAiConversation: (
8652
+ id: string,
8653
+ data: JsonPatchDocument,
8654
+ params: RequestParams = {},
8655
+ ) =>
8656
+ this.request<AiConversationDetail, ProblemDetails>({
8657
+ path: `/api/ai/conversations/${id}`,
8658
+ method: "PATCH",
8659
+ body: data,
8660
+ secure: true,
8661
+ type: "application/json",
8662
+ format: "json",
8663
+ ...params,
8664
+ }),
8665
+
8666
+ /**
8667
+ * No description
8668
+ *
8669
+ * @tags AiConversation
8670
+ * @name DeleteAiConversation
8671
+ * @summary Delete conversation
8672
+ * @request DELETE:/api/ai/conversations/{id}
8673
+ * @secure
8674
+ * @response `204` `void` No Content
8675
+ * @response `403` `ProblemDetails` Forbidden
8676
+ * @response `404` `ProblemDetails` Not Found
8677
+ */
8678
+ deleteAiConversation: (id: string, params: RequestParams = {}) =>
8679
+ this.request<void, ProblemDetails>({
8680
+ path: `/api/ai/conversations/${id}`,
8681
+ method: "DELETE",
8682
+ secure: true,
8683
+ ...params,
8684
+ }),
8685
+
8686
+ /**
8687
+ * No description
8688
+ *
8689
+ * @tags AiConversation
8690
+ * @name GetAiConversationMessages
8691
+ * @summary Get conversation messages
8692
+ * @request GET:/api/ai/conversations/{id}/messages
8693
+ * @secure
8694
+ * @response `200` `AiChatMessagePaginated` OK
8695
+ * @response `403` `ProblemDetails` Forbidden
8696
+ * @response `404` `ProblemDetails` Not Found
8697
+ */
8698
+ getAiConversationMessages: (
8699
+ id: string,
8700
+ query?: {
8701
+ /** @format int32 */
8702
+ pageSize?: number;
8703
+ /** @format int32 */
8704
+ pageNumber?: number;
8705
+ sortBy?: string;
8706
+ sortDirection?: string;
8707
+ },
8708
+ params: RequestParams = {},
8709
+ ) =>
8710
+ this.request<AiChatMessagePaginated, ProblemDetails>({
8711
+ path: `/api/ai/conversations/${id}/messages`,
8712
+ method: "GET",
8713
+ query: query,
8714
+ secure: true,
8715
+ format: "json",
8716
+ ...params,
8717
+ }),
8718
+
8719
+ /**
8720
+ * No description
8721
+ *
8722
+ * @tags AiConversation
8723
+ * @name ClearAiConversationHistory
8724
+ * @summary Clear conversation history
8725
+ * @request DELETE:/api/ai/conversations/{id}/messages
8726
+ * @secure
8727
+ * @response `204` `void` No Content
8728
+ * @response `403` `ProblemDetails` Forbidden
8729
+ * @response `404` `ProblemDetails` Not Found
8730
+ */
8731
+ clearAiConversationHistory: (id: string, params: RequestParams = {}) =>
8732
+ this.request<void, ProblemDetails>({
8733
+ path: `/api/ai/conversations/${id}/messages`,
8734
+ method: "DELETE",
8735
+ secure: true,
8736
+ ...params,
8737
+ }),
8738
+
8739
+ /**
8740
+ * No description
8741
+ *
8742
+ * @tags AiConversation
8743
+ * @name PinAiConversation
8744
+ * @summary Pin or unpin conversation
8745
+ * @request PUT:/api/ai/conversations/{id}/pin
8746
+ * @secure
8747
+ * @response `200` `AiConversationDetail` OK
8748
+ * @response `403` `ProblemDetails` Forbidden
8749
+ * @response `404` `ProblemDetails` Not Found
8750
+ */
8751
+ pinAiConversation: (
8752
+ id: string,
8753
+ data: PinAiConversationRequest,
8754
+ params: RequestParams = {},
8755
+ ) =>
8756
+ this.request<AiConversationDetail, ProblemDetails>({
8757
+ path: `/api/ai/conversations/${id}/pin`,
8758
+ method: "PUT",
8759
+ body: data,
8760
+ secure: true,
8761
+ type: "application/json",
8762
+ format: "json",
8763
+ ...params,
8764
+ }),
8765
+
8766
+ /**
8767
+ * No description
8768
+ *
8769
+ * @tags AiConversationAdmin
8770
+ * @name GetAiAccountConversations
8771
+ * @summary List AI conversations across the account, optionally filtered by user (admin supervision)
8772
+ * @request GET:/api/ai/admin/conversations
8773
+ * @secure
8774
+ * @response `200` `AiConversationListItemPaginated` OK
8775
+ */
8776
+ getAiAccountConversations: (
8777
+ query?: {
8778
+ /** @format uuid */
8779
+ userId?: string;
8780
+ /** @format int32 */
8781
+ pageSize?: number;
8782
+ /** @format int32 */
8783
+ pageNumber?: number;
8784
+ sortBy?: string;
8785
+ sortDirection?: string;
8786
+ },
8787
+ params: RequestParams = {},
8788
+ ) =>
8789
+ this.request<AiConversationListItemPaginated, any>({
8790
+ path: `/api/ai/admin/conversations`,
8791
+ method: "GET",
8792
+ query: query,
8793
+ secure: true,
8794
+ format: "json",
8795
+ ...params,
8796
+ }),
8797
+
8798
+ /**
8799
+ * No description
8800
+ *
8801
+ * @tags AiConversationAdmin
8802
+ * @name GetAiAccountConversation
8803
+ * @summary Get an account conversation's detail (admin supervision)
8804
+ * @request GET:/api/ai/admin/conversations/{id}
8805
+ * @secure
8806
+ * @response `200` `AiConversationDetail` OK
8807
+ * @response `404` `ProblemDetails` Not Found
8808
+ */
8809
+ getAiAccountConversation: (id: string, params: RequestParams = {}) =>
8810
+ this.request<AiConversationDetail, ProblemDetails>({
8811
+ path: `/api/ai/admin/conversations/${id}`,
8812
+ method: "GET",
8813
+ secure: true,
8814
+ format: "json",
8815
+ ...params,
8816
+ }),
8817
+
8818
+ /**
8819
+ * No description
8820
+ *
8821
+ * @tags AiConversationAdmin
8822
+ * @name GetAiAccountConversationMessages
8823
+ * @summary Get an account conversation's messages (admin supervision)
8824
+ * @request GET:/api/ai/admin/conversations/{id}/messages
8825
+ * @secure
8826
+ * @response `200` `AiChatMessagePaginated` OK
8827
+ * @response `404` `ProblemDetails` Not Found
8828
+ */
8829
+ getAiAccountConversationMessages: (
8830
+ id: string,
8831
+ query?: {
8832
+ /** @format int32 */
8833
+ pageSize?: number;
8834
+ /** @format int32 */
8835
+ pageNumber?: number;
8836
+ sortBy?: string;
8837
+ sortDirection?: string;
8838
+ },
8839
+ params: RequestParams = {},
8840
+ ) =>
8841
+ this.request<AiChatMessagePaginated, ProblemDetails>({
8842
+ path: `/api/ai/admin/conversations/${id}/messages`,
8843
+ method: "GET",
8844
+ query: query,
8845
+ secure: true,
8846
+ format: "json",
8847
+ ...params,
8848
+ }),
8849
+
8850
+ /**
8851
+ * No description
8852
+ *
8853
+ * @tags AiGuardrail
8854
+ * @name GetAiGuardrails
8855
+ * @summary Get all guardrails
8856
+ * @request GET:/api/ai/admin/guardrails
8857
+ * @secure
8858
+ * @response `200` `(AiGuardrail)[]` OK
8859
+ */
8860
+ getAiGuardrails: (params: RequestParams = {}) =>
8861
+ this.request<AiGuardrail[], any>({
8862
+ path: `/api/ai/admin/guardrails`,
8863
+ method: "GET",
8864
+ secure: true,
8865
+ format: "json",
8866
+ ...params,
8867
+ }),
8868
+
8869
+ /**
8870
+ * No description
8871
+ *
8872
+ * @tags AiGuardrail
8873
+ * @name CreateAiGuardrail
8874
+ * @summary Create custom guardrail
8875
+ * @request POST:/api/ai/admin/guardrails
8876
+ * @secure
8877
+ * @response `201` `AiGuardrail` Created
8878
+ * @response `400` `ProblemDetails` Bad Request
8879
+ */
8880
+ createAiGuardrail: (
8881
+ data: CreateAiGuardrailRequest,
8882
+ params: RequestParams = {},
8883
+ ) =>
8884
+ this.request<AiGuardrail, ProblemDetails>({
8885
+ path: `/api/ai/admin/guardrails`,
8886
+ method: "POST",
8887
+ body: data,
8888
+ secure: true,
8889
+ type: "application/json",
8890
+ format: "json",
8891
+ ...params,
8892
+ }),
8893
+
8894
+ /**
8895
+ * No description
8896
+ *
8897
+ * @tags AiGuardrail
8898
+ * @name GetAiGuardrail
8899
+ * @summary Get guardrail by ID
8900
+ * @request GET:/api/ai/admin/guardrails/{id}
8901
+ * @secure
8902
+ * @response `200` `AiGuardrail` OK
8903
+ * @response `404` `ProblemDetails` Not Found
8904
+ */
8905
+ getAiGuardrail: (id: string, params: RequestParams = {}) =>
8906
+ this.request<AiGuardrail, ProblemDetails>({
8907
+ path: `/api/ai/admin/guardrails/${id}`,
8908
+ method: "GET",
8909
+ secure: true,
8910
+ format: "json",
8911
+ ...params,
8912
+ }),
8913
+
8914
+ /**
8915
+ * No description
8916
+ *
8917
+ * @tags AiGuardrail
8918
+ * @name UpdateAiGuardrail
8919
+ * @summary Update guardrail
8920
+ * @request PUT:/api/ai/admin/guardrails/{id}
8921
+ * @secure
8922
+ * @response `200` `AiGuardrail` OK
8923
+ * @response `400` `ProblemDetails` Bad Request
8924
+ * @response `404` `ProblemDetails` Not Found
8925
+ */
8926
+ updateAiGuardrail: (
8927
+ id: string,
8928
+ data: UpdateAiGuardrailRequest,
8929
+ params: RequestParams = {},
8930
+ ) =>
8931
+ this.request<AiGuardrail, ProblemDetails>({
8932
+ path: `/api/ai/admin/guardrails/${id}`,
8933
+ method: "PUT",
8934
+ body: data,
8935
+ secure: true,
8936
+ type: "application/json",
8937
+ format: "json",
8938
+ ...params,
8939
+ }),
8940
+
8941
+ /**
8942
+ * No description
8943
+ *
8944
+ * @tags AiGuardrail
8945
+ * @name DeleteAiGuardrail
8946
+ * @summary Delete guardrail
8947
+ * @request DELETE:/api/ai/admin/guardrails/{id}
8948
+ * @secure
8949
+ * @response `204` `void` No Content
8950
+ * @response `400` `ProblemDetails` Bad Request
8951
+ * @response `404` `ProblemDetails` Not Found
8952
+ */
8953
+ deleteAiGuardrail: (id: string, params: RequestParams = {}) =>
8954
+ this.request<void, ProblemDetails>({
8955
+ path: `/api/ai/admin/guardrails/${id}`,
8956
+ method: "DELETE",
8957
+ secure: true,
8958
+ ...params,
8959
+ }),
8960
+
8961
+ /**
8962
+ * No description
8963
+ *
8964
+ * @tags AiGuardrail
8965
+ * @name ToggleAiGuardrail
8966
+ * @summary Toggle guardrail enabled/disabled
8967
+ * @request PATCH:/api/ai/admin/guardrails/{id}/toggle
8968
+ * @secure
8969
+ * @response `200` `AiGuardrail` OK
8970
+ * @response `404` `ProblemDetails` Not Found
8971
+ */
8972
+ toggleAiGuardrail: (id: string, params: RequestParams = {}) =>
8973
+ this.request<AiGuardrail, ProblemDetails>({
8974
+ path: `/api/ai/admin/guardrails/${id}/toggle`,
8975
+ method: "PATCH",
8976
+ secure: true,
8977
+ format: "json",
8978
+ ...params,
8979
+ }),
8980
+
8981
+ /**
8982
+ * No description
8983
+ *
8984
+ * @tags AiPrompt
8985
+ * @name GetAvailablePrompts
8986
+ * @summary Get available prompts for current user
8987
+ * @request GET:/api/ai/prompts
8988
+ * @secure
8989
+ * @response `200` `(AiPromptSummary)[]` OK
8990
+ */
8991
+ getAvailablePrompts: (
8992
+ query?: {
8993
+ documentType?: string;
8994
+ },
8995
+ params: RequestParams = {},
8996
+ ) =>
8997
+ this.request<AiPromptSummary[], any>({
8998
+ path: `/api/ai/prompts`,
8999
+ method: "GET",
9000
+ query: query,
9001
+ secure: true,
9002
+ format: "json",
9003
+ ...params,
9004
+ }),
9005
+
9006
+ /**
9007
+ * No description
9008
+ *
9009
+ * @tags AiSuperAdmin
9010
+ * @name GetAiAuditLogsCrossAccount
9011
+ * @summary Get AI audit logs for a specific account or across all accounts
9012
+ * @request GET:/api/ai/superadmin/audit-logs
9013
+ * @secure
9014
+ * @response `200` `AiAuditLogPaginated` OK
9015
+ */
9016
+ getAiAuditLogsCrossAccount: (
9017
+ query?: {
9018
+ /** @format uuid */
9019
+ accountId?: string;
9020
+ eventType?: AiAuditEventType;
9021
+ /** @format uuid */
9022
+ requestId?: string;
9023
+ /** @format uuid */
9024
+ userId?: string;
9025
+ /** @format uuid */
9026
+ conversationId?: string;
9027
+ blockedOnly?: boolean;
9028
+ /** @format date-time */
9029
+ startDate?: string;
9030
+ /** @format date-time */
9031
+ endDate?: string;
9032
+ /** @format int32 */
9033
+ pageSize?: number;
9034
+ /** @format int32 */
9035
+ pageNumber?: number;
9036
+ sortBy?: string;
9037
+ sortDirection?: string;
9038
+ },
9039
+ params: RequestParams = {},
9040
+ ) =>
9041
+ this.request<AiAuditLogPaginated, any>({
9042
+ path: `/api/ai/superadmin/audit-logs`,
9043
+ method: "GET",
9044
+ query: query,
9045
+ secure: true,
9046
+ format: "json",
9047
+ ...params,
9048
+ }),
9049
+
9050
+ /**
9051
+ * No description
9052
+ *
9053
+ * @tags AiSuperAdmin
9054
+ * @name GetAiRequestLifecycleCrossAccount
9055
+ * @summary Get the full event lifecycle of a single AI request from any account
9056
+ * @request GET:/api/ai/superadmin/audit-logs/request/{requestId}
9057
+ * @secure
9058
+ * @response `200` `(AiAuditLog)[]` OK
9059
+ */
9060
+ getAiRequestLifecycleCrossAccount: (
9061
+ requestId: string,
9062
+ query?: {
9063
+ /** @format uuid */
9064
+ accountId?: string;
9065
+ },
9066
+ params: RequestParams = {},
9067
+ ) =>
9068
+ this.request<AiAuditLog[], any>({
9069
+ path: `/api/ai/superadmin/audit-logs/request/${requestId}`,
9070
+ method: "GET",
9071
+ query: query,
9072
+ secure: true,
9073
+ format: "json",
9074
+ ...params,
9075
+ }),
9076
+
9077
+ /**
9078
+ * No description
9079
+ *
9080
+ * @tags AiSuperAdmin
9081
+ * @name GetAiStatsCrossAccount
9082
+ * @summary Get AI stats for a specific account or platform-wide
9083
+ * @request GET:/api/ai/superadmin/stats
9084
+ * @secure
9085
+ * @response `200` `AiAdminStats` OK
9086
+ */
9087
+ getAiStatsCrossAccount: (
9088
+ query?: {
9089
+ /** @format uuid */
9090
+ accountId?: string;
9091
+ /** @format date-time */
9092
+ startDate?: string;
9093
+ /** @format date-time */
9094
+ endDate?: string;
9095
+ },
9096
+ params: RequestParams = {},
9097
+ ) =>
9098
+ this.request<AiAdminStats, any>({
9099
+ path: `/api/ai/superadmin/stats`,
9100
+ method: "GET",
9101
+ query: query,
9102
+ secure: true,
9103
+ format: "json",
9104
+ ...params,
9105
+ }),
9106
+
6835
9107
  /**
6836
9108
  * No description
6837
9109
  *
6838
- * @tags Account
6839
- * @name GetMyAccount
6840
- * @summary Get
6841
- * @request GET:/api/account
9110
+ * @tags AiSuperAdmin
9111
+ * @name GetAiConfigChangesCrossAccount
9112
+ * @summary Get AI configuration change history for a specific account or across all accounts (incl. global defaults)
9113
+ * @request GET:/api/ai/superadmin/config-changes
6842
9114
  * @secure
6843
- * @response `200` `Account` OK
6844
- * @response `404` `ProblemDetails` Not Found
9115
+ * @response `200` `AiConfigChangeLogPaginated` OK
6845
9116
  */
6846
- getMyAccount: (params: RequestParams = {}) =>
6847
- this.request<Account, ProblemDetails>({
6848
- path: `/api/account`,
9117
+ getAiConfigChangesCrossAccount: (
9118
+ query?: {
9119
+ /** @format uuid */
9120
+ accountId?: string;
9121
+ entityType?: AiConfigEntityType;
9122
+ /** @format uuid */
9123
+ entityId?: string;
9124
+ /** @format uuid */
9125
+ actorUserId?: string;
9126
+ action?: AiConfigChangeAction;
9127
+ /** @format date-time */
9128
+ startDate?: string;
9129
+ /** @format date-time */
9130
+ endDate?: string;
9131
+ /** @format int32 */
9132
+ pageSize?: number;
9133
+ /** @format int32 */
9134
+ pageNumber?: number;
9135
+ sortBy?: string;
9136
+ sortDirection?: string;
9137
+ },
9138
+ params: RequestParams = {},
9139
+ ) =>
9140
+ this.request<AiConfigChangeLogPaginated, any>({
9141
+ path: `/api/ai/superadmin/config-changes`,
6849
9142
  method: "GET",
9143
+ query: query,
6850
9144
  secure: true,
6851
9145
  format: "json",
6852
9146
  ...params,
@@ -6855,22 +9149,29 @@ export class Api<
6855
9149
  /**
6856
9150
  * No description
6857
9151
  *
6858
- * @tags Account
6859
- * @name ReplaceMyAccount
6860
- * @summary Replace
6861
- * @request PUT:/api/account
9152
+ * @tags AiTokenUsageAdmin
9153
+ * @name SearchAiAccountTokenUsage
9154
+ * @summary Search accounts by current-month AI token usage and classification
9155
+ * @request POST:/api/ai/admin/token-usage/search
6862
9156
  * @secure
6863
- * @response `200` `Account` OK
6864
- * @response `404` `ProblemDetails` Not Found
6865
- * @response `422` `ProblemDetails` Unprocessable Content
9157
+ * @response `200` `AiAccountUsageOverviewPaginated` OK
6866
9158
  */
6867
- replaceMyAccount: (
6868
- data: UpdateAccountRequest,
9159
+ searchAiAccountTokenUsage: (
9160
+ data: SearchCriteria,
9161
+ query?: {
9162
+ /** @format int32 */
9163
+ pageSize?: number;
9164
+ /** @format int32 */
9165
+ pageNumber?: number;
9166
+ sortBy?: string;
9167
+ sortDirection?: string;
9168
+ },
6869
9169
  params: RequestParams = {},
6870
9170
  ) =>
6871
- this.request<Account, ProblemDetails>({
6872
- path: `/api/account`,
6873
- method: "PUT",
9171
+ this.request<AiAccountUsageOverviewPaginated, any>({
9172
+ path: `/api/ai/admin/token-usage/search`,
9173
+ method: "POST",
9174
+ query: query,
6874
9175
  body: data,
6875
9176
  secure: true,
6876
9177
  type: "application/json",
@@ -6881,16 +9182,16 @@ export class Api<
6881
9182
  /**
6882
9183
  * No description
6883
9184
  *
6884
- * @tags Account
6885
- * @name GetSiteConfigurationByAccount
6886
- * @summary Get Site Configuration
6887
- * @request GET:/api/account/site-configurations
9185
+ * @tags AiTokenUsageAdmin
9186
+ * @name GetAiAccountTokenUsage
9187
+ * @summary Get an account's current-month AI token usage
9188
+ * @request GET:/api/ai/admin/token-usage/{accountId}
6888
9189
  * @secure
6889
- * @response `200` `SiteConfiguration` OK
9190
+ * @response `200` `AiTokenBudgetStatus` OK
6890
9191
  */
6891
- getSiteConfigurationByAccount: (params: RequestParams = {}) =>
6892
- this.request<SiteConfiguration, any>({
6893
- path: `/api/account/site-configurations`,
9192
+ getAiAccountTokenUsage: (accountId: string, params: RequestParams = {}) =>
9193
+ this.request<AiTokenBudgetStatus, any>({
9194
+ path: `/api/ai/admin/token-usage/${accountId}`,
6894
9195
  method: "GET",
6895
9196
  secure: true,
6896
9197
  format: "json",
@@ -6900,24 +9201,30 @@ export class Api<
6900
9201
  /**
6901
9202
  * No description
6902
9203
  *
6903
- * @tags Account
6904
- * @name UpdateSiteConfigurationForAccount
6905
- * @summary Update Site Configuration
6906
- * @request PUT:/api/account/site-configurations
9204
+ * @tags AiTokenUsageAdmin
9205
+ * @name GetAiAccountTokenUsageHistory
9206
+ * @summary Get an account's monthly AI token usage history
9207
+ * @request GET:/api/ai/admin/token-usage/{accountId}/history
6907
9208
  * @secure
6908
- * @response `200` `SiteConfiguration` OK
6909
- * @response `422` `UnprocessableEntity` Unprocessable Content
9209
+ * @response `200` `AiTokenUsageWindowPaginated` OK
6910
9210
  */
6911
- updateSiteConfigurationForAccount: (
6912
- data: SiteConfiguration,
9211
+ getAiAccountTokenUsageHistory: (
9212
+ accountId: string,
9213
+ query?: {
9214
+ /** @format int32 */
9215
+ pageSize?: number;
9216
+ /** @format int32 */
9217
+ pageNumber?: number;
9218
+ sortBy?: string;
9219
+ sortDirection?: string;
9220
+ },
6913
9221
  params: RequestParams = {},
6914
9222
  ) =>
6915
- this.request<SiteConfiguration, UnprocessableEntity>({
6916
- path: `/api/account/site-configurations`,
6917
- method: "PUT",
6918
- body: data,
9223
+ this.request<AiTokenUsageWindowPaginated, any>({
9224
+ path: `/api/ai/admin/token-usage/${accountId}/history`,
9225
+ method: "GET",
9226
+ query: query,
6919
9227
  secure: true,
6920
- type: "application/json",
6921
9228
  format: "json",
6922
9229
  ...params,
6923
9230
  }),
@@ -6925,63 +9232,88 @@ export class Api<
6925
9232
  /**
6926
9233
  * No description
6927
9234
  *
6928
- * @tags AccountReactivation
6929
- * @name RequestAccountReactivation
6930
- * @summary Request account reactivation
6931
- * @request POST:/api/account/reactivation/request
9235
+ * @tags AiTokenUsageAdmin
9236
+ * @name SetAiAccountTokenLimit
9237
+ * @summary Set or raise an account's monthly AI token limit
9238
+ * @request PUT:/api/ai/admin/token-usage/{accountId}/limit
6932
9239
  * @secure
6933
- * @response `204` `void` No Content
9240
+ * @response `200` `AiTokenBudgetStatus` OK
9241
+ * @response `400` `ProblemDetails` Bad Request
6934
9242
  */
6935
- requestAccountReactivation: (
6936
- data: AccountReactivationRequest,
9243
+ setAiAccountTokenLimit: (
9244
+ accountId: string,
9245
+ data: UpdateAiAccountTokenLimitRequest,
6937
9246
  params: RequestParams = {},
6938
9247
  ) =>
6939
- this.request<void, any>({
6940
- path: `/api/account/reactivation/request`,
6941
- method: "POST",
9248
+ this.request<AiTokenBudgetStatus, ProblemDetails>({
9249
+ path: `/api/ai/admin/token-usage/${accountId}/limit`,
9250
+ method: "PUT",
6942
9251
  body: data,
6943
9252
  secure: true,
6944
9253
  type: "application/json",
9254
+ format: "json",
6945
9255
  ...params,
6946
9256
  }),
6947
9257
 
6948
9258
  /**
6949
9259
  * No description
6950
9260
  *
6951
- * @tags AccountReactivation
6952
- * @name CompleteAccountReactivation
6953
- * @summary Complete account reactivation with new password
6954
- * @request POST:/api/account/reactivation/complete
9261
+ * @tags AiUrlSource
9262
+ * @name GetAiUrlSources
9263
+ * @summary Get all URL sources
9264
+ * @request GET:/api/ai/admin/url-sources
6955
9265
  * @secure
6956
- * @response `204` `void` No Content
9266
+ * @response `200` `(AiUrlSource)[]` OK
9267
+ */
9268
+ getAiUrlSources: (params: RequestParams = {}) =>
9269
+ this.request<AiUrlSource[], any>({
9270
+ path: `/api/ai/admin/url-sources`,
9271
+ method: "GET",
9272
+ secure: true,
9273
+ format: "json",
9274
+ ...params,
9275
+ }),
9276
+
9277
+ /**
9278
+ * No description
9279
+ *
9280
+ * @tags AiUrlSource
9281
+ * @name CreateAiUrlSource
9282
+ * @summary Create URL source
9283
+ * @request POST:/api/ai/admin/url-sources
9284
+ * @secure
9285
+ * @response `201` `AiUrlSource` Created
6957
9286
  * @response `400` `ProblemDetails` Bad Request
9287
+ * @response `409` `ProblemDetails` Conflict
6958
9288
  */
6959
- completeAccountReactivation: (
6960
- data: AccountReactivationCompleteRequest,
9289
+ createAiUrlSource: (
9290
+ data: CreateAiUrlSourceRequest,
6961
9291
  params: RequestParams = {},
6962
9292
  ) =>
6963
- this.request<void, ProblemDetails>({
6964
- path: `/api/account/reactivation/complete`,
9293
+ this.request<AiUrlSource, ProblemDetails>({
9294
+ path: `/api/ai/admin/url-sources`,
6965
9295
  method: "POST",
6966
9296
  body: data,
6967
9297
  secure: true,
6968
9298
  type: "application/json",
9299
+ format: "json",
6969
9300
  ...params,
6970
9301
  }),
6971
9302
 
6972
9303
  /**
6973
9304
  * No description
6974
9305
  *
6975
- * @tags Accounts
6976
- * @name GetAccounts
6977
- * @summary Get All
6978
- * @request GET:/api/accounts
9306
+ * @tags AiUrlSource
9307
+ * @name GetAiUrlSource
9308
+ * @summary Get URL source by ID
9309
+ * @request GET:/api/ai/admin/url-sources/{id}
6979
9310
  * @secure
6980
- * @response `200` `(Account)[]` OK
9311
+ * @response `200` `AiUrlSource` OK
9312
+ * @response `404` `ProblemDetails` Not Found
6981
9313
  */
6982
- getAccounts: (params: RequestParams = {}) =>
6983
- this.request<Account[], any>({
6984
- path: `/api/accounts`,
9314
+ getAiUrlSource: (id: string, params: RequestParams = {}) =>
9315
+ this.request<AiUrlSource, ProblemDetails>({
9316
+ path: `/api/ai/admin/url-sources/${id}`,
6985
9317
  method: "GET",
6986
9318
  secure: true,
6987
9319
  format: "json",
@@ -6991,18 +9323,24 @@ export class Api<
6991
9323
  /**
6992
9324
  * No description
6993
9325
  *
6994
- * @tags Accounts
6995
- * @name CreateAccount
6996
- * @summary Create
6997
- * @request POST:/api/accounts
9326
+ * @tags AiUrlSource
9327
+ * @name UpdateAiUrlSource
9328
+ * @summary Update URL source
9329
+ * @request PUT:/api/ai/admin/url-sources/{id}
6998
9330
  * @secure
6999
- * @response `201` `Account` Created
7000
- * @response `422` `ProblemDetails` Unprocessable Content
9331
+ * @response `200` `AiUrlSource` OK
9332
+ * @response `400` `ProblemDetails` Bad Request
9333
+ * @response `404` `ProblemDetails` Not Found
9334
+ * @response `409` `ProblemDetails` Conflict
7001
9335
  */
7002
- createAccount: (data: CreateAccountRequest, params: RequestParams = {}) =>
7003
- this.request<Account, ProblemDetails>({
7004
- path: `/api/accounts`,
7005
- method: "POST",
9336
+ updateAiUrlSource: (
9337
+ id: string,
9338
+ data: UpdateAiUrlSourceRequest,
9339
+ params: RequestParams = {},
9340
+ ) =>
9341
+ this.request<AiUrlSource, ProblemDetails>({
9342
+ path: `/api/ai/admin/url-sources/${id}`,
9343
+ method: "PUT",
7006
9344
  body: data,
7007
9345
  secure: true,
7008
9346
  type: "application/json",
@@ -7013,47 +9351,37 @@ export class Api<
7013
9351
  /**
7014
9352
  * No description
7015
9353
  *
7016
- * @tags Accounts
7017
- * @name GetAccount
7018
- * @summary Get by ID
7019
- * @request GET:/api/accounts/{id}
9354
+ * @tags AiUrlSource
9355
+ * @name DeleteAiUrlSource
9356
+ * @summary Delete URL source
9357
+ * @request DELETE:/api/ai/admin/url-sources/{id}
7020
9358
  * @secure
7021
- * @response `201` `Account` Created
7022
- * @response `422` `ProblemDetails` Unprocessable Content
9359
+ * @response `204` `void` No Content
9360
+ * @response `404` `ProblemDetails` Not Found
7023
9361
  */
7024
- getAccount: (id: string, params: RequestParams = {}) =>
7025
- this.request<Account, ProblemDetails>({
7026
- path: `/api/accounts/${id}`,
7027
- method: "GET",
9362
+ deleteAiUrlSource: (id: string, params: RequestParams = {}) =>
9363
+ this.request<void, ProblemDetails>({
9364
+ path: `/api/ai/admin/url-sources/${id}`,
9365
+ method: "DELETE",
7028
9366
  secure: true,
7029
- format: "json",
7030
9367
  ...params,
7031
9368
  }),
7032
9369
 
7033
9370
  /**
7034
9371
  * No description
7035
9372
  *
7036
- * @tags Accounts
7037
- * @name DeleteAccount
7038
- * @summary Delete
7039
- * @request DELETE:/api/accounts/{id}
9373
+ * @tags AiUrlSource
9374
+ * @name ToggleAiUrlSource
9375
+ * @summary Toggle URL source active/inactive
9376
+ * @request PATCH:/api/ai/admin/url-sources/{id}/toggle
7040
9377
  * @secure
7041
- * @response `204` `Account` No Content
9378
+ * @response `200` `AiUrlSource` OK
7042
9379
  * @response `404` `ProblemDetails` Not Found
7043
- * @response `422` `ProblemDetails` Unprocessable Content
7044
9380
  */
7045
- deleteAccount: (
7046
- id: string,
7047
- query?: {
7048
- /** @default false */
7049
- hardDelete?: boolean;
7050
- },
7051
- params: RequestParams = {},
7052
- ) =>
7053
- this.request<Account, ProblemDetails>({
7054
- path: `/api/accounts/${id}`,
7055
- method: "DELETE",
7056
- query: query,
9381
+ toggleAiUrlSource: (id: string, params: RequestParams = {}) =>
9382
+ this.request<AiUrlSource, ProblemDetails>({
9383
+ path: `/api/ai/admin/url-sources/${id}/toggle`,
9384
+ method: "PATCH",
7057
9385
  secure: true,
7058
9386
  format: "json",
7059
9387
  ...params,
@@ -7062,26 +9390,48 @@ export class Api<
7062
9390
  /**
7063
9391
  * No description
7064
9392
  *
7065
- * @tags Accounts
7066
- * @name UpdateAccountBilling
7067
- * @summary Update billing configuration
7068
- * @request PUT:/api/accounts/{id}/billing
9393
+ * @tags AiUsage
9394
+ * @name GetAiUsage
9395
+ * @summary Get the current account's AI token usage for the active monthly window
9396
+ * @request GET:/api/ai/usage
7069
9397
  * @secure
7070
- * @response `200` `AccountBilling` OK
7071
- * @response `404` `ProblemDetails` Not Found
7072
- * @response `422` `ProblemDetails` Unprocessable Content
9398
+ * @response `200` `AiTokenBudgetStatus` OK
7073
9399
  */
7074
- updateAccountBilling: (
7075
- id: string,
7076
- data: AccountBillingRequest,
9400
+ getAiUsage: (params: RequestParams = {}) =>
9401
+ this.request<AiTokenBudgetStatus, any>({
9402
+ path: `/api/ai/usage`,
9403
+ method: "GET",
9404
+ secure: true,
9405
+ format: "json",
9406
+ ...params,
9407
+ }),
9408
+
9409
+ /**
9410
+ * No description
9411
+ *
9412
+ * @tags AiUsage
9413
+ * @name GetAiUsageHistory
9414
+ * @summary Get the current account's monthly AI token usage history
9415
+ * @request GET:/api/ai/usage/history
9416
+ * @secure
9417
+ * @response `200` `AiTokenUsageWindowPaginated` OK
9418
+ */
9419
+ getAiUsageHistory: (
9420
+ query?: {
9421
+ /** @format int32 */
9422
+ pageSize?: number;
9423
+ /** @format int32 */
9424
+ pageNumber?: number;
9425
+ sortBy?: string;
9426
+ sortDirection?: string;
9427
+ },
7077
9428
  params: RequestParams = {},
7078
9429
  ) =>
7079
- this.request<AccountBilling, ProblemDetails>({
7080
- path: `/api/accounts/${id}/billing`,
7081
- method: "PUT",
7082
- body: data,
9430
+ this.request<AiTokenUsageWindowPaginated, any>({
9431
+ path: `/api/ai/usage/history`,
9432
+ method: "GET",
9433
+ query: query,
7083
9434
  secure: true,
7084
- type: "application/json",
7085
9435
  format: "json",
7086
9436
  ...params,
7087
9437
  }),
@@ -11009,6 +13359,34 @@ export class Api<
11009
13359
  ...params,
11010
13360
  }),
11011
13361
 
13362
+ /**
13363
+ * No description
13364
+ *
13365
+ * @tags LoanDocuments
13366
+ * @name ClassifyLoanDocumentManually
13367
+ * @summary Manually classify a loan document
13368
+ * @request POST:/api/loans/{loanId}/documents/{documentId}/classify-manual
13369
+ * @secure
13370
+ * @response `200` `LoanDocument` OK
13371
+ * @response `404` `ProblemDetails` Not Found
13372
+ * @response `422` `UnprocessableEntity` Unprocessable Content
13373
+ */
13374
+ classifyLoanDocumentManually: (
13375
+ loanId: string,
13376
+ documentId: string,
13377
+ data: ManualDocumentClassificationRequest,
13378
+ params: RequestParams = {},
13379
+ ) =>
13380
+ this.request<LoanDocument, ProblemDetails | UnprocessableEntity>({
13381
+ path: `/api/loans/${loanId}/documents/${documentId}/classify-manual`,
13382
+ method: "POST",
13383
+ body: data,
13384
+ secure: true,
13385
+ type: "application/json",
13386
+ format: "json",
13387
+ ...params,
13388
+ }),
13389
+
11012
13390
  /**
11013
13391
  * @description Re-attempts to push a failed document to LOS
11014
13392
  *
@@ -11448,6 +13826,32 @@ export class Api<
11448
13826
  ...params,
11449
13827
  }),
11450
13828
 
13829
+ /**
13830
+ * No description
13831
+ *
13832
+ * @tags LoanNotification
13833
+ * @name SendESignatureReminder
13834
+ * @summary Send eSignature Reminder
13835
+ * @request POST:/api/loans/{loanID}/notifications/esignature-reminders
13836
+ * @secure
13837
+ * @response `204` `void` No Content
13838
+ * @response `400` `ProblemDetails` Bad Request
13839
+ * @response `404` `ProblemDetails` Not Found
13840
+ */
13841
+ sendESignatureReminder: (
13842
+ loanId: string,
13843
+ data: SendESignatureReminderRequest,
13844
+ params: RequestParams = {},
13845
+ ) =>
13846
+ this.request<void, ProblemDetails>({
13847
+ path: `/api/loans/${loanId}/notifications/esignature-reminders`,
13848
+ method: "POST",
13849
+ body: data,
13850
+ secure: true,
13851
+ type: "application/json",
13852
+ ...params,
13853
+ }),
13854
+
11451
13855
  /**
11452
13856
  * No description
11453
13857
  *