@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.
Files changed (140) hide show
  1. package/FUNCTIONS.md +4 -0
  2. package/README.md +12 -0
  3. package/docs/sdks/applications/README.md +19 -254
  4. package/docs/sdks/supportingdocuments/README.md +9 -1
  5. package/funcs/applicationsCreate.d.ts +1 -1
  6. package/funcs/applicationsCreate.d.ts.map +1 -1
  7. package/funcs/applicationsCreate.js +2 -2
  8. package/funcs/applicationsCreate.js.map +1 -1
  9. package/funcs/supportingDocumentsCreate.d.ts +1 -2
  10. package/funcs/supportingDocumentsCreate.d.ts.map +1 -1
  11. package/funcs/supportingDocumentsCreate.js +1 -2
  12. package/funcs/supportingDocumentsCreate.js.map +1 -1
  13. package/jsr.json +1 -1
  14. package/lib/config.d.ts +2 -2
  15. package/lib/config.js +2 -2
  16. package/models/components/addressattributes.d.ts +2 -0
  17. package/models/components/addressattributes.d.ts.map +1 -1
  18. package/models/components/addressattributes.js +2 -0
  19. package/models/components/addressattributes.js.map +1 -1
  20. package/models/components/applicationresource.d.ts +4 -4
  21. package/models/components/applicationresource.d.ts.map +1 -1
  22. package/models/components/applicationresource.js +6 -6
  23. package/models/components/applicationresource.js.map +1 -1
  24. package/models/components/{commercialsecuredloanapplicationsubmissionpayload.d.ts → commercialsecuredapplicationpayload.d.ts} +64 -24
  25. package/models/components/commercialsecuredapplicationpayload.d.ts.map +1 -0
  26. package/models/components/{commercialsecuredloanapplicationsubmissionpayload.js → commercialsecuredapplicationpayload.js} +47 -33
  27. package/models/components/commercialsecuredapplicationpayload.js.map +1 -0
  28. package/models/components/commercialsecuredapplicationresource.d.ts +171 -0
  29. package/models/components/commercialsecuredapplicationresource.d.ts.map +1 -0
  30. package/models/components/commercialsecuredapplicationresource.js +161 -0
  31. package/models/components/commercialsecuredapplicationresource.js.map +1 -0
  32. package/models/components/commercialsecuredloanassetattributes.d.ts +2 -0
  33. package/models/components/commercialsecuredloanassetattributes.d.ts.map +1 -1
  34. package/models/components/commercialsecuredloanassetattributes.js +2 -0
  35. package/models/components/commercialsecuredloanassetattributes.js.map +1 -1
  36. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +99 -17
  37. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -1
  38. package/models/components/commercialsecuredloancommercialapplicationrelationships.js +67 -23
  39. package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +1 -1
  40. package/models/components/consumersecuredapplicationpayload.d.ts +164 -0
  41. package/models/components/consumersecuredapplicationpayload.d.ts.map +1 -0
  42. package/models/components/consumersecuredapplicationpayload.js +158 -0
  43. package/models/components/consumersecuredapplicationpayload.js.map +1 -0
  44. package/models/components/consumersecuredapplicationresource.d.ts +171 -0
  45. package/models/components/consumersecuredapplicationresource.d.ts.map +1 -0
  46. package/models/components/consumersecuredapplicationresource.js +161 -0
  47. package/models/components/consumersecuredapplicationresource.js.map +1 -0
  48. package/models/components/consumersecuredloanassetattributes.d.ts +2 -0
  49. package/models/components/consumersecuredloanassetattributes.d.ts.map +1 -1
  50. package/models/components/consumersecuredloanassetattributes.js +2 -0
  51. package/models/components/consumersecuredloanassetattributes.js.map +1 -1
  52. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +51 -2
  53. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -1
  54. package/models/components/consumersecuredloanconsumerapplicationrelationships.js +19 -2
  55. package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -1
  56. package/models/components/createsupportingdocumentsresponse.d.ts +49 -46
  57. package/models/components/createsupportingdocumentsresponse.d.ts.map +1 -1
  58. package/models/components/createsupportingdocumentsresponse.js +36 -47
  59. package/models/components/createsupportingdocumentsresponse.js.map +1 -1
  60. package/models/components/customerattributes.d.ts +2 -0
  61. package/models/components/customerattributes.d.ts.map +1 -1
  62. package/models/components/customerattributes.js +2 -0
  63. package/models/components/customerattributes.js.map +1 -1
  64. package/models/components/entityattributes.d.ts +2 -0
  65. package/models/components/entityattributes.d.ts.map +1 -1
  66. package/models/components/entityattributes.js +2 -0
  67. package/models/components/entityattributes.js.map +1 -1
  68. package/models/components/index.d.ts +4 -5
  69. package/models/components/index.d.ts.map +1 -1
  70. package/models/components/index.js +4 -5
  71. package/models/components/index.js.map +1 -1
  72. package/models/components/loandetailsattributes.d.ts +2 -0
  73. package/models/components/loandetailsattributes.d.ts.map +1 -1
  74. package/models/components/loandetailsattributes.js +2 -0
  75. package/models/components/loandetailsattributes.js.map +1 -1
  76. package/models/components/supportingdocumentresource.d.ts +5 -25
  77. package/models/components/supportingdocumentresource.d.ts.map +1 -1
  78. package/models/components/supportingdocumentresource.js +6 -29
  79. package/models/components/supportingdocumentresource.js.map +1 -1
  80. package/models/errors/createapplication.d.ts +35 -0
  81. package/models/errors/createapplication.d.ts.map +1 -1
  82. package/models/errors/createapplication.js +40 -1
  83. package/models/errors/createapplication.js.map +1 -1
  84. package/models/operations/createapplication.d.ts +6 -112
  85. package/models/operations/createapplication.d.ts.map +1 -1
  86. package/models/operations/createapplication.js +11 -118
  87. package/models/operations/createapplication.js.map +1 -1
  88. package/models/operations/supportingdocumentscreate.d.ts +34 -0
  89. package/models/operations/supportingdocumentscreate.d.ts.map +1 -1
  90. package/models/operations/supportingdocumentscreate.js +28 -1
  91. package/models/operations/supportingdocumentscreate.js.map +1 -1
  92. package/package.json +1 -1
  93. package/sdk/supportingdocuments.d.ts +1 -2
  94. package/sdk/supportingdocuments.d.ts.map +1 -1
  95. package/sdk/supportingdocuments.js.map +1 -1
  96. package/src/funcs/applicationsCreate.ts +8 -1
  97. package/src/funcs/supportingDocumentsCreate.ts +4 -5
  98. package/src/lib/config.ts +2 -2
  99. package/src/models/components/addressattributes.ts +4 -0
  100. package/src/models/components/applicationresource.ts +18 -18
  101. package/src/models/components/{commercialsecuredloanapplicationsubmissionpayload.ts → commercialsecuredapplicationpayload.ts} +82 -71
  102. package/src/models/components/commercialsecuredapplicationresource.ts +310 -0
  103. package/src/models/components/commercialsecuredloanassetattributes.ts +4 -0
  104. package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +159 -69
  105. package/src/models/components/consumersecuredapplicationpayload.ts +273 -0
  106. package/src/models/components/consumersecuredapplicationresource.ts +309 -0
  107. package/src/models/components/consumersecuredloanassetattributes.ts +4 -0
  108. package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +44 -8
  109. package/src/models/components/createsupportingdocumentsresponse.ts +57 -103
  110. package/src/models/components/customerattributes.ts +4 -0
  111. package/src/models/components/entityattributes.ts +4 -0
  112. package/src/models/components/index.ts +4 -5
  113. package/src/models/components/loandetailsattributes.ts +4 -0
  114. package/src/models/components/supportingdocumentresource.ts +14 -51
  115. package/src/models/errors/createapplication.ts +73 -0
  116. package/src/models/operations/createapplication.ts +20 -229
  117. package/src/models/operations/supportingdocumentscreate.ts +72 -0
  118. package/src/sdk/supportingdocuments.ts +1 -2
  119. package/models/components/commercialapplicationresource.d.ts +0 -191
  120. package/models/components/commercialapplicationresource.d.ts.map +0 -1
  121. package/models/components/commercialapplicationresource.js +0 -183
  122. package/models/components/commercialapplicationresource.js.map +0 -1
  123. package/models/components/commercialsecuredloanapplicationsubmissionpayload.d.ts.map +0 -1
  124. package/models/components/commercialsecuredloanapplicationsubmissionpayload.js.map +0 -1
  125. package/models/components/consumerapplicationresource.d.ts +0 -191
  126. package/models/components/consumerapplicationresource.d.ts.map +0 -1
  127. package/models/components/consumerapplicationresource.js +0 -187
  128. package/models/components/consumerapplicationresource.js.map +0 -1
  129. package/models/components/consumersecuredloanapplicationsubmissionpayload.d.ts +0 -124
  130. package/models/components/consumersecuredloanapplicationsubmissionpayload.d.ts.map +0 -1
  131. package/models/components/consumersecuredloanapplicationsubmissionpayload.js +0 -146
  132. package/models/components/consumersecuredloanapplicationsubmissionpayload.js.map +0 -1
  133. package/models/components/resourcetypes.d.ts +0 -46
  134. package/models/components/resourcetypes.d.ts.map +0 -1
  135. package/models/components/resourcetypes.js +0 -66
  136. package/models/components/resourcetypes.js.map +0 -1
  137. package/src/models/components/commercialapplicationresource.ts +0 -355
  138. package/src/models/components/consumerapplicationresource.ts +0 -342
  139. package/src/models/components/consumersecuredloanapplicationsubmissionpayload.ts +0 -270
  140. package/src/models/components/resourcetypes.ts +0 -39
