@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/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
  }
@@ -3109,9 +3780,18 @@ export interface LoanBorrowerRealEstateAsset {
3109
3780
  /** @format double */
3110
3781
  marketValue?: number | null;
3111
3782
  /** @format double */
3783
+ purchasePrice?: number | null;
3784
+ /** @format int32 */
3785
+ yearBuilt?: number | null;
3786
+ /** @format int32 */
3787
+ numberOfUnits?: number | null;
3788
+ /** @format double */
3112
3789
  monthlyInsTaxDues?: number | null;
3113
3790
  /** @format double */
3114
3791
  monthlyRentalIncome?: number | null;
3792
+ /** @format double */
3793
+ maintenanceExpense?: number | null;
3794
+ dispositionStatus?: string | null;
3115
3795
  address?: AddressV3 | null;
3116
3796
  mortgages?: LoanBorrowerRealEstateAssetMortgage[] | null;
3117
3797
  }
@@ -3347,6 +4027,13 @@ export interface LoanDocument {
3347
4027
  failoverDocumentPath?: string | null;
3348
4028
  /** @format date-time */
3349
4029
  sensitiveDataPurgedOn?: string | null;
4030
+ observedDocumentType?: LoanDocumentType | null;
4031
+ classificationSource?: ClassificationSource | null;
4032
+ verified: boolean;
4033
+ /** @format date-time */
4034
+ classifiedAt?: string | null;
4035
+ classificationMismatch: boolean;
4036
+ classificationMismatchReason?: string | null;
3350
4037
  }
3351
4038
 
