@financeable/aggregation 0.5.1 → 0.6.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 (292) hide show
  1. package/FUNCTIONS.md +11 -132
  2. package/README.md +262 -1515
  3. package/docs/sdks/applications/README.md +171 -295
  4. package/docs/sdks/oauthtoken/README.md +5 -5
  5. package/docs/sdks/supportingdocuments/README.md +113 -0
  6. package/funcs/applicationsCreate.d.ts +1 -2
  7. package/funcs/applicationsCreate.d.ts.map +1 -1
  8. package/funcs/applicationsCreate.js +2 -3
  9. package/funcs/applicationsCreate.js.map +1 -1
  10. package/funcs/{oauthTokenGet.d.ts → oauthTokenOauthToken.d.ts} +2 -2
  11. package/funcs/oauthTokenOauthToken.d.ts.map +1 -0
  12. package/funcs/{oauthTokenGet.js → oauthTokenOauthToken.js} +3 -3
  13. package/funcs/oauthTokenOauthToken.js.map +1 -0
  14. package/funcs/supportingDocumentsCreate.d.ts +15 -0
  15. package/funcs/supportingDocumentsCreate.d.ts.map +1 -0
  16. package/funcs/{applicationsList.js → supportingDocumentsCreate.js} +15 -12
  17. package/funcs/supportingDocumentsCreate.js.map +1 -0
  18. package/jsr.json +1 -1
  19. package/lib/config.d.ts +4 -4
  20. package/lib/config.d.ts.map +1 -1
  21. package/lib/config.js +4 -7
  22. package/lib/config.js.map +1 -1
  23. package/lib/matchers.d.ts +3 -1
  24. package/lib/matchers.d.ts.map +1 -1
  25. package/lib/matchers.js +12 -0
  26. package/lib/matchers.js.map +1 -1
  27. package/lib/sdks.d.ts +3 -1
  28. package/lib/sdks.d.ts.map +1 -1
  29. package/lib/sdks.js +13 -13
  30. package/lib/sdks.js.map +1 -1
  31. package/models/components/addressattributes.d.ts +8 -8
  32. package/models/components/addressattributes.d.ts.map +1 -1
  33. package/models/components/addressattributes.js +13 -14
  34. package/models/components/addressattributes.js.map +1 -1
  35. package/models/components/applicationresource.d.ts +30 -0
  36. package/models/components/applicationresource.d.ts.map +1 -0
  37. package/models/components/applicationresource.js +73 -0
  38. package/models/components/applicationresource.js.map +1 -0
  39. package/models/components/badrequesterror.d.ts +119 -0
  40. package/models/components/badrequesterror.d.ts.map +1 -0
  41. package/models/components/badrequesterror.js +140 -0
  42. package/models/components/badrequesterror.js.map +1 -0
  43. package/models/components/commercialapplicationjsonapirelationships.d.ts +384 -0
  44. package/models/components/commercialapplicationjsonapirelationships.d.ts.map +1 -0
  45. package/models/components/commercialapplicationjsonapirelationships.js +391 -0
  46. package/models/components/commercialapplicationjsonapirelationships.js.map +1 -0
  47. package/models/components/commercialapplicationresource.d.ts +191 -0
  48. package/models/components/commercialapplicationresource.d.ts.map +1 -0
  49. package/models/components/commercialapplicationresource.js +183 -0
  50. package/models/components/commercialapplicationresource.js.map +1 -0
  51. package/models/components/commercialsecuredloanapplicationsubmissionpayload.d.ts +124 -0
  52. package/models/components/commercialsecuredloanapplicationsubmissionpayload.d.ts.map +1 -0
  53. package/models/components/commercialsecuredloanapplicationsubmissionpayload.js +144 -0
  54. package/models/components/commercialsecuredloanapplicationsubmissionpayload.js.map +1 -0
  55. package/models/components/commercialsecuredloanassetattributes.d.ts +235 -0
  56. package/models/components/commercialsecuredloanassetattributes.d.ts.map +1 -0
  57. package/models/components/commercialsecuredloanassetattributes.js +168 -0
  58. package/models/components/commercialsecuredloanassetattributes.js.map +1 -0
  59. package/models/components/commercialsecuredloanassettype.d.ts +100 -0
  60. package/models/components/commercialsecuredloanassettype.d.ts.map +1 -0
  61. package/models/components/commercialsecuredloanassettype.js +84 -0
  62. package/models/components/commercialsecuredloanassettype.js.map +1 -0
  63. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts +455 -0
  64. package/models/components/commercialsecuredloancommercialapplicationrelationships.d.ts.map +1 -0
  65. package/models/components/commercialsecuredloancommercialapplicationrelationships.js +504 -0
  66. package/models/components/commercialsecuredloancommercialapplicationrelationships.js.map +1 -0
  67. package/models/components/consumerapplicationjsonapirelationships.d.ts +296 -0
  68. package/models/components/consumerapplicationjsonapirelationships.d.ts.map +1 -0
  69. package/models/components/consumerapplicationjsonapirelationships.js +310 -0
  70. package/models/components/consumerapplicationjsonapirelationships.js.map +1 -0
  71. package/models/components/consumerapplicationresource.d.ts +191 -0
  72. package/models/components/consumerapplicationresource.d.ts.map +1 -0
  73. package/models/components/consumerapplicationresource.js +187 -0
  74. package/models/components/consumerapplicationresource.js.map +1 -0
  75. package/models/components/consumersecuredloanapplicationsubmissionpayload.d.ts +124 -0
  76. package/models/components/consumersecuredloanapplicationsubmissionpayload.d.ts.map +1 -0
  77. package/models/components/consumersecuredloanapplicationsubmissionpayload.js +146 -0
  78. package/models/components/consumersecuredloanapplicationsubmissionpayload.js.map +1 -0
  79. package/models/components/consumersecuredloanassetattributes.d.ts +235 -0
  80. package/models/components/consumersecuredloanassetattributes.d.ts.map +1 -0
  81. package/models/components/consumersecuredloanassetattributes.js +170 -0
  82. package/models/components/consumersecuredloanassetattributes.js.map +1 -0
  83. package/models/components/consumersecuredloanassettype.d.ts +64 -0
  84. package/models/components/consumersecuredloanassettype.d.ts.map +1 -0
  85. package/models/components/{consumerassettype.js → consumersecuredloanassettype.js} +27 -28
  86. package/models/components/consumersecuredloanassettype.js.map +1 -0
  87. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts +376 -0
  88. package/models/components/consumersecuredloanconsumerapplicationrelationships.d.ts.map +1 -0
  89. package/models/components/consumersecuredloanconsumerapplicationrelationships.js +426 -0
  90. package/models/components/consumersecuredloanconsumerapplicationrelationships.js.map +1 -0
  91. package/models/components/createsupportingdocumentsresponse.d.ts +121 -0
  92. package/models/components/createsupportingdocumentsresponse.d.ts.map +1 -0
  93. package/models/components/createsupportingdocumentsresponse.js +149 -0
  94. package/models/components/createsupportingdocumentsresponse.js.map +1 -0
  95. package/models/components/documenttype.d.ts +70 -0
  96. package/models/components/documenttype.d.ts.map +1 -0
  97. package/models/components/documenttype.js +75 -0
  98. package/models/components/documenttype.js.map +1 -0
  99. package/models/components/entityattributes.d.ts +0 -22
  100. package/models/components/entityattributes.d.ts.map +1 -1
  101. package/models/components/entityattributes.js +0 -19
  102. package/models/components/entityattributes.js.map +1 -1
  103. package/models/components/forbiddenerror.d.ts +17 -39
  104. package/models/components/forbiddenerror.d.ts.map +1 -1
  105. package/models/components/forbiddenerror.js +27 -46
  106. package/models/components/forbiddenerror.js.map +1 -1
  107. package/models/components/index.d.ts +25 -8
  108. package/models/components/index.d.ts.map +1 -1
  109. package/models/components/index.js +25 -8
  110. package/models/components/index.js.map +1 -1
  111. package/models/components/linkobject.d.ts +47 -0
  112. package/models/components/linkobject.d.ts.map +1 -0
  113. package/models/components/linkobject.js +77 -0
  114. package/models/components/linkobject.js.map +1 -0
  115. package/models/components/relationshipresourcenotfound.d.ts +116 -0
  116. package/models/components/relationshipresourcenotfound.d.ts.map +1 -0
  117. package/models/components/relationshipresourcenotfound.js +139 -0
  118. package/models/components/relationshipresourcenotfound.js.map +1 -0
  119. package/models/components/resourcenotfound.d.ts +119 -0
  120. package/models/components/resourcenotfound.d.ts.map +1 -0
  121. package/models/components/resourcenotfound.js +139 -0
  122. package/models/components/resourcenotfound.js.map +1 -0
  123. package/models/components/resourcetypes.d.ts +46 -0
  124. package/models/components/resourcetypes.d.ts.map +1 -0
  125. package/models/components/{links.js → resourcetypes.js} +21 -27
  126. package/models/components/resourcetypes.js.map +1 -0
  127. package/models/components/supportingdocumentattributes.d.ts +40 -0
  128. package/models/components/supportingdocumentattributes.d.ts.map +1 -0
  129. package/models/components/{applicationattributescreate.js → supportingdocumentattributes.js} +24 -24
  130. package/models/components/supportingdocumentattributes.js.map +1 -0
  131. package/models/components/supportingdocumentattributesinput.d.ts +38 -0
  132. package/models/components/supportingdocumentattributesinput.d.ts.map +1 -0
  133. package/models/components/supportingdocumentattributesinput.js +72 -0
  134. package/models/components/supportingdocumentattributesinput.js.map +1 -0
  135. package/models/components/supportingdocumentrelationships.d.ts +448 -0
  136. package/models/components/supportingdocumentrelationships.d.ts.map +1 -0
  137. package/models/components/supportingdocumentrelationships.js +434 -0
  138. package/models/components/supportingdocumentrelationships.js.map +1 -0
  139. package/models/components/supportingdocumentresource.d.ts +91 -0
  140. package/models/components/supportingdocumentresource.d.ts.map +1 -0
  141. package/models/components/supportingdocumentresource.js +121 -0
  142. package/models/components/supportingdocumentresource.js.map +1 -0
  143. package/models/components/uploadmimetype.d.ts +49 -0
  144. package/models/components/uploadmimetype.d.ts.map +1 -0
  145. package/models/components/{applicationtype.js → uploadmimetype.js} +22 -14
  146. package/models/components/uploadmimetype.js.map +1 -0
  147. package/models/errors/createapplication.d.ts +38 -0
  148. package/models/errors/createapplication.d.ts.map +1 -0
  149. package/models/errors/{responsebody.js → createapplication.js} +15 -15
  150. package/models/errors/createapplication.js.map +1 -0
  151. package/models/errors/index.d.ts +2 -1
  152. package/models/errors/index.d.ts.map +1 -1
  153. package/models/errors/index.js +2 -1
  154. package/models/errors/index.js.map +1 -1
  155. package/models/errors/supportingdocumentscreate.d.ts +143 -0
  156. package/models/errors/supportingdocumentscreate.d.ts.map +1 -0
  157. package/models/errors/supportingdocumentscreate.js +225 -0
  158. package/models/errors/supportingdocumentscreate.js.map +1 -0
  159. package/models/operations/createapplication.d.ts +66 -808
  160. package/models/operations/createapplication.d.ts.map +1 -1
  161. package/models/operations/createapplication.js +82 -837
  162. package/models/operations/createapplication.js.map +1 -1
  163. package/models/operations/index.d.ts +1 -2
  164. package/models/operations/index.d.ts.map +1 -1
  165. package/models/operations/index.js +1 -2
  166. package/models/operations/index.js.map +1 -1
  167. package/models/operations/supportingdocumentscreate.d.ts +60 -0
  168. package/models/operations/supportingdocumentscreate.d.ts.map +1 -0
  169. package/models/operations/supportingdocumentscreate.js +108 -0
  170. package/models/operations/supportingdocumentscreate.js.map +1 -0
  171. package/package.json +2 -2
  172. package/sdk/applications.d.ts +1 -10
  173. package/sdk/applications.d.ts.map +1 -1
  174. package/sdk/applications.js +0 -14
  175. package/sdk/applications.js.map +1 -1
  176. package/sdk/oauthtoken.d.ts +1 -1
  177. package/sdk/oauthtoken.d.ts.map +1 -1
  178. package/sdk/oauthtoken.js +3 -3
  179. package/sdk/oauthtoken.js.map +1 -1
  180. package/sdk/sdk.d.ts +3 -0
  181. package/sdk/sdk.d.ts.map +1 -1
  182. package/sdk/sdk.js +4 -0
  183. package/sdk/sdk.js.map +1 -1
  184. package/sdk/supportingdocuments.d.ts +10 -0
  185. package/sdk/supportingdocuments.d.ts.map +1 -0
  186. package/sdk/supportingdocuments.js +19 -0
  187. package/sdk/supportingdocuments.js.map +1 -0
  188. package/src/funcs/applicationsCreate.ts +7 -8
  189. package/src/funcs/{oauthTokenGet.ts → oauthTokenOauthToken.ts} +1 -1
  190. package/src/funcs/{applicationsList.ts → supportingDocumentsCreate.ts} +31 -20
  191. package/src/lib/config.ts +4 -7
  192. package/src/lib/matchers.ts +20 -0
  193. package/src/lib/sdks.ts +19 -13
  194. package/src/models/components/addressattributes.ts +18 -14
  195. package/src/models/components/applicationresource.ts +83 -0
  196. package/src/models/components/badrequesterror.ts +182 -0
  197. package/src/models/components/commercialapplicationjsonapirelationships.ts +894 -0
  198. package/src/models/components/commercialapplicationresource.ts +355 -0
  199. package/src/models/components/commercialsecuredloanapplicationsubmissionpayload.ts +237 -0
  200. package/src/models/components/commercialsecuredloanassetattributes.ts +315 -0
  201. package/src/models/components/commercialsecuredloanassettype.ts +64 -0
  202. package/src/models/components/commercialsecuredloancommercialapplicationrelationships.ts +1148 -0
  203. package/src/models/components/consumerapplicationjsonapirelationships.ts +683 -0
  204. package/src/models/components/consumerapplicationresource.ts +342 -0
  205. package/src/models/components/consumersecuredloanapplicationsubmissionpayload.ts +270 -0
  206. package/src/models/components/consumersecuredloanassetattributes.ts +330 -0
  207. package/src/models/components/consumersecuredloanassettype.ts +47 -0
  208. package/src/models/components/consumersecuredloanconsumerapplicationrelationships.ts +1011 -0
  209. package/src/models/components/createsupportingdocumentsresponse.ts +252 -0
  210. package/src/models/components/documenttype.ts +49 -0
  211. package/src/models/components/entityattributes.ts +0 -44
  212. package/src/models/components/forbiddenerror.ts +35 -58
  213. package/src/models/components/index.ts +25 -8
  214. package/src/models/components/linkobject.ts +84 -0
  215. package/src/models/components/relationshipresourcenotfound.ts +195 -0
  216. package/src/models/components/resourcenotfound.ts +188 -0
  217. package/src/models/components/resourcetypes.ts +39 -0
  218. package/src/models/components/supportingdocumentattributes.ts +87 -0
  219. package/src/models/components/supportingdocumentattributesinput.ts +84 -0
  220. package/src/models/components/supportingdocumentrelationships.ts +828 -0
  221. package/src/models/components/supportingdocumentresource.ts +163 -0
  222. package/src/models/components/uploadmimetype.ts +44 -0
  223. package/src/models/errors/createapplication.ts +76 -0
  224. package/src/models/errors/index.ts +2 -1
  225. package/src/models/errors/supportingdocumentscreate.ts +342 -0
  226. package/src/models/operations/createapplication.ts +143 -1778
  227. package/src/models/operations/index.ts +1 -2
  228. package/src/models/operations/supportingdocumentscreate.ts +150 -0
  229. package/src/sdk/applications.ts +1 -32
  230. package/src/sdk/oauthtoken.ts +3 -3
  231. package/src/sdk/sdk.ts +8 -0
  232. package/src/sdk/supportingdocuments.ts +25 -0
  233. package/funcs/applicationsGet.d.ts +0 -14
  234. package/funcs/applicationsGet.d.ts.map +0 -1
  235. package/funcs/applicationsGet.js +0 -120
  236. package/funcs/applicationsGet.js.map +0 -1
  237. package/funcs/applicationsList.d.ts +0 -14
  238. package/funcs/applicationsList.d.ts.map +0 -1
  239. package/funcs/applicationsList.js.map +0 -1
  240. package/funcs/oauthTokenGet.d.ts.map +0 -1
  241. package/funcs/oauthTokenGet.js.map +0 -1
  242. package/models/components/applicationattributes.d.ts +0 -69
  243. package/models/components/applicationattributes.d.ts.map +0 -1
  244. package/models/components/applicationattributes.js +0 -85
  245. package/models/components/applicationattributes.js.map +0 -1
  246. package/models/components/applicationattributescreate.d.ts +0 -43
  247. package/models/components/applicationattributescreate.d.ts.map +0 -1
  248. package/models/components/applicationattributescreate.js.map +0 -1
  249. package/models/components/applicationresourcebulksubmission.d.ts +0 -527
  250. package/models/components/applicationresourcebulksubmission.d.ts.map +0 -1
  251. package/models/components/applicationresourcebulksubmission.js +0 -565
  252. package/models/components/applicationresourcebulksubmission.js.map +0 -1
  253. package/models/components/applicationtype.d.ts +0 -28
  254. package/models/components/applicationtype.d.ts.map +0 -1
  255. package/models/components/applicationtype.js.map +0 -1
  256. package/models/components/assetattributes.d.ts +0 -311
  257. package/models/components/assetattributes.d.ts.map +0 -1
  258. package/models/components/assetattributes.js +0 -234
  259. package/models/components/assetattributes.js.map +0 -1
  260. package/models/components/commercialassettype.d.ts +0 -44
  261. package/models/components/commercialassettype.d.ts.map +0 -1
  262. package/models/components/commercialassettype.js +0 -85
  263. package/models/components/commercialassettype.js.map +0 -1
  264. package/models/components/consumerassettype.d.ts +0 -32
  265. package/models/components/consumerassettype.d.ts.map +0 -1
  266. package/models/components/consumerassettype.js.map +0 -1
  267. package/models/components/links.d.ts +0 -40
  268. package/models/components/links.d.ts.map +0 -1
  269. package/models/components/links.js.map +0 -1
  270. package/models/errors/responsebody.d.ts +0 -38
  271. package/models/errors/responsebody.d.ts.map +0 -1
  272. package/models/errors/responsebody.js.map +0 -1
  273. package/models/operations/getapplication.d.ts +0 -962
  274. package/models/operations/getapplication.d.ts.map +0 -1
  275. package/models/operations/getapplication.js +0 -1030
  276. package/models/operations/getapplication.js.map +0 -1
  277. package/models/operations/getapplications.d.ts +0 -962
  278. package/models/operations/getapplications.d.ts.map +0 -1
  279. package/models/operations/getapplications.js +0 -1029
  280. package/models/operations/getapplications.js.map +0 -1
  281. package/src/funcs/applicationsGet.ts +0 -168
  282. package/src/models/components/applicationattributes.ts +0 -128
  283. package/src/models/components/applicationattributescreate.ts +0 -90
  284. package/src/models/components/applicationresourcebulksubmission.ts +0 -1172
  285. package/src/models/components/applicationtype.ts +0 -33
  286. package/src/models/components/assetattributes.ts +0 -411
  287. package/src/models/components/commercialassettype.ts +0 -61
  288. package/src/models/components/consumerassettype.ts +0 -43
  289. package/src/models/components/links.ts +0 -72
  290. package/src/models/errors/responsebody.ts +0 -76
  291. package/src/models/operations/getapplication.ts +0 -2246
  292. package/src/models/operations/getapplications.ts +0 -2191