@@ -9,28 +9,13 @@ import * as components from "../components/index.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type Data =
12
- | components.CommercialSecuredLoanApplicationSubmissionPayload
13
- | components.ConsumerSecuredLoanApplicationSubmissionPayload;
12
+ | components.CommercialSecuredApplicationPayload
13
+ | components.ConsumerSecuredApplicationPayload;
14
14
 
15
15
  export type CreateApplicationRequestBody = {
16
16
  data:
17
- | components.CommercialSecuredLoanApplicationSubmissionPayload
18
- | components.ConsumerSecuredLoanApplicationSubmissionPayload;
19
- };
20
-
21
- export type Attributes = {};
22
-
23
- export type Relationships = {};
24
-
25
- export type Links = {};
26
-
27
- export type Included = {
28
- type: components.ResourceTypes;
29
- id: string;
30
- attributes?: Attributes | undefined;
31
- relationships: Relationships;
32
- links?: { [k: string]: Links } | undefined;
33
- meta?: { [k: string]: any } | undefined;
17
+ | components.CommercialSecuredApplicationPayload
18
+ | components.ConsumerSecuredApplicationPayload;
34
19
  };
35
20
 
36
21
  /**
@@ -41,7 +26,7 @@ export type CreateApplicationResponseBody = {
41
26
  * Represents either a Consumer or Commercial Application resource
42
27
  */
