@financeable/aggregation 0.13.4 → 0.14.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 (97) hide show
  1. package/.devcontainer/devcontainer.json +45 -0
  2. package/FUNCTIONS.md +240 -0
  3. package/RUNTIMES.md +48 -0
  4. package/core.js.map +1 -0
  5. package/examples/applicationsCreate.example.ts +179 -0
  6. package/examples/package-lock.json +610 -0
  7. package/examples/package.json +18 -0
  8. package/index.js.map +1 -0
  9. package/jsr.json +27 -0
  10. package/lib/config.d.ts +3 -3
  11. package/lib/config.js +3 -3
  12. package/lib/config.js.map +1 -1
  13. package/models/components/abnstatus.d.ts +10 -0
  14. package/models/components/abnstatus.d.ts.map +1 -0
  15. package/models/components/abnstatus.js +48 -0
  16. package/models/components/abnstatus.js.map +1 -0
  17. package/models/components/businessapplicationresource.d.ts +39 -0
  18. package/models/components/businessapplicationresource.d.ts.map +1 -1
  19. package/models/components/businessapplicationresource.js +33 -1
  20. package/models/components/businessapplicationresource.js.map +1 -1
  21. package/models/components/commercialsecuredapplicationresource.d.ts +39 -0
  22. package/models/components/commercialsecuredapplicationresource.d.ts.map +1 -1
  23. package/models/components/commercialsecuredapplicationresource.js +34 -1
  24. package/models/components/commercialsecuredapplicationresource.js.map +1 -1
  25. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +101 -6
  26. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -1
  27. package/models/components/commercialsecuredloancommercialapplicationrelationships.js +69 -7
  28. package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +1 -1
  29. package/models/components/consumersecuredapplicationresource.d.ts +39 -0
  30. package/models/components/consumersecuredapplicationresource.d.ts.map +1 -1
  31. package/models/components/consumersecuredapplicationresource.js +34 -1
  32. package/models/components/consumersecuredapplicationresource.js.map +1 -1
  33. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +105 -10
  34. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -1
  35. package/models/components/consumersecuredloanconsumerapplicationrelationships.js +73 -9
  36. package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -1
  37. package/models/components/employerattributes.d.ts +58 -0
  38. package/models/components/employerattributes.d.ts.map +1 -0
  39. package/models/components/employerattributes.js +69 -0
  40. package/models/components/employerattributes.js.map +1 -0
  41. package/models/components/employmentstatus.d.ts +10 -0
  42. package/models/components/employmentstatus.d.ts.map +1 -0
  43. package/models/components/employmentstatus.js +47 -0
  44. package/models/components/employmentstatus.js.map +1 -0
  45. package/models/components/employmenttype.d.ts +15 -0
  46. package/models/components/employmenttype.d.ts.map +1 -0
  47. package/models/components/employmenttype.js +52 -0
  48. package/models/components/employmenttype.js.map +1 -0
  49. package/models/components/entityattributes.d.ts +4 -4
  50. package/models/components/entityattributes.d.ts.map +1 -1
  51. package/models/components/entityattributes.js +4 -5
  52. package/models/components/entityattributes.js.map +1 -1
  53. package/models/components/entitytype.d.ts +152 -0
  54. package/models/components/entitytype.d.ts.map +1 -0
  55. package/models/components/entitytype.js +190 -0
  56. package/models/components/entitytype.js.map +1 -0
  57. package/models/components/index.d.ts +7 -0
  58. package/models/components/index.d.ts.map +1 -1
  59. package/models/components/index.js +7 -0
  60. package/models/components/index.js.map +1 -1
  61. package/models/components/industry.d.ts +27 -0
  62. package/models/components/industry.d.ts.map +1 -0
  63. package/models/components/industry.js +65 -0
  64. package/models/components/industry.js.map +1 -0
  65. package/models/components/loandetailsattributes.d.ts +3 -3
  66. package/models/components/occupation.d.ts +201 -0
  67. package/models/components/occupation.d.ts.map +1 -0
  68. package/models/components/occupation.js +239 -0
  69. package/models/components/occupation.js.map +1 -0
  70. package/models/components/personalapplicationresource.d.ts +39 -0
  71. package/models/components/personalapplicationresource.d.ts.map +1 -1
  72. package/models/components/personalapplicationresource.js +33 -1
  73. package/models/components/personalapplicationresource.js.map +1 -1
  74. package/models/components/personalloanpersonalapplicationrelationships.d.ts +105 -10
  75. package/models/components/personalloanpersonalapplicationrelationships.d.ts.map +1 -1
  76. package/models/components/personalloanpersonalapplicationrelationships.js +71 -9
  77. package/models/components/personalloanpersonalapplicationrelationships.js.map +1 -1
  78. package/package.json +5 -17
  79. package/src/lib/config.ts +3 -3
  80. package/src/models/components/abnstatus.ts +16 -0
  81. package/src/models/components/businessapplicationresource.ts +46 -0
  82. package/src/models/components/commercialsecuredapplicationresource.ts +46 -0
  83. package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +241 -13
  84. package/src/models/components/consumersecuredapplicationresource.ts +43 -0
  85. package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +275 -19
  86. package/src/models/components/employerattributes.ts +97 -0
  87. package/src/models/components/employmentstatus.ts +17 -0
  88. package/src/models/components/employmenttype.ts +22 -0
  89. package/src/models/components/entityattributes.ts +9 -6
  90. package/src/models/components/entitytype.ts +215 -0
  91. package/src/models/components/index.ts +7 -0
  92. package/src/models/components/industry.ts +36 -0
  93. package/src/models/components/loandetailsattributes.ts +3 -3
  94. package/src/models/components/occupation.ts +226 -0
  95. package/src/models/components/personalapplicationresource.ts +46 -0
  96. package/src/models/components/personalloanpersonalapplicationrelationships.ts +272 -20
  97. package/tsconfig.json +40 -0
