@matech/thebigpos-sdk 2.48.0-rc1 → 2.48.0-rc2

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
@@ -450,6 +450,14 @@ export type ConsentSource = "TheBigPOS" | "ConsumerConnect";
450
450
 
451
451
  export type ConsentLosSyncStatus = "NotStarted" | "Failed" | "Success";
452
452
 
453
+ export type CompanyDocumentSourceType = "File" | "FreeText";
454
+
455
+ export type CompanyDocumentIndexStatus =
456
+ | "Uploaded"
457
+ | "Indexing"
458
+ | "Indexed"
459
+ | "Failed";
460
+
453
461
  export type ClassificationSource = "Textract" | "Llm" | "Manual";
454
462
 
455
463
  export type BranchType = "Mortgage" | "RealEstate";
@@ -1733,6 +1741,59 @@ export interface CompanyAddress {
1733
1741
  zip: string;
1734
1742
  }
1735
1743
 
1744
+ export interface CompanyDocument {
1745
+ /** @format uuid */
1746
+ id: string;
1747
+ /** @format uuid */
1748
+ folderId: string;
1749
+ folderName: string;
1750
+ name: string;
1751
+ sourceType: "File" | "FreeText";
1752
+ contentType?: string | null;
1753
+ /** @format int64 */
1754
+ fileSizeBytes: number;
1755
+ inlineContent?: string | null;
1756
+ indexStatus: "Uploaded" | "Indexing" | "Indexed" | "Failed";
1757
+ indexError?: string | null;
1758
+ /** @format date-time */
1759
+ indexedAt?: string | null;
1760
+ /** @format uuid */
1761
+ uploadedByUserId?: string | null;
1762
+ /** @format date-time */
1763
+ createdAt: string;
1764
+ /** @format date-time */
1765
+ updatedAt?: string | null;
1766
+ }
1767
+
1768
+ export interface CompanyDocumentFolder {
1769
+ /** @format uuid */
1770
+ id: string;
1771
+ name: string;
1772
+ description?: string | null;
1773
+ isSystemDefault: boolean;
1774
+ /** @format int32 */
1775
+ documentCount: number;
1776
+ /** @format date-time */
1777
+ createdAt: string;
1778
+ /** @format date-time */
1779
+ updatedAt?: string | null;
1780
+ }
1781
+
1782
+ export interface CompanyDocumentPaginated {
1783
+ rows: CompanyDocument[];
1784
+ pagination: Pagination;
1785
+ /** @format int64 */
1786
+ count: number;
1787
+ }
1788
+
1789
+ export interface CompanyDocumentSearchCriteria {
1790
+ searchText?: string | null;
1791
+ /** @format uuid */
1792
+ folderID?: string | null;
1793
+ indexStatuses?: CompanyDocumentIndexStatus[] | null;
1794
+ sourceType?: CompanyDocumentSourceType | null;
1795
+ }
1796
+
1736
1797
  export interface ConditionComment {
1737
1798
  commentId: string;
1738
1799
  comments: string;
@@ -1894,6 +1955,18 @@ export interface CreateBranchRequest {
1894
1955
  type: string;
1895
1956
  }
1896
1957
 
1958
+ export interface CreateCompanyDocumentFolderRequest {
1959
+ name: string;
1960
+ description?: string | null;
1961
+ }
1962
+
1963
+ export interface CreateCompanyTextDocumentRequest {
1964
+ name: string;
1965
+ /** @format uuid */
1966
+ folderID: string;
1967
+ content: string;
1968
+ }
1969
+
1897
1970
  export interface CreateCustomFieldDefinitionRequest {
1898
1971
  isRequired: boolean;
1899
1972
  /** @format int32 */
@@ -6826,6 +6899,18 @@ export interface UpdateAiUrlSourceRequest {
6826
6899
  scope: "FullDomain" | "SpecificPath";
6827
6900
  }
6828
6901
 
6902
+ export interface UpdateCompanyDocumentFolderRequest {
6903
+ name: string;
6904
+ description?: string | null;
6905
+ }
6906
+
6907
+ export interface UpdateCompanyDocumentRequest {
6908
+ name?: string | null;
6909
+ /** @format uuid */
6910
+ folderID?: string | null;
6911
+ content?: string | null;
6912
+ }
6913
+
6829
6914
  export interface UpdateCustomFieldDefinitionRequest {
6830
6915
  isRequired: boolean;
6831
6916
  /** @format int32 */
@@ -9941,6 +10026,321 @@ export class Api<
9941
10026
  ...params,
9942
10027
  }),
9943
10028
 
10029
+ /**
10030
+ * No description
10031
+ *
10032
+ * @tags CompanyDocumentFolders
10033
+ * @name GetCompanyDocumentFolders
10034
+ * @summary Get all company document folders
10035
+ * @request GET:/api/company-document-folders
10036
+ * @secure
10037
+ * @response `200` `(CompanyDocumentFolder)[]` OK
10038
+ */
10039
+ getCompanyDocumentFolders: (params: RequestParams = {}) =>
10040
+ this.request<CompanyDocumentFolder[], any>({
10041
+ path: `/api/company-document-folders`,
10042
+ method: "GET",
10043
+ secure: true,
10044
+ format: "json",
10045
+ ...params,
10046
+ }),
10047
+
10048
+ /**
10049
+ * No description
10050
+ *
10051
+ * @tags CompanyDocumentFolders
10052
+ * @name CreateCompanyDocumentFolder
10053
+ * @summary Create company document folder
10054
+ * @request POST:/api/company-document-folders
10055
+ * @secure
10056
+ * @response `201` `CompanyDocumentFolder` Created
10057
+ * @response `400` `ProblemDetails` Bad Request
10058
+ * @response `409` `ProblemDetails` Conflict
10059
+ */
10060
+ createCompanyDocumentFolder: (
10061
+ data: CreateCompanyDocumentFolderRequest,
10062
+ params: RequestParams = {},
10063
+ ) =>
10064
+ this.request<CompanyDocumentFolder, ProblemDetails>({
10065
+ path: `/api/company-document-folders`,
10066
+ method: "POST",
10067
+ body: data,
10068
+ secure: true,
10069
+ type: ContentType.Json,
10070
+ format: "json",
10071
+ ...params,
10072
+ }),
10073
+
10074
+ /**
10075
+ * No description
10076
+ *
10077
+ * @tags CompanyDocumentFolders
10078
+ * @name GetCompanyDocumentFolder
10079
+ * @summary Get company document folder by ID
10080
+ * @request GET:/api/company-document-folders/{id}
10081
+ * @secure
10082
+ * @response `200` `CompanyDocumentFolder` OK
10083
+ * @response `404` `ProblemDetails` Not Found
10084
+ */
10085
+ getCompanyDocumentFolder: (id: string, params: RequestParams = {}) =>
10086
+ this.request<CompanyDocumentFolder, ProblemDetails>({
10087
+ path: `/api/company-document-folders/${id}`,
10088
+ method: "GET",
10089
+ secure: true,
10090
+ format: "json",
10091
+ ...params,
10092
+ }),
10093
+
10094
+ /**
10095
+ * No description
10096
+ *
10097
+ * @tags CompanyDocumentFolders
10098
+ * @name UpdateCompanyDocumentFolder
10099
+ * @summary Update company document folder
10100
+ * @request PUT:/api/company-document-folders/{id}
10101
+ * @secure
10102
+ * @response `200` `CompanyDocumentFolder` OK
10103
+ * @response `400` `ProblemDetails` Bad Request
10104
+ * @response `404` `ProblemDetails` Not Found
10105
+ * @response `409` `ProblemDetails` Conflict
10106
+ */
10107
+ updateCompanyDocumentFolder: (
10108
+ id: string,
10109
+ data: UpdateCompanyDocumentFolderRequest,
10110
+ params: RequestParams = {},
10111
+ ) =>
10112
+ this.request<CompanyDocumentFolder, ProblemDetails>({
10113
+ path: `/api/company-document-folders/${id}`,
10114
+ method: "PUT",
10115
+ body: data,
10116
+ secure: true,
10117
+ type: ContentType.Json,
10118
+ format: "json",
10119
+ ...params,
10120
+ }),
10121
+
10122
+ /**
10123
+ * No description
10124
+ *
10125
+ * @tags CompanyDocumentFolders
10126
+ * @name DeleteCompanyDocumentFolder
10127
+ * @summary Delete company document folder
10128
+ * @request DELETE:/api/company-document-folders/{id}
10129
+ * @secure
10130
+ * @response `204` `void` No Content
10131
+ * @response `400` `ProblemDetails` Bad Request
10132
+ * @response `404` `ProblemDetails` Not Found
10133
+ * @response `409` `ProblemDetails` Conflict
10134
+ */
10135
+ deleteCompanyDocumentFolder: (id: string, params: RequestParams = {}) =>
10136
+ this.request<void, ProblemDetails>({
10137
+ path: `/api/company-document-folders/${id}`,
10138
+ method: "DELETE",
10139
+ secure: true,
10140
+ ...params,
10141
+ }),
10142
+
10143
+ /**
10144
+ * No description
10145
+ *
10146
+ * @tags CompanyDocuments
10147
+ * @name SearchCompanyDocuments
10148
+ * @summary Search company documents
10149
+ * @request POST:/api/company-documents/search
10150
+ * @secure
10151
+ * @response `200` `CompanyDocumentPaginated` OK
10152
+ * @response `400` `ProblemDetails` Bad Request
10153
+ */
10154
+ searchCompanyDocuments: (
10155
+ data: CompanyDocumentSearchCriteria,
10156
+ query?: {
10157
+ /** @format int32 */
10158
+ pageSize?: number;
10159
+ /** @format int32 */
10160
+ pageNumber?: number;
10161
+ sortBy?: string;
10162
+ sortDirection?: string;
10163
+ },
10164
+ params: RequestParams = {},
10165
+ ) =>
10166
+ this.request<CompanyDocumentPaginated, ProblemDetails>({
10167
+ path: `/api/company-documents/search`,
10168
+ method: "POST",
10169
+ query: query,
10170
+ body: data,
10171
+ secure: true,
10172
+ type: ContentType.Json,
10173
+ format: "json",
10174
+ ...params,
10175
+ }),
10176
+
10177
+ /**
10178
+ * No description
10179
+ *
10180
+ * @tags CompanyDocuments
10181
+ * @name GetCompanyDocument
10182
+ * @summary Get company document by ID
10183
+ * @request GET:/api/company-documents/{id}
10184
+ * @secure
10185
+ * @response `200` `CompanyDocument` OK
10186
+ * @response `404` `ProblemDetails` Not Found
10187
+ */
10188
+ getCompanyDocument: (id: string, params: RequestParams = {}) =>
10189
+ this.request<CompanyDocument, ProblemDetails>({
10190
+ path: `/api/company-documents/${id}`,
10191
+ method: "GET",
10192
+ secure: true,
10193
+ format: "json",
10194
+ ...params,
10195
+ }),
10196
+
10197
+ /**
10198
+ * No description
10199
+ *
10200
+ * @tags CompanyDocuments
10201
+ * @name UpdateCompanyDocument
10202
+ * @summary Update company document
10203
+ * @request PUT:/api/company-documents/{id}
10204
+ * @secure
10205
+ * @response `200` `CompanyDocument` OK
10206
+ * @response `400` `ProblemDetails` Bad Request
10207
+ * @response `404` `ProblemDetails` Not Found
10208
+ * @response `409` `ProblemDetails` Conflict
10209
+ */
10210
+ updateCompanyDocument: (
10211
+ id: string,
10212
+ data: UpdateCompanyDocumentRequest,
10213
+ params: RequestParams = {},
10214
+ ) =>
10215
+ this.request<CompanyDocument, ProblemDetails>({
10216
+ path: `/api/company-documents/${id}`,
10217
+ method: "PUT",
10218
+ body: data,
10219
+ secure: true,
10220
+ type: ContentType.Json,
10221
+ format: "json",
10222
+ ...params,
10223
+ }),
10224
+
10225
+ /**
10226
+ * No description
10227
+ *
10228
+ * @tags CompanyDocuments
10229
+ * @name DeleteCompanyDocument
10230
+ * @summary Delete company document
10231
+ * @request DELETE:/api/company-documents/{id}
10232
+ * @secure
10233
+ * @response `204` `void` No Content
10234
+ * @response `404` `ProblemDetails` Not Found
10235
+ */
10236
+ deleteCompanyDocument: (id: string, params: RequestParams = {}) =>
10237
+ this.request<void, ProblemDetails>({
10238
+ path: `/api/company-documents/${id}`,
10239
+ method: "DELETE",
10240
+ secure: true,
10241
+ ...params,
10242
+ }),
10243
+
10244
+ /**
10245
+ * No description
10246
+ *
10247
+ * @tags CompanyDocuments
10248
+ * @name DownloadCompanyDocument
10249
+ * @summary Download company document
10250
+ * @request GET:/api/company-documents/{id}/download
10251
+ * @secure
10252
+ * @response `200` `void` OK
10253
+ * @response `404` `ProblemDetails` Not Found
10254
+ */
10255
+ downloadCompanyDocument: (id: string, params: RequestParams = {}) =>
10256
+ this.request<void, ProblemDetails>({
10257
+ path: `/api/company-documents/${id}/download`,
10258
+ method: "GET",
10259
+ secure: true,
10260
+ ...params,
10261
+ }),
10262
+
10263
+ /**
10264
+ * No description
10265
+ *
10266
+ * @tags CompanyDocuments
10267
+ * @name CreateCompanyDocument
10268
+ * @summary Upload company document
10269
+ * @request POST:/api/company-documents
10270
+ * @secure
10271
+ * @response `201` `CompanyDocument` Created
10272
+ * @response `400` `ProblemDetails` Bad Request
10273
+ * @response `404` `ProblemDetails` Not Found
10274
+ * @response `409` `ProblemDetails` Conflict
10275
+ */
10276
+ createCompanyDocument: (
10277
+ data: {
10278
+ /** @format binary */
10279
+ file?: File;
10280
+ /** @format uuid */
10281
+ folderID?: string;
10282
+ name?: string;
10283
+ },
10284
+ params: RequestParams = {},
10285
+ ) =>
10286
+ this.request<CompanyDocument, ProblemDetails>({
10287
+ path: `/api/company-documents`,
10288
+ method: "POST",
10289
+ body: data,
10290
+ secure: true,
10291
+ type: ContentType.FormData,
10292
+ format: "json",
10293
+ ...params,
10294
+ }),
10295
+
10296
+ /**
10297
+ * No description
10298
+ *
10299
+ * @tags CompanyDocuments
10300
+ * @name CreateCompanyTextDocument
10301
+ * @summary Create free-form text company document
10302
+ * @request POST:/api/company-documents/text
10303
+ * @secure
10304
+ * @response `201` `CompanyDocument` Created
10305
+ * @response `400` `ProblemDetails` Bad Request
10306
+ * @response `404` `ProblemDetails` Not Found
10307
+ * @response `409` `ProblemDetails` Conflict
10308
+ */
10309
+ createCompanyTextDocument: (
10310
+ data: CreateCompanyTextDocumentRequest,
10311
+ params: RequestParams = {},
10312
+ ) =>
10313
+ this.request<CompanyDocument, ProblemDetails>({
10314
+ path: `/api/company-documents/text`,
10315
+ method: "POST",
10316
+ body: data,
10317
+ secure: true,
10318
+ type: ContentType.Json,
10319
+ format: "json",
10320
+ ...params,
10321
+ }),
10322
+
10323
+ /**
10324
+ * No description
10325
+ *
10326
+ * @tags CompanyDocuments
10327
+ * @name ReindexCompanyDocument
10328
+ * @summary Re-index a failed company document
10329
+ * @request POST:/api/company-documents/{id}/reindex
10330
+ * @secure
10331
+ * @response `200` `CompanyDocument` OK
10332
+ * @response `400` `ProblemDetails` Bad Request
10333
+ * @response `404` `ProblemDetails` Not Found
10334
+ */
10335
+ reindexCompanyDocument: (id: string, params: RequestParams = {}) =>
10336
+ this.request<CompanyDocument, ProblemDetails>({
10337
+ path: `/api/company-documents/${id}/reindex`,
10338
+ method: "POST",
10339
+ secure: true,
10340
+ format: "json",
10341
+ ...params,
10342
+ }),
10343
+
9944
10344
  /**
9945
10345
  * No description
9946
10346
  *