43
28
  data: components.ApplicationResource;
44
- included?: Array<Included> | undefined;
29
+ included?: Array<components.ApplicationResource> | undefined;
45
30
  /**
46
31
  * Standard link object
47
32
  */
@@ -51,20 +36,20 @@ export type CreateApplicationResponseBody = {
51
36
  /** @internal */
52
37
  export const Data$inboundSchema: z.ZodType<Data, z.ZodTypeDef, unknown> = z
53
38
  .union([
54
- components.CommercialSecuredLoanApplicationSubmissionPayload$inboundSchema,
55
- components.ConsumerSecuredLoanApplicationSubmissionPayload$inboundSchema,
39
+ components.CommercialSecuredApplicationPayload$inboundSchema,
40
+ components.ConsumerSecuredApplicationPayload$inboundSchema,
56
41
  ]);
57
42
 
58
43
  /** @internal */
59
44
  export type Data$Outbound =
60
- | components.CommercialSecuredLoanApplicationSubmissionPayload$Outbound
61
- | components.ConsumerSecuredLoanApplicationSubmissionPayload$Outbound;
45
+ | components.CommercialSecuredApplicationPayload$Outbound
46
+ | components.ConsumerSecuredApplicationPayload$Outbound;
62
47
 
63
48
  /** @internal */
64
49
  export const Data$outboundSchema: z.ZodType<Data$Outbound, z.ZodTypeDef, Data> =
65
50
  z.union([
66
- components.CommercialSecuredLoanApplicationSubmissionPayload$outboundSchema,
67
- components.ConsumerSecuredLoanApplicationSubmissionPayload$outboundSchema,
51
+ components.CommercialSecuredApplicationPayload$outboundSchema,
52
+ components.ConsumerSecuredApplicationPayload$outboundSchema,
68
53
  ]);
69
54
 
70
55
  /**
@@ -101,16 +86,16 @@ export const CreateApplicationRequestBody$inboundSchema: z.ZodType<
101
86
  unknown
102
87
  > = z.object({
103
88
  data: z.union([
104
- components.CommercialSecuredLoanApplicationSubmissionPayload$inboundSchema,
105
- components.ConsumerSecuredLoanApplicationSubmissionPayload$inboundSchema,
89
+ components.CommercialSecuredApplicationPayload$inboundSchema,
90
+ components.ConsumerSecuredApplicationPayload$inboundSchema,
106
91
  ]),
107
92
  });
108
93
 
109
94
  /** @internal */
110
95
  export type CreateApplicationRequestBody$Outbound = {
111
96
  data:
112
- | components.CommercialSecuredLoanApplicationSubmissionPayload$Outbound
113
- | components.ConsumerSecuredLoanApplicationSubmissionPayload$Outbound;
97
+ | components.CommercialSecuredApplicationPayload$Outbound
98
+ | components.ConsumerSecuredApplicationPayload$Outbound;
114
99
  };
115
100
 
116
101
  /** @internal */
@@ -120,8 +105,8 @@ export const CreateApplicationRequestBody$outboundSchema: z.ZodType<
120
105
  CreateApplicationRequestBody
121
106
  > = z.object({
122
107
  data: z.union([
123
- components.CommercialSecuredLoanApplicationSubmissionPayload$outboundSchema,
124
- components.ConsumerSecuredLoanApplicationSubmissionPayload$outboundSchema,
108
+ components.CommercialSecuredApplicationPayload$outboundSchema,
109
+ components.ConsumerSecuredApplicationPayload$outboundSchema,
125
110
  ]),
126
111
  });
127
112
 
@@ -158,200 +143,6 @@ export function createApplicationRequestBodyFromJSON(
158
143
  );
159
144
  }