@@ -30,6 +30,42 @@ export type CommercialSecuredApplicationResourceApplicationType = ClosedEnum<
30
30
  typeof CommercialSecuredApplicationResourceApplicationType
31
31
  >;
32
32
 
33
+ /**
34
+ * The lender with whom the application has settled
35
+ */
36
+ export const CommercialSecuredApplicationResourceLender = {
37
+ Metro: "metro",
38
+ Pepper: "pepper",
39
+ Flexi: "flexi",
40
+ Angle: "angle",
41
+ Resimac: "resimac",
42
+ Scotpac: "scotpac",
43
+ Grow: "grow",
44
+ Macquarie: "macquarie",
45
+ Plenti: "plenti",
46
+ AzoraAssetFinance: "azora_asset_finance",
47
+ Moneyplace: "moneyplace",
48
+ Wisr: "wisr",
49
+ Money3: "money3",
50
+ FinanceOne: "finance_one",
51
+ Now: "now",
52
+ Afs: "afs",
53
+ Autopay: "autopay",
54
+ Ammf: "ammf",
55
+ Dynamoney: "dynamoney",
56
+ Firstmac: "firstmac",
57
+ Latitude: "latitude",
58
+ Branded: "branded",
59
+ Liberty: "liberty",
60
+ Westpac: "westpac",
61
+ } as const;
62
+ /**
63
+ * The lender with whom the application has settled
64
+ */
65
+ export type CommercialSecuredApplicationResourceLender = ClosedEnum<
66
+ typeof CommercialSecuredApplicationResourceLender
67
+ >;
68
+
33
69
  /**
34
70
  * Application resource attributes
35
71
  */
