@matech/thebigpos-sdk 2.48.0-rc6 → 2.49.0-rc0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts CHANGED
@@ -425,12 +425,15 @@ export type EncompassLogOperationType =
425
425
  | "MilestoneUpdate"
426
426
  | "DocumentAttachment"
427
427
  | "General"
428
- | "FieldReader";
428
+ | "FieldReader"
429
+ | "Read";
429
430
 
430
431
  export type EncompassEnvironment = "Production" | "UAT";
431
432
 
432
433
  export type DraftType = "NewLoan" | "EditLoan";
433
434
 
435
+ export type DocumentVisibilityScope = "Own" | "All";
436
+
434
437
  export type CustomFieldEntityType = "Loan";
435
438
 
436
439
  export type CustomFieldDataType =
@@ -450,6 +453,14 @@ export type ConsentSource = "TheBigPOS" | "ConsumerConnect";
450
453
 
451
454
  export type ConsentLosSyncStatus = "NotStarted" | "Failed" | "Success";
452
455
 
456
+ export type CompanyDocumentSourceType = "File" | "FreeText";
457
+
458
+ export type CompanyDocumentIndexStatus =
459
+ | "Uploaded"
460
+ | "Indexing"
461
+ | "Indexed"
462
+ | "Failed";
463
+
453
464
  export type ClassificationSource = "Textract" | "Llm" | "Manual";
454
465
 
455
466
  export type BranchType = "Mortgage" | "RealEstate";
@@ -483,7 +494,8 @@ export type AiStructuredDataType =
483
494
  | "Table"
484
495
  | "DocumentAnalysis"
485
496
  | "DocumentList"
486
- | "GeneratedDocument";
497
+ | "GeneratedDocument"
498
+ | "CitedPassages";
487
499
 
488
500
  export type AiQueryTemplateName =
489
501
  | "PipelineSummary"
@@ -590,7 +602,8 @@ export type AiAuditEventType =
590
602
  | "AgentToolCallCompleted"
591
603
  | "AgentToolCallFailed"
592
604
  | "AgentLoopLimitReached"
593
- | "RequestCancelled";
605
+ | "RequestCancelled"
606
+ | "KnowledgeBaseRetrieved";
594
607
 
595
608
  export type AddressFamily =
596
609
  | "Unspecified"
@@ -1091,6 +1104,15 @@ export interface AiChatStructuredData {
1091
1104
  /** @format uuid */
1092
1105
  generatedDocumentId?: string | null;
1093
1106
  generatedFileName?: string | null;
1107
+ passages?: AiCitedPassage[] | null;
1108
+ }
1109
+
1110
+ export interface AiCitedPassage {
1111
+ folderName: string;
1112
+ documentName: string;
1113
+ excerpt: string;
1114
+ /** @format double */
1115
+ score?: number | null;
1094
1116
  }
1095
1117
 