160
145
 
161
- /** @internal */
162
- export const Attributes$inboundSchema: z.ZodType<
163
- Attributes,
164
- z.ZodTypeDef,
165
- unknown
166
- > = z.object({});
167
-
168
- /** @internal */
169
- export type Attributes$Outbound = {};
170
-
171
- /** @internal */
172
- export const Attributes$outboundSchema: z.ZodType<
173
- Attributes$Outbound,
174
- z.ZodTypeDef,
175
- Attributes
176
- > = z.object({});
177
-
178
- /**
179
- * @internal
180
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
181
- */
182
- export namespace Attributes$ {
183
- /** @deprecated use `Attributes$inboundSchema` instead. */
184
- export const inboundSchema = Attributes$inboundSchema;
185
- /** @deprecated use `Attributes$outboundSchema` instead. */
186
- export const outboundSchema = Attributes$outboundSchema;
187
- /** @deprecated use `Attributes$Outbound` instead. */
188
- export type Outbound = Attributes$Outbound;
189
- }
190
-
191
- export function attributesToJSON(attributes: Attributes): string {
192
- return JSON.stringify(Attributes$outboundSchema.parse(attributes));
193
- }
194
-
195
- export function attributesFromJSON(
196
- jsonString: string,
197
- ): SafeParseResult<Attributes, SDKValidationError> {
198
- return safeParse(
199
- jsonString,
200
- (x) => Attributes$inboundSchema.parse(JSON.parse(x)),
201
- `Failed to parse 'Attributes' from JSON`,
202
- );
203
- }
204
-
205
- /** @internal */
206
- export const Relationships$inboundSchema: z.ZodType<
207
- Relationships,
208
- z.ZodTypeDef,
209
- unknown
210
- > = z.object({});
211
-
212
- /** @internal */
213
- export type Relationships$Outbound = {};
214
-
215
- /** @internal */
216
- export const Relationships$outboundSchema: z.ZodType<
217
- Relationships$Outbound,
218
- z.ZodTypeDef,
219
- Relationships
220
- > = z.object({});
221
-
222
- /**
223
- * @internal
224
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
225
- */
226
- export namespace Relationships$ {
227
- /** @deprecated use `Relationships$inboundSchema` instead. */
228
- export const inboundSchema = Relationships$inboundSchema;
229
- /** @deprecated use `Relationships$outboundSchema` instead. */
230
- export const outboundSchema = Relationships$outboundSchema;
231
- /** @deprecated use `Relationships$Outbound` instead. */
232
- export type Outbound = Relationships$Outbound;
233
- }
234
-
235
- export function relationshipsToJSON(relationships: Relationships): string {
236
- return JSON.stringify(Relationships$outboundSchema.parse(relationships));
237
- }
238
-
239
- export function relationshipsFromJSON(
240
- jsonString: string,
241
- ): SafeParseResult<Relationships, SDKValidationError> {
242
- return safeParse(
243
- jsonString,
244
- (x) => Relationships$inboundSchema.parse(JSON.parse(x)),
245
- `Failed to parse 'Relationships' from JSON`,
246
- );
247
- }
248
-
249
- /** @internal */
250
- export const Links$inboundSchema: z.ZodType<Links, z.ZodTypeDef, unknown> = z
251
- .object({});
252
-
253
- /** @internal */
254
- export type Links$Outbound = {};
255
-
256
- /** @internal */
257
- export const Links$outboundSchema: z.ZodType<
258
- Links$Outbound,
259
- z.ZodTypeDef,
260
- Links
261
- > = z.object({});
262
-
263
- /**
264
- * @internal
265
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
266
- */
267
- export namespace Links$ {
268
- /** @deprecated use `Links$inboundSchema` instead. */
269
- export const inboundSchema = Links$inboundSchema;
270
- /** @deprecated use `Links$outboundSchema` instead. */
271
- export const outboundSchema = Links$outboundSchema;
272
- /** @deprecated use `Links$Outbound` instead. */
273
- export type Outbound = Links$Outbound;
274
- }
275
-
276
- export function linksToJSON(links: Links): string {
277
- return JSON.stringify(Links$outboundSchema.parse(links));
278
- }
279
-
280
- export function linksFromJSON(
281
- jsonString: string,
282
- ): SafeParseResult<Links, SDKValidationError> {
283
- return safeParse(
284
- jsonString,
285
- (x) => Links$inboundSchema.parse(JSON.parse(x)),
286
- `Failed to parse 'Links' from JSON`,
287
- );
288
- }
289
-
290
- /** @internal */
291
- export const Included$inboundSchema: z.ZodType<
292
- Included,
293
- z.ZodTypeDef,
294
- unknown
295
- > = z.object({
296
- type: components.ResourceTypes$inboundSchema,
297
- id: z.string(),
298
- attributes: z.lazy(() => Attributes$inboundSchema).optional(),
299
- relationships: z.lazy(() => Relationships$inboundSchema),
300
- links: z.record(z.lazy(() => Links$inboundSchema)).optional(),
301
- meta: z.record(z.any()).optional(),
302
- });
303
-
304
- /** @internal */
305
- export type Included$Outbound = {
306
- type: string;
307
- id: string;
308
- attributes?: Attributes$Outbound | undefined;
309
- relationships: Relationships$Outbound;
310
- links?: { [k: string]: Links$Outbound } | undefined;
311
- meta?: { [k: string]: any } | undefined;
312
- };
313
-
314
- /** @internal */
315
- export const Included$outboundSchema: z.ZodType<
316
- Included$Outbound,
317
- z.ZodTypeDef,
318
- Included
319
- > = z.object({
320
- type: components.ResourceTypes$outboundSchema,
321
- id: z.string(),
322
- attributes: z.lazy(() => Attributes$outboundSchema).optional(),
323
- relationships: z.lazy(() => Relationships$outboundSchema),
324
- links: z.record(z.lazy(() => Links$outboundSchema)).optional(),
325
- meta: z.record(z.any()).optional(),
326
- });
327
-
328
- /**
329
- * @internal
330
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
331
- */
332
- export namespace Included$ {
333
- /** @deprecated use `Included$inboundSchema` instead. */
334
- export const inboundSchema = Included$inboundSchema;
335
- /** @deprecated use `Included$outboundSchema` instead. */
336
- export const outboundSchema = Included$outboundSchema;
337
- /** @deprecated use `Included$Outbound` instead. */
338
- export type Outbound = Included$Outbound;
339
- }
340
-
341
- export function includedToJSON(included: Included): string {
342
- return JSON.stringify(Included$outboundSchema.parse(included));
343
- }
344
-
345
- export function includedFromJSON(
346
- jsonString: string,
347
- ): SafeParseResult<Included, SDKValidationError> {
348
- return safeParse(
349
- jsonString,
350
- (x) => Included$inboundSchema.parse(JSON.parse(x)),
351
- `Failed to parse 'Included' from JSON`,
352
- );
353
- }
354
-
355
146
  /** @internal */
