@securelend/sdk 0.1.0-beta.5
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/LICENSE +21 -0
- package/README.md +169 -0
- package/dist/index.d.mts +81 -0
- package/dist/index.d.ts +81 -0
- package/dist/index.js +1004 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +942 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types/index.d.mts +5826 -0
- package/dist/types/index.d.ts +5826 -0
- package/dist/types/index.js +631 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +577 -0
- package/dist/types/index.mjs.map +1 -0
- package/package.json +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 SecureLend, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# @securelend/sdk
|
|
2
|
+
|
|
3
|
+
Official SecureLend SDK for JavaScript and TypeScript.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @securelend/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { SecureLend } from "@securelend/sdk";
|
|
15
|
+
|
|
16
|
+
const securelend = new SecureLend("sk_test_...");
|
|
17
|
+
|
|
18
|
+
// Compare business loans
|
|
19
|
+
const loans = await securelend.loans.compare({
|
|
20
|
+
amount: 200000,
|
|
21
|
+
purpose: "equipment",
|
|
22
|
+
business: {
|
|
23
|
+
revenue: 1200000,
|
|
24
|
+
creditScore: 720,
|
|
25
|
+
timeInBusiness: 36,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
console.log(`Found ${loans.summary.totalOffers} offers`);
|
|
30
|
+
console.log(`Best rate: ${loans.offers[0].terms.interestRate.rate}%`);
|
|
31
|
+
|
|
32
|
+
// Compare business banking
|
|
33
|
+
const banking = await securelend.banking.compare({
|
|
34
|
+
accountType: "checking",
|
|
35
|
+
monthlyRevenue: 100000,
|
|
36
|
+
monthlyTransactions: 500,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Compare business credit cards
|
|
40
|
+
const cards = await securelend.creditCards.compare({
|
|
41
|
+
creditScore: 720,
|
|
42
|
+
monthlySpend: 15000,
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Documentation
|
|
47
|
+
|
|
48
|
+
- [Full Documentation](https://docs.securelend.ai)
|
|
49
|
+
- [API Reference](https://docs.securelend.ai/api)
|
|
50
|
+
- [Guides](https://docs.securelend.ai/guides)
|
|
51
|
+
|
|
52
|
+
## Features
|
|
53
|
+
|
|
54
|
+
- ✅ **AI Native** - Built on the Model Context Protocol for seamless integration with AI applications.
|
|
55
|
+
- ✅ **Business Loans** - Compare term loans, SBA loans, lines of credit
|
|
56
|
+
- ✅ **Business Banking** - Compare checking, savings, money market accounts
|
|
57
|
+
- ✅ **Business Credit Cards** - Compare rewards, cashback, and travel cards
|
|
58
|
+
- ✅ **Insurance** (coming soon) - Compare business insurance policies
|
|
59
|
+
- ✅ **TypeScript** - Full type safety with TypeScript definitions
|
|
60
|
+
- ✅ **React Hooks** - Available in `@securelend/react`
|
|
61
|
+
- ✅ **Error Handling** - Comprehensive error types
|
|
62
|
+
- ✅ **Widgets** - Supports interactive UI widgets from the MCP server.
|
|
63
|
+
|
|
64
|
+
## Usage
|
|
65
|
+
|
|
66
|
+
### Initialize Client
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { SecureLend } from "@securelend/sdk";
|
|
70
|
+
|
|
71
|
+
const securelend = new SecureLend("sk_test_...", {
|
|
72
|
+
mcpURL: "https://mcp.securelend.ai/sse", // Optional
|
|
73
|
+
});
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Compare Loans
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
const result = await securelend.loans.compare({
|
|
80
|
+
amount: 200000,
|
|
81
|
+
purpose: "working_capital",
|
|
82
|
+
business: {
|
|
83
|
+
revenue: 1200000,
|
|
84
|
+
creditScore: 720,
|
|
85
|
+
timeInBusiness: 36,
|
|
86
|
+
industry: "Retail",
|
|
87
|
+
entityType: "llc",
|
|
88
|
+
},
|
|
89
|
+
termPreferenceMonths: 60,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Access best offer
|
|
93
|
+
const bestOffer = result.offers[0];
|
|
94
|
+
console.log(bestOffer.lender.name);
|
|
95
|
+
console.log(bestOffer.terms.interestRate.rate);
|
|
96
|
+
console.log(bestOffer.matching.approvalProbability);
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Calculate Loan Payment
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
const calculation = await securelend.loans.calculate({
|
|
103
|
+
amount: 200000,
|
|
104
|
+
rate: 8.5,
|
|
105
|
+
termMonths: 60,
|
|
106
|
+
fees: {
|
|
107
|
+
origination: 2000,
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
console.log(`Monthly payment: $${calculation.monthlyPayment}`);
|
|
112
|
+
console.log(`Total interest: $${calculation.totalInterest}`);
|
|
113
|
+
console.log(`APR: ${calculation.apr}%`);
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Error Handling
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
import {
|
|
120
|
+
SecureLendError,
|
|
121
|
+
AuthenticationError,
|
|
122
|
+
RateLimitError
|
|
123
|
+
} from '@securelend/sdk';
|
|
124
|
+
|
|
125
|
+
try {
|
|
126
|
+
// Connection can fail, or tool calls can fail
|
|
127
|
+
const loans = await securelend.loans.compare({...});
|
|
128
|
+
} catch (error) {
|
|
129
|
+
if (error instanceof AuthenticationError) {
|
|
130
|
+
console.error('Invalid API key');
|
|
131
|
+
} else if (error instanceof RateLimitError) {
|
|
132
|
+
console.error('Rate limit exceeded, retry after:', error.retryAfter);
|
|
133
|
+
} else if (error instanceof SecureLendError) {
|
|
134
|
+
console.error('SecureLend error:', error.message);
|
|
135
|
+
console.error('Error type:', error.type);
|
|
136
|
+
} else {
|
|
137
|
+
console.error('Unexpected error:', error);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## TypeScript Support
|
|
143
|
+
|
|
144
|
+
This package includes TypeScript definitions:
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
import type {
|
|
148
|
+
LoanOffer,
|
|
149
|
+
BankingAccount,
|
|
150
|
+
CreditCardOffer,
|
|
151
|
+
BusinessProfile,
|
|
152
|
+
} from "@securelend/sdk";
|
|
153
|
+
|
|
154
|
+
const business: BusinessProfile = {
|
|
155
|
+
basic: {
|
|
156
|
+
legalName: "Acme Corp",
|
|
157
|
+
entityType: "llc",
|
|
158
|
+
},
|
|
159
|
+
financials: {
|
|
160
|
+
revenue: {
|
|
161
|
+
annual: { amount: 1200000 },
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## License
|
|
168
|
+
|
|
169
|
+
MIT
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
2
|
+
import { SecureLendConfig, PersonalLoanSearchParams, LoanComparisonResponse, BusinessLoanSearchParams, MortgageSearchParams, AutoLoanSearchParams, StudentLoanSearchParams, BusinessBankingSearchSchema, BusinessBankingComparisonResponse, PersonalBankingSearchSchema, PersonalBankingComparisonResponse, SavingsSearchSchema, SavingsAccountComparisonResponse, BusinessCreditCardSearchParams, BusinessCreditCardComparisonResponse, PersonalCreditCardSearchSchema, PersonalCreditCardComparisonResponse, LoanPaymentParams, LoanCalculationResponse, MortgagePaymentParams, MortgageCalculationResponse, LeaseVsPurchaseParams, LeaseVsPurchaseResponse, GetOfferParams, PersonalApplication, GetMultipleOffersParams, DisplayOfferFormParams, DisplayOfferFormResponse, TrackOfferStatusParams, TrackOfferStatusResponse, DisplayUploadDocumentsFormParams, DisplayUploadDocumentsFormResponse, SubmitDocumentsParams, SubmitDocumentsResponse } from './types/index.mjs';
|
|
3
|
+
export { Application, ApplicationProvider, ApplicationStatus, ApplicationType, AutoLenderAdapter, BankAccountOffer, BasisPoints, BusinessApplicant, BusinessApplication, BusinessBankingAdapter, BusinessBankingOffer, BusinessCreditCardAdapter, BusinessCreditCardOffer, BusinessLenderAdapter, CreateBusinessApplicationDTO, CreatePersonalApplicationDTO, CreditCardOffer, CreditTier, DateString, DocumentType, GenericApplication, Lender, LenderSearchCriteria, LoanOffer, Money, MortgageLenderAdapter, Percentage, PersonalApplicant, PersonalBankingAdapter, PersonalBankingOffer, PersonalCreditCardAdapter, PersonalCreditCardOffer, PersonalLenderAdapter, ProductType, ProviderStatus, SavingsAdapter, SavingsOffer, StudentLenderAdapter, anyOfferSchema, applicationProviderSchema, autoLoanSearchSchema, bankAccountOfferSchema, businessApplicantSchema, businessBankingComparisonResponseSchema, businessBankingOfferSchema, businessBankingSearchSchema, businessCreditCardComparisonResponseSchema, businessCreditCardOfferSchema, businessCreditCardSearchSchema, businessLoanSearchSchema, createBusinessApplicationSchema, createPersonalApplicationSchema, creditCardOfferSchema, displayOfferFormResponseSchema, displayOfferFormSchema, displayUploadDocumentsFormResponseSchema, displayUploadDocumentsFormSchema, documentTypeEnum, getMultipleOffersSchema, getOfferSchema, leaseVsPurchaseResponseSchema, leaseVsPurchaseSchema, loanComparisonResponseSchema, loanOfferSchema, loanPaymentResponseSchema, loanPaymentSchema, mortgagePaymentResponseSchema, mortgagePaymentSchema, mortgageSearchSchema, personalApplicantSchema, personalApplicationSchema, personalBankingComparisonResponseSchema, personalBankingOfferSchema, personalBankingSearchSchema, personalCreditCardComparisonResponseSchema, personalCreditCardOfferSchema, personalCreditCardSearchSchema, personalLoanSearchSchema, savingsComparisonResponseSchema, savingsOfferSchema, savingsSearchSchema, studentLoanSearchSchema, submitDocumentsResponseSchema, submitDocumentsSchema, trackOfferStatusResponseSchema, trackOfferStatusSchema } from './types/index.mjs';
|
|
4
|
+
import 'zod';
|
|
5
|
+
|
|
6
|
+
interface MCPClientConfig {
|
|
7
|
+
apiKey: string;
|
|
8
|
+
mcpURL: string;
|
|
9
|
+
}
|
|
10
|
+
declare class MCPClient {
|
|
11
|
+
mcp: Client;
|
|
12
|
+
private config;
|
|
13
|
+
private debug;
|
|
14
|
+
private isConnected;
|
|
15
|
+
constructor(config: MCPClientConfig);
|
|
16
|
+
connect(): Promise<void>;
|
|
17
|
+
callTool(name: string, args: Record<string, any>): Promise<any>;
|
|
18
|
+
setApiKey(apiKey: string): void;
|
|
19
|
+
enableDebug(): void;
|
|
20
|
+
disableDebug(): void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare class SecureLend {
|
|
24
|
+
private mcpClient;
|
|
25
|
+
readonly mcp: MCPClient["mcp"];
|
|
26
|
+
constructor(config?: SecureLendConfig);
|
|
27
|
+
comparePersonalLoans(request: PersonalLoanSearchParams): Promise<LoanComparisonResponse>;
|
|
28
|
+
compareBusinessLoans(request: BusinessLoanSearchParams): Promise<LoanComparisonResponse>;
|
|
29
|
+
comparePersonalMortgages(request: MortgageSearchParams): Promise<LoanComparisonResponse>;
|
|
30
|
+
compareBusinessMortgages(request: MortgageSearchParams): Promise<LoanComparisonResponse>;
|
|
31
|
+
compareCarLoans(request: AutoLoanSearchParams): Promise<LoanComparisonResponse>;
|
|
32
|
+
compareStudentLoans(request: StudentLoanSearchParams): Promise<LoanComparisonResponse>;
|
|
33
|
+
compareBusinessBanking(request: BusinessBankingSearchSchema): Promise<BusinessBankingComparisonResponse>;
|
|
34
|
+
comparePersonalBanking(request: PersonalBankingSearchSchema): Promise<PersonalBankingComparisonResponse>;
|
|
35
|
+
compareSavingsAccounts(request: SavingsSearchSchema): Promise<SavingsAccountComparisonResponse>;
|
|
36
|
+
compareBusinessCreditCards(request: BusinessCreditCardSearchParams): Promise<BusinessCreditCardComparisonResponse>;
|
|
37
|
+
comparePersonalCreditCards(request: PersonalCreditCardSearchSchema): Promise<PersonalCreditCardComparisonResponse>;
|
|
38
|
+
calculateLoanPayment(request: LoanPaymentParams): Promise<LoanCalculationResponse>;
|
|
39
|
+
calculateMortgagePayment(request: MortgagePaymentParams): Promise<MortgageCalculationResponse>;
|
|
40
|
+
compareLeaseVsPurchase(request: LeaseVsPurchaseParams): Promise<LeaseVsPurchaseResponse>;
|
|
41
|
+
getOffer(request: GetOfferParams): Promise<PersonalApplication>;
|
|
42
|
+
getMultipleOffers(request: GetMultipleOffersParams): Promise<PersonalApplication>;
|
|
43
|
+
displayOfferForm(request: DisplayOfferFormParams): Promise<DisplayOfferFormResponse>;
|
|
44
|
+
trackOfferStatus(request: TrackOfferStatusParams): Promise<TrackOfferStatusResponse>;
|
|
45
|
+
displayUploadDocumentsForm(request: DisplayUploadDocumentsFormParams): Promise<DisplayUploadDocumentsFormResponse>;
|
|
46
|
+
submitDocuments(request: SubmitDocumentsParams): Promise<SubmitDocumentsResponse>;
|
|
47
|
+
connect(): Promise<void>;
|
|
48
|
+
enableDebug(): void;
|
|
49
|
+
disableDebug(): void;
|
|
50
|
+
setApiKey(apiKey: string): void;
|
|
51
|
+
private callTool;
|
|
52
|
+
private parseJsonResponse;
|
|
53
|
+
private getWidget;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare class SecureLendError extends Error {
|
|
57
|
+
readonly type: string;
|
|
58
|
+
readonly details?: unknown;
|
|
59
|
+
constructor(message: string, type: string, details?: unknown);
|
|
60
|
+
}
|
|
61
|
+
declare class AuthenticationError extends SecureLendError {
|
|
62
|
+
constructor(message: string);
|
|
63
|
+
}
|
|
64
|
+
declare class RateLimitError extends SecureLendError {
|
|
65
|
+
readonly retryAfter?: number;
|
|
66
|
+
constructor(message: string, retryAfter?: number);
|
|
67
|
+
}
|
|
68
|
+
declare class ValidationError extends SecureLendError {
|
|
69
|
+
constructor(message: string, errors?: unknown);
|
|
70
|
+
}
|
|
71
|
+
declare class NotFoundError extends SecureLendError {
|
|
72
|
+
constructor(message: string);
|
|
73
|
+
}
|
|
74
|
+
declare class NetworkError extends SecureLendError {
|
|
75
|
+
constructor(message: string);
|
|
76
|
+
}
|
|
77
|
+
declare class ServerError extends SecureLendError {
|
|
78
|
+
constructor(message: string);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { AuthenticationError, AutoLoanSearchParams, BusinessBankingComparisonResponse, BusinessBankingSearchSchema, BusinessCreditCardComparisonResponse, BusinessCreditCardSearchParams, BusinessLoanSearchParams, DisplayOfferFormParams, DisplayOfferFormResponse, DisplayUploadDocumentsFormParams, DisplayUploadDocumentsFormResponse, GetMultipleOffersParams, GetOfferParams, LeaseVsPurchaseParams, LeaseVsPurchaseResponse, LoanCalculationResponse, LoanComparisonResponse, LoanPaymentParams, MortgageCalculationResponse, MortgagePaymentParams, MortgageSearchParams, NetworkError, NotFoundError, PersonalApplication, PersonalBankingComparisonResponse, PersonalBankingSearchSchema, PersonalCreditCardComparisonResponse, PersonalCreditCardSearchSchema, PersonalLoanSearchParams, RateLimitError, SavingsAccountComparisonResponse, SavingsSearchSchema, SecureLend, SecureLendConfig, SecureLendError, ServerError, StudentLoanSearchParams, SubmitDocumentsParams, SubmitDocumentsResponse, TrackOfferStatusParams, TrackOfferStatusResponse, ValidationError };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
2
|
+
import { SecureLendConfig, PersonalLoanSearchParams, LoanComparisonResponse, BusinessLoanSearchParams, MortgageSearchParams, AutoLoanSearchParams, StudentLoanSearchParams, BusinessBankingSearchSchema, BusinessBankingComparisonResponse, PersonalBankingSearchSchema, PersonalBankingComparisonResponse, SavingsSearchSchema, SavingsAccountComparisonResponse, BusinessCreditCardSearchParams, BusinessCreditCardComparisonResponse, PersonalCreditCardSearchSchema, PersonalCreditCardComparisonResponse, LoanPaymentParams, LoanCalculationResponse, MortgagePaymentParams, MortgageCalculationResponse, LeaseVsPurchaseParams, LeaseVsPurchaseResponse, GetOfferParams, PersonalApplication, GetMultipleOffersParams, DisplayOfferFormParams, DisplayOfferFormResponse, TrackOfferStatusParams, TrackOfferStatusResponse, DisplayUploadDocumentsFormParams, DisplayUploadDocumentsFormResponse, SubmitDocumentsParams, SubmitDocumentsResponse } from './types/index.js';
|
|
3
|
+
export { Application, ApplicationProvider, ApplicationStatus, ApplicationType, AutoLenderAdapter, BankAccountOffer, BasisPoints, BusinessApplicant, BusinessApplication, BusinessBankingAdapter, BusinessBankingOffer, BusinessCreditCardAdapter, BusinessCreditCardOffer, BusinessLenderAdapter, CreateBusinessApplicationDTO, CreatePersonalApplicationDTO, CreditCardOffer, CreditTier, DateString, DocumentType, GenericApplication, Lender, LenderSearchCriteria, LoanOffer, Money, MortgageLenderAdapter, Percentage, PersonalApplicant, PersonalBankingAdapter, PersonalBankingOffer, PersonalCreditCardAdapter, PersonalCreditCardOffer, PersonalLenderAdapter, ProductType, ProviderStatus, SavingsAdapter, SavingsOffer, StudentLenderAdapter, anyOfferSchema, applicationProviderSchema, autoLoanSearchSchema, bankAccountOfferSchema, businessApplicantSchema, businessBankingComparisonResponseSchema, businessBankingOfferSchema, businessBankingSearchSchema, businessCreditCardComparisonResponseSchema, businessCreditCardOfferSchema, businessCreditCardSearchSchema, businessLoanSearchSchema, createBusinessApplicationSchema, createPersonalApplicationSchema, creditCardOfferSchema, displayOfferFormResponseSchema, displayOfferFormSchema, displayUploadDocumentsFormResponseSchema, displayUploadDocumentsFormSchema, documentTypeEnum, getMultipleOffersSchema, getOfferSchema, leaseVsPurchaseResponseSchema, leaseVsPurchaseSchema, loanComparisonResponseSchema, loanOfferSchema, loanPaymentResponseSchema, loanPaymentSchema, mortgagePaymentResponseSchema, mortgagePaymentSchema, mortgageSearchSchema, personalApplicantSchema, personalApplicationSchema, personalBankingComparisonResponseSchema, personalBankingOfferSchema, personalBankingSearchSchema, personalCreditCardComparisonResponseSchema, personalCreditCardOfferSchema, personalCreditCardSearchSchema, personalLoanSearchSchema, savingsComparisonResponseSchema, savingsOfferSchema, savingsSearchSchema, studentLoanSearchSchema, submitDocumentsResponseSchema, submitDocumentsSchema, trackOfferStatusResponseSchema, trackOfferStatusSchema } from './types/index.js';
|
|
4
|
+
import 'zod';
|
|
5
|
+
|
|
6
|
+
interface MCPClientConfig {
|
|
7
|
+
apiKey: string;
|
|
8
|
+
mcpURL: string;
|
|
9
|
+
}
|
|
10
|
+
declare class MCPClient {
|
|
11
|
+
mcp: Client;
|
|
12
|
+
private config;
|
|
13
|
+
private debug;
|
|
14
|
+
private isConnected;
|
|
15
|
+
constructor(config: MCPClientConfig);
|
|
16
|
+
connect(): Promise<void>;
|
|
17
|
+
callTool(name: string, args: Record<string, any>): Promise<any>;
|
|
18
|
+
setApiKey(apiKey: string): void;
|
|
19
|
+
enableDebug(): void;
|
|
20
|
+
disableDebug(): void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare class SecureLend {
|
|
24
|
+
private mcpClient;
|
|
25
|
+
readonly mcp: MCPClient["mcp"];
|
|
26
|
+
constructor(config?: SecureLendConfig);
|
|
27
|
+
comparePersonalLoans(request: PersonalLoanSearchParams): Promise<LoanComparisonResponse>;
|
|
28
|
+
compareBusinessLoans(request: BusinessLoanSearchParams): Promise<LoanComparisonResponse>;
|
|
29
|
+
comparePersonalMortgages(request: MortgageSearchParams): Promise<LoanComparisonResponse>;
|
|
30
|
+
compareBusinessMortgages(request: MortgageSearchParams): Promise<LoanComparisonResponse>;
|
|
31
|
+
compareCarLoans(request: AutoLoanSearchParams): Promise<LoanComparisonResponse>;
|
|
32
|
+
compareStudentLoans(request: StudentLoanSearchParams): Promise<LoanComparisonResponse>;
|
|
33
|
+
compareBusinessBanking(request: BusinessBankingSearchSchema): Promise<BusinessBankingComparisonResponse>;
|
|
34
|
+
comparePersonalBanking(request: PersonalBankingSearchSchema): Promise<PersonalBankingComparisonResponse>;
|
|
35
|
+
compareSavingsAccounts(request: SavingsSearchSchema): Promise<SavingsAccountComparisonResponse>;
|
|
36
|
+
compareBusinessCreditCards(request: BusinessCreditCardSearchParams): Promise<BusinessCreditCardComparisonResponse>;
|
|
37
|
+
comparePersonalCreditCards(request: PersonalCreditCardSearchSchema): Promise<PersonalCreditCardComparisonResponse>;
|
|
38
|
+
calculateLoanPayment(request: LoanPaymentParams): Promise<LoanCalculationResponse>;
|
|
39
|
+
calculateMortgagePayment(request: MortgagePaymentParams): Promise<MortgageCalculationResponse>;
|
|
40
|
+
compareLeaseVsPurchase(request: LeaseVsPurchaseParams): Promise<LeaseVsPurchaseResponse>;
|
|
41
|
+
getOffer(request: GetOfferParams): Promise<PersonalApplication>;
|
|
42
|
+
getMultipleOffers(request: GetMultipleOffersParams): Promise<PersonalApplication>;
|
|
43
|
+
displayOfferForm(request: DisplayOfferFormParams): Promise<DisplayOfferFormResponse>;
|
|
44
|
+
trackOfferStatus(request: TrackOfferStatusParams): Promise<TrackOfferStatusResponse>;
|
|
45
|
+
displayUploadDocumentsForm(request: DisplayUploadDocumentsFormParams): Promise<DisplayUploadDocumentsFormResponse>;
|
|
46
|
+
submitDocuments(request: SubmitDocumentsParams): Promise<SubmitDocumentsResponse>;
|
|
47
|
+
connect(): Promise<void>;
|
|
48
|
+
enableDebug(): void;
|
|
49
|
+
disableDebug(): void;
|
|
50
|
+
setApiKey(apiKey: string): void;
|
|
51
|
+
private callTool;
|
|
52
|
+
private parseJsonResponse;
|
|
53
|
+
private getWidget;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare class SecureLendError extends Error {
|
|
57
|
+
readonly type: string;
|
|
58
|
+
readonly details?: unknown;
|
|
59
|
+
constructor(message: string, type: string, details?: unknown);
|
|
60
|
+
}
|
|
61
|
+
declare class AuthenticationError extends SecureLendError {
|
|
62
|
+
constructor(message: string);
|
|
63
|
+
}
|
|
64
|
+
declare class RateLimitError extends SecureLendError {
|
|
65
|
+
readonly retryAfter?: number;
|
|
66
|
+
constructor(message: string, retryAfter?: number);
|
|
67
|
+
}
|
|
68
|
+
declare class ValidationError extends SecureLendError {
|
|
69
|
+
constructor(message: string, errors?: unknown);
|
|
70
|
+
}
|
|
71
|
+
declare class NotFoundError extends SecureLendError {
|
|
72
|
+
constructor(message: string);
|
|
73
|
+
}
|
|
74
|
+
declare class NetworkError extends SecureLendError {
|
|
75
|
+
constructor(message: string);
|
|
76
|
+
}
|
|
77
|
+
declare class ServerError extends SecureLendError {
|
|
78
|
+
constructor(message: string);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { AuthenticationError, AutoLoanSearchParams, BusinessBankingComparisonResponse, BusinessBankingSearchSchema, BusinessCreditCardComparisonResponse, BusinessCreditCardSearchParams, BusinessLoanSearchParams, DisplayOfferFormParams, DisplayOfferFormResponse, DisplayUploadDocumentsFormParams, DisplayUploadDocumentsFormResponse, GetMultipleOffersParams, GetOfferParams, LeaseVsPurchaseParams, LeaseVsPurchaseResponse, LoanCalculationResponse, LoanComparisonResponse, LoanPaymentParams, MortgageCalculationResponse, MortgagePaymentParams, MortgageSearchParams, NetworkError, NotFoundError, PersonalApplication, PersonalBankingComparisonResponse, PersonalBankingSearchSchema, PersonalCreditCardComparisonResponse, PersonalCreditCardSearchSchema, PersonalLoanSearchParams, RateLimitError, SavingsAccountComparisonResponse, SavingsSearchSchema, SecureLend, SecureLendConfig, SecureLendError, ServerError, StudentLoanSearchParams, SubmitDocumentsParams, SubmitDocumentsResponse, TrackOfferStatusParams, TrackOfferStatusResponse, ValidationError };
|