@financeable/aggregation 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/docs/sdks/applications/README.md +1 -0
  2. package/docs/sdks/oauthtoken/README.md +1 -0
  3. package/docs/sdks/supportingdocuments/README.md +1 -0
  4. package/examples/README.md +31 -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/jsr.json +1 -1
  9. package/lib/config.d.ts +3 -3
  10. package/lib/config.js +3 -3
  11. package/models/components/addressattributes.d.ts +30 -30
  12. package/models/components/addressattributes.d.ts.map +1 -1
  13. package/models/components/addressattributes.js +24 -24
  14. package/models/components/addressattributes.js.map +1 -1
  15. package/models/components/badrequesterror.d.ts +15 -15
  16. package/models/components/badrequesterror.d.ts.map +1 -1
  17. package/models/components/badrequesterror.js.map +1 -1
  18. package/models/components/commercialapplicationjsonapirelationships.d.ts +84 -84
  19. package/models/components/commercialapplicationjsonapirelationships.d.ts.map +1 -1
  20. package/models/components/commercialapplicationjsonapirelationships.js +47 -47
  21. package/models/components/commercialapplicationjsonapirelationships.js.map +1 -1
  22. package/models/components/commercialsecuredapplicationpayload.d.ts +27 -27
  23. package/models/components/commercialsecuredapplicationpayload.d.ts.map +1 -1
  24. package/models/components/commercialsecuredapplicationpayload.js.map +1 -1
  25. package/models/components/commercialsecuredapplicationresource.d.ts +36 -36
  26. package/models/components/commercialsecuredapplicationresource.d.ts.map +1 -1
  27. package/models/components/commercialsecuredapplicationresource.js.map +1 -1
  28. package/models/components/commercialsecuredloanassetattributes.d.ts +66 -66
  29. package/models/components/commercialsecuredloanassetattributes.d.ts.map +1 -1
  30. package/models/components/commercialsecuredloanassetattributes.js +26 -24
  31. package/models/components/commercialsecuredloanassetattributes.js.map +1 -1
  32. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +150 -150
  33. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -1
  34. package/models/components/commercialsecuredloancommercialapplicationrelationships.js +92 -92
  35. package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +1 -1
  36. package/models/components/consumerapplicationjsonapirelationships.d.ts +62 -62
  37. package/models/components/consumerapplicationjsonapirelationships.d.ts.map +1 -1
  38. package/models/components/consumerapplicationjsonapirelationships.js +32 -32
  39. package/models/components/consumerapplicationjsonapirelationships.js.map +1 -1
  40. package/models/components/consumersecuredapplicationpayload.d.ts +27 -27
  41. package/models/components/consumersecuredapplicationpayload.d.ts.map +1 -1
  42. package/models/components/consumersecuredapplicationpayload.js.map +1 -1
  43. package/models/components/consumersecuredapplicationresource.d.ts +36 -36
  44. package/models/components/consumersecuredapplicationresource.d.ts.map +1 -1
  45. package/models/components/consumersecuredapplicationresource.js.map +1 -1
  46. package/models/components/consumersecuredloanassetattributes.d.ts +78 -78
  47. package/models/components/consumersecuredloanassetattributes.d.ts.map +1 -1
  48. package/models/components/consumersecuredloanassetattributes.js +41 -39
  49. package/models/components/consumersecuredloanassetattributes.js.map +1 -1
  50. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +172 -172
  51. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -1
  52. package/models/components/consumersecuredloanconsumerapplicationrelationships.js +107 -107
  53. package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -1
  54. package/models/components/createsupportingdocumentsresponse.d.ts +16 -16
  55. package/models/components/createsupportingdocumentsresponse.d.ts.map +1 -1
  56. package/models/components/createsupportingdocumentsresponse.js.map +1 -1
  57. package/models/components/customerassetattributes.d.ts +2 -2
  58. package/models/components/customerassetattributes.d.ts.map +1 -1
  59. package/models/components/customerassetattributes.js +2 -2
  60. package/models/components/customerassetattributes.js.map +1 -1
  61. package/models/components/customerattributes.d.ts +16 -11
  62. package/models/components/customerattributes.d.ts.map +1 -1
  63. package/models/components/customerattributes.js +12 -10
  64. package/models/components/customerattributes.js.map +1 -1
  65. package/models/components/customerliabilityattributes.d.ts +2 -2
  66. package/models/components/customerliabilityattributes.d.ts.map +1 -1
  67. package/models/components/customerliabilityattributes.js +2 -2
  68. package/models/components/customerliabilityattributes.js.map +1 -1
  69. package/models/components/entityattributes.d.ts +4 -4
  70. package/models/components/entityattributes.d.ts.map +1 -1
  71. package/models/components/entityattributes.js +4 -4
  72. package/models/components/entityattributes.js.map +1 -1
  73. package/models/components/expenseattributes.d.ts +2 -2
  74. package/models/components/expenseattributes.d.ts.map +1 -1
  75. package/models/components/expenseattributes.js +2 -2
  76. package/models/components/expenseattributes.js.map +1 -1
  77. package/models/components/forbiddenerror.d.ts +15 -15
  78. package/models/components/forbiddenerror.d.ts.map +1 -1
  79. package/models/components/forbiddenerror.js.map +1 -1
  80. package/models/components/incomeattributes.d.ts +2 -2
  81. package/models/components/incomeattributes.d.ts.map +1 -1
  82. package/models/components/incomeattributes.js +2 -2
  83. package/models/components/incomeattributes.js.map +1 -1
  84. package/models/components/monetaryquantity.d.ts +11 -11
  85. package/models/components/monetaryquantity.d.ts.map +1 -1
  86. package/models/components/monetaryquantity.js.map +1 -1
  87. package/models/components/percentagequantity.d.ts +7 -7
  88. package/models/components/percentagequantity.d.ts.map +1 -1
  89. package/models/components/percentagequantity.js.map +1 -1
  90. package/models/components/relationshipresourcenotfound.d.ts +12 -12
  91. package/models/components/relationshipresourcenotfound.d.ts.map +1 -1
  92. package/models/components/relationshipresourcenotfound.js.map +1 -1
  93. package/models/components/resourcenotfound.d.ts +15 -15
  94. package/models/components/resourcenotfound.d.ts.map +1 -1
  95. package/models/components/resourcenotfound.js.map +1 -1
  96. package/models/components/supportingdocumentrelationships.d.ts +106 -106
  97. package/models/components/supportingdocumentrelationships.d.ts.map +1 -1
  98. package/models/components/supportingdocumentrelationships.js +63 -63
  99. package/models/components/supportingdocumentrelationships.js.map +1 -1
  100. package/models/components/supportingdocumentresource.d.ts +11 -11
  101. package/models/components/supportingdocumentresource.d.ts.map +1 -1
  102. package/models/components/supportingdocumentresource.js.map +1 -1
  103. package/models/components/tokenrequest.d.ts +18 -18
  104. package/models/components/tokenrequest.d.ts.map +1 -1
  105. package/models/components/tokenrequest.js.map +1 -1
  106. package/models/operations/createapplication.d.ts +154 -154
  107. package/models/operations/createapplication.d.ts.map +1 -1
  108. package/models/operations/createapplication.js +109 -109
  109. package/models/operations/createapplication.js.map +1 -1
  110. package/package.json +4 -5
  111. package/src/lib/config.ts +3 -3
  112. package/src/models/components/addressattributes.ts +55 -55
  113. package/src/models/components/badrequesterror.ts +14 -14
  114. package/src/models/components/commercialapplicationjsonapirelationships.ts +117 -117
  115. package/src/models/components/commercialsecuredapplicationpayload.ts +27 -27
  116. package/src/models/components/commercialsecuredapplicationresource.ts +46 -46
  117. package/src/models/components/commercialsecuredloanassetattributes.ts +63 -61
  118. package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +243 -243
  119. package/src/models/components/consumerapplicationjsonapirelationships.ts +83 -83
  120. package/src/models/components/consumersecuredapplicationpayload.ts +27 -27
  121. package/src/models/components/consumersecuredapplicationresource.ts +47 -47
  122. package/src/models/components/consumersecuredloanassetattributes.ts +98 -96
  123. package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +279 -279
  124. package/src/models/components/createsupportingdocumentsresponse.ts +16 -16
  125. package/src/models/components/customerassetattributes.ts +4 -4
  126. package/src/models/components/customerattributes.ts +28 -21
  127. package/src/models/components/customerliabilityattributes.ts +4 -4
  128. package/src/models/components/entityattributes.ts +8 -8
  129. package/src/models/components/expenseattributes.ts +4 -4
  130. package/src/models/components/forbiddenerror.ts +14 -14
  131. package/src/models/components/incomeattributes.ts +4 -4
  132. package/src/models/components/monetaryquantity.ts +12 -12
  133. package/src/models/components/percentagequantity.ts +8 -8
  134. package/src/models/components/relationshipresourcenotfound.ts +11 -11
  135. package/src/models/components/resourcenotfound.ts +14 -14
  136. package/src/models/components/supportingdocumentrelationships.ts +129 -129
  137. package/src/models/components/supportingdocumentresource.ts +8 -8
  138. package/src/models/components/tokenrequest.ts +19 -19
  139. package/src/models/operations/createapplication.ts +204 -204