356
147
  export const CreateApplicationResponseBody$inboundSchema: z.ZodType<
357
148
  CreateApplicationResponseBody,
@@ -359,14 +150,14 @@ export const CreateApplicationResponseBody$inboundSchema: z.ZodType<
359
150
  unknown
360
151
  > = z.object({
361
152
  data: components.ApplicationResource$inboundSchema,
362
- included: z.array(z.lazy(() => Included$inboundSchema)).optional(),
153
+ included: z.array(components.ApplicationResource$inboundSchema).optional(),
363
154
  links: components.LinkObject$inboundSchema.optional(),
364
155
  });
365
156
 
366
157
  /** @internal */
367
158
  export type CreateApplicationResponseBody$Outbound = {
368
159
  data: components.ApplicationResource$Outbound;
369
- included?: Array<Included$Outbound> | undefined;
160
+ included?: Array<components.ApplicationResource$Outbound> | undefined;
370
161
  links?: components.LinkObject$Outbound | undefined;
371
162
  };
372
163
 
@@ -377,7 +168,7 @@ export const CreateApplicationResponseBody$outboundSchema: z.ZodType<
377
168
  CreateApplicationResponseBody
378
169
  > = z.object({
379
170
  data: components.ApplicationResource$outboundSchema,
380
- included: z.array(z.lazy(() => Included$outboundSchema)).optional(),
171
+ included: z.array(components.ApplicationResource$outboundSchema).optional(),
381
172
  links: components.LinkObject$outboundSchema.optional(),
382
173
  });
383
174
 
@@ -9,6 +9,9 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import * as components from "../components/index.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
+ /**
13
+ * The supporting document resource to create.
14
+ */
12
15
  export type SupportingDocumentsCreateRequestBody = {
13
16
  data: components.SupportingDocumentResource;
14
17
  };
@@ -18,9 +21,19 @@ export type SupportingDocumentsCreateRequest = {
18
21
  * The MIME type of the document
19
22
  */
20
23
  mimeType: components.UploadMimetype;
24
+ /**
25
+ * The supporting document resource to create.
26
+ */
21
27
  requestBody: SupportingDocumentsCreateRequestBody;
22
28
  };
23
29
 
