@financeable/aggregation 0.6.0 → 0.6.12
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/FUNCTIONS.md +4 -0
- package/README.md +14 -2
- package/docs/sdks/applications/README.md +19 -254
- package/docs/sdks/oauthtoken/README.md +5 -5
- package/docs/sdks/supportingdocuments/README.md +9 -1
- package/funcs/applicationsCreate.d.ts +1 -1
- package/funcs/applicationsCreate.d.ts.map +1 -1
- package/funcs/applicationsCreate.js +2 -2
- package/funcs/applicationsCreate.js.map +1 -1
- package/funcs/{oauthTokenOauthToken.d.ts → oauthTokenGet.d.ts} +2 -2
- package/funcs/oauthTokenGet.d.ts.map +1 -0
- package/funcs/{oauthTokenOauthToken.js → oauthTokenGet.js} +3 -3
- package/funcs/oauthTokenGet.js.map +1 -0
- package/funcs/supportingDocumentsCreate.d.ts +1 -2
- package/funcs/supportingDocumentsCreate.d.ts.map +1 -1
- package/funcs/supportingDocumentsCreate.js +1 -2
- package/funcs/supportingDocumentsCreate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/models/components/addressattributes.d.ts +2 -0
- package/models/components/addressattributes.d.ts.map +1 -1
- package/models/components/addressattributes.js +2 -0
- package/models/components/addressattributes.js.map +1 -1
- package/models/components/applicationresource.d.ts +4 -4
- package/models/components/applicationresource.d.ts.map +1 -1
- package/models/components/applicationresource.js +6 -6
- package/models/components/applicationresource.js.map +1 -1
- package/models/components/{commercialsecuredloanapplicationsubmissionpayload.d.ts → commercialsecuredapplicationpayload.d.ts} +64 -24
- package/models/components/commercialsecuredapplicationpayload.d.ts.map +1 -0
- package/models/components/{commercialsecuredloanapplicationsubmissionpayload.js → commercialsecuredapplicationpayload.js} +47 -33
- package/models/components/commercialsecuredapplicationpayload.js.map +1 -0
- package/models/components/commercialsecuredapplicationresource.d.ts +171 -0
- package/models/components/commercialsecuredapplicationresource.d.ts.map +1 -0
- package/models/components/commercialsecuredapplicationresource.js +161 -0
- package/models/components/commercialsecuredapplicationresource.js.map +1 -0
- package/models/components/commercialsecuredloanassetattributes.d.ts +2 -0
- package/models/components/commercialsecuredloanassetattributes.d.ts.map +1 -1
- package/models/components/commercialsecuredloanassetattributes.js +2 -0
- package/models/components/commercialsecuredloanassetattributes.js.map +1 -1
- package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +99 -17
- package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -1
- package/models/components/commercialsecuredloancommercialapplicationrelationships.js +67 -23
- package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +1 -1
- package/models/components/consumersecuredapplicationpayload.d.ts +164 -0
- package/models/components/consumersecuredapplicationpayload.d.ts.map +1 -0
- package/models/components/consumersecuredapplicationpayload.js +158 -0
- package/models/components/consumersecuredapplicationpayload.js.map +1 -0
- package/models/components/consumersecuredapplicationresource.d.ts +171 -0
- package/models/components/consumersecuredapplicationresource.d.ts.map +1 -0
- package/models/components/consumersecuredapplicationresource.js +161 -0
- package/models/components/consumersecuredapplicationresource.js.map +1 -0
- package/models/components/consumersecuredloanassetattributes.d.ts +2 -0
- package/models/components/consumersecuredloanassetattributes.d.ts.map +1 -1
- package/models/components/consumersecuredloanassetattributes.js +2 -0
- package/models/components/consumersecuredloanassetattributes.js.map +1 -1
- package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +51 -2
- package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -1
- package/models/components/consumersecuredloanconsumerapplicationrelationships.js +19 -2
- package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -1
- package/models/components/createsupportingdocumentsresponse.d.ts +49 -46
- package/models/components/createsupportingdocumentsresponse.d.ts.map +1 -1
- package/models/components/createsupportingdocumentsresponse.js +36 -47
- package/models/components/createsupportingdocumentsresponse.js.map +1 -1
- package/models/components/customerattributes.d.ts +2 -0
- package/models/components/customerattributes.d.ts.map +1 -1
- package/models/components/customerattributes.js +2 -0
- package/models/components/customerattributes.js.map +1 -1
- package/models/components/entityattributes.d.ts +2 -0
- package/models/components/entityattributes.d.ts.map +1 -1
- package/models/components/entityattributes.js +2 -0
- package/models/components/entityattributes.js.map +1 -1
- package/models/components/index.d.ts +4 -5
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +4 -5
- package/models/components/index.js.map +1 -1
- package/models/components/loandetailsattributes.d.ts +2 -0
- package/models/components/loandetailsattributes.d.ts.map +1 -1
- package/models/components/loandetailsattributes.js +2 -0
- package/models/components/loandetailsattributes.js.map +1 -1
- package/models/components/supportingdocumentresource.d.ts +5 -25
- package/models/components/supportingdocumentresource.d.ts.map +1 -1
- package/models/components/supportingdocumentresource.js +6 -29
- package/models/components/supportingdocumentresource.js.map +1 -1
- package/models/errors/createapplication.d.ts +35 -0
- package/models/errors/createapplication.d.ts.map +1 -1
- package/models/errors/createapplication.js +40 -1
- package/models/errors/createapplication.js.map +1 -1
- package/models/operations/createapplication.d.ts +6 -112
- package/models/operations/createapplication.d.ts.map +1 -1
- package/models/operations/createapplication.js +11 -118
- package/models/operations/createapplication.js.map +1 -1
- package/models/operations/supportingdocumentscreate.d.ts +34 -0
- package/models/operations/supportingdocumentscreate.d.ts.map +1 -1
- package/models/operations/supportingdocumentscreate.js +28 -1
- package/models/operations/supportingdocumentscreate.js.map +1 -1
- package/package.json +1 -1
- package/sdk/oauthtoken.d.ts +1 -1
- package/sdk/oauthtoken.d.ts.map +1 -1
- package/sdk/oauthtoken.js +3 -3
- package/sdk/oauthtoken.js.map +1 -1
- package/sdk/supportingdocuments.d.ts +1 -2
- package/sdk/supportingdocuments.d.ts.map +1 -1
- package/sdk/supportingdocuments.js.map +1 -1
- package/src/funcs/applicationsCreate.ts +8 -1
- package/src/funcs/{oauthTokenOauthToken.ts → oauthTokenGet.ts} +1 -1
- package/src/funcs/supportingDocumentsCreate.ts +4 -5
- package/src/lib/config.ts +2 -2
- package/src/models/components/addressattributes.ts +4 -0
- package/src/models/components/applicationresource.ts +18 -18
- package/src/models/components/{commercialsecuredloanapplicationsubmissionpayload.ts → commercialsecuredapplicationpayload.ts} +82 -71
- package/src/models/components/commercialsecuredapplicationresource.ts +310 -0
- package/src/models/components/commercialsecuredloanassetattributes.ts +4 -0
- package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +159 -69
- package/src/models/components/consumersecuredapplicationpayload.ts +273 -0
- package/src/models/components/consumersecuredapplicationresource.ts +309 -0
- package/src/models/components/consumersecuredloanassetattributes.ts +4 -0
- package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +44 -8
- package/src/models/components/createsupportingdocumentsresponse.ts +57 -103
- package/src/models/components/customerattributes.ts +4 -0
- package/src/models/components/entityattributes.ts +4 -0
- package/src/models/components/index.ts +4 -5
- package/src/models/components/loandetailsattributes.ts +4 -0
- package/src/models/components/supportingdocumentresource.ts +14 -51
- package/src/models/errors/createapplication.ts +73 -0
- package/src/models/operations/createapplication.ts +20 -229
- package/src/models/operations/supportingdocumentscreate.ts +72 -0
- package/src/sdk/oauthtoken.ts +3 -3
- package/src/sdk/supportingdocuments.ts +1 -2
- package/funcs/oauthTokenOauthToken.d.ts.map +0 -1
- package/funcs/oauthTokenOauthToken.js.map +0 -1
- package/models/components/commercialapplicationresource.d.ts +0 -191
- package/models/components/commercialapplicationresource.d.ts.map +0 -1
- package/models/components/commercialapplicationresource.js +0 -183
- package/models/components/commercialapplicationresource.js.map +0 -1
- package/models/components/commercialsecuredloanapplicationsubmissionpayload.d.ts.map +0 -1
- package/models/components/commercialsecuredloanapplicationsubmissionpayload.js.map +0 -1
- package/models/components/consumerapplicationresource.d.ts +0 -191
- package/models/components/consumerapplicationresource.d.ts.map +0 -1
- package/models/components/consumerapplicationresource.js +0 -187
- package/models/components/consumerapplicationresource.js.map +0 -1
- package/models/components/consumersecuredloanapplicationsubmissionpayload.d.ts +0 -124
- package/models/components/consumersecuredloanapplicationsubmissionpayload.d.ts.map +0 -1
- package/models/components/consumersecuredloanapplicationsubmissionpayload.js +0 -146
- package/models/components/consumersecuredloanapplicationsubmissionpayload.js.map +0 -1
- package/models/components/resourcetypes.d.ts +0 -46
- package/models/components/resourcetypes.d.ts.map +0 -1
- package/models/components/resourcetypes.js +0 -66
- package/models/components/resourcetypes.js.map +0 -1
- package/src/models/components/commercialapplicationresource.ts +0 -355
- package/src/models/components/consumerapplicationresource.ts +0 -342
- package/src/models/components/consumersecuredloanapplicationsubmissionpayload.ts +0 -270
- package/src/models/components/resourcetypes.ts +0 -39
|
@@ -13,12 +13,31 @@ import {
|
|
|
13
13
|
CommercialSecuredLoanCommercialApplicationRelationships$Outbound,
|
|
14
14
|
CommercialSecuredLoanCommercialApplicationRelationships$outboundSchema,
|
|
15
15
|
} from "./commercialsecuredloancommercialapplicationrelationships.js";
|
|
16
|
+
import {
|
|
17
|
+
LinkObject,
|
|
18
|
+
LinkObject$inboundSchema,
|
|
19
|
+
LinkObject$Outbound,
|
|
20
|
+
LinkObject$outboundSchema,
|
|
21
|
+
} from "./linkobject.js";
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Resource types used in the API
|
|
25
|
+
*/
|
|
26
|
+
export const CommercialSecuredApplicationPayloadType = {
|
|
27
|
+
ConsumerSecuredApplications: "consumer-secured-applications",
|
|
18
28
|
CommercialSecuredApplications: "commercial-secured-applications",
|
|
29
|
+
SupportingDocuments: "supporting-documents",
|
|
30
|
+
Customers: "customers",
|
|
31
|
+
Assets: "assets",
|
|
32
|
+
Entities: "entities",
|
|
33
|
+
LoanDetails: "loan-details",
|
|
34
|
+
Addresses: "addresses",
|
|
19
35
|
} as const;
|
|
20
|
-
|
|
21
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Resource types used in the API
|
|
38
|
+
*/
|
|
39
|
+
export type CommercialSecuredApplicationPayloadType = ClosedEnum<
|
|
40
|
+
typeof CommercialSecuredApplicationPayloadType
|
|
22
41
|
>;
|
|
23
42
|
|
|
24
43
|
/**
|
|
@@ -46,40 +65,38 @@ export type Attributes = {
|
|
|
46
65
|
associatedBrokerEmail?: string | undefined;
|
|
47
66
|
};
|
|
48
67
|
|
|
49
|
-
export type
|
|
50
|
-
type:
|
|
68
|
+
export type CommercialSecuredApplicationPayload = {
|
|
69
|
+
type: CommercialSecuredApplicationPayloadType;
|
|
51
70
|
/**
|
|
52
71
|
* Application resource attributes
|
|
53
72
|
*/
|
|
54
73
|
attributes: Attributes;
|
|
55
|
-
relationships
|
|
56
|
-
|
|
57
|
-
|
|
74
|
+
relationships: CommercialSecuredLoanCommercialApplicationRelationships;
|
|
75
|
+
links?: { [k: string]: LinkObject } | undefined;
|
|
76
|
+
meta?: { [k: string]: any } | undefined;
|
|
58
77
|
};
|
|
59
78
|
|
|
60
79
|
/** @internal */
|
|
61
|
-
export const
|
|
62
|
-
z.ZodNativeEnum<
|
|
63
|
-
|
|
64
|
-
> = z.nativeEnum(CommercialSecuredLoanApplicationSubmissionPayloadType);
|
|
80
|
+
export const CommercialSecuredApplicationPayloadType$inboundSchema:
|
|
81
|
+
z.ZodNativeEnum<typeof CommercialSecuredApplicationPayloadType> = z
|
|
82
|
+
.nativeEnum(CommercialSecuredApplicationPayloadType);
|
|
65
83
|
|
|
66
84
|
/** @internal */
|
|
67
|
-
export const
|
|
68
|
-
z.ZodNativeEnum<
|
|
69
|
-
|
|
70
|
-
> = CommercialSecuredLoanApplicationSubmissionPayloadType$inboundSchema;
|
|
85
|
+
export const CommercialSecuredApplicationPayloadType$outboundSchema:
|
|
86
|
+
z.ZodNativeEnum<typeof CommercialSecuredApplicationPayloadType> =
|
|
87
|
+
CommercialSecuredApplicationPayloadType$inboundSchema;
|
|
71
88
|
|
|
72
89
|
/**
|
|
73
90
|
* @internal
|
|
74
91
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
92
|
*/
|
|
76
|
-
export namespace
|
|
77
|
-
/** @deprecated use `
|
|
93
|
+
export namespace CommercialSecuredApplicationPayloadType$ {
|
|
94
|
+
/** @deprecated use `CommercialSecuredApplicationPayloadType$inboundSchema` instead. */
|
|
78
95
|
export const inboundSchema =
|
|
79
|
-
|
|
80
|
-
/** @deprecated use `
|
|
96
|
+
CommercialSecuredApplicationPayloadType$inboundSchema;
|
|
97
|
+
/** @deprecated use `CommercialSecuredApplicationPayloadType$outboundSchema` instead. */
|
|
81
98
|
export const outboundSchema =
|
|
82
|
-
|
|
99
|
+
CommercialSecuredApplicationPayloadType$outboundSchema;
|
|
83
100
|
}
|
|
84
101
|
|
|
85
102
|
/** @internal */
|
|
@@ -157,81 +174,75 @@ export function attributesFromJSON(
|
|
|
157
174
|
}
|
|
158
175
|
|
|
159
176
|
/** @internal */
|
|
160
|
-
export const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
177
|
+
export const CommercialSecuredApplicationPayload$inboundSchema: z.ZodType<
|
|
178
|
+
CommercialSecuredApplicationPayload,
|
|
179
|
+
z.ZodTypeDef,
|
|
180
|
+
unknown
|
|
181
|
+
> = z.object({
|
|
182
|
+
type: CommercialSecuredApplicationPayloadType$inboundSchema,
|
|
183
|
+
attributes: z.lazy(() => Attributes$inboundSchema),
|
|
184
|
+
relationships:
|
|
185
|
+
CommercialSecuredLoanCommercialApplicationRelationships$inboundSchema,
|
|
186
|
+
links: z.record(LinkObject$inboundSchema).optional(),
|
|
187
|
+
meta: z.record(z.any()).optional(),
|
|
188
|
+
});
|
|
172
189
|
|
|
173
190
|
/** @internal */
|
|
174
|
-
export type
|
|
191
|
+
export type CommercialSecuredApplicationPayload$Outbound = {
|
|
175
192
|
type: string;
|
|
176
193
|
attributes: Attributes$Outbound;
|
|
177
|
-
relationships
|
|
178
|
-
|
|
179
|
-
|
|
194
|
+
relationships:
|
|
195
|
+
CommercialSecuredLoanCommercialApplicationRelationships$Outbound;
|
|
196
|
+
links?: { [k: string]: LinkObject$Outbound } | undefined;
|
|
197
|
+
meta?: { [k: string]: any } | undefined;
|
|
180
198
|
};
|
|
181
199
|
|
|
182
200
|
/** @internal */
|
|
183
|
-
export const
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
201
|
+
export const CommercialSecuredApplicationPayload$outboundSchema: z.ZodType<
|
|
202
|
+
CommercialSecuredApplicationPayload$Outbound,
|
|
203
|
+
z.ZodTypeDef,
|
|
204
|
+
CommercialSecuredApplicationPayload
|
|
205
|
+
> = z.object({
|
|
206
|
+
type: CommercialSecuredApplicationPayloadType$outboundSchema,
|
|
207
|
+
attributes: z.lazy(() => Attributes$outboundSchema),
|
|
208
|
+
relationships:
|
|
209
|
+
CommercialSecuredLoanCommercialApplicationRelationships$outboundSchema,
|
|
210
|
+
links: z.record(LinkObject$outboundSchema).optional(),
|
|
211
|
+
meta: z.record(z.any()).optional(),
|
|
212
|
+
});
|
|
195
213
|
|
|
196
214
|
/**
|
|
197
215
|
* @internal
|
|
198
216
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
199
217
|
*/
|
|
200
|
-
export namespace
|
|
201
|
-
/** @deprecated use `
|
|
218
|
+
export namespace CommercialSecuredApplicationPayload$ {
|
|
219
|
+
/** @deprecated use `CommercialSecuredApplicationPayload$inboundSchema` instead. */
|
|
202
220
|
export const inboundSchema =
|
|
203
|
-
|
|
204
|
-
/** @deprecated use `
|
|
221
|
+
CommercialSecuredApplicationPayload$inboundSchema;
|
|
222
|
+
/** @deprecated use `CommercialSecuredApplicationPayload$outboundSchema` instead. */
|
|
205
223
|
export const outboundSchema =
|
|
206
|
-
|
|
207
|
-
/** @deprecated use `
|
|
208
|
-
export type Outbound =
|
|
209
|
-
CommercialSecuredLoanApplicationSubmissionPayload$Outbound;
|
|
224
|
+
CommercialSecuredApplicationPayload$outboundSchema;
|
|
225
|
+
/** @deprecated use `CommercialSecuredApplicationPayload$Outbound` instead. */
|
|
226
|
+
export type Outbound = CommercialSecuredApplicationPayload$Outbound;
|
|
210
227
|
}
|
|
211
228
|
|
|
212
|
-
export function
|
|
213
|
-
|
|
214
|
-
CommercialSecuredLoanApplicationSubmissionPayload,
|
|
229
|
+
export function commercialSecuredApplicationPayloadToJSON(
|
|
230
|
+
commercialSecuredApplicationPayload: CommercialSecuredApplicationPayload,
|
|
215
231
|
): string {
|
|
216
232
|
return JSON.stringify(
|
|
217
|
-
|
|
218
|
-
|
|
233
|
+
CommercialSecuredApplicationPayload$outboundSchema.parse(
|
|
234
|
+
commercialSecuredApplicationPayload,
|
|
219
235
|
),
|
|
220
236
|
);
|
|
221
237
|
}
|
|
222
238
|
|
|
223
|
-
export function
|
|
239
|
+
export function commercialSecuredApplicationPayloadFromJSON(
|
|
224
240
|
jsonString: string,
|
|
225
|
-
): SafeParseResult<
|
|
226
|
-
CommercialSecuredLoanApplicationSubmissionPayload,
|
|
227
|
-
SDKValidationError
|
|
228
|
-
> {
|
|
241
|
+
): SafeParseResult<CommercialSecuredApplicationPayload, SDKValidationError> {
|
|
229
242
|
return safeParse(
|
|
230
243
|
jsonString,
|
|
231
244
|
(x) =>
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
),
|
|
235
|
-
`Failed to parse 'CommercialSecuredLoanApplicationSubmissionPayload' from JSON`,
|
|
245
|
+
CommercialSecuredApplicationPayload$inboundSchema.parse(JSON.parse(x)),
|
|
246
|
+
`Failed to parse 'CommercialSecuredApplicationPayload' from JSON`,
|
|
236
247
|
);
|
|
237
248
|
}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
ApplicationStatus,
|
|
12
|
+
ApplicationStatus$inboundSchema,
|
|
13
|
+
ApplicationStatus$outboundSchema,
|
|
14
|
+
} from "./applicationstatus.js";
|
|
15
|
+
import {
|
|
16
|
+
CommercialApplicationJsonApiRelationships,
|
|
17
|
+
CommercialApplicationJsonApiRelationships$inboundSchema,
|
|
18
|
+
CommercialApplicationJsonApiRelationships$Outbound,
|
|
19
|
+
CommercialApplicationJsonApiRelationships$outboundSchema,
|
|
20
|
+
} from "./commercialapplicationjsonapirelationships.js";
|
|
21
|
+
import {
|
|
22
|
+
LinkObject,
|
|
23
|
+
LinkObject$inboundSchema,
|
|
24
|
+
LinkObject$Outbound,
|
|
25
|
+
LinkObject$outboundSchema,
|
|
26
|
+
} from "./linkobject.js";
|
|
27
|
+
|
|
28
|
+
export const CommercialSecuredApplicationResourceType = {
|
|
29
|
+
CommercialSecuredApplications: "commercial-secured-applications",
|
|
30
|
+
} as const;
|
|
31
|
+
export type CommercialSecuredApplicationResourceType = ClosedEnum<
|
|
32
|
+
typeof CommercialSecuredApplicationResourceType
|
|
33
|
+
>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Type of the loan application
|
|
37
|
+
*/
|
|
38
|
+
export const CommercialSecuredApplicationResourceApplicationType = {
|
|
39
|
+
CommercialSecured: "commercialSecured",
|
|
40
|
+
} as const;
|
|
41
|
+
/**
|
|
42
|
+
* Type of the loan application
|
|
43
|
+
*/
|
|
44
|
+
export type CommercialSecuredApplicationResourceApplicationType = ClosedEnum<
|
|
45
|
+
typeof CommercialSecuredApplicationResourceApplicationType
|
|
46
|
+
>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Application resource attributes
|
|
50
|
+
*/
|
|
51
|
+
export type CommercialSecuredApplicationResourceAttributes = {
|
|
52
|
+
/**
|
|
53
|
+
* Full identifier of the application. Not visible within the web application.
|
|
54
|
+
*/
|
|
55
|
+
id: string;
|
|
56
|
+
/**
|
|
57
|
+
* Human readable & easily communicated identifier of the application. Visible within the web application.
|
|
58
|
+
*/
|
|
59
|
+
humanId: string;
|
|
60
|
+
/**
|
|
61
|
+
* Type of the loan application
|
|
62
|
+
*/
|
|
63
|
+
applicationType: CommercialSecuredApplicationResourceApplicationType;
|
|
64
|
+
/**
|
|
65
|
+
* Current status, must be 'workshop' for new applications
|
|
66
|
+
*/
|
|
67
|
+
status: ApplicationStatus;
|
|
68
|
+
/**
|
|
69
|
+
* Email address of the broker to be associated with this application.
|
|
70
|
+
*/
|
|
71
|
+
associatedBrokerEmail?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Creation timestamp
|
|
74
|
+
*/
|
|
75
|
+
createdAt?: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Last update timestamp
|
|
78
|
+
*/
|
|
79
|
+
updatedAt?: string | undefined;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* A Commercial Application resource following JSON:API structure
|
|
84
|
+
*/
|
|
85
|
+
export type CommercialSecuredApplicationResource = {
|
|
86
|
+
type: CommercialSecuredApplicationResourceType;
|
|
87
|
+
id?: string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Application resource attributes
|
|
90
|
+
*/
|
|
91
|
+
attributes: CommercialSecuredApplicationResourceAttributes;
|
|
92
|
+
/**
|
|
93
|
+
* Relationships for a Commercial Application Resource
|
|
94
|
+
*/
|
|
95
|
+
relationships: CommercialApplicationJsonApiRelationships;
|
|
96
|
+
links?: { [k: string]: LinkObject } | undefined;
|
|
97
|
+
meta?: { [k: string]: any } | undefined;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const CommercialSecuredApplicationResourceType$inboundSchema:
|
|
102
|
+
z.ZodNativeEnum<typeof CommercialSecuredApplicationResourceType> = z
|
|
103
|
+
.nativeEnum(CommercialSecuredApplicationResourceType);
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const CommercialSecuredApplicationResourceType$outboundSchema:
|
|
107
|
+
z.ZodNativeEnum<typeof CommercialSecuredApplicationResourceType> =
|
|
108
|
+
CommercialSecuredApplicationResourceType$inboundSchema;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
113
|
+
*/
|
|
114
|
+
export namespace CommercialSecuredApplicationResourceType$ {
|
|
115
|
+
/** @deprecated use `CommercialSecuredApplicationResourceType$inboundSchema` instead. */
|
|
116
|
+
export const inboundSchema =
|
|
117
|
+
CommercialSecuredApplicationResourceType$inboundSchema;
|
|
118
|
+
/** @deprecated use `CommercialSecuredApplicationResourceType$outboundSchema` instead. */
|
|
119
|
+
export const outboundSchema =
|
|
120
|
+
CommercialSecuredApplicationResourceType$outboundSchema;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** @internal */
|
|
124
|
+
export const CommercialSecuredApplicationResourceApplicationType$inboundSchema:
|
|
125
|
+
z.ZodNativeEnum<typeof CommercialSecuredApplicationResourceApplicationType> =
|
|
126
|
+
z.nativeEnum(CommercialSecuredApplicationResourceApplicationType);
|
|
127
|
+
|
|
128
|
+
/** @internal */
|
|
129
|
+
export const CommercialSecuredApplicationResourceApplicationType$outboundSchema:
|
|
130
|
+
z.ZodNativeEnum<typeof CommercialSecuredApplicationResourceApplicationType> =
|
|
131
|
+
CommercialSecuredApplicationResourceApplicationType$inboundSchema;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @internal
|
|
135
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
136
|
+
*/
|
|
137
|
+
export namespace CommercialSecuredApplicationResourceApplicationType$ {
|
|
138
|
+
/** @deprecated use `CommercialSecuredApplicationResourceApplicationType$inboundSchema` instead. */
|
|
139
|
+
export const inboundSchema =
|
|
140
|
+
CommercialSecuredApplicationResourceApplicationType$inboundSchema;
|
|
141
|
+
/** @deprecated use `CommercialSecuredApplicationResourceApplicationType$outboundSchema` instead. */
|
|
142
|
+
export const outboundSchema =
|
|
143
|
+
CommercialSecuredApplicationResourceApplicationType$outboundSchema;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** @internal */
|
|
147
|
+
export const CommercialSecuredApplicationResourceAttributes$inboundSchema:
|
|
148
|
+
z.ZodType<
|
|
149
|
+
CommercialSecuredApplicationResourceAttributes,
|
|
150
|
+
z.ZodTypeDef,
|
|
151
|
+
unknown
|
|
152
|
+
> = z.object({
|
|
153
|
+
id: z.string(),
|
|
154
|
+
humanId: z.string(),
|
|
155
|
+
applicationType:
|
|
156
|
+
CommercialSecuredApplicationResourceApplicationType$inboundSchema,
|
|
157
|
+
status: ApplicationStatus$inboundSchema,
|
|
158
|
+
associatedBrokerEmail: z.string().optional(),
|
|
159
|
+
createdAt: z.string().optional(),
|
|
160
|
+
updatedAt: z.string().optional(),
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
/** @internal */
|
|
164
|
+
export type CommercialSecuredApplicationResourceAttributes$Outbound = {
|
|
165
|
+
id: string;
|
|
166
|
+
humanId: string;
|
|
167
|
+
applicationType: string;
|
|
168
|
+
status: string;
|
|
169
|
+
associatedBrokerEmail?: string | undefined;
|
|
170
|
+
createdAt?: string | undefined;
|
|
171
|
+
updatedAt?: string | undefined;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/** @internal */
|
|
175
|
+
export const CommercialSecuredApplicationResourceAttributes$outboundSchema:
|
|
176
|
+
z.ZodType<
|
|
177
|
+
CommercialSecuredApplicationResourceAttributes$Outbound,
|
|
178
|
+
z.ZodTypeDef,
|
|
179
|
+
CommercialSecuredApplicationResourceAttributes
|
|
180
|
+
> = z.object({
|
|
181
|
+
id: z.string(),
|
|
182
|
+
humanId: z.string(),
|
|
183
|
+
applicationType:
|
|
184
|
+
CommercialSecuredApplicationResourceApplicationType$outboundSchema,
|
|
185
|
+
status: ApplicationStatus$outboundSchema,
|
|
186
|
+
associatedBrokerEmail: z.string().optional(),
|
|
187
|
+
createdAt: z.string().optional(),
|
|
188
|
+
updatedAt: z.string().optional(),
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @internal
|
|
193
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
194
|
+
*/
|
|
195
|
+
export namespace CommercialSecuredApplicationResourceAttributes$ {
|
|
196
|
+
/** @deprecated use `CommercialSecuredApplicationResourceAttributes$inboundSchema` instead. */
|
|
197
|
+
export const inboundSchema =
|
|
198
|
+
CommercialSecuredApplicationResourceAttributes$inboundSchema;
|
|
199
|
+
/** @deprecated use `CommercialSecuredApplicationResourceAttributes$outboundSchema` instead. */
|
|
200
|
+
export const outboundSchema =
|
|
201
|
+
CommercialSecuredApplicationResourceAttributes$outboundSchema;
|
|
202
|
+
/** @deprecated use `CommercialSecuredApplicationResourceAttributes$Outbound` instead. */
|
|
203
|
+
export type Outbound =
|
|
204
|
+
CommercialSecuredApplicationResourceAttributes$Outbound;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export function commercialSecuredApplicationResourceAttributesToJSON(
|
|
208
|
+
commercialSecuredApplicationResourceAttributes:
|
|
209
|
+
CommercialSecuredApplicationResourceAttributes,
|
|
210
|
+
): string {
|
|
211
|
+
return JSON.stringify(
|
|
212
|
+
CommercialSecuredApplicationResourceAttributes$outboundSchema.parse(
|
|
213
|
+
commercialSecuredApplicationResourceAttributes,
|
|
214
|
+
),
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export function commercialSecuredApplicationResourceAttributesFromJSON(
|
|
219
|
+
jsonString: string,
|
|
220
|
+
): SafeParseResult<
|
|
221
|
+
CommercialSecuredApplicationResourceAttributes,
|
|
222
|
+
SDKValidationError
|
|
223
|
+
> {
|
|
224
|
+
return safeParse(
|
|
225
|
+
jsonString,
|
|
226
|
+
(x) =>
|
|
227
|
+
CommercialSecuredApplicationResourceAttributes$inboundSchema.parse(
|
|
228
|
+
JSON.parse(x),
|
|
229
|
+
),
|
|
230
|
+
`Failed to parse 'CommercialSecuredApplicationResourceAttributes' from JSON`,
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** @internal */
|
|
235
|
+
export const CommercialSecuredApplicationResource$inboundSchema: z.ZodType<
|
|
236
|
+
CommercialSecuredApplicationResource,
|
|
237
|
+
z.ZodTypeDef,
|
|
238
|
+
unknown
|
|
239
|
+
> = z.object({
|
|
240
|
+
type: CommercialSecuredApplicationResourceType$inboundSchema,
|
|
241
|
+
id: z.string().optional(),
|
|
242
|
+
attributes: z.lazy(() =>
|
|
243
|
+
CommercialSecuredApplicationResourceAttributes$inboundSchema
|
|
244
|
+
),
|
|
245
|
+
relationships: CommercialApplicationJsonApiRelationships$inboundSchema,
|
|
246
|
+
links: z.record(LinkObject$inboundSchema).optional(),
|
|
247
|
+
meta: z.record(z.any()).optional(),
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
/** @internal */
|
|
251
|
+
export type CommercialSecuredApplicationResource$Outbound = {
|
|
252
|
+
type: string;
|
|
253
|
+
id?: string | undefined;
|
|
254
|
+
attributes: CommercialSecuredApplicationResourceAttributes$Outbound;
|
|
255
|
+
relationships: CommercialApplicationJsonApiRelationships$Outbound;
|
|
256
|
+
links?: { [k: string]: LinkObject$Outbound } | undefined;
|
|
257
|
+
meta?: { [k: string]: any } | undefined;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export const CommercialSecuredApplicationResource$outboundSchema: z.ZodType<
|
|
262
|
+
CommercialSecuredApplicationResource$Outbound,
|
|
263
|
+
z.ZodTypeDef,
|
|
264
|
+
CommercialSecuredApplicationResource
|
|
265
|
+
> = z.object({
|
|
266
|
+
type: CommercialSecuredApplicationResourceType$outboundSchema,
|
|
267
|
+
id: z.string().optional(),
|
|
268
|
+
attributes: z.lazy(() =>
|
|
269
|
+
CommercialSecuredApplicationResourceAttributes$outboundSchema
|
|
270
|
+
),
|
|
271
|
+
relationships: CommercialApplicationJsonApiRelationships$outboundSchema,
|
|
272
|
+
links: z.record(LinkObject$outboundSchema).optional(),
|
|
273
|
+
meta: z.record(z.any()).optional(),
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* @internal
|
|
278
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
279
|
+
*/
|
|
280
|
+
export namespace CommercialSecuredApplicationResource$ {
|
|
281
|
+
/** @deprecated use `CommercialSecuredApplicationResource$inboundSchema` instead. */
|
|
282
|
+
export const inboundSchema =
|
|
283
|
+
CommercialSecuredApplicationResource$inboundSchema;
|
|
284
|
+
/** @deprecated use `CommercialSecuredApplicationResource$outboundSchema` instead. */
|
|
285
|
+
export const outboundSchema =
|
|
286
|
+
CommercialSecuredApplicationResource$outboundSchema;
|
|
287
|
+
/** @deprecated use `CommercialSecuredApplicationResource$Outbound` instead. */
|
|
288
|
+
export type Outbound = CommercialSecuredApplicationResource$Outbound;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export function commercialSecuredApplicationResourceToJSON(
|
|
292
|
+
commercialSecuredApplicationResource: CommercialSecuredApplicationResource,
|
|
293
|
+
): string {
|
|
294
|
+
return JSON.stringify(
|
|
295
|
+
CommercialSecuredApplicationResource$outboundSchema.parse(
|
|
296
|
+
commercialSecuredApplicationResource,
|
|
297
|
+
),
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export function commercialSecuredApplicationResourceFromJSON(
|
|
302
|
+
jsonString: string,
|
|
303
|
+
): SafeParseResult<CommercialSecuredApplicationResource, SDKValidationError> {
|
|
304
|
+
return safeParse(
|
|
305
|
+
jsonString,
|
|
306
|
+
(x) =>
|
|
307
|
+
CommercialSecuredApplicationResource$inboundSchema.parse(JSON.parse(x)),
|
|
308
|
+
`Failed to parse 'CommercialSecuredApplicationResource' from JSON`,
|
|
309
|
+
);
|
|
310
|
+
}
|
|
@@ -48,6 +48,7 @@ export type RegistrationState = ClosedEnum<typeof RegistrationState>;
|
|
|
48
48
|
* Type of asset for secured commercial loans
|
|
49
49
|
*/
|
|
50
50
|
export type CommercialSecuredLoanAssetAttributes = {
|
|
51
|
+
id: string;
|
|
51
52
|
/**
|
|
52
53
|
* Current age of asset as number (integer) of years
|
|
53
54
|
*/
|
|
@@ -192,6 +193,7 @@ export const CommercialSecuredLoanAssetAttributes$inboundSchema: z.ZodType<
|
|
|
192
193
|
z.ZodTypeDef,
|
|
193
194
|
unknown
|
|
194
195
|
> = z.object({
|
|
196
|
+
id: z.string(),
|
|
195
197
|
ageOfAsset: z.number().int().optional(),
|
|
196
198
|
ageOfAssetAtEnd: z.number().int().optional(),
|
|
197
199
|
condition: Condition$inboundSchema.optional(),
|
|
@@ -220,6 +222,7 @@ export const CommercialSecuredLoanAssetAttributes$inboundSchema: z.ZodType<
|
|
|
220
222
|
|
|
221
223
|
/** @internal */
|
|
222
224
|
export type CommercialSecuredLoanAssetAttributes$Outbound = {
|
|
225
|
+
id: string;
|
|
223
226
|
ageOfAsset?: number | undefined;
|
|
224
227
|
ageOfAssetAtEnd?: number | undefined;
|
|
225
228
|
condition?: string | undefined;
|
|
@@ -252,6 +255,7 @@ export const CommercialSecuredLoanAssetAttributes$outboundSchema: z.ZodType<
|
|
|
252
255
|
z.ZodTypeDef,
|
|
253
256
|
CommercialSecuredLoanAssetAttributes
|
|
254
257
|
> = z.object({
|
|
258
|
+
id: z.string(),
|
|
255
259
|
ageOfAsset: z.number().int().optional(),
|
|
256
260
|
ageOfAssetAtEnd: z.number().int().optional(),
|
|
257
261
|
condition: Condition$outboundSchema.optional(),
|