@@ -1,33 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { ClosedEnum } from "../../types/enums.js";
7
-
8
- export const ApplicationType = {
9
- Consumer: "consumer",
10
- Commercial: "commercial",
11
- } as const;
12
- export type ApplicationType = ClosedEnum<typeof ApplicationType>;
13
-
14
- /** @internal */
15
- export const ApplicationType$inboundSchema: z.ZodNativeEnum<
16
- typeof ApplicationType
17
- > = z.nativeEnum(ApplicationType);
18
-
19
- /** @internal */
20
- export const ApplicationType$outboundSchema: z.ZodNativeEnum<
21
- typeof ApplicationType
22
- > = ApplicationType$inboundSchema;
23
-
24
- /**
25
- * @internal
26
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
27
- */
28
- export namespace ApplicationType$ {
29
- /** @deprecated use `ApplicationType$inboundSchema` instead. */
30
- export const inboundSchema = ApplicationType$inboundSchema;
31
- /** @deprecated use `ApplicationType$outboundSchema` instead. */
32
- export const outboundSchema = ApplicationType$outboundSchema;
33
- }
@@ -1,411 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import { ClosedEnum } from "../../types/enums.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- CommercialAssetType,
12
- CommercialAssetType$inboundSchema,
13
- CommercialAssetType$outboundSchema,
14
- } from "./commercialassettype.js";
15
- import {
16
- ConsumerAssetType,
17
- ConsumerAssetType$inboundSchema,
18
- ConsumerAssetType$outboundSchema,
19
- } from "./consumerassettype.js";
20
-
21
- /**
22
- * Condition of asset
23
- */
24
- export const Condition = {
25
- New: "NEW",
26
- Demo: "DEMO",
27
- Used: "USED",
28
- } as const;
29
- /**
30
- * Condition of asset
31
- */
32
- export type Condition = ClosedEnum<typeof Condition>;
33
-
34
- /**
35
- * Type of asset - must be a member of the enums ConsumerAssetType or CommercialAssetType depending on the respective Application type
36
- */
37
- export type AssetType = ConsumerAssetType | CommercialAssetType;
38
-
39
- export const Purpose = {
40
- Vehicle: "VEHICLE",
41
- DebtConsolidation: "DEBT_CONSOLIDATION",
42
- HomeImprovements: "HOME_IMPROVEMENTS",
43
- MEDICALAndDENTAL: "MEDICAL_&_DENTAL",
44
- HouseholdFurnishings: "HOUSEHOLD_FURNISHINGS",
45
- Education: "EDUCATION",
46
- Travel: "TRAVEL",
47
- Wedding: "WEDDING",
48
- MortgageCostFunding: "MORTGAGE_COST_FUNDING",
49
- OtherPersonalUse: "OTHER_PERSONAL_USE",
50
- } as const;
51
- export type Purpose = ClosedEnum<typeof Purpose>;
52
-
53
- /**
54
- * Registration state (or territory) of asset
55
- */
56
- export const RegistrationState = {
57
- Vic: "VIC",
58
- Nsw: "NSW",
59
- Qld: "QLD",
60
- Sa: "SA",
61
- Wa: "WA",
62
- Tas: "TAS",
63
- Nt: "NT",
64
- Act: "ACT",
65
- } as const;
66
- /**
67
- * Registration state (or territory) of asset
68
- */
69
- export type RegistrationState = ClosedEnum<typeof RegistrationState>;
70
-
71
- /**
72
- * The asset to be obtained by the customer, using the proposed loan financing.
73
- */
74
- export type AssetAttributes = {
75
- /**
76
- * Current age of asset as number (integer) of years
77
- */
78
- ageOfAsset: number;
79
- /**
80
- * Age of asset at the end of the loan term, in years
81
- */
82
- ageOfAssetAtEnd: number;
83
- /**
84
- * Condition of asset
85
- */
86
- condition: Condition;
87
- /**
88
- * Type of asset - must be a member of the enums ConsumerAssetType or CommercialAssetType depending on the respective Application type
89
- */
90
- assetType: ConsumerAssetType | CommercialAssetType;
91
- purpose: Purpose;
92
- /**
93
- * Value of asset
94
- */
95
- assetValue: string;
96
- /**
97
- * Make of asset
98
- */
99
- make: string;
100
- /**
101
- * Model of asset
102
- */
103
- assetModel: string;
104
- /**
105
- * Registration number of asset
106
- */
107
- registrationNumber: string;
108
- /**
109
- * Registration state (or territory) of asset
110
- */
111
- registrationState?: RegistrationState | undefined;
112
- /**
113
- * VIN of asset
114
- */
115
- vin?: string | undefined;
116
- /**
117
- * Name of asset supplier
118
- */
119
- supplierName?: string | undefined;
120
- /**
121
- * ABN of asset supplier
122
- */
123
- supplierABN?: string | undefined;
124
- /**
125
- * Address of asset supplier
126
- */
127
- supplierAddress?: string | undefined;
128
- /**
129
- * Phone number of asset supplier
130
- */
131
- supplierPhone?: string | undefined;
132
- /**
133
- * Contact name of the asset supplier
134
- */
135
- supplierContactName?: string | undefined;
136
- /**
137
- * Email address of the asset supplier
138
- */
139
- supplierEmail?: string | undefined;
140
- /**
141
- * Is this asset obtained via private sale?
142
- */
143
- privateSale: boolean;
144
- /**
145
- * Type of sale
146
- */
147
- typeOfSale: string;
148
- /**
149
- * Description of asset
150
- */
151
- description: string;
152
- /**
153
- * Net asset value of asset, floating point value as string
154
- */
155
- netAssetValue: string;
156
- /**
157
- * Is this asset a luxury asset?
158
- */
159
- isLuxury: boolean;
160
- /**
161
- * Luxury GST, floating point value as string
162
- */
163
- luxuryGst?: string | undefined;
164
- /**
165
- * Additional fees concerning the asset, floating point value as string
166
- */
167
- additionalFees?: string | undefined;
168
- /**
169
- * Additional taxes concerning the asset, floating point value as string
170
- */
171
- additionalTaxes?: string | undefined;
172
- };
173
-
174
- /** @internal */
175
- export const Condition$inboundSchema: z.ZodNativeEnum<typeof Condition> = z
176
- .nativeEnum(Condition);
177
-
178
- /** @internal */
179
- export const Condition$outboundSchema: z.ZodNativeEnum<typeof Condition> =
180
- Condition$inboundSchema;
181
-
182
- /**
183
- * @internal
184
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
185
- */
186
- export namespace Condition$ {
187
- /** @deprecated use `Condition$inboundSchema` instead. */
188
- export const inboundSchema = Condition$inboundSchema;
189
- /** @deprecated use `Condition$outboundSchema` instead. */
190
- export const outboundSchema = Condition$outboundSchema;
191
- }
192
-
193
- /** @internal */
194
- export const AssetType$inboundSchema: z.ZodType<
195
- AssetType,
196
- z.ZodTypeDef,
197
- unknown
198
- > = z.union([
199
- ConsumerAssetType$inboundSchema,
200
- CommercialAssetType$inboundSchema,
201
- ]);
202
-
203
- /** @internal */
204
- export type AssetType$Outbound = string | string;
205
-
206
- /** @internal */
207
- export const AssetType$outboundSchema: z.ZodType<
208
- AssetType$Outbound,
209
- z.ZodTypeDef,
210
- AssetType
211
- > = z.union([
212
- ConsumerAssetType$outboundSchema,
213
- CommercialAssetType$outboundSchema,
214
- ]);
215
-
216
- /**
217
- * @internal
218
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
219
- */
220
- export namespace AssetType$ {
221
- /** @deprecated use `AssetType$inboundSchema` instead. */
222
- export const inboundSchema = AssetType$inboundSchema;
223
- /** @deprecated use `AssetType$outboundSchema` instead. */
224
- export const outboundSchema = AssetType$outboundSchema;
225
- /** @deprecated use `AssetType$Outbound` instead. */
226
- export type Outbound = AssetType$Outbound;
227
- }
228
-
229
- export function assetTypeToJSON(assetType: AssetType): string {
230
- return JSON.stringify(AssetType$outboundSchema.parse(assetType));
231
- }
232
-
233
- export function assetTypeFromJSON(
234
- jsonString: string,
235
- ): SafeParseResult<AssetType, SDKValidationError> {
236
- return safeParse(
237
- jsonString,
238
- (x) => AssetType$inboundSchema.parse(JSON.parse(x)),
239
- `Failed to parse 'AssetType' from JSON`,
240
- );
241
- }
242
-
243
- /** @internal */
244
- export const Purpose$inboundSchema: z.ZodNativeEnum<typeof Purpose> = z
245
- .nativeEnum(Purpose);
246
-
247
- /** @internal */
248
- export const Purpose$outboundSchema: z.ZodNativeEnum<typeof Purpose> =
249
- Purpose$inboundSchema;
250
-
251
- /**
252
- * @internal
253
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
254
- */
255
- export namespace Purpose$ {
256
- /** @deprecated use `Purpose$inboundSchema` instead. */
257
- export const inboundSchema = Purpose$inboundSchema;
258
- /** @deprecated use `Purpose$outboundSchema` instead. */
259
- export const outboundSchema = Purpose$outboundSchema;
260
- }
261
-
262
- /** @internal */
263
- export const RegistrationState$inboundSchema: z.ZodNativeEnum<
264
- typeof RegistrationState
265
- > = z.nativeEnum(RegistrationState);
266
-
267
- /** @internal */
268
- export const RegistrationState$outboundSchema: z.ZodNativeEnum<
269
- typeof RegistrationState
270
- > = RegistrationState$inboundSchema;
271
-
272
- /**
273
- * @internal
274
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
275
- */
276
- export namespace RegistrationState$ {
277
- /** @deprecated use `RegistrationState$inboundSchema` instead. */
278
- export const inboundSchema = RegistrationState$inboundSchema;
279
- /** @deprecated use `RegistrationState$outboundSchema` instead. */
280
- export const outboundSchema = RegistrationState$outboundSchema;
281
- }
282
-
283
- /** @internal */
284
- export const AssetAttributes$inboundSchema: z.ZodType<
285
- AssetAttributes,
286
- z.ZodTypeDef,
287
- unknown
288
- > = z.object({
289
- ageOfAsset: z.number().int(),
290
- ageOfAssetAtEnd: z.number().int(),
291
- condition: Condition$inboundSchema,
292
- assetType: z.union([
293
- ConsumerAssetType$inboundSchema,
294
- CommercialAssetType$inboundSchema,
295
- ]),
296
- purpose: Purpose$inboundSchema,
297
- assetValue: z.string(),
298
- make: z.string(),
299
- assetModel: z.string(),
300
- registrationNumber: z.string(),
301
- registrationState: RegistrationState$inboundSchema.optional(),
302
- vin: z.string().optional(),
303
- supplierName: z.string().optional(),
304
- supplierABN: z.string().optional(),
305
- supplierAddress: z.string().optional(),
306
- supplierPhone: z.string().optional(),
307
- supplierContactName: z.string().optional(),
308
- supplierEmail: z.string().optional(),
309
- privateSale: z.boolean(),
310
- typeOfSale: z.string(),
311
- description: z.string(),
312
- netAssetValue: z.string(),
313
- isLuxury: z.boolean(),
314
- luxuryGst: z.string().optional(),
315
- additionalFees: z.string().optional(),
316
- additionalTaxes: z.string().optional(),
317
- });
318
-
319
- /** @internal */
320
- export type AssetAttributes$Outbound = {
321
- ageOfAsset: number;
322
- ageOfAssetAtEnd: number;
323
- condition: string;
324
- assetType: string | string;
325
- purpose: string;
326
- assetValue: string;
327
- make: string;
328
- assetModel: string;
329
- registrationNumber: string;
330
- registrationState?: string | undefined;
331
- vin?: string | undefined;
332
- supplierName?: string | undefined;
333
- supplierABN?: string | undefined;
334
- supplierAddress?: string | undefined;
335
- supplierPhone?: string | undefined;
336
- supplierContactName?: string | undefined;
337
- supplierEmail?: string | undefined;
338
- privateSale: boolean;
339
- typeOfSale: string;
340
- description: string;
341
- netAssetValue: string;
342
- isLuxury: boolean;
343
- luxuryGst?: string | undefined;
344
- additionalFees?: string | undefined;
345
- additionalTaxes?: string | undefined;
346
- };
347
-
348
- /** @internal */
349
- export const AssetAttributes$outboundSchema: z.ZodType<
350
- AssetAttributes$Outbound,
351
- z.ZodTypeDef,
352
- AssetAttributes
353
- > = z.object({
354
- ageOfAsset: z.number().int(),
355
- ageOfAssetAtEnd: z.number().int(),
356
- condition: Condition$outboundSchema,
357
- assetType: z.union([
358
- ConsumerAssetType$outboundSchema,
359
- CommercialAssetType$outboundSchema,
360
- ]),
361
- purpose: Purpose$outboundSchema,
362
- assetValue: z.string(),
363
- make: z.string(),
364
- assetModel: z.string(),
365
- registrationNumber: z.string(),
366
- registrationState: RegistrationState$outboundSchema.optional(),
367
- vin: z.string().optional(),
368
- supplierName: z.string().optional(),
369
- supplierABN: z.string().optional(),
370
- supplierAddress: z.string().optional(),
371
- supplierPhone: z.string().optional(),
372
- supplierContactName: z.string().optional(),
373
- supplierEmail: z.string().optional(),
374
- privateSale: z.boolean(),
375
- typeOfSale: z.string(),
376
- description: z.string(),
377
- netAssetValue: z.string(),
378
- isLuxury: z.boolean(),
379
- luxuryGst: z.string().optional(),
380
- additionalFees: z.string().optional(),
381
- additionalTaxes: z.string().optional(),
382
- });
383
-
384
- /**
385
- * @internal
386
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
387
- */
388
- export namespace AssetAttributes$ {
389
- /** @deprecated use `AssetAttributes$inboundSchema` instead. */
390
- export const inboundSchema = AssetAttributes$inboundSchema;
391
- /** @deprecated use `AssetAttributes$outboundSchema` instead. */
392
- export const outboundSchema = AssetAttributes$outboundSchema;
393
- /** @deprecated use `AssetAttributes$Outbound` instead. */
394
- export type Outbound = AssetAttributes$Outbound;
395
- }
396
-
397
- export function assetAttributesToJSON(
398
- assetAttributes: AssetAttributes,
399
- ): string {
400
- return JSON.stringify(AssetAttributes$outboundSchema.parse(assetAttributes));
401
- }
402
-
403
- export function assetAttributesFromJSON(
404
- jsonString: string,
405
- ): SafeParseResult<AssetAttributes, SDKValidationError> {
406
- return safeParse(
407
- jsonString,
408
- (x) => AssetAttributes$inboundSchema.parse(JSON.parse(x)),
409
- `Failed to parse 'AssetAttributes' from JSON`,
410
- );
411
- }
@@ -1,61 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
-
7
- export enum CommercialAssetType {
8
- MotorVehicleLessThan45Tonnes = "MOTOR_VEHICLE_(<4.5_TONNES)",
9
- EletricMotorVehicleLessThan45Tonnes = "ELECTRIC_MOTOR_VEHICLE_(<4.5_TONNES)",
10
- CommercialSmallToMediumVehicleLessThan12Tonnes =
11
- "COMMERCIAL_(SMALL_TO_MEDIUM)_VEHICLES_(<12_TONNES)",
12
- CommercialHeavyVehicleGreaterThan12Tonnes =
13
- "COMMERCIAL_(HEAVY)_VEHICLES_(>12_TONNES)",
14
- WarehouseEquipmentWheeledOrTracked =
15
- "WAREHOUSE_EQUIPMENT_(WHEELED_OR_TRACKED)",
16
- EarthMovingAndConstructionWheeledOrTracked =
17
- "EARTH_MOVING_&_CONSTRUCTION_(WHEELED_OR_TRACKED)",
18
- AgriculturalAndLandscapingEquipmentWheeledOrTracked =
19
- "AGRICULTURAL_&_LANDSCAPING_EQUIPMENT_(WHEELED_OR_TRACKED)",
20
- MiniBusesAndRouteBusesLessThan25Seats =
21
- "MINI_BUSES_&_ROUTE_BUSES_(<25_SEATS)",
22
- TrailersAndCaravans = "TRAILERS_AND_CARAVANS",
23
- IndustrialPlantAndPrinting = "INDUSTRIAL_PLANT_&_PRINTING",
24
- ManufacturingEquipment = "MANUFACTURING_EQUIPMENT",
25
- MedicalEquipment = "MEDICAL_EQUIPMENT",
26
- ITComputerAndAudioEquipment = "IT_COMPUTER_&_AUDIO_EQUIPMENT",
27
- HealthAndBeautyEquipment = "HEALTH_&_BEAUTY_EQUIPMENT",
28
- OfficeEquipment = "OFFICE_EQUIPMENT",
29
- OfficeFitout = "OFFICE_FITOUT",
30
- RestaurantAndCateringEquipment = "RESTAURANT_&_CATERING_EQUIPMENT",
31
- OfficeFurniture = "OFFICE_FURNITURE",
32
- Solar = "SOLAR",
33
- MotorbikesATVs = "MOTORBIKES_ATVS",
34
- ClassicCar = "CLASSIC_CAR",
35
- TraileredBoats = "TRAILERED_BOATS",
36
- Jetskis = "JETSKIS",
37
- RideOnMowers = "RIDE_ON_MOWERS",
38
- GolfCarts = "GOLF_CARTS",
39
- Other = "OTHER",
40
- }
41
-
42
- /** @internal */
43
- export const CommercialAssetType$inboundSchema: z.ZodNativeEnum<
44
- typeof CommercialAssetType
45
- > = z.nativeEnum(CommercialAssetType);
46
-
47
- /** @internal */
48
- export const CommercialAssetType$outboundSchema: z.ZodNativeEnum<
49
- typeof CommercialAssetType
50
- > = CommercialAssetType$inboundSchema;
51
-
52
- /**
53
- * @internal
54
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
55
- */
56
- export namespace CommercialAssetType$ {
57
- /** @deprecated use `CommercialAssetType$inboundSchema` instead. */
58
- export const inboundSchema = CommercialAssetType$inboundSchema;
59
- /** @deprecated use `CommercialAssetType$outboundSchema` instead. */
60
- export const outboundSchema = CommercialAssetType$outboundSchema;
61
- }
@@ -1,43 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
-
7
- export enum ConsumerAssetType {
8
- MotorVehicle = "MOTOR_VEHICLE",
9
- ElectricMotorVehicle = "ELECTRIC_MOTOR_VEHICLE",
10
- LuxuryVehicle = "LUXURY_VEHICLE",
11
- Motorbike = "MOTORBIKE",
12
- AtvOffRoadBike = "ATV_OFF_ROAD_BIKE",
13
- Tractor = "TRACTOR",
14
- RideOnMower = "RIDE_ON_MOWER",
15
- HorseFloat = "HORSE_FLOAT",
16
- Trailer = "TRAILER",
17
- Caravan = "CARAVAN",
18
- MotorHome = "MOTOR_HOME",
19
- TraileredBoat = "TRAILERED_BOAT",
20
- JetskiPwc = "JETSKI_PWC",
21
- GolfCart = "GOLF_CART",
22
- }
23
-
24
- /** @internal */
25
- export const ConsumerAssetType$inboundSchema: z.ZodNativeEnum<
26
- typeof ConsumerAssetType
27
- > = z.nativeEnum(ConsumerAssetType);
28
-
29
- /** @internal */
30
- export const ConsumerAssetType$outboundSchema: z.ZodNativeEnum<
31
- typeof ConsumerAssetType
32
- > = ConsumerAssetType$inboundSchema;
33
-
34
- /**
35
- * @internal
36
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
37
- */
38
- export namespace ConsumerAssetType$ {
39
- /** @deprecated use `ConsumerAssetType$inboundSchema` instead. */
40
- export const inboundSchema = ConsumerAssetType$inboundSchema;
41
- /** @deprecated use `ConsumerAssetType$outboundSchema` instead. */
42
- export const outboundSchema = ConsumerAssetType$outboundSchema;
43
- }
@@ -1,72 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import { Result as SafeParseResult } from "../../types/fp.js";
8
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
-
10
- /**
11
- * Standard link object
12
- */
13
- export type Links = {
14
- /**
15
- * Link to self
16
- */
17
- self?: string | undefined;
18
- /**
19
- * Link to related resource
20
- */
21
- related?: string | undefined;
22
- };
23
-
24
- /** @internal */
25
- export const Links$inboundSchema: z.ZodType<Links, z.ZodTypeDef, unknown> = z
26
- .object({
27
- self: z.string().optional(),
28
- related: z.string().optional(),
29
- });
30
-
31
- /** @internal */
32
- export type Links$Outbound = {
33
- self?: string | undefined;
34
- related?: string | undefined;
35
- };
36
-
37
- /** @internal */
38
- export const Links$outboundSchema: z.ZodType<
39
- Links$Outbound,
40
- z.ZodTypeDef,
41
- Links
42
- > = z.object({
43
- self: z.string().optional(),
44
- related: z.string().optional(),
45
- });
46
-
47
- /**
48
- * @internal
49
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
50
- */
51
- export namespace Links$ {
52
- /** @deprecated use `Links$inboundSchema` instead. */
53
- export const inboundSchema = Links$inboundSchema;
54
- /** @deprecated use `Links$outboundSchema` instead. */
55
- export const outboundSchema = Links$outboundSchema;
56
- /** @deprecated use `Links$Outbound` instead. */
57
- export type Outbound = Links$Outbound;
58
- }
59
-
60
- export function linksToJSON(links: Links): string {
61
- return JSON.stringify(Links$outboundSchema.parse(links));
62
- }
63
-
64
- export function linksFromJSON(
65
- jsonString: string,
66
- ): SafeParseResult<Links, SDKValidationError> {
67
- return safeParse(
68
- jsonString,
69
- (x) => Links$inboundSchema.parse(JSON.parse(x)),
70
- `Failed to parse 'Links' from JSON`,
71
- );
72
- }
@@ -1,76 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import * as components from "../components/index.js";
7
-
8
- /**
9
- * Access is forbidden.
10
- */
11
- export type ResponseBodyData = {
12
- errors: Array<components.ForbiddenError>;
13
- };
14
-
15
- /**
16
- * Access is forbidden.
17
- */
18
- export class ResponseBody extends Error {
19
- errors: Array<components.ForbiddenError>;
20
-
21
- /** The original data that was passed to this error instance. */
22
- data$: ResponseBodyData;
23
-
24
- constructor(err: ResponseBodyData) {
25
- const message = "message" in err && typeof err.message === "string"
26
- ? err.message
27
- : `API error occurred: ${JSON.stringify(err)}`;
28
- super(message);
29
- this.data$ = err;
30
-
31
- this.errors = err.errors;
32
-
33
- this.name = "ResponseBody";
34
- }
35
- }
36
-
37
- /** @internal */
38
- export const ResponseBody$inboundSchema: z.ZodType<
39
- ResponseBody,
40
- z.ZodTypeDef,
41
- unknown
42
- > = z.object({
43
- errors: z.array(components.ForbiddenError$inboundSchema),
44
- })
45
- .transform((v) => {
46
- return new ResponseBody(v);
47
- });
48
-
49
- /** @internal */
50
- export type ResponseBody$Outbound = {
51
- errors: Array<components.ForbiddenError$Outbound>;
52
- };
53
-
54
- /** @internal */
55
- export const ResponseBody$outboundSchema: z.ZodType<
56
- ResponseBody$Outbound,
57
- z.ZodTypeDef,
58
- ResponseBody
59
- > = z.instanceof(ResponseBody)
60
- .transform(v => v.data$)
61
- .pipe(z.object({
62
- errors: z.array(components.ForbiddenError$outboundSchema),
63
- }));
64
-
65
- /**
66
- * @internal
67
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
68
- */
69
- export namespace ResponseBody$ {
70
- /** @deprecated use `ResponseBody$inboundSchema` instead. */
71
- export const inboundSchema = ResponseBody$inboundSchema;
72
- /** @deprecated use `ResponseBody$outboundSchema` instead. */
73
- export const outboundSchema = ResponseBody$outboundSchema;
74
- /** @deprecated use `ResponseBody$Outbound` instead. */
75
- export type Outbound = ResponseBody$Outbound;
76
- }