@kanmon/sdk 2.0.0
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 +2 -0
- package/package.json +45 -0
- package/src/index.ts +65 -0
- package/src/openapi/.openapi-generator/FILES +130 -0
- package/src/openapi/.openapi-generator/VERSION +1 -0
- package/src/openapi/.openapi-generator-ignore +30 -0
- package/src/openapi/apis/BankAccountsApi.ts +503 -0
- package/src/openapi/apis/BusinessesApi.ts +614 -0
- package/src/openapi/apis/ConnectTokensApi.ts +133 -0
- package/src/openapi/apis/DocumentsApi.ts +150 -0
- package/src/openapi/apis/DrawRequestsApi.ts +258 -0
- package/src/openapi/apis/EmbeddedSessionsApi.ts +141 -0
- package/src/openapi/apis/InvoicesApi.ts +272 -0
- package/src/openapi/apis/IssuedProductsApi.ts +251 -0
- package/src/openapi/apis/OffersApi.ts +251 -0
- package/src/openapi/apis/PaymentsApi.ts +268 -0
- package/src/openapi/apis/PrequalificationsApi.ts +141 -0
- package/src/openapi/apis/UsersApi.ts +622 -0
- package/src/openapi/apis/baseapi.ts +37 -0
- package/src/openapi/apis/exception.ts +15 -0
- package/src/openapi/auth/auth.ts +79 -0
- package/src/openapi/configuration.ts +82 -0
- package/src/openapi/http/http.ts +247 -0
- package/src/openapi/http/isomorphic-fetch.ts +32 -0
- package/src/openapi/index.ts +12 -0
- package/src/openapi/middleware.ts +66 -0
- package/src/openapi/models/ActivityLog.ts +98 -0
- package/src/openapi/models/Address.ts +140 -0
- package/src/openapi/models/BadRequestException.ts +63 -0
- package/src/openapi/models/BankAccountAlreadyExistException.ts +63 -0
- package/src/openapi/models/BankAccountNotFoundException.ts +63 -0
- package/src/openapi/models/BankStatementsInvalidException.ts +63 -0
- package/src/openapi/models/Business.ts +126 -0
- package/src/openapi/models/BusinessAddress.ts +143 -0
- package/src/openapi/models/BusinessAlreadyExistsException.ts +63 -0
- package/src/openapi/models/BusinessBankAccount.ts +126 -0
- package/src/openapi/models/BusinessDocument.ts +98 -0
- package/src/openapi/models/BusinessDocumentType.ts +17 -0
- package/src/openapi/models/BusinessHasNoInvoiceFinancingProductException.ts +63 -0
- package/src/openapi/models/BusinessHasNoPrimaryOwnerException.ts +63 -0
- package/src/openapi/models/BusinessNotFoundException.ts +63 -0
- package/src/openapi/models/BusinessPlaidBankAccountNotFoundException.ts +63 -0
- package/src/openapi/models/BusinessPrequalification.ts +116 -0
- package/src/openapi/models/CheckingAccountRequiredException.ts +63 -0
- package/src/openapi/models/ConnectToken.ts +38 -0
- package/src/openapi/models/CreateBusinessBankAccountRequestBody.ts +116 -0
- package/src/openapi/models/CreateBusinessDocumentsResponse.ts +39 -0
- package/src/openapi/models/CreateBusinessRequestBody.ts +99 -0
- package/src/openapi/models/CreateConnectTokenRequestBody.ts +48 -0
- package/src/openapi/models/CreateEmbeddedSession409Response.ts +65 -0
- package/src/openapi/models/CreateSessionTokenRequestBody.ts +56 -0
- package/src/openapi/models/CreateSessionTokenRequestBodyData.ts +56 -0
- package/src/openapi/models/CreateUser409Response.ts +66 -0
- package/src/openapi/models/CreateUserRequestBody.ts +125 -0
- package/src/openapi/models/DrawRequest.ts +138 -0
- package/src/openapi/models/DrawRequestNotFoundException.ts +63 -0
- package/src/openapi/models/DrawRequestState.ts +21 -0
- package/src/openapi/models/EmbeddedSession.ts +38 -0
- package/src/openapi/models/FixedDateInvoiceRepaymentWindow.ts +50 -0
- package/src/openapi/models/FixedDurationInvoiceRepaymentWindow.ts +50 -0
- package/src/openapi/models/ForbiddenException.ts +63 -0
- package/src/openapi/models/GetActivityLogsResponse.ts +50 -0
- package/src/openapi/models/GetBusinessBankAccountsResponse.ts +50 -0
- package/src/openapi/models/GetBusinessesResponse.ts +50 -0
- package/src/openapi/models/GetDrawRequestsResponse.ts +50 -0
- package/src/openapi/models/GetInvoice404Response.ts +65 -0
- package/src/openapi/models/GetInvoicesResponse.ts +50 -0
- package/src/openapi/models/GetIssuedProductsResponse.ts +50 -0
- package/src/openapi/models/GetOffersResponse.ts +50 -0
- package/src/openapi/models/GetPaymentScheduleResponse.ts +50 -0
- package/src/openapi/models/GetPrequalificationsResponse.ts +50 -0
- package/src/openapi/models/GetUsersResponse.ts +50 -0
- package/src/openapi/models/InternalServerErrorException.ts +63 -0
- package/src/openapi/models/InvalidInvoiceDueDateException.ts +63 -0
- package/src/openapi/models/Invoice.ts +281 -0
- package/src/openapi/models/InvoiceFinancingOfferTerms.ts +61 -0
- package/src/openapi/models/InvoiceFinancingServicingData.ts +71 -0
- package/src/openapi/models/InvoiceFlowSessionTokenData.ts +51 -0
- package/src/openapi/models/InvoiceFlowWithInvoiceFileSessionTokenData.ts +51 -0
- package/src/openapi/models/InvoiceNotFoundException.ts +63 -0
- package/src/openapi/models/InvoicePaymentPlan.ts +58 -0
- package/src/openapi/models/InvoicePayorAddress.ts +143 -0
- package/src/openapi/models/InvoiceRepaymentSchedule.ts +39 -0
- package/src/openapi/models/InvoiceRepaymentScheduleItem.ts +68 -0
- package/src/openapi/models/InvoiceStatus.ts +22 -0
- package/src/openapi/models/IssuedProduct.ts +115 -0
- package/src/openapi/models/IssuedProductNotFoundException.ts +63 -0
- package/src/openapi/models/IssuedProductServicingData.ts +234 -0
- package/src/openapi/models/LineOfCreditOfferTerms.ts +80 -0
- package/src/openapi/models/LineOfCreditServicingData.ts +90 -0
- package/src/openapi/models/McaOfferTerms.ts +96 -0
- package/src/openapi/models/McaServicingData.ts +116 -0
- package/src/openapi/models/MergeUsersRequestBody.ts +68 -0
- package/src/openapi/models/MergeUsersResponseBody.ts +39 -0
- package/src/openapi/models/MultipleDurationInvoiceRepaymentWindow.ts +48 -0
- package/src/openapi/models/ObjectSerializer.ts +643 -0
- package/src/openapi/models/Offer.ts +106 -0
- package/src/openapi/models/OfferAlreadySelectedException.ts +63 -0
- package/src/openapi/models/OfferNotFoundException.ts +63 -0
- package/src/openapi/models/OfferNotLockedException.ts +63 -0
- package/src/openapi/models/OfferTerms.ts +184 -0
- package/src/openapi/models/PaginationResult.ts +58 -0
- package/src/openapi/models/PaymentOrder.ts +198 -0
- package/src/openapi/models/PaymentOrderNotFoundException.ts +63 -0
- package/src/openapi/models/PaymentOrderStatus.ts +19 -0
- package/src/openapi/models/PaymentPlanRepaymentSchedule.ts +39 -0
- package/src/openapi/models/PaymentPlanRepaymentScheduleItem.ts +48 -0
- package/src/openapi/models/PaymentScheduleItem.ts +56 -0
- package/src/openapi/models/PaymentScheduleItemPaymentOrder.ts +201 -0
- package/src/openapi/models/PlaidAssetReportsInvalidException.ts +63 -0
- package/src/openapi/models/PlatformInvoiceIdAlreadyExistsForAnotherIssuedProductException.ts +63 -0
- package/src/openapi/models/PrimaryBusinessOwnerAlreadyExistsForBusinessException.ts +63 -0
- package/src/openapi/models/PrimaryBusinessOwnerAlreadyExistsWithEmailException.ts +63 -0
- package/src/openapi/models/PrimaryBusinessOwnerNotFoundException.ts +63 -0
- package/src/openapi/models/SessionInvoice.ts +165 -0
- package/src/openapi/models/SessionInvoiceWithInvoiceFile.ts +175 -0
- package/src/openapi/models/SomeOffersHaveExpiredException.ts +63 -0
- package/src/openapi/models/TermLoanOfferTerms.ts +90 -0
- package/src/openapi/models/TermLoanServicingData.ts +100 -0
- package/src/openapi/models/UnmergeableBusinessException.ts +63 -0
- package/src/openapi/models/UpdateBusinessAccountRequestBody.ts +68 -0
- package/src/openapi/models/UpdateBusinessRequestBody.ts +99 -0
- package/src/openapi/models/UpdateUser409Response.ts +65 -0
- package/src/openapi/models/UpdateUserRequestBody.ts +95 -0
- package/src/openapi/models/User.ts +152 -0
- package/src/openapi/models/UserAddress.ts +143 -0
- package/src/openapi/models/UserAlreadyExistsWithEmailException.ts +63 -0
- package/src/openapi/models/UserAlreadyExistsWithPlatformUserIdException.ts +63 -0
- package/src/openapi/models/UserNotFoundException.ts +63 -0
- package/src/openapi/models/all.ts +102 -0
- package/src/openapi/rxjsStub.ts +27 -0
- package/src/openapi/servers.ts +58 -0
- package/src/openapi/types/ObjectParamAPI.ts +1403 -0
- package/src/openapi/types/ObservableAPI.ts +1348 -0
- package/src/openapi/types/PromiseAPI.ts +995 -0
- package/src/openapi/util.ts +37 -0
- package/tsconfig.json +32 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kanmon Public V2 API
|
|
3
|
+
* Kanmon\'s public api. Contains all of the endpoints for both capital providers and platforms
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { UserAddress } from '../models/UserAddress';
|
|
14
|
+
import { HttpFile } from '../http/http';
|
|
15
|
+
|
|
16
|
+
export class User {
|
|
17
|
+
/**
|
|
18
|
+
* The UUID representing the user in Kanmon.
|
|
19
|
+
*/
|
|
20
|
+
'id': string;
|
|
21
|
+
/**
|
|
22
|
+
* Your platform’s unique ID for the user.
|
|
23
|
+
*/
|
|
24
|
+
'platformUserId'?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Your platform’s unique business ID for the user.
|
|
27
|
+
*/
|
|
28
|
+
'platformBusinessId': string | null;
|
|
29
|
+
/**
|
|
30
|
+
* The UUID representing the user’s business in Kanmon.
|
|
31
|
+
*/
|
|
32
|
+
'businessId': string;
|
|
33
|
+
'address': UserAddress | null;
|
|
34
|
+
/**
|
|
35
|
+
* The user’s email.
|
|
36
|
+
*/
|
|
37
|
+
'email': any | null;
|
|
38
|
+
/**
|
|
39
|
+
* The user’s first name.
|
|
40
|
+
*/
|
|
41
|
+
'firstName': any | null;
|
|
42
|
+
/**
|
|
43
|
+
* The user’s last name.
|
|
44
|
+
*/
|
|
45
|
+
'lastName': any | null;
|
|
46
|
+
/**
|
|
47
|
+
* The user’s roles. If no roles are defined, the user will be prompted to select a role within Kanmon. <br/><br/>A primary owner is a user with the authority to issue debt on behalf of the business. <br/>This means the user can complete onboarding, receive offers, choose to accept offers, <br/>sign financing agreements, and service an active issued product. <br/><br/>An operator is a user with permission to service an active issued product. Examples are uploading invoices on <br/>behalf of the business, checking the status of payments, etc. <br /><br/>Please note Kanmon supports an additional user role called secondary owners. <br/>Secondary owners are beneficial owners of a business, like primary owners, and Kanmon <br/>must perform KYC checks for these users. Kanmon will handle creating and managing <br/>these users for KYC purposes through a separate process. <br/>
|
|
48
|
+
*/
|
|
49
|
+
'roles'?: Array<UserRolesEnum>;
|
|
50
|
+
/**
|
|
51
|
+
* Metadata from your system that you want to associate the user with.
|
|
52
|
+
*/
|
|
53
|
+
'metadata': any;
|
|
54
|
+
/**
|
|
55
|
+
* Creation UTC ISO 8601 timestamp of the user.
|
|
56
|
+
*/
|
|
57
|
+
'createdAt': string;
|
|
58
|
+
/**
|
|
59
|
+
* Last updated UTC ISO 8601 timestamp of the user.
|
|
60
|
+
*/
|
|
61
|
+
'updatedAt': string;
|
|
62
|
+
|
|
63
|
+
static readonly discriminator: string | undefined = undefined;
|
|
64
|
+
|
|
65
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
|
66
|
+
{
|
|
67
|
+
"name": "id",
|
|
68
|
+
"baseName": "id",
|
|
69
|
+
"type": "string",
|
|
70
|
+
"format": ""
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "platformUserId",
|
|
74
|
+
"baseName": "platformUserId",
|
|
75
|
+
"type": "string",
|
|
76
|
+
"format": ""
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "platformBusinessId",
|
|
80
|
+
"baseName": "platformBusinessId",
|
|
81
|
+
"type": "string",
|
|
82
|
+
"format": ""
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "businessId",
|
|
86
|
+
"baseName": "businessId",
|
|
87
|
+
"type": "string",
|
|
88
|
+
"format": ""
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "address",
|
|
92
|
+
"baseName": "address",
|
|
93
|
+
"type": "UserAddress",
|
|
94
|
+
"format": ""
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "email",
|
|
98
|
+
"baseName": "email",
|
|
99
|
+
"type": "any",
|
|
100
|
+
"format": ""
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "firstName",
|
|
104
|
+
"baseName": "firstName",
|
|
105
|
+
"type": "any",
|
|
106
|
+
"format": ""
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "lastName",
|
|
110
|
+
"baseName": "lastName",
|
|
111
|
+
"type": "any",
|
|
112
|
+
"format": ""
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "roles",
|
|
116
|
+
"baseName": "roles",
|
|
117
|
+
"type": "Array<UserRolesEnum>",
|
|
118
|
+
"format": ""
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "metadata",
|
|
122
|
+
"baseName": "metadata",
|
|
123
|
+
"type": "any",
|
|
124
|
+
"format": ""
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "createdAt",
|
|
128
|
+
"baseName": "createdAt",
|
|
129
|
+
"type": "string",
|
|
130
|
+
"format": ""
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "updatedAt",
|
|
134
|
+
"baseName": "updatedAt",
|
|
135
|
+
"type": "string",
|
|
136
|
+
"format": ""
|
|
137
|
+
} ];
|
|
138
|
+
|
|
139
|
+
static getAttributeTypeMap() {
|
|
140
|
+
return User.attributeTypeMap;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
public constructor() {
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
export enum UserRolesEnum {
|
|
149
|
+
PrimaryOwner = 'PRIMARY_OWNER',
|
|
150
|
+
Operator = 'OPERATOR'
|
|
151
|
+
}
|
|
152
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kanmon Public V2 API
|
|
3
|
+
* Kanmon\'s public api. Contains all of the endpoints for both capital providers and platforms
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { HttpFile } from '../http/http';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The user’s address.
|
|
17
|
+
*/
|
|
18
|
+
export class UserAddress {
|
|
19
|
+
'addressLineOne': string;
|
|
20
|
+
'addressLineTwo'?: string | null;
|
|
21
|
+
'city': string;
|
|
22
|
+
/**
|
|
23
|
+
* The 2 character abbreviated state
|
|
24
|
+
*/
|
|
25
|
+
'state': UserAddressStateEnum;
|
|
26
|
+
/**
|
|
27
|
+
* Zip code can be 5 digits, 9 digits, or 5+4 including a hyphen or plus sign, e.g. 90210, 902101234, 90210-1234 or 90210+1234
|
|
28
|
+
*/
|
|
29
|
+
'zipcode': string;
|
|
30
|
+
/**
|
|
31
|
+
* USA
|
|
32
|
+
*/
|
|
33
|
+
'country': string;
|
|
34
|
+
|
|
35
|
+
static readonly discriminator: string | undefined = undefined;
|
|
36
|
+
|
|
37
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
|
38
|
+
{
|
|
39
|
+
"name": "addressLineOne",
|
|
40
|
+
"baseName": "addressLineOne",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"format": ""
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "addressLineTwo",
|
|
46
|
+
"baseName": "addressLineTwo",
|
|
47
|
+
"type": "string",
|
|
48
|
+
"format": ""
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "city",
|
|
52
|
+
"baseName": "city",
|
|
53
|
+
"type": "string",
|
|
54
|
+
"format": ""
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "state",
|
|
58
|
+
"baseName": "state",
|
|
59
|
+
"type": "UserAddressStateEnum",
|
|
60
|
+
"format": ""
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "zipcode",
|
|
64
|
+
"baseName": "zipcode",
|
|
65
|
+
"type": "string",
|
|
66
|
+
"format": ""
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "country",
|
|
70
|
+
"baseName": "country",
|
|
71
|
+
"type": "string",
|
|
72
|
+
"format": ""
|
|
73
|
+
} ];
|
|
74
|
+
|
|
75
|
+
static getAttributeTypeMap() {
|
|
76
|
+
return UserAddress.attributeTypeMap;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
public constructor() {
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
export enum UserAddressStateEnum {
|
|
85
|
+
Al = 'AL',
|
|
86
|
+
Ky = 'KY',
|
|
87
|
+
Oh = 'OH',
|
|
88
|
+
Ak = 'AK',
|
|
89
|
+
La = 'LA',
|
|
90
|
+
Ok = 'OK',
|
|
91
|
+
Az = 'AZ',
|
|
92
|
+
Me = 'ME',
|
|
93
|
+
Or = 'OR',
|
|
94
|
+
Ar = 'AR',
|
|
95
|
+
Md = 'MD',
|
|
96
|
+
Pa = 'PA',
|
|
97
|
+
As = 'AS',
|
|
98
|
+
Ma = 'MA',
|
|
99
|
+
Pr = 'PR',
|
|
100
|
+
Ca = 'CA',
|
|
101
|
+
Mi = 'MI',
|
|
102
|
+
Ri = 'RI',
|
|
103
|
+
Co = 'CO',
|
|
104
|
+
Mn = 'MN',
|
|
105
|
+
Sc = 'SC',
|
|
106
|
+
Ct = 'CT',
|
|
107
|
+
Ms = 'MS',
|
|
108
|
+
Sd = 'SD',
|
|
109
|
+
De = 'DE',
|
|
110
|
+
Mo = 'MO',
|
|
111
|
+
Tn = 'TN',
|
|
112
|
+
Dc = 'DC',
|
|
113
|
+
Mt = 'MT',
|
|
114
|
+
Tx = 'TX',
|
|
115
|
+
Fl = 'FL',
|
|
116
|
+
Ne = 'NE',
|
|
117
|
+
Tt = 'TT',
|
|
118
|
+
Ga = 'GA',
|
|
119
|
+
Nv = 'NV',
|
|
120
|
+
Ut = 'UT',
|
|
121
|
+
Gu = 'GU',
|
|
122
|
+
Nh = 'NH',
|
|
123
|
+
Vt = 'VT',
|
|
124
|
+
Hi = 'HI',
|
|
125
|
+
Nj = 'NJ',
|
|
126
|
+
Va = 'VA',
|
|
127
|
+
Id = 'ID',
|
|
128
|
+
Nm = 'NM',
|
|
129
|
+
Vi = 'VI',
|
|
130
|
+
Il = 'IL',
|
|
131
|
+
Ny = 'NY',
|
|
132
|
+
Wa = 'WA',
|
|
133
|
+
In = 'IN',
|
|
134
|
+
Nc = 'NC',
|
|
135
|
+
Wv = 'WV',
|
|
136
|
+
Ia = 'IA',
|
|
137
|
+
Nd = 'ND',
|
|
138
|
+
Wi = 'WI',
|
|
139
|
+
Ks = 'KS',
|
|
140
|
+
Mp = 'MP',
|
|
141
|
+
Wy = 'WY'
|
|
142
|
+
}
|
|
143
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kanmon Public V2 API
|
|
3
|
+
* Kanmon\'s public api. Contains all of the endpoints for both capital providers and platforms
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { HttpFile } from '../http/http';
|
|
14
|
+
|
|
15
|
+
export class UserAlreadyExistsWithEmailException {
|
|
16
|
+
/**
|
|
17
|
+
* Safe for programmatic use.
|
|
18
|
+
*/
|
|
19
|
+
'errorCode': UserAlreadyExistsWithEmailExceptionErrorCodeEnum;
|
|
20
|
+
/**
|
|
21
|
+
* The human readable description of the error.
|
|
22
|
+
*/
|
|
23
|
+
'message': string;
|
|
24
|
+
/**
|
|
25
|
+
* When the error occurred - ISO 8601 format.
|
|
26
|
+
*/
|
|
27
|
+
'timestamp': string;
|
|
28
|
+
|
|
29
|
+
static readonly discriminator: string | undefined = undefined;
|
|
30
|
+
|
|
31
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
|
32
|
+
{
|
|
33
|
+
"name": "errorCode",
|
|
34
|
+
"baseName": "errorCode",
|
|
35
|
+
"type": "UserAlreadyExistsWithEmailExceptionErrorCodeEnum",
|
|
36
|
+
"format": ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "message",
|
|
40
|
+
"baseName": "message",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"format": ""
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "timestamp",
|
|
46
|
+
"baseName": "timestamp",
|
|
47
|
+
"type": "string",
|
|
48
|
+
"format": ""
|
|
49
|
+
} ];
|
|
50
|
+
|
|
51
|
+
static getAttributeTypeMap() {
|
|
52
|
+
return UserAlreadyExistsWithEmailException.attributeTypeMap;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public constructor() {
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
export enum UserAlreadyExistsWithEmailExceptionErrorCodeEnum {
|
|
61
|
+
UserAlreadyExistsWithEmailException = 'UserAlreadyExistsWithEmailException'
|
|
62
|
+
}
|
|
63
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kanmon Public V2 API
|
|
3
|
+
* Kanmon\'s public api. Contains all of the endpoints for both capital providers and platforms
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { HttpFile } from '../http/http';
|
|
14
|
+
|
|
15
|
+
export class UserAlreadyExistsWithPlatformUserIdException {
|
|
16
|
+
/**
|
|
17
|
+
* Safe for programmatic use.
|
|
18
|
+
*/
|
|
19
|
+
'errorCode': UserAlreadyExistsWithPlatformUserIdExceptionErrorCodeEnum;
|
|
20
|
+
/**
|
|
21
|
+
* The human readable description of the error.
|
|
22
|
+
*/
|
|
23
|
+
'message': string;
|
|
24
|
+
/**
|
|
25
|
+
* When the error occurred - ISO 8601 format.
|
|
26
|
+
*/
|
|
27
|
+
'timestamp': string;
|
|
28
|
+
|
|
29
|
+
static readonly discriminator: string | undefined = undefined;
|
|
30
|
+
|
|
31
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
|
32
|
+
{
|
|
33
|
+
"name": "errorCode",
|
|
34
|
+
"baseName": "errorCode",
|
|
35
|
+
"type": "UserAlreadyExistsWithPlatformUserIdExceptionErrorCodeEnum",
|
|
36
|
+
"format": ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "message",
|
|
40
|
+
"baseName": "message",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"format": ""
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "timestamp",
|
|
46
|
+
"baseName": "timestamp",
|
|
47
|
+
"type": "string",
|
|
48
|
+
"format": ""
|
|
49
|
+
} ];
|
|
50
|
+
|
|
51
|
+
static getAttributeTypeMap() {
|
|
52
|
+
return UserAlreadyExistsWithPlatformUserIdException.attributeTypeMap;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public constructor() {
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
export enum UserAlreadyExistsWithPlatformUserIdExceptionErrorCodeEnum {
|
|
61
|
+
UserAlreadyExistsWithPlatformUserIdException = 'UserAlreadyExistsWithPlatformUserIdException'
|
|
62
|
+
}
|
|
63
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kanmon Public V2 API
|
|
3
|
+
* Kanmon\'s public api. Contains all of the endpoints for both capital providers and platforms
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 2.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { HttpFile } from '../http/http';
|
|
14
|
+
|
|
15
|
+
export class UserNotFoundException {
|
|
16
|
+
/**
|
|
17
|
+
* Safe for programmatic use.
|
|
18
|
+
*/
|
|
19
|
+
'errorCode': UserNotFoundExceptionErrorCodeEnum;
|
|
20
|
+
/**
|
|
21
|
+
* The human readable description of the error.
|
|
22
|
+
*/
|
|
23
|
+
'message': string;
|
|
24
|
+
/**
|
|
25
|
+
* When the error occurred - ISO 8601 format.
|
|
26
|
+
*/
|
|
27
|
+
'timestamp': string;
|
|
28
|
+
|
|
29
|
+
static readonly discriminator: string | undefined = undefined;
|
|
30
|
+
|
|
31
|
+
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
|
32
|
+
{
|
|
33
|
+
"name": "errorCode",
|
|
34
|
+
"baseName": "errorCode",
|
|
35
|
+
"type": "UserNotFoundExceptionErrorCodeEnum",
|
|
36
|
+
"format": ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "message",
|
|
40
|
+
"baseName": "message",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"format": ""
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "timestamp",
|
|
46
|
+
"baseName": "timestamp",
|
|
47
|
+
"type": "string",
|
|
48
|
+
"format": ""
|
|
49
|
+
} ];
|
|
50
|
+
|
|
51
|
+
static getAttributeTypeMap() {
|
|
52
|
+
return UserNotFoundException.attributeTypeMap;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public constructor() {
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
export enum UserNotFoundExceptionErrorCodeEnum {
|
|
61
|
+
UserNotFoundException = 'UserNotFoundException'
|
|
62
|
+
}
|
|
63
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export * from '../models/ActivityLog'
|
|
2
|
+
export * from '../models/Address'
|
|
3
|
+
export * from '../models/BadRequestException'
|
|
4
|
+
export * from '../models/BankAccountAlreadyExistException'
|
|
5
|
+
export * from '../models/BankAccountNotFoundException'
|
|
6
|
+
export * from '../models/BankStatementsInvalidException'
|
|
7
|
+
export * from '../models/Business'
|
|
8
|
+
export * from '../models/BusinessAddress'
|
|
9
|
+
export * from '../models/BusinessAlreadyExistsException'
|
|
10
|
+
export * from '../models/BusinessBankAccount'
|
|
11
|
+
export * from '../models/BusinessDocument'
|
|
12
|
+
export * from '../models/BusinessDocumentType'
|
|
13
|
+
export * from '../models/BusinessHasNoInvoiceFinancingProductException'
|
|
14
|
+
export * from '../models/BusinessHasNoPrimaryOwnerException'
|
|
15
|
+
export * from '../models/BusinessNotFoundException'
|
|
16
|
+
export * from '../models/BusinessPlaidBankAccountNotFoundException'
|
|
17
|
+
export * from '../models/BusinessPrequalification'
|
|
18
|
+
export * from '../models/CheckingAccountRequiredException'
|
|
19
|
+
export * from '../models/ConnectToken'
|
|
20
|
+
export * from '../models/CreateBusinessBankAccountRequestBody'
|
|
21
|
+
export * from '../models/CreateBusinessDocumentsResponse'
|
|
22
|
+
export * from '../models/CreateBusinessRequestBody'
|
|
23
|
+
export * from '../models/CreateConnectTokenRequestBody'
|
|
24
|
+
export * from '../models/CreateEmbeddedSession409Response'
|
|
25
|
+
export * from '../models/CreateSessionTokenRequestBody'
|
|
26
|
+
export * from '../models/CreateSessionTokenRequestBodyData'
|
|
27
|
+
export * from '../models/CreateUser409Response'
|
|
28
|
+
export * from '../models/CreateUserRequestBody'
|
|
29
|
+
export * from '../models/DrawRequest'
|
|
30
|
+
export * from '../models/DrawRequestNotFoundException'
|
|
31
|
+
export * from '../models/DrawRequestState'
|
|
32
|
+
export * from '../models/EmbeddedSession'
|
|
33
|
+
export * from '../models/FixedDateInvoiceRepaymentWindow'
|
|
34
|
+
export * from '../models/FixedDurationInvoiceRepaymentWindow'
|
|
35
|
+
export * from '../models/ForbiddenException'
|
|
36
|
+
export * from '../models/GetActivityLogsResponse'
|
|
37
|
+
export * from '../models/GetBusinessBankAccountsResponse'
|
|
38
|
+
export * from '../models/GetBusinessesResponse'
|
|
39
|
+
export * from '../models/GetDrawRequestsResponse'
|
|
40
|
+
export * from '../models/GetInvoice404Response'
|
|
41
|
+
export * from '../models/GetInvoicesResponse'
|
|
42
|
+
export * from '../models/GetIssuedProductsResponse'
|
|
43
|
+
export * from '../models/GetOffersResponse'
|
|
44
|
+
export * from '../models/GetPaymentScheduleResponse'
|
|
45
|
+
export * from '../models/GetPrequalificationsResponse'
|
|
46
|
+
export * from '../models/GetUsersResponse'
|
|
47
|
+
export * from '../models/InternalServerErrorException'
|
|
48
|
+
export * from '../models/InvalidInvoiceDueDateException'
|
|
49
|
+
export * from '../models/Invoice'
|
|
50
|
+
export * from '../models/InvoiceFinancingOfferTerms'
|
|
51
|
+
export * from '../models/InvoiceFinancingServicingData'
|
|
52
|
+
export * from '../models/InvoiceFlowSessionTokenData'
|
|
53
|
+
export * from '../models/InvoiceFlowWithInvoiceFileSessionTokenData'
|
|
54
|
+
export * from '../models/InvoiceNotFoundException'
|
|
55
|
+
export * from '../models/InvoicePaymentPlan'
|
|
56
|
+
export * from '../models/InvoicePayorAddress'
|
|
57
|
+
export * from '../models/InvoiceRepaymentSchedule'
|
|
58
|
+
export * from '../models/InvoiceRepaymentScheduleItem'
|
|
59
|
+
export * from '../models/InvoiceStatus'
|
|
60
|
+
export * from '../models/IssuedProduct'
|
|
61
|
+
export * from '../models/IssuedProductNotFoundException'
|
|
62
|
+
export * from '../models/IssuedProductServicingData'
|
|
63
|
+
export * from '../models/LineOfCreditOfferTerms'
|
|
64
|
+
export * from '../models/LineOfCreditServicingData'
|
|
65
|
+
export * from '../models/McaOfferTerms'
|
|
66
|
+
export * from '../models/McaServicingData'
|
|
67
|
+
export * from '../models/MergeUsersRequestBody'
|
|
68
|
+
export * from '../models/MergeUsersResponseBody'
|
|
69
|
+
export * from '../models/MultipleDurationInvoiceRepaymentWindow'
|
|
70
|
+
export * from '../models/Offer'
|
|
71
|
+
export * from '../models/OfferAlreadySelectedException'
|
|
72
|
+
export * from '../models/OfferNotFoundException'
|
|
73
|
+
export * from '../models/OfferNotLockedException'
|
|
74
|
+
export * from '../models/OfferTerms'
|
|
75
|
+
export * from '../models/PaginationResult'
|
|
76
|
+
export * from '../models/PaymentOrder'
|
|
77
|
+
export * from '../models/PaymentOrderNotFoundException'
|
|
78
|
+
export * from '../models/PaymentOrderStatus'
|
|
79
|
+
export * from '../models/PaymentPlanRepaymentSchedule'
|
|
80
|
+
export * from '../models/PaymentPlanRepaymentScheduleItem'
|
|
81
|
+
export * from '../models/PaymentScheduleItem'
|
|
82
|
+
export * from '../models/PaymentScheduleItemPaymentOrder'
|
|
83
|
+
export * from '../models/PlaidAssetReportsInvalidException'
|
|
84
|
+
export * from '../models/PlatformInvoiceIdAlreadyExistsForAnotherIssuedProductException'
|
|
85
|
+
export * from '../models/PrimaryBusinessOwnerAlreadyExistsForBusinessException'
|
|
86
|
+
export * from '../models/PrimaryBusinessOwnerAlreadyExistsWithEmailException'
|
|
87
|
+
export * from '../models/PrimaryBusinessOwnerNotFoundException'
|
|
88
|
+
export * from '../models/SessionInvoice'
|
|
89
|
+
export * from '../models/SessionInvoiceWithInvoiceFile'
|
|
90
|
+
export * from '../models/SomeOffersHaveExpiredException'
|
|
91
|
+
export * from '../models/TermLoanOfferTerms'
|
|
92
|
+
export * from '../models/TermLoanServicingData'
|
|
93
|
+
export * from '../models/UnmergeableBusinessException'
|
|
94
|
+
export * from '../models/UpdateBusinessAccountRequestBody'
|
|
95
|
+
export * from '../models/UpdateBusinessRequestBody'
|
|
96
|
+
export * from '../models/UpdateUser409Response'
|
|
97
|
+
export * from '../models/UpdateUserRequestBody'
|
|
98
|
+
export * from '../models/User'
|
|
99
|
+
export * from '../models/UserAddress'
|
|
100
|
+
export * from '../models/UserAlreadyExistsWithEmailException'
|
|
101
|
+
export * from '../models/UserAlreadyExistsWithPlatformUserIdException'
|
|
102
|
+
export * from '../models/UserNotFoundException'
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export class Observable<T> {
|
|
2
|
+
constructor(private promise: Promise<T>) {}
|
|
3
|
+
|
|
4
|
+
toPromise() {
|
|
5
|
+
return this.promise;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
pipe<S>(callback: (value: T) => S | Promise<S>): Observable<S> {
|
|
9
|
+
return new Observable(this.promise.then(callback));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function from<T>(promise: Promise<any>) {
|
|
14
|
+
return new Observable(promise);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function of<T>(value: T) {
|
|
18
|
+
return new Observable<T>(Promise.resolve(value));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function mergeMap<T, S>(callback: (value: T) => Observable<S>) {
|
|
22
|
+
return (value: T) => callback(value).toPromise();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function map(callback: any) {
|
|
26
|
+
return callback;
|
|
27
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { RequestContext, HttpMethod } from "./http/http";
|
|
2
|
+
|
|
3
|
+
export interface BaseServerConfiguration {
|
|
4
|
+
makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* Represents the configuration of a server including its
|
|
10
|
+
* url template and variable configuration based on the url.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export class ServerConfiguration<T extends { [key: string]: string }> implements BaseServerConfiguration {
|
|
14
|
+
public constructor(private url: string, private variableConfiguration: T) {}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Sets the value of the variables of this server. Variables are included in
|
|
18
|
+
* the `url` of this ServerConfiguration in the form `{variableName}`
|
|
19
|
+
*
|
|
20
|
+
* @param variableConfiguration a partial variable configuration for the
|
|
21
|
+
* variables contained in the url
|
|
22
|
+
*/
|
|
23
|
+
public setVariables(variableConfiguration: Partial<T>) {
|
|
24
|
+
Object.assign(this.variableConfiguration, variableConfiguration);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public getConfiguration(): T {
|
|
28
|
+
return this.variableConfiguration
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
private getUrl() {
|
|
32
|
+
let replacedUrl = this.url;
|
|
33
|
+
for (const key in this.variableConfiguration) {
|
|
34
|
+
var re = new RegExp("{" + key + "}","g");
|
|
35
|
+
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
|
|
36
|
+
}
|
|
37
|
+
return replacedUrl
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new request context for this server using the url with variables
|
|
42
|
+
* replaced with their respective values and the endpoint of the request appended.
|
|
43
|
+
*
|
|
44
|
+
* @param endpoint the endpoint to be queried on the server
|
|
45
|
+
* @param httpMethod httpMethod to be used
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
public makeRequestContext(endpoint: string, httpMethod: HttpMethod): RequestContext {
|
|
49
|
+
return new RequestContext(this.getUrl() + endpoint, httpMethod);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const server1 = new ServerConfiguration<{ }>("https://api.kanmon.com", { })
|
|
54
|
+
export const server2 = new ServerConfiguration<{ }>("https://api.kanmon.dev", { })
|
|
55
|
+
export const server3 = new ServerConfiguration<{ }>("http://localhost:3333", { })
|
|
56
|
+
export const server4 = new ServerConfiguration<{ }>("https://workflow.concar.dev", { })
|
|
57
|
+
|
|
58
|
+
export const servers = [server1, server2, server3, server4];
|