@matech/thebigpos-sdk 2.43.8 → 2.43.11-ai-bi

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -67,6 +67,18 @@ export type BorrowerRelationship = "NotApplicable" | "Spouse" | "NonSpouse";
67
67
  export type BorrowerApplicationStatus = "Draft" | "Complete";
68
68
  export type BillingType = "ClosedLoan" | "LoanOfficer";
69
69
  export type AuditChangeType = "Created" | "Modified" | "SoftDeleted" | "HardDeleted" | "Restored" | "Deactivated" | "Reactivated";
70
+ export type AiUrlSourceScope = "FullDomain" | "SpecificPath";
71
+ export type AiUrlSourceCategory = "Regulatory" | "Guidelines" | "MarketData" | "Custom";
72
+ export type AiStructuredDataType = "Table" | "DocumentAnalysis" | "DocumentList" | "GeneratedDocument";
73
+ export type AiQueryTemplateName = "PipelineSummary" | "LoanDetail" | "LoansClosing" | "StaleLoans" | "LoansByType" | "LoansByOfficer" | "AverageLoanAmount" | "LockedVsUnlocked" | "LoansByPurpose" | "LoansByPropertyState" | "LoansByRate" | "DtiLtvRisk" | "DisclosureTracking" | "NewLoans" | "ExpiringLocks" | "ClosedLoans" | "VerificationGaps" | "CreditScoreDistribution" | "OccupancyMix" | "PropertyTypeMix" | "FirstTimeHomebuyer" | "SelfEmployed" | "ReferralSourcePerformance" | "AmortizationMix" | "TimeToClose" | "ConversionFunnel" | "MonthlyProduction" | "PaymentAffordability" | "DownPaymentCashToClose" | "ApprovalExpirations" | "ApplicationCompleteness" | "LosSyncHealth" | "DeclarationsRisk" | "MilitaryEligibility";
74
+ export type AiPromptCategory = "DocumentAnalysis" | "DataQuery" | "General" | "Action";
75
+ export type AiOutputType = "Text" | "Document";
76
+ export type AiIntent = "Greeting" | "Invalid" | "Relevant" | "LoanSpecific" | "DocumentList" | "GeneralKnowledge" | "Blocked" | "Action" | "ConversationMeta";
77
+ export type AiGuardrailCategory = "ContentSafety" | "PromptInjection" | "Privacy" | "Legal";
78
+ export type AiDisplayHint = "Table" | "SummaryCards" | "RankedList" | "Comparison" | "ExecutiveBrief";
79
+ export type AiConfigEntityType = "Prompt" | "Guardrail" | "CanonicalField" | "UrlSource" | "AdminSettings";
80
+ export type AiConfigChangeAction = "Created" | "Updated" | "Deleted" | "Toggled";
81
+ export type AiAuditEventType = "Error" | "GuardrailBlockedPre" | "GuardrailPassedPre" | "IntentClassified" | "LoanResolvedFromMessage" | "DocumentNotFound" | "GuardrailBlockedPost" | "GuardrailPassedPost" | "DocumentAnalyzed" | "DocumentList" | "DocumentResolutionAmbiguous" | "ResponseGenerated" | "ParametersExtracted" | "QueryExecuted" | "LoanContextNotFound" | "LoanContextLoaded" | "GuardrailBlockedBedrock" | "PromptMatched" | "QueryCondensed" | "IntentParseFailed" | "LoanSearchTermDiscarded" | "CanonicalFieldsSelected";
70
82
  export type AddressFamily = "Unspecified" | "Unix" | "InterNetwork" | "ImpLink" | "Pup" | "Chaos" | "NS" | "Ipx" | "Iso" | "Osi" | "Ecma" | "DataKit" | "Ccitt" | "Sna" | "DecNet" | "DataLink" | "Lat" | "HyperChannel" | "AppleTalk" | "NetBios" | "VoiceView" | "FireFox" | "Banyan" | "Atm" | "InterNetworkV6" | "Cluster" | "Ieee12844" | "Irda" | "NetworkDesigners" | "Max" | "Packet" | "ControllerAreaNetwork" | "Unknown";