1096
1118
  export interface AiConversationAuditSummary {
@@ -1189,6 +1211,7 @@ export interface AiPrompt {
1189
1211
  description: string;
1190
1212
  documentTypes: string[];
1191
1213
  applicableUrlSourceIds: string[];
1214
+ knowledgeBaseFolderIds: string[];
1192
1215
  allowedRoles: string[];
1193
1216
  systemPrompt: string;
1194
1217
  /** @format int32 */
@@ -1660,6 +1683,59 @@ export interface CompanyAddress {
1660
1683
  zip: string;
1661
1684
  }
1662
1685
 
1686
+ export interface CompanyDocument {
1687
+ /** @format uuid */
1688
+ id: string;
1689
+ /** @format uuid */
1690
+ folderId: string;
1691
+ folderName: string;
1692
+ name: string;
1693
+ sourceType: CompanyDocumentSourceTypeEnum;
1694
+ contentType?: string | null;
1695
+ /** @format int64 */
1696
+ fileSizeBytes: number;
1697
+ inlineContent?: string | null;
1698
+ indexStatus: CompanyDocumentIndexStatusEnum;
1699
+ indexError?: string | null;
1700
+ /** @format date-time */
1701
+ indexedAt?: string | null;
1702
+ /** @format uuid */
1703
+ uploadedByUserId?: string | null;
1704
+ /** @format date-time */
1705
+ createdAt: string;
1706
+ /** @format date-time */
1707
+ updatedAt?: string | null;
1708
+ }
1709
+
1710
+ export interface CompanyDocumentFolder {
1711
+ /** @format uuid */
1712
+ id: string;
1713
+ name: string;
1714
+ description?: string | null;
1715
+ isSystemDefault: boolean;
1716
+ /** @format int32 */
1717
+ documentCount: number;
1718
+ /** @format date-time */
1719
+ createdAt: string;
1720
+ /** @format date-time */
1721
+ updatedAt?: string | null;
1722
+ }
1723
+
1724
+ export interface CompanyDocumentPaginated {
1725
+ rows: CompanyDocument[];
1726
+ pagination: Pagination;
1727
+ /** @format int64 */
1728
+ count: number;
1729
+ }
1730
+
1731
+ export interface CompanyDocumentSearchCriteria {
1732
+ searchText?: string | null;
1733
+ /** @format uuid */
1734
+ folderID?: string | null;
1735
+ indexStatuses?: CompanyDocumentIndexStatus[] | null;
1736
+ sourceType?: CompanyDocumentSourceType | null;
1737
+ }
1738
+
1663
1739
  export interface ConditionComment {
1664
1740
  commentId: string;
1665
1741
  comments: string;
@@ -1790,6 +1866,7 @@ export interface CreateAiPromptRequest {
1790
1866
  description: string;
1791
1867
  documentTypes: string[];
1792
1868
  applicableUrlSourceIds: string[];
1869
+ knowledgeBaseFolderIds: string[];
1793
1870
  allowedRoles: string[];
1794
1871
  systemPrompt: string;
1795
1872
  /** @format int32 */
@@ -1821,6 +1898,18 @@ export interface CreateBranchRequest {
1821
1898
  type: string;
1822
1899
  }
1823
1900
 
1901
+ export interface CreateCompanyDocumentFolderRequest {
1902
+ name: string;
1903
+ description?: string | null;
1904
+ }
1905
+
1906
+ export interface CreateCompanyTextDocumentRequest {
1907
+ name: string;
1908
+ /** @format uuid */
1909
+ folderID: string;
1910
+ content: string;
1911
+ }
1912
+
1824
1913
  export interface CreateCustomFieldDefinitionRequest {
1825
1914
  isRequired: boolean;
1826
1915
  /** @format int32 */
@@ -1847,7 +1936,10 @@ export interface CreateDocumentTemplateRequest {
1847
1936
  name: string;
1848
1937
  type: string;
1849
1938
  description?: string | null;
1939
+ /** @deprecated */
1850
1940
  destinationBucket?: string | null;
1941
+ /** @format uuid */
1942
+ loanDocumentFolderID?: string | null;
1851
1943
  status: string;
1852
1944
  }
1853
1945
 
@@ -2187,7 +2279,9 @@ export interface DocumentTemplate {
2187
2279
  isDefault: boolean;
2188
2280
  type: string;
2189
2281
  description?: string | null;
2282
+ /** @deprecated */
2190
2283
  destinationBucket?: string | null;
2284
+ loanDocumentFolder?: LoanDocumentFolderSummary | null;
2191
2285
  isDestinationBucketConfigurable: boolean;
2192
2286
  status: string;
2193
2287
  versions: DocumentTemplateVersionBase[];
@@ -2208,7 +2302,9 @@ export interface DocumentTemplateBase {
2208
2302
  isDefault: boolean;
2209
2303
  type: string;
2210
2304
  description?: string | null;
2305
+ /** @deprecated */
2211
2306
  destinationBucket?: string | null;
2307
+ loanDocumentFolder?: LoanDocumentFolderSummary | null;
2212
2308
  isDestinationBucketConfigurable: boolean;
2213
2309
  status: string;
2214
2310
  }
@@ -4061,8 +4157,11 @@ export interface LoanDocument {
4061
4157
  id: string;
4062
4158
  name: string;
4063
4159
  loan: Loan;
4064
- user?: User | null;
4160
+ user?: UserSummary | null;
4161
+ /** @deprecated */
4065
4162
  initialBucket?: string | null;
4163
+ /** @format uuid */
4164
+ folderID?: string | null;
4066
4165
  losDocumentID?: string | null;
4067
4166
  losStatus: string;
4068
4167
  contents?: string | null;
@@ -4090,11 +4189,16 @@ export interface LoanDocumentFolder {
4090
4189
  createdAt: string;
4091
4190
  /** @format date-time */
4092
4191
  updatedAt?: string | null;
4093
- /** @format date-time */
4094
- deletedAt?: string | null;
4095
4192
  permissions: LoanDocumentFolderPermission[];
4096
4193
  }
4097
4194
 
4195
+ export interface LoanDocumentFolderPaginated {
4196
+ rows: LoanDocumentFolder[];
4197
+ pagination: Pagination;
4198
+ /** @format int64 */
4199
+ count: number;
4200
+ }
4201
+
4098
4202
  export interface LoanDocumentFolderPermission {
4099
4203
  /** @format uuid */
4100
4204
  id: string;
@@ -4102,11 +4206,26 @@ export interface LoanDocumentFolderPermission {
4102
4206
  loanDocumentFolderID: string;
4103
4207
  role: LoanDocumentFolderPermissionRoleEnum;
4104
4208
  level: LoanDocumentFolderPermissionLevelEnum;
4209
+ readScope: LoanDocumentFolderPermissionReadScopeEnum;
4105
4210
  }
4106
4211
 
4107
4212
  export interface LoanDocumentFolderPermissionRequest {
4108
4213
  role: LoanDocumentFolderPermissionRequestRoleEnum;
4109
4214
  level: LoanDocumentFolderPermissionRequestLevelEnum;
4215
+ readScope: LoanDocumentFolderPermissionRequestReadScopeEnum;
4216
+ }
4217
+
4218
+ export interface LoanDocumentFolderSearchCriteria {
4219
+ searchText?: string | null;
4220
+ isActive?: boolean | null;
4221
+ }
4222
+
4223
+ export interface LoanDocumentFolderSummary {
4224
+ /** @format uuid */
4225
+ id: string;
4226
+ name: string;
4227
+ key?: string | null;
4228
+ isActive: boolean;
4110
4229
  }
4111
4230
 
4112
4231
  export interface LoanDocumentFolderUsage {
@@ -4115,6 +4234,16 @@ export interface LoanDocumentFolderUsage {
4115
4234
  hasEverBeenReferenced: boolean;
4116
4235
  }
4117
4236
 
4237
+ export interface LoanDocumentFolderWithCount {
4238
+ /** @format uuid */
4239
+ id: string;
4240
+ name: string;
4241
+ key?: string | null;
4242
+ isActive: boolean;
4243
+ /** @format int32 */
4244
+ documentCount: number;
4245
+ }
4246
+
4118
4247
  export interface LoanDocumentPreviewsRequest {
4119
4248
  documentIds: string[];
4120
4249
  }
@@ -4131,7 +4260,10 @@ export interface LoanDocumentSearch {
4131
4260
  name: string;
4132
4261
  loanID?: string | null;
4133
4262
  userID?: string | null;
4263
+ user?: UserSummary | null;
4264
+ /** @deprecated */
4134
4265
  initialBucket?: string | null;
4266
+ folder?: LoanDocumentFolderSummary | null;
4135
4267
  losDocumentID?: string | null;
4136
4268
  losStatus: string;
4137
4269
  contents?: string | null;
@@ -4142,8 +4274,11 @@ export interface LoanDocumentSearch {
4142
4274
 
4143
4275
  export interface LoanDocumentSearchCriteria {
4144
4276
  searchText?: string | null;
4277
+ /** @deprecated */
4145
4278
  bucket?: string | null;
4146
4279
  /** @format uuid */
4280
+ folderID?: string | null;
4281
+ /** @format uuid */
4147
4282
  userID?: string | null;
4148
4283
  documentIDs?: string[] | null;
4149
4284
  losStatuses?: LOSStatus[] | null;
@@ -6105,8 +6240,7 @@ export interface SiteTile {
6105
6240
  linkUrl: string;
6106
6241
  linkTarget: SiteTileLinkTargetEnum;
6107
6242
  siteTypes: SiteConfigurationType[];
6108
- locations: SiteTileLocation[];
6109
- audience: UserRole[];
6243
+ locationAudiences: SiteTileLocationAudience[];
6110
6244
  /** @format int32 */
6111
6245
  weight: number;
6112
6246
  excludedSiteConfigurationIDs: string[];
@@ -6116,6 +6250,16 @@ export interface SiteTile {
6116
6250
  updatedAt?: string | null;
6117
6251
  }
6118
6252
 
6253
+ export interface SiteTileLocationAudience {
6254
+ location: SiteTileLocationAudienceLocationEnum;
6255
+ audience: UserRole[];
6256
+ }
6257
+
6258
+ export interface SiteTileLocationAudienceRequest {
6259
+ location: SiteTileLocationAudienceRequestLocationEnum;
6260
+ audience: UserRole[];
6261
+ }
6262
+
6119
6263
  export interface SiteTilePaginated {
6120
6264
  rows: SiteTile[];
6121
6265
  pagination: Pagination;
@@ -6132,8 +6276,7 @@ export interface SiteTileRequest {
6132
6276
  linkUrl: string;
6133
6277
  linkTarget: SiteTileRequestLinkTargetEnum;
6134
6278
  siteTypes: SiteConfigurationType[];
6135
- locations: SiteTileLocation[];
6136
- audience: UserRole[];
6279
+ locationAudiences: SiteTileLocationAudienceRequest[];
6137
6280
  /** @format int32 */
6138
6281
  weight: number;
6139
6282
  excludedSiteConfigurationIDs: string[];
@@ -6449,6 +6592,7 @@ export interface UpdateAiPromptRequest {
6449
6592
  description: string;
6450
6593
  documentTypes: string[];
6451
6594
  applicableUrlSourceIds: string[];
6595
+ knowledgeBaseFolderIds: string[];
6452
6596
  allowedRoles: string[];
6453
6597
  systemPrompt: string;
6454
6598
  /** @format int32 */
@@ -6478,6 +6622,18 @@ export interface UpdateAiUrlSourceRequest {
6478
6622
  scope: UpdateAiUrlSourceRequestScopeEnum;
6479
6623
  }
6480
6624
 
6625
+ export interface UpdateCompanyDocumentFolderRequest {
6626
+ name: string;
6627
+ description?: string | null;
6628
+ }
6629
+
6630
+ export interface UpdateCompanyDocumentRequest {
6631
+ name?: string | null;
6632
+ /** @format uuid */
6633
+ folderID?: string | null;
6634
+ content?: string | null;
6635
+ }
6636
+
6481
6637
  export interface UpdateCustomFieldDefinitionRequest {
6482
6638
  isRequired: boolean;
6483
6639
  /** @format int32 */
@@ -6501,7 +6657,10 @@ export interface UpdateDocumentTemplateRequest {
6501
6657
  htmlBody: string;
6502
6658
  name: string;
6503
6659
  description?: string | null;
6660
+ /** @deprecated */
6504
6661
  destinationBucket?: string | null;
6662
+ /** @format uuid */
6663
+ loanDocumentFolderID?: string | null;
6505
6664
  status: string;
6506
6665
  }
6507
6666
 
@@ -6819,7 +6978,7 @@ export interface UserGroupAccessScope {
6819
6978
  userId?: string | null;
6820
6979
  /** @format uuid */
6821
6980
  branchId?: string | null;
6822
- user?: UserSummary | null;
6981
+ user?: UserGroupMemberUserSummary | null;
6823
6982
  branch?: BranchSummary | null;
6824
6983
  }
6825
6984
 
@@ -6831,7 +6990,15 @@ export interface UserGroupMember {
6831
6990
  /** @format uuid */
6832
6991
  userId: string;
6833
6992
  loanRole: string;
6834
- user: UserSummary;
6993
+ user: UserGroupMemberUserSummary;
6994
+ }
6995
+
6996
+ export interface UserGroupMemberUserSummary {
6997
+ /** @format uuid */
6998
+ id: string;
6999
+ name?: string | null;
7000
+ email?: string | null;
7001
+ role: UserGroupMemberUserSummaryRoleEnum;
6835
7002
  }
6836
7003
 
6837
7004
  export interface UserGroupPaginated {
@@ -7009,9 +7176,8 @@ export interface UserSearchCriteria {
7009
7176
  export interface UserSummary {
7010
7177
  /** @format uuid */
7011
7178
  id: string;
7012
- name?: string | null;
7013
- email?: string | null;
7014
- role: UserSummaryRoleEnum;
7179
+ firstName: string;
7180
+ lastName: string;
7015
7181
  }
7016
7182
 
7017
7183
  export interface VerifyEmailRequest {
@@ -7076,7 +7242,8 @@ export type AiAuditLogEventTypeEnum =
7076
7242
  | "AgentToolCallCompleted"
7077
7243
  | "AgentToolCallFailed"
7078
7244
  | "AgentLoopLimitReached"
7079
- | "RequestCancelled";
7245
+ | "RequestCancelled"
7246
+ | "KnowledgeBaseRetrieved";
7080
7247
 
7081
7248
  export type AiChatMetadataIntentEnum =
7082
7249
  | "Greeting"
@@ -7095,7 +7262,8 @@ export type AiChatStructuredDataTypeEnum =
7095
7262
  | "Table"
7096
7263
  | "DocumentAnalysis"
7097
7264
  | "DocumentList"
7098
- | "GeneratedDocument";
7265
+ | "GeneratedDocument"
7266
+ | "CitedPassages";
7099
7267
 
7100
7268
  export type AiGuardrailCategoryEnum =
7101
7269
  | "ContentSafety"
@@ -7150,6 +7318,14 @@ export type BorrowerIdentityRoleEnum =
7150
7318
  | "SettlementAgent"
7151
7319
  | "Admin";
7152
7320
 
7321
+ export type CompanyDocumentSourceTypeEnum = "File" | "FreeText";
7322
+
7323
+ export type CompanyDocumentIndexStatusEnum =
7324
+ | "Uploaded"
7325
+ | "Indexing"
7326
+ | "Indexed"
7327
+ | "Failed";
7328
+
7153
7329
  export type CreateAccessScopeRequestScopeTypeEnum = "User" | "Branch";
7154
7330
 
7155
7331
  export type CreateAccountRequestEnvironmentEnum =
@@ -7312,7 +7488,8 @@ export type EncompassRequestLogOperationTypeEnum =
7312
7488
  | "MilestoneUpdate"
7313
7489
  | "DocumentAttachment"
7314
7490
  | "General"
7315
- | "FieldReader";
7491
+ | "FieldReader"
7492
+ | "Read";
7316
7493
 
7317
7494
  export type EncompassRequestLogOutcomeEnum =
7318
7495
  | "Success"
@@ -7415,6 +7592,8 @@ export type LoanDocumentFolderPermissionLevelEnum =
7415
7592
  | "Write"
7416
7593
  | "Manage";
7417
7594
 
7595
+ export type LoanDocumentFolderPermissionReadScopeEnum = "Own" | "All";
7596
+
7418
7597
  export type LoanDocumentFolderPermissionRequestRoleEnum =
7419
7598
  | "Borrower"
7420
7599
  | "CoBorrower"
@@ -7436,6 +7615,8 @@ export type LoanDocumentFolderPermissionRequestLevelEnum =
7436
7615
  | "Write"
7437
7616
  | "Manage";
7438
7617
 
7618
+ export type LoanDocumentFolderPermissionRequestReadScopeEnum = "Own" | "All";
7619
+
7439
7620
  export type LoanImportStatusEnum =
7440
7621
  | "WaitingProcess"
7441
7622
  | "InProgress"
@@ -7625,6 +7806,12 @@ export type SiteConfigurationSummaryTypeEnum =
7625
7806
 
7626
7807
  export type SiteTileLinkTargetEnum = "Self" | "Blank";
7627
7808
 
7809
+ export type SiteTileLocationAudienceLocationEnum = "HomePage" | "Dashboard";
7810
+
7811
+ export type SiteTileLocationAudienceRequestLocationEnum =
7812
+ | "HomePage"
7813
+ | "Dashboard";
7814
+
7628
7815
  export type SiteTileRequestLinkTargetEnum = "Self" | "Blank";
7629
7816
 
7630
7817
  export type SiteTileViewLinkTargetEnum = "Self" | "Blank";
@@ -7675,6 +7862,17 @@ export type UserDraftRoleEnum =
7675
7862
 
7676
7863
  export type UserGroupAccessScopeScopeTypeEnum = "User" | "Branch";
7677
7864
 
7865
+ export type UserGroupMemberUserSummaryRoleEnum =
7866
+ | "Borrower"
7867
+ | "LoanOfficer"
7868
+ | "Admin"
7869
+ | "SuperAdmin"
7870
+ | "Realtor"
7871
+ | "SettlementAgent"
7872
+ | "LoanProcessor"
7873
+ | "LoanOfficerAssistant"
7874
+ | "SystemAdmin";
7875
+
7678
7876
  export type UserLoanRoleEnum =
7679
7877
  | "Borrower"
7680
7878
  | "CoBorrower"
@@ -7700,17 +7898,6 @@ export type UserLoanConsentLosSyncStatusEnum =
7700
7898
  | "Failed"
7701
7899
  | "Success";
7702
7900
 
7703
- export type UserSummaryRoleEnum =
7704
- | "Borrower"
7705
- | "LoanOfficer"
7706
- | "Admin"
7707
- | "SuperAdmin"
7708
- | "Realtor"
7709
- | "SettlementAgent"
7710
- | "LoanProcessor"
7711
- | "LoanOfficerAssistant"
7712
- | "SystemAdmin";
7713
-
7714
7901
  export type GetCustomFieldDefinitionsParamsEntityTypeEnum = "Loan";
7715
7902
 
7716
7903
  /** @default "Realtor" */
@@ -7925,7 +8112,7 @@ export class HttpClient<SecurityDataType = unknown> {
7925
8112
 
7926
8113
  /**
7927
8114
  * @title The Big POS API
7928
- * @version v2.48.0
8115
+ * @version v2.49.0
7929
8116
  * @termsOfService https://www.thebigpos.com/terms-of-use/
7930
8117
  * @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
7931
8118
  */
@@ -10372,6 +10559,321 @@ export class Api<
10372
10559
  ...params,
10373
10560
  }),
10374
10561
 
10562
+ /**
10563
+ * No description
10564
+ *
10565
+ * @tags CompanyDocumentFolders
10566
+ * @name GetCompanyDocumentFolders
10567
+ * @summary Get all company document folders
10568
+ * @request GET:/api/company-document-folders
10569
+ * @secure
10570
+ * @response `200` `(CompanyDocumentFolder)[]` OK
10571
+ */
10572
+ getCompanyDocumentFolders: (params: RequestParams = {}) =>
10573
+ this.request<CompanyDocumentFolder[], any>({
10574
+ path: `/api/company-document-folders`,
10575
+ method: "GET",
10576
+ secure: true,
10577
+ format: "json",
10578
+ ...params,
10579
+ }),
10580
+
10581
+ /**
10582
+ * No description
10583
+ *
10584
+ * @tags CompanyDocumentFolders
10585
+ * @name CreateCompanyDocumentFolder
10586
+ * @summary Create company document folder
10587
+ * @request POST:/api/company-document-folders
10588
+ * @secure
10589
+ * @response `201` `CompanyDocumentFolder` Created
10590
+ * @response `400` `ProblemDetails` Bad Request
10591
+ * @response `409` `ProblemDetails` Conflict
10592
+ */
10593
+ createCompanyDocumentFolder: (
10594
+ data: CreateCompanyDocumentFolderRequest,
10595
+ params: RequestParams = {},
10596
+ ) =>
10597
+ this.request<CompanyDocumentFolder, ProblemDetails>({
10598
+ path: `/api/company-document-folders`,
10599
+ method: "POST",
10600
+ body: data,
10601
+ secure: true,
10602
+ type: "application/json",
10603
+ format: "json",
10604
+ ...params,
10605
+ }),
10606
+
10607
+ /**
10608
+ * No description
10609
+ *
10610
+ * @tags CompanyDocumentFolders
10611
+ * @name GetCompanyDocumentFolder
10612
+ * @summary Get company document folder by ID
10613
+ * @request GET:/api/company-document-folders/{id}
10614
+ * @secure
10615
+ * @response `200` `CompanyDocumentFolder` OK
10616
+ * @response `404` `ProblemDetails` Not Found
10617
+ */
10618
+ getCompanyDocumentFolder: (id: string, params: RequestParams = {}) =>
10619
+ this.request<CompanyDocumentFolder, ProblemDetails>({
10620
+ path: `/api/company-document-folders/${id}`,
10621
+ method: "GET",
10622
+ secure: true,
10623
+ format: "json",
10624
+ ...params,
10625
+ }),
10626
+
10627
+ /**
10628
+ * No description
10629
+ *
10630
+ * @tags CompanyDocumentFolders
10631
+ * @name UpdateCompanyDocumentFolder
10632
+ * @summary Update company document folder
10633
+ * @request PUT:/api/company-document-folders/{id}
10634
+ * @secure
10635
+ * @response `200` `CompanyDocumentFolder` OK
10636
+ * @response `400` `ProblemDetails` Bad Request
10637
+ * @response `404` `ProblemDetails` Not Found
10638
+ * @response `409` `ProblemDetails` Conflict
10639
+ */
10640
+ updateCompanyDocumentFolder: (
10641
+ id: string,
10642
+ data: UpdateCompanyDocumentFolderRequest,
10643
+ params: RequestParams = {},
10644
+ ) =>
10645
+ this.request<CompanyDocumentFolder, ProblemDetails>({
10646
+ path: `/api/company-document-folders/${id}`,
10647
+ method: "PUT",
10648
+ body: data,
10649
+ secure: true,
10650
+ type: "application/json",
10651
+ format: "json",
10652
+ ...params,
10653
+ }),
10654
+
10655
+ /**
10656
+ * No description
10657
+ *
10658
+ * @tags CompanyDocumentFolders
10659
+ * @name DeleteCompanyDocumentFolder
10660
+ * @summary Delete company document folder
10661
+ * @request DELETE:/api/company-document-folders/{id}
10662
+ * @secure
10663
+ * @response `204` `void` No Content
10664
+ * @response `400` `ProblemDetails` Bad Request
10665
+ * @response `404` `ProblemDetails` Not Found
10666
+ * @response `409` `ProblemDetails` Conflict
10667
+ */
10668
+ deleteCompanyDocumentFolder: (id: string, params: RequestParams = {}) =>
10669
+ this.request<void, ProblemDetails>({
10670
+ path: `/api/company-document-folders/${id}`,
10671
+ method: "DELETE",
10672
+ secure: true,
10673
+ ...params,
10674
+ }),
10675
+
10676
+ /**
10677
+ * No description
10678
+ *
10679
+ * @tags CompanyDocuments
10680
+ * @name SearchCompanyDocuments
10681
+ * @summary Search company documents
10682
+ * @request POST:/api/company-documents/search
10683
+ * @secure
10684
+ * @response `200` `CompanyDocumentPaginated` OK
10685
+ * @response `400` `ProblemDetails` Bad Request
10686
+ */
10687
+ searchCompanyDocuments: (
10688
+ data: CompanyDocumentSearchCriteria,
10689
+ query?: {
10690
+ /** @format int32 */
10691
+ pageSize?: number;
10692
+ /** @format int32 */
10693
+ pageNumber?: number;
10694
+ sortBy?: string;
10695
+ sortDirection?: string;
10696
+ },
10697
+ params: RequestParams = {},
10698
+ ) =>
10699
+ this.request<CompanyDocumentPaginated, ProblemDetails>({
10700
+ path: `/api/company-documents/search`,
10701
+ method: "POST",
10702
+ query: query,
10703
+ body: data,
10704
+ secure: true,
10705
+ type: "application/json",
10706
+ format: "json",
10707
+ ...params,
10708
+ }),
10709
+
10710
+ /**
10711
+ * No description
10712
+ *
10713
+ * @tags CompanyDocuments
10714
+ * @name GetCompanyDocument
10715
+ * @summary Get company document by ID
10716
+ * @request GET:/api/company-documents/{id}
10717
+ * @secure
10718
+ * @response `200` `CompanyDocument` OK
10719
+ * @response `404` `ProblemDetails` Not Found
10720
+ */
10721
+ getCompanyDocument: (id: string, params: RequestParams = {}) =>
10722
+ this.request<CompanyDocument, ProblemDetails>({
10723
+ path: `/api/company-documents/${id}`,
10724
+ method: "GET",
10725
+ secure: true,
10726
+ format: "json",
10727
+ ...params,
10728
+ }),
10729
+
10730
+ /**
10731
+ * No description
10732
+ *
10733
+ * @tags CompanyDocuments
10734
+ * @name UpdateCompanyDocument
10735
+ * @summary Update company document
10736
+ * @request PUT:/api/company-documents/{id}
10737
+ * @secure
10738
+ * @response `200` `CompanyDocument` OK
10739
+ * @response `400` `ProblemDetails` Bad Request
10740
+ * @response `404` `ProblemDetails` Not Found
10741
+ * @response `409` `ProblemDetails` Conflict
10742
+ */
10743
+ updateCompanyDocument: (
10744
+ id: string,
10745
+ data: UpdateCompanyDocumentRequest,
10746
+ params: RequestParams = {},
10747
+ ) =>
10748
+ this.request<CompanyDocument, ProblemDetails>({
10749
+ path: `/api/company-documents/${id}`,
10750
+ method: "PUT",
10751
+ body: data,
10752
+ secure: true,
10753
+ type: "application/json",
10754
+ format: "json",
10755
+ ...params,
10756
+ }),
10757
+
10758
+ /**
10759
+ * No description
10760
+ *
10761
+ * @tags CompanyDocuments
10762
+ * @name DeleteCompanyDocument
10763
+ * @summary Delete company document
10764
+ * @request DELETE:/api/company-documents/{id}
10765
+ * @secure
10766
+ * @response `204` `void` No Content
10767
+ * @response `404` `ProblemDetails` Not Found
10768
+ */
10769
+ deleteCompanyDocument: (id: string, params: RequestParams = {}) =>
10770
+ this.request<void, ProblemDetails>({
10771
+ path: `/api/company-documents/${id}`,
10772
+ method: "DELETE",
10773
+ secure: true,
10774
+ ...params,
10775
+ }),
10776
+
10777
+ /**
10778
+ * No description
10779
+ *
10780
+ * @tags CompanyDocuments
10781
+ * @name DownloadCompanyDocument
10782
+ * @summary Download company document
10783
+ * @request GET:/api/company-documents/{id}/download
10784
+ * @secure
10785
+ * @response `200` `void` OK
10786
+ * @response `404` `ProblemDetails` Not Found
10787
+ */
10788
+ downloadCompanyDocument: (id: string, params: RequestParams = {}) =>
10789
+ this.request<void, ProblemDetails>({
10790
+ path: `/api/company-documents/${id}/download`,
10791
+ method: "GET",
10792
+ secure: true,
10793
+ ...params,
10794
+ }),
10795
+
10796
+ /**
10797
+ * No description
10798
+ *
10799
+ * @tags CompanyDocuments
10800
+ * @name CreateCompanyDocument
10801
+ * @summary Upload company document
10802
+ * @request POST:/api/company-documents
10803
+ * @secure
10804
+ * @response `201` `CompanyDocument` Created
10805
+ * @response `400` `ProblemDetails` Bad Request
10806
+ * @response `404` `ProblemDetails` Not Found
10807
+ * @response `409` `ProblemDetails` Conflict
10808
+ */
10809
+ createCompanyDocument: (
10810
+ data: {
10811
+ /** @format binary */
10812
+ file?: File;
10813
+ /** @format uuid */
10814
+ folderID?: string;
10815
+ name?: string;
10816
+ },
10817
+ params: RequestParams = {},
10818
+ ) =>
10819
+ this.request<CompanyDocument, ProblemDetails>({
10820
+ path: `/api/company-documents`,
10821
+ method: "POST",
10822
+ body: data,
10823
+ secure: true,
10824
+ type: "multipart/form-data",
10825
+ format: "json",
10826
+ ...params,
10827
+ }),
10828
+
10829
+ /**
10830
+ * No description
10831
+ *
10832
+ * @tags CompanyDocuments
10833
+ * @name CreateCompanyTextDocument
10834
+ * @summary Create free-form text company document
10835
+ * @request POST:/api/company-documents/text
10836
+ * @secure
10837
+ * @response `201` `CompanyDocument` Created
10838
+ * @response `400` `ProblemDetails` Bad Request
10839
+ * @response `404` `ProblemDetails` Not Found
10840
+ * @response `409` `ProblemDetails` Conflict
10841
+ */
10842
+ createCompanyTextDocument: (
10843
+ data: CreateCompanyTextDocumentRequest,
10844
+ params: RequestParams = {},
10845
+ ) =>
10846
+ this.request<CompanyDocument, ProblemDetails>({
10847
+ path: `/api/company-documents/text`,
10848
+ method: "POST",
10849
+ body: data,
10850
+ secure: true,
10851
+ type: "application/json",
10852
+ format: "json",
10853
+ ...params,
10854
+ }),
10855
+
10856
+ /**
10857
+ * No description
10858
+ *
10859
+ * @tags CompanyDocuments
10860
+ * @name ReindexCompanyDocument
10861
+ * @summary Re-index a failed company document
10862
+ * @request POST:/api/company-documents/{id}/reindex
10863
+ * @secure
10864
+ * @response `200` `CompanyDocument` OK
10865
+ * @response `400` `ProblemDetails` Bad Request
10866
+ * @response `404` `ProblemDetails` Not Found
10867
+ */
10868
+ reindexCompanyDocument: (id: string, params: RequestParams = {}) =>
10869
+ this.request<CompanyDocument, ProblemDetails>({
10870
+ path: `/api/company-documents/${id}/reindex`,
10871
+ method: "POST",
10872
+ secure: true,
10873
+ format: "json",
10874
+ ...params,
10875
+ }),
10876
+
10375
10877
  /**
10376
10878
  * No description
10377
10879
  *
@@ -10986,6 +11488,7 @@ export class Api<
10986
11488
  * @name GetDocumentBuckets
10987
11489
  * @summary Get All
10988
11490
  * @request GET:/api/document-buckets
11491
+ * @deprecated
10989
11492
  * @secure
10990
11493
  * @response `200` `(string)[]` OK
10991
11494
  */
@@ -13181,6 +13684,7 @@ export class Api<
13181
13684
  * @name GetLoanDocumentBuckets
13182
13685
  * @summary Get All
13183
13686
  * @request GET:/api/loans/{loanId}/documents/buckets
13687
+ * @deprecated
13184
13688
  * @secure
13185
13689
  * @response `200` `(string)[]` OK
13186
13690
  */
@@ -13193,69 +13697,32 @@ export class Api<
13193
13697
  ...params,
13194
13698
  }),
13195
13699
 
13196
- /**
13197
- * No description
13198
- *
13199
- * @tags LoanDocumentBuckets
13200
- * @name CreateLoanDocumentBuckets
13201
- * @summary Create
13202
- * @request POST:/api/loans/{loanId}/documents/buckets
13203
- * @secure
13204
- * @response `201` `(string)[]` Created
13205
- */
13206
- createLoanDocumentBuckets: (
13207
- loanId: string,
13208
- data: string[],
13209
- params: RequestParams = {},
13210
- ) =>
13211
- this.request<string[], any>({
13212
- path: `/api/loans/${loanId}/documents/buckets`,
13213
- method: "POST",
13214
- body: data,
13215
- secure: true,
13216
- type: "application/json",
13217
- format: "json",
13218
- ...params,
13219
- }),
13220
-
13221
13700
  /**
13222
13701
  * No description
13223
13702
  *
13224
13703
  * @tags LoanDocumentFolders
13225
- * @name GetAllLoanDocumentFolders
13226
- * @summary Get all loan document folders for the current account
13227
- * @request GET:/api/loan-document-folders
13704
+ * @name SearchLoanDocumentFolders
13705
+ * @summary Search loan document folders for the current account
13706
+ * @request POST:/api/loan-document-folders/search
13228
13707
  * @secure
13229
- * @response `200` `(LoanDocumentFolder)[]` OK
13708
+ * @response `200` `LoanDocumentFolderPaginated` OK
13230
13709
  */
13231
- getAllLoanDocumentFolders: (params: RequestParams = {}) =>
13232
- this.request<LoanDocumentFolder[], any>({
13233
- path: `/api/loan-document-folders`,
13234
- method: "GET",
13235
- secure: true,
13236
- format: "json",
13237
- ...params,
13238
- }),
13239
-
13240
- /**
13241
- * No description
13242
- *
13243
- * @tags LoanDocumentFolders
13244
- * @name CreateLoanDocumentFolder
13245
- * @summary Create a loan document folder
13246
- * @request POST:/api/loan-document-folders
13247
- * @secure
13248
- * @response `201` `LoanDocumentFolder` Created
13249
- * @response `409` `ProblemDetails` Conflict
13250
- * @response `422` `ProblemDetails` Unprocessable Content
13251
- */
13252
- createLoanDocumentFolder: (
13253
- data: CreateLoanDocumentFolderRequest,
13710
+ searchLoanDocumentFolders: (
13711
+ data: LoanDocumentFolderSearchCriteria,
13712
+ query?: {
13713
+ /** @format int32 */
13714
+ pageSize?: number;
13715
+ /** @format int32 */
13716
+ pageNumber?: number;
13717
+ sortBy?: string;
13718
+ sortDirection?: string;
13719
+ },
13254
13720
  params: RequestParams = {},
13255
13721
  ) =>
13256
- this.request<LoanDocumentFolder, ProblemDetails>({
13257
- path: `/api/loan-document-folders`,
13722
+ this.request<LoanDocumentFolderPaginated, any>({
13723
+ path: `/api/loan-document-folders/search`,
13258
13724
  method: "POST",
13725
+ query: query,
13259
13726
  body: data,
13260
13727
  secure: true,
13261
13728
  type: "application/json",
@@ -13333,6 +13800,32 @@ export class Api<
13333
13800
  ...params,
13334
13801
  }),
13335
13802
 
13803
+ /**
13804
+ * No description
13805
+ *
13806
+ * @tags LoanDocumentFolders
13807
+ * @name CreateLoanDocumentFolder
13808
+ * @summary Create a loan document folder
13809
+ * @request POST:/api/loan-document-folders
13810
+ * @secure
13811
+ * @response `201` `LoanDocumentFolder` Created
13812
+ * @response `409` `ProblemDetails` Conflict
13813
+ * @response `422` `ProblemDetails` Unprocessable Content
13814
+ */
13815
+ createLoanDocumentFolder: (
13816
+ data: CreateLoanDocumentFolderRequest,
13817
+ params: RequestParams = {},
13818
+ ) =>
13819
+ this.request<LoanDocumentFolder, ProblemDetails>({
13820
+ path: `/api/loan-document-folders`,
13821
+ method: "POST",
13822
+ body: data,
13823
+ secure: true,
13824
+ type: "application/json",
13825
+ format: "json",
13826
+ ...params,
13827
+ }),
13828
+
13336
13829
  /**
13337
13830
  * No description
13338
13831
  *
@@ -13392,6 +13885,56 @@ export class Api<
13392
13885
  ...params,
13393
13886
  }),
13394
13887
 
13888
+ /**
13889
+ * @description Returns each folder that holds at least one document the caller can read, with the document count per folder. Documents that are not assigned to a folder are returned as a synthetic 'Unassigned' folder (ID = empty GUID).
13890
+ *
13891
+ * @tags LoanDocumentFoldersForSingleLoan
13892
+ * @name ListLoanDocumentFolders
13893
+ * @summary Get the loan's document folders
13894
+ * @request GET:/api/loans/{loanId}/document-folders
13895
+ * @secure
13896
+ * @response `200` `(LoanDocumentFolderWithCount)[]` OK
13897
+ */
13898
+ listLoanDocumentFolders: (loanId: string, params: RequestParams = {}) =>
13899
+ this.request<LoanDocumentFolderWithCount[], any>({
13900
+ path: `/api/loans/${loanId}/document-folders`,
13901
+ method: "GET",
13902
+ secure: true,
13903
+ format: "json",
13904
+ ...params,
13905
+ }),
13906
+
13907
+ /**
13908
+ * @description Deprecated — use GET documents/folders. Returns all documents grouped by folder for sidebar display. Use folderNamesOnly=true to get a simplified response with folder names and counts for mobile (Files array will be empty).
13909
+ *
13910
+ * @tags LoanDocumentFoldersForSingleLoan
13911
+ * @name GetLoanDocumentFolders
13912
+ * @summary [Deprecated] Get document folder hierarchy
13913
+ * @request POST:/api/loans/{loanId}/documents/folders
13914
+ * @deprecated
13915
+ * @secure
13916
+ * @response `200` `(DocumentFolder)[]` OK
13917
+ */
13918
+ getLoanDocumentFolders: (
13919
+ loanId: string,
13920
+ data: DocumentFoldersRequest,
13921
+ query?: {
13922
+ /** @default false */
13923
+ folderNamesOnly?: boolean;
13924
+ },
13925
+ params: RequestParams = {},
13926
+ ) =>
13927
+ this.request<DocumentFolder[], any>({
13928
+ path: `/api/loans/${loanId}/documents/folders`,
13929
+ method: "POST",
13930
+ query: query,
13931
+ body: data,
13932
+ secure: true,
13933
+ type: "application/json",
13934
+ format: "json",
13935
+ ...params,
13936
+ }),
13937
+
13395
13938
  /**
13396
13939
  * No description
13397
13940
  *
@@ -13481,36 +14024,6 @@ export class Api<
13481
14024
  ...params,
13482
14025
  }),
13483
14026
 
13484
- /**
13485
- * @description Returns all documents grouped by folder for sidebar display. Use folderNamesOnly=true to get simplified response with folder names and counts for mobile (Files array will be empty).
13486
- *
13487
- * @tags LoanDocuments
13488
- * @name GetLoanDocumentFolders
13489
- * @summary Get document folder hierarchy
13490
- * @request POST:/api/loans/{loanId}/documents/folders
13491
- * @secure
13492
- * @response `200` `(DocumentFolder)[]` OK
13493
- */
13494
- getLoanDocumentFolders: (
13495
- loanId: string,
13496
- data: DocumentFoldersRequest,
13497
- query?: {
13498
- /** @default false */
13499
- folderNamesOnly?: boolean;
13500
- },
13501
- params: RequestParams = {},
13502
- ) =>
13503
- this.request<DocumentFolder[], any>({
13504
- path: `/api/loans/${loanId}/documents/folders`,
13505
- method: "POST",
13506
- query: query,
13507
- body: data,
13508
- secure: true,
13509
- type: "application/json",
13510
- format: "json",
13511
- ...params,
13512
- }),
13513
-
13514
14027
  /**
13515
14028
  * No description
13516
14029
  *
@@ -13553,6 +14066,7 @@ export class Api<
13553
14066
  name?: string;
13554
14067
  /** @format binary */
13555
14068
  file?: File;
14069
+ /** @deprecated */
13556
14070
  bucket?: string;
13557
14071
  /** @format uuid */
13558
14072
  folderID?: string;
@@ -14833,6 +15347,7 @@ export class Api<
14833
15347
  name?: string;
14834
15348
  /** @format binary */
14835
15349
  file?: File;
15350
+ /** @deprecated */
14836
15351
  bucket?: string;
14837
15352
  /** @format uuid */
14838
15353
  folderID?: string;
@@ -17239,6 +17754,8 @@ export class Api<
17239
17754
  * @request POST:/api/loans/drafts/{draftId}/users/{userId}
17240
17755
  * @secure
17241
17756
  * @response `200` `UserDraft` OK
17757
+ * @response `404` `ProblemDetails` Not Found
17758
+ * @response `409` `ProblemDetails` Conflict
17242
17759
  */
17243
17760
  addDraftUsers: (
17244
17761
  draftId: string,
@@ -17246,7 +17763,7 @@ export class Api<
17246
17763
  data: CreateUserDraft,
17247
17764
  params: RequestParams = {},
17248
17765
  ) =>
17249
- this.request<UserDraft, any>({
17766
+ this.request<UserDraft, ProblemDetails>({
17250
17767
  path: `/api/loans/drafts/${draftId}/users/${userId}`,
17251
17768
  method: "POST",
17252
17769
  body: data,