@@ -46,22 +46,6 @@ export type CreateSupportingDocumentsResponseType = ClosedEnum<
46
46
  typeof CreateSupportingDocumentsResponseType
47
47
  >;
48
48
 
49
- export type Links = {
50
- /**
51
- * Standard link object
52
- */
53
- upload: LinkObject;
54
- };
55
-
56
- export type CreateSupportingDocumentsResponse = {
57
- type: CreateSupportingDocumentsResponseType;
58
- id?: string | undefined;
59
- attributes: SupportingDocumentAttributes;
60
- relationships: SupportingDocumentRelationships;
61
- links?: Links | undefined;
62
- meta?: { [k: string]: any } | undefined;
63
- };
64
-
65
49
  /** @internal */
66
50
  export const CreateSupportingDocumentsResponseType$inboundSchema:
67
51
  z.ZodNativeEnum<typeof CreateSupportingDocumentsResponseType> = z.nativeEnum(
@@ -86,6 +70,22 @@ export namespace CreateSupportingDocumentsResponseType$ {
86
70
  CreateSupportingDocumentsResponseType$outboundSchema;
87
71
  }
88
72
 
73
+ export type Links = {
74
+ /**
75
+ * Standard link object
76
+ */
77
+ upload: LinkObject;
78
+ };
79
+
80
+ export type CreateSupportingDocumentsResponse = {
81
+ type: CreateSupportingDocumentsResponseType;
82
+ id?: string | undefined;
83
+ attributes: SupportingDocumentAttributes;
84
+ relationships: SupportingDocumentRelationships;
85
+ links?: Links | undefined;
86
+ meta?: { [k: string]: any } | undefined;
87
+ };
88
+
89
89
  /** @internal */
90
90
  export const Links$inboundSchema: z.ZodType<Links, z.ZodTypeDef, unknown> = z
91
91
  .object({
@@ -20,7 +20,7 @@ import {
20
20
 
21
21
  export type CustomerAssetAttributes = {
22
22
  id?: string | undefined;
23
- assetType: CustomerAssetType;
23
+ assetType?: CustomerAssetType | undefined;
24
24
  value?: MonetaryQuantity | undefined;
25
25
  description?: string | undefined;
26
26
  };
@@ -32,7 +32,7 @@ export const CustomerAssetAttributes$inboundSchema: z.ZodType<
32
32
  unknown
33
33
  > = z.object({
34
34
  id: z.string().optional(),
35
- assetType: CustomerAssetType$inboundSchema,
35
+ assetType: CustomerAssetType$inboundSchema.optional(),
36
36
  value: MonetaryQuantity$inboundSchema.optional(),
37
37
  description: z.string().optional(),
38
38
  });
@@ -40,7 +40,7 @@ export const CustomerAssetAttributes$inboundSchema: z.ZodType<
40
40
  /** @internal */
41
41
  export type CustomerAssetAttributes$Outbound = {
42
42
  id?: string | undefined;
43
- assetType: string;
43
+ assetType?: string | undefined;
44
44
  value?: MonetaryQuantity$Outbound | undefined;
45
45
  description?: string | undefined;
46
46
  };
@@ -52,7 +52,7 @@ export const CustomerAssetAttributes$outboundSchema: z.ZodType<
52
52
  CustomerAssetAttributes
53
53
  > = z.object({
54
54
  id: z.string().optional(),
55
- assetType: CustomerAssetType$outboundSchema,
55
+ assetType: CustomerAssetType$outboundSchema.optional(),
56
56
  value: MonetaryQuantity$outboundSchema.optional(),
57
57
  description: z.string().optional(),
58
58
  });
@@ -51,11 +51,11 @@ export type CustomerAttributes = {
51
51
  /**
52
52
  * Title of the customer
53
53
  */
54
- title: CustomerTitle;
54
+ title?: CustomerTitle | undefined;
55
55
  /**
56
56
  * First name of the customer
57
57
  */
58
- firstName: string;
58
+ firstName?: string | undefined;
59
59
  /**
60
60
  * Middle names of the customer
61
61
  */
@@ -63,15 +63,15 @@ export type CustomerAttributes = {
63
63
  /**
64
64
  * Last name of the customer
65
65
  */
66
- lastName: string;
66
+ lastName?: string | undefined;
67
67
  /**
68
68
  * Date of birth in format YYYY-MM-DD
69
69
  */
70
- dateOfBirth: string;
70
+ dateOfBirth?: string | undefined;
71
71
  /**
72
72
  * Date of expiry of the ID in format YYYY-MM-DD
73
73
  */
74
- idExpiryDate: string;
74
+ idExpiryDate?: string | undefined;
75
75
  /**
76
76
  * Type of ID, either drivers' license or passport
77
77
  */
@@ -81,9 +81,13 @@ export type CustomerAttributes = {
81
81
  */
82
82
  idState?: AustralianStatesAndTerritories | undefined;
83
83
  /**
84
- * Number of the ID
84
+ * Number of the ID - license number for driver's licence or passport code.
85
85
  */
86
86
  idNumber?: string | undefined;
87
+ /**
88
+ * For driver's licence only - the card number
89
+ */
90
+ cardNumber?: string | undefined;
87
91
  /**
88
92
  * The customer's email addresses
89
93
  */
@@ -109,15 +113,16 @@ export const CustomerAttributes$inboundSchema: z.ZodType<
109
113
  unknown
110
114
  > = z.object({
111
115
  id: z.string().optional(),
112
- title: CustomerTitle$inboundSchema,
113
- firstName: z.string(),
116
+ title: CustomerTitle$inboundSchema.optional(),
117
+ firstName: z.string().optional(),
114
118
  middleNames: z.string().optional(),
115
- lastName: z.string(),
116
- dateOfBirth: z.string(),
117
- idExpiryDate: z.string(),
119
+ lastName: z.string().optional(),
120
+ dateOfBirth: z.string().optional(),
121
+ idExpiryDate: z.string().optional(),
118
122
  idType: CustomerIDType$inboundSchema.optional(),
119
123
  idState: AustralianStatesAndTerritories$inboundSchema.optional(),
120
124
  idNumber: z.string().optional(),
125
+ cardNumber: z.string().optional(),
121
126
  emailAddresses: z.array(z.string()).optional(),
122
127
  phoneNumbers: z.array(z.string()).optional(),
123
128
  numberOfDependents: z.number().int().optional(),
@@ -130,15 +135,16 @@ export const CustomerAttributes$inboundSchema: z.ZodType<
130
135
  /** @internal */
131
136
  export type CustomerAttributes$Outbound = {
132
137
  id?: string | undefined;
133
- title: string;
134
- firstName: string;
138
+ title?: string | undefined;
139
+ firstName?: string | undefined;
135
140
  middleNames?: string | undefined;
136
- lastName: string;
137
- dateOfBirth: string;
138
- idExpiryDate: string;
141
+ lastName?: string | undefined;
142
+ dateOfBirth?: string | undefined;
143
+ idExpiryDate?: string | undefined;
139
144
  idType?: string | undefined;
140
145
  idState?: string | undefined;
141
146
  idNumber?: string | undefined;
147
+ cardNumber?: string | undefined;
142
148
  emailAddresses?: Array<string> | undefined;
143
149
  phoneNumbers?: Array<string> | undefined;
144
150
  numberOfDependents?: number | undefined;
@@ -155,15 +161,16 @@ export const CustomerAttributes$outboundSchema: z.ZodType<
155
161
  CustomerAttributes
156
162
  > = z.object({
157
163
  id: z.string().optional(),
158
- title: CustomerTitle$outboundSchema,
159
- firstName: z.string(),
164
+ title: CustomerTitle$outboundSchema.optional(),
165
+ firstName: z.string().optional(),
160
166
  middleNames: z.string().optional(),
161
- lastName: z.string(),
162
- dateOfBirth: z.string(),
163
- idExpiryDate: z.string(),
167
+ lastName: z.string().optional(),
168
+ dateOfBirth: z.string().optional(),
169
+ idExpiryDate: z.string().optional(),
164
170
  idType: CustomerIDType$outboundSchema.optional(),
165
171
  idState: AustralianStatesAndTerritories$outboundSchema.optional(),
166
172
  idNumber: z.string().optional(),
173
+ cardNumber: z.string().optional(),
167
174
  emailAddresses: z.array(z.string()).optional(),
168
175
  phoneNumbers: z.array(z.string()).optional(),
169
176
  numberOfDependents: z.number().int().optional(),
@@ -25,7 +25,7 @@ import {
25
25
 
26
26
  export type CustomerLiabilityAttributes = {
27
27
  id?: string | undefined;
28
- liabilityType: CustomerLiabilityType;
28
+ liabilityType?: CustomerLiabilityType | undefined;
29
29
  outstandingAmount?: MonetaryQuantity | undefined;
30
30
  limit?: MonetaryQuantity | undefined;
31
31
  financier?: string | undefined;
@@ -41,7 +41,7 @@ export const CustomerLiabilityAttributes$inboundSchema: z.ZodType<
41
41
  unknown
42
42
  > = z.object({
43
43
  id: z.string().optional(),
44
- liabilityType: CustomerLiabilityType$inboundSchema,
44
+ liabilityType: CustomerLiabilityType$inboundSchema.optional(),
45
45
  outstandingAmount: MonetaryQuantity$inboundSchema.optional(),
46
46
  limit: MonetaryQuantity$inboundSchema.optional(),
47
47
  financier: z.string().optional(),
@@ -54,7 +54,7 @@ export const CustomerLiabilityAttributes$inboundSchema: z.ZodType<
54
54
  /** @internal */
55
55
  export type CustomerLiabilityAttributes$Outbound = {
56
56
  id?: string | undefined;
57
- liabilityType: string;
57
+ liabilityType?: string | undefined;
58
58
  outstandingAmount?: MonetaryQuantity$Outbound | undefined;
59
59
  limit?: MonetaryQuantity$Outbound | undefined;
60
60
  financier?: string | undefined;
@@ -70,7 +70,7 @@ export const CustomerLiabilityAttributes$outboundSchema: z.ZodType<
70
70
  CustomerLiabilityAttributes
71
71
  > = z.object({
72
72
  id: z.string().optional(),
73
- liabilityType: CustomerLiabilityType$outboundSchema,
73
+ liabilityType: CustomerLiabilityType$outboundSchema.optional(),
74
74
  outstandingAmount: MonetaryQuantity$outboundSchema.optional(),
75
75
  limit: MonetaryQuantity$outboundSchema.optional(),
76
76
  financier: z.string().optional(),
@@ -9,8 +9,8 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
10
  export type EntityAttributes = {
11
11
  id?: string | undefined;
12
- entityName: string;
13
- abn: string;
12
+ entityName?: string | undefined;
13
+ abn?: string | undefined;
14
14
  turnover?: number | undefined;
15
15
  industryType?: string | undefined;
16
16
  emails?: Array<string> | undefined;
@@ -24,8 +24,8 @@ export const EntityAttributes$inboundSchema: z.ZodType<
24
24
  unknown
25
25
  > = z.object({
26
26
  id: z.string().optional(),
27
- entityName: z.string(),
28
- abn: z.string(),
27
+ entityName: z.string().optional(),
28
+ abn: z.string().optional(),
29
29
  turnover: z.number().int().optional(),
30
30
  industryType: z.string().optional(),
31
31
  emails: z.array(z.string()).optional(),
@@ -35,8 +35,8 @@ export const EntityAttributes$inboundSchema: z.ZodType<
35
35
  /** @internal */
36
36
  export type EntityAttributes$Outbound = {
37
37
  id?: string | undefined;
38
- entityName: string;
39
- abn: string;
38
+ entityName?: string | undefined;
39
+ abn?: string | undefined;
40
40
  turnover?: number | undefined;
41
41
  industryType?: string | undefined;
42
42
  emails?: Array<string> | undefined;
@@ -50,8 +50,8 @@ export const EntityAttributes$outboundSchema: z.ZodType<
50
50
  EntityAttributes
51
51
  > = z.object({
52
52
  id: z.string().optional(),
53
- entityName: z.string(),
54
- abn: z.string(),
53
+ entityName: z.string().optional(),
54
+ abn: z.string().optional(),
55
55
  turnover: z.number().int().optional(),
56
56
  industryType: z.string().optional(),
57
57
  emails: z.array(z.string()).optional(),
@@ -25,7 +25,7 @@ import {
25
25
 
26
26
  export type ExpenseAttributes = {
27
27
  id?: string | undefined;
28
- expenseType: ExpenseType;
28
+ expenseType?: ExpenseType | undefined;
29
29
  frequency?: ExpenseFrequency | undefined;
30
30
  amount?: MonetaryQuantity | undefined;
31
31
  };
@@ -37,7 +37,7 @@ export const ExpenseAttributes$inboundSchema: z.ZodType<
37
37
  unknown
38
38
  > = z.object({
39
39
  id: z.string().optional(),
40
- expenseType: ExpenseType$inboundSchema,
40
+ expenseType: ExpenseType$inboundSchema.optional(),
41
41
  frequency: ExpenseFrequency$inboundSchema.optional(),
42
42
  amount: MonetaryQuantity$inboundSchema.optional(),
43
43
  });
@@ -45,7 +45,7 @@ export const ExpenseAttributes$inboundSchema: z.ZodType<
45
45
  /** @internal */
46
46
  export type ExpenseAttributes$Outbound = {
47
47
  id?: string | undefined;
48
- expenseType: string;
48
+ expenseType?: string | undefined;
49
49
  frequency?: string | undefined;
50
50
  amount?: MonetaryQuantity$Outbound | undefined;
51
51
  };
@@ -57,7 +57,7 @@ export const ExpenseAttributes$outboundSchema: z.ZodType<
57
57
  ExpenseAttributes
58
58
  > = z.object({
59
59
  id: z.string().optional(),
60
- expenseType: ExpenseType$outboundSchema,
60
+ expenseType: ExpenseType$outboundSchema.optional(),
61
61
  frequency: ExpenseFrequency$outboundSchema.optional(),
62
62
  amount: MonetaryQuantity$outboundSchema.optional(),
63
63
  });
@@ -35,20 +35,6 @@ export const Title = {
35
35
  } as const;
36
36
  export type Title = ClosedEnum<typeof Title>;
37
37
 
38
- export type ForbiddenError = {
39
- id?: string | undefined;
40
- links?: APIErrorLinks | undefined;
41
- status: ForbiddenErrorStatus;
42
- code: Code;
43
- title: Title;
44
- detail: string;
45
- /**
46
- * An object describing the source of the error from the request
47
- */
48
- source?: ErrorSource | undefined;
49
- meta?: { [k: string]: any } | undefined;
50
- };
51
-
52
38
  /** @internal */
53
39
  export const ForbiddenErrorStatus$inboundSchema: z.ZodNativeEnum<
54
40
  typeof ForbiddenErrorStatus
@@ -110,6 +96,20 @@ export namespace Title$ {
110
96
  export const outboundSchema = Title$outboundSchema;
111
97
  }
112
98
 
99
+ export type ForbiddenError = {
100
+ id?: string | undefined;
101
+ links?: APIErrorLinks | undefined;
102
+ status: ForbiddenErrorStatus;
103
+ code: Code;
104
+ title: Title;
105
+ detail: string;
106
+ /**
107
+ * An object describing the source of the error from the request
108
+ */
109
+ source?: ErrorSource | undefined;
110
+ meta?: { [k: string]: any } | undefined;
111
+ };
112
+
113
113
  /** @internal */
114
114
  export const ForbiddenError$inboundSchema: z.ZodType<
115
115
  ForbiddenError,
@@ -25,7 +25,7 @@ import {
25
25
 
26
26
  export type IncomeAttributes = {
27
27
  id?: string | undefined;
28
- incomeType: IncomeType;
28
+ incomeType?: IncomeType | undefined;
29
29
  frequency?: IncomeFrequency | undefined;
30
30
  amount?: MonetaryQuantity | undefined;
31
31
  };
@@ -37,7 +37,7 @@ export const IncomeAttributes$inboundSchema: z.ZodType<
37
37
  unknown
38
38
  > = z.object({
39
39
  id: z.string().optional(),
40
- incomeType: IncomeType$inboundSchema,
40
+ incomeType: IncomeType$inboundSchema.optional(),
41
41
  frequency: IncomeFrequency$inboundSchema.optional(),
42
42
  amount: MonetaryQuantity$inboundSchema.optional(),
43
43
  });
@@ -45,7 +45,7 @@ export const IncomeAttributes$inboundSchema: z.ZodType<
45
45
  /** @internal */
46
46
  export type IncomeAttributes$Outbound = {
47
47
  id?: string | undefined;
48
- incomeType: string;
48
+ incomeType?: string | undefined;
49
49
  frequency?: string | undefined;
50
50
  amount?: MonetaryQuantity$Outbound | undefined;
51
51
  };
@@ -57,7 +57,7 @@ export const IncomeAttributes$outboundSchema: z.ZodType<
57
57
  IncomeAttributes
58
58
  > = z.object({
59
59
  id: z.string().optional(),
60
- incomeType: IncomeType$outboundSchema,
60
+ incomeType: IncomeType$outboundSchema.optional(),
61
61
  frequency: IncomeFrequency$outboundSchema.optional(),
62
62
  amount: MonetaryQuantity$outboundSchema.optional(),
63
63
  });
@@ -18,18 +18,6 @@ export const ValueType = {
18
18
  } as const;
19
19
  export type ValueType = ClosedEnum<typeof ValueType>;
20
20
 
21
- export type MonetaryQuantity = {
22
- valueType: ValueType;
23
- /**
24
- * Monetary quantity, specified in lowest denominator of the provided currency (e.g: cents for AUD). Serialised as a string e.g. for $100 AUD, provide: 10000
25
- */
26
- value: string;
27
- /**
28
- * ISO 4217 currency code, currently limited to AUD
29
- */
30
- currencyCode: CurrencyCodeIso4217;
31
- };
32
-
33
21
  /** @internal */
34
22
  export const ValueType$inboundSchema: z.ZodNativeEnum<typeof ValueType> = z
35
23
  .nativeEnum(ValueType);
@@ -49,6 +37,18 @@ export namespace ValueType$ {
49
37
  export const outboundSchema = ValueType$outboundSchema;
50
38
  }
51
39
 
40
+ export type MonetaryQuantity = {
41
+ valueType: ValueType;
42
+ /**
43
+ * Monetary quantity, specified in lowest denominator of the provided currency (e.g: cents for AUD). Serialised as a string e.g. for $100 AUD, provide: 10000
44
+ */
45
+ value: string;
46
+ /**
47
+ * ISO 4217 currency code, currently limited to AUD
48
+ */
49
+ currencyCode: CurrencyCodeIso4217;
50
+ };
51
+
52
52
  /** @internal */
53
53
  export const MonetaryQuantity$inboundSchema: z.ZodType<
54
54
  MonetaryQuantity,
@@ -15,14 +15,6 @@ export type PercentageQuantityValueType = ClosedEnum<
15
15
  typeof PercentageQuantityValueType
16
16
  >;
17
17
 
18
- export type PercentageQuantity = {
19
- valueType: PercentageQuantityValueType;
20
- /**
21
- * Percentage quantity, e.g. provide '10' for 10%
22
- */
23
- value: string;
24
- };
25
-
26
18
  /** @internal */
27
19
  export const PercentageQuantityValueType$inboundSchema: z.ZodNativeEnum<
28
20
  typeof PercentageQuantityValueType
@@ -44,6 +36,14 @@ export namespace PercentageQuantityValueType$ {
44
36
  export const outboundSchema = PercentageQuantityValueType$outboundSchema;
45
37
  }
46
38
 
39
+ export type PercentageQuantity = {
40
+ valueType: PercentageQuantityValueType;
41
+ /**
42
+ * Percentage quantity, e.g. provide '10' for 10%
43
+ */
44
+ value: string;
45
+ };
46
+
47
47
  /** @internal */
48
48
  export const PercentageQuantity$inboundSchema: z.ZodType<
49
49
  PercentageQuantity,
@@ -41,17 +41,6 @@ export type RelationshipResourceNotFoundTitle = ClosedEnum<
41
41
  typeof RelationshipResourceNotFoundTitle
42
42
  >;
43
43
 
44
- export type RelationshipResourceNotFound = {
45
- id?: string | undefined;
46
- links?: APIErrorLinks | undefined;
47
- status: RelationshipResourceNotFoundStatus;
48
- code: RelationshipResourceNotFoundCode;
49
- title: RelationshipResourceNotFoundTitle;
50
- detail: string;
51
- source: ErrorSource;
52
- meta: { [k: string]: any };
53
- };
54
-
55
44
  /** @internal */
56
45
  export const RelationshipResourceNotFoundStatus$inboundSchema: z.ZodNativeEnum<
57
46
  typeof RelationshipResourceNotFoundStatus
@@ -117,6 +106,17 @@ export namespace RelationshipResourceNotFoundTitle$ {
117
106
  RelationshipResourceNotFoundTitle$outboundSchema;
118
107
  }
119
108
 
109
+ export type RelationshipResourceNotFound = {
110
+ id?: string | undefined;
111
+ links?: APIErrorLinks | undefined;
112
+ status: RelationshipResourceNotFoundStatus;
113
+ code: RelationshipResourceNotFoundCode;
114
+ title: RelationshipResourceNotFoundTitle;
115
+ detail: string;
116
+ source: ErrorSource;
117
+ meta: { [k: string]: any };
118
+ };
119
+
120
120
  /** @internal */
121
121
  export const RelationshipResourceNotFound$inboundSchema: z.ZodType<
122
122
  RelationshipResourceNotFound,
@@ -35,20 +35,6 @@ export const ResourceNotFoundTitle = {
35
35
  } as const;
36
36
  export type ResourceNotFoundTitle = ClosedEnum<typeof ResourceNotFoundTitle>;
37
37
 
38
- export type ResourceNotFound = {
39
- id?: string | undefined;
40
- links?: APIErrorLinks | undefined;
41
- status: ResourceNotFoundStatus;
42
- code: ResourceNotFoundCode;
43
- title: ResourceNotFoundTitle;
44
- detail: string;
45
- /**
46
- * An object describing the source of the error from the request
47
- */
48
- source?: ErrorSource | undefined;
49
- meta?: { [k: string]: any } | undefined;
50
- };
51
-
52
38
  /** @internal */
53
39
  export const ResourceNotFoundStatus$inboundSchema: z.ZodNativeEnum<
54
40
  typeof ResourceNotFoundStatus
@@ -112,6 +98,20 @@ export namespace ResourceNotFoundTitle$ {
112
98
  export const outboundSchema = ResourceNotFoundTitle$outboundSchema;
113
99
  }
114
100
 
101
+ export type ResourceNotFound = {
102
+ id?: string | undefined;
103
+ links?: APIErrorLinks | undefined;
104
+ status: ResourceNotFoundStatus;
105
+ code: ResourceNotFoundCode;
106
+ title: ResourceNotFoundTitle;
107
+ detail: string;
108
+ /**
109
+ * An object describing the source of the error from the request
110
+ */
111
+ source?: ErrorSource | undefined;
112
+ meta?: { [k: string]: any } | undefined;
113
+ };
114
+
115
115
  /** @internal */
116
116
  export const ResourceNotFound$inboundSchema: z.ZodType<
117
117
  ResourceNotFound,