@@ -58,6 +94,10 @@ export type CommercialSecuredApplicationResourceAttributes = {
58
94
  * If the application has settled with a lender, the lender's identifier of the application, distinct from Financeable's
59
95
  */
60
96
  lenderApplicationReference?: string | undefined;
97
+ /**
98
+ * The lender with whom the application has settled
99
+ */
100
+ lender?: CommercialSecuredApplicationResourceLender | undefined;
61
101
  /**
62
102
  * Creation timestamp
63
103
  */
@@ -91,6 +131,11 @@ export const CommercialSecuredApplicationResourceApplicationType$inboundSchema:
91
131
  z.ZodNativeEnum<typeof CommercialSecuredApplicationResourceApplicationType> =
92
132
  z.nativeEnum(CommercialSecuredApplicationResourceApplicationType);
93
133
 
134
+ /** @internal */
135
+ export const CommercialSecuredApplicationResourceLender$inboundSchema:
136
+ z.ZodNativeEnum<typeof CommercialSecuredApplicationResourceLender> = z
137
+ .nativeEnum(CommercialSecuredApplicationResourceLender);
138
+
94
139
  /** @internal */
95
140
  export const CommercialSecuredApplicationResourceAttributes$inboundSchema:
96
141
  z.ZodType<
@@ -105,6 +150,7 @@ export const CommercialSecuredApplicationResourceAttributes$inboundSchema:
105
150
  status: ApplicationStatus$inboundSchema,
106
151
  settlementDate: z.string().optional(),
107
152
  lenderApplicationReference: z.string().optional(),
153
+ lender: CommercialSecuredApplicationResourceLender$inboundSchema.optional(),
108
154
  createdAt: z.string().optional(),
109
155
  updatedAt: z.string().optional(),
110
156
  });
@@ -29,6 +29,11 @@ import {
29
29
  CustomerLiabilityAttributes$Outbound,
30
30
  CustomerLiabilityAttributes$outboundSchema,
31
31
  } from "./customerliabilityattributes.js";