3352
4039
  export interface LoanDocumentFolder {
@@ -4004,6 +4691,10 @@ export interface LosWebhook {
4004
4691
  enableSubscription: boolean;
4005
4692
  }
4006
4693
 
4694
+ export interface ManualDocumentClassificationRequest {
4695
+ documentType: ManualDocumentClassificationRequestDocumentTypeEnum;
4696
+ }
4697
+
4007
4698
  export interface MdmUser {
4008
4699
  user_email?: string | null;
4009
4700
  user_id?: string | null;
@@ -4327,6 +5018,10 @@ export interface PendingTasksSummary {
4327
5018
  borrowers: BorrowerCount[];
4328
5019
  }
4329
5020
 
5021
+ export interface PinAiConversationRequest {
5022
+ isPinned: boolean;
5023
+ }
5024
+
4330
5025
  export interface PostLoanComparisonPdfRequest {
4331
5026
  /** @format uuid */
4332
5027
  siteConfigurationID: string;
@@ -4487,6 +5182,10 @@ export interface RegisterUserRequest {
4487
5182
  inviteCode?: string | null;
4488
5183
  }
4489
5184
 
5185
+ export interface RenameAiConversationRequest {
5186
+ name: string;
5187
+ }
5188
+
4490
5189
  export interface RequestImpersonationRequest {
4491
5190
  email: string;
4492
5191
  }
@@ -4571,6 +5270,15 @@ export interface SSOTokenRequest {
4571
5270
  redirectUri?: string | null;
4572
5271
  }
4573
5272
 
5273
+ export interface SearchCriteria {
5274
+ searchText?: string | null;
5275
+ }
5276
+
5277
+ export interface SendESignatureReminderRequest {
5278
+ /** @format uuid */
5279
+ userId: string;
5280
+ }
5281
+
4574
5282
  export interface SendForgotPasswordRequest {
4575
5283
  email: string;
4576
5284
  }
@@ -5271,6 +5979,14 @@ export interface SocialSurveyRecord {
5271
5979
  reviewCompletedTimeStamp?: string | null;
5272
5980
  }
5273
5981
 
5982
+ export interface SupportedModel {
5983
+ modelId: string;
5984
+ displayName: string;
5985
+ provider: string;
5986
+ description?: string | null;
5987
+ isDefault: boolean;
5988
+ }
5989
+
5274
5990
  export interface SurveyEmailRequest {
5275
5991
  loanOfficerEmailAddress: string;
5276
5992
  }
@@ -5519,6 +6235,52 @@ export interface UpdateAccountRequest {
5519
6235
  settings: AccountSettingsRequest;
5520
6236
  }
5521
6237
 
6238
+ export interface UpdateAiAccountTokenLimitRequest {
6239
+ /** @format int32 */
6240
+ tokenLimit: number;
6241
+ }
6242
+
6243
+ export interface UpdateAiCanonicalFieldRequest {
6244
+ displayName: string;
6245
+ description: string;
6246
+ allowedRoles: string[];
6247
+ isPii: boolean;
6248
+ category?: string | null;
6249
+ }
6250
+
6251
+ export interface UpdateAiGuardrailRequest {
6252
+ name: string;
6253
+ category: UpdateAiGuardrailRequestCategoryEnum;
6254
+ description?: string | null;
6255
+ keywords: string[];
6256
+ responseTemplate: string;
6257
+ }
6258
+
6259
+ export interface UpdateAiPromptRequest {
6260
+ title: string;
6261
+ description: string;
6262
+ documentTypes: string[];
6263
+ applicableUrlSourceIds: string[];
6264
+ allowedRoles: string[];
6265
+ systemPrompt: string;
6266
+ /** @format int32 */
6267
+ sortOrder: number;
6268
+ category?: AiPromptCategory | null;
6269
+ queryTemplateName?: AiQueryTemplateName | null;
6270
+ displayHint?: AiDisplayHint | null;
6271
+ bedrockModelId?: string | null;
6272
+ requiredDataSources?: string[] | null;
6273
+ outputType?: AiOutputType | null;
6274
+ }
6275
+
6276
+ export interface UpdateAiUrlSourceRequest {
6277
+ name: string;
6278
+ url: string;
6279
+ description?: string | null;
6280
+ category: UpdateAiUrlSourceRequestCategoryEnum;
6281
+ scope: UpdateAiUrlSourceRequestScopeEnum;
6282
+ }
6283
+
5522
6284
  export interface UpdateCustomFieldDefinitionRequest {
5523
6285
  isRequired: boolean;
5524
6286
  /** @format int32 */
@@ -6084,6 +6846,78 @@ export interface Workflow {
6084
6846
 
6085
6847
  export type AccountBillingRequestBillingTypeEnum = "ClosedLoan" | "LoanOfficer";
6086
6848
 
6849
+ export type AiAuditLogEventTypeEnum =
6850
+ | "Error"
6851
+ | "GuardrailBlockedPre"
6852
+ | "GuardrailPassedPre"
6853
+ | "IntentClassified"
6854
+ | "LoanResolvedFromMessage"
6855
+ | "DocumentNotFound"
6856
+ | "GuardrailBlockedPost"
6857
+ | "GuardrailPassedPost"
6858
+ | "DocumentAnalyzed"
6859
+ | "DocumentList"
6860
+ | "DocumentResolutionAmbiguous"
6861
+ | "ResponseGenerated"
6862
+ | "ParametersExtracted"
6863
+ | "QueryExecuted"
6864
+ | "LoanContextNotFound"
6865
+ | "LoanContextLoaded"
6866
+ | "GuardrailBlockedBedrock"
6867
+ | "PromptMatched"
6868
+ | "QueryCondensed"
6869
+ | "IntentParseFailed"
6870
+ | "LoanSearchTermDiscarded"
6871
+ | "CanonicalFieldsSelected";
6872
+
6873
+ export type AiChatMetadataIntentEnum =
6874
+ | "Greeting"
6875
+ | "Invalid"
6876
+ | "Relevant"
6877
+ | "LoanSpecific"
6878
+ | "DocumentList"
6879
+ | "GeneralKnowledge"
6880
+ | "Blocked"
6881
+ | "Action"
6882
+ | "ConversationMeta"
6883
+ | "Capabilities"
6884
+ | "UsageReport";
6885
+
6886
+ export type AiChatStructuredDataTypeEnum =
6887
+ | "Table"
6888
+ | "DocumentAnalysis"
6889
+ | "DocumentList"
6890
+ | "GeneratedDocument";
6891
+
6892
+ export type AiConfigChangeLogEntityTypeEnum =
6893
+ | "Prompt"
6894
+ | "Guardrail"
6895
+ | "CanonicalField"
6896
+ | "UrlSource"
6897
+ | "AdminSettings"
6898
+ | "AccountTokenSettings"
6899
+ | "AccountSettings";
6900
+
6901
+ export type AiConfigChangeLogActionEnum =
6902
+ | "Created"
6903
+ | "Updated"
6904
+ | "Deleted"
6905
+ | "Toggled";
6906
+
6907
+ export type AiGuardrailCategoryEnum =
6908
+ | "ContentSafety"
6909
+ | "PromptInjection"
6910
+ | "Privacy"
6911
+ | "Legal";
6912
+
6913
+ export type AiUrlSourceCategoryEnum =
6914
+ | "Regulatory"
6915
+ | "Guidelines"
6916
+ | "MarketData"
6917
+ | "Custom";
6918
+
6919
+ export type AiUrlSourceScopeEnum = "FullDomain" | "SpecificPath";
6920
+
6087
6921
  export type AuditLogEntryChangeTypeEnum =
6088
6922
  | "Created"
6089
6923
  | "Modified"
@@ -6131,6 +6965,20 @@ export type CreateAccountRequestEnvironmentEnum =
6131
6965
  | "UAT"
6132
6966
  | "Production";
6133
6967
 
6968
+ export type CreateAiGuardrailRequestCategoryEnum =
6969
+ | "ContentSafety"
6970
+ | "PromptInjection"
6971
+ | "Privacy"
6972
+ | "Legal";
6973
+
6974
+ export type CreateAiUrlSourceRequestCategoryEnum =
6975
+ | "Regulatory"
6976
+ | "Guidelines"
6977
+ | "MarketData"
6978
+ | "Custom";
6979
+
6980
+ export type CreateAiUrlSourceRequestScopeEnum = "FullDomain" | "SpecificPath";
6981
+
6134
6982
  export type CreateCustomFieldDefinitionRequestDataTypeEnum =
6135
6983
  | "String"
6136
6984
  | "Number"
@@ -6293,6 +7141,12 @@ export type FusionReportFilterFilterTypeEnum =
6293
7141
  | "StringNotEquals"
6294
7142
  | "StringNotContains";
6295
7143
 
7144
+ export type GenerateSystemPromptRequestCategoryEnum =
7145
+ | "DocumentAnalysis"
7146
+ | "DataQuery"
7147
+ | "General"
7148
+ | "Action";
7149
+
6296
7150
  export type IpAddressAddressFamilyEnum =
6297
7151
  | "Unspecified"
6298
7152
  | "Unix"
@@ -6418,7 +7272,8 @@ export type LoanLogTypeEnum =
6418
7272
  | "SensitiveDataPurge"
6419
7273
  | "ClosingDateUpdated"
6420
7274
  | "ConsumerConnectAssociation"
6421
- | "TaskReminderSent";
7275
+ | "TaskReminderSent"
7276
+ | "DocumentClassified";
6422
7277
 
6423
7278
  export type LoanLogDetailLevelEnum = "None" | "Info" | "Warning" | "Error";
6424
7279
 
@@ -6438,7 +7293,8 @@ export type LoanLogDetailTypeEnum =
6438
7293
  | "SensitiveDataPurge"
6439
7294
  | "ClosingDateUpdated"
6440
7295
  | "ConsumerConnectAssociation"
6441
- | "TaskReminderSent";
7296
+ | "TaskReminderSent"
7297
+ | "DocumentClassified";
6442
7298
 
6443
7299
  export type LoanTaskStatusSummaryStatusEnum =
6444
7300
  | "Outstanding"
@@ -6472,6 +7328,66 @@ export type LosOperationTrackingStatusEnum =
6472
7328
 
6473
7329
  export type LosSyncStepSeverityEnum = "Success" | "Info" | "Warning" | "Error";
6474
7330
 
7331
+ export type ManualDocumentClassificationRequestDocumentTypeEnum =
7332
+ | "W2"
7333
+ | "Paystub"
7334
+ | "Form1099"
7335
+ | "Form1099Int"
7336
+ | "Form1099Misc"
7337
+ | "Form1099Nec"
7338
+ | "Form1099R"
7339
+ | "Form1099G"
7340
+ | "Form1099Div"
7341
+ | "Form1099Ssa"
7342
+ | "FederalTaxReturn1040"
7343
+ | "TaxReturnScheduleC"
7344
+ | "TaxReturnScheduleD"
7345
+ | "TaxReturnScheduleE"
7346
+ | "Form1065"
7347
+ | "Form1120"
7348
+ | "Form1120S"
7349
+ | "ProfitAndLossStatement"
7350
+ | "VerificationOfEmployment"
7351
+ | "BankStatement"
7352
+ | "InvestmentStatement"
7353
+ | "CreditCardStatement"
7354
+ | "MortgageStatement"
7355
+ | "PayoffStatement"
7356
+ | "HoaDocuments"
7357
+ | "UtilityBill"
7358
+ | "IdentityDocument"
7359
+ | "DemographicAddendum"
7360
+ | "Ssa89"
7361
+ | "Vba260551"
7362
+ | "Hud92900B"
7363
+ | "Check"
7364
+ | "Invoice"
7365
+ | "Receipt"
7366
+ | "LoanApplication1003"
7367
+ | "UnderwritingTransmittal1008"
7368
+ | "Other"
7369
+ | "SalesContract"
7370
+ | "TitleCommitment"
7371
+ | "DriversLicense"
7372
+ | "VerificationOfIncome"
7373
+ | "VerificationOfAssets"
7374
+ | "FloodCertificate"
7375
+ | "FraudReport"
7376
+ | "AddendumToSalesContract"
7377
+ | "GiftLetter"
7378
+ | "CpaLetter"
7379
+ | "TaxBill"
7380
+ | "CondoQuestionnaire"
7381
+ | "CondoBudget"
7382
+ | "CondoBylaws"
7383
+ | "RentalAgreements"
7384
+ | "Lease"
7385
+ | "HazardInsurance"
7386
+ | "VaCertificateOfEligibility"
7387
+ | "Appraisal"
7388
+ | "CreditReport"
7389
+ | "CondoMasterPolicy";
7390
+
6475
7391
  export type SiteConfigurationTypeEnum =
6476
7392
  | "None"
6477
7393
  | "Account"
@@ -6527,6 +7443,20 @@ export type UnregisteredBorrowerRoleEnum =
6527
7443
  | "SettlementAgent"
6528
7444
  | "Admin";
6529
7445
 
7446
+ export type UpdateAiGuardrailRequestCategoryEnum =
7447
+ | "ContentSafety"
7448
+ | "PromptInjection"
7449
+ | "Privacy"
7450
+ | "Legal";
7451
+
7452
+ export type UpdateAiUrlSourceRequestCategoryEnum =
7453
+ | "Regulatory"
7454
+ | "Guidelines"
7455
+ | "MarketData"
7456
+ | "Custom";
7457
+
7458
+ export type UpdateAiUrlSourceRequestScopeEnum = "FullDomain" | "SpecificPath";
7459
+
6530
7460
  export type UserDraftRoleEnum =
6531
7461
  | "Borrower"
6532
7462
  | "CoBorrower"
@@ -6790,7 +7720,7 @@ export class HttpClient<SecurityDataType = unknown> {
6790
7720
 
6791
7721
  /**
6792
7722
  * @title The Big POS API
6793
- * @version v2.44.2
7723
+ * @version v2.45.0
6794
7724
  * @termsOfService https://www.thebigpos.com/terms-of-use/
6795
7725
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
6796
7726
  */
@@ -6831,22 +7761,1395 @@ export class Api<
6831
7761
  ...params,
6832
7762
  });
6833
7763
 
6834
- api = {
7764
+ api = {
7765
+ /**
7766
+ * No description
7767
+ *
7768
+ * @tags Account
7769
+ * @name GetMyAccount
7770
+ * @summary Get
7771
+ * @request GET:/api/account
7772
+ * @secure
7773
+ * @response `200` `Account` OK
7774
+ * @response `404` `ProblemDetails` Not Found
7775
+ */
7776
+ getMyAccount: (params: RequestParams = {}) =>
7777
+ this.request<Account, ProblemDetails>({
7778
+ path: `/api/account`,
7779
+ method: "GET",
7780
+ secure: true,
7781
+ format: "json",
7782
+ ...params,
7783
+ }),
7784
+
7785
+ /**
7786
+ * No description
7787
+ *
7788
+ * @tags Account
7789
+ * @name ReplaceMyAccount
7790
+ * @summary Replace
7791
+ * @request PUT:/api/account
7792
+ * @secure
7793
+ * @response `200` `Account` OK
7794
+ * @response `404` `ProblemDetails` Not Found
7795
+ * @response `422` `ProblemDetails` Unprocessable Content
7796
+ */
7797
+ replaceMyAccount: (
7798
+ data: UpdateAccountRequest,
7799
+ params: RequestParams = {},
7800
+ ) =>
7801
+ this.request<Account, ProblemDetails>({
7802
+ path: `/api/account`,
7803
+ method: "PUT",
7804
+ body: data,
7805
+ secure: true,
7806
+ type: "application/json",
7807
+ format: "json",
7808
+ ...params,
7809
+ }),
7810
+
7811
+ /**
7812
+ * No description
7813
+ *
7814
+ * @tags Account
7815
+ * @name GetSiteConfigurationByAccount
7816
+ * @summary Get Site Configuration
7817
+ * @request GET:/api/account/site-configurations
7818
+ * @secure
7819
+ * @response `200` `SiteConfiguration` OK
7820
+ */
7821
+ getSiteConfigurationByAccount: (params: RequestParams = {}) =>
7822
+ this.request<SiteConfiguration, any>({
7823
+ path: `/api/account/site-configurations`,
7824
+ method: "GET",
7825
+ secure: true,
7826
+ format: "json",
7827
+ ...params,
7828
+ }),
7829
+
7830
+ /**
7831
+ * No description
7832
+ *
7833
+ * @tags Account
7834
+ * @name UpdateSiteConfigurationForAccount
7835
+ * @summary Update Site Configuration
7836
+ * @request PUT:/api/account/site-configurations
7837
+ * @secure
7838
+ * @response `200` `SiteConfiguration` OK
7839
+ * @response `422` `UnprocessableEntity` Unprocessable Content
7840
+ */
7841
+ updateSiteConfigurationForAccount: (
7842
+ data: SiteConfiguration,
7843
+ params: RequestParams = {},
7844
+ ) =>
7845
+ this.request<SiteConfiguration, UnprocessableEntity>({
7846
+ path: `/api/account/site-configurations`,
7847
+ method: "PUT",
7848
+ body: data,
7849
+ secure: true,
7850
+ type: "application/json",
7851
+ format: "json",
7852
+ ...params,
7853
+ }),
7854
+
7855
+ /**
7856
+ * No description
7857
+ *
7858
+ * @tags AccountReactivation
7859
+ * @name RequestAccountReactivation
7860
+ * @summary Request account reactivation
7861
+ * @request POST:/api/account/reactivation/request
7862
+ * @secure
7863
+ * @response `204` `void` No Content
7864
+ */
7865
+ requestAccountReactivation: (
7866
+ data: AccountReactivationRequest,
7867
+ params: RequestParams = {},
7868
+ ) =>
7869
+ this.request<void, any>({
7870
+ path: `/api/account/reactivation/request`,
7871
+ method: "POST",
7872
+ body: data,
7873
+ secure: true,
7874
+ type: "application/json",
7875
+ ...params,
7876
+ }),
7877
+
7878
+ /**
7879
+ * No description
7880
+ *
7881
+ * @tags AccountReactivation
7882
+ * @name CompleteAccountReactivation
7883
+ * @summary Complete account reactivation with new password
7884
+ * @request POST:/api/account/reactivation/complete
7885
+ * @secure
7886
+ * @response `204` `void` No Content
7887
+ * @response `400` `ProblemDetails` Bad Request
7888
+ */
7889
+ completeAccountReactivation: (
7890
+ data: AccountReactivationCompleteRequest,
7891
+ params: RequestParams = {},
7892
+ ) =>
7893
+ this.request<void, ProblemDetails>({
7894
+ path: `/api/account/reactivation/complete`,
7895
+ method: "POST",
7896
+ body: data,
7897
+ secure: true,
7898
+ type: "application/json",
7899
+ ...params,
7900
+ }),
7901
+
7902
+ /**
7903
+ * No description
7904
+ *
7905
+ * @tags Accounts
7906
+ * @name GetAccounts
7907
+ * @summary Get All
7908
+ * @request GET:/api/accounts
7909
+ * @secure
7910
+ * @response `200` `(Account)[]` OK
7911
+ */
7912
+ getAccounts: (params: RequestParams = {}) =>
7913
+ this.request<Account[], any>({
7914
+ path: `/api/accounts`,
7915
+ method: "GET",
7916
+ secure: true,
7917
+ format: "json",
7918
+ ...params,
7919
+ }),
7920
+
7921
+ /**
7922
+ * No description
7923
+ *
7924
+ * @tags Accounts
7925
+ * @name CreateAccount
7926
+ * @summary Create
7927
+ * @request POST:/api/accounts
7928
+ * @secure
7929
+ * @response `201` `Account` Created
7930
+ * @response `422` `ProblemDetails` Unprocessable Content
7931
+ */
7932
+ createAccount: (data: CreateAccountRequest, params: RequestParams = {}) =>
7933
+ this.request<Account, ProblemDetails>({
7934
+ path: `/api/accounts`,
7935
+ method: "POST",
7936
+ body: data,
7937
+ secure: true,
7938
+ type: "application/json",
7939
+ format: "json",
7940
+ ...params,
7941
+ }),
7942
+
7943
+ /**
7944
+ * No description
7945
+ *
7946
+ * @tags Accounts
7947
+ * @name GetAccount
7948
+ * @summary Get by ID
7949
+ * @request GET:/api/accounts/{id}
7950
+ * @secure
7951
+ * @response `201` `Account` Created
7952
+ * @response `422` `ProblemDetails` Unprocessable Content
7953
+ */
7954
+ getAccount: (id: string, params: RequestParams = {}) =>
7955
+ this.request<Account, ProblemDetails>({
7956
+ path: `/api/accounts/${id}`,
7957
+ method: "GET",
7958
+ secure: true,
7959
+ format: "json",
7960
+ ...params,
7961
+ }),
7962
+
7963
+ /**
7964
+ * No description
7965
+ *
7966
+ * @tags Accounts
7967
+ * @name DeleteAccount
7968
+ * @summary Delete
7969
+ * @request DELETE:/api/accounts/{id}
7970
+ * @secure
7971
+ * @response `204` `Account` No Content
7972
+ * @response `404` `ProblemDetails` Not Found
7973
+ * @response `422` `ProblemDetails` Unprocessable Content
7974
+ */
7975
+ deleteAccount: (
7976
+ id: string,
7977
+ query?: {
7978
+ /** @default false */
7979
+ hardDelete?: boolean;
7980
+ },
7981
+ params: RequestParams = {},
7982
+ ) =>
7983
+ this.request<Account, ProblemDetails>({
7984
+ path: `/api/accounts/${id}`,
7985
+ method: "DELETE",
7986
+ query: query,
7987
+ secure: true,
7988
+ format: "json",
7989
+ ...params,
7990
+ }),
7991
+
7992
+ /**
7993
+ * No description
7994
+ *
7995
+ * @tags Accounts
7996
+ * @name UpdateAccountBilling
7997
+ * @summary Update billing configuration
7998
+ * @request PUT:/api/accounts/{id}/billing
7999
+ * @secure
8000
+ * @response `200` `AccountBilling` OK
8001
+ * @response `404` `ProblemDetails` Not Found
8002
+ * @response `422` `ProblemDetails` Unprocessable Content
8003
+ */
8004
+ updateAccountBilling: (
8005
+ id: string,
8006
+ data: AccountBillingRequest,
8007
+ params: RequestParams = {},
8008
+ ) =>
8009
+ this.request<AccountBilling, ProblemDetails>({
8010
+ path: `/api/accounts/${id}/billing`,
8011
+ method: "PUT",
8012
+ body: data,
8013
+ secure: true,
8014
+ type: "application/json",
8015
+ format: "json",
8016
+ ...params,
8017
+ }),
8018
+
8019
+ /**
8020
+ * No description
8021
+ *
8022
+ * @tags AiAccountSettings
8023
+ * @name GetAiAccountSettings
8024
+ * @summary Get account AI settings
8025
+ * @request GET:/api/ai/admin/account-settings
8026
+ * @secure
8027
+ * @response `200` `AiAccountSettings` OK
8028
+ */
8029
+ getAiAccountSettings: (params: RequestParams = {}) =>
8030
+ this.request<AiAccountSettings, any>({
8031
+ path: `/api/ai/admin/account-settings`,
8032
+ method: "GET",
8033
+ secure: true,
8034
+ format: "json",
8035
+ ...params,
8036
+ }),
8037
+
8038
+ /**
8039
+ * No description
8040
+ *
8041
+ * @tags AiAccountSettings
8042
+ * @name UpdateAiAccountSettings
8043
+ * @summary Update account AI settings
8044
+ * @request PUT:/api/ai/admin/account-settings
8045
+ * @secure
8046
+ * @response `200` `AiAccountSettings` OK
8047
+ * @response `400` `ProblemDetails` Bad Request
8048
+ */
8049
+ updateAiAccountSettings: (
8050
+ data: AiAccountSettingsRequest,
8051
+ params: RequestParams = {},
8052
+ ) =>
8053
+ this.request<AiAccountSettings, ProblemDetails>({
8054
+ path: `/api/ai/admin/account-settings`,
8055
+ method: "PUT",
8056
+ body: data,
8057
+ secure: true,
8058
+ type: "application/json",
8059
+ format: "json",
8060
+ ...params,
8061
+ }),
8062
+
8063
+ /**
8064
+ * No description
8065
+ *
8066
+ * @tags AiAdmin
8067
+ * @name GetAiAuditLogs
8068
+ * @summary Get paginated audit logs
8069
+ * @request GET:/api/ai/admin/audit-logs
8070
+ * @secure
8071
+ * @response `200` `AiAuditLogPaginated` OK
8072
+ */
8073
+ getAiAuditLogs: (
8074
+ query?: {
8075
+ eventType?: AiAuditEventType;
8076
+ /** @format uuid */
8077
+ requestId?: string;
8078
+ /** @format uuid */
8079
+ userId?: string;
8080
+ /** @format uuid */
8081
+ conversationId?: string;
8082
+ blockedOnly?: boolean;
8083
+ /** @format date-time */
8084
+ startDate?: string;
8085
+ /** @format date-time */
8086
+ endDate?: string;
8087
+ /** @format int32 */
8088
+ pageSize?: number;
8089
+ /** @format int32 */
8090
+ pageNumber?: number;
8091
+ sortBy?: string;
8092
+ sortDirection?: string;
8093
+ },
8094
+ params: RequestParams = {},
8095
+ ) =>
8096
+ this.request<AiAuditLogPaginated, any>({
8097
+ path: `/api/ai/admin/audit-logs`,
8098
+ method: "GET",
8099
+ query: query,
8100
+ secure: true,
8101
+ format: "json",
8102
+ ...params,
8103
+ }),
8104
+
8105
+ /**
8106
+ * No description
8107
+ *
8108
+ * @tags AiAdmin
8109
+ * @name GetAiRequestLifecycle
8110
+ * @summary Get the full event lifecycle of a single AI request
8111
+ * @request GET:/api/ai/admin/audit-logs/request/{requestId}
8112
+ * @secure
8113
+ * @response `200` `(AiAuditLog)[]` OK
8114
+ */
8115
+ getAiRequestLifecycle: (requestId: string, params: RequestParams = {}) =>
8116
+ this.request<AiAuditLog[], any>({
8117
+ path: `/api/ai/admin/audit-logs/request/${requestId}`,
8118
+ method: "GET",
8119
+ secure: true,
8120
+ format: "json",
8121
+ ...params,
8122
+ }),
8123
+
8124
+ /**
8125
+ * No description
8126
+ *
8127
+ * @tags AiAdmin
8128
+ * @name GetAiAuditConversations
8129
+ * @summary List conversations with their audit roll-up — origin user, turns, status, tokens
8130
+ * @request GET:/api/ai/admin/audit-conversations
8131
+ * @secure
8132
+ * @response `200` `AiConversationAuditSummaryPaginated` OK
8133
+ */
8134
+ getAiAuditConversations: (
8135
+ query?: {
8136
+ searchText?: string;
8137
+ /** @format date-time */
8138
+ startDate?: string;
8139
+ /** @format date-time */
8140
+ endDate?: string;
8141
+ /** @format int32 */
8142
+ pageSize?: number;
8143
+ /** @format int32 */
8144
+ pageNumber?: number;
8145
+ sortBy?: string;
8146
+ sortDirection?: string;
8147
+ },
8148
+ params: RequestParams = {},
8149
+ ) =>
8150
+ this.request<AiConversationAuditSummaryPaginated, any>({
8151
+ path: `/api/ai/admin/audit-conversations`,
8152
+ method: "GET",
8153
+ query: query,
8154
+ secure: true,
8155
+ format: "json",
8156
+ ...params,
8157
+ }),
8158
+
8159
+ /**
8160
+ * No description
8161
+ *
8162
+ * @tags AiAdmin
8163
+ * @name GetAiAdminStats
8164
+ * @summary Get AI admin dashboard stats
8165
+ * @request GET:/api/ai/admin/stats
8166
+ * @secure
8167
+ * @response `200` `AiAdminStats` OK
8168
+ */
8169
+ getAiAdminStats: (
8170
+ query?: {
8171
+ /** @format date-time */
8172
+ startDate?: string;
8173
+ /** @format date-time */
8174
+ endDate?: string;
8175
+ },
8176
+ params: RequestParams = {},
8177
+ ) =>
8178
+ this.request<AiAdminStats, any>({
8179
+ path: `/api/ai/admin/stats`,
8180
+ method: "GET",
8181
+ query: query,
8182
+ secure: true,
8183
+ format: "json",
8184
+ ...params,
8185
+ }),
8186
+
8187
+ /**
8188
+ * No description
8189
+ *
8190
+ * @tags AiAdmin
8191
+ * @name GetAiConfigChanges
8192
+ * @summary Get the AI configuration change history (who changed prompts, guardrails, fields, sources)
8193
+ * @request GET:/api/ai/admin/config-changes
8194
+ * @secure
8195
+ * @response `200` `AiConfigChangeLogPaginated` OK
8196
+ */
8197
+ getAiConfigChanges: (
8198
+ query?: {
8199
+ entityType?: AiConfigEntityType;
8200
+ /** @format uuid */
8201
+ entityId?: string;
8202
+ /** @format uuid */
8203
+ actorUserId?: string;
8204
+ action?: AiConfigChangeAction;
8205
+ /** @format date-time */
8206
+ startDate?: string;
8207
+ /** @format date-time */
8208
+ endDate?: string;
8209
+ /** @format int32 */
8210
+ pageSize?: number;
8211
+ /** @format int32 */
8212
+ pageNumber?: number;
8213
+ sortBy?: string;
8214
+ sortDirection?: string;
8215
+ },
8216
+ params: RequestParams = {},
8217
+ ) =>
8218
+ this.request<AiConfigChangeLogPaginated, any>({
8219
+ path: `/api/ai/admin/config-changes`,
8220
+ method: "GET",
8221
+ query: query,
8222
+ secure: true,
8223
+ format: "json",
8224
+ ...params,
8225
+ }),
8226
+
8227
+ /**
8228
+ * No description
8229
+ *
8230
+ * @tags AiAdminPrompt
8231
+ * @name GetAiPrompts
8232
+ * @summary Get all prompts
8233
+ * @request GET:/api/ai/admin/prompts
8234
+ * @secure
8235
+ * @response `200` `(AiPrompt)[]` OK
8236
+ */
8237
+ getAiPrompts: (params: RequestParams = {}) =>
8238
+ this.request<AiPrompt[], any>({
8239
+ path: `/api/ai/admin/prompts`,
8240
+ method: "GET",
8241
+ secure: true,
8242
+ format: "json",
8243
+ ...params,
8244
+ }),
8245
+
8246
+ /**
8247
+ * No description
8248
+ *
8249
+ * @tags AiAdminPrompt
8250
+ * @name CreateAiPrompt
8251
+ * @summary Create custom prompt
8252
+ * @request POST:/api/ai/admin/prompts
8253
+ * @secure
8254
+ * @response `201` `AiPrompt` Created
8255
+ * @response `400` `ProblemDetails` Bad Request
8256
+ */
8257
+ createAiPrompt: (data: CreateAiPromptRequest, params: RequestParams = {}) =>
8258
+ this.request<AiPrompt, ProblemDetails>({
8259
+ path: `/api/ai/admin/prompts`,
8260
+ method: "POST",
8261
+ body: data,
8262
+ secure: true,
8263
+ type: "application/json",
8264
+ format: "json",
8265
+ ...params,
8266
+ }),
8267
+
8268
+ /**
8269
+ * No description
8270
+ *
8271
+ * @tags AiAdminPrompt
8272
+ * @name GetAiPrompt
8273
+ * @summary Get prompt by ID
8274
+ * @request GET:/api/ai/admin/prompts/{id}
8275
+ * @secure
8276
+ * @response `200` `AiPrompt` OK
8277
+ * @response `404` `ProblemDetails` Not Found
8278
+ */
8279
+ getAiPrompt: (id: string, params: RequestParams = {}) =>
8280
+ this.request<AiPrompt, ProblemDetails>({
8281
+ path: `/api/ai/admin/prompts/${id}`,
8282
+ method: "GET",
8283
+ secure: true,
8284
+ format: "json",
8285
+ ...params,
8286
+ }),
8287
+
8288
+ /**
8289
+ * No description
8290
+ *
8291
+ * @tags AiAdminPrompt
8292
+ * @name UpdateAiPrompt
8293
+ * @summary Update prompt
8294
+ * @request PUT:/api/ai/admin/prompts/{id}
8295
+ * @secure
8296
+ * @response `200` `AiPrompt` OK
8297
+ * @response `400` `ProblemDetails` Bad Request
8298
+ * @response `404` `ProblemDetails` Not Found
8299
+ */
8300
+ updateAiPrompt: (
8301
+ id: string,
8302
+ data: UpdateAiPromptRequest,
8303
+ params: RequestParams = {},
8304
+ ) =>
8305
+ this.request<AiPrompt, ProblemDetails>({
8306
+ path: `/api/ai/admin/prompts/${id}`,
8307
+ method: "PUT",
8308
+ body: data,
8309
+ secure: true,
8310
+ type: "application/json",
8311
+ format: "json",
8312
+ ...params,
8313
+ }),
8314
+
8315
+ /**
8316
+ * No description
8317
+ *
8318
+ * @tags AiAdminPrompt
8319
+ * @name DeleteAiPrompt
8320
+ * @summary Delete prompt
8321
+ * @request DELETE:/api/ai/admin/prompts/{id}
8322
+ * @secure
8323
+ * @response `204` `void` No Content
8324
+ * @response `400` `ProblemDetails` Bad Request
8325
+ * @response `404` `ProblemDetails` Not Found
8326
+ */
8327
+ deleteAiPrompt: (id: string, params: RequestParams = {}) =>
8328
+ this.request<void, ProblemDetails>({
8329
+ path: `/api/ai/admin/prompts/${id}`,
8330
+ method: "DELETE",
8331
+ secure: true,
8332
+ ...params,
8333
+ }),
8334
+
8335
+ /**
8336
+ * No description
8337
+ *
8338
+ * @tags AiAdminPrompt
8339
+ * @name ToggleAiPrompt
8340
+ * @summary Toggle prompt active/inactive
8341
+ * @request PATCH:/api/ai/admin/prompts/{id}/toggle
8342
+ * @secure
8343
+ * @response `200` `AiPrompt` OK
8344
+ * @response `404` `ProblemDetails` Not Found
8345
+ */
8346
+ toggleAiPrompt: (id: string, params: RequestParams = {}) =>
8347
+ this.request<AiPrompt, ProblemDetails>({
8348
+ path: `/api/ai/admin/prompts/${id}/toggle`,
8349
+ method: "PATCH",
8350
+ secure: true,
8351
+ format: "json",
8352
+ ...params,
8353
+ }),
8354
+
8355
+ /**
8356
+ * No description
8357
+ *
8358
+ * @tags AiAdminPrompt
8359
+ * @name GenerateAiSystemPrompt
8360
+ * @summary Generate a system prompt from description
8361
+ * @request POST:/api/ai/admin/prompts/generate
8362
+ * @secure
8363
+ * @response `200` `GenerateSystemPrompt` OK
8364
+ * @response `400` `ProblemDetails` Bad Request
8365
+ */
8366
+ generateAiSystemPrompt: (
8367
+ data: GenerateSystemPromptRequest,
8368
+ params: RequestParams = {},
8369
+ ) =>
8370
+ this.request<GenerateSystemPrompt, ProblemDetails>({
8371
+ path: `/api/ai/admin/prompts/generate`,
8372
+ method: "POST",
8373
+ body: data,
8374
+ secure: true,
8375
+ type: "application/json",
8376
+ format: "json",
8377
+ ...params,
8378
+ }),
8379
+
8380
+ /**
8381
+ * No description
8382
+ *
8383
+ * @tags AiAdminPrompt
8384
+ * @name GetSupportedModels
8385
+ * @summary Get supported LLM models
8386
+ * @request GET:/api/ai/admin/prompts/supported-models
8387
+ * @secure
8388
+ * @response `200` `(SupportedModel)[]` OK
8389
+ */
8390
+ getSupportedModels: (params: RequestParams = {}) =>
8391
+ this.request<SupportedModel[], any>({
8392
+ path: `/api/ai/admin/prompts/supported-models`,
8393
+ method: "GET",
8394
+ secure: true,
8395
+ format: "json",
8396
+ ...params,
8397
+ }),
8398
+
8399
+ /**
8400
+ * No description
8401
+ *
8402
+ * @tags AiAdminSettings
8403
+ * @name GetAiAdminSettings
8404
+ * @summary Get global AI settings
8405
+ * @request GET:/api/ai/admin/settings
8406
+ * @secure
8407
+ * @response `200` `AiAdminSettings` OK
8408
+ */
8409
+ getAiAdminSettings: (params: RequestParams = {}) =>
8410
+ this.request<AiAdminSettings, any>({
8411
+ path: `/api/ai/admin/settings`,
8412
+ method: "GET",
8413
+ secure: true,
8414
+ format: "json",
8415
+ ...params,
8416
+ }),
8417
+
8418
+ /**
8419
+ * No description
8420
+ *
8421
+ * @tags AiAdminSettings
8422
+ * @name UpdateAiAdminSettings
8423
+ * @summary Update global AI settings
8424
+ * @request PUT:/api/ai/admin/settings
8425
+ * @secure
8426
+ * @response `200` `AiAdminSettings` OK
8427
+ * @response `400` `ProblemDetails` Bad Request
8428
+ */
8429
+ updateAiAdminSettings: (
8430
+ data: AiAdminSettingsRequest,
8431
+ params: RequestParams = {},
8432
+ ) =>
8433
+ this.request<AiAdminSettings, ProblemDetails>({
8434
+ path: `/api/ai/admin/settings`,
8435
+ method: "PUT",
8436
+ body: data,
8437
+ secure: true,
8438
+ type: "application/json",
8439
+ format: "json",
8440
+ ...params,
8441
+ }),
8442
+
8443
+ /**
8444
+ * No description
8445
+ *
8446
+ * @tags AiCanonicalField
8447
+ * @name GetAiCanonicalFields
8448
+ * @summary Get all canonical fields
8449
+ * @request GET:/api/ai/admin/fields
8450
+ * @secure
8451
+ * @response `200` `(AiCanonicalField)[]` OK
8452
+ */
8453
+ getAiCanonicalFields: (params: RequestParams = {}) =>
8454
+ this.request<AiCanonicalField[], any>({
8455
+ path: `/api/ai/admin/fields`,
8456
+ method: "GET",
8457
+ secure: true,
8458
+ format: "json",
8459
+ ...params,
8460
+ }),
8461
+
8462
+ /**
8463
+ * No description
8464
+ *
8465
+ * @tags AiCanonicalField
8466
+ * @name CreateAiCanonicalField
8467
+ * @summary Create canonical field
8468
+ * @request POST:/api/ai/admin/fields
8469
+ * @secure
8470
+ * @response `201` `AiCanonicalField` Created
8471
+ * @response `400` `ProblemDetails` Bad Request
8472
+ */
8473
+ createAiCanonicalField: (
8474
+ data: CreateAiCanonicalFieldRequest,
8475
+ params: RequestParams = {},
8476
+ ) =>
8477
+ this.request<AiCanonicalField, ProblemDetails>({
8478
+ path: `/api/ai/admin/fields`,
8479
+ method: "POST",
8480
+ body: data,
8481
+ secure: true,
8482
+ type: "application/json",
8483
+ format: "json",
8484
+ ...params,
8485
+ }),
8486
+
8487
+ /**
8488
+ * No description
8489
+ *
8490
+ * @tags AiCanonicalField
8491
+ * @name GetAiCanonicalField
8492
+ * @summary Get canonical field by ID
8493
+ * @request GET:/api/ai/admin/fields/{id}
8494
+ * @secure
8495
+ * @response `200` `AiCanonicalField` OK
8496
+ * @response `404` `ProblemDetails` Not Found
8497
+ */
8498
+ getAiCanonicalField: (id: string, params: RequestParams = {}) =>
8499
+ this.request<AiCanonicalField, ProblemDetails>({
8500
+ path: `/api/ai/admin/fields/${id}`,
8501
+ method: "GET",
8502
+ secure: true,
8503
+ format: "json",
8504
+ ...params,
8505
+ }),
8506
+
8507
+ /**
8508
+ * No description
8509
+ *
8510
+ * @tags AiCanonicalField
8511
+ * @name UpdateAiCanonicalField
8512
+ * @summary Update canonical field
8513
+ * @request PUT:/api/ai/admin/fields/{id}
8514
+ * @secure
8515
+ * @response `200` `AiCanonicalField` OK
8516
+ * @response `400` `ProblemDetails` Bad Request
8517
+ * @response `404` `ProblemDetails` Not Found
8518
+ */
8519
+ updateAiCanonicalField: (
8520
+ id: string,
8521
+ data: UpdateAiCanonicalFieldRequest,
8522
+ params: RequestParams = {},
8523
+ ) =>
8524
+ this.request<AiCanonicalField, ProblemDetails>({
8525
+ path: `/api/ai/admin/fields/${id}`,
8526
+ method: "PUT",
8527
+ body: data,
8528
+ secure: true,
8529
+ type: "application/json",
8530
+ format: "json",
8531
+ ...params,
8532
+ }),
8533
+
8534
+ /**
8535
+ * No description
8536
+ *
8537
+ * @tags AiCanonicalField
8538
+ * @name DeleteAiCanonicalField
8539
+ * @summary Delete canonical field
8540
+ * @request DELETE:/api/ai/admin/fields/{id}
8541
+ * @secure
8542
+ * @response `204` `void` No Content
8543
+ * @response `404` `ProblemDetails` Not Found
8544
+ */
8545
+ deleteAiCanonicalField: (id: string, params: RequestParams = {}) =>
8546
+ this.request<void, ProblemDetails>({
8547
+ path: `/api/ai/admin/fields/${id}`,
8548
+ method: "DELETE",
8549
+ secure: true,
8550
+ ...params,
8551
+ }),
8552
+
8553
+ /**
8554
+ * No description
8555
+ *
8556
+ * @tags AiCanonicalField
8557
+ * @name ToggleAiCanonicalField
8558
+ * @summary Toggle canonical field active/inactive
8559
+ * @request PATCH:/api/ai/admin/fields/{id}/toggle
8560
+ * @secure
8561
+ * @response `200` `AiCanonicalField` OK
8562
+ * @response `404` `ProblemDetails` Not Found
8563
+ */
8564
+ toggleAiCanonicalField: (id: string, params: RequestParams = {}) =>
8565
+ this.request<AiCanonicalField, ProblemDetails>({
8566
+ path: `/api/ai/admin/fields/${id}/toggle`,
8567
+ method: "PATCH",
8568
+ secure: true,
8569
+ format: "json",
8570
+ ...params,
8571
+ }),
8572
+
8573
+ /**
8574
+ * No description
8575
+ *
8576
+ * @tags AiChat
8577
+ * @name AiChat
8578
+ * @summary Send AI chat message
8579
+ * @request POST:/api/ai/chat
8580
+ * @secure
8581
+ * @response `200` `AiChat` OK
8582
+ * @response `400` `ProblemDetails` Bad Request
8583
+ * @response `401` `ProblemDetails` Unauthorized
8584
+ */
8585
+ aiChat: (data: AiChatRequest, params: RequestParams = {}) =>
8586
+ this.request<AiChat, ProblemDetails>({
8587
+ path: `/api/ai/chat`,
8588
+ method: "POST",
8589
+ body: data,
8590
+ secure: true,
8591
+ type: "application/json",
8592
+ format: "json",
8593
+ ...params,
8594
+ }),
8595
+
8596
+ /**
8597
+ * No description
8598
+ *
8599
+ * @tags AiConversation
8600
+ * @name GetAiConversations
8601
+ * @summary Get user conversations
8602
+ * @request GET:/api/ai/conversations
8603
+ * @secure
8604
+ * @response `200` `AiConversationListItemPaginated` OK
8605
+ */
8606
+ getAiConversations: (
8607
+ query?: {
8608
+ /** @format int32 */
8609
+ pageSize?: number;
8610
+ /** @format int32 */
8611
+ pageNumber?: number;
8612
+ sortBy?: string;
8613
+ sortDirection?: string;
8614
+ },
8615
+ params: RequestParams = {},
8616
+ ) =>
8617
+ this.request<AiConversationListItemPaginated, any>({
8618
+ path: `/api/ai/conversations`,
8619
+ method: "GET",
8620
+ query: query,
8621
+ secure: true,
8622
+ format: "json",
8623
+ ...params,
8624
+ }),
8625
+
8626
+ /**
8627
+ * No description
8628
+ *
8629
+ * @tags AiConversation
8630
+ * @name GetAiConversation
8631
+ * @summary Get conversation metadata
8632
+ * @request GET:/api/ai/conversations/{id}
8633
+ * @secure
8634
+ * @response `200` `AiConversationDetail` OK
8635
+ * @response `403` `ProblemDetails` Forbidden
8636
+ * @response `404` `ProblemDetails` Not Found
8637
+ */
8638
+ getAiConversation: (id: string, params: RequestParams = {}) =>
8639
+ this.request<AiConversationDetail, ProblemDetails>({
8640
+ path: `/api/ai/conversations/${id}`,
8641
+ method: "GET",
8642
+ secure: true,
8643
+ format: "json",
8644
+ ...params,
8645
+ }),
8646
+
8647
+ /**
8648
+ * No description
8649
+ *
8650
+ * @tags AiConversation
8651
+ * @name RenameAiConversation
8652
+ * @summary Rename conversation
8653
+ * @request PATCH:/api/ai/conversations/{id}
8654
+ * @secure
8655
+ * @response `200` `AiConversationDetail` OK
8656
+ * @response `400` `ProblemDetails` Bad Request
8657
+ * @response `403` `ProblemDetails` Forbidden
8658
+ * @response `404` `ProblemDetails` Not Found
8659
+ */
8660
+ renameAiConversation: (
8661
+ id: string,
8662
+ data: JsonPatchDocument,
8663
+ params: RequestParams = {},
8664
+ ) =>
8665
+ this.request<AiConversationDetail, ProblemDetails>({
8666
+ path: `/api/ai/conversations/${id}`,
8667
+ method: "PATCH",
8668
+ body: data,
8669
+ secure: true,
8670
+ type: "application/json",
8671
+ format: "json",
8672
+ ...params,
8673
+ }),
8674
+
8675
+ /**
8676
+ * No description
8677
+ *
8678
+ * @tags AiConversation
8679
+ * @name DeleteAiConversation
8680
+ * @summary Delete conversation
8681
+ * @request DELETE:/api/ai/conversations/{id}
8682
+ * @secure
8683
+ * @response `204` `void` No Content
8684
+ * @response `403` `ProblemDetails` Forbidden
8685
+ * @response `404` `ProblemDetails` Not Found
8686
+ */
8687
+ deleteAiConversation: (id: string, params: RequestParams = {}) =>
8688
+ this.request<void, ProblemDetails>({
8689
+ path: `/api/ai/conversations/${id}`,
8690
+ method: "DELETE",
8691
+ secure: true,
8692
+ ...params,
8693
+ }),
8694
+
8695
+ /**
8696
+ * No description
8697
+ *
8698
+ * @tags AiConversation
8699
+ * @name GetAiConversationMessages
8700
+ * @summary Get conversation messages
8701
+ * @request GET:/api/ai/conversations/{id}/messages
8702
+ * @secure
8703
+ * @response `200` `AiChatMessagePaginated` OK
8704
+ * @response `403` `ProblemDetails` Forbidden
8705
+ * @response `404` `ProblemDetails` Not Found
8706
+ */
8707
+ getAiConversationMessages: (
8708
+ id: string,
8709
+ query?: {
8710
+ /** @format int32 */
8711
+ pageSize?: number;
8712
+ /** @format int32 */
8713
+ pageNumber?: number;
8714
+ sortBy?: string;
8715
+ sortDirection?: string;
8716
+ },
8717
+ params: RequestParams = {},
8718
+ ) =>
8719
+ this.request<AiChatMessagePaginated, ProblemDetails>({
8720
+ path: `/api/ai/conversations/${id}/messages`,
8721
+ method: "GET",
8722
+ query: query,
8723
+ secure: true,
8724
+ format: "json",
8725
+ ...params,
8726
+ }),
8727
+
8728
+ /**
8729
+ * No description
8730
+ *
8731
+ * @tags AiConversation
8732
+ * @name ClearAiConversationHistory
8733
+ * @summary Clear conversation history
8734
+ * @request DELETE:/api/ai/conversations/{id}/messages
8735
+ * @secure
8736
+ * @response `204` `void` No Content
8737
+ * @response `403` `ProblemDetails` Forbidden
8738
+ * @response `404` `ProblemDetails` Not Found
8739
+ */
8740
+ clearAiConversationHistory: (id: string, params: RequestParams = {}) =>
8741
+ this.request<void, ProblemDetails>({
8742
+ path: `/api/ai/conversations/${id}/messages`,
8743
+ method: "DELETE",
8744
+ secure: true,
8745
+ ...params,
8746
+ }),
8747
+
8748
+ /**
8749
+ * No description
8750
+ *
8751
+ * @tags AiConversation
8752
+ * @name PinAiConversation
8753
+ * @summary Pin or unpin conversation
8754
+ * @request PUT:/api/ai/conversations/{id}/pin
8755
+ * @secure
8756
+ * @response `200` `AiConversationDetail` OK
8757
+ * @response `403` `ProblemDetails` Forbidden
8758
+ * @response `404` `ProblemDetails` Not Found
8759
+ */
8760
+ pinAiConversation: (
8761
+ id: string,
8762
+ data: PinAiConversationRequest,
8763
+ params: RequestParams = {},
8764
+ ) =>
8765
+ this.request<AiConversationDetail, ProblemDetails>({
8766
+ path: `/api/ai/conversations/${id}/pin`,
8767
+ method: "PUT",
8768
+ body: data,
8769
+ secure: true,
8770
+ type: "application/json",
8771
+ format: "json",
8772
+ ...params,
8773
+ }),
8774
+
8775
+ /**
8776
+ * No description
8777
+ *
8778
+ * @tags AiConversationAdmin
8779
+ * @name GetAiAccountConversations
8780
+ * @summary List AI conversations across the account, optionally filtered by user (admin supervision)
8781
+ * @request GET:/api/ai/admin/conversations
8782
+ * @secure
8783
+ * @response `200` `AiConversationListItemPaginated` OK
8784
+ */
8785
+ getAiAccountConversations: (
8786
+ query?: {
8787
+ /** @format uuid */
8788
+ userId?: string;
8789
+ /** @format int32 */
8790
+ pageSize?: number;
8791
+ /** @format int32 */
8792
+ pageNumber?: number;
8793
+ sortBy?: string;
8794
+ sortDirection?: string;
8795
+ },
8796
+ params: RequestParams = {},
8797
+ ) =>
8798
+ this.request<AiConversationListItemPaginated, any>({
8799
+ path: `/api/ai/admin/conversations`,
8800
+ method: "GET",
8801
+ query: query,
8802
+ secure: true,
8803
+ format: "json",
8804
+ ...params,
8805
+ }),
8806
+
8807
+ /**
8808
+ * No description
8809
+ *
8810
+ * @tags AiConversationAdmin
8811
+ * @name GetAiAccountConversation
8812
+ * @summary Get an account conversation's detail (admin supervision)
8813
+ * @request GET:/api/ai/admin/conversations/{id}
8814
+ * @secure
8815
+ * @response `200` `AiConversationDetail` OK
8816
+ * @response `404` `ProblemDetails` Not Found
8817
+ */
8818
+ getAiAccountConversation: (id: string, params: RequestParams = {}) =>
8819
+ this.request<AiConversationDetail, ProblemDetails>({
8820
+ path: `/api/ai/admin/conversations/${id}`,
8821
+ method: "GET",
8822
+ secure: true,
8823
+ format: "json",
8824
+ ...params,
8825
+ }),
8826
+
8827
+ /**
8828
+ * No description
8829
+ *
8830
+ * @tags AiConversationAdmin
8831
+ * @name GetAiAccountConversationMessages
8832
+ * @summary Get an account conversation's messages (admin supervision)
8833
+ * @request GET:/api/ai/admin/conversations/{id}/messages
8834
+ * @secure
8835
+ * @response `200` `AiChatMessagePaginated` OK
8836
+ * @response `404` `ProblemDetails` Not Found
8837
+ */
8838
+ getAiAccountConversationMessages: (
8839
+ id: string,
8840
+ query?: {
8841
+ /** @format int32 */
8842
+ pageSize?: number;
8843
+ /** @format int32 */
8844
+ pageNumber?: number;
8845
+ sortBy?: string;
8846
+ sortDirection?: string;
8847
+ },
8848
+ params: RequestParams = {},
8849
+ ) =>
8850
+ this.request<AiChatMessagePaginated, ProblemDetails>({
8851
+ path: `/api/ai/admin/conversations/${id}/messages`,
8852
+ method: "GET",
8853
+ query: query,
8854
+ secure: true,
8855
+ format: "json",
8856
+ ...params,
8857
+ }),
8858
+
8859
+ /**
8860
+ * No description
8861
+ *
8862
+ * @tags AiGuardrail
8863
+ * @name GetAiGuardrails
8864
+ * @summary Get all guardrails
8865
+ * @request GET:/api/ai/admin/guardrails
8866
+ * @secure
8867
+ * @response `200` `(AiGuardrail)[]` OK
8868
+ */
8869
+ getAiGuardrails: (params: RequestParams = {}) =>
8870
+ this.request<AiGuardrail[], any>({
8871
+ path: `/api/ai/admin/guardrails`,
8872
+ method: "GET",
8873
+ secure: true,
8874
+ format: "json",
8875
+ ...params,
8876
+ }),
8877
+
8878
+ /**
8879
+ * No description
8880
+ *
8881
+ * @tags AiGuardrail
8882
+ * @name CreateAiGuardrail
8883
+ * @summary Create custom guardrail
8884
+ * @request POST:/api/ai/admin/guardrails
8885
+ * @secure
8886
+ * @response `201` `AiGuardrail` Created
8887
+ * @response `400` `ProblemDetails` Bad Request
8888
+ */
8889
+ createAiGuardrail: (
8890
+ data: CreateAiGuardrailRequest,
8891
+ params: RequestParams = {},
8892
+ ) =>
8893
+ this.request<AiGuardrail, ProblemDetails>({
8894
+ path: `/api/ai/admin/guardrails`,
8895
+ method: "POST",
8896
+ body: data,
8897
+ secure: true,
8898
+ type: "application/json",
8899
+ format: "json",
8900
+ ...params,
8901
+ }),
8902
+
8903
+ /**
8904
+ * No description
8905
+ *
8906
+ * @tags AiGuardrail
8907
+ * @name GetAiGuardrail
8908
+ * @summary Get guardrail by ID
8909
+ * @request GET:/api/ai/admin/guardrails/{id}
8910
+ * @secure
8911
+ * @response `200` `AiGuardrail` OK
8912
+ * @response `404` `ProblemDetails` Not Found
8913
+ */
8914
+ getAiGuardrail: (id: string, params: RequestParams = {}) =>
8915
+ this.request<AiGuardrail, ProblemDetails>({
8916
+ path: `/api/ai/admin/guardrails/${id}`,
8917
+ method: "GET",
8918
+ secure: true,
8919
+ format: "json",
8920
+ ...params,
8921
+ }),
8922
+
8923
+ /**
8924
+ * No description
8925
+ *
8926
+ * @tags AiGuardrail
8927
+ * @name UpdateAiGuardrail
8928
+ * @summary Update guardrail
8929
+ * @request PUT:/api/ai/admin/guardrails/{id}
8930
+ * @secure
8931
+ * @response `200` `AiGuardrail` OK
8932
+ * @response `400` `ProblemDetails` Bad Request
8933
+ * @response `404` `ProblemDetails` Not Found
8934
+ */
8935
+ updateAiGuardrail: (
8936
+ id: string,
8937
+ data: UpdateAiGuardrailRequest,
8938
+ params: RequestParams = {},
8939
+ ) =>
8940
+ this.request<AiGuardrail, ProblemDetails>({
8941
+ path: `/api/ai/admin/guardrails/${id}`,
8942
+ method: "PUT",
8943
+ body: data,
8944
+ secure: true,
8945
+ type: "application/json",
8946
+ format: "json",
8947
+ ...params,
8948
+ }),
8949
+
8950
+ /**
8951
+ * No description
8952
+ *
8953
+ * @tags AiGuardrail
8954
+ * @name DeleteAiGuardrail
8955
+ * @summary Delete guardrail
8956
+ * @request DELETE:/api/ai/admin/guardrails/{id}
8957
+ * @secure
8958
+ * @response `204` `void` No Content
8959
+ * @response `400` `ProblemDetails` Bad Request
8960
+ * @response `404` `ProblemDetails` Not Found
8961
+ */
8962
+ deleteAiGuardrail: (id: string, params: RequestParams = {}) =>
8963
+ this.request<void, ProblemDetails>({
8964
+ path: `/api/ai/admin/guardrails/${id}`,
8965
+ method: "DELETE",
8966
+ secure: true,
8967
+ ...params,
8968
+ }),
8969
+
8970
+ /**
8971
+ * No description
8972
+ *
8973
+ * @tags AiGuardrail
8974
+ * @name ToggleAiGuardrail
8975
+ * @summary Toggle guardrail enabled/disabled
8976
+ * @request PATCH:/api/ai/admin/guardrails/{id}/toggle
8977
+ * @secure
8978
+ * @response `200` `AiGuardrail` OK
8979
+ * @response `404` `ProblemDetails` Not Found
8980
+ */
8981
+ toggleAiGuardrail: (id: string, params: RequestParams = {}) =>
8982
+ this.request<AiGuardrail, ProblemDetails>({
8983
+ path: `/api/ai/admin/guardrails/${id}/toggle`,
8984
+ method: "PATCH",
8985
+ secure: true,
8986
+ format: "json",
8987
+ ...params,
8988
+ }),
8989
+
8990
+ /**
8991
+ * No description
8992
+ *
8993
+ * @tags AiPrompt
8994
+ * @name GetAvailablePrompts
8995
+ * @summary Get available prompts for current user
8996
+ * @request GET:/api/ai/prompts
8997
+ * @secure
8998
+ * @response `200` `(AiPromptSummary)[]` OK
8999
+ */
9000
+ getAvailablePrompts: (
9001
+ query?: {
9002
+ documentType?: string;
9003
+ },
9004
+ params: RequestParams = {},
9005
+ ) =>
9006
+ this.request<AiPromptSummary[], any>({
9007
+ path: `/api/ai/prompts`,
9008
+ method: "GET",
9009
+ query: query,
9010
+ secure: true,
9011
+ format: "json",
9012
+ ...params,
9013
+ }),
9014
+
9015
+ /**
9016
+ * No description
9017
+ *
9018
+ * @tags AiSuperAdmin
9019
+ * @name GetAiAuditLogsCrossAccount
9020
+ * @summary Get AI audit logs for a specific account or across all accounts
9021
+ * @request GET:/api/ai/superadmin/audit-logs
9022
+ * @secure
9023
+ * @response `200` `AiAuditLogPaginated` OK
9024
+ */
9025
+ getAiAuditLogsCrossAccount: (
9026
+ query?: {
9027
+ /** @format uuid */
9028
+ accountId?: string;
9029
+ eventType?: AiAuditEventType;
9030
+ /** @format uuid */
9031
+ requestId?: string;
9032
+ /** @format uuid */
9033
+ userId?: string;
9034
+ /** @format uuid */
9035
+ conversationId?: string;
9036
+ blockedOnly?: boolean;
9037
+ /** @format date-time */
9038
+ startDate?: string;
9039
+ /** @format date-time */
9040
+ endDate?: string;
9041
+ /** @format int32 */
9042
+ pageSize?: number;
9043
+ /** @format int32 */
9044
+ pageNumber?: number;
9045
+ sortBy?: string;
9046
+ sortDirection?: string;
9047
+ },
9048
+ params: RequestParams = {},
9049
+ ) =>
9050
+ this.request<AiAuditLogPaginated, any>({
9051
+ path: `/api/ai/superadmin/audit-logs`,
9052
+ method: "GET",
9053
+ query: query,
9054
+ secure: true,
9055
+ format: "json",
9056
+ ...params,
9057
+ }),
9058
+
9059
+ /**
9060
+ * No description
9061
+ *
9062
+ * @tags AiSuperAdmin
9063
+ * @name GetAiRequestLifecycleCrossAccount
9064
+ * @summary Get the full event lifecycle of a single AI request from any account
9065
+ * @request GET:/api/ai/superadmin/audit-logs/request/{requestId}
9066
+ * @secure
9067
+ * @response `200` `(AiAuditLog)[]` OK
9068
+ */
9069
+ getAiRequestLifecycleCrossAccount: (
9070
+ requestId: string,
9071
+ query?: {
9072
+ /** @format uuid */
9073
+ accountId?: string;
9074
+ },
9075
+ params: RequestParams = {},
9076
+ ) =>
9077
+ this.request<AiAuditLog[], any>({
9078
+ path: `/api/ai/superadmin/audit-logs/request/${requestId}`,
9079
+ method: "GET",
9080
+ query: query,
9081
+ secure: true,
9082
+ format: "json",
9083
+ ...params,
9084
+ }),
9085
+
9086
+ /**
9087
+ * No description
9088
+ *
9089
+ * @tags AiSuperAdmin
9090
+ * @name GetAiStatsCrossAccount
9091
+ * @summary Get AI stats for a specific account or platform-wide
9092
+ * @request GET:/api/ai/superadmin/stats
9093
+ * @secure
9094
+ * @response `200` `AiAdminStats` OK
9095
+ */
9096
+ getAiStatsCrossAccount: (
9097
+ query?: {
9098
+ /** @format uuid */
9099
+ accountId?: string;
9100
+ /** @format date-time */
9101
+ startDate?: string;
9102
+ /** @format date-time */
9103
+ endDate?: string;
9104
+ },
9105
+ params: RequestParams = {},
9106
+ ) =>
9107
+ this.request<AiAdminStats, any>({
9108
+ path: `/api/ai/superadmin/stats`,
9109
+ method: "GET",
9110
+ query: query,
9111
+ secure: true,
9112
+ format: "json",
9113
+ ...params,
9114
+ }),
9115
+
6835
9116
  /**
6836
9117
  * No description
6837
9118
  *
6838
- * @tags Account
6839
- * @name GetMyAccount
6840
- * @summary Get
6841
- * @request GET:/api/account
9119
+ * @tags AiSuperAdmin
9120
+ * @name GetAiConfigChangesCrossAccount
9121
+ * @summary Get AI configuration change history for a specific account or across all accounts (incl. global defaults)
9122
+ * @request GET:/api/ai/superadmin/config-changes
6842
9123
  * @secure
6843
- * @response `200` `Account` OK
6844
- * @response `404` `ProblemDetails` Not Found
9124
+ * @response `200` `AiConfigChangeLogPaginated` OK
6845
9125
  */
6846
- getMyAccount: (params: RequestParams = {}) =>
6847
- this.request<Account, ProblemDetails>({
6848
- path: `/api/account`,
9126
+ getAiConfigChangesCrossAccount: (
9127
+ query?: {
9128
+ /** @format uuid */
9129
+ accountId?: string;
9130
+ entityType?: AiConfigEntityType;
9131
+ /** @format uuid */
9132
+ entityId?: string;
9133
+ /** @format uuid */
9134
+ actorUserId?: string;
9135
+ action?: AiConfigChangeAction;
9136
+ /** @format date-time */
9137
+ startDate?: string;
9138
+ /** @format date-time */
9139
+ endDate?: string;
9140
+ /** @format int32 */
9141
+ pageSize?: number;
9142
+ /** @format int32 */
9143
+ pageNumber?: number;
9144
+ sortBy?: string;
9145
+ sortDirection?: string;
9146
+ },
9147
+ params: RequestParams = {},
9148
+ ) =>
9149
+ this.request<AiConfigChangeLogPaginated, any>({
9150
+ path: `/api/ai/superadmin/config-changes`,
6849
9151
  method: "GET",
9152
+ query: query,
6850
9153
  secure: true,
6851
9154
  format: "json",
6852
9155
  ...params,
@@ -6855,22 +9158,29 @@ export class Api<
6855
9158
  /**
6856
9159
  * No description
6857
9160
  *
6858
- * @tags Account
6859
- * @name ReplaceMyAccount
6860
- * @summary Replace
6861
- * @request PUT:/api/account
9161
+ * @tags AiTokenUsageAdmin
9162
+ * @name SearchAiAccountTokenUsage
9163
+ * @summary Search accounts by current-month AI token usage and classification
9164
+ * @request POST:/api/ai/admin/token-usage/search
6862
9165
  * @secure
6863
- * @response `200` `Account` OK
6864
- * @response `404` `ProblemDetails` Not Found
6865
- * @response `422` `ProblemDetails` Unprocessable Content
9166
+ * @response `200` `AiAccountUsageOverviewPaginated` OK
6866
9167
  */
6867
- replaceMyAccount: (
6868
- data: UpdateAccountRequest,
9168
+ searchAiAccountTokenUsage: (
9169
+ data: SearchCriteria,
9170
+ query?: {
9171
+ /** @format int32 */
9172
+ pageSize?: number;
9173
+ /** @format int32 */
9174
+ pageNumber?: number;
9175
+ sortBy?: string;
9176
+ sortDirection?: string;
9177
+ },
6869
9178
  params: RequestParams = {},
6870
9179
  ) =>
6871
- this.request<Account, ProblemDetails>({
6872
- path: `/api/account`,
6873
- method: "PUT",
9180
+ this.request<AiAccountUsageOverviewPaginated, any>({
9181
+ path: `/api/ai/admin/token-usage/search`,
9182
+ method: "POST",
9183
+ query: query,
6874
9184
  body: data,
6875
9185
  secure: true,
6876
9186
  type: "application/json",
@@ -6881,16 +9191,16 @@ export class Api<
6881
9191
  /**
6882
9192
  * No description
6883
9193
  *
6884
- * @tags Account
6885
- * @name GetSiteConfigurationByAccount
6886
- * @summary Get Site Configuration
6887
- * @request GET:/api/account/site-configurations
9194
+ * @tags AiTokenUsageAdmin
9195
+ * @name GetAiAccountTokenUsage
9196
+ * @summary Get an account's current-month AI token usage
9197
+ * @request GET:/api/ai/admin/token-usage/{accountId}
6888
9198
  * @secure
6889
- * @response `200` `SiteConfiguration` OK
9199
+ * @response `200` `AiTokenBudgetStatus` OK
6890
9200
  */
6891
- getSiteConfigurationByAccount: (params: RequestParams = {}) =>
6892
- this.request<SiteConfiguration, any>({
6893
- path: `/api/account/site-configurations`,
9201
+ getAiAccountTokenUsage: (accountId: string, params: RequestParams = {}) =>
9202
+ this.request<AiTokenBudgetStatus, any>({
9203
+ path: `/api/ai/admin/token-usage/${accountId}`,
6894
9204
  method: "GET",
6895
9205
  secure: true,
6896
9206
  format: "json",
@@ -6900,24 +9210,30 @@ export class Api<
6900
9210
  /**
6901
9211
  * No description
6902
9212
  *
6903
- * @tags Account
6904
- * @name UpdateSiteConfigurationForAccount
6905
- * @summary Update Site Configuration
6906
- * @request PUT:/api/account/site-configurations
9213
+ * @tags AiTokenUsageAdmin
9214
+ * @name GetAiAccountTokenUsageHistory
9215
+ * @summary Get an account's monthly AI token usage history
9216
+ * @request GET:/api/ai/admin/token-usage/{accountId}/history
6907
9217
  * @secure
6908
- * @response `200` `SiteConfiguration` OK
6909
- * @response `422` `UnprocessableEntity` Unprocessable Content
9218
+ * @response `200` `AiTokenUsageWindowPaginated` OK
6910
9219
  */
6911
- updateSiteConfigurationForAccount: (
6912
- data: SiteConfiguration,
9220
+ getAiAccountTokenUsageHistory: (
9221
+ accountId: string,
9222
+ query?: {
9223
+ /** @format int32 */
9224
+ pageSize?: number;
9225
+ /** @format int32 */
9226
+ pageNumber?: number;
9227
+ sortBy?: string;
9228
+ sortDirection?: string;
9229
+ },
6913
9230
  params: RequestParams = {},
6914
9231
  ) =>
6915
- this.request<SiteConfiguration, UnprocessableEntity>({
6916
- path: `/api/account/site-configurations`,
6917
- method: "PUT",
6918
- body: data,
9232
+ this.request<AiTokenUsageWindowPaginated, any>({
9233
+ path: `/api/ai/admin/token-usage/${accountId}/history`,
9234
+ method: "GET",
9235
+ query: query,
6919
9236
  secure: true,
6920
- type: "application/json",
6921
9237
  format: "json",
6922
9238
  ...params,
6923
9239
  }),
@@ -6925,63 +9241,88 @@ export class Api<
6925
9241
  /**
6926
9242
  * No description
6927
9243
  *
6928
- * @tags AccountReactivation
6929
- * @name RequestAccountReactivation
6930
- * @summary Request account reactivation
6931
- * @request POST:/api/account/reactivation/request
9244
+ * @tags AiTokenUsageAdmin
9245
+ * @name SetAiAccountTokenLimit
9246
+ * @summary Set or raise an account's monthly AI token limit
9247
+ * @request PUT:/api/ai/admin/token-usage/{accountId}/limit
6932
9248
  * @secure
6933
- * @response `204` `void` No Content
9249
+ * @response `200` `AiTokenBudgetStatus` OK
9250
+ * @response `400` `ProblemDetails` Bad Request
6934
9251
  */
6935
- requestAccountReactivation: (
6936
- data: AccountReactivationRequest,
9252
+ setAiAccountTokenLimit: (
9253
+ accountId: string,
9254
+ data: UpdateAiAccountTokenLimitRequest,
6937
9255
  params: RequestParams = {},
6938
9256
  ) =>
6939
- this.request<void, any>({
6940
- path: `/api/account/reactivation/request`,
6941
- method: "POST",
9257
+ this.request<AiTokenBudgetStatus, ProblemDetails>({
9258
+ path: `/api/ai/admin/token-usage/${accountId}/limit`,
9259
+ method: "PUT",
6942
9260
  body: data,
6943
9261
  secure: true,
6944
9262
  type: "application/json",
9263
+ format: "json",
6945
9264
  ...params,
6946
9265
  }),
6947
9266
 
6948
9267
  /**
6949
9268
  * No description
6950
9269
  *
6951
- * @tags AccountReactivation
6952
- * @name CompleteAccountReactivation
6953
- * @summary Complete account reactivation with new password
6954
- * @request POST:/api/account/reactivation/complete
9270
+ * @tags AiUrlSource
9271
+ * @name GetAiUrlSources
9272
+ * @summary Get all URL sources
9273
+ * @request GET:/api/ai/admin/url-sources
6955
9274
  * @secure
6956
- * @response `204` `void` No Content
9275
+ * @response `200` `(AiUrlSource)[]` OK
9276
+ */
9277
+ getAiUrlSources: (params: RequestParams = {}) =>
9278
+ this.request<AiUrlSource[], any>({
9279
+ path: `/api/ai/admin/url-sources`,
9280
+ method: "GET",
9281
+ secure: true,
9282
+ format: "json",
9283
+ ...params,
9284
+ }),
9285
+
9286
+ /**
9287
+ * No description
9288
+ *
9289
+ * @tags AiUrlSource
9290
+ * @name CreateAiUrlSource
9291
+ * @summary Create URL source
9292
+ * @request POST:/api/ai/admin/url-sources
9293
+ * @secure
9294
+ * @response `201` `AiUrlSource` Created
6957
9295
  * @response `400` `ProblemDetails` Bad Request
9296
+ * @response `409` `ProblemDetails` Conflict
6958
9297
  */
6959
- completeAccountReactivation: (
6960
- data: AccountReactivationCompleteRequest,
9298
+ createAiUrlSource: (
9299
+ data: CreateAiUrlSourceRequest,
6961
9300
  params: RequestParams = {},
6962
9301
  ) =>
6963
- this.request<void, ProblemDetails>({
6964
- path: `/api/account/reactivation/complete`,
9302
+ this.request<AiUrlSource, ProblemDetails>({
9303
+ path: `/api/ai/admin/url-sources`,
6965
9304
  method: "POST",
6966
9305
  body: data,
6967
9306
  secure: true,
6968
9307
  type: "application/json",
9308
+ format: "json",
6969
9309
  ...params,
6970
9310
  }),
6971
9311
 
6972
9312
  /**
6973
9313
  * No description
6974
9314
  *
6975
- * @tags Accounts
6976
- * @name GetAccounts
6977
- * @summary Get All
6978
- * @request GET:/api/accounts
9315
+ * @tags AiUrlSource
9316
+ * @name GetAiUrlSource
9317
+ * @summary Get URL source by ID
9318
+ * @request GET:/api/ai/admin/url-sources/{id}
6979
9319
  * @secure
6980
- * @response `200` `(Account)[]` OK
9320
+ * @response `200` `AiUrlSource` OK
9321
+ * @response `404` `ProblemDetails` Not Found
6981
9322
  */
6982
- getAccounts: (params: RequestParams = {}) =>
6983
- this.request<Account[], any>({
6984
- path: `/api/accounts`,
9323
+ getAiUrlSource: (id: string, params: RequestParams = {}) =>
9324
+ this.request<AiUrlSource, ProblemDetails>({
9325
+ path: `/api/ai/admin/url-sources/${id}`,
6985
9326
  method: "GET",
6986
9327
  secure: true,
6987
9328
  format: "json",
@@ -6991,18 +9332,24 @@ export class Api<
6991
9332
  /**
6992
9333
  * No description
6993
9334
  *
6994
- * @tags Accounts
6995
- * @name CreateAccount
6996
- * @summary Create
6997
- * @request POST:/api/accounts
9335
+ * @tags AiUrlSource
9336
+ * @name UpdateAiUrlSource
9337
+ * @summary Update URL source
9338
+ * @request PUT:/api/ai/admin/url-sources/{id}
6998
9339
  * @secure
6999
- * @response `201` `Account` Created
7000
- * @response `422` `ProblemDetails` Unprocessable Content
9340
+ * @response `200` `AiUrlSource` OK
9341
+ * @response `400` `ProblemDetails` Bad Request
9342
+ * @response `404` `ProblemDetails` Not Found
9343
+ * @response `409` `ProblemDetails` Conflict
7001
9344
  */
7002
- createAccount: (data: CreateAccountRequest, params: RequestParams = {}) =>
7003
- this.request<Account, ProblemDetails>({
7004
- path: `/api/accounts`,
7005
- method: "POST",
9345
+ updateAiUrlSource: (
9346
+ id: string,
9347
+ data: UpdateAiUrlSourceRequest,
9348
+ params: RequestParams = {},
9349
+ ) =>
9350
+ this.request<AiUrlSource, ProblemDetails>({
9351
+ path: `/api/ai/admin/url-sources/${id}`,
9352
+ method: "PUT",
7006
9353
  body: data,
7007
9354
  secure: true,
7008
9355
  type: "application/json",
@@ -7013,47 +9360,37 @@ export class Api<
7013
9360
  /**
7014
9361
  * No description
7015
9362
  *
7016
- * @tags Accounts
7017
- * @name GetAccount
7018
- * @summary Get by ID
7019
- * @request GET:/api/accounts/{id}
9363
+ * @tags AiUrlSource
9364
+ * @name DeleteAiUrlSource
9365
+ * @summary Delete URL source
9366
+ * @request DELETE:/api/ai/admin/url-sources/{id}
7020
9367
  * @secure
7021
- * @response `201` `Account` Created
7022
- * @response `422` `ProblemDetails` Unprocessable Content
9368
+ * @response `204` `void` No Content
9369
+ * @response `404` `ProblemDetails` Not Found
7023
9370
  */
7024
- getAccount: (id: string, params: RequestParams = {}) =>
7025
- this.request<Account, ProblemDetails>({
7026
- path: `/api/accounts/${id}`,
7027
- method: "GET",
9371
+ deleteAiUrlSource: (id: string, params: RequestParams = {}) =>
9372
+ this.request<void, ProblemDetails>({
9373
+ path: `/api/ai/admin/url-sources/${id}`,
9374
+ method: "DELETE",
7028
9375
  secure: true,
7029
- format: "json",
7030
9376
  ...params,
7031
9377
  }),
7032
9378
 
7033
9379
  /**
7034
9380
  * No description
7035
9381
  *
7036
- * @tags Accounts
7037
- * @name DeleteAccount
7038
- * @summary Delete
7039
- * @request DELETE:/api/accounts/{id}
9382
+ * @tags AiUrlSource
9383
+ * @name ToggleAiUrlSource
9384
+ * @summary Toggle URL source active/inactive
9385
+ * @request PATCH:/api/ai/admin/url-sources/{id}/toggle
7040
9386
  * @secure
7041
- * @response `204` `Account` No Content
9387
+ * @response `200` `AiUrlSource` OK
7042
9388
  * @response `404` `ProblemDetails` Not Found
7043
- * @response `422` `ProblemDetails` Unprocessable Content
7044
9389
  */
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,
9390
+ toggleAiUrlSource: (id: string, params: RequestParams = {}) =>
9391
+ this.request<AiUrlSource, ProblemDetails>({
9392
+ path: `/api/ai/admin/url-sources/${id}/toggle`,
9393
+ method: "PATCH",
7057
9394
  secure: true,
7058
9395
  format: "json",
7059
9396
  ...params,
@@ -7062,26 +9399,48 @@ export class Api<
7062
9399
  /**
7063
9400
  * No description
7064
9401
  *
7065
- * @tags Accounts
7066
- * @name UpdateAccountBilling
7067
- * @summary Update billing configuration
7068
- * @request PUT:/api/accounts/{id}/billing
9402
+ * @tags AiUsage
9403
+ * @name GetAiUsage
9404
+ * @summary Get the current account's AI token usage for the active monthly window
9405
+ * @request GET:/api/ai/usage
7069
9406
  * @secure
7070
- * @response `200` `AccountBilling` OK
7071
- * @response `404` `ProblemDetails` Not Found
7072
- * @response `422` `ProblemDetails` Unprocessable Content
9407
+ * @response `200` `AiTokenBudgetStatus` OK
7073
9408
  */
7074
- updateAccountBilling: (
7075
- id: string,
7076
- data: AccountBillingRequest,
9409
+ getAiUsage: (params: RequestParams = {}) =>
9410
+ this.request<AiTokenBudgetStatus, any>({
9411
+ path: `/api/ai/usage`,
9412
+ method: "GET",
9413
+ secure: true,
9414
+ format: "json",
9415
+ ...params,
9416
+ }),
9417
+
9418
+ /**
9419
+ * No description
9420
+ *
9421
+ * @tags AiUsage
9422
+ * @name GetAiUsageHistory
9423
+ * @summary Get the current account's monthly AI token usage history
9424
+ * @request GET:/api/ai/usage/history
9425
+ * @secure
9426
+ * @response `200` `AiTokenUsageWindowPaginated` OK
9427
+ */
9428
+ getAiUsageHistory: (
9429
+ query?: {
9430
+ /** @format int32 */
9431
+ pageSize?: number;
9432
+ /** @format int32 */
9433
+ pageNumber?: number;
9434
+ sortBy?: string;
9435
+ sortDirection?: string;
9436
+ },
7077
9437
  params: RequestParams = {},
7078
9438
  ) =>
7079
- this.request<AccountBilling, ProblemDetails>({
7080
- path: `/api/accounts/${id}/billing`,
7081
- method: "PUT",
7082
- body: data,
9439
+ this.request<AiTokenUsageWindowPaginated, any>({
9440
+ path: `/api/ai/usage/history`,
9441
+ method: "GET",
9442
+ query: query,
7083
9443
  secure: true,
7084
- type: "application/json",
7085
9444
  format: "json",
7086
9445
  ...params,
7087
9446
  }),
@@ -11009,6 +13368,34 @@ export class Api<
11009
13368
  ...params,
11010
13369
  }),
11011
13370
 
13371
+ /**
13372
+ * No description
13373
+ *
13374
+ * @tags LoanDocuments
13375
+ * @name ClassifyLoanDocumentManually
13376
+ * @summary Manually classify a loan document
13377
+ * @request POST:/api/loans/{loanId}/documents/{documentId}/classify-manual
13378
+ * @secure
13379
+ * @response `200` `LoanDocument` OK
13380
+ * @response `404` `ProblemDetails` Not Found
13381
+ * @response `422` `UnprocessableEntity` Unprocessable Content
13382
+ */
13383
+ classifyLoanDocumentManually: (
13384
+ loanId: string,
13385
+ documentId: string,
13386
+ data: ManualDocumentClassificationRequest,
13387
+ params: RequestParams = {},
13388
+ ) =>
13389
+ this.request<LoanDocument, ProblemDetails | UnprocessableEntity>({
13390
+ path: `/api/loans/${loanId}/documents/${documentId}/classify-manual`,
13391
+ method: "POST",
13392
+ body: data,
13393
+ secure: true,
13394
+ type: "application/json",
13395
+ format: "json",
13396
+ ...params,
13397
+ }),
13398
+
11012
13399
  /**
11013
13400
  * @description Re-attempts to push a failed document to LOS
11014
13401
  *
@@ -11448,6 +13835,32 @@ export class Api<
11448
13835
  ...params,
11449
13836
  }),
11450
13837
 
13838
+ /**
13839
+ * No description
13840
+ *
13841
+ * @tags LoanNotification
13842
+ * @name SendESignatureReminder
13843
+ * @summary Send eSignature Reminder
13844
+ * @request POST:/api/loans/{loanID}/notifications/esignature-reminders
13845
+ * @secure
13846
+ * @response `204` `void` No Content
13847
+ * @response `400` `ProblemDetails` Bad Request
13848
+ * @response `404` `ProblemDetails` Not Found
13849
+ */
13850
+ sendESignatureReminder: (
13851
+ loanId: string,
13852
+ data: SendESignatureReminderRequest,
13853
+ params: RequestParams = {},
13854
+ ) =>
13855
+ this.request<void, ProblemDetails>({
13856
+ path: `/api/loans/${loanId}/notifications/esignature-reminders`,
13857
+ method: "POST",
13858
+ body: data,
13859
+ secure: true,
13860
+ type: "application/json",
13861
+ ...params,
13862
+ }),
13863
+
11451
13864
  /**
11452
13865
  * No description
11453
13866
  *