@matech/thebigpos-sdk 2.45.1-rc0 → 2.45.1-rc10
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/README.md +10 -0
- package/dist/index.d.ts +141 -78
- package/dist/index.js +29 -51
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
- package/scripts/apply-json-patch-content-type.js +129 -36
- package/src/index.ts +177 -128
|
@@ -1,56 +1,149 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
Post-generation fixup for the generated TypeScript SDK.
|
|
3
3
|
|
|
4
|
-
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
swagger-typescript-api does not propagate the `application/json-patch+json`
|
|
5
|
+
request content type into the generated code, so PATCH methods that use JSON
|
|
6
|
+
Patch would otherwise go out with the wrong Content-Type. This script restores
|
|
7
|
+
it by reading the OpenAPI spec the SDK was generated from and, for every
|
|
8
|
+
generated PATCH method, setting:
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
- ContentType.JsonPatch -> when the spec's requestBody for that path
|
|
11
|
+
advertises application/json-patch+json
|
|
12
|
+
- ContentType.Json -> for every other PATCH method
|
|
13
|
+
(e.g. updateLoan, which the backend declares as
|
|
14
|
+
[Consumes("application/json")])
|
|
15
|
+
|
|
16
|
+
The decision is taken entirely from the spec — there is no hard-coded list of
|
|
17
|
+
endpoints to keep in sync. It also ensures the ContentType enum includes
|
|
18
|
+
JsonPatch and relaxes the Operation interface `value` to accept any value.
|
|
19
|
+
|
|
20
|
+
Usage (pass the SAME spec given to `swagger-typescript-api -p`):
|
|
21
|
+
node scripts/apply-json-patch-content-type.js https://api.thebigpos.dev/swagger/<version>/swagger.json
|
|
22
|
+
node scripts/apply-json-patch-content-type.js ./swagger.json
|
|
23
|
+
SWAGGER_SPEC=<url-or-file> node scripts/apply-json-patch-content-type.js
|
|
24
|
+
|
|
25
|
+
Design notes:
|
|
26
|
+
- The rewrite is scoped to a single generated method block at a time
|
|
27
|
+
(anchored on that method's own `...params,`), so it can never bleed across
|
|
28
|
+
method boundaries.
|
|
29
|
+
- It sets each method's content type to its target value rather than doing a
|
|
30
|
+
conditional replace, so it is idempotent and self-healing (it also repairs
|
|
31
|
+
a previously-seen ContentType.JsonPatchPatch double-application).
|
|
32
|
+
- If no spec is provided (e.g. a plain commit-hook run), the content-type
|
|
33
|
+
rewrite is skipped instead of guessing, so it can never silently corrupt
|
|
34
|
+
the generated output.
|
|
9
35
|
*/
|
|
10
36
|
|
|
11
37
|
const fs = require('fs')
|
|
38
|
+
const nodePath = require('path')
|
|
12
39
|
|
|
13
|
-
const
|
|
40
|
+
const SRC = nodePath.resolve(__dirname, '../src/index.ts')
|
|
14
41
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
42
|
+
async function loadSpec(source) {
|
|
43
|
+
if (!source) return null
|
|
44
|
+
if (/^https?:\/\//i.test(source)) {
|
|
45
|
+
const res = await fetch(source)
|
|
46
|
+
if (!res.ok) throw new Error(`Failed to fetch spec from "${source}": HTTP ${res.status}`)
|
|
47
|
+
return res.json()
|
|
48
|
+
}
|
|
49
|
+
return JSON.parse(fs.readFileSync(nodePath.resolve(source), 'utf8'))
|
|
18
50
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
process.exit(1)
|
|
51
|
+
|
|
52
|
+
// Collapse spec ("{id}") and generated ("${id}") path params to a common token
|
|
53
|
+
// so generated paths can be matched against spec paths regardless of param names.
|
|
54
|
+
function normalizePath(p) {
|
|
55
|
+
return p.replace(/\$\{[^}]+\}/g, '{}').replace(/\{[^}]+\}/g, '{}')
|
|
25
56
|
}
|
|
26
57
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
)
|
|
58
|
+
function jsonPatchPaths(spec) {
|
|
59
|
+
const set = new Set()
|
|
60
|
+
for (const [route, ops] of Object.entries(spec.paths || {})) {
|
|
61
|
+
const content = ops && ops.patch && ops.patch.requestBody && ops.patch.requestBody.content
|
|
62
|
+
if (content && Object.prototype.hasOwnProperty.call(content, 'application/json-patch+json')) {
|
|
63
|
+
set.add(normalizePath(route))
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return set
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function setContentType(block, member) {
|
|
70
|
+
const target = `type: ContentType.${member}`
|
|
71
|
+
if (/type:\s*ContentType\.\w+/.test(block)) return block.replace(/type:\s*ContentType\.\w+/, target)
|
|
72
|
+
if (/type:\s*"[^"]*"/.test(block)) return block.replace(/type:\s*"[^"]*"/, target)
|
|
73
|
+
if (/\n(\s*)format:/.test(block)) return block.replace(/\n(\s*)format:/, `\n$1${target},\n$1format:`)
|
|
74
|
+
return block.replace(/\n(\s*)\.\.\.params,/, `\n$1${target},\n$1...params,`)
|
|
75
|
+
}
|
|
32
76
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/export enum ContentType\s*{([\s\S]*?)}/,
|
|
36
|
-
(match, enumBody) => {
|
|
77
|
+
function ensureJsonPatchEnum(content) {
|
|
78
|
+
return content.replace(/export enum ContentType\s*{([\s\S]*?)}/, (match, enumBody) => {
|
|
37
79
|
if (enumBody.includes('JsonPatch')) return match
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
)
|
|
80
|
+
return `export enum ContentType {\n JsonPatch = "application/json-patch+json",\n ${enumBody.trim()}\n}`
|
|
81
|
+
})
|
|
82
|
+
}
|
|
42
83
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/export interface Operation\s*{([\s\S]*?)}/,
|
|
46
|
-
(match, body) => {
|
|
84
|
+
function relaxOperationValue(content) {
|
|
85
|
+
return content.replace(/export interface Operation\s*{([\s\S]*?)}/, (match, body) => {
|
|
47
86
|
const updated = body.replace(
|
|
48
87
|
/value\?:\s*object\s*\|?\s*null?;/,
|
|
49
88
|
'value?: string | number | boolean | null | object;'
|
|
50
89
|
)
|
|
51
90
|
return `export interface Operation {\n ${updated.trim()}\n}`
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function applyContentTypes(content, patchPaths) {
|
|
95
|
+
// Heal any earlier double-application (ContentType.JsonPatchPatch...).
|
|
96
|
+
content = content.replace(/ContentType\.JsonPatch(?:Patch)+\b/g, 'ContentType.JsonPatch')
|
|
97
|
+
|
|
98
|
+
const METHOD_BLOCK = /[a-zA-Z0-9_]+:\s*\([\s\S]*?\)\s*=>\s*this\.request<[^>]*>\(\{[\s\S]*?\.\.\.params,/g
|
|
99
|
+
return content.replace(METHOD_BLOCK, (block) => {
|
|
100
|
+
if (!/method:\s*"PATCH"/.test(block)) {
|
|
101
|
+
// Non-PATCH methods must never be JSON Patch.
|
|
102
|
+
return /type:\s*ContentType\.JsonPatch\b/.test(block)
|
|
103
|
+
? block.replace(/type:\s*ContentType\.JsonPatch\b/, 'type: ContentType.Json')
|
|
104
|
+
: block
|
|
105
|
+
}
|
|
106
|
+
const routeMatch = block.match(/path:\s*`([^`]*)`/)
|
|
107
|
+
const route = routeMatch ? normalizePath(routeMatch[1]) : ''
|
|
108
|
+
return setContentType(block, patchPaths.has(route) ? 'JsonPatch' : 'Json')
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
;(async () => {
|
|
113
|
+
if (!fs.existsSync(SRC)) {
|
|
114
|
+
console.error(`Error: File not found at "${SRC}". Generate the SDK first.`)
|
|
115
|
+
process.exit(1)
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const source = process.argv[2] || process.env.SWAGGER_SPEC || process.env.SWAGGER_URL
|
|
119
|
+
let spec
|
|
120
|
+
try {
|
|
121
|
+
spec = await loadSpec(source)
|
|
122
|
+
} catch (err) {
|
|
123
|
+
console.error(`Error loading OpenAPI spec: ${err.message}`)
|
|
124
|
+
process.exit(1)
|
|
52
125
|
}
|
|
53
|
-
)
|
|
54
126
|
|
|
55
|
-
fs.
|
|
56
|
-
|
|
127
|
+
let content = fs.readFileSync(SRC, 'utf8')
|
|
128
|
+
content = ensureJsonPatchEnum(content)
|
|
129
|
+
content = relaxOperationValue(content)
|
|
130
|
+
|
|
131
|
+
if (!spec) {
|
|
132
|
+
console.warn(
|
|
133
|
+
'No OpenAPI spec provided (argument / SWAGGER_SPEC / SWAGGER_URL) — skipping PATCH content-type rewrite.\n' +
|
|
134
|
+
'Re-run with the spec used for generation to apply it, e.g.:\n' +
|
|
135
|
+
' node scripts/apply-json-patch-content-type.js https://api.thebigpos.dev/swagger/<version>/swagger.json'
|
|
136
|
+
)
|
|
137
|
+
fs.writeFileSync(SRC, content)
|
|
138
|
+
return
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const patchPaths = jsonPatchPaths(spec)
|
|
142
|
+
content = applyContentTypes(content, patchPaths)
|
|
143
|
+
|
|
144
|
+
fs.writeFileSync(SRC, content)
|
|
145
|
+
console.log(`SDK patch complete: PATCH content types set from the OpenAPI spec (${patchPaths.size} json-patch endpoint(s)).`)
|
|
146
|
+
})().catch((err) => {
|
|
147
|
+
console.error(err)
|
|
148
|
+
process.exit(1)
|
|
149
|
+
})
|
package/src/index.ts
CHANGED
|
@@ -230,7 +230,8 @@ export type LoanLanguagePreference =
|
|
|
230
230
|
| "Spanish"
|
|
231
231
|
| "Tagalog"
|
|
232
232
|
| "Vietnamese"
|
|
233
|
-
| "Other"
|
|
233
|
+
| "Other"
|
|
234
|
+
| "DoNotWishToRespond";
|
|
234
235
|
|
|
235
236
|
export type LoanImportStatus =
|
|
236
237
|
| "WaitingProcess"
|
|
@@ -263,7 +264,9 @@ export type LoanGiftSource =
|
|
|
263
264
|
| "StateAgency"
|
|
264
265
|
| "UnmarriedPartner"
|
|
265
266
|
| "Lender"
|
|
266
|
-
| "Other"
|
|
267
|
+
| "Other"
|
|
268
|
+
| "Institutional"
|
|
269
|
+
| "Borrower";
|
|
267
270
|
|
|
268
271
|
export type LoanGiftAssetType = "Cash" | "Asset" | "Equity";
|
|
269
272
|
|
|
@@ -715,7 +718,6 @@ export interface AccountSettingsRequest {
|
|
|
715
718
|
isSmsEnabled: boolean;
|
|
716
719
|
smsNumber?: string | null;
|
|
717
720
|
isEarlyAdopter: boolean;
|
|
718
|
-
isAIEnabled: boolean;
|
|
719
721
|
}
|
|
720
722
|
|
|
721
723
|
export interface Action {
|
|
@@ -1392,11 +1394,6 @@ export interface ApplicationRowData {
|
|
|
1392
1394
|
titleInsuranceAgent?: EncompassContact | null;
|
|
1393
1395
|
}
|
|
1394
1396
|
|
|
1395
|
-
export interface Attachment {
|
|
1396
|
-
fileName: string;
|
|
1397
|
-
base64Data: string;
|
|
1398
|
-
}
|
|
1399
|
-
|
|
1400
1397
|
export interface AuditEntityType {
|
|
1401
1398
|
entityType: string;
|
|
1402
1399
|
rootEntityType?: string | null;
|
|
@@ -2486,6 +2483,7 @@ export interface EncompassPackageItem {
|
|
|
2486
2483
|
/** @format date-time */
|
|
2487
2484
|
createdAt: string;
|
|
2488
2485
|
recipientId: string;
|
|
2486
|
+
borrowerName?: string | null;
|
|
2489
2487
|
title?: string | null;
|
|
2490
2488
|
/** @format date-time */
|
|
2491
2489
|
issuedAt?: string | null;
|
|
@@ -2760,8 +2758,6 @@ export interface FusionReportFilter {
|
|
|
2760
2758
|
}
|
|
2761
2759
|
|
|
2762
2760
|
export interface GenerateDocumentRequest {
|
|
2763
|
-
/** @deprecated */
|
|
2764
|
-
loanID?: string | null;
|
|
2765
2761
|
/** @format uuid */
|
|
2766
2762
|
templateID: string;
|
|
2767
2763
|
/**
|
|
@@ -3136,6 +3132,8 @@ export interface Loan {
|
|
|
3136
3132
|
financial?: LoanFinancial | null;
|
|
3137
3133
|
financialTerms?: LoanFinancialTerms | null;
|
|
3138
3134
|
monthlyPayment?: LoanMonthlyPayment | null;
|
|
3135
|
+
costDetails?: LoanCostDetails | null;
|
|
3136
|
+
metrics?: LoanMetrics | null;
|
|
3139
3137
|
borrowers: LoanBorrower[];
|
|
3140
3138
|
nonOwningBorrowers: LoanNonOwningBorrower[];
|
|
3141
3139
|
userLoans: UserLoan[];
|
|
@@ -3176,6 +3174,8 @@ export interface LoanApplicationRequest {
|
|
|
3176
3174
|
companyName?: string | null;
|
|
3177
3175
|
property?: LoanPropertyRequest | null;
|
|
3178
3176
|
financial?: LoanFinancialRequest | null;
|
|
3177
|
+
financialTerms?: LoanFinancialTermsRequest | null;
|
|
3178
|
+
monthlyPayment?: LoanMonthlyPaymentRequest | null;
|
|
3179
3179
|
borrowers: LoanBorrowerRequest[];
|
|
3180
3180
|
nonOwningBorrowers: LoanNonOwningBorrowerRequest[];
|
|
3181
3181
|
/** @format uuid */
|
|
@@ -3203,6 +3203,8 @@ export interface LoanBorrower {
|
|
|
3203
3203
|
applicationStatus: LoanBorrowerApplicationStatusEnum;
|
|
3204
3204
|
/** @format int32 */
|
|
3205
3205
|
numberOfDependents?: number | null;
|
|
3206
|
+
/** @format int32 */
|
|
3207
|
+
creditDecisionScore?: number | null;
|
|
3206
3208
|
isPrimaryBorrower: boolean;
|
|
3207
3209
|
isFirstTimeHomeBuyer?: boolean | null;
|
|
3208
3210
|
hasJointAssetsAndLiabilities?: boolean | null;
|
|
@@ -3592,6 +3594,11 @@ export interface LoanBorrowerGift {
|
|
|
3592
3594
|
isDeposited?: boolean | null;
|
|
3593
3595
|
source?: LoanGiftSource | null;
|
|
3594
3596
|
assetType?: LoanGiftAssetType | null;
|
|
3597
|
+
grantorDonorName?: string | null;
|
|
3598
|
+
/** @format double */
|
|
3599
|
+
amountAppliedToDownPayment?: number | null;
|
|
3600
|
+
/** @format double */
|
|
3601
|
+
amountAppliedToClosingCosts?: number | null;
|
|
3595
3602
|
}
|
|
3596
3603
|
|
|
3597
3604
|
export interface LoanBorrowerGiftRequest {
|
|
@@ -3780,9 +3787,26 @@ export interface LoanBorrowerRealEstateAsset {
|
|
|
3780
3787
|
/** @format double */
|
|
3781
3788
|
marketValue?: number | null;
|
|
3782
3789
|
/** @format double */
|
|
3790
|
+
purchasePrice?: number | null;
|
|
3791
|
+
/** @format int32 */
|
|
3792
|
+
yearBuilt?: number | null;
|
|
3793
|
+
/** @format int32 */
|
|
3794
|
+
numberOfUnits?: number | null;
|
|
3795
|
+
/** @format double */
|
|
3783
3796
|
monthlyInsTaxDues?: number | null;
|
|
3784
3797
|
/** @format double */
|
|
3785
3798
|
monthlyRentalIncome?: number | null;
|
|
3799
|
+
/** @format double */
|
|
3800
|
+
rentalIncomeNetAmount?: number | null;
|
|
3801
|
+
/** @format double */
|
|
3802
|
+
maintenanceExpense?: number | null;
|
|
3803
|
+
/** @format double */
|
|
3804
|
+
percentageOfRental?: number | null;
|
|
3805
|
+
/** @format double */
|
|
3806
|
+
participationPercentage?: number | null;
|
|
3807
|
+
/** @format date */
|
|
3808
|
+
acquiredDate?: string | null;
|
|
3809
|
+
dispositionStatus?: string | null;
|
|
3786
3810
|
address?: AddressV3 | null;
|
|
3787
3811
|
mortgages?: LoanBorrowerRealEstateAssetMortgage[] | null;
|
|
3788
3812
|
}
|
|
@@ -3995,6 +4019,23 @@ export interface LoanContactList {
|
|
|
3995
4019
|
email: string;
|
|
3996
4020
|
}
|
|
3997
4021
|
|
|
4022
|
+
export interface LoanCostDetails {
|
|
4023
|
+
/** @format uuid */
|
|
4024
|
+
id?: string | null;
|
|
4025
|
+
/** @format double */
|
|
4026
|
+
closingCosts?: number | null;
|
|
4027
|
+
/** @format double */
|
|
4028
|
+
prepaidCharges?: number | null;
|
|
4029
|
+
/** @format double */
|
|
4030
|
+
discount?: number | null;
|
|
4031
|
+
/** @format double */
|
|
4032
|
+
lenderCredit?: number | null;
|
|
4033
|
+
/** @format double */
|
|
4034
|
+
totalCost?: number | null;
|
|
4035
|
+
/** @format double */
|
|
4036
|
+
totalFinancing?: number | null;
|
|
4037
|
+
}
|
|
4038
|
+
|
|
3998
4039
|
export interface LoanCustomFieldsRequest {
|
|
3999
4040
|
additionalFields?: Record<string, string> | null;
|
|
4000
4041
|
}
|
|
@@ -4160,6 +4201,25 @@ export interface LoanFinancialTerms {
|
|
|
4160
4201
|
baseLoanAmount?: number | null;
|
|
4161
4202
|
/** @format double */
|
|
4162
4203
|
totalLoanAmount?: number | null;
|
|
4204
|
+
/** @format double */
|
|
4205
|
+
mortgageInsuranceFactor?: number | null;
|
|
4206
|
+
isEscrowWaived?: boolean | null;
|
|
4207
|
+
}
|
|
4208
|
+
|
|
4209
|
+
export interface LoanFinancialTermsRequest {
|
|
4210
|
+
/** @format int32 */
|
|
4211
|
+
loanTermMonths?: number | null;
|
|
4212
|
+
amortizationType?: LoanAmortizationType | null;
|
|
4213
|
+
/** @format double */
|
|
4214
|
+
apr?: number | null;
|
|
4215
|
+
/** @format double */
|
|
4216
|
+
interestRate?: number | null;
|
|
4217
|
+
/** @format double */
|
|
4218
|
+
downPayment?: number | null;
|
|
4219
|
+
/** @format double */
|
|
4220
|
+
baseLoanAmount?: number | null;
|
|
4221
|
+
/** @format double */
|
|
4222
|
+
totalLoanAmount?: number | null;
|
|
4163
4223
|
}
|
|
4164
4224
|
|
|
4165
4225
|
export interface LoanIdentifier {
|
|
@@ -4281,6 +4341,19 @@ export interface LoanLogSearchCriteria {
|
|
|
4281
4341
|
levels?: LogLevel[] | null;
|
|
4282
4342
|
}
|
|
4283
4343
|
|
|
4344
|
+
export interface LoanMetrics {
|
|
4345
|
+
/** @format uuid */
|
|
4346
|
+
id?: string | null;
|
|
4347
|
+
/** @format double */
|
|
4348
|
+
ltv?: number | null;
|
|
4349
|
+
/** @format double */
|
|
4350
|
+
cltv?: number | null;
|
|
4351
|
+
/** @format double */
|
|
4352
|
+
frontDti?: number | null;
|
|
4353
|
+
/** @format double */
|
|
4354
|
+
backDti?: number | null;
|
|
4355
|
+
}
|
|
4356
|
+
|
|
4284
4357
|
export interface LoanMilestone {
|
|
4285
4358
|
/** @format uuid */
|
|
4286
4359
|
id: string;
|
|
@@ -4309,6 +4382,23 @@ export interface LoanMonthlyPayment {
|
|
|
4309
4382
|
other?: number | null;
|
|
4310
4383
|
}
|
|
4311
4384
|
|
|
4385
|
+
export interface LoanMonthlyPaymentRequest {
|
|
4386
|
+
/** @format double */
|
|
4387
|
+
principalAndInterest?: number | null;
|
|
4388
|
+
/** @format double */
|
|
4389
|
+
taxes?: number | null;
|
|
4390
|
+
/** @format double */
|
|
4391
|
+
insurance?: number | null;
|
|
4392
|
+
/** @format double */
|
|
4393
|
+
mortgageInsurance?: number | null;
|
|
4394
|
+
/** @format double */
|
|
4395
|
+
floodInsurance?: number | null;
|
|
4396
|
+
/** @format double */
|
|
4397
|
+
hoa?: number | null;
|
|
4398
|
+
/** @format double */
|
|
4399
|
+
other?: number | null;
|
|
4400
|
+
}
|
|
4401
|
+
|
|
4312
4402
|
export interface LoanNonOwningBorrower {
|
|
4313
4403
|
/** @format uuid */
|
|
4314
4404
|
id?: string | null;
|
|
@@ -5291,15 +5381,12 @@ export interface SendLoanTaskReminderRequest {
|
|
|
5291
5381
|
userIds?: string[] | null;
|
|
5292
5382
|
}
|
|
5293
5383
|
|
|
5294
|
-
export interface
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
email?: string | null;
|
|
5301
|
-
phone?: string | null;
|
|
5302
|
-
attachments: Attachment[];
|
|
5384
|
+
export interface SendOutstandingTaskReminderRequest {
|
|
5385
|
+
userIds?: string[] | null;
|
|
5386
|
+
}
|
|
5387
|
+
|
|
5388
|
+
export interface SetAiEnabledRequest {
|
|
5389
|
+
isEnabled: boolean;
|
|
5303
5390
|
}
|
|
5304
5391
|
|
|
5305
5392
|
export interface SetCustomFieldValueRequest {
|
|
@@ -6090,16 +6177,6 @@ export interface TaxRatesRequest {
|
|
|
6090
6177
|
marginalIncomeTaxRate: number;
|
|
6091
6178
|
}
|
|
6092
6179
|
|
|
6093
|
-
export interface TestSendNotificationForLoanRequest {
|
|
6094
|
-
loanData: Record<string, string>;
|
|
6095
|
-
/** @format uuid */
|
|
6096
|
-
siteConfigurationId: string;
|
|
6097
|
-
toAddress?: string | null;
|
|
6098
|
-
toPhoneNumber?: string | null;
|
|
6099
|
-
templateKey?: string | null;
|
|
6100
|
-
attachments: Attachment[];
|
|
6101
|
-
}
|
|
6102
|
-
|
|
6103
6180
|
export interface Theme {
|
|
6104
6181
|
logoURL: string;
|
|
6105
6182
|
primaryColor: string;
|
|
@@ -9146,6 +9223,31 @@ export class Api<
|
|
|
9146
9223
|
...params,
|
|
9147
9224
|
}),
|
|
9148
9225
|
|
|
9226
|
+
/**
|
|
9227
|
+
* No description
|
|
9228
|
+
*
|
|
9229
|
+
* @tags AiSuperAdmin
|
|
9230
|
+
* @name SetAccountAiEnabled
|
|
9231
|
+
* @summary Enable or disable AI for an account (SuperAdmin only)
|
|
9232
|
+
* @request PUT:/api/ai/superadmin/accounts/{accountId}/ai-enabled
|
|
9233
|
+
* @secure
|
|
9234
|
+
* @response `204` `void` No Content
|
|
9235
|
+
* @response `404` `ProblemDetails` Not Found
|
|
9236
|
+
*/
|
|
9237
|
+
setAccountAiEnabled: (
|
|
9238
|
+
accountId: string,
|
|
9239
|
+
data: SetAiEnabledRequest,
|
|
9240
|
+
params: RequestParams = {},
|
|
9241
|
+
) =>
|
|
9242
|
+
this.request<void, ProblemDetails>({
|
|
9243
|
+
path: `/api/ai/superadmin/accounts/${accountId}/ai-enabled`,
|
|
9244
|
+
method: "PUT",
|
|
9245
|
+
body: data,
|
|
9246
|
+
secure: true,
|
|
9247
|
+
type: "application/json",
|
|
9248
|
+
...params,
|
|
9249
|
+
}),
|
|
9250
|
+
|
|
9149
9251
|
/**
|
|
9150
9252
|
* No description
|
|
9151
9253
|
*
|
|
@@ -11163,6 +11265,47 @@ export class Api<
|
|
|
11163
11265
|
...params,
|
|
11164
11266
|
}),
|
|
11165
11267
|
|
|
11268
|
+
/**
|
|
11269
|
+
* No description
|
|
11270
|
+
*
|
|
11271
|
+
* @tags Encompass Packages
|
|
11272
|
+
* @name GetLoanPackages
|
|
11273
|
+
* @request GET:/api/los/encompass/eclose/loans/{loanId}/packages
|
|
11274
|
+
* @secure
|
|
11275
|
+
* @response `200` `EncompassPackageList` OK
|
|
11276
|
+
* @response `400` `EncompassError` Bad Request
|
|
11277
|
+
* @response `401` `EncompassError` Unauthorized
|
|
11278
|
+
* @response `403` `EncompassError` Forbidden
|
|
11279
|
+
* @response `500` `EncompassError` Internal Server Error
|
|
11280
|
+
*/
|
|
11281
|
+
getLoanPackages: (
|
|
11282
|
+
loanId: string,
|
|
11283
|
+
query?: {
|
|
11284
|
+
status?: string;
|
|
11285
|
+
/**
|
|
11286
|
+
* @format int32
|
|
11287
|
+
* @default 1
|
|
11288
|
+
*/
|
|
11289
|
+
page?: number;
|
|
11290
|
+
/**
|
|
11291
|
+
* @format int32
|
|
11292
|
+
* @default 20
|
|
11293
|
+
*/
|
|
11294
|
+
pageSize?: number;
|
|
11295
|
+
sortBy?: string;
|
|
11296
|
+
sortDirection?: string;
|
|
11297
|
+
},
|
|
11298
|
+
params: RequestParams = {},
|
|
11299
|
+
) =>
|
|
11300
|
+
this.request<EncompassPackageList, EncompassError>({
|
|
11301
|
+
path: `/api/los/encompass/eclose/loans/${loanId}/packages`,
|
|
11302
|
+
method: "GET",
|
|
11303
|
+
query: query,
|
|
11304
|
+
secure: true,
|
|
11305
|
+
format: "json",
|
|
11306
|
+
...params,
|
|
11307
|
+
}),
|
|
11308
|
+
|
|
11166
11309
|
/**
|
|
11167
11310
|
* No description
|
|
11168
11311
|
*
|
|
@@ -12169,31 +12312,6 @@ export class Api<
|
|
|
12169
12312
|
...params,
|
|
12170
12313
|
}),
|
|
12171
12314
|
|
|
12172
|
-
/**
|
|
12173
|
-
* No description
|
|
12174
|
-
*
|
|
12175
|
-
* @tags LegacyLoan
|
|
12176
|
-
* @name CreateLegacyLoanDocument
|
|
12177
|
-
* @summary Create Document
|
|
12178
|
-
* @request POST:/api/los/loan/generatedocument
|
|
12179
|
-
* @deprecated
|
|
12180
|
-
* @secure
|
|
12181
|
-
* @response `200` `DocumentDataRequest` OK
|
|
12182
|
-
*/
|
|
12183
|
-
createLegacyLoanDocument: (
|
|
12184
|
-
data: GenerateDocumentRequest,
|
|
12185
|
-
params: RequestParams = {},
|
|
12186
|
-
) =>
|
|
12187
|
-
this.request<DocumentDataRequest, any>({
|
|
12188
|
-
path: `/api/los/loan/generatedocument`,
|
|
12189
|
-
method: "POST",
|
|
12190
|
-
body: data,
|
|
12191
|
-
secure: true,
|
|
12192
|
-
type: "application/json",
|
|
12193
|
-
format: "json",
|
|
12194
|
-
...params,
|
|
12195
|
-
}),
|
|
12196
|
-
|
|
12197
12315
|
/**
|
|
12198
12316
|
* No description
|
|
12199
12317
|
*
|
|
@@ -14543,30 +14661,6 @@ export class Api<
|
|
|
14543
14661
|
...params,
|
|
14544
14662
|
}),
|
|
14545
14663
|
|
|
14546
|
-
/**
|
|
14547
|
-
* No description
|
|
14548
|
-
*
|
|
14549
|
-
* @tags LoanTaskDocuments
|
|
14550
|
-
* @name CreateLoanTaskDocumentBucket
|
|
14551
|
-
* @summary Create Bucket
|
|
14552
|
-
* @request POST:/api/loans/{loanID}/tasks/{loanTaskId}/documents/bucket
|
|
14553
|
-
* @secure
|
|
14554
|
-
* @response `204` `UserLoanTask` No Content
|
|
14555
|
-
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
14556
|
-
*/
|
|
14557
|
-
createLoanTaskDocumentBucket: (
|
|
14558
|
-
loanId: string,
|
|
14559
|
-
loanTaskId: string,
|
|
14560
|
-
params: RequestParams = {},
|
|
14561
|
-
) =>
|
|
14562
|
-
this.request<UserLoanTask, UnprocessableEntity>({
|
|
14563
|
-
path: `/api/loans/${loanId}/tasks/${loanTaskId}/documents/bucket`,
|
|
14564
|
-
method: "POST",
|
|
14565
|
-
secure: true,
|
|
14566
|
-
format: "json",
|
|
14567
|
-
...params,
|
|
14568
|
-
}),
|
|
14569
|
-
|
|
14570
14664
|
/**
|
|
14571
14665
|
* No description
|
|
14572
14666
|
*
|
|
@@ -14576,16 +14670,21 @@ export class Api<
|
|
|
14576
14670
|
* @request POST:/api/loans/{loanID}/tasks/reminders/outstanding
|
|
14577
14671
|
* @secure
|
|
14578
14672
|
* @response `204` `void` No Content
|
|
14673
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
14579
14674
|
* @response `404` `ProblemDetails` Not Found
|
|
14675
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
14580
14676
|
*/
|
|
14581
14677
|
sendOutstandingLoanTaskNotification: (
|
|
14582
14678
|
loanId: string,
|
|
14679
|
+
data: SendOutstandingTaskReminderRequest,
|
|
14583
14680
|
params: RequestParams = {},
|
|
14584
14681
|
) =>
|
|
14585
14682
|
this.request<void, ProblemDetails>({
|
|
14586
14683
|
path: `/api/loans/${loanId}/tasks/reminders/outstanding`,
|
|
14587
14684
|
method: "POST",
|
|
14685
|
+
body: data,
|
|
14588
14686
|
secure: true,
|
|
14687
|
+
type: "application/json",
|
|
14589
14688
|
...params,
|
|
14590
14689
|
}),
|
|
14591
14690
|
|
|
@@ -15245,56 +15344,6 @@ export class Api<
|
|
|
15245
15344
|
...params,
|
|
15246
15345
|
}),
|
|
15247
15346
|
|
|
15248
|
-
/**
|
|
15249
|
-
* No description
|
|
15250
|
-
*
|
|
15251
|
-
* @tags Notifications
|
|
15252
|
-
* @name SendNotificationForLoan
|
|
15253
|
-
* @summary Send Notification for Loan
|
|
15254
|
-
* @request POST:/api/notifications
|
|
15255
|
-
* @deprecated
|
|
15256
|
-
* @secure
|
|
15257
|
-
* @response `200` `void` OK
|
|
15258
|
-
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
15259
|
-
*/
|
|
15260
|
-
sendNotificationForLoan: (
|
|
15261
|
-
data: SendNotificationForLoanRequest,
|
|
15262
|
-
params: RequestParams = {},
|
|
15263
|
-
) =>
|
|
15264
|
-
this.request<void, UnprocessableEntity>({
|
|
15265
|
-
path: `/api/notifications`,
|
|
15266
|
-
method: "POST",
|
|
15267
|
-
body: data,
|
|
15268
|
-
secure: true,
|
|
15269
|
-
type: "application/json",
|
|
15270
|
-
...params,
|
|
15271
|
-
}),
|
|
15272
|
-
|
|
15273
|
-
/**
|
|
15274
|
-
* No description
|
|
15275
|
-
*
|
|
15276
|
-
* @tags Notifications
|
|
15277
|
-
* @name SendTestNotificationForLoan
|
|
15278
|
-
* @summary Send Test Notification for Loan
|
|
15279
|
-
* @request POST:/api/notifications/test
|
|
15280
|
-
* @deprecated
|
|
15281
|
-
* @secure
|
|
15282
|
-
* @response `200` `void` OK
|
|
15283
|
-
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
15284
|
-
*/
|
|
15285
|
-
sendTestNotificationForLoan: (
|
|
15286
|
-
data: TestSendNotificationForLoanRequest,
|
|
15287
|
-
params: RequestParams = {},
|
|
15288
|
-
) =>
|
|
15289
|
-
this.request<void, UnprocessableEntity>({
|
|
15290
|
-
path: `/api/notifications/test`,
|
|
15291
|
-
method: "POST",
|
|
15292
|
-
body: data,
|
|
15293
|
-
secure: true,
|
|
15294
|
-
type: "application/json",
|
|
15295
|
-
...params,
|
|
15296
|
-
}),
|
|
15297
|
-
|
|
15298
15347
|
/**
|
|
15299
15348
|
* No description
|
|
15300
15349
|
*
|