30
+ /**
31
+ * The request has succeeded and a new resource has been created as a result.
32
+ */
33
+ export type SupportingDocumentsCreateResponseBody = {
34
+ data: components.CreateSupportingDocumentsResponse;
35
+ };
36
+
24
37
  /** @internal */
25
38
  export const SupportingDocumentsCreateRequestBody$inboundSchema: z.ZodType<
26
39
  SupportingDocumentsCreateRequestBody,
@@ -148,3 +161,62 @@ export function supportingDocumentsCreateRequestFromJSON(
148
161
  `Failed to parse 'SupportingDocumentsCreateRequest' from JSON`,
149
162
  );
150
163
  }
164
+
165
+ /** @internal */
166
+ export const SupportingDocumentsCreateResponseBody$inboundSchema: z.ZodType<
167
+ SupportingDocumentsCreateResponseBody,
168
+ z.ZodTypeDef,
169
+ unknown
170
+ > = z.object({
171
+ data: components.CreateSupportingDocumentsResponse$inboundSchema,
172
+ });
173
+
174
+ /** @internal */
175
+ export type SupportingDocumentsCreateResponseBody$Outbound = {
176
+ data: components.CreateSupportingDocumentsResponse$Outbound;
177
+ };
178
+
179
+ /** @internal */
180
+ export const SupportingDocumentsCreateResponseBody$outboundSchema: z.ZodType<
181
+ SupportingDocumentsCreateResponseBody$Outbound,
182
+ z.ZodTypeDef,
183
+ SupportingDocumentsCreateResponseBody
184
+ > = z.object({
185
+ data: components.CreateSupportingDocumentsResponse$outboundSchema,
186
+ });
187
+
188
+ /**
189
+ * @internal
190
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
191
+ */
192
+ export namespace SupportingDocumentsCreateResponseBody$ {
193
+ /** @deprecated use `SupportingDocumentsCreateResponseBody$inboundSchema` instead. */
194
+ export const inboundSchema =
195
+ SupportingDocumentsCreateResponseBody$inboundSchema;
196
+ /** @deprecated use `SupportingDocumentsCreateResponseBody$outboundSchema` instead. */
197
+ export const outboundSchema =
198
+ SupportingDocumentsCreateResponseBody$outboundSchema;
199
+ /** @deprecated use `SupportingDocumentsCreateResponseBody$Outbound` instead. */
200
+ export type Outbound = SupportingDocumentsCreateResponseBody$Outbound;
201
+ }
202
+
203
+ export function supportingDocumentsCreateResponseBodyToJSON(
204
+ supportingDocumentsCreateResponseBody: SupportingDocumentsCreateResponseBody,
205
+ ): string {
206
+ return JSON.stringify(
207
+ SupportingDocumentsCreateResponseBody$outboundSchema.parse(
208
+ supportingDocumentsCreateResponseBody,
209
+ ),
210
+ );
211
+ }
212
+
213
+ export function supportingDocumentsCreateResponseBodyFromJSON(
214
+ jsonString: string,
215
+ ): SafeParseResult<SupportingDocumentsCreateResponseBody, SDKValidationError> {
216
+ return safeParse(
217
+ jsonString,
218
+ (x) =>
219
+ SupportingDocumentsCreateResponseBody$inboundSchema.parse(JSON.parse(x)),
220
+ `Failed to parse 'SupportingDocumentsCreateResponseBody' from JSON`,
221
+ );
222
+ }
@@ -4,7 +4,6 @@
4
4
 
5
5
  import { supportingDocumentsCreate } from "../funcs/supportingDocumentsCreate.js";
6
6
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
- import * as components from "../models/components/index.js";
8
7
  import * as operations from "../models/operations/index.js";
9
8
  import { unwrapAsync } from "../types/fp.js";
10
9
 