32
+ import {
33
+ EmployerAttributes,
34
+ EmployerAttributes$Outbound,
35
+ EmployerAttributes$outboundSchema,
36
+ } from "./employerattributes.js";
32
37
  import {
33
38
  EntityAttributesInput,
34
39
  EntityAttributesInput$Outbound,
@@ -85,7 +90,7 @@ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData
85
90
  typeof CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType
86
91
  >;
87
92
 
88
- export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData =
93
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData =
89
94
  {
90
95
  type:
91
96
  CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType;
@@ -96,7 +101,7 @@ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData
96
101
 
97
102
  export type Addresses = {
98
103
  data: Array<
99
- CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData
104
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData
100
105
  >;
101
106
  };
102
107
 
@@ -148,10 +153,66 @@ export type Assets = {
148
153
  >;
149
154
  };
150
155
 
156
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersType =
157
+ {
158
+ Employers: "employers",
159
+ } as const;
160
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersType =
161
+ ClosedEnum<
162
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersType
163
+ >;
164
+
165
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersDataType =
166
+ {
167
+ Addresses: "addresses",
168
+ } as const;
169
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersDataType =
170
+ ClosedEnum<
171
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersDataType
172
+ >;
173
+
174
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData =
175
+ {
176
+ type:
177
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersDataType;
178
+ attributes: AddressAttributes;
179
+ links?: { [k: string]: LinkObject } | undefined;
180
+ meta?: { [k: string]: any } | undefined;
181
+ };
182
+
183
+ export type Address = {
184
+ data:
185
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData;
186
+ };
187
+
188
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsRelationships =
189
+ {
190
+ address?: Address | undefined;
191
+ };
192
+
193
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData =
194
+ {
195
+ type:
196
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersType;
197
+ attributes: EmployerAttributes;
198
+ relationships?:
199
+ | CommercialSecuredLoanCommercialApplicationRelationshipsRelationships
200
+ | undefined;
201
+ links?: { [k: string]: LinkObject } | undefined;
202
+ meta?: { [k: string]: any } | undefined;
203
+ };
204
+
205
+ export type Employers = {
206
+ data: Array<
207
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData
208
+ >;
209
+ };
210
+
151
211
  export type Relationships = {
152
212
  addresses?: Addresses | undefined;
153
213
  liabilities?: Liabilities | undefined;
154
214
  assets?: Assets | undefined;
215
+ employers?: Employers | undefined;
155
216
  };
156
217
 
157
218
  export type CommercialSecuredLoanCommercialApplicationRelationshipsData = {
@@ -284,7 +345,7 @@ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDat
284
345
  );
285
346
 
286
347
  /** @internal */
287
- export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$Outbound =
348
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData$Outbound =
288
349
  {
289
350
  type: string;
290
351
  attributes: AddressAttributes$Outbound;
@@ -293,11 +354,11 @@ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersData
293
354
  };
294
355
 
295
356
  /** @internal */
296
- export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$outboundSchema:
357
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData$outboundSchema:
297
358
  z.ZodType<
298
- CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$Outbound,
359
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData$Outbound,
299
360
  z.ZodTypeDef,
300
- CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData
361
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData
301
362
  > = z.object({
302
363
  type:
303
364
  CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataType$outboundSchema,
@@ -306,14 +367,14 @@ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDat
306
367
  meta: z.record(z.any()).optional(),
307
368
  });
308
369
 
309
- export function commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsDataToJSON(
310
- commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData:
311
- CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData,
370
+ export function commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesDataToJSON(
371
+ commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData:
372
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData,
312
373
  ): string {
313
374
  return JSON.stringify(
314
- CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$outboundSchema
375
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData$outboundSchema
315
376
  .parse(
316
- commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData,
377
+ commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData,
317
378
  ),
318
379
  );
319
380
  }
@@ -321,7 +382,7 @@ export function commercialSecuredLoanCommercialApplicationRelationshipsCustomers
321
382
  /** @internal */
322
383
  export type Addresses$Outbound = {
323
384
  data: Array<
324
- CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$Outbound
385
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData$Outbound
325
386
  >;
326
387
  };
327
388
 
@@ -333,7 +394,7 @@ export const Addresses$outboundSchema: z.ZodType<
333
394
  > = z.object({
334
395
  data: z.array(
335
396
  z.lazy(() =>
336
- CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$outboundSchema
397
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsAddressesData$outboundSchema
337
398
  ),
338
399
  ),
339
400
  });
@@ -476,11 +537,177 @@ export function assetsToJSON(assets: Assets): string {
476
537
  return JSON.stringify(Assets$outboundSchema.parse(assets));
477
538
  }
478
539
 
540
+ /** @internal */
541
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersType$outboundSchema:
542
+ z.ZodNativeEnum<
543
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersType
544
+ > = z.nativeEnum(
545
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersType,
546
+ );
547
+
548
+ /** @internal */
549
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersDataType$outboundSchema:
550
+ z.ZodNativeEnum<
551
+ typeof CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersDataType
552
+ > = z.nativeEnum(
553
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersDataType,
554
+ );
555
+
556
+ /** @internal */
557
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData$Outbound =
558
+ {
559
+ type: string;
560
+ attributes: AddressAttributes$Outbound;
561
+ links?: { [k: string]: LinkObject$Outbound } | undefined;
562
+ meta?: { [k: string]: any } | undefined;
563
+ };
564
+
565
+ /** @internal */
566
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData$outboundSchema:
567
+ z.ZodType<
568
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData$Outbound,
569
+ z.ZodTypeDef,
570
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData
571
+ > = z.object({
572
+ type:
573
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersDataType$outboundSchema,
574
+ attributes: AddressAttributes$outboundSchema,
575
+ links: z.record(LinkObject$outboundSchema).optional(),
576
+ meta: z.record(z.any()).optional(),
577
+ });
578
+
579
+ export function commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersDataToJSON(
580
+ commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData:
581
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData,
582
+ ): string {
583
+ return JSON.stringify(
584
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData$outboundSchema
585
+ .parse(
586
+ commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData,
587
+ ),
588
+ );
589
+ }
590
+
591
+ /** @internal */
592
+ export type Address$Outbound = {
593
+ data:
594
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData$Outbound;
595
+ };
596
+
597
+ /** @internal */
598
+ export const Address$outboundSchema: z.ZodType<
599
+ Address$Outbound,
600
+ z.ZodTypeDef,
601
+ Address
602
+ > = z.object({
603
+ data: z.lazy(() =>
604
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersData$outboundSchema
605
+ ),
606
+ });
607
+
608
+ export function addressToJSON(address: Address): string {
609
+ return JSON.stringify(Address$outboundSchema.parse(address));
610
+ }
611
+
612
+ /** @internal */
613
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$Outbound =
614
+ {
615
+ address?: Address$Outbound | undefined;
616
+ };
617
+
618
+ /** @internal */
619
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$outboundSchema:
620
+ z.ZodType<
621
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$Outbound,
622
+ z.ZodTypeDef,
623
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships
624
+ > = z.object({
625
+ address: z.lazy(() => Address$outboundSchema).optional(),
626
+ });
627
+
628
+ export function commercialSecuredLoanCommercialApplicationRelationshipsRelationshipsToJSON(
629
+ commercialSecuredLoanCommercialApplicationRelationshipsRelationships:
630
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships,
631
+ ): string {
632
+ return JSON.stringify(
633
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$outboundSchema
634
+ .parse(
635
+ commercialSecuredLoanCommercialApplicationRelationshipsRelationships,
636
+ ),
637
+ );
638
+ }
639
+
640
+ /** @internal */
641
+ export type CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$Outbound =
642
+ {
643
+ type: string;
644
+ attributes: EmployerAttributes$Outbound;
645
+ relationships?:
646
+ | CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$Outbound
647
+ | undefined;
648
+ links?: { [k: string]: LinkObject$Outbound } | undefined;
649
+ meta?: { [k: string]: any } | undefined;
650
+ };
651
+
652
+ /** @internal */
653
+ export const CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$outboundSchema:
654
+ z.ZodType<
655
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$Outbound,
656
+ z.ZodTypeDef,
657
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData
658
+ > = z.object({
659
+ type:
660
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsEmployersType$outboundSchema,
661
+ attributes: EmployerAttributes$outboundSchema,
662
+ relationships: z.lazy(() =>
663
+ CommercialSecuredLoanCommercialApplicationRelationshipsRelationships$outboundSchema
664
+ ).optional(),
665
+ links: z.record(LinkObject$outboundSchema).optional(),
666
+ meta: z.record(z.any()).optional(),
667
+ });
668
+
669
+ export function commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsDataToJSON(
670
+ commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData:
671
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData,
672
+ ): string {
673
+ return JSON.stringify(
674
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$outboundSchema
675
+ .parse(
676
+ commercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData,
677
+ ),
678
+ );
679
+ }
680
+
681
+ /** @internal */
682
+ export type Employers$Outbound = {
683
+ data: Array<
684
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$Outbound
685
+ >;
686
+ };
687
+
688
+ /** @internal */
689
+ export const Employers$outboundSchema: z.ZodType<
690
+ Employers$Outbound,
691
+ z.ZodTypeDef,
692
+ Employers
693
+ > = z.object({
694
+ data: z.array(
695
+ z.lazy(() =>
696
+ CommercialSecuredLoanCommercialApplicationRelationshipsCustomersDataRelationshipsData$outboundSchema
697
+ ),
698
+ ),
699
+ });
700
+
701
+ export function employersToJSON(employers: Employers): string {
702
+ return JSON.stringify(Employers$outboundSchema.parse(employers));
703
+ }
704
+
479
705
  /** @internal */
480
706
  export type Relationships$Outbound = {
481
707
  addresses?: Addresses$Outbound | undefined;
482
708
  liabilities?: Liabilities$Outbound | undefined;
483
709
  assets?: Assets$Outbound | undefined;
710
+ employers?: Employers$Outbound | undefined;
484
711
  };
485
712
 
486
713
  /** @internal */
@@ -492,6 +719,7 @@ export const Relationships$outboundSchema: z.ZodType<
492
719
  addresses: z.lazy(() => Addresses$outboundSchema).optional(),
493
720
  liabilities: z.lazy(() => Liabilities$outboundSchema).optional(),
494
721
  assets: z.lazy(() => Assets$outboundSchema).optional(),
722
+ employers: z.lazy(() => Employers$outboundSchema).optional(),
495
723
  });
496
724
 
497
725
  export function relationshipsToJSON(relationships: Relationships): string {
@@ -30,6 +30,40 @@ export type ConsumerSecuredApplicationResourceApplicationType = ClosedEnum<
30
30
  typeof ConsumerSecuredApplicationResourceApplicationType
31
31
  >;
32
32
 
33
+ /**
34
+ * The lender with whom the application has settled
35
+ */
36
+ export const Lender = {
37
+ Metro: "metro",
38
+ Pepper: "pepper",
39
+ Flexi: "flexi",
40
+ Angle: "angle",
41
+ Resimac: "resimac",
42
+ Scotpac: "scotpac",
43
+ Grow: "grow",
44
+ Macquarie: "macquarie",
45
+ Plenti: "plenti",
46
+ AzoraAssetFinance: "azora_asset_finance",
47
+ Moneyplace: "moneyplace",
48
+ Wisr: "wisr",
49
+ Money3: "money3",
50
+ FinanceOne: "finance_one",
51
+ Now: "now",
52
+ Afs: "afs",
53
+ Autopay: "autopay",
54
+ Ammf: "ammf",
55
+ Dynamoney: "dynamoney",
56
+ Firstmac: "firstmac",
57
+ Latitude: "latitude",
58
+ Branded: "branded",
59
+ Liberty: "liberty",
60
+ Westpac: "westpac",
61
+ } as const;
62
+ /**
63
+ * The lender with whom the application has settled
64
+ */
65
+ export type Lender = ClosedEnum<typeof Lender>;
66
+
33
67
  /**
34
68
  * Application resource attributes
35
69
  */
@@ -58,6 +92,10 @@ export type ConsumerSecuredApplicationResourceAttributes = {
58
92
  * If the application has settled with a lender, the lender's identifier of the application, distinct from Financeable's
59
93
  */
60
94
  lenderApplicationReference?: string | undefined;
95
+ /**
96
+ * The lender with whom the application has settled
97
+ */
98
+ lender?: Lender | undefined;
61
99
  /**
62
100
  * Creation timestamp
63
101
  */
@@ -91,6 +129,10 @@ export const ConsumerSecuredApplicationResourceApplicationType$inboundSchema:
91
129
  z.ZodNativeEnum<typeof ConsumerSecuredApplicationResourceApplicationType> = z
92
130
  .nativeEnum(ConsumerSecuredApplicationResourceApplicationType);
93
131
 
132
+ /** @internal */
133
+ export const Lender$inboundSchema: z.ZodNativeEnum<typeof Lender> = z
134
+ .nativeEnum(Lender);
135
+
94
136
  /** @internal */
95
137
  export const ConsumerSecuredApplicationResourceAttributes$inboundSchema:
96
138
  z.ZodType<
@@ -105,6 +147,7 @@ export const ConsumerSecuredApplicationResourceAttributes$inboundSchema:
105
147
  status: ApplicationStatus$inboundSchema,
106
148
  settlementDate: z.string().optional(),
107
149
  lenderApplicationReference: z.string().optional(),
150
+ lender: Lender$inboundSchema.optional(),
108
151
  createdAt: z.string().optional(),
109
152
  updatedAt: z.string().optional(),
110
153
  });