@financeable/aggregation 0.2.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.
- package/.devcontainer/README.md +35 -0
- package/.devcontainer/devcontainer.json +45 -0
- package/FUNCTIONS.md +225 -0
- package/README.md +967 -0
- package/RUNTIMES.md +48 -0
- package/core.d.ts +10 -0
- package/core.d.ts.map +1 -0
- package/core.js +17 -0
- package/core.js.map +1 -0
- package/docs/sdks/applications/README.md +467 -0
- package/docs/sdks/financeable/README.md +5 -0
- package/financeable-typescript/.devcontainer/README.md +30 -0
- package/financeable-typescript/FUNCTIONS.md +205 -0
- package/financeable-typescript/README.md +895 -0
- package/financeable-typescript/RUNTIMES.md +22 -0
- package/financeable-typescript/docs/sdks/applications/README.md +427 -0
- package/financeable-typescript/docs/sdks/financeable/README.md +5 -0
- package/financeable-typescript/src/core.ts +13 -0
- package/financeable-typescript/src/funcs/applicationsCreate.ts +124 -0
- package/financeable-typescript/src/funcs/applicationsGet.ts +128 -0
- package/financeable-typescript/src/funcs/applicationsList.ts +126 -0
- package/financeable-typescript/src/hooks/hooks.ts +129 -0
- package/financeable-typescript/src/hooks/index.ts +6 -0
- package/financeable-typescript/src/hooks/types.ts +109 -0
- package/financeable-typescript/src/index.ts +7 -0
- package/financeable-typescript/src/lib/base64.ts +37 -0
- package/financeable-typescript/src/lib/config.ts +59 -0
- package/financeable-typescript/src/lib/dlv.ts +53 -0
- package/financeable-typescript/src/lib/encodings.ts +449 -0
- package/financeable-typescript/src/lib/env.ts +37 -0
- package/financeable-typescript/src/lib/files.ts +40 -0
- package/financeable-typescript/src/lib/http.ts +323 -0
- package/financeable-typescript/src/lib/is-plain-object.ts +43 -0
- package/financeable-typescript/src/lib/logger.ts +9 -0
- package/financeable-typescript/src/lib/matchers.ts +322 -0
- package/financeable-typescript/src/lib/primitives.ts +122 -0
- package/financeable-typescript/src/lib/retries.ts +219 -0
- package/financeable-typescript/src/lib/schemas.ts +86 -0
- package/financeable-typescript/src/lib/sdks.ts +392 -0
- package/financeable-typescript/src/lib/security.ts +227 -0
- package/financeable-typescript/src/lib/url.ts +33 -0
- package/financeable-typescript/src/models/components/addressattributes.ts +148 -0
- package/financeable-typescript/src/models/components/apierrorlinks.ts +65 -0
- package/financeable-typescript/src/models/components/applicationattributes.ts +128 -0
- package/financeable-typescript/src/models/components/applicationattributescreate.ts +90 -0
- package/financeable-typescript/src/models/components/applicationresourcebulksubmission.ts +1000 -0
- package/financeable-typescript/src/models/components/applicationstatus.ts +39 -0
- package/financeable-typescript/src/models/components/applicationtype.ts +33 -0
- package/financeable-typescript/src/models/components/assetattributes.ts +400 -0
- package/financeable-typescript/src/models/components/customerattributes.ts +171 -0
- package/financeable-typescript/src/models/components/customertitle.ts +35 -0
- package/financeable-typescript/src/models/components/errorsource.ts +79 -0
- package/financeable-typescript/src/models/components/forbiddenerror.ts +207 -0
- package/financeable-typescript/src/models/components/frequencytype.ts +40 -0
- package/financeable-typescript/src/models/components/index.ts +20 -0
- package/financeable-typescript/src/models/components/links.ts +72 -0
- package/financeable-typescript/src/models/components/loandetailsattributes.ts +187 -0
- package/financeable-typescript/src/models/components/repaymentstructure.ts +40 -0
- package/financeable-typescript/src/models/errors/apierror.ts +27 -0
- package/financeable-typescript/src/models/errors/createapplication.ts +76 -0
- package/financeable-typescript/src/models/errors/getapplication.ts +76 -0
- package/financeable-typescript/src/models/errors/getapplications.ts +76 -0
- package/financeable-typescript/src/models/errors/httpclienterrors.ts +62 -0
- package/financeable-typescript/src/models/errors/index.ts +10 -0
- package/financeable-typescript/src/models/errors/sdkvalidationerror.ts +97 -0
- package/financeable-typescript/src/models/operations/createapplication.ts +1649 -0
- package/financeable-typescript/src/models/operations/getapplication.ts +1829 -0
- package/financeable-typescript/src/models/operations/getapplications.ts +1790 -0
- package/financeable-typescript/src/models/operations/index.ts +7 -0
- package/financeable-typescript/src/sdk/applications.ts +55 -0
- package/financeable-typescript/src/sdk/index.ts +5 -0
- package/financeable-typescript/src/sdk/sdk.ts +13 -0
- package/financeable-typescript/src/types/blobs.ts +31 -0
- package/financeable-typescript/src/types/constdatetime.ts +15 -0
- package/financeable-typescript/src/types/enums.ts +16 -0
- package/financeable-typescript/src/types/fp.ts +50 -0
- package/financeable-typescript/src/types/index.ts +11 -0
- package/financeable-typescript/src/types/operations.ts +105 -0
- package/financeable-typescript/src/types/rfcdate.ts +54 -0
- package/financeable-typescript/src/types/streams.ts +21 -0
- package/funcs/applicationsCreate.d.ts +14 -0
- package/funcs/applicationsCreate.d.ts.map +1 -0
- package/funcs/applicationsCreate.js +105 -0
- package/funcs/applicationsCreate.js.map +1 -0
- package/funcs/applicationsGet.d.ts +13 -0
- package/funcs/applicationsGet.d.ts.map +1 -0
- package/funcs/applicationsGet.js +109 -0
- package/funcs/applicationsGet.js.map +1 -0
- package/funcs/applicationsList.d.ts +13 -0
- package/funcs/applicationsList.d.ts.map +1 -0
- package/funcs/applicationsList.js +107 -0
- package/funcs/applicationsList.js.map +1 -0
- package/hooks/hooks.d.ts +24 -0
- package/hooks/hooks.d.ts.map +1 -0
- package/hooks/hooks.js +84 -0
- package/hooks/hooks.js.map +1 -0
- package/hooks/index.d.ts +3 -0
- package/hooks/index.d.ts.map +1 -0
- package/hooks/index.js +22 -0
- package/hooks/index.js.map +1 -0
- package/hooks/types.d.ts +78 -0
- package/hooks/types.d.ts.map +1 -0
- package/hooks/types.js +6 -0
- package/hooks/types.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -0
- package/index.js +46 -0
- package/index.js.map +1 -0
- package/jsr.json +27 -0
- package/lib/base64.d.ts +10 -0
- package/lib/base64.d.ts.map +1 -0
- package/lib/base64.js +71 -0
- package/lib/base64.js.map +1 -0
- package/lib/config.d.ts +33 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +35 -0
- package/lib/config.js.map +1 -0
- package/lib/dlv.d.ts +14 -0
- package/lib/dlv.d.ts.map +1 -0
- package/lib/dlv.js +49 -0
- package/lib/dlv.js.map +1 -0
- package/lib/encodings.d.ts +52 -0
- package/lib/encodings.d.ts.map +1 -0
- package/lib/encodings.js +368 -0
- package/lib/encodings.js.map +1 -0
- package/lib/env.d.ts +14 -0
- package/lib/env.d.ts.map +1 -0
- package/lib/env.js +64 -0
- package/lib/env.js.map +1 -0
- package/lib/files.d.ts +8 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +36 -0
- package/lib/files.js.map +1 -0
- package/lib/http.d.ts +67 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +217 -0
- package/lib/http.js.map +1 -0
- package/lib/is-plain-object.d.ts +2 -0
- package/lib/is-plain-object.d.ts.map +1 -0
- package/lib/is-plain-object.js +41 -0
- package/lib/is-plain-object.js.map +1 -0
- package/lib/logger.d.ts +6 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +6 -0
- package/lib/logger.js.map +1 -0
- package/lib/matchers.d.ts +64 -0
- package/lib/matchers.d.ts.map +1 -0
- package/lib/matchers.js +204 -0
- package/lib/matchers.js.map +1 -0
- package/lib/primitives.d.ts +23 -0
- package/lib/primitives.d.ts.map +1 -0
- package/lib/primitives.js +104 -0
- package/lib/primitives.js.map +1 -0
- package/lib/retries.d.ts +38 -0
- package/lib/retries.d.ts.map +1 -0
- package/lib/retries.js +153 -0
- package/lib/retries.js.map +1 -0
- package/lib/schemas.d.ts +19 -0
- package/lib/schemas.d.ts.map +1 -0
- package/lib/schemas.js +62 -0
- package/lib/schemas.js.map +1 -0
- package/lib/sdks.d.ts +60 -0
- package/lib/sdks.d.ts.map +1 -0
- package/lib/sdks.js +280 -0
- package/lib/sdks.js.map +1 -0
- package/lib/security.d.ts +79 -0
- package/lib/security.d.ts.map +1 -0
- package/lib/security.js +121 -0
- package/lib/security.js.map +1 -0
- package/lib/url.d.ts +5 -0
- package/lib/url.d.ts.map +1 -0
- package/lib/url.js +25 -0
- package/lib/url.js.map +1 -0
- package/models/components/addressattributes.d.ts +83 -0
- package/models/components/addressattributes.d.ts.map +1 -0
- package/models/components/addressattributes.js +117 -0
- package/models/components/addressattributes.js.map +1 -0
- package/models/components/apierrorlinks.d.ts +32 -0
- package/models/components/apierrorlinks.d.ts.map +1 -0
- package/models/components/apierrorlinks.js +69 -0
- package/models/components/apierrorlinks.js.map +1 -0
- package/models/components/applicationattributes.d.ts +69 -0
- package/models/components/applicationattributes.d.ts.map +1 -0
- package/models/components/applicationattributes.js +85 -0
- package/models/components/applicationattributes.js.map +1 -0
- package/models/components/applicationattributescreate.d.ts +43 -0
- package/models/components/applicationattributescreate.d.ts.map +1 -0
- package/models/components/applicationattributescreate.js +74 -0
- package/models/components/applicationattributescreate.js.map +1 -0
- package/models/components/applicationresourcebulksubmission.d.ts +456 -0
- package/models/components/applicationresourcebulksubmission.d.ts.map +1 -0
- package/models/components/applicationresourcebulksubmission.js +492 -0
- package/models/components/applicationresourcebulksubmission.js.map +1 -0
- package/models/components/applicationstatus.d.ts +46 -0
- package/models/components/applicationstatus.d.ts.map +1 -0
- package/models/components/applicationstatus.js +66 -0
- package/models/components/applicationstatus.js.map +1 -0
- package/models/components/applicationtype.d.ts +28 -0
- package/models/components/applicationtype.d.ts.map +1 -0
- package/models/components/applicationtype.js +60 -0
- package/models/components/applicationtype.js.map +1 -0
- package/models/components/assetattributes.d.ts +388 -0
- package/models/components/assetattributes.d.ts.map +1 -0
- package/models/components/assetattributes.js +244 -0
- package/models/components/assetattributes.js.map +1 -0
- package/models/components/customerattributes.d.ts +103 -0
- package/models/components/customerattributes.d.ts.map +1 -0
- package/models/components/customerattributes.js +120 -0
- package/models/components/customerattributes.js.map +1 -0
- package/models/components/customertitle.d.ts +34 -0
- package/models/components/customertitle.d.ts.map +1 -0
- package/models/components/customertitle.js +62 -0
- package/models/components/customertitle.js.map +1 -0
- package/models/components/errorsource.d.ts +42 -0
- package/models/components/errorsource.d.ts.map +1 -0
- package/models/components/errorsource.js +73 -0
- package/models/components/errorsource.js.map +1 -0
- package/models/components/forbiddenerror.d.ts +141 -0
- package/models/components/forbiddenerror.d.ts.map +1 -0
- package/models/components/forbiddenerror.js +158 -0
- package/models/components/forbiddenerror.js.map +1 -0
- package/models/components/frequencytype.d.ts +37 -0
- package/models/components/frequencytype.d.ts.map +1 -0
- package/models/components/frequencytype.js +64 -0
- package/models/components/frequencytype.js.map +1 -0
- package/models/components/index.d.ts +17 -0
- package/models/components/index.d.ts.map +1 -0
- package/models/components/index.js +36 -0
- package/models/components/index.js.map +1 -0
- package/models/components/links.d.ts +40 -0
- package/models/components/links.d.ts.map +1 -0
- package/models/components/links.js +72 -0
- package/models/components/links.js.map +1 -0
- package/models/components/loandetailsattributes.d.ts +112 -0
- package/models/components/loandetailsattributes.d.ts.map +1 -0
- package/models/components/loandetailsattributes.js +101 -0
- package/models/components/loandetailsattributes.js.map +1 -0
- package/models/components/repaymentstructure.d.ts +37 -0
- package/models/components/repaymentstructure.d.ts.map +1 -0
- package/models/components/repaymentstructure.js +64 -0
- package/models/components/repaymentstructure.js.map +1 -0
- package/models/errors/apierror.d.ts +8 -0
- package/models/errors/apierror.d.ts.map +1 -0
- package/models/errors/apierror.js +21 -0
- package/models/errors/apierror.js.map +1 -0
- package/models/errors/createapplication.d.ts +38 -0
- package/models/errors/createapplication.d.ts.map +1 -0
- package/models/errors/createapplication.js +81 -0
- package/models/errors/createapplication.js.map +1 -0
- package/models/errors/getapplication.d.ts +38 -0
- package/models/errors/getapplication.d.ts.map +1 -0
- package/models/errors/getapplication.js +81 -0
- package/models/errors/getapplication.js.map +1 -0
- package/models/errors/getapplications.d.ts +38 -0
- package/models/errors/getapplications.d.ts.map +1 -0
- package/models/errors/getapplications.js +81 -0
- package/models/errors/getapplications.js.map +1 -0
- package/models/errors/httpclienterrors.d.ts +44 -0
- package/models/errors/httpclienterrors.d.ts.map +1 -0
- package/models/errors/httpclienterrors.js +78 -0
- package/models/errors/httpclienterrors.js.map +1 -0
- package/models/errors/index.d.ts +7 -0
- package/models/errors/index.d.ts.map +1 -0
- package/models/errors/index.js +26 -0
- package/models/errors/index.js.map +1 -0
- package/models/errors/sdkvalidationerror.d.ts +20 -0
- package/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/models/errors/sdkvalidationerror.js +115 -0
- package/models/errors/sdkvalidationerror.js.map +1 -0
- package/models/operations/createapplication.d.ts +780 -0
- package/models/operations/createapplication.d.ts.map +1 -0
- package/models/operations/createapplication.js +834 -0
- package/models/operations/createapplication.js.map +1 -0
- package/models/operations/getapplication.d.ts +805 -0
- package/models/operations/getapplication.d.ts.map +1 -0
- package/models/operations/getapplication.js +861 -0
- package/models/operations/getapplication.js.map +1 -0
- package/models/operations/getapplications.d.ts +805 -0
- package/models/operations/getapplications.d.ts.map +1 -0
- package/models/operations/getapplications.js +864 -0
- package/models/operations/getapplications.js.map +1 -0
- package/models/operations/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -0
- package/models/operations/index.js +23 -0
- package/models/operations/index.js.map +1 -0
- package/package.json +30 -0
- package/sdk/applications.d.ts +18 -0
- package/sdk/applications.d.ts.map +1 -0
- package/sdk/applications.js +33 -0
- package/sdk/applications.js.map +1 -0
- package/sdk/index.d.ts +2 -0
- package/sdk/index.d.ts.map +1 -0
- package/sdk/index.js +21 -0
- package/sdk/index.js.map +1 -0
- package/sdk/sdk.d.ts +7 -0
- package/sdk/sdk.d.ts.map +1 -0
- package/sdk/sdk.js +15 -0
- package/sdk/sdk.js.map +1 -0
- package/src/core.ts +13 -0
- package/src/funcs/applicationsCreate.ts +128 -0
- package/src/funcs/applicationsGet.ts +132 -0
- package/src/funcs/applicationsList.ts +130 -0
- package/src/hooks/hooks.ts +129 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/types.ts +110 -0
- package/src/index.ts +7 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +59 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +483 -0
- package/src/lib/env.ts +37 -0
- package/src/lib/files.ts +40 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +322 -0
- package/src/lib/primitives.ts +136 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +91 -0
- package/src/lib/sdks.ts +400 -0
- package/src/lib/security.ts +227 -0
- package/src/lib/url.ts +33 -0
- package/src/models/components/addressattributes.ts +148 -0
- package/src/models/components/apierrorlinks.ts +65 -0
- package/src/models/components/applicationattributes.ts +128 -0
- package/src/models/components/applicationattributescreate.ts +90 -0
- package/src/models/components/applicationresourcebulksubmission.ts +1000 -0
- package/src/models/components/applicationstatus.ts +39 -0
- package/src/models/components/applicationtype.ts +33 -0
- package/src/models/components/assetattributes.ts +400 -0
- package/src/models/components/customerattributes.ts +171 -0
- package/src/models/components/customertitle.ts +35 -0
- package/src/models/components/errorsource.ts +79 -0
- package/src/models/components/forbiddenerror.ts +207 -0
- package/src/models/components/frequencytype.ts +40 -0
- package/src/models/components/index.ts +20 -0
- package/src/models/components/links.ts +72 -0
- package/src/models/components/loandetailsattributes.ts +187 -0
- package/src/models/components/repaymentstructure.ts +40 -0
- package/src/models/errors/apierror.ts +27 -0
- package/src/models/errors/createapplication.ts +76 -0
- package/src/models/errors/getapplication.ts +76 -0
- package/src/models/errors/getapplications.ts +76 -0
- package/src/models/errors/httpclienterrors.ts +62 -0
- package/src/models/errors/index.ts +10 -0
- package/src/models/errors/sdkvalidationerror.ts +97 -0
- package/src/models/operations/createapplication.ts +1649 -0
- package/src/models/operations/getapplication.ts +1829 -0
- package/src/models/operations/getapplications.ts +1790 -0
- package/src/models/operations/index.ts +7 -0
- package/src/sdk/applications.ts +55 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/sdk.ts +13 -0
- package/src/types/blobs.ts +31 -0
- package/src/types/constdatetime.ts +15 -0
- package/src/types/enums.ts +16 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +11 -0
- package/src/types/operations.ts +105 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/streams.ts +21 -0
- package/tsconfig.json +41 -0
- package/types/blobs.d.ts +4 -0
- package/types/blobs.d.ts.map +1 -0
- package/types/blobs.js +62 -0
- package/types/blobs.js.map +1 -0
- package/types/constdatetime.d.ts +3 -0
- package/types/constdatetime.d.ts.map +1 -0
- package/types/constdatetime.js +46 -0
- package/types/constdatetime.js.map +1 -0
- package/types/enums.d.ts +12 -0
- package/types/enums.d.ts.map +1 -0
- package/types/enums.js +10 -0
- package/types/enums.js.map +1 -0
- package/types/fp.d.ts +31 -0
- package/types/fp.d.ts.map +1 -0
- package/types/fp.js +37 -0
- package/types/fp.js.map +1 -0
- package/types/index.d.ts +8 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +16 -0
- package/types/index.js.map +1 -0
- package/types/operations.d.ts +27 -0
- package/types/operations.d.ts.map +1 -0
- package/types/operations.js +83 -0
- package/types/operations.js.map +1 -0
- package/types/rfcdate.d.ts +21 -0
- package/types/rfcdate.d.ts.map +1 -0
- package/types/rfcdate.js +46 -0
- package/types/rfcdate.js.map +1 -0
- package/types/streams.d.ts +2 -0
- package/types/streams.d.ts.map +1 -0
- package/types/streams.js +18 -0
- package/types/streams.js.map +1 -0
|
@@ -0,0 +1,39 @@
|
|
|
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 ApplicationStatus = {
|
|
9
|
+
Workshop: "workshop",
|
|
10
|
+
Calculator: "calculator",
|
|
11
|
+
Quote: "quote",
|
|
12
|
+
Declined: "declined",
|
|
13
|
+
Approved: "approved",
|
|
14
|
+
Settled: "settled",
|
|
15
|
+
Deleted: "deleted",
|
|
16
|
+
Archive: "archive",
|
|
17
|
+
} as const;
|
|
18
|
+
export type ApplicationStatus = ClosedEnum<typeof ApplicationStatus>;
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ApplicationStatus$inboundSchema: z.ZodNativeEnum<
|
|
22
|
+
typeof ApplicationStatus
|
|
23
|
+
> = z.nativeEnum(ApplicationStatus);
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ApplicationStatus$outboundSchema: z.ZodNativeEnum<
|
|
27
|
+
typeof ApplicationStatus
|
|
28
|
+
> = ApplicationStatus$inboundSchema;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
33
|
+
*/
|
|
34
|
+
export namespace ApplicationStatus$ {
|
|
35
|
+
/** @deprecated use `ApplicationStatus$inboundSchema` instead. */
|
|
36
|
+
export const inboundSchema = ApplicationStatus$inboundSchema;
|
|
37
|
+
/** @deprecated use `ApplicationStatus$outboundSchema` instead. */
|
|
38
|
+
export const outboundSchema = ApplicationStatus$outboundSchema;
|
|
39
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,400 @@
|
|
|
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
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Condition of asset
|
|
13
|
+
*/
|
|
14
|
+
export const Condition = {
|
|
15
|
+
New: "NEW",
|
|
16
|
+
Demo: "DEMO",
|
|
17
|
+
Used: "USED",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* Condition of asset
|
|
21
|
+
*/
|
|
22
|
+
export type Condition = ClosedEnum<typeof Condition>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Type of asset
|
|
26
|
+
*/
|
|
27
|
+
export const AssetType = {
|
|
28
|
+
MOTORVEHICLELessThan45TONNES: "MOTOR_VEHICLE_(<4.5_TONNES)",
|
|
29
|
+
ELECTRICMOTORVEHICLELessThan45TONNES: "ELECTRIC_MOTOR_VEHICLE_(<4.5_TONNES)",
|
|
30
|
+
COMMERCIALSMALLTOMEDIUMVEHICLESLessThan12TONNES:
|
|
31
|
+
"COMMERCIAL_(SMALL_TO_MEDIUM)_VEHICLES_(<12_TONNES)",
|
|
32
|
+
COMMERCIALHEAVYVEHICLESGreaterThan12TONNES:
|
|
33
|
+
"COMMERCIAL_(HEAVY)_VEHICLES_(>12_TONNES)",
|
|
34
|
+
WarehouseEquipmentWheeledOrTracked:
|
|
35
|
+
"WAREHOUSE_EQUIPMENT_(WHEELED_OR_TRACKED)",
|
|
36
|
+
EARTHMOVINGAndCONSTRUCTIONWHEELEDORTRACKED:
|
|
37
|
+
"EARTH_MOVING_&_CONSTRUCTION_(WHEELED_OR_TRACKED)",
|
|
38
|
+
AGRICULTURALAndLANDSCAPINGEQUIPMENTWHEELEDORTRACKED:
|
|
39
|
+
"AGRICULTURAL_&_LANDSCAPING_EQUIPMENT_(WHEELED_OR_TRACKED)",
|
|
40
|
+
MINIBUSESAndROUTEBUSESLessThan25SEATS: "MINI_BUSES_&_ROUTE_BUSES_(<25_SEATS)",
|
|
41
|
+
TrailersAndCaravans: "TRAILERS_AND_CARAVANS",
|
|
42
|
+
INDUSTRIALPLANTAndPRINTING: "INDUSTRIAL_PLANT_&_PRINTING",
|
|
43
|
+
ManufacturingEquipment: "MANUFACTURING_EQUIPMENT",
|
|
44
|
+
MedicalEquipment: "MEDICAL_EQUIPMENT",
|
|
45
|
+
ITCOMPUTERAndAUDIOEQUIPMENT: "IT_COMPUTER_&_AUDIO_EQUIPMENT",
|
|
46
|
+
HEALTHAndBEAUTYEQUIPMENT: "HEALTH_&_BEAUTY_EQUIPMENT",
|
|
47
|
+
OfficeEquipment: "OFFICE_EQUIPMENT",
|
|
48
|
+
OfficeFitout: "OFFICE_FITOUT",
|
|
49
|
+
RESTAURANTAndCATERINGEQUIPMENT: "RESTAURANT_&_CATERING_EQUIPMENT",
|
|
50
|
+
OfficeFurniture: "OFFICE_FURNITURE",
|
|
51
|
+
Solar: "SOLAR",
|
|
52
|
+
MotorbikesAtvs: "MOTORBIKES_ATVS",
|
|
53
|
+
ClassicCar: "CLASSIC_CAR",
|
|
54
|
+
TraileredBoats: "TRAILERED_BOATS",
|
|
55
|
+
Jetskis: "JETSKIS",
|
|
56
|
+
RideOnMowers: "RIDE_ON_MOWERS",
|
|
57
|
+
GolfCarts: "GOLF_CARTS",
|
|
58
|
+
Other: "OTHER",
|
|
59
|
+
} as const;
|
|
60
|
+
/**
|
|
61
|
+
* Type of asset
|
|
62
|
+
*/
|
|
63
|
+
export type AssetType = ClosedEnum<typeof AssetType>;
|
|
64
|
+
|
|
65
|
+
export const Purpose = {
|
|
66
|
+
Vehicle: "VEHICLE",
|
|
67
|
+
DebtConsolidation: "DEBT_CONSOLIDATION",
|
|
68
|
+
HomeImprovements: "HOME_IMPROVEMENTS",
|
|
69
|
+
MEDICALAndDENTAL: "MEDICAL_&_DENTAL",
|
|
70
|
+
HouseholdFurnishings: "HOUSEHOLD_FURNISHINGS",
|
|
71
|
+
Education: "EDUCATION",
|
|
72
|
+
Travel: "TRAVEL",
|
|
73
|
+
Wedding: "WEDDING",
|
|
74
|
+
MortgageCostFunding: "MORTGAGE_COST_FUNDING",
|
|
75
|
+
OtherPersonalUse: "OTHER_PERSONAL_USE",
|
|
76
|
+
} as const;
|
|
77
|
+
export type Purpose = ClosedEnum<typeof Purpose>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Registration state (or territory) of asset
|
|
81
|
+
*/
|
|
82
|
+
export const RegistrationState = {
|
|
83
|
+
Vic: "VIC",
|
|
84
|
+
Nsw: "NSW",
|
|
85
|
+
Qld: "QLD",
|
|
86
|
+
Sa: "SA",
|
|
87
|
+
Wa: "WA",
|
|
88
|
+
Tas: "TAS",
|
|
89
|
+
Nt: "NT",
|
|
90
|
+
Act: "ACT",
|
|
91
|
+
} as const;
|
|
92
|
+
/**
|
|
93
|
+
* Registration state (or territory) of asset
|
|
94
|
+
*/
|
|
95
|
+
export type RegistrationState = ClosedEnum<typeof RegistrationState>;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The asset to be obtained by the customer, using the proposed loan financing.
|
|
99
|
+
*/
|
|
100
|
+
export type AssetAttributes = {
|
|
101
|
+
/**
|
|
102
|
+
* Current age of asset as number (integer) of years
|
|
103
|
+
*/
|
|
104
|
+
ageOfAsset: number;
|
|
105
|
+
/**
|
|
106
|
+
* Age of asset at the end of the loan term, in years
|
|
107
|
+
*/
|
|
108
|
+
ageOfAssetAtEnd: number;
|
|
109
|
+
/**
|
|
110
|
+
* Condition of asset
|
|
111
|
+
*/
|
|
112
|
+
condition: Condition;
|
|
113
|
+
/**
|
|
114
|
+
* Type of asset
|
|
115
|
+
*/
|
|
116
|
+
assetType: AssetType;
|
|
117
|
+
purpose: Purpose;
|
|
118
|
+
/**
|
|
119
|
+
* Value of asset
|
|
120
|
+
*/
|
|
121
|
+
assetValue: string;
|
|
122
|
+
/**
|
|
123
|
+
* Make of asset
|
|
124
|
+
*/
|
|
125
|
+
make: string;
|
|
126
|
+
/**
|
|
127
|
+
* Model of asset
|
|
128
|
+
*/
|
|
129
|
+
assetModel: string;
|
|
130
|
+
/**
|
|
131
|
+
* Registration number of asset
|
|
132
|
+
*/
|
|
133
|
+
registrationNumber: string;
|
|
134
|
+
/**
|
|
135
|
+
* Registration state (or territory) of asset
|
|
136
|
+
*/
|
|
137
|
+
registrationState?: RegistrationState | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* VIN of asset
|
|
140
|
+
*/
|
|
141
|
+
vin?: string | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* Name of asset supplier
|
|
144
|
+
*/
|
|
145
|
+
supplierName?: string | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* ABN of asset supplier
|
|
148
|
+
*/
|
|
149
|
+
supplierABN?: string | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Address of asset supplier
|
|
152
|
+
*/
|
|
153
|
+
supplierAddress?: string | undefined;
|
|
154
|
+
/**
|
|
155
|
+
* Phone number of asset supplier
|
|
156
|
+
*/
|
|
157
|
+
supplierPhone?: string | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* Contact name of the asset supplier
|
|
160
|
+
*/
|
|
161
|
+
supplierContactName?: string | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* Email address of the asset supplier
|
|
164
|
+
*/
|
|
165
|
+
supplierEmail?: string | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* Is this asset obtained via private sale?
|
|
168
|
+
*/
|
|
169
|
+
privateSale: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Type of sale
|
|
172
|
+
*/
|
|
173
|
+
typeOfSale: string;
|
|
174
|
+
/**
|
|
175
|
+
* Description of asset
|
|
176
|
+
*/
|
|
177
|
+
description: string;
|
|
178
|
+
/**
|
|
179
|
+
* Net asset value of asset, floating point value as string
|
|
180
|
+
*/
|
|
181
|
+
netAssetValue: string;
|
|
182
|
+
/**
|
|
183
|
+
* Is this asset a luxury asset?
|
|
184
|
+
*/
|
|
185
|
+
isLuxury: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Luxury GST, floating point value as string
|
|
188
|
+
*/
|
|
189
|
+
luxuryGst?: string | undefined;
|
|
190
|
+
/**
|
|
191
|
+
* Additional fees concerning the asset, floating point value as string
|
|
192
|
+
*/
|
|
193
|
+
additionalFees?: string | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* Additional taxes concerning the asset, floating point value as string
|
|
196
|
+
*/
|
|
197
|
+
additionalTaxes?: string | undefined;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
/** @internal */
|
|
201
|
+
export const Condition$inboundSchema: z.ZodNativeEnum<typeof Condition> = z
|
|
202
|
+
.nativeEnum(Condition);
|
|
203
|
+
|
|
204
|
+
/** @internal */
|
|
205
|
+
export const Condition$outboundSchema: z.ZodNativeEnum<typeof Condition> =
|
|
206
|
+
Condition$inboundSchema;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @internal
|
|
210
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
211
|
+
*/
|
|
212
|
+
export namespace Condition$ {
|
|
213
|
+
/** @deprecated use `Condition$inboundSchema` instead. */
|
|
214
|
+
export const inboundSchema = Condition$inboundSchema;
|
|
215
|
+
/** @deprecated use `Condition$outboundSchema` instead. */
|
|
216
|
+
export const outboundSchema = Condition$outboundSchema;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** @internal */
|
|
220
|
+
export const AssetType$inboundSchema: z.ZodNativeEnum<typeof AssetType> = z
|
|
221
|
+
.nativeEnum(AssetType);
|
|
222
|
+
|
|
223
|
+
/** @internal */
|
|
224
|
+
export const AssetType$outboundSchema: z.ZodNativeEnum<typeof AssetType> =
|
|
225
|
+
AssetType$inboundSchema;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* @internal
|
|
229
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
230
|
+
*/
|
|
231
|
+
export namespace AssetType$ {
|
|
232
|
+
/** @deprecated use `AssetType$inboundSchema` instead. */
|
|
233
|
+
export const inboundSchema = AssetType$inboundSchema;
|
|
234
|
+
/** @deprecated use `AssetType$outboundSchema` instead. */
|
|
235
|
+
export const outboundSchema = AssetType$outboundSchema;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/** @internal */
|
|
239
|
+
export const Purpose$inboundSchema: z.ZodNativeEnum<typeof Purpose> = z
|
|
240
|
+
.nativeEnum(Purpose);
|
|
241
|
+
|
|
242
|
+
/** @internal */
|
|
243
|
+
export const Purpose$outboundSchema: z.ZodNativeEnum<typeof Purpose> =
|
|
244
|
+
Purpose$inboundSchema;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @internal
|
|
248
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
249
|
+
*/
|
|
250
|
+
export namespace Purpose$ {
|
|
251
|
+
/** @deprecated use `Purpose$inboundSchema` instead. */
|
|
252
|
+
export const inboundSchema = Purpose$inboundSchema;
|
|
253
|
+
/** @deprecated use `Purpose$outboundSchema` instead. */
|
|
254
|
+
export const outboundSchema = Purpose$outboundSchema;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/** @internal */
|
|
258
|
+
export const RegistrationState$inboundSchema: z.ZodNativeEnum<
|
|
259
|
+
typeof RegistrationState
|
|
260
|
+
> = z.nativeEnum(RegistrationState);
|
|
261
|
+
|
|
262
|
+
/** @internal */
|
|
263
|
+
export const RegistrationState$outboundSchema: z.ZodNativeEnum<
|
|
264
|
+
typeof RegistrationState
|
|
265
|
+
> = RegistrationState$inboundSchema;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @internal
|
|
269
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
270
|
+
*/
|
|
271
|
+
export namespace RegistrationState$ {
|
|
272
|
+
/** @deprecated use `RegistrationState$inboundSchema` instead. */
|
|
273
|
+
export const inboundSchema = RegistrationState$inboundSchema;
|
|
274
|
+
/** @deprecated use `RegistrationState$outboundSchema` instead. */
|
|
275
|
+
export const outboundSchema = RegistrationState$outboundSchema;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/** @internal */
|
|
279
|
+
export const AssetAttributes$inboundSchema: z.ZodType<
|
|
280
|
+
AssetAttributes,
|
|
281
|
+
z.ZodTypeDef,
|
|
282
|
+
unknown
|
|
283
|
+
> = z.object({
|
|
284
|
+
ageOfAsset: z.number().int(),
|
|
285
|
+
ageOfAssetAtEnd: z.number().int(),
|
|
286
|
+
condition: Condition$inboundSchema,
|
|
287
|
+
assetType: AssetType$inboundSchema,
|
|
288
|
+
purpose: Purpose$inboundSchema,
|
|
289
|
+
assetValue: z.string(),
|
|
290
|
+
make: z.string(),
|
|
291
|
+
assetModel: z.string(),
|
|
292
|
+
registrationNumber: z.string(),
|
|
293
|
+
registrationState: RegistrationState$inboundSchema.optional(),
|
|
294
|
+
vin: z.string().optional(),
|
|
295
|
+
supplierName: z.string().optional(),
|
|
296
|
+
supplierABN: z.string().optional(),
|
|
297
|
+
supplierAddress: z.string().optional(),
|
|
298
|
+
supplierPhone: z.string().optional(),
|
|
299
|
+
supplierContactName: z.string().optional(),
|
|
300
|
+
supplierEmail: z.string().optional(),
|
|
301
|
+
privateSale: z.boolean(),
|
|
302
|
+
typeOfSale: z.string(),
|
|
303
|
+
description: z.string(),
|
|
304
|
+
netAssetValue: z.string(),
|
|
305
|
+
isLuxury: z.boolean(),
|
|
306
|
+
luxuryGst: z.string().optional(),
|
|
307
|
+
additionalFees: z.string().optional(),
|
|
308
|
+
additionalTaxes: z.string().optional(),
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
/** @internal */
|
|
312
|
+
export type AssetAttributes$Outbound = {
|
|
313
|
+
ageOfAsset: number;
|
|
314
|
+
ageOfAssetAtEnd: number;
|
|
315
|
+
condition: string;
|
|
316
|
+
assetType: string;
|
|
317
|
+
purpose: string;
|
|
318
|
+
assetValue: string;
|
|
319
|
+
make: string;
|
|
320
|
+
assetModel: string;
|
|
321
|
+
registrationNumber: string;
|
|
322
|
+
registrationState?: string | undefined;
|
|
323
|
+
vin?: string | undefined;
|
|
324
|
+
supplierName?: string | undefined;
|
|
325
|
+
supplierABN?: string | undefined;
|
|
326
|
+
supplierAddress?: string | undefined;
|
|
327
|
+
supplierPhone?: string | undefined;
|
|
328
|
+
supplierContactName?: string | undefined;
|
|
329
|
+
supplierEmail?: string | undefined;
|
|
330
|
+
privateSale: boolean;
|
|
331
|
+
typeOfSale: string;
|
|
332
|
+
description: string;
|
|
333
|
+
netAssetValue: string;
|
|
334
|
+
isLuxury: boolean;
|
|
335
|
+
luxuryGst?: string | undefined;
|
|
336
|
+
additionalFees?: string | undefined;
|
|
337
|
+
additionalTaxes?: string | undefined;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
/** @internal */
|
|
341
|
+
export const AssetAttributes$outboundSchema: z.ZodType<
|
|
342
|
+
AssetAttributes$Outbound,
|
|
343
|
+
z.ZodTypeDef,
|
|
344
|
+
AssetAttributes
|
|
345
|
+
> = z.object({
|
|
346
|
+
ageOfAsset: z.number().int(),
|
|
347
|
+
ageOfAssetAtEnd: z.number().int(),
|
|
348
|
+
condition: Condition$outboundSchema,
|
|
349
|
+
assetType: AssetType$outboundSchema,
|
|
350
|
+
purpose: Purpose$outboundSchema,
|
|
351
|
+
assetValue: z.string(),
|
|
352
|
+
make: z.string(),
|
|
353
|
+
assetModel: z.string(),
|
|
354
|
+
registrationNumber: z.string(),
|
|
355
|
+
registrationState: RegistrationState$outboundSchema.optional(),
|
|
356
|
+
vin: z.string().optional(),
|
|
357
|
+
supplierName: z.string().optional(),
|
|
358
|
+
supplierABN: z.string().optional(),
|
|
359
|
+
supplierAddress: z.string().optional(),
|
|
360
|
+
supplierPhone: z.string().optional(),
|
|
361
|
+
supplierContactName: z.string().optional(),
|
|
362
|
+
supplierEmail: z.string().optional(),
|
|
363
|
+
privateSale: z.boolean(),
|
|
364
|
+
typeOfSale: z.string(),
|
|
365
|
+
description: z.string(),
|
|
366
|
+
netAssetValue: z.string(),
|
|
367
|
+
isLuxury: z.boolean(),
|
|
368
|
+
luxuryGst: z.string().optional(),
|
|
369
|
+
additionalFees: z.string().optional(),
|
|
370
|
+
additionalTaxes: z.string().optional(),
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @internal
|
|
375
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
376
|
+
*/
|
|
377
|
+
export namespace AssetAttributes$ {
|
|
378
|
+
/** @deprecated use `AssetAttributes$inboundSchema` instead. */
|
|
379
|
+
export const inboundSchema = AssetAttributes$inboundSchema;
|
|
380
|
+
/** @deprecated use `AssetAttributes$outboundSchema` instead. */
|
|
381
|
+
export const outboundSchema = AssetAttributes$outboundSchema;
|
|
382
|
+
/** @deprecated use `AssetAttributes$Outbound` instead. */
|
|
383
|
+
export type Outbound = AssetAttributes$Outbound;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export function assetAttributesToJSON(
|
|
387
|
+
assetAttributes: AssetAttributes,
|
|
388
|
+
): string {
|
|
389
|
+
return JSON.stringify(AssetAttributes$outboundSchema.parse(assetAttributes));
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export function assetAttributesFromJSON(
|
|
393
|
+
jsonString: string,
|
|
394
|
+
): SafeParseResult<AssetAttributes, SDKValidationError> {
|
|
395
|
+
return safeParse(
|
|
396
|
+
jsonString,
|
|
397
|
+
(x) => AssetAttributes$inboundSchema.parse(JSON.parse(x)),
|
|
398
|
+
`Failed to parse 'AssetAttributes' from JSON`,
|
|
399
|
+
);
|
|
400
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
CustomerTitle,
|
|
13
|
+
CustomerTitle$inboundSchema,
|
|
14
|
+
CustomerTitle$outboundSchema,
|
|
15
|
+
} from "./customertitle.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Type of ID, either drivers' license or passport
|
|
19
|
+
*/
|
|
20
|
+
export const IDType = {
|
|
21
|
+
Licence: "licence",
|
|
22
|
+
Passport: "passport",
|
|
23
|
+
} as const;
|
|
24
|
+
/**
|
|
25
|
+
* Type of ID, either drivers' license or passport
|
|
26
|
+
*/
|
|
27
|
+
export type IDType = ClosedEnum<typeof IDType>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A customer of the proposed financing
|
|
31
|
+
*/
|
|
32
|
+
export type CustomerAttributes = {
|
|
33
|
+
/**
|
|
34
|
+
* Title of the customer
|
|
35
|
+
*/
|
|
36
|
+
title: CustomerTitle;
|
|
37
|
+
/**
|
|
38
|
+
* First name of the customer
|
|
39
|
+
*/
|
|
40
|
+
firstName: string;
|
|
41
|
+
/**
|
|
42
|
+
* Middle names of the customer
|
|
43
|
+
*/
|
|
44
|
+
middleNames?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Last name of the customer
|
|
47
|
+
*/
|
|
48
|
+
lastName: string;
|
|
49
|
+
/**
|
|
50
|
+
* Date of birth in format DD-MM-YYYY
|
|
51
|
+
*/
|
|
52
|
+
dateOfBirth: string;
|
|
53
|
+
/**
|
|
54
|
+
* Date of expiry of the ID in format DD-MM-YYYY
|
|
55
|
+
*/
|
|
56
|
+
idExpiryDate: string;
|
|
57
|
+
/**
|
|
58
|
+
* Type of ID, either drivers' license or passport
|
|
59
|
+
*/
|
|
60
|
+
idType?: IDType | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Number of the ID
|
|
63
|
+
*/
|
|
64
|
+
idNumber?: string | undefined;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const IDType$inboundSchema: z.ZodNativeEnum<typeof IDType> = z
|
|
69
|
+
.nativeEnum(IDType);
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const IDType$outboundSchema: z.ZodNativeEnum<typeof IDType> =
|
|
73
|
+
IDType$inboundSchema;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
78
|
+
*/
|
|
79
|
+
export namespace IDType$ {
|
|
80
|
+
/** @deprecated use `IDType$inboundSchema` instead. */
|
|
81
|
+
export const inboundSchema = IDType$inboundSchema;
|
|
82
|
+
/** @deprecated use `IDType$outboundSchema` instead. */
|
|
83
|
+
export const outboundSchema = IDType$outboundSchema;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const CustomerAttributes$inboundSchema: z.ZodType<
|
|
88
|
+
CustomerAttributes,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
unknown
|
|
91
|
+
> = z.object({
|
|
92
|
+
title: CustomerTitle$inboundSchema,
|
|
93
|
+
firstName: z.string(),
|
|
94
|
+
middleNames: z.string().optional(),
|
|
95
|
+
lastName: z.string(),
|
|
96
|
+
dateOfBirth: z.string(),
|
|
97
|
+
IDExpiryDate: z.string(),
|
|
98
|
+
IDType: IDType$inboundSchema.optional(),
|
|
99
|
+
IDNumber: z.string().optional(),
|
|
100
|
+
}).transform((v) => {
|
|
101
|
+
return remap$(v, {
|
|
102
|
+
"IDExpiryDate": "idExpiryDate",
|
|
103
|
+
"IDType": "idType",
|
|
104
|
+
"IDNumber": "idNumber",
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export type CustomerAttributes$Outbound = {
|
|
110
|
+
title: string;
|
|
111
|
+
firstName: string;
|
|
112
|
+
middleNames?: string | undefined;
|
|
113
|
+
lastName: string;
|
|
114
|
+
dateOfBirth: string;
|
|
115
|
+
IDExpiryDate: string;
|
|
116
|
+
IDType?: string | undefined;
|
|
117
|
+
IDNumber?: string | undefined;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/** @internal */
|
|
121
|
+
export const CustomerAttributes$outboundSchema: z.ZodType<
|
|
122
|
+
CustomerAttributes$Outbound,
|
|
123
|
+
z.ZodTypeDef,
|
|
124
|
+
CustomerAttributes
|
|
125
|
+
> = z.object({
|
|
126
|
+
title: CustomerTitle$outboundSchema,
|
|
127
|
+
firstName: z.string(),
|
|
128
|
+
middleNames: z.string().optional(),
|
|
129
|
+
lastName: z.string(),
|
|
130
|
+
dateOfBirth: z.string(),
|
|
131
|
+
idExpiryDate: z.string(),
|
|
132
|
+
idType: IDType$outboundSchema.optional(),
|
|
133
|
+
idNumber: z.string().optional(),
|
|
134
|
+
}).transform((v) => {
|
|
135
|
+
return remap$(v, {
|
|
136
|
+
idExpiryDate: "IDExpiryDate",
|
|
137
|
+
idType: "IDType",
|
|
138
|
+
idNumber: "IDNumber",
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @internal
|
|
144
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
145
|
+
*/
|
|
146
|
+
export namespace CustomerAttributes$ {
|
|
147
|
+
/** @deprecated use `CustomerAttributes$inboundSchema` instead. */
|
|
148
|
+
export const inboundSchema = CustomerAttributes$inboundSchema;
|
|
149
|
+
/** @deprecated use `CustomerAttributes$outboundSchema` instead. */
|
|
150
|
+
export const outboundSchema = CustomerAttributes$outboundSchema;
|
|
151
|
+
/** @deprecated use `CustomerAttributes$Outbound` instead. */
|
|
152
|
+
export type Outbound = CustomerAttributes$Outbound;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function customerAttributesToJSON(
|
|
156
|
+
customerAttributes: CustomerAttributes,
|
|
157
|
+
): string {
|
|
158
|
+
return JSON.stringify(
|
|
159
|
+
CustomerAttributes$outboundSchema.parse(customerAttributes),
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function customerAttributesFromJSON(
|
|
164
|
+
jsonString: string,
|
|
165
|
+
): SafeParseResult<CustomerAttributes, SDKValidationError> {
|
|
166
|
+
return safeParse(
|
|
167
|
+
jsonString,
|
|
168
|
+
(x) => CustomerAttributes$inboundSchema.parse(JSON.parse(x)),
|
|
169
|
+
`Failed to parse 'CustomerAttributes' from JSON`,
|
|
170
|
+
);
|
|
171
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 CustomerTitle = {
|
|
9
|
+
Mr: "Mr",
|
|
10
|
+
Ms: "Ms",
|
|
11
|
+
Mrs: "Mrs",
|
|
12
|
+
Miss: "Miss",
|
|
13
|
+
} as const;
|
|
14
|
+
export type CustomerTitle = ClosedEnum<typeof CustomerTitle>;
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const CustomerTitle$inboundSchema: z.ZodNativeEnum<
|
|
18
|
+
typeof CustomerTitle
|
|
19
|
+
> = z.nativeEnum(CustomerTitle);
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const CustomerTitle$outboundSchema: z.ZodNativeEnum<
|
|
23
|
+
typeof CustomerTitle
|
|
24
|
+
> = CustomerTitle$inboundSchema;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
29
|
+
*/
|
|
30
|
+
export namespace CustomerTitle$ {
|
|
31
|
+
/** @deprecated use `CustomerTitle$inboundSchema` instead. */
|
|
32
|
+
export const inboundSchema = CustomerTitle$inboundSchema;
|
|
33
|
+
/** @deprecated use `CustomerTitle$outboundSchema` instead. */
|
|
34
|
+
export const outboundSchema = CustomerTitle$outboundSchema;
|
|
35
|
+
}
|