@matech/thebigpos-sdk 3.28.0 → 3.29.0-dev-8593
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 +39 -0
- package/dist/index.cjs +6718 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +684 -538
- package/dist/index.js +96 -2
- package/dist/index.js.map +1 -1
- package/index.js +1 -1
- package/package.json +24 -10
- package/src/index.ts +248 -20
- package/.husky/pre-commit +0 -3
- package/scripts/apply-json-patch-content-type.js +0 -56
- package/tsconfig.json +0 -27
package/package.json
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matech/thebigpos-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0-dev-8593",
|
|
4
4
|
"description": "The Big POS Typescript SDK",
|
|
5
|
-
"main": "dist/index.
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"react-native": "dist/index.js",
|
|
6
8
|
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"src",
|
|
12
|
+
"index.js"
|
|
13
|
+
],
|
|
7
14
|
"scripts": {
|
|
8
|
-
"build": "rimraf dist && tsc",
|
|
9
|
-
"
|
|
15
|
+
"build": "rimraf dist && tsc && esbuild dist/index.js --format=cjs --platform=node --packages=external --sourcemap --outfile=dist/index.cjs",
|
|
16
|
+
"postbuild": "node -e \"if (typeof require('./').Api !== 'function') { console.error('Smoke check failed: the CommonJS entry does not export Api'); process.exit(1) }\"",
|
|
10
17
|
"browserify": "tsc && esbuild dist/index.js --bundle --minify --sourcemap --global-name=thebigpos --outfile=dist/thebigpos.min.js",
|
|
11
18
|
"prepare": "husky"
|
|
12
19
|
},
|
|
@@ -26,15 +33,22 @@
|
|
|
26
33
|
"url": "https://github.com/MortgageAutomationTechnologies/thebigpos-sdk-typescript/issues"
|
|
27
34
|
},
|
|
28
35
|
"homepage": "https://github.com/MortgageAutomationTechnologies/thebigpos-sdk-typescript#readme",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"axios": "^1"
|
|
31
41
|
},
|
|
32
42
|
"devDependencies": {
|
|
33
|
-
"
|
|
43
|
+
"axios": "^1.20.0",
|
|
44
|
+
"esbuild": "^0.28.1",
|
|
34
45
|
"husky": "^9.1.5",
|
|
35
|
-
"rimraf": "6.1.
|
|
36
|
-
"ts-node": "^10.9.2",
|
|
46
|
+
"rimraf": "6.1.4",
|
|
37
47
|
"typescript": "^5.5.4"
|
|
38
48
|
},
|
|
39
|
-
"
|
|
49
|
+
"resolutions": {
|
|
50
|
+
"brace-expansion": "^5.0.12",
|
|
51
|
+
"follow-redirects": "^1.16.1"
|
|
52
|
+
},
|
|
53
|
+
"swaggerSha256": "abd810870c9944c879fd04fcf3a53c70bd11aef85ad115d97b24f35f769b88e4"
|
|
40
54
|
}
|
package/src/index.ts
CHANGED
|
@@ -110,7 +110,13 @@ export type LosCredentialHealthStatus =
|
|
|
110
110
|
|
|
111
111
|
export type LogLevel = "None" | "Info" | "Warning" | "Error";
|
|
112
112
|
|
|
113
|
-
export type LoanType =
|
|
113
|
+
export type LoanType =
|
|
114
|
+
| "Fha"
|
|
115
|
+
| "Conventional"
|
|
116
|
+
| "UsdaRd"
|
|
117
|
+
| "Va"
|
|
118
|
+
| "Other"
|
|
119
|
+
| "Heloc";
|
|
114
120
|
|
|
115
121
|
export type LoanTrustType = "Living" | "Land" | "Testamentary" | "Other";
|
|
116
122
|
|
|
@@ -461,11 +467,7 @@ export type LoanDocumentType =
|
|
|
461
467
|
|
|
462
468
|
export type LoanDocumentFolderScope = "Any" | "Assigned" | "Unassigned";
|
|
463
469
|
|
|
464
|
-
export type LoanDocumentFolderPermissionLevel =
|
|
465
|
-
| "None"
|
|
466
|
-
| "Read"
|
|
467
|
-
| "Write"
|
|
468
|
-
| "Manage";
|
|
470
|
+
export type LoanDocumentFolderPermissionLevel = "None" | "Read" | "Write";
|
|
469
471
|
|
|
470
472
|
export type LoanCitizenship =
|
|
471
473
|
| "USCitizen"
|
|
@@ -825,6 +827,8 @@ export type AddressFamily =
|
|
|
825
827
|
| "ControllerAreaNetwork"
|
|
826
828
|
| "Unknown";
|
|
827
829
|
|
|
830
|
+
export type AccountPartnerStatus = "Active" | "Invited";
|
|
831
|
+
|
|
828
832
|
export type CanvasWidgetConfig = BaseCanvasWidgetConfig &
|
|
829
833
|
(
|
|
830
834
|
| BaseCanvasWidgetConfigTypeMapping<"Information", InformationWidgetConfig>
|
|
@@ -937,6 +941,32 @@ export interface AccountFailureCount {
|
|
|
937
941
|
count: number;
|
|
938
942
|
}
|
|
939
943
|
|
|
944
|
+
export interface AccountPartner {
|
|
945
|
+
/** @format uuid */
|
|
946
|
+
partnerProfileID?: string | null;
|
|
947
|
+
/** @format uuid */
|
|
948
|
+
partnerID?: string | null;
|
|
949
|
+
firstName: string;
|
|
950
|
+
lastName: string;
|
|
951
|
+
email: string;
|
|
952
|
+
phone?: string | null;
|
|
953
|
+
status: AccountPartnerStatusEnum;
|
|
954
|
+
tier: AccountPartnerTierEnum;
|
|
955
|
+
/** @format date-time */
|
|
956
|
+
createdAt: string;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
export interface AccountPartnerPaginated {
|
|
960
|
+
rows: AccountPartner[];
|
|
961
|
+
pagination: Pagination;
|
|
962
|
+
/** @format int64 */
|
|
963
|
+
count: number;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
export interface AccountPartnerSearchCriteria {
|
|
967
|
+
searchText?: string | null;
|
|
968
|
+
}
|
|
969
|
+
|
|
940
970
|
export interface AccountSettings {
|
|
941
971
|
isSmsEnabled: boolean;
|
|
942
972
|
smsNumber?: string | null;
|
|
@@ -4038,8 +4068,11 @@ export interface LoanApplicationRequest {
|
|
|
4038
4068
|
userID: string;
|
|
4039
4069
|
/** @format uuid */
|
|
4040
4070
|
siteConfigurationID: string;
|
|
4071
|
+
/** @format uuid */
|
|
4072
|
+
submissionKey?: string | null;
|
|
4041
4073
|
loanOfficerEmail?: string | null;
|
|
4042
4074
|
purpose?: LoanPurpose | null;
|
|
4075
|
+
type?: LoanType | null;
|
|
4043
4076
|
referrer?: string | null;
|
|
4044
4077
|
companyName?: string | null;
|
|
4045
4078
|
relationship?: BorrowerRelationship | null;
|
|
@@ -6324,6 +6357,17 @@ export interface MyPartner {
|
|
|
6324
6357
|
createdAt: string;
|
|
6325
6358
|
}
|
|
6326
6359
|
|
|
6360
|
+
export interface MyPartnerPaginated {
|
|
6361
|
+
rows: MyPartner[];
|
|
6362
|
+
pagination: Pagination;
|
|
6363
|
+
/** @format int64 */
|
|
6364
|
+
count: number;
|
|
6365
|
+
}
|
|
6366
|
+
|
|
6367
|
+
export interface MyPartnerSearchCriteria {
|
|
6368
|
+
searchText?: string | null;
|
|
6369
|
+
}
|
|
6370
|
+
|
|
6327
6371
|
export type MyTasksWidgetConfig = UtilRequiredKeys<
|
|
6328
6372
|
BaseCanvasWidgetConfig,
|
|
6329
6373
|
"type"
|
|
@@ -8223,6 +8267,13 @@ export interface UpdatePartnerPortalRequest {
|
|
|
8223
8267
|
isEnabled?: boolean | null;
|
|
8224
8268
|
}
|
|
8225
8269
|
|
|
8270
|
+
export interface UpdatePartnerRequest {
|
|
8271
|
+
firstName: string;
|
|
8272
|
+
lastName: string;
|
|
8273
|
+
email: string;
|
|
8274
|
+
phone?: string | null;
|
|
8275
|
+
}
|
|
8276
|
+
|
|
8226
8277
|
export interface UpdateUserGroupRequest {
|
|
8227
8278
|
name: string;
|
|
8228
8279
|
description?: string | null;
|
|
@@ -8826,6 +8877,10 @@ type BaseCanvasWidgetConfigTypeMapping<Key, Type> = {
|
|
|
8826
8877
|
|
|
8827
8878
|
export type AccountBillingRequestBillingTypeEnum = "ClosedLoan" | "LoanOfficer";
|
|
8828
8879
|
|
|
8880
|
+
export type AccountPartnerStatusEnum = "Active" | "Invited";
|
|
8881
|
+
|
|
8882
|
+
export type AccountPartnerTierEnum = "Lite" | "LitePlusPortal" | "Pending";
|
|
8883
|
+
|
|
8829
8884
|
export type AdminAccessUserMfaFactorEnum = "None" | "Sms" | "Email";
|
|
8830
8885
|
|
|
8831
8886
|
export type AiAccessReadAloudVoiceEnum =
|
|
@@ -9402,11 +9457,7 @@ export type LoanDocumentFolderPermissionRoleEnum =
|
|
|
9402
9457
|
| "SettlementAgent"
|
|
9403
9458
|
| "Admin";
|
|
9404
9459
|
|
|
9405
|
-
export type LoanDocumentFolderPermissionLevelEnum =
|
|
9406
|
-
| "None"
|
|
9407
|
-
| "Read"
|
|
9408
|
-
| "Write"
|
|
9409
|
-
| "Manage";
|
|
9460
|
+
export type LoanDocumentFolderPermissionLevelEnum = "None" | "Read" | "Write";
|
|
9410
9461
|
|
|
9411
9462
|
export type LoanDocumentFolderPermissionReadScopeEnum = "Own" | "All";
|
|
9412
9463
|
|
|
@@ -9428,8 +9479,7 @@ export type LoanDocumentFolderPermissionFilterRoleEnum =
|
|
|
9428
9479
|
export type LoanDocumentFolderPermissionFilterMinimumPermissionLevelEnum =
|
|
9429
9480
|
| "None"
|
|
9430
9481
|
| "Read"
|
|
9431
|
-
| "Write"
|
|
9432
|
-
| "Manage";
|
|
9482
|
+
| "Write";
|
|
9433
9483
|
|
|
9434
9484
|
export type LoanDocumentFolderPermissionRequestRoleEnum =
|
|
9435
9485
|
| "Borrower"
|
|
@@ -9449,16 +9499,14 @@ export type LoanDocumentFolderPermissionRequestRoleEnum =
|
|
|
9449
9499
|
export type LoanDocumentFolderPermissionRequestLevelEnum =
|
|
9450
9500
|
| "None"
|
|
9451
9501
|
| "Read"
|
|
9452
|
-
| "Write"
|
|
9453
|
-
| "Manage";
|
|
9502
|
+
| "Write";
|
|
9454
9503
|
|
|
9455
9504
|
export type LoanDocumentFolderPermissionRequestReadScopeEnum = "Own" | "All";
|
|
9456
9505
|
|
|
9457
9506
|
export type LoanDocumentFolderWithCountAccessLevelEnum =
|
|
9458
9507
|
| "None"
|
|
9459
9508
|
| "Read"
|
|
9460
|
-
| "Write"
|
|
9461
|
-
| "Manage";
|
|
9509
|
+
| "Write";
|
|
9462
9510
|
|
|
9463
9511
|
export type LoanFieldAccessRoleEnum =
|
|
9464
9512
|
| "Borrower"
|
|
@@ -10152,7 +10200,15 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
10152
10200
|
property instanceof Array ? property : [property];
|
|
10153
10201
|
|
|
10154
10202
|
for (const formItem of propertyContent) {
|
|
10155
|
-
|
|
10203
|
+
// React Native files are plain { uri, name, type } objects, not Blob/File.
|
|
10204
|
+
const isReactNativeFile =
|
|
10205
|
+
!!formItem &&
|
|
10206
|
+
typeof formItem === "object" &&
|
|
10207
|
+
"uri" in formItem &&
|
|
10208
|
+
"name" in formItem &&
|
|
10209
|
+
"type" in formItem;
|
|
10210
|
+
const isFileType =
|
|
10211
|
+
isReactNativeFile || formItem instanceof Blob || formItem instanceof File;
|
|
10156
10212
|
formData.append(
|
|
10157
10213
|
key,
|
|
10158
10214
|
isFileType ? formItem : this.stringifyFormItem(formItem),
|
|
@@ -10214,7 +10270,7 @@ export class HttpClient<SecurityDataType = unknown> {
|
|
|
10214
10270
|
|
|
10215
10271
|
/**
|
|
10216
10272
|
* @title The Big POS API
|
|
10217
|
-
* @version v3.
|
|
10273
|
+
* @version v3.29.0
|
|
10218
10274
|
* @termsOfService https://www.thebigpos.com/terms-of-use/
|
|
10219
10275
|
* @contact Mortgage Automation Technologies <support@thebigpos.com> (https://www.thebigpos.com/terms-of-use/)
|
|
10220
10276
|
*/
|
|
@@ -10346,6 +10402,141 @@ export class Api<
|
|
|
10346
10402
|
...params,
|
|
10347
10403
|
}),
|
|
10348
10404
|
|
|
10405
|
+
/**
|
|
10406
|
+
* @description Every partner of the caller's account: Realtors with an account and pending partners who have not signed up yet
|
|
10407
|
+
*
|
|
10408
|
+
* @tags AccountPartners
|
|
10409
|
+
* @name SearchAccountPartners
|
|
10410
|
+
* @summary Search Account Partners
|
|
10411
|
+
* @request POST:/api/account/partners/search
|
|
10412
|
+
* @secure
|
|
10413
|
+
* @response `200` `AccountPartnerPaginated` OK
|
|
10414
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
10415
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
10416
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
10417
|
+
*/
|
|
10418
|
+
searchAccountPartners: (
|
|
10419
|
+
data: AccountPartnerSearchCriteria,
|
|
10420
|
+
query?: {
|
|
10421
|
+
/** @format int32 */
|
|
10422
|
+
pageSize?: number;
|
|
10423
|
+
/** @format int32 */
|
|
10424
|
+
pageNumber?: number;
|
|
10425
|
+
sortBy?: string;
|
|
10426
|
+
sortDirection?: string;
|
|
10427
|
+
},
|
|
10428
|
+
params: RequestParams = {},
|
|
10429
|
+
) =>
|
|
10430
|
+
this.request<AccountPartnerPaginated, ProblemDetails>({
|
|
10431
|
+
path: `/api/account/partners/search`,
|
|
10432
|
+
method: "POST",
|
|
10433
|
+
query: query,
|
|
10434
|
+
body: data,
|
|
10435
|
+
secure: true,
|
|
10436
|
+
type: "application/json",
|
|
10437
|
+
format: "json",
|
|
10438
|
+
...params,
|
|
10439
|
+
}),
|
|
10440
|
+
|
|
10441
|
+
/**
|
|
10442
|
+
* @description Makes a settlement agent, by user ID or by an open invite's ID, a partner with no loan officer
|
|
10443
|
+
*
|
|
10444
|
+
* @tags AccountPartners
|
|
10445
|
+
* @name PromotePartner
|
|
10446
|
+
* @summary Promote To Partner
|
|
10447
|
+
* @request POST:/api/account/partners/promotions
|
|
10448
|
+
* @secure
|
|
10449
|
+
* @response `200` `PromotePartner` OK
|
|
10450
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
10451
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
10452
|
+
* @response `404` `ProblemDetails` Not Found
|
|
10453
|
+
* @response `409` `ProblemDetails` Conflict
|
|
10454
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
10455
|
+
*/
|
|
10456
|
+
promotePartner: (data: PromotePartnerRequest, params: RequestParams = {}) =>
|
|
10457
|
+
this.request<PromotePartner, ProblemDetails>({
|
|
10458
|
+
path: `/api/account/partners/promotions`,
|
|
10459
|
+
method: "POST",
|
|
10460
|
+
body: data,
|
|
10461
|
+
secure: true,
|
|
10462
|
+
type: "application/json",
|
|
10463
|
+
format: "json",
|
|
10464
|
+
...params,
|
|
10465
|
+
}),
|
|
10466
|
+
|
|
10467
|
+
/**
|
|
10468
|
+
* @description Changes a registered partner's name, sign-in email and phone
|
|
10469
|
+
*
|
|
10470
|
+
* @tags AccountPartners
|
|
10471
|
+
* @name ReplacePartner
|
|
10472
|
+
* @summary Replace Partner
|
|
10473
|
+
* @request PUT:/api/account/partners/{partnerProfileId}
|
|
10474
|
+
* @secure
|
|
10475
|
+
* @response `204` `void` No Content
|
|
10476
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
10477
|
+
* @response `404` `ProblemDetails` Not Found
|
|
10478
|
+
* @response `409` `ProblemDetails` Conflict
|
|
10479
|
+
* @response `422` `ProblemDetails` Unprocessable Content
|
|
10480
|
+
*/
|
|
10481
|
+
replacePartner: (
|
|
10482
|
+
partnerProfileId: string,
|
|
10483
|
+
data: UpdatePartnerRequest,
|
|
10484
|
+
params: RequestParams = {},
|
|
10485
|
+
) =>
|
|
10486
|
+
this.request<void, ProblemDetails>({
|
|
10487
|
+
path: `/api/account/partners/${partnerProfileId}`,
|
|
10488
|
+
method: "PUT",
|
|
10489
|
+
body: data,
|
|
10490
|
+
secure: true,
|
|
10491
|
+
type: "application/json",
|
|
10492
|
+
...params,
|
|
10493
|
+
}),
|
|
10494
|
+
|
|
10495
|
+
/**
|
|
10496
|
+
* @description Makes a registered partner a settlement agent again and retires their partner profile; their account and loans stay
|
|
10497
|
+
*
|
|
10498
|
+
* @tags AccountPartners
|
|
10499
|
+
* @name DemotePartner
|
|
10500
|
+
* @summary Demote Partner
|
|
10501
|
+
* @request POST:/api/account/partners/{partnerProfileId}/demote
|
|
10502
|
+
* @secure
|
|
10503
|
+
* @response `204` `void` No Content
|
|
10504
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
10505
|
+
* @response `404` `ProblemDetails` Not Found
|
|
10506
|
+
* @response `409` `ProblemDetails` Conflict
|
|
10507
|
+
*/
|
|
10508
|
+
demotePartner: (partnerProfileId: string, params: RequestParams = {}) =>
|
|
10509
|
+
this.request<void, ProblemDetails>({
|
|
10510
|
+
path: `/api/account/partners/${partnerProfileId}/demote`,
|
|
10511
|
+
method: "POST",
|
|
10512
|
+
secure: true,
|
|
10513
|
+
...params,
|
|
10514
|
+
}),
|
|
10515
|
+
|
|
10516
|
+
/**
|
|
10517
|
+
* @description Cancels a pending partner's invites and retires their partner profile; inviting the email again restores it
|
|
10518
|
+
*
|
|
10519
|
+
* @tags AccountPartners
|
|
10520
|
+
* @name CancelPartnerInvite
|
|
10521
|
+
* @summary Cancel Partner Invite
|
|
10522
|
+
* @request POST:/api/account/partners/{partnerProfileId}/cancel
|
|
10523
|
+
* @secure
|
|
10524
|
+
* @response `204` `void` No Content
|
|
10525
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
10526
|
+
* @response `404` `ProblemDetails` Not Found
|
|
10527
|
+
* @response `409` `ProblemDetails` Conflict
|
|
10528
|
+
*/
|
|
10529
|
+
cancelPartnerInvite: (
|
|
10530
|
+
partnerProfileId: string,
|
|
10531
|
+
params: RequestParams = {},
|
|
10532
|
+
) =>
|
|
10533
|
+
this.request<void, ProblemDetails>({
|
|
10534
|
+
path: `/api/account/partners/${partnerProfileId}/cancel`,
|
|
10535
|
+
method: "POST",
|
|
10536
|
+
secure: true,
|
|
10537
|
+
...params,
|
|
10538
|
+
}),
|
|
10539
|
+
|
|
10349
10540
|
/**
|
|
10350
10541
|
* No description
|
|
10351
10542
|
*
|
|
@@ -15634,6 +15825,7 @@ export class Api<
|
|
|
15634
15825
|
* @request POST:/api/los/loan/application/internal
|
|
15635
15826
|
* @secure
|
|
15636
15827
|
* @response `200` `string` OK
|
|
15828
|
+
* @response `409` `ProblemDetails` Conflict
|
|
15637
15829
|
* @response `422` `UnprocessableEntity` Unprocessable Content
|
|
15638
15830
|
* @response `423` `UnprocessableEntity` Locked
|
|
15639
15831
|
*/
|
|
@@ -15645,7 +15837,7 @@ export class Api<
|
|
|
15645
15837
|
},
|
|
15646
15838
|
params: RequestParams = {},
|
|
15647
15839
|
) =>
|
|
15648
|
-
this.request<string, UnprocessableEntity>({
|
|
15840
|
+
this.request<string, ProblemDetails | UnprocessableEntity>({
|
|
15649
15841
|
path: `/api/los/loan/application/internal`,
|
|
15650
15842
|
method: "POST",
|
|
15651
15843
|
query: query,
|
|
@@ -18390,6 +18582,7 @@ export class Api<
|
|
|
18390
18582
|
* @response `401` `ProblemDetails` Unauthorized
|
|
18391
18583
|
* @response `403` `ProblemDetails` Forbidden
|
|
18392
18584
|
* @response `404` `ProblemDetails` Not Found
|
|
18585
|
+
* @response `409` `ProblemDetails` Conflict
|
|
18393
18586
|
*/
|
|
18394
18587
|
createLoanv3: (
|
|
18395
18588
|
data: LoanApplicationRequest,
|
|
@@ -23123,6 +23316,41 @@ export class Api<
|
|
|
23123
23316
|
...params,
|
|
23124
23317
|
}),
|
|
23125
23318
|
|
|
23319
|
+
/**
|
|
23320
|
+
* @description Searches the rows getMyPartners returns by first name, last name, full name or email, and pages them. Sorts by firstName, lastName, email, tier or createdAt when both sortBy and sortDirection are given, else newest first
|
|
23321
|
+
*
|
|
23322
|
+
* @tags UsersMe
|
|
23323
|
+
* @name SearchMyPartners
|
|
23324
|
+
* @summary Search My Partners
|
|
23325
|
+
* @request POST:/api/users/me/partners/search
|
|
23326
|
+
* @secure
|
|
23327
|
+
* @response `200` `MyPartnerPaginated` OK
|
|
23328
|
+
* @response `400` `ProblemDetails` Bad Request
|
|
23329
|
+
* @response `403` `ProblemDetails` Forbidden
|
|
23330
|
+
*/
|
|
23331
|
+
searchMyPartners: (
|
|
23332
|
+
data: MyPartnerSearchCriteria,
|
|
23333
|
+
query?: {
|
|
23334
|
+
/** @format int32 */
|
|
23335
|
+
pageSize?: number;
|
|
23336
|
+
/** @format int32 */
|
|
23337
|
+
pageNumber?: number;
|
|
23338
|
+
sortBy?: string;
|
|
23339
|
+
sortDirection?: string;
|
|
23340
|
+
},
|
|
23341
|
+
params: RequestParams = {},
|
|
23342
|
+
) =>
|
|
23343
|
+
this.request<MyPartnerPaginated, ProblemDetails>({
|
|
23344
|
+
path: `/api/users/me/partners/search`,
|
|
23345
|
+
method: "POST",
|
|
23346
|
+
query: query,
|
|
23347
|
+
body: data,
|
|
23348
|
+
secure: true,
|
|
23349
|
+
type: "application/json",
|
|
23350
|
+
format: "json",
|
|
23351
|
+
...params,
|
|
23352
|
+
}),
|
|
23353
|
+
|
|
23126
23354
|
/**
|
|
23127
23355
|
* @description Adds a partner, by partner profile ID, to the loan officer's list; a pending partner can be added too
|
|
23128
23356
|
*
|
package/.husky/pre-commit
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
This script is meant to run after the SDK has been generated.
|
|
3
|
-
|
|
4
|
-
- It updates the generated code to ensure that all PATCH methods use ContentType.JsonPatch.
|
|
5
|
-
- It also ensures that the ContentType enum includes JsonPatch and modifies the Operation interface
|
|
6
|
-
to allow any value for the `value` property instead of just object or null.
|
|
7
|
-
|
|
8
|
-
This is necessary because the SDK generation does not currently handle these cases correctly.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
const fs = require('fs')
|
|
12
|
-
|
|
13
|
-
const path = require('path').resolve(__dirname, '../src/index.ts')
|
|
14
|
-
|
|
15
|
-
if (!fs.existsSync(path)) {
|
|
16
|
-
console.error(`Error: File not found at path "${path}". Please ensure the SDK has been generated.`)
|
|
17
|
-
process.exit(1)
|
|
18
|
-
}
|
|
19
|
-
let content
|
|
20
|
-
try {
|
|
21
|
-
content = fs.readFileSync(path, 'utf8')
|
|
22
|
-
} catch (err) {
|
|
23
|
-
console.error(`Error: Unable to read file at path "${path}". Details: ${err.message}`)
|
|
24
|
-
process.exit(1)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Update PATCH methods to use ContentType.JsonPatch
|
|
28
|
-
content = content.replace(
|
|
29
|
-
/(method:\s*"PATCH"[\s\S]+?)type:\s*ContentType\.Json/g,
|
|
30
|
-
(match) => match.replace('ContentType.Json', 'ContentType.JsonPatch')
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
// Ensure JsonPatch is included in the ContentType enum
|
|
34
|
-
content = content.replace(
|
|
35
|
-
/export enum ContentType\s*{([\s\S]*?)}/,
|
|
36
|
-
(match, enumBody) => {
|
|
37
|
-
if (enumBody.includes('JsonPatch')) return match
|
|
38
|
-
const insertion = ` JsonPatch = "application/json-patch+json",\n `
|
|
39
|
-
return `export enum ContentType {\n${insertion}${enumBody.trim()}\n}`
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
// Fix the Operation interface to allow any value
|
|
44
|
-
content = content.replace(
|
|
45
|
-
/export interface Operation\s*{([\s\S]*?)}/,
|
|
46
|
-
(match, body) => {
|
|
47
|
-
const updated = body.replace(
|
|
48
|
-
/value\?:\s*object\s*\|?\s*null?;/,
|
|
49
|
-
'value?: string | number | boolean | null | object;'
|
|
50
|
-
)
|
|
51
|
-
return `export interface Operation {\n ${updated.trim()}\n}`
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
fs.writeFileSync(path, content)
|
|
56
|
-
console.log('SDK patch complete: All PATCH methods now use ContentType.JsonPatch.')
|
package/tsconfig.json
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es6",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"allowJs": true,
|
|
6
|
-
"sourceMap": true,
|
|
7
|
-
"outDir": "./dist",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"moduleResolution": "node",
|
|
10
|
-
"baseUrl": "./",
|
|
11
|
-
"declaration": true,
|
|
12
|
-
"paths": {
|
|
13
|
-
"*": [
|
|
14
|
-
"node_modules/*"
|
|
15
|
-
]
|
|
16
|
-
},
|
|
17
|
-
"typeRoots": [
|
|
18
|
-
"./node_modules/@types"
|
|
19
|
-
],
|
|
20
|
-
"esModuleInterop": true,
|
|
21
|
-
"skipLibCheck": true,
|
|
22
|
-
"forceConsistentCasingInFileNames": true,
|
|
23
|
-
"resolveJsonModule": true
|
|
24
|
-
},
|
|
25
|
-
"include": ["./src/**/*"],
|
|
26
|
-
"exclude": ["./dist"]
|
|
27
|
-
}
|