@financeable/aggregation 0.6.0 → 0.6.1
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 +12 -0
- package/docs/sdks/applications/README.md +19 -254
- 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/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/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/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/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/supportingdocuments.ts +1 -2
- 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
|
@@ -19,17 +19,34 @@ import {
|
|
|
19
19
|
SupportingDocumentAttributes$Outbound,
|
|
20
20
|
SupportingDocumentAttributes$outboundSchema,
|
|
21
21
|
} from "./supportingdocumentattributes.js";
|
|
22
|
+
import {
|
|
23
|
+
SupportingDocumentRelationships,
|
|
24
|
+
SupportingDocumentRelationships$inboundSchema,
|
|
25
|
+
SupportingDocumentRelationships$Outbound,
|
|
26
|
+
SupportingDocumentRelationships$outboundSchema,
|
|
27
|
+
} from "./supportingdocumentrelationships.js";
|
|
22
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Resource types used in the API
|
|
31
|
+
*/
|
|
23
32
|
export const CreateSupportingDocumentsResponseType = {
|
|
33
|
+
ConsumerSecuredApplications: "consumer-secured-applications",
|
|
34
|
+
CommercialSecuredApplications: "commercial-secured-applications",
|
|
24
35
|
SupportingDocuments: "supporting-documents",
|
|
36
|
+
Customers: "customers",
|
|
37
|
+
Assets: "assets",
|
|
38
|
+
Entities: "entities",
|
|
39
|
+
LoanDetails: "loan-details",
|
|
40
|
+
Addresses: "addresses",
|
|
25
41
|
} as const;
|
|
42
|
+
/**
|
|
43
|
+
* Resource types used in the API
|
|
44
|
+
*/
|
|
26
45
|
export type CreateSupportingDocumentsResponseType = ClosedEnum<
|
|
27
46
|
typeof CreateSupportingDocumentsResponseType
|
|
28
47
|
>;
|
|
29
48
|
|
|
30
|
-
export type
|
|
31
|
-
|
|
32
|
-
export type CreateSupportingDocumentsResponseLinks = {
|
|
49
|
+
export type Links = {
|
|
33
50
|
/**
|
|
34
51
|
* Standard link object
|
|
35
52
|
*/
|
|
@@ -38,10 +55,10 @@ export type CreateSupportingDocumentsResponseLinks = {
|
|
|
38
55
|
|
|
39
56
|
export type CreateSupportingDocumentsResponse = {
|
|
40
57
|
type: CreateSupportingDocumentsResponseType;
|
|
41
|
-
id
|
|
42
|
-
attributes
|
|
43
|
-
relationships:
|
|
44
|
-
links?:
|
|
58
|
+
id?: string | undefined;
|
|
59
|
+
attributes: SupportingDocumentAttributes;
|
|
60
|
+
relationships: SupportingDocumentRelationships;
|
|
61
|
+
links?: Links | undefined;
|
|
45
62
|
meta?: { [k: string]: any } | undefined;
|
|
46
63
|
};
|
|
47
64
|
|
|
@@ -70,68 +87,21 @@ export namespace CreateSupportingDocumentsResponseType$ {
|
|
|
70
87
|
}
|
|
71
88
|
|
|
72
89
|
/** @internal */
|
|
73
|
-
export const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
> = z.object({});
|
|
78
|
-
|
|
79
|
-
/** @internal */
|
|
80
|
-
export type Relationships$Outbound = {};
|
|
90
|
+
export const Links$inboundSchema: z.ZodType<Links, z.ZodTypeDef, unknown> = z
|
|
91
|
+
.object({
|
|
92
|
+
upload: LinkObject$inboundSchema,
|
|
93
|
+
});
|
|
81
94
|
|
|
82
95
|
/** @internal */
|
|
83
|
-
export
|
|
84
|
-
Relationships$Outbound,
|
|
85
|
-
z.ZodTypeDef,
|
|
86
|
-
Relationships
|
|
87
|
-
> = z.object({});
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @internal
|
|
91
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
92
|
-
*/
|
|
93
|
-
export namespace Relationships$ {
|
|
94
|
-
/** @deprecated use `Relationships$inboundSchema` instead. */
|
|
95
|
-
export const inboundSchema = Relationships$inboundSchema;
|
|
96
|
-
/** @deprecated use `Relationships$outboundSchema` instead. */
|
|
97
|
-
export const outboundSchema = Relationships$outboundSchema;
|
|
98
|
-
/** @deprecated use `Relationships$Outbound` instead. */
|
|
99
|
-
export type Outbound = Relationships$Outbound;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export function relationshipsToJSON(relationships: Relationships): string {
|
|
103
|
-
return JSON.stringify(Relationships$outboundSchema.parse(relationships));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export function relationshipsFromJSON(
|
|
107
|
-
jsonString: string,
|
|
108
|
-
): SafeParseResult<Relationships, SDKValidationError> {
|
|
109
|
-
return safeParse(
|
|
110
|
-
jsonString,
|
|
111
|
-
(x) => Relationships$inboundSchema.parse(JSON.parse(x)),
|
|
112
|
-
`Failed to parse 'Relationships' from JSON`,
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/** @internal */
|
|
117
|
-
export const CreateSupportingDocumentsResponseLinks$inboundSchema: z.ZodType<
|
|
118
|
-
CreateSupportingDocumentsResponseLinks,
|
|
119
|
-
z.ZodTypeDef,
|
|
120
|
-
unknown
|
|
121
|
-
> = z.object({
|
|
122
|
-
upload: LinkObject$inboundSchema,
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
/** @internal */
|
|
126
|
-
export type CreateSupportingDocumentsResponseLinks$Outbound = {
|
|
96
|
+
export type Links$Outbound = {
|
|
127
97
|
upload: LinkObject$Outbound;
|
|
128
98
|
};
|
|
129
99
|
|
|
130
100
|
/** @internal */
|
|
131
|
-
export const
|
|
132
|
-
|
|
101
|
+
export const Links$outboundSchema: z.ZodType<
|
|
102
|
+
Links$Outbound,
|
|
133
103
|
z.ZodTypeDef,
|
|
134
|
-
|
|
104
|
+
Links
|
|
135
105
|
> = z.object({
|
|
136
106
|
upload: LinkObject$outboundSchema,
|
|
137
107
|
});
|
|
@@ -140,36 +110,26 @@ export const CreateSupportingDocumentsResponseLinks$outboundSchema: z.ZodType<
|
|
|
140
110
|
* @internal
|
|
141
111
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
142
112
|
*/
|
|
143
|
-
export namespace
|
|
144
|
-
/** @deprecated use `
|
|
145
|
-
export const inboundSchema =
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
/** @deprecated use `CreateSupportingDocumentsResponseLinks$Outbound` instead. */
|
|
151
|
-
export type Outbound = CreateSupportingDocumentsResponseLinks$Outbound;
|
|
113
|
+
export namespace Links$ {
|
|
114
|
+
/** @deprecated use `Links$inboundSchema` instead. */
|
|
115
|
+
export const inboundSchema = Links$inboundSchema;
|
|
116
|
+
/** @deprecated use `Links$outboundSchema` instead. */
|
|
117
|
+
export const outboundSchema = Links$outboundSchema;
|
|
118
|
+
/** @deprecated use `Links$Outbound` instead. */
|
|
119
|
+
export type Outbound = Links$Outbound;
|
|
152
120
|
}
|
|
153
121
|
|
|
154
|
-
export function
|
|
155
|
-
|
|
156
|
-
CreateSupportingDocumentsResponseLinks,
|
|
157
|
-
): string {
|
|
158
|
-
return JSON.stringify(
|
|
159
|
-
CreateSupportingDocumentsResponseLinks$outboundSchema.parse(
|
|
160
|
-
createSupportingDocumentsResponseLinks,
|
|
161
|
-
),
|
|
162
|
-
);
|
|
122
|
+
export function linksToJSON(links: Links): string {
|
|
123
|
+
return JSON.stringify(Links$outboundSchema.parse(links));
|
|
163
124
|
}
|
|
164
125
|
|
|
165
|
-
export function
|
|
126
|
+
export function linksFromJSON(
|
|
166
127
|
jsonString: string,
|
|
167
|
-
): SafeParseResult<
|
|
128
|
+
): SafeParseResult<Links, SDKValidationError> {
|
|
168
129
|
return safeParse(
|
|
169
130
|
jsonString,
|
|
170
|
-
(x) =>
|
|
171
|
-
|
|
172
|
-
`Failed to parse 'CreateSupportingDocumentsResponseLinks' from JSON`,
|
|
131
|
+
(x) => Links$inboundSchema.parse(JSON.parse(x)),
|
|
132
|
+
`Failed to parse 'Links' from JSON`,
|
|
173
133
|
);
|
|
174
134
|
}
|
|
175
135
|
|
|
@@ -180,24 +140,20 @@ export const CreateSupportingDocumentsResponse$inboundSchema: z.ZodType<
|
|
|
180
140
|
unknown
|
|
181
141
|
> = z.object({
|
|
182
142
|
type: CreateSupportingDocumentsResponseType$inboundSchema,
|
|
183
|
-
id: z.string(),
|
|
184
|
-
attributes: SupportingDocumentAttributes$inboundSchema
|
|
185
|
-
relationships:
|
|
186
|
-
links: z.
|
|
187
|
-
z.lazy(() => CreateSupportingDocumentsResponseLinks$inboundSchema),
|
|
188
|
-
).optional(),
|
|
143
|
+
id: z.string().optional(),
|
|
144
|
+
attributes: SupportingDocumentAttributes$inboundSchema,
|
|
145
|
+
relationships: SupportingDocumentRelationships$inboundSchema,
|
|
146
|
+
links: z.lazy(() => Links$inboundSchema).optional(),
|
|
189
147
|
meta: z.record(z.any()).optional(),
|
|
190
148
|
});
|
|
191
149
|
|
|
192
150
|
/** @internal */
|
|
193
151
|
export type CreateSupportingDocumentsResponse$Outbound = {
|
|
194
152
|
type: string;
|
|
195
|
-
id
|
|
196
|
-
attributes
|
|
197
|
-
relationships:
|
|
198
|
-
links?:
|
|
199
|
-
| { [k: string]: CreateSupportingDocumentsResponseLinks$Outbound }
|
|
200
|
-
| undefined;
|
|
153
|
+
id?: string | undefined;
|
|
154
|
+
attributes: SupportingDocumentAttributes$Outbound;
|
|
155
|
+
relationships: SupportingDocumentRelationships$Outbound;
|
|
156
|
+
links?: Links$Outbound | undefined;
|
|
201
157
|
meta?: { [k: string]: any } | undefined;
|
|
202
158
|
};
|
|
203
159
|
|
|
@@ -208,12 +164,10 @@ export const CreateSupportingDocumentsResponse$outboundSchema: z.ZodType<
|
|
|
208
164
|
CreateSupportingDocumentsResponse
|
|
209
165
|
> = z.object({
|
|
210
166
|
type: CreateSupportingDocumentsResponseType$outboundSchema,
|
|
211
|
-
id: z.string(),
|
|
212
|
-
attributes: SupportingDocumentAttributes$outboundSchema
|
|
213
|
-
relationships:
|
|
214
|
-
links: z.
|
|
215
|
-
z.lazy(() => CreateSupportingDocumentsResponseLinks$outboundSchema),
|
|
216
|
-
).optional(),
|
|
167
|
+
id: z.string().optional(),
|
|
168
|
+
attributes: SupportingDocumentAttributes$outboundSchema,
|
|
169
|
+
relationships: SupportingDocumentRelationships$outboundSchema,
|
|
170
|
+
links: z.lazy(() => Links$outboundSchema).optional(),
|
|
217
171
|
meta: z.record(z.any()).optional(),
|
|
218
172
|
});
|
|
219
173
|
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
* A customer of the proposed financing
|
|
22
22
|
*/
|
|
23
23
|
export type CustomerAttributes = {
|
|
24
|
+
id: string;
|
|
24
25
|
/**
|
|
25
26
|
* Title of the customer
|
|
26
27
|
*/
|
|
@@ -69,6 +70,7 @@ export const CustomerAttributes$inboundSchema: z.ZodType<
|
|
|
69
70
|
z.ZodTypeDef,
|
|
70
71
|
unknown
|
|
71
72
|
> = z.object({
|
|
73
|
+
id: z.string(),
|
|
72
74
|
title: CustomerTitle$inboundSchema,
|
|
73
75
|
firstName: z.string(),
|
|
74
76
|
middleNames: z.string().optional(),
|
|
@@ -83,6 +85,7 @@ export const CustomerAttributes$inboundSchema: z.ZodType<
|
|
|
83
85
|
|
|
84
86
|
/** @internal */
|
|
85
87
|
export type CustomerAttributes$Outbound = {
|
|
88
|
+
id: string;
|
|
86
89
|
title: string;
|
|
87
90
|
firstName: string;
|
|
88
91
|
middleNames?: string | undefined;
|
|
@@ -101,6 +104,7 @@ export const CustomerAttributes$outboundSchema: z.ZodType<
|
|
|
101
104
|
z.ZodTypeDef,
|
|
102
105
|
CustomerAttributes
|
|
103
106
|
> = z.object({
|
|
107
|
+
id: z.string(),
|
|
104
108
|
title: CustomerTitle$outboundSchema,
|
|
105
109
|
firstName: z.string(),
|
|
106
110
|
middleNames: z.string().optional(),
|
|
@@ -8,6 +8,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
10
|
export type EntityAttributes = {
|
|
11
|
+
id: string;
|
|
11
12
|
entityName: string;
|
|
12
13
|
abn: string;
|
|
13
14
|
turnover?: number | undefined;
|
|
@@ -22,6 +23,7 @@ export const EntityAttributes$inboundSchema: z.ZodType<
|
|
|
22
23
|
z.ZodTypeDef,
|
|
23
24
|
unknown
|
|
24
25
|
> = z.object({
|
|
26
|
+
id: z.string(),
|
|
25
27
|
entityName: z.string(),
|
|
26
28
|
abn: z.string(),
|
|
27
29
|
turnover: z.number().int().optional(),
|
|
@@ -32,6 +34,7 @@ export const EntityAttributes$inboundSchema: z.ZodType<
|
|
|
32
34
|
|
|
33
35
|
/** @internal */
|
|
34
36
|
export type EntityAttributes$Outbound = {
|
|
37
|
+
id: string;
|
|
35
38
|
entityName: string;
|
|
36
39
|
abn: string;
|
|
37
40
|
turnover?: number | undefined;
|
|
@@ -46,6 +49,7 @@ export const EntityAttributes$outboundSchema: z.ZodType<
|
|
|
46
49
|
z.ZodTypeDef,
|
|
47
50
|
EntityAttributes
|
|
48
51
|
> = z.object({
|
|
52
|
+
id: z.string(),
|
|
49
53
|
entityName: z.string(),
|
|
50
54
|
abn: z.string(),
|
|
51
55
|
turnover: z.number().int().optional(),
|
|
@@ -9,14 +9,14 @@ export * from "./applicationstatus.js";
|
|
|
9
9
|
export * from "./australianstatesandterritories.js";
|
|
10
10
|
export * from "./badrequesterror.js";
|
|
11
11
|
export * from "./commercialapplicationjsonapirelationships.js";
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./
|
|
12
|
+
export * from "./commercialsecuredapplicationpayload.js";
|
|
13
|
+
export * from "./commercialsecuredapplicationresource.js";
|
|
14
14
|
export * from "./commercialsecuredloanassetattributes.js";
|
|
15
15
|
export * from "./commercialsecuredloanassettype.js";
|
|
16
16
|
export * from "./commercialsecuredloancommercialapplicationrelationships.js";
|
|
17
17
|
export * from "./consumerapplicationjsonapirelationships.js";
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
18
|
+
export * from "./consumersecuredapplicationpayload.js";
|
|
19
|
+
export * from "./consumersecuredapplicationresource.js";
|
|
20
20
|
export * from "./consumersecuredloanassetattributes.js";
|
|
21
21
|
export * from "./consumersecuredloanassettype.js";
|
|
22
22
|
export * from "./consumersecuredloanconsumerapplicationrelationships.js";
|
|
@@ -34,7 +34,6 @@ export * from "./loandetailsattributes.js";
|
|
|
34
34
|
export * from "./relationshipresourcenotfound.js";
|
|
35
35
|
export * from "./repaymentstructure.js";
|
|
36
36
|
export * from "./resourcenotfound.js";
|
|
37
|
-
export * from "./resourcetypes.js";
|
|
38
37
|
export * from "./security.js";
|
|
39
38
|
export * from "./supportingdocumentattributes.js";
|
|
40
39
|
export * from "./supportingdocumentattributesinput.js";
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
* Loan details model
|
|
22
22
|
*/
|
|
23
23
|
export type LoanDetailsAttributes = {
|
|
24
|
+
id: string;
|
|
24
25
|
/**
|
|
25
26
|
* Number of repayments as integer
|
|
26
27
|
*/
|
|
@@ -93,6 +94,7 @@ export const LoanDetailsAttributes$inboundSchema: z.ZodType<
|
|
|
93
94
|
z.ZodTypeDef,
|
|
94
95
|
unknown
|
|
95
96
|
> = z.object({
|
|
97
|
+
id: z.string(),
|
|
96
98
|
repayments: z.number().int().optional(),
|
|
97
99
|
repaymentFrequency: FrequencyType$inboundSchema.optional(),
|
|
98
100
|
repaymentStructure: RepaymentStructure$inboundSchema.optional(),
|
|
@@ -113,6 +115,7 @@ export const LoanDetailsAttributes$inboundSchema: z.ZodType<
|
|
|
113
115
|
|
|
114
116
|
/** @internal */
|
|
115
117
|
export type LoanDetailsAttributes$Outbound = {
|
|
118
|
+
id: string;
|
|
116
119
|
repayments?: number | undefined;
|
|
117
120
|
repaymentFrequency?: string | undefined;
|
|
118
121
|
repaymentStructure?: string | undefined;
|
|
@@ -137,6 +140,7 @@ export const LoanDetailsAttributes$outboundSchema: z.ZodType<
|
|
|
137
140
|
z.ZodTypeDef,
|
|
138
141
|
LoanDetailsAttributes
|
|
139
142
|
> = z.object({
|
|
143
|
+
id: z.string(),
|
|
140
144
|
repayments: z.number().int().optional(),
|
|
141
145
|
repaymentFrequency: FrequencyType$outboundSchema.optional(),
|
|
142
146
|
repaymentStructure: RepaymentStructure$outboundSchema.optional(),
|
|
@@ -7,6 +7,12 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
LinkObject,
|
|
12
|
+
LinkObject$inboundSchema,
|
|
13
|
+
LinkObject$Outbound,
|
|
14
|
+
LinkObject$outboundSchema,
|
|
15
|
+
} from "./linkobject.js";
|
|
10
16
|
import {
|
|
11
17
|
SupportingDocumentAttributesInput,
|
|
12
18
|
SupportingDocumentAttributesInput$inboundSchema,
|
|
@@ -25,13 +31,11 @@ export const Type = {
|
|
|
25
31
|
} as const;
|
|
26
32
|
export type Type = ClosedEnum<typeof Type>;
|
|
27
33
|
|
|
28
|
-
export type Links = {};
|
|
29
|
-
|
|
30
34
|
export type SupportingDocumentResource = {
|
|
31
35
|
type: Type;
|
|
32
|
-
attributes
|
|
36
|
+
attributes: SupportingDocumentAttributesInput;
|
|
33
37
|
relationships: SupportingDocumentRelationships;
|
|
34
|
-
links?: { [k: string]:
|
|
38
|
+
links?: { [k: string]: LinkObject } | undefined;
|
|
35
39
|
meta?: { [k: string]: any } | undefined;
|
|
36
40
|
};
|
|
37
41
|
|
|
@@ -55,47 +59,6 @@ export namespace Type$ {
|
|
|
55
59
|
export const outboundSchema = Type$outboundSchema;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
|
-
/** @internal */
|
|
59
|
-
export const Links$inboundSchema: z.ZodType<Links, z.ZodTypeDef, unknown> = z
|
|
60
|
-
.object({});
|
|
61
|
-
|
|
62
|
-
/** @internal */
|
|
63
|
-
export type Links$Outbound = {};
|
|
64
|
-
|
|
65
|
-
/** @internal */
|
|
66
|
-
export const Links$outboundSchema: z.ZodType<
|
|
67
|
-
Links$Outbound,
|
|
68
|
-
z.ZodTypeDef,
|
|
69
|
-
Links
|
|
70
|
-
> = z.object({});
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @internal
|
|
74
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
|
-
*/
|
|
76
|
-
export namespace Links$ {
|
|
77
|
-
/** @deprecated use `Links$inboundSchema` instead. */
|
|
78
|
-
export const inboundSchema = Links$inboundSchema;
|
|
79
|
-
/** @deprecated use `Links$outboundSchema` instead. */
|
|
80
|
-
export const outboundSchema = Links$outboundSchema;
|
|
81
|
-
/** @deprecated use `Links$Outbound` instead. */
|
|
82
|
-
export type Outbound = Links$Outbound;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export function linksToJSON(links: Links): string {
|
|
86
|
-
return JSON.stringify(Links$outboundSchema.parse(links));
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export function linksFromJSON(
|
|
90
|
-
jsonString: string,
|
|
91
|
-
): SafeParseResult<Links, SDKValidationError> {
|
|
92
|
-
return safeParse(
|
|
93
|
-
jsonString,
|
|
94
|
-
(x) => Links$inboundSchema.parse(JSON.parse(x)),
|
|
95
|
-
`Failed to parse 'Links' from JSON`,
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
62
|
/** @internal */
|
|
100
63
|
export const SupportingDocumentResource$inboundSchema: z.ZodType<
|
|
101
64
|
SupportingDocumentResource,
|
|
@@ -103,18 +66,18 @@ export const SupportingDocumentResource$inboundSchema: z.ZodType<
|
|
|
103
66
|
unknown
|
|
104
67
|
> = z.object({
|
|
105
68
|
type: Type$inboundSchema,
|
|
106
|
-
attributes: SupportingDocumentAttributesInput$inboundSchema
|
|
69
|
+
attributes: SupportingDocumentAttributesInput$inboundSchema,
|
|
107
70
|
relationships: SupportingDocumentRelationships$inboundSchema,
|
|
108
|
-
links: z.record(
|
|
71
|
+
links: z.record(LinkObject$inboundSchema).optional(),
|
|
109
72
|
meta: z.record(z.any()).optional(),
|
|
110
73
|
});
|
|
111
74
|
|
|
112
75
|
/** @internal */
|
|
113
76
|
export type SupportingDocumentResource$Outbound = {
|
|
114
77
|
type: string;
|
|
115
|
-
attributes
|
|
78
|
+
attributes: SupportingDocumentAttributesInput$Outbound;
|
|
116
79
|
relationships: SupportingDocumentRelationships$Outbound;
|
|
117
|
-
links?: { [k: string]:
|
|
80
|
+
links?: { [k: string]: LinkObject$Outbound } | undefined;
|
|
118
81
|
meta?: { [k: string]: any } | undefined;
|
|
119
82
|
};
|
|
120
83
|
|
|
@@ -125,9 +88,9 @@ export const SupportingDocumentResource$outboundSchema: z.ZodType<
|
|
|
125
88
|
SupportingDocumentResource
|
|
126
89
|
> = z.object({
|
|
127
90
|
type: Type$outboundSchema,
|
|
128
|
-
attributes: SupportingDocumentAttributesInput$outboundSchema
|
|
91
|
+
attributes: SupportingDocumentAttributesInput$outboundSchema,
|
|
129
92
|
relationships: SupportingDocumentRelationships$outboundSchema,
|
|
130
|
-
links: z.record(
|
|
93
|
+
links: z.record(LinkObject$outboundSchema).optional(),
|
|
131
94
|
meta: z.record(z.any()).optional(),
|
|
132
95
|
});
|
|
133
96
|
|
|
@@ -5,6 +5,35 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import * as components from "../components/index.js";
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* The server cannot find the requested resource.
|
|
10
|
+
*/
|
|
11
|
+
export type CreateApplicationApplicationsResponseBodyData = {
|
|
12
|
+
errors: Array<components.ResourceNotFound>;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The server cannot find the requested resource.
|
|
17
|
+
*/
|
|
18
|
+
export class CreateApplicationApplicationsResponseBody extends Error {
|
|
19
|
+
errors: Array<components.ResourceNotFound>;
|
|
20
|
+
|
|
21
|
+
/** The original data that was passed to this error instance. */
|
|
22
|
+
data$: CreateApplicationApplicationsResponseBodyData;
|
|
23
|
+
|
|
24
|
+
constructor(err: CreateApplicationApplicationsResponseBodyData) {
|
|
25
|
+
const message = "message" in err && typeof err.message === "string"
|
|
26
|
+
? err.message
|
|
27
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
28
|
+
super(message);
|
|
29
|
+
this.data$ = err;
|
|
30
|
+
|
|
31
|
+
this.errors = err.errors;
|
|
32
|
+
|
|
33
|
+
this.name = "CreateApplicationApplicationsResponseBody";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
8
37
|
/**
|
|
9
38
|
* Access is forbidden.
|
|
10
39
|
*/
|
|
@@ -34,6 +63,50 @@ export class CreateApplicationResponseBody extends Error {
|
|
|
34
63
|
}
|
|
35
64
|
}
|
|
36
65
|
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const CreateApplicationApplicationsResponseBody$inboundSchema: z.ZodType<
|
|
68
|
+
CreateApplicationApplicationsResponseBody,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
unknown
|
|
71
|
+
> = z.object({
|
|
72
|
+
errors: z.array(components.ResourceNotFound$inboundSchema),
|
|
73
|
+
})
|
|
74
|
+
.transform((v) => {
|
|
75
|
+
return new CreateApplicationApplicationsResponseBody(v);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export type CreateApplicationApplicationsResponseBody$Outbound = {
|
|
80
|
+
errors: Array<components.ResourceNotFound$Outbound>;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const CreateApplicationApplicationsResponseBody$outboundSchema:
|
|
85
|
+
z.ZodType<
|
|
86
|
+
CreateApplicationApplicationsResponseBody$Outbound,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
CreateApplicationApplicationsResponseBody
|
|
89
|
+
> = z.instanceof(CreateApplicationApplicationsResponseBody)
|
|
90
|
+
.transform(v => v.data$)
|
|
91
|
+
.pipe(z.object({
|
|
92
|
+
errors: z.array(components.ResourceNotFound$outboundSchema),
|
|
93
|
+
}));
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
98
|
+
*/
|
|
99
|
+
export namespace CreateApplicationApplicationsResponseBody$ {
|
|
100
|
+
/** @deprecated use `CreateApplicationApplicationsResponseBody$inboundSchema` instead. */
|
|
101
|
+
export const inboundSchema =
|
|
102
|
+
CreateApplicationApplicationsResponseBody$inboundSchema;
|
|
103
|
+
/** @deprecated use `CreateApplicationApplicationsResponseBody$outboundSchema` instead. */
|
|
104
|
+
export const outboundSchema =
|
|
105
|
+
CreateApplicationApplicationsResponseBody$outboundSchema;
|
|
106
|
+
/** @deprecated use `CreateApplicationApplicationsResponseBody$Outbound` instead. */
|
|
107
|
+
export type Outbound = CreateApplicationApplicationsResponseBody$Outbound;
|
|
108
|
+
}
|
|
109
|
+
|
|
37
110
|
/** @internal */
|
|
38
111
|
export const CreateApplicationResponseBody$inboundSchema: z.ZodType<
|
|
39
112
|
CreateApplicationResponseBody,
|