@@ -15,7 +14,7 @@ export class SupportingDocuments extends ClientSDK {
15
14
  async create(
16
15
  request: operations.SupportingDocumentsCreateRequest,
17
16
  options?: RequestOptions,
18
- ): Promise<components.CreateSupportingDocumentsResponse> {
17
+ ): Promise<operations.SupportingDocumentsCreateResponseBody> {
19
18
  return unwrapAsync(supportingDocumentsCreate(
20
19
  this,
21
20
  request,
@@ -1,191 +0,0 @@
1
- import * as z from "zod";
2
- import { ClosedEnum } from "../../types/enums.js";
3
- import { Result as SafeParseResult } from "../../types/fp.js";
4
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
5
- import { ApplicationStatus } from "./applicationstatus.js";
6
- import { CommercialApplicationJsonApiRelationships, CommercialApplicationJsonApiRelationships$Outbound } from "./commercialapplicationjsonapirelationships.js";
7
- export declare const CommercialApplicationResourceType: {
8
- readonly CommercialSecuredApplications: "commercial-secured-applications";
9
- };
10
- export type CommercialApplicationResourceType = ClosedEnum<typeof CommercialApplicationResourceType>;
11
- /**
12
- * Type of the loan application
13
- */
14
- export declare const CommercialApplicationResourceApplicationType: {
15
- readonly CommercialSecured: "commercialSecured";
16
- };
17
- /**
18
- * Type of the loan application
19
- */
20
- export type CommercialApplicationResourceApplicationType = ClosedEnum<typeof CommercialApplicationResourceApplicationType>;
21
- /**
22
- * Application resource attributes
23
- */
24
- export type CommercialApplicationResourceAttributes = {
25
- /**
26
- * Full identifier of the application. Not visible within the web application.
27
- */
28
- id: string;
29
- /**
30
- * Human readable & easily communicated identifier of the application. Visible within the web application.
31
- */
32
- humanId: string;
33
- /**
34
- * Type of the loan application
35
- */
36
- applicationType: CommercialApplicationResourceApplicationType;
37
- /**
38
- * Current status, must be 'workshop' for new applications
39
- */
40
- status: ApplicationStatus;
41
- /**
42
- * Email address of the broker to be associated with this application.
43
- */
44
- associatedBrokerEmail?: string | undefined;
45
- /**
46
- * Creation timestamp
47
- */
48
- createdAt?: string | undefined;
49
- /**
50
- * Last update timestamp
51
- */
52
- updatedAt?: string | undefined;
53
- };
54
- export type CommercialApplicationResourceLinks = {};
55
- /**
56
- * A Commercial Application resource following JSON:API structure
57
- */
58
- export type CommercialApplicationResource = {
59
- type: CommercialApplicationResourceType;
60
- id: string;
61
- /**
62
- * Application resource attributes
63
- */
64
- attributes?: CommercialApplicationResourceAttributes | undefined;
65
- /**
66
- * Relationships for a Commercial Application Resource
67
- */
68
- relationships: CommercialApplicationJsonApiRelationships;
69
- links?: {
70
- [k: string]: CommercialApplicationResourceLinks;
71
- } | undefined;
72
- meta?: {
73
- [k: string]: any;
74
- } | undefined;
75
- };
76
- /** @internal */
77
- export declare const CommercialApplicationResourceType$inboundSchema: z.ZodNativeEnum<typeof CommercialApplicationResourceType>;
78
- /** @internal */
79
- export declare const CommercialApplicationResourceType$outboundSchema: z.ZodNativeEnum<typeof CommercialApplicationResourceType>;
80
- /**
81
- * @internal
82
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
83
- */
84
- export declare namespace CommercialApplicationResourceType$ {
85
- /** @deprecated use `CommercialApplicationResourceType$inboundSchema` instead. */
86
- const inboundSchema: z.ZodNativeEnum<{
87
- readonly CommercialSecuredApplications: "commercial-secured-applications";
88
- }>;
89
- /** @deprecated use `CommercialApplicationResourceType$outboundSchema` instead. */
90
- const outboundSchema: z.ZodNativeEnum<{
91
- readonly CommercialSecuredApplications: "commercial-secured-applications";
92
- }>;
93
- }
94
- /** @internal */
95
- export declare const CommercialApplicationResourceApplicationType$inboundSchema: z.ZodNativeEnum<typeof CommercialApplicationResourceApplicationType>;
96
- /** @internal */
97
- export declare const CommercialApplicationResourceApplicationType$outboundSchema: z.ZodNativeEnum<typeof CommercialApplicationResourceApplicationType>;
98
- /**
99
- * @internal
100
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
101
- */
102
- export declare namespace CommercialApplicationResourceApplicationType$ {
103
- /** @deprecated use `CommercialApplicationResourceApplicationType$inboundSchema` instead. */
104
- const inboundSchema: z.ZodNativeEnum<{
105
- readonly CommercialSecured: "commercialSecured";
106
- }>;
107
- /** @deprecated use `CommercialApplicationResourceApplicationType$outboundSchema` instead. */
108
- const outboundSchema: z.ZodNativeEnum<{
109
- readonly CommercialSecured: "commercialSecured";
110
- }>;
111
- }
112
- /** @internal */
113
- export declare const CommercialApplicationResourceAttributes$inboundSchema: z.ZodType<CommercialApplicationResourceAttributes, z.ZodTypeDef, unknown>;
114
- /** @internal */
115
- export type CommercialApplicationResourceAttributes$Outbound = {
116
- id: string;
117
- humanId: string;
118
- applicationType: string;
119
- status: string;
120
- associatedBrokerEmail?: string | undefined;
121
- createdAt?: string | undefined;
122
- updatedAt?: string | undefined;
123
- };
124
- /** @internal */
125
- export declare const CommercialApplicationResourceAttributes$outboundSchema: z.ZodType<CommercialApplicationResourceAttributes$Outbound, z.ZodTypeDef, CommercialApplicationResourceAttributes>;
126
- /**
127
- * @internal
128
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
129
- */
130
- export declare namespace CommercialApplicationResourceAttributes$ {
131
- /** @deprecated use `CommercialApplicationResourceAttributes$inboundSchema` instead. */
132
- const inboundSchema: z.ZodType<CommercialApplicationResourceAttributes, z.ZodTypeDef, unknown>;
133
- /** @deprecated use `CommercialApplicationResourceAttributes$outboundSchema` instead. */
134
- const outboundSchema: z.ZodType<CommercialApplicationResourceAttributes$Outbound, z.ZodTypeDef, CommercialApplicationResourceAttributes>;
135
- /** @deprecated use `CommercialApplicationResourceAttributes$Outbound` instead. */
136
- type Outbound = CommercialApplicationResourceAttributes$Outbound;
137
- }
138
- export declare function commercialApplicationResourceAttributesToJSON(commercialApplicationResourceAttributes: CommercialApplicationResourceAttributes): string;
139
- export declare function commercialApplicationResourceAttributesFromJSON(jsonString: string): SafeParseResult<CommercialApplicationResourceAttributes, SDKValidationError>;
140
- /** @internal */
141
- export declare const CommercialApplicationResourceLinks$inboundSchema: z.ZodType<CommercialApplicationResourceLinks, z.ZodTypeDef, unknown>;
142
- /** @internal */
143
- export type CommercialApplicationResourceLinks$Outbound = {};
144
- /** @internal */
145
- export declare const CommercialApplicationResourceLinks$outboundSchema: z.ZodType<CommercialApplicationResourceLinks$Outbound, z.ZodTypeDef, CommercialApplicationResourceLinks>;
146
- /**
147
- * @internal
148
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
149
- */
150
- export declare namespace CommercialApplicationResourceLinks$ {
151
- /** @deprecated use `CommercialApplicationResourceLinks$inboundSchema` instead. */
152
- const inboundSchema: z.ZodType<CommercialApplicationResourceLinks, z.ZodTypeDef, unknown>;
153
- /** @deprecated use `CommercialApplicationResourceLinks$outboundSchema` instead. */
154
- const outboundSchema: z.ZodType<CommercialApplicationResourceLinks$Outbound, z.ZodTypeDef, CommercialApplicationResourceLinks>;
155
- /** @deprecated use `CommercialApplicationResourceLinks$Outbound` instead. */
156
- type Outbound = CommercialApplicationResourceLinks$Outbound;
157
- }
158
- export declare function commercialApplicationResourceLinksToJSON(commercialApplicationResourceLinks: CommercialApplicationResourceLinks): string;
159
- export declare function commercialApplicationResourceLinksFromJSON(jsonString: string): SafeParseResult<CommercialApplicationResourceLinks, SDKValidationError>;
160
- /** @internal */
161
- export declare const CommercialApplicationResource$inboundSchema: z.ZodType<CommercialApplicationResource, z.ZodTypeDef, unknown>;
162
- /** @internal */
163
- export type CommercialApplicationResource$Outbound = {
164
- type: string;
165
- id: string;
166
- attributes?: CommercialApplicationResourceAttributes$Outbound | undefined;
167
- relationships: CommercialApplicationJsonApiRelationships$Outbound;
168
- links?: {
169
- [k: string]: CommercialApplicationResourceLinks$Outbound;
170
- } | undefined;
171
- meta?: {
172
- [k: string]: any;
173
- } | undefined;
174
- };
175
- /** @internal */
176
- export declare const CommercialApplicationResource$outboundSchema: z.ZodType<CommercialApplicationResource$Outbound, z.ZodTypeDef, CommercialApplicationResource>;
177
- /**
178
- * @internal
179
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
180
- */
181
- export declare namespace CommercialApplicationResource$ {
182
- /** @deprecated use `CommercialApplicationResource$inboundSchema` instead. */
183
- const inboundSchema: z.ZodType<CommercialApplicationResource, z.ZodTypeDef, unknown>;
184
- /** @deprecated use `CommercialApplicationResource$outboundSchema` instead. */
185
- const outboundSchema: z.ZodType<CommercialApplicationResource$Outbound, z.ZodTypeDef, CommercialApplicationResource>;
186
- /** @deprecated use `CommercialApplicationResource$Outbound` instead. */
187
- type Outbound = CommercialApplicationResource$Outbound;
188
- }
189
- export declare function commercialApplicationResourceToJSON(commercialApplicationResource: CommercialApplicationResource): string;
190
- export declare function commercialApplicationResourceFromJSON(jsonString: string): SafeParseResult<CommercialApplicationResource, SDKValidationError>;
191
- //# sourceMappingURL=commercialapplicationresource.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commercialapplicationresource.d.ts","sourceRoot":"","sources":["../../src/models/components/commercialapplicationresource.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,UAAU,E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