71
83
  export interface ASOSettings {
72
84
  enabled: boolean;
@@ -146,11 +158,13 @@ export interface AccountSettings {
146
158
  smsNumber?: string | null;
147
159
  ssoHostOverride?: string | null;
148
160
  isEarlyAdopter: boolean;
161
+ isAIEnabled: boolean;
149
162
  }
150
163
  export interface AccountSettingsRequest {
151
164
  isSmsEnabled: boolean;
152
165
  smsNumber?: string | null;
153
166
  isEarlyAdopter: boolean;
167
+ isAIEnabled: boolean;
154
168
  }
155
169
  export interface Action {
156
170
  /** @format uuid */
@@ -294,6 +308,326 @@ export interface AffordabilityCalculatorRequest {
294
308
  /** @format double */
295
309
  annualInsurance: number;
296
310
  }
311
+ export interface AiAdminSettings {
312
+ bedrockModelId: string;
313
+ /** @format int32 */
314
+ maxTokens: number;
315
+ /** @format double */
316
+ temperature: number;
317
+ /** @format int32 */
318
+ conversationContextTurns: number;
319
+ /** @format int32 */
320
+ requestTimeoutSeconds: number;
321
+ bedrockRegion: string;
322
+ }
323
+ export interface AiAdminSettingsRequest {
324
+ bedrockModelId?: string | null;
325
+ /** @format int32 */
326
+ maxTokens?: number | null;
327
+ /** @format double */
328
+ temperature?: number | null;
329
+ /** @format int32 */
330
+ conversationContextTurns?: number | null;
331
+ /** @format int32 */
332
+ requestTimeoutSeconds?: number | null;
333
+ }
334
+ export interface AiAdminStats {
335
+ /** @format int32 */
336
+ totalRequests: number;
337
+ /** @format int32 */
338
+ blockedRequests: number;
339
+ /** @format double */
340
+ averageResponseTimeMs: number;
341
+ /** @format int32 */
342
+ totalInputTokens: number;
343
+ /** @format int32 */
344
+ totalOutputTokens: number;
345
+ /** @format int32 */
346
+ totalTokens: number;
347
+ intentDistribution: Record<string, number>;
348
+ topQueryTemplates: Record<string, number>;
349
+ period: string;
350
+ }
351
+ export interface AiAuditLog {
352
+ /** @format uuid */
353
+ id: string;
354
+ /** @format uuid */
355
+ requestId: string;
356
+ /** @format uuid */
357
+ userId: string;
358
+ /** @format uuid */
359
+ conversationId?: string | null;
360
+ /** @format uuid */
361
+ messageId?: string | null;
362
+ eventType: "Error" | "GuardrailBlockedPre" | "GuardrailPassedPre" | "IntentClassified" | "LoanResolvedFromMessage" | "DocumentNotFound" | "GuardrailBlockedPost" | "GuardrailPassedPost" | "DocumentAnalyzed" | "DocumentList" | "DocumentResolutionAmbiguous" | "ResponseGenerated" | "ParametersExtracted" | "QueryExecuted" | "LoanContextNotFound" | "LoanContextLoaded" | "GuardrailBlockedBedrock" | "PromptMatched" | "QueryCondensed" | "IntentParseFailed" | "LoanSearchTermDiscarded" | "CanonicalFieldsSelected";
363
+ modelId?: string | null;
364
+ /** @format int32 */
365
+ inputTokens?: number | null;
366
+ /** @format int32 */
367
+ outputTokens?: number | null;
368
+ /** @format int32 */
369
+ latencyMs?: number | null;
370
+ bedrockRequestId?: string | null;
371
+ guardrailName?: string | null;
372
+ guardrailCategory?: string | null;
373
+ rawRequest?: string | null;
374
+ rawResponse?: string | null;
375
+ details?: any;
376
+ /** @format date-time */
377
+ createdAt: string;
378
+ }
379
+ export interface AiAuditLogPaginated {
380
+ rows: AiAuditLog[];
381
+ pagination: Pagination;
382
+ /** @format int64 */
383
+ count: number;
384
+ }
385
+ export interface AiCanonicalField {
386
+ /** @format uuid */
387
+ id: string;
388
+ canonicalName: string;
389
+ displayName: string;
390
+ description: string;
391
+ allowedRoles: string[];
392
+ efPath?: string | null;
393
+ isPii: boolean;
394
+ isActive: boolean;
395
+ dataSource: string;
396
+ isDefault: boolean;
397
+ category?: string | null;
398
+ jsonPropertyName?: string | null;
399
+ textractKey?: string | null;
400
+ textractKeyAliases: string[];
401
+ hasAccountOverride: boolean;
402
+ /** @format date-time */
403
+ createdAt: string;
404
+ /** @format date-time */
405
+ updatedAt?: string | null;
406
+ }
407
+ export interface AiChat {
408
+ /** @format uuid */
409
+ conversationId: string;
410
+ /** @format uuid */
411
+ messageId: string;
412
+ response: AiChatBody;
413
+ metadata: AiChatMetadata;
414
+ }
415
+ export interface AiChatBody {
416
+ text: string;
417
+ data?: AiChatStructuredData | null;
418
+ }
419
+ export interface AiChatMessage {
420
+ /** @format uuid */
421
+ id: string;
422
+ userMessage: string;
423
+ assistantResponse: string;
424
+ intent?: AiIntent | null;
425
+ fieldsAccessed?: string[] | null;
426
+ data?: AiChatStructuredData | null;
427
+ /** @format date-time */
428
+ createdAt: string;
429
+ }
430
+ export interface AiChatMessagePaginated {
431
+ rows: AiChatMessage[];
432
+ pagination: Pagination;
433
+ /** @format int64 */
434
+ count: number;
435
+ }
436
+ export interface AiChatMetadata {
437
+ intent: "Greeting" | "Invalid" | "Relevant" | "LoanSpecific" | "DocumentList" | "GeneralKnowledge" | "Blocked" | "Action" | "ConversationMeta";
438
+ fieldsAccessed: string[];
439
+ /** @format int64 */
440
+ queryTimeMs: number;
441
+ /** @format int64 */
442
+ llmTimeMs: number;
443
+ /** @format int32 */
444
+ inputTokens: number;
445
+ /** @format int32 */
446
+ outputTokens: number;
447
+ modelId?: string | null;
448
+ wasBlocked: boolean;
449
+ blockedReason?: string | null;
450
+ }
451
+ export interface AiChatRequest {
452
+ message: string;
453
+ /** @format uuid */
454
+ conversationId?: string | null;
455
+ /** @format uuid */
456
+ loanId?: string | null;
457
+ documentIds?: string[] | null;
458
+ /** @format uuid */
459
+ promptId?: string | null;
460
+ }
461
+ export interface AiChatStructuredData {
462
+ type: "Table" | "DocumentAnalysis" | "DocumentList" | "GeneratedDocument";
463
+ displayHint?: AiDisplayHint | null;
464
+ detectedDocumentType?: string | null;
465
+ columns: string[];
466
+ rows: string[][];
467
+ /** @format uuid */
468
+ generatedDocumentId?: string | null;
469
+ generatedFileName?: string | null;
470
+ }
471
+ export interface AiConfigChangeLog {
472
+ /** @format uuid */
473
+ id: string;
474
+ /** @format uuid */
475
+ accountId?: string | null;
476
+ /** @format uuid */
477
+ actorUserId: string;
478
+ entityType: "Prompt" | "Guardrail" | "CanonicalField" | "UrlSource" | "AdminSettings";
479
+ /** @format uuid */
480
+ entityId?: string | null;
481
+ action: "Created" | "Updated" | "Deleted" | "Toggled";
482
+ before?: any;
483
+ after?: any;
484
+ /** @format date-time */
485
+ createdAt: string;
486
+ }
487
+ export interface AiConfigChangeLogPaginated {
488
+ rows: AiConfigChangeLog[];
489
+ pagination: Pagination;
490
+ /** @format int64 */
491
+ count: number;
492
+ }
493
+ export interface AiConversationAuditSummary {
494
+ /** @format uuid */
495
+ conversationId: string;
496
+ /** @format uuid */
497
+ userId: string;
498
+ userName?: string | null;
499
+ userRole?: string | null;
500
+ name?: string | null;
501
+ /** @format int32 */
502
+ turnCount: number;
503
+ /** @format int32 */
504
+ completedCount: number;
505
+ /** @format int32 */
506
+ blockedCount: number;
507
+ /** @format int32 */
508
+ errorCount: number;
509
+ /** @format int32 */
510
+ totalTokens: number;
511
+ /** @format date-time */
512
+ lastActivityAt: string;
513
+ }
514
+ export interface AiConversationAuditSummaryPaginated {
515
+ rows: AiConversationAuditSummary[];
516
+ pagination: Pagination;
517
+ /** @format int64 */
518
+ count: number;
519
+ }
520
+ export interface AiConversationDetail {
521
+ /** @format uuid */
522
+ id: string;
523
+ name?: string | null;
524
+ isPinned: boolean;
525
+ /** @format date-time */
526
+ createdAt: string;
527
+ /** @format date-time */
528
+ updatedAt?: string | null;
529
+ /** @format int32 */
530
+ messageCount: number;
531
+ }
532
+ export interface AiConversationListItem {
533
+ /** @format uuid */
534
+ id: string;
535
+ /** @format uuid */
536
+ userId: string;
537
+ name?: string | null;
538
+ preview: string;
539
+ /** @format int32 */
540
+ messageCount: number;
541
+ isPinned: boolean;
542
+ /** @format date-time */
543
+ createdAt: string;
544
+ /** @format date-time */
545
+ updatedAt?: string | null;
546
+ }
547
+ export interface AiConversationListItemPaginated {
548
+ rows: AiConversationListItem[];
549
+ pagination: Pagination;
550
+ /** @format int64 */
551
+ count: number;
552
+ }
553
+ export interface AiGuardrail {
554
+ /** @format uuid */
555
+ id: string;
556
+ name: string;
557
+ category: "ContentSafety" | "PromptInjection" | "Privacy" | "Legal";
558
+ description?: string | null;
559
+ keywords: string[];
560
+ responseTemplate: string;
561
+ isDefault: boolean;
562
+ isEnabled: boolean;
563
+ hasAccountOverride: boolean;
564
+ /** @format date-time */
565
+ createdAt: string;
566
+ /** @format date-time */
567
+ updatedAt?: string | null;
568
+ }
569
+ export interface AiPrompt {
570
+ /** @format uuid */
571
+ id: string;
572
+ title: string;
573
+ slug?: string | null;
574
+ description: string;
575
+ documentTypes: string[];
576
+ applicableUrlSourceIds: string[];
577
+ allowedRoles: string[];
578
+ systemPrompt: string;
579
+ /** @format int32 */
580
+ sortOrder: number;
581
+ isDefault: boolean;
582
+ /** @format uuid */
583
+ accountId?: string | null;
584
+ isActive: boolean;
585
+ category?: AiPromptCategory | null;
586
+ queryTemplateName?: AiQueryTemplateName | null;
587
+ displayHint?: AiDisplayHint | null;
588
+ bedrockModelId?: string | null;
589
+ requiredDataSources?: string[] | null;
590
+ outputType?: AiOutputType | null;
591
+ hasAccountOverride: boolean;
592
+ /** @format date-time */
593
+ createdAt: string;
594
+ /** @format date-time */
595
+ updatedAt?: string | null;
596
+ }
597
+ export interface AiPromptSummary {
598
+ /** @format uuid */
599
+ id: string;
600
+ title: string;
601
+ slug?: string | null;
602
+ description: string;
603
+ documentTypes: string[];
604
+ applicableUrlSourceIds: string[];
605
+ /** @format int32 */
606
+ sortOrder: number;
607
+ category?: AiPromptCategory | null;
608
+ queryTemplateName?: AiQueryTemplateName | null;
609
+ displayHint?: AiDisplayHint | null;
610
+ bedrockModelId?: string | null;
611
+ requiredDataSources?: string[] | null;
612
+ outputType?: AiOutputType | null;
613
+ }
614
+ export interface AiUrlSource {
615
+ /** @format uuid */
616
+ id: string;
617
+ slug?: string | null;
618
+ name: string;
619
+ url: string;
620
+ description?: string | null;
621
+ category: "Regulatory" | "Guidelines" | "MarketData" | "Custom";
622
+ scope: "FullDomain" | "SpecificPath";
623
+ isActive: boolean;
624
+ isDefault: boolean;
625
+ hasAccountOverride: boolean;
626
+ /** @format date-time */
627
+ createdAt: string;
628
+ /** @format date-time */
629
+ updatedAt?: string | null;
630
+ }
297
631
  export interface AllowImpersonationRequest {
298
632
  email: string;
299
633
  }
@@ -709,6 +1043,45 @@ export interface CreateAccountRequest {
709
1043
  losIntegration: LOSIntegration;
710
1044
  billingSettings: AccountBillingRequest;
711
1045
  }
1046
+ export interface CreateAiCanonicalFieldRequest {
1047
+ displayName: string;
1048
+ description: string;
1049
+ allowedRoles: string[];
1050
+ isPii: boolean;
1051
+ dataSource: string;
1052
+ category?: string | null;
1053
+ }
1054
+ export interface CreateAiGuardrailRequest {
1055
+ name: string;
1056
+ category: "ContentSafety" | "PromptInjection" | "Privacy" | "Legal";
1057
+ description?: string | null;
1058
+ keywords: string[];
1059
+ responseTemplate: string;
1060
+ }
1061
+ export interface CreateAiPromptRequest {
1062
+ title: string;
1063
+ slug?: string | null;
1064
+ description: string;
1065
+ documentTypes: string[];
1066
+ applicableUrlSourceIds: string[];
1067
+ allowedRoles: string[];
1068
+ systemPrompt: string;
1069
+ /** @format int32 */
1070
+ sortOrder: number;
1071
+ category?: AiPromptCategory | null;
1072
+ queryTemplateName?: AiQueryTemplateName | null;
1073
+ displayHint?: AiDisplayHint | null;
1074
+ bedrockModelId?: string | null;
1075
+ requiredDataSources?: string[] | null;
1076
+ outputType?: AiOutputType | null;
1077
+ }
1078
+ export interface CreateAiUrlSourceRequest {
1079
+ name: string;
1080
+ url: string;
1081
+ description?: string | null;
1082
+ category: "Regulatory" | "Guidelines" | "MarketData" | "Custom";
1083
+ scope: "FullDomain" | "SpecificPath";
1084
+ }
712
1085
  export interface CreateBranchRequest {
713
1086
  name: string;
714
1087
  /** @format uuid */
@@ -1601,6 +1974,13 @@ export interface GenerateDocumentRequest {
1601
1974
  preview: boolean;
1602
1975
  recipients: string[];
1603
1976
  }
1977
+ export interface GenerateSystemPrompt {
1978
+ systemPrompt: string;
1979
+ }
1980
+ export interface GenerateSystemPromptRequest {
1981
+ description: string;
1982
+ category: "DocumentAnalysis" | "DataQuery" | "General" | "Action";
1983
+ }
1604
1984
  export interface GetApplications {
1605
1985
  applications: ApplicationRowData[];
1606
1986
  }
@@ -3583,6 +3963,9 @@ export interface PendingTasksSummary {
3583
3963
  total: number;
3584
3964
  borrowers: BorrowerCount[];
3585
3965
  }
3966
+ export interface PinAiConversationRequest {
3967
+ isPinned: boolean;
3968
+ }
3586
3969
  export interface PostLoanComparisonPdfRequest {
3587
3970
  /** @format uuid */
3588
3971
  siteConfigurationID: string;
@@ -3732,6 +4115,9 @@ export interface RegisterUserRequest {
3732
4115
  /** @format uuid */
3733
4116
  inviteCode?: string | null;
3734
4117
  }
4118
+ export interface RenameAiConversationRequest {
4119
+ name: string;
4120
+ }
3735
4121
  export interface RequestImpersonationRequest {
3736
4122
  email: string;
3737
4123
  }
@@ -4490,6 +4876,13 @@ export interface SocialSurveyRecord {
4490
4876
  /** @format date-time */
4491
4877
  reviewCompletedTimeStamp?: string | null;
4492
4878
  }
4879
+ export interface SupportedModel {
4880
+ modelId: string;
4881
+ displayName: string;
4882
+ provider: string;
4883
+ description?: string | null;
4884
+ isDefault: boolean;
4885
+ }
4493
4886
  export interface SurveyEmailRequest {
4494
4887
  loanOfficerEmailAddress: string;
4495
4888
  }
@@ -4713,6 +5106,43 @@ export interface UpdateAccountRequest {
4713
5106
  asoSettings?: ASOSettings | null;
4714
5107
  settings: AccountSettingsRequest;
4715
5108
  }
5109
+ export interface UpdateAiCanonicalFieldRequest {
5110
+ displayName: string;
5111
+ description: string;
5112
+ allowedRoles: string[];
5113
+ isPii: boolean;
5114
+ category?: string | null;
5115
+ }
5116
+ export interface UpdateAiGuardrailRequest {
5117
+ name: string;
5118
+ category: "ContentSafety" | "PromptInjection" | "Privacy" | "Legal";
5119
+ description?: string | null;
5120
+ keywords: string[];
5121
+ responseTemplate: string;
5122
+ }
5123
+ export interface UpdateAiPromptRequest {
5124
+ title: string;
5125
+ description: string;
5126
+ documentTypes: string[];
5127
+ applicableUrlSourceIds: string[];
5128
+ allowedRoles: string[];
5129
+ systemPrompt: string;
5130
+ /** @format int32 */
5131
+ sortOrder: number;
5132
+ category?: AiPromptCategory | null;
5133
+ queryTemplateName?: AiQueryTemplateName | null;
5134
+ displayHint?: AiDisplayHint | null;
5135
+ bedrockModelId?: string | null;
5136
+ requiredDataSources?: string[] | null;
5137
+ outputType?: AiOutputType | null;
5138
+ }
5139
+ export interface UpdateAiUrlSourceRequest {
5140
+ name: string;
5141
+ url: string;
5142
+ description?: string | null;
5143
+ category: "Regulatory" | "Guidelines" | "MarketData" | "Custom";
5144
+ scope: "FullDomain" | "SpecificPath";
5145
+ }
4716
5146
  export interface UpdateCustomFieldDefinitionRequest {
4717
5147
  isRequired: boolean;
4718
5148
  /** @format int32 */
@@ -5273,7 +5703,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
5273
5703
  }
5274
5704
  /**
5275
5705
  * @title The Big POS API
5276
- * @version v2.43.8
5706
+ * @version v2.43.11
5277
5707
  * @termsOfService https://www.thebigpos.com/terms-of-use/
5278
5708
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
5279
5709
  */
@@ -5434,6 +5864,727 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5434
5864
  * @response `422` `ProblemDetails` Unprocessable Content
5435
5865
  */
5436
5866
  updateAccountBilling: (id: string, data: AccountBillingRequest, params?: RequestParams) => Promise<AxiosResponse<AccountBilling, any, {}>>;
5867
+ /**
5868
+ * No description
5869
+ *
5870
+ * @tags AiAdmin
5871
+ * @name GetAiAuditLogs
5872
+ * @summary Get paginated audit logs
5873
+ * @request GET:/api/ai/admin/audit-logs
5874
+ * @secure
5875
+ * @response `200` `AiAuditLogPaginated` OK
5876
+ */
5877
+ getAiAuditLogs: (query?: {
5878
+ eventType?: AiAuditEventType;
5879
+ /** @format uuid */
5880
+ requestId?: string;
5881
+ /** @format uuid */
5882
+ userId?: string;
5883
+ /** @format uuid */
5884
+ conversationId?: string;
5885
+ blockedOnly?: boolean;
5886
+ /** @format date-time */
5887
+ startDate?: string;
5888
+ /** @format date-time */
5889
+ endDate?: string;
5890
+ /** @format int32 */
5891
+ pageSize?: number;
5892
+ /** @format int32 */
5893
+ pageNumber?: number;
5894
+ sortBy?: string;
5895
+ sortDirection?: string;
5896
+ }, params?: RequestParams) => Promise<AxiosResponse<AiAuditLogPaginated, any, {}>>;
5897
+ /**
5898
+ * No description
5899
+ *
5900
+ * @tags AiAdmin
5901
+ * @name GetAiRequestLifecycle
5902
+ * @summary Get the full event lifecycle of a single AI request
5903
+ * @request GET:/api/ai/admin/audit-logs/request/{requestId}
5904
+ * @secure
5905
+ * @response `200` `(AiAuditLog)[]` OK
5906
+ */
5907
+ getAiRequestLifecycle: (requestId: string, params?: RequestParams) => Promise<AxiosResponse<AiAuditLog[], any, {}>>;
5908
+ /**
5909
+ * No description
5910
+ *
5911
+ * @tags AiAdmin
5912
+ * @name GetAiAuditConversations
5913
+ * @summary List conversations with their audit roll-up — origin user, turns, status, tokens
5914
+ * @request GET:/api/ai/admin/audit-conversations
5915
+ * @secure
5916
+ * @response `200` `AiConversationAuditSummaryPaginated` OK
5917
+ */
5918
+ getAiAuditConversations: (query?: {
5919
+ searchText?: string;
5920
+ /** @format date-time */
5921
+ startDate?: string;
5922
+ /** @format date-time */
5923
+ endDate?: string;
5924
+ /** @format int32 */
5925
+ pageSize?: number;
5926
+ /** @format int32 */
5927
+ pageNumber?: number;
5928
+ sortBy?: string;
5929
+ sortDirection?: string;
5930
+ }, params?: RequestParams) => Promise<AxiosResponse<AiConversationAuditSummaryPaginated, any, {}>>;
5931
+ /**
5932
+ * No description
5933
+ *
5934
+ * @tags AiAdmin
5935
+ * @name GetAiAdminStats
5936
+ * @summary Get AI admin dashboard stats
5937
+ * @request GET:/api/ai/admin/stats
5938
+ * @secure
5939
+ * @response `200` `AiAdminStats` OK
5940
+ */
5941
+ getAiAdminStats: (query?: {
5942
+ /** @format date-time */
5943
+ startDate?: string;
5944
+ /** @format date-time */
5945
+ endDate?: string;
5946
+ }, params?: RequestParams) => Promise<AxiosResponse<AiAdminStats, any, {}>>;
5947
+ /**
5948
+ * No description
5949
+ *
5950
+ * @tags AiAdmin
5951
+ * @name GetAiConfigChanges
5952
+ * @summary Get the AI configuration change history (who changed prompts, guardrails, fields, sources)
5953
+ * @request GET:/api/ai/admin/config-changes
5954
+ * @secure
5955
+ * @response `200` `AiConfigChangeLogPaginated` OK
5956
+ */
5957
+ getAiConfigChanges: (query?: {
5958
+ entityType?: AiConfigEntityType;
5959
+ /** @format uuid */
5960
+ entityId?: string;
5961
+ /** @format uuid */
5962
+ actorUserId?: string;
5963
+ action?: AiConfigChangeAction;
5964
+ /** @format date-time */
5965
+ startDate?: string;
5966
+ /** @format date-time */
5967
+ endDate?: string;
5968
+ /** @format int32 */
5969
+ pageSize?: number;
5970
+ /** @format int32 */
5971
+ pageNumber?: number;
5972
+ sortBy?: string;
5973
+ sortDirection?: string;
5974
+ }, params?: RequestParams) => Promise<AxiosResponse<AiConfigChangeLogPaginated, any, {}>>;
5975
+ /**
5976
+ * No description
5977
+ *
5978
+ * @tags AiAdminPrompt
5979
+ * @name GetAiPrompts
5980
+ * @summary Get all prompts
5981
+ * @request GET:/api/ai/admin/prompts
5982
+ * @secure
5983
+ * @response `200` `(AiPrompt)[]` OK
5984
+ */
5985
+ getAiPrompts: (params?: RequestParams) => Promise<AxiosResponse<AiPrompt[], any, {}>>;
5986
+ /**
5987
+ * No description
5988
+ *
5989
+ * @tags AiAdminPrompt
5990
+ * @name CreateAiPrompt
5991
+ * @summary Create custom prompt
5992
+ * @request POST:/api/ai/admin/prompts
5993
+ * @secure
5994
+ * @response `201` `AiPrompt` Created
5995
+ * @response `400` `ProblemDetails` Bad Request
5996
+ */
5997
+ createAiPrompt: (data: CreateAiPromptRequest, params?: RequestParams) => Promise<AxiosResponse<AiPrompt, any, {}>>;
5998
+ /**
5999
+ * No description
6000
+ *
6001
+ * @tags AiAdminPrompt
6002
+ * @name GetAiPrompt
6003
+ * @summary Get prompt by ID
6004
+ * @request GET:/api/ai/admin/prompts/{id}
6005
+ * @secure
6006
+ * @response `200` `AiPrompt` OK
6007
+ * @response `404` `ProblemDetails` Not Found
6008
+ */
6009
+ getAiPrompt: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiPrompt, any, {}>>;
6010
+ /**
6011
+ * No description
6012
+ *
6013
+ * @tags AiAdminPrompt
6014
+ * @name UpdateAiPrompt
6015
+ * @summary Update prompt
6016
+ * @request PUT:/api/ai/admin/prompts/{id}
6017
+ * @secure
6018
+ * @response `200` `AiPrompt` OK
6019
+ * @response `400` `ProblemDetails` Bad Request
6020
+ * @response `404` `ProblemDetails` Not Found
6021
+ */
6022
+ updateAiPrompt: (id: string, data: UpdateAiPromptRequest, params?: RequestParams) => Promise<AxiosResponse<AiPrompt, any, {}>>;
6023
+ /**
6024
+ * No description
6025
+ *
6026
+ * @tags AiAdminPrompt
6027
+ * @name DeleteAiPrompt
6028
+ * @summary Delete prompt
6029
+ * @request DELETE:/api/ai/admin/prompts/{id}
6030
+ * @secure
6031
+ * @response `204` `void` No Content
6032
+ * @response `400` `ProblemDetails` Bad Request
6033
+ * @response `404` `ProblemDetails` Not Found
6034
+ */
6035
+ deleteAiPrompt: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6036
+ /**
6037
+ * No description
6038
+ *
6039
+ * @tags AiAdminPrompt
6040
+ * @name ToggleAiPrompt
6041
+ * @summary Toggle prompt active/inactive
6042
+ * @request PATCH:/api/ai/admin/prompts/{id}/toggle
6043
+ * @secure
6044
+ * @response `200` `AiPrompt` OK
6045
+ * @response `404` `ProblemDetails` Not Found
6046
+ */
6047
+ toggleAiPrompt: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiPrompt, any, {}>>;
6048
+ /**
6049
+ * No description
6050
+ *
6051
+ * @tags AiAdminPrompt
6052
+ * @name GenerateAiSystemPrompt
6053
+ * @summary Generate a system prompt from description
6054
+ * @request POST:/api/ai/admin/prompts/generate
6055
+ * @secure
6056
+ * @response `200` `GenerateSystemPrompt` OK
6057
+ * @response `400` `ProblemDetails` Bad Request
6058
+ */
6059
+ generateAiSystemPrompt: (data: GenerateSystemPromptRequest, params?: RequestParams) => Promise<AxiosResponse<GenerateSystemPrompt, any, {}>>;
6060
+ /**
6061
+ * No description
6062
+ *
6063
+ * @tags AiAdminPrompt
6064
+ * @name GetSupportedModels
6065
+ * @summary Get supported LLM models
6066
+ * @request GET:/api/ai/admin/prompts/supported-models
6067
+ * @secure
6068
+ * @response `200` `(SupportedModel)[]` OK
6069
+ */
6070
+ getSupportedModels: (params?: RequestParams) => Promise<AxiosResponse<SupportedModel[], any, {}>>;
6071
+ /**
6072
+ * No description
6073
+ *
6074
+ * @tags AiAdminSettings
6075
+ * @name GetAiAdminSettings
6076
+ * @summary Get global AI settings
6077
+ * @request GET:/api/ai/admin/settings
6078
+ * @secure
6079
+ * @response `200` `AiAdminSettings` OK
6080
+ */
6081
+ getAiAdminSettings: (params?: RequestParams) => Promise<AxiosResponse<AiAdminSettings, any, {}>>;
6082
+ /**
6083
+ * No description
6084
+ *
6085
+ * @tags AiAdminSettings
6086
+ * @name UpdateAiAdminSettings
6087
+ * @summary Update global AI settings
6088
+ * @request PUT:/api/ai/admin/settings
6089
+ * @secure
6090
+ * @response `200` `AiAdminSettings` OK
6091
+ * @response `400` `ProblemDetails` Bad Request
6092
+ */
6093
+ updateAiAdminSettings: (data: AiAdminSettingsRequest, params?: RequestParams) => Promise<AxiosResponse<AiAdminSettings, any, {}>>;
6094
+ /**
6095
+ * No description
6096
+ *
6097
+ * @tags AiCanonicalField
6098
+ * @name GetAiCanonicalFields
6099
+ * @summary Get all canonical fields
6100
+ * @request GET:/api/ai/admin/fields
6101
+ * @secure
6102
+ * @response `200` `(AiCanonicalField)[]` OK
6103
+ */
6104
+ getAiCanonicalFields: (params?: RequestParams) => Promise<AxiosResponse<AiCanonicalField[], any, {}>>;
6105
+ /**
6106
+ * No description
6107
+ *
6108
+ * @tags AiCanonicalField
6109
+ * @name CreateAiCanonicalField
6110
+ * @summary Create canonical field
6111
+ * @request POST:/api/ai/admin/fields
6112
+ * @secure
6113
+ * @response `201` `AiCanonicalField` Created
6114
+ * @response `400` `ProblemDetails` Bad Request
6115
+ */
6116
+ createAiCanonicalField: (data: CreateAiCanonicalFieldRequest, params?: RequestParams) => Promise<AxiosResponse<AiCanonicalField, any, {}>>;
6117
+ /**
6118
+ * No description
6119
+ *
6120
+ * @tags AiCanonicalField
6121
+ * @name GetAiCanonicalField
6122
+ * @summary Get canonical field by ID
6123
+ * @request GET:/api/ai/admin/fields/{id}
6124
+ * @secure
6125
+ * @response `200` `AiCanonicalField` OK
6126
+ * @response `404` `ProblemDetails` Not Found
6127
+ */
6128
+ getAiCanonicalField: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiCanonicalField, any, {}>>;
6129
+ /**
6130
+ * No description
6131
+ *
6132
+ * @tags AiCanonicalField
6133
+ * @name UpdateAiCanonicalField
6134
+ * @summary Update canonical field
6135
+ * @request PUT:/api/ai/admin/fields/{id}
6136
+ * @secure
6137
+ * @response `200` `AiCanonicalField` OK
6138
+ * @response `400` `ProblemDetails` Bad Request
6139
+ * @response `404` `ProblemDetails` Not Found
6140
+ */
6141
+ updateAiCanonicalField: (id: string, data: UpdateAiCanonicalFieldRequest, params?: RequestParams) => Promise<AxiosResponse<AiCanonicalField, any, {}>>;
6142
+ /**
6143
+ * No description
6144
+ *
6145
+ * @tags AiCanonicalField
6146
+ * @name DeleteAiCanonicalField
6147
+ * @summary Delete canonical field
6148
+ * @request DELETE:/api/ai/admin/fields/{id}
6149
+ * @secure
6150
+ * @response `204` `void` No Content
6151
+ * @response `404` `ProblemDetails` Not Found
6152
+ */
6153
+ deleteAiCanonicalField: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6154
+ /**
6155
+ * No description
6156
+ *
6157
+ * @tags AiCanonicalField
6158
+ * @name ToggleAiCanonicalField
6159
+ * @summary Toggle canonical field active/inactive
6160
+ * @request PATCH:/api/ai/admin/fields/{id}/toggle
6161
+ * @secure
6162
+ * @response `200` `AiCanonicalField` OK
6163
+ * @response `404` `ProblemDetails` Not Found
6164
+ */
6165
+ toggleAiCanonicalField: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiCanonicalField, any, {}>>;
6166
+ /**
6167
+ * No description
6168
+ *
6169
+ * @tags AiChat
6170
+ * @name AiChat
6171
+ * @summary Send AI chat message
6172
+ * @request POST:/api/ai/chat
6173
+ * @secure
6174
+ * @response `200` `AiChat` OK
6175
+ * @response `400` `ProblemDetails` Bad Request
6176
+ * @response `401` `ProblemDetails` Unauthorized
6177
+ */
6178
+ aiChat: (data: AiChatRequest, params?: RequestParams) => Promise<AxiosResponse<AiChat, any, {}>>;
6179
+ /**
6180
+ * No description
6181
+ *
6182
+ * @tags AiConversation
6183
+ * @name GetAiConversations
6184
+ * @summary Get user conversations
6185
+ * @request GET:/api/ai/conversations
6186
+ * @secure
6187
+ * @response `200` `AiConversationListItemPaginated` OK
6188
+ */
6189
+ getAiConversations: (query?: {
6190
+ /** @format int32 */
6191
+ pageSize?: number;
6192
+ /** @format int32 */
6193
+ pageNumber?: number;
6194
+ sortBy?: string;
6195
+ sortDirection?: string;
6196
+ }, params?: RequestParams) => Promise<AxiosResponse<AiConversationListItemPaginated, any, {}>>;
6197
+ /**
6198
+ * No description
6199
+ *
6200
+ * @tags AiConversation
6201
+ * @name GetAiConversation
6202
+ * @summary Get conversation metadata
6203
+ * @request GET:/api/ai/conversations/{id}
6204
+ * @secure
6205
+ * @response `200` `AiConversationDetail` OK
6206
+ * @response `403` `ProblemDetails` Forbidden
6207
+ * @response `404` `ProblemDetails` Not Found
6208
+ */
6209
+ getAiConversation: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiConversationDetail, any, {}>>;
6210
+ /**
6211
+ * No description
6212
+ *
6213
+ * @tags AiConversation
6214
+ * @name RenameAiConversation
6215
+ * @summary Rename conversation
6216
+ * @request PATCH:/api/ai/conversations/{id}
6217
+ * @secure
6218
+ * @response `200` `AiConversationDetail` OK
6219
+ * @response `400` `ProblemDetails` Bad Request
6220
+ * @response `403` `ProblemDetails` Forbidden
6221
+ * @response `404` `ProblemDetails` Not Found
6222
+ */
6223
+ renameAiConversation: (id: string, data: JsonPatchDocument, params?: RequestParams) => Promise<AxiosResponse<AiConversationDetail, any, {}>>;
6224
+ /**
6225
+ * No description
6226
+ *
6227
+ * @tags AiConversation
6228
+ * @name DeleteAiConversation
6229
+ * @summary Delete conversation
6230
+ * @request DELETE:/api/ai/conversations/{id}
6231
+ * @secure
6232
+ * @response `204` `void` No Content
6233
+ * @response `403` `ProblemDetails` Forbidden
6234
+ * @response `404` `ProblemDetails` Not Found
6235
+ */
6236
+ deleteAiConversation: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6237
+ /**
6238
+ * No description
6239
+ *
6240
+ * @tags AiConversation
6241
+ * @name GetAiConversationMessages
6242
+ * @summary Get conversation messages
6243
+ * @request GET:/api/ai/conversations/{id}/messages
6244
+ * @secure
6245
+ * @response `200` `AiChatMessagePaginated` OK
6246
+ * @response `403` `ProblemDetails` Forbidden
6247
+ * @response `404` `ProblemDetails` Not Found
6248
+ */
6249
+ getAiConversationMessages: (id: string, query?: {
6250
+ /** @format int32 */
6251
+ pageSize?: number;
6252
+ /** @format int32 */
6253
+ pageNumber?: number;
6254
+ sortBy?: string;
6255
+ sortDirection?: string;
6256
+ }, params?: RequestParams) => Promise<AxiosResponse<AiChatMessagePaginated, any, {}>>;
6257
+ /**
6258
+ * No description
6259
+ *
6260
+ * @tags AiConversation
6261
+ * @name ClearAiConversationHistory
6262
+ * @summary Clear conversation history
6263
+ * @request DELETE:/api/ai/conversations/{id}/messages
6264
+ * @secure
6265
+ * @response `204` `void` No Content
6266
+ * @response `403` `ProblemDetails` Forbidden
6267
+ * @response `404` `ProblemDetails` Not Found
6268
+ */
6269
+ clearAiConversationHistory: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6270
+ /**
6271
+ * No description
6272
+ *
6273
+ * @tags AiConversation
6274
+ * @name PinAiConversation
6275
+ * @summary Pin or unpin conversation
6276
+ * @request PUT:/api/ai/conversations/{id}/pin
6277
+ * @secure
6278
+ * @response `200` `AiConversationDetail` OK
6279
+ * @response `403` `ProblemDetails` Forbidden
6280
+ * @response `404` `ProblemDetails` Not Found
6281
+ */
6282
+ pinAiConversation: (id: string, data: PinAiConversationRequest, params?: RequestParams) => Promise<AxiosResponse<AiConversationDetail, any, {}>>;
6283
+ /**
6284
+ * No description
6285
+ *
6286
+ * @tags AiConversationAdmin
6287
+ * @name GetAiAccountConversations
6288
+ * @summary List AI conversations across the account, optionally filtered by user (admin supervision)
6289
+ * @request GET:/api/ai/admin/conversations
6290
+ * @secure
6291
+ * @response `200` `AiConversationListItemPaginated` OK
6292
+ */
6293
+ getAiAccountConversations: (query?: {
6294
+ /** @format uuid */
6295
+ userId?: string;
6296
+ /** @format int32 */
6297
+ pageSize?: number;
6298
+ /** @format int32 */
6299
+ pageNumber?: number;
6300
+ sortBy?: string;
6301
+ sortDirection?: string;
6302
+ }, params?: RequestParams) => Promise<AxiosResponse<AiConversationListItemPaginated, any, {}>>;
6303
+ /**
6304
+ * No description
6305
+ *
6306
+ * @tags AiConversationAdmin
6307
+ * @name GetAiAccountConversation
6308
+ * @summary Get an account conversation's detail (admin supervision)
6309
+ * @request GET:/api/ai/admin/conversations/{id}
6310
+ * @secure
6311
+ * @response `200` `AiConversationDetail` OK
6312
+ * @response `404` `ProblemDetails` Not Found
6313
+ */
6314
+ getAiAccountConversation: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiConversationDetail, any, {}>>;
6315
+ /**
6316
+ * No description
6317
+ *
6318
+ * @tags AiConversationAdmin
6319
+ * @name GetAiAccountConversationMessages
6320
+ * @summary Get an account conversation's messages (admin supervision)
6321
+ * @request GET:/api/ai/admin/conversations/{id}/messages
6322
+ * @secure
6323
+ * @response `200` `AiChatMessagePaginated` OK
6324
+ * @response `404` `ProblemDetails` Not Found
6325
+ */
6326
+ getAiAccountConversationMessages: (id: string, query?: {
6327
+ /** @format int32 */
6328
+ pageSize?: number;
6329
+ /** @format int32 */
6330
+ pageNumber?: number;
6331
+ sortBy?: string;
6332
+ sortDirection?: string;
6333
+ }, params?: RequestParams) => Promise<AxiosResponse<AiChatMessagePaginated, any, {}>>;
6334
+ /**
6335
+ * No description
6336
+ *
6337
+ * @tags AiGuardrail
6338
+ * @name GetAiGuardrails
6339
+ * @summary Get all guardrails
6340
+ * @request GET:/api/ai/admin/guardrails
6341
+ * @secure
6342
+ * @response `200` `(AiGuardrail)[]` OK
6343
+ */
6344
+ getAiGuardrails: (params?: RequestParams) => Promise<AxiosResponse<AiGuardrail[], any, {}>>;
6345
+ /**
6346
+ * No description
6347
+ *
6348
+ * @tags AiGuardrail
6349
+ * @name CreateAiGuardrail
6350
+ * @summary Create custom guardrail
6351
+ * @request POST:/api/ai/admin/guardrails
6352
+ * @secure
6353
+ * @response `201` `AiGuardrail` Created
6354
+ * @response `400` `ProblemDetails` Bad Request
6355
+ */
6356
+ createAiGuardrail: (data: CreateAiGuardrailRequest, params?: RequestParams) => Promise<AxiosResponse<AiGuardrail, any, {}>>;
6357
+ /**
6358
+ * No description
6359
+ *
6360
+ * @tags AiGuardrail
6361
+ * @name GetAiGuardrail
6362
+ * @summary Get guardrail by ID
6363
+ * @request GET:/api/ai/admin/guardrails/{id}
6364
+ * @secure
6365
+ * @response `200` `AiGuardrail` OK
6366
+ * @response `404` `ProblemDetails` Not Found
6367
+ */
6368
+ getAiGuardrail: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiGuardrail, any, {}>>;
6369
+ /**
6370
+ * No description
6371
+ *
6372
+ * @tags AiGuardrail
6373
+ * @name UpdateAiGuardrail
6374
+ * @summary Update guardrail
6375
+ * @request PUT:/api/ai/admin/guardrails/{id}
6376
+ * @secure
6377
+ * @response `200` `AiGuardrail` OK
6378
+ * @response `400` `ProblemDetails` Bad Request
6379
+ * @response `404` `ProblemDetails` Not Found
6380
+ */
6381
+ updateAiGuardrail: (id: string, data: UpdateAiGuardrailRequest, params?: RequestParams) => Promise<AxiosResponse<AiGuardrail, any, {}>>;
6382
+ /**
6383
+ * No description
6384
+ *
6385
+ * @tags AiGuardrail
6386
+ * @name DeleteAiGuardrail
6387
+ * @summary Delete guardrail
6388
+ * @request DELETE:/api/ai/admin/guardrails/{id}
6389
+ * @secure
6390
+ * @response `204` `void` No Content
6391
+ * @response `400` `ProblemDetails` Bad Request
6392
+ * @response `404` `ProblemDetails` Not Found
6393
+ */
6394
+ deleteAiGuardrail: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6395
+ /**
6396
+ * No description
6397
+ *
6398
+ * @tags AiGuardrail
6399
+ * @name ToggleAiGuardrail
6400
+ * @summary Toggle guardrail enabled/disabled
6401
+ * @request PATCH:/api/ai/admin/guardrails/{id}/toggle
6402
+ * @secure
6403
+ * @response `200` `AiGuardrail` OK
6404
+ * @response `404` `ProblemDetails` Not Found
6405
+ */
6406
+ toggleAiGuardrail: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiGuardrail, any, {}>>;
6407
+ /**
6408
+ * No description
6409
+ *
6410
+ * @tags AiPrompt
6411
+ * @name GetAvailablePrompts
6412
+ * @summary Get available prompts for current user
6413
+ * @request GET:/api/ai/prompts
6414
+ * @secure
6415
+ * @response `200` `(AiPromptSummary)[]` OK
6416
+ */
6417
+ getAvailablePrompts: (query?: {
6418
+ documentType?: string;
6419
+ }, params?: RequestParams) => Promise<AxiosResponse<AiPromptSummary[], any, {}>>;
6420
+ /**
6421
+ * No description
6422
+ *
6423
+ * @tags AiSuperAdmin
6424
+ * @name GetAiAuditLogsCrossAccount
6425
+ * @summary Get AI audit logs for a specific account or across all accounts
6426
+ * @request GET:/api/ai/superadmin/audit-logs
6427
+ * @secure
6428
+ * @response `200` `AiAuditLogPaginated` OK
6429
+ */
6430
+ getAiAuditLogsCrossAccount: (query?: {
6431
+ /** @format uuid */
6432
+ accountId?: string;
6433
+ eventType?: AiAuditEventType;
6434
+ /** @format uuid */
6435
+ requestId?: string;
6436
+ /** @format uuid */
6437
+ userId?: string;
6438
+ /** @format uuid */
6439
+ conversationId?: string;
6440
+ blockedOnly?: boolean;
6441
+ /** @format date-time */
6442
+ startDate?: string;
6443
+ /** @format date-time */
6444
+ endDate?: string;
6445
+ /** @format int32 */
6446
+ pageSize?: number;
6447
+ /** @format int32 */
6448
+ pageNumber?: number;
6449
+ sortBy?: string;
6450
+ sortDirection?: string;
6451
+ }, params?: RequestParams) => Promise<AxiosResponse<AiAuditLogPaginated, any, {}>>;
6452
+ /**
6453
+ * No description
6454
+ *
6455
+ * @tags AiSuperAdmin
6456
+ * @name GetAiRequestLifecycleCrossAccount
6457
+ * @summary Get the full event lifecycle of a single AI request from any account
6458
+ * @request GET:/api/ai/superadmin/audit-logs/request/{requestId}
6459
+ * @secure
6460
+ * @response `200` `(AiAuditLog)[]` OK
6461
+ */
6462
+ getAiRequestLifecycleCrossAccount: (requestId: string, query?: {
6463
+ /** @format uuid */
6464
+ accountId?: string;
6465
+ }, params?: RequestParams) => Promise<AxiosResponse<AiAuditLog[], any, {}>>;
6466
+ /**
6467
+ * No description
6468
+ *
6469
+ * @tags AiSuperAdmin
6470
+ * @name GetAiStatsCrossAccount
6471
+ * @summary Get AI stats for a specific account or platform-wide
6472
+ * @request GET:/api/ai/superadmin/stats
6473
+ * @secure
6474
+ * @response `200` `AiAdminStats` OK
6475
+ */
6476
+ getAiStatsCrossAccount: (query?: {
6477
+ /** @format uuid */
6478
+ accountId?: string;
6479
+ /** @format date-time */
6480
+ startDate?: string;
6481
+ /** @format date-time */
6482
+ endDate?: string;
6483
+ }, params?: RequestParams) => Promise<AxiosResponse<AiAdminStats, any, {}>>;
6484
+ /**
6485
+ * No description
6486
+ *
6487
+ * @tags AiSuperAdmin
6488
+ * @name GetAiConfigChangesCrossAccount
6489
+ * @summary Get AI configuration change history for a specific account or across all accounts (incl. global defaults)
6490
+ * @request GET:/api/ai/superadmin/config-changes
6491
+ * @secure
6492
+ * @response `200` `AiConfigChangeLogPaginated` OK
6493
+ */
6494
+ getAiConfigChangesCrossAccount: (query?: {
6495
+ /** @format uuid */
6496
+ accountId?: string;
6497
+ entityType?: AiConfigEntityType;
6498
+ /** @format uuid */
6499
+ entityId?: string;
6500
+ /** @format uuid */
6501
+ actorUserId?: string;
6502
+ action?: AiConfigChangeAction;
6503
+ /** @format date-time */
6504
+ startDate?: string;
6505
+ /** @format date-time */
6506
+ endDate?: string;
6507
+ /** @format int32 */
6508
+ pageSize?: number;
6509
+ /** @format int32 */
6510
+ pageNumber?: number;
6511
+ sortBy?: string;
6512
+ sortDirection?: string;
6513
+ }, params?: RequestParams) => Promise<AxiosResponse<AiConfigChangeLogPaginated, any, {}>>;
6514
+ /**
6515
+ * No description
6516
+ *
6517
+ * @tags AiUrlSource
6518
+ * @name GetAiUrlSources
6519
+ * @summary Get all URL sources
6520
+ * @request GET:/api/ai/admin/url-sources
6521
+ * @secure
6522
+ * @response `200` `(AiUrlSource)[]` OK
6523
+ */
6524
+ getAiUrlSources: (params?: RequestParams) => Promise<AxiosResponse<AiUrlSource[], any, {}>>;
6525
+ /**
6526
+ * No description
6527
+ *
6528
+ * @tags AiUrlSource
6529
+ * @name CreateAiUrlSource
6530
+ * @summary Create URL source
6531
+ * @request POST:/api/ai/admin/url-sources
6532
+ * @secure
6533
+ * @response `201` `AiUrlSource` Created
6534
+ * @response `400` `ProblemDetails` Bad Request
6535
+ * @response `409` `ProblemDetails` Conflict
6536
+ */
6537
+ createAiUrlSource: (data: CreateAiUrlSourceRequest, params?: RequestParams) => Promise<AxiosResponse<AiUrlSource, any, {}>>;
6538
+ /**
6539
+ * No description
6540
+ *
6541
+ * @tags AiUrlSource
6542
+ * @name GetAiUrlSource
6543
+ * @summary Get URL source by ID
6544
+ * @request GET:/api/ai/admin/url-sources/{id}
6545
+ * @secure
6546
+ * @response `200` `AiUrlSource` OK
6547
+ * @response `404` `ProblemDetails` Not Found
6548
+ */
6549
+ getAiUrlSource: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiUrlSource, any, {}>>;
6550
+ /**
6551
+ * No description
6552
+ *
6553
+ * @tags AiUrlSource
6554
+ * @name UpdateAiUrlSource
6555
+ * @summary Update URL source
6556
+ * @request PUT:/api/ai/admin/url-sources/{id}
6557
+ * @secure
6558
+ * @response `200` `AiUrlSource` OK
6559
+ * @response `400` `ProblemDetails` Bad Request
6560
+ * @response `404` `ProblemDetails` Not Found
6561
+ * @response `409` `ProblemDetails` Conflict
6562
+ */
6563
+ updateAiUrlSource: (id: string, data: UpdateAiUrlSourceRequest, params?: RequestParams) => Promise<AxiosResponse<AiUrlSource, any, {}>>;
6564
+ /**
6565
+ * No description
6566
+ *
6567
+ * @tags AiUrlSource
6568
+ * @name DeleteAiUrlSource
6569
+ * @summary Delete URL source
6570
+ * @request DELETE:/api/ai/admin/url-sources/{id}
6571
+ * @secure
6572
+ * @response `204` `void` No Content
6573
+ * @response `404` `ProblemDetails` Not Found
6574
+ */
6575
+ deleteAiUrlSource: (id: string, params?: RequestParams) => Promise<AxiosResponse<void, any, {}>>;
6576
+ /**
6577
+ * No description
6578
+ *
6579
+ * @tags AiUrlSource
6580
+ * @name ToggleAiUrlSource
6581
+ * @summary Toggle URL source active/inactive
6582
+ * @request PATCH:/api/ai/admin/url-sources/{id}/toggle
6583
+ * @secure
6584
+ * @response `200` `AiUrlSource` OK
6585
+ * @response `404` `ProblemDetails` Not Found
6586
+ */
6587
+ toggleAiUrlSource: (id: string, params?: RequestParams) => Promise<AxiosResponse<AiUrlSource, any, {}>>;
5437
6588
  /**
5438
6589
  * No description
5439
6590
  *
@@ -7981,7 +9132,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7981
9132
  * @response `404` `ProblemDetails` Not Found
7982
9133
  * @response `409` `any` Conflict
7983
9134
  */
7984
- updateLoan: (loanId: string, data: any, params?: RequestParams) => Promise<AxiosResponse<Loan, any, {}>>;
9135
+ updateLoan: (loanId: string, data: LoanPatchRequestGuidPatchDocument, params?: RequestParams) => Promise<AxiosResponse<Loan, any, {}>>;
7985
9136
  /**
7986
9137
  * No description
7987
9138
  *