@financeable/aggregation 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/FUNCTIONS.md +0 -4
  2. package/README.md +945 -28
  3. package/docs/sdks/applications/README.md +0 -8
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/models/components/applicationresourcebulksubmission.d.ts +0 -6
  8. package/models/components/applicationresourcebulksubmission.d.ts.map +1 -1
  9. package/models/components/applicationresourcebulksubmission.js +0 -6
  10. package/models/components/applicationresourcebulksubmission.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/lib/config.ts +3 -3
  13. package/src/models/components/applicationresourcebulksubmission.ts +0 -12
  14. package/financeable-typescript/.devcontainer/README.md +0 -30
  15. package/financeable-typescript/FUNCTIONS.md +0 -205
  16. package/financeable-typescript/README.md +0 -895
  17. package/financeable-typescript/RUNTIMES.md +0 -22
  18. package/financeable-typescript/docs/sdks/applications/README.md +0 -427
  19. package/financeable-typescript/docs/sdks/financeable/README.md +0 -5
  20. package/financeable-typescript/src/core.ts +0 -13
  21. package/financeable-typescript/src/funcs/applicationsCreate.ts +0 -124
  22. package/financeable-typescript/src/funcs/applicationsGet.ts +0 -128
  23. package/financeable-typescript/src/funcs/applicationsList.ts +0 -126
  24. package/financeable-typescript/src/hooks/hooks.ts +0 -129
  25. package/financeable-typescript/src/hooks/index.ts +0 -6
  26. package/financeable-typescript/src/hooks/types.ts +0 -109
  27. package/financeable-typescript/src/index.ts +0 -7
  28. package/financeable-typescript/src/lib/base64.ts +0 -37
  29. package/financeable-typescript/src/lib/config.ts +0 -59
  30. package/financeable-typescript/src/lib/dlv.ts +0 -53
  31. package/financeable-typescript/src/lib/encodings.ts +0 -449
  32. package/financeable-typescript/src/lib/env.ts +0 -37
  33. package/financeable-typescript/src/lib/files.ts +0 -40
  34. package/financeable-typescript/src/lib/http.ts +0 -323
  35. package/financeable-typescript/src/lib/is-plain-object.ts +0 -43
  36. package/financeable-typescript/src/lib/logger.ts +0 -9
  37. package/financeable-typescript/src/lib/matchers.ts +0 -322
  38. package/financeable-typescript/src/lib/primitives.ts +0 -122
  39. package/financeable-typescript/src/lib/retries.ts +0 -219
  40. package/financeable-typescript/src/lib/schemas.ts +0 -86
  41. package/financeable-typescript/src/lib/sdks.ts +0 -392
  42. package/financeable-typescript/src/lib/security.ts +0 -227
  43. package/financeable-typescript/src/lib/url.ts +0 -33
  44. package/financeable-typescript/src/models/components/addressattributes.ts +0 -148
  45. package/financeable-typescript/src/models/components/apierrorlinks.ts +0 -65
  46. package/financeable-typescript/src/models/components/applicationattributes.ts +0 -128
  47. package/financeable-typescript/src/models/components/applicationattributescreate.ts +0 -90
  48. package/financeable-typescript/src/models/components/applicationresourcebulksubmission.ts +0 -1000
  49. package/financeable-typescript/src/models/components/applicationstatus.ts +0 -39
  50. package/financeable-typescript/src/models/components/applicationtype.ts +0 -33
  51. package/financeable-typescript/src/models/components/assetattributes.ts +0 -400
  52. package/financeable-typescript/src/models/components/customerattributes.ts +0 -171
  53. package/financeable-typescript/src/models/components/customertitle.ts +0 -35
  54. package/financeable-typescript/src/models/components/errorsource.ts +0 -79
  55. package/financeable-typescript/src/models/components/forbiddenerror.ts +0 -207
  56. package/financeable-typescript/src/models/components/frequencytype.ts +0 -40
  57. package/financeable-typescript/src/models/components/index.ts +0 -20
  58. package/financeable-typescript/src/models/components/links.ts +0 -72
  59. package/financeable-typescript/src/models/components/loandetailsattributes.ts +0 -187
  60. package/financeable-typescript/src/models/components/repaymentstructure.ts +0 -40
  61. package/financeable-typescript/src/models/errors/apierror.ts +0 -27
  62. package/financeable-typescript/src/models/errors/createapplication.ts +0 -76
  63. package/financeable-typescript/src/models/errors/getapplication.ts +0 -76
  64. package/financeable-typescript/src/models/errors/getapplications.ts +0 -76
  65. package/financeable-typescript/src/models/errors/httpclienterrors.ts +0 -62
  66. package/financeable-typescript/src/models/errors/index.ts +0 -10
  67. package/financeable-typescript/src/models/errors/sdkvalidationerror.ts +0 -97
  68. package/financeable-typescript/src/models/operations/createapplication.ts +0 -1649
  69. package/financeable-typescript/src/models/operations/getapplication.ts +0 -1829
  70. package/financeable-typescript/src/models/operations/getapplications.ts +0 -1790
  71. package/financeable-typescript/src/models/operations/index.ts +0 -7
  72. package/financeable-typescript/src/sdk/applications.ts +0 -55
  73. package/financeable-typescript/src/sdk/index.ts +0 -5
  74. package/financeable-typescript/src/sdk/sdk.ts +0 -13
  75. package/financeable-typescript/src/types/blobs.ts +0 -31
  76. package/financeable-typescript/src/types/constdatetime.ts +0 -15
  77. package/financeable-typescript/src/types/enums.ts +0 -16
  78. package/financeable-typescript/src/types/fp.ts +0 -50
  79. package/financeable-typescript/src/types/index.ts +0 -11
  80. package/financeable-typescript/src/types/operations.ts +0 -105
  81. package/financeable-typescript/src/types/rfcdate.ts +0 -54
  82. package/financeable-typescript/src/types/streams.ts +0 -21
@@ -1,79 +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
- export type ErrorSource = {
11
- /**
12
- * A JSON Pointer to the associated entity in the request document.
13
- */
14
- pointer?: string | undefined;
15
- /**
16
- * A string indicating which URI query parameter caused the error.
17
- */
18
- parameter?: string | undefined;
19
- /**
20
- * A string indicating which HTTP header caused the error.
21
- */
22
- header?: string | undefined;
23
- };
24
-
25
- /** @internal */
26
- export const ErrorSource$inboundSchema: z.ZodType<
27
- ErrorSource,
28
- z.ZodTypeDef,
29
- unknown
30
- > = z.object({
31
- pointer: z.string().optional(),
32
- parameter: z.string().optional(),
33
- header: z.string().optional(),
34
- });
35
-
36
- /** @internal */
37
- export type ErrorSource$Outbound = {
38
- pointer?: string | undefined;
39
- parameter?: string | undefined;
40
- header?: string | undefined;
41
- };
42
-
43
- /** @internal */
44
- export const ErrorSource$outboundSchema: z.ZodType<
45
- ErrorSource$Outbound,
46
- z.ZodTypeDef,
47
- ErrorSource
48
- > = z.object({
49
- pointer: z.string().optional(),
50
- parameter: z.string().optional(),
51
- header: z.string().optional(),
52
- });
53
-
54
- /**
55
- * @internal
56
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
57
- */
58
- export namespace ErrorSource$ {
59
- /** @deprecated use `ErrorSource$inboundSchema` instead. */
60
- export const inboundSchema = ErrorSource$inboundSchema;
61
- /** @deprecated use `ErrorSource$outboundSchema` instead. */
62
- export const outboundSchema = ErrorSource$outboundSchema;
63
- /** @deprecated use `ErrorSource$Outbound` instead. */
64
- export type Outbound = ErrorSource$Outbound;
65
- }
66
-
67
- export function errorSourceToJSON(errorSource: ErrorSource): string {
68
- return JSON.stringify(ErrorSource$outboundSchema.parse(errorSource));
69
- }
70
-
71
- export function errorSourceFromJSON(
72
- jsonString: string,
73
- ): SafeParseResult<ErrorSource, SDKValidationError> {
74
- return safeParse(
75
- jsonString,
76
- (x) => ErrorSource$inboundSchema.parse(JSON.parse(x)),
77
- `Failed to parse 'ErrorSource' from JSON`,
78
- );
79
- }
@@ -1,207 +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
- APIErrorLinks,
12
- APIErrorLinks$inboundSchema,
13
- APIErrorLinks$Outbound,
14
- APIErrorLinks$outboundSchema,
15
- } from "./apierrorlinks.js";
16
- import {
17
- ErrorSource,
18
- ErrorSource$inboundSchema,
19
- ErrorSource$Outbound,
20
- ErrorSource$outboundSchema,
21
- } from "./errorsource.js";
22
-
23
- export const ForbiddenErrorStatus = {
24
- FourHundredAndThree: "403",
25
- } as const;
26
- export type ForbiddenErrorStatus = ClosedEnum<typeof ForbiddenErrorStatus>;
27
-
28
- export const Code = {
29
- Unauthorised: "Unauthorised",
30
- } as const;
31
- export type Code = ClosedEnum<typeof Code>;
32
-
33
- export const Title = {
34
- Unauthorised: "Unauthorised",
35
- } as const;
36
- export type Title = ClosedEnum<typeof Title>;
37
-
38
- export const Detail = {
39
- YouAreNotAuthorizedToPerformThisAction:
40
- "You are not authorized to perform this action.",
41
- } as const;
42
- export type Detail = ClosedEnum<typeof Detail>;
43
-
44
- export type ForbiddenError = {
45
- id?: string | undefined;
46
- links?: APIErrorLinks | undefined;
47
- status: ForbiddenErrorStatus;
48
- code: Code;
49
- title: Title;
50
- detail: Detail;
51
- /**
52
- * An object describing the source of the error from the request
53
- */
54
- source?: ErrorSource | undefined;
55
- meta?: { [k: string]: any } | undefined;
56
- };
57
-
58
- /** @internal */
59
- export const ForbiddenErrorStatus$inboundSchema: z.ZodNativeEnum<
60
- typeof ForbiddenErrorStatus
61
- > = z.nativeEnum(ForbiddenErrorStatus);
62
-
63
- /** @internal */
64
- export const ForbiddenErrorStatus$outboundSchema: z.ZodNativeEnum<
65
- typeof ForbiddenErrorStatus
66
- > = ForbiddenErrorStatus$inboundSchema;
67
-
68
- /**
69
- * @internal
70
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
71
- */
72
- export namespace ForbiddenErrorStatus$ {
73
- /** @deprecated use `ForbiddenErrorStatus$inboundSchema` instead. */
74
- export const inboundSchema = ForbiddenErrorStatus$inboundSchema;
75
- /** @deprecated use `ForbiddenErrorStatus$outboundSchema` instead. */
76
- export const outboundSchema = ForbiddenErrorStatus$outboundSchema;
77
- }
78
-
79
- /** @internal */
80
- export const Code$inboundSchema: z.ZodNativeEnum<typeof Code> = z.nativeEnum(
81
- Code,
82
- );
83
-
84
- /** @internal */
85
- export const Code$outboundSchema: z.ZodNativeEnum<typeof Code> =
86
- Code$inboundSchema;
87
-
88
- /**
89
- * @internal
90
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
91
- */
92
- export namespace Code$ {
93
- /** @deprecated use `Code$inboundSchema` instead. */
94
- export const inboundSchema = Code$inboundSchema;
95
- /** @deprecated use `Code$outboundSchema` instead. */
96
- export const outboundSchema = Code$outboundSchema;
97
- }
98
-
99
- /** @internal */
100
- export const Title$inboundSchema: z.ZodNativeEnum<typeof Title> = z.nativeEnum(
101
- Title,
102
- );
103
-
104
- /** @internal */
105
- export const Title$outboundSchema: z.ZodNativeEnum<typeof Title> =
106
- Title$inboundSchema;
107
-
108
- /**
109
- * @internal
110
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
111
- */
112
- export namespace Title$ {
113
- /** @deprecated use `Title$inboundSchema` instead. */
114
- export const inboundSchema = Title$inboundSchema;
115
- /** @deprecated use `Title$outboundSchema` instead. */
116
- export const outboundSchema = Title$outboundSchema;
117
- }
118
-
119
- /** @internal */
120
- export const Detail$inboundSchema: z.ZodNativeEnum<typeof Detail> = z
121
- .nativeEnum(Detail);
122
-
123
- /** @internal */
124
- export const Detail$outboundSchema: z.ZodNativeEnum<typeof Detail> =
125
- Detail$inboundSchema;
126
-
127
- /**
128
- * @internal
129
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
130
- */
131
- export namespace Detail$ {
132
- /** @deprecated use `Detail$inboundSchema` instead. */
133
- export const inboundSchema = Detail$inboundSchema;
134
- /** @deprecated use `Detail$outboundSchema` instead. */
135
- export const outboundSchema = Detail$outboundSchema;
136
- }
137
-
138
- /** @internal */
139
- export const ForbiddenError$inboundSchema: z.ZodType<
140
- ForbiddenError,
141
- z.ZodTypeDef,
142
- unknown
143
- > = z.object({
144
- id: z.string().optional(),
145
- links: APIErrorLinks$inboundSchema.optional(),
146
- status: ForbiddenErrorStatus$inboundSchema,
147
- code: Code$inboundSchema,
148
- title: Title$inboundSchema,
149
- detail: Detail$inboundSchema,
150
- source: ErrorSource$inboundSchema.optional(),
151
- meta: z.record(z.any()).optional(),
152
- });
153
-
154
- /** @internal */
155
- export type ForbiddenError$Outbound = {
156
- id?: string | undefined;
157
- links?: APIErrorLinks$Outbound | undefined;
158
- status: string;
159
- code: string;
160
- title: string;
161
- detail: string;
162
- source?: ErrorSource$Outbound | undefined;
163
- meta?: { [k: string]: any } | undefined;
164
- };
165
-
166
- /** @internal */
167
- export const ForbiddenError$outboundSchema: z.ZodType<
168
- ForbiddenError$Outbound,
169
- z.ZodTypeDef,
170
- ForbiddenError
171
- > = z.object({
172
- id: z.string().optional(),
173
- links: APIErrorLinks$outboundSchema.optional(),
174
- status: ForbiddenErrorStatus$outboundSchema,
175
- code: Code$outboundSchema,
176
- title: Title$outboundSchema,
177
- detail: Detail$outboundSchema,
178
- source: ErrorSource$outboundSchema.optional(),
179
- meta: z.record(z.any()).optional(),
180
- });
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 ForbiddenError$ {
187
- /** @deprecated use `ForbiddenError$inboundSchema` instead. */
188
- export const inboundSchema = ForbiddenError$inboundSchema;
189
- /** @deprecated use `ForbiddenError$outboundSchema` instead. */
190
- export const outboundSchema = ForbiddenError$outboundSchema;
191
- /** @deprecated use `ForbiddenError$Outbound` instead. */
192
- export type Outbound = ForbiddenError$Outbound;
193
- }
194
-
195
- export function forbiddenErrorToJSON(forbiddenError: ForbiddenError): string {
196
- return JSON.stringify(ForbiddenError$outboundSchema.parse(forbiddenError));
197
- }
198
-
199
- export function forbiddenErrorFromJSON(
200
- jsonString: string,
201
- ): SafeParseResult<ForbiddenError, SDKValidationError> {
202
- return safeParse(
203
- jsonString,
204
- (x) => ForbiddenError$inboundSchema.parse(JSON.parse(x)),
205
- `Failed to parse 'ForbiddenError' from JSON`,
206
- );
207
- }
@@ -1,40 +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
- /**
9
- * Frequency types for loan repayments
10
- */
11
- export const FrequencyType = {
12
- Weekly: "weekly",
13
- Fortnightly: "fortnightly",
14
- Monthly: "monthly",
15
- } as const;
16
- /**
17
- * Frequency types for loan repayments
18
- */
19
- export type FrequencyType = ClosedEnum<typeof FrequencyType>;
20
-
21
- /** @internal */
22
- export const FrequencyType$inboundSchema: z.ZodNativeEnum<
23
- typeof FrequencyType
24
- > = z.nativeEnum(FrequencyType);
25
-
26
- /** @internal */
27
- export const FrequencyType$outboundSchema: z.ZodNativeEnum<
28
- typeof FrequencyType
29
- > = FrequencyType$inboundSchema;
30
-
31
- /**
32
- * @internal
33
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
34
- */
35
- export namespace FrequencyType$ {
36
- /** @deprecated use `FrequencyType$inboundSchema` instead. */
37
- export const inboundSchema = FrequencyType$inboundSchema;
38
- /** @deprecated use `FrequencyType$outboundSchema` instead. */
39
- export const outboundSchema = FrequencyType$outboundSchema;
40
- }
@@ -1,20 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- export * from "./addressattributes.js";
6
- export * from "./apierrorlinks.js";
7
- export * from "./applicationattributes.js";
8
- export * from "./applicationattributescreate.js";
9
- export * from "./applicationresourcebulksubmission.js";
10
- export * from "./applicationstatus.js";
11
- export * from "./applicationtype.js";
12
- export * from "./assetattributes.js";
13
- export * from "./customerattributes.js";
14
- export * from "./customertitle.js";
15
- export * from "./errorsource.js";
16
- export * from "./forbiddenerror.js";
17
- export * from "./frequencytype.js";
18
- export * from "./links.js";
19
- export * from "./loandetailsattributes.js";
20
- export * from "./repaymentstructure.js";
@@ -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,187 +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
- import {
10
- FrequencyType,
11
- FrequencyType$inboundSchema,
12
- FrequencyType$outboundSchema,
13
- } from "./frequencytype.js";
14
- import {
15
- RepaymentStructure,
16
- RepaymentStructure$inboundSchema,
17
- RepaymentStructure$outboundSchema,
18
- } from "./repaymentstructure.js";
19
-
20
- /**
21
- * Loan details model
22
- */
23
- export type LoanDetailsAttributes = {
24
- /**
25
- * Number of repayments as integer
26
- */
27
- repayments?: number | undefined;
28
- /**
29
- * Frequency of repayments
30
- */
31
- repaymentFrequency?: FrequencyType | undefined;
32
- /**
33
- * Structure of repayments
34
- */
35
- repaymentStructure?: RepaymentStructure | undefined;
36
- /**
37
- * Total loan amount, floating point as string
38
- */
39
- loanAmount?: string | undefined;
40
- /**
41
- * Loan purpose
42
- */
43
- purpose?: string | undefined;
44
- /**
45
- * Loan term in months
46
- */
47
- term?: number | undefined;
48
- /**
49
- * Brokerage percentage, floating point as string
50
- */
51
- brokerage?: string | undefined;
52
- /**
53
- * Brokerage amount, floating point as string
54
- */
55
- brokerageAmount?: string | undefined;
56
- /**
57
- * Balloon percentage as integer, e.g. provide 10 for 10%
58
- */
59
- balloon?: number | undefined;
60
- /**
61
- * Balloon amount, floating point as string
62
- */
63
- balloonAmount?: string | undefined;
64
- /**
65
- * Deposit amount, floating point as string
66
- */
67
- deposit?: string | undefined;
68
- /**
69
- * Trade in amount, floating point as string
70
- */
71
- tradeIn?: string | undefined;
72
- /**
73
- * Origination fee, floating point as string
74
- */
75
- originationFee?: number | undefined;
76
- /**
77
- * Payout amount, floating point as string
78
- */
79
- payout?: string | undefined;
80
- /**
81
- * Interest rate, floating point as string
82
- */
83
- rate?: string | undefined;
84
- /**
85
- * Rate adjustment, floating point as string
86
- */
87
- rateAdjustment?: string | undefined;
88
- };
89
-
90
- /** @internal */
91
- export const LoanDetailsAttributes$inboundSchema: z.ZodType<
92
- LoanDetailsAttributes,
93
- z.ZodTypeDef,
94
- unknown
95
- > = z.object({
96
- repayments: z.number().int().optional(),
97
- repaymentFrequency: FrequencyType$inboundSchema.optional(),
98
- repaymentStructure: RepaymentStructure$inboundSchema.optional(),
99
- loanAmount: z.string().optional(),
100
- purpose: z.string().optional(),
101
- term: z.number().int().optional(),
102
- brokerage: z.string().optional(),
103
- brokerageAmount: z.string().optional(),
104
- balloon: z.number().int().optional(),
105
- balloonAmount: z.string().optional(),
106
- deposit: z.string().optional(),
107
- tradeIn: z.string().optional(),
108
- originationFee: z.number().int().optional(),
109
- payout: z.string().optional(),
110
- rate: z.string().optional(),
111
- rateAdjustment: z.string().optional(),
112
- });
113
-
114
- /** @internal */
115
- export type LoanDetailsAttributes$Outbound = {
116
- repayments?: number | undefined;
117
- repaymentFrequency?: string | undefined;
118
- repaymentStructure?: string | undefined;
119
- loanAmount?: string | undefined;
120
- purpose?: string | undefined;
121
- term?: number | undefined;
122
- brokerage?: string | undefined;
123
- brokerageAmount?: string | undefined;
124
- balloon?: number | undefined;
125
- balloonAmount?: string | undefined;
126
- deposit?: string | undefined;
127
- tradeIn?: string | undefined;
128
- originationFee?: number | undefined;
129
- payout?: string | undefined;
130
- rate?: string | undefined;
131
- rateAdjustment?: string | undefined;
132
- };
133
-
134
- /** @internal */
135
- export const LoanDetailsAttributes$outboundSchema: z.ZodType<
136
- LoanDetailsAttributes$Outbound,
137
- z.ZodTypeDef,
138
- LoanDetailsAttributes
139
- > = z.object({
140
- repayments: z.number().int().optional(),
141
- repaymentFrequency: FrequencyType$outboundSchema.optional(),
142
- repaymentStructure: RepaymentStructure$outboundSchema.optional(),
143
- loanAmount: z.string().optional(),
144
- purpose: z.string().optional(),
145
- term: z.number().int().optional(),
146
- brokerage: z.string().optional(),
147
- brokerageAmount: z.string().optional(),
148
- balloon: z.number().int().optional(),
149
- balloonAmount: z.string().optional(),
150
- deposit: z.string().optional(),
151
- tradeIn: z.string().optional(),
152
- originationFee: z.number().int().optional(),
153
- payout: z.string().optional(),
154
- rate: z.string().optional(),
155
- rateAdjustment: z.string().optional(),
156
- });
157
-
158
- /**
159
- * @internal
160
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
161
- */
162
- export namespace LoanDetailsAttributes$ {
163
- /** @deprecated use `LoanDetailsAttributes$inboundSchema` instead. */
164
- export const inboundSchema = LoanDetailsAttributes$inboundSchema;
165
- /** @deprecated use `LoanDetailsAttributes$outboundSchema` instead. */
166
- export const outboundSchema = LoanDetailsAttributes$outboundSchema;
167
- /** @deprecated use `LoanDetailsAttributes$Outbound` instead. */
168
- export type Outbound = LoanDetailsAttributes$Outbound;
169
- }
170
-
171
- export function loanDetailsAttributesToJSON(
172
- loanDetailsAttributes: LoanDetailsAttributes,
173
- ): string {
174
- return JSON.stringify(
175
- LoanDetailsAttributes$outboundSchema.parse(loanDetailsAttributes),
176
- );
177
- }
178
-
179
- export function loanDetailsAttributesFromJSON(
180
- jsonString: string,
181
- ): SafeParseResult<LoanDetailsAttributes, SDKValidationError> {
182
- return safeParse(
183
- jsonString,
184
- (x) => LoanDetailsAttributes$inboundSchema.parse(JSON.parse(x)),
185
- `Failed to parse 'LoanDetailsAttributes' from JSON`,
186
- );
187
- }
@@ -1,40 +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
- /**
9
- * Repayment structure types
10
- */
11
- export const RepaymentStructure = {
12
- CustomPayments: "custom-payments",
13
- GroupPayments: "group-payments",
14
- SinglePayments: "single-payments",
15
- } as const;
16
- /**
17
- * Repayment structure types
18
- */
19
- export type RepaymentStructure = ClosedEnum<typeof RepaymentStructure>;
20
-
21
- /** @internal */
22
- export const RepaymentStructure$inboundSchema: z.ZodNativeEnum<
23
- typeof RepaymentStructure
24
- > = z.nativeEnum(RepaymentStructure);
25
-
26
- /** @internal */
27
- export const RepaymentStructure$outboundSchema: z.ZodNativeEnum<
28
- typeof RepaymentStructure
29
- > = RepaymentStructure$inboundSchema;
30
-
31
- /**
32
- * @internal
33
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
34
- */
35
- export namespace RepaymentStructure$ {
36
- /** @deprecated use `RepaymentStructure$inboundSchema` instead. */
37
- export const inboundSchema = RepaymentStructure$inboundSchema;
38
- /** @deprecated use `RepaymentStructure$outboundSchema` instead. */
39
- export const outboundSchema = RepaymentStructure$outboundSchema;
40
- }
@@ -1,27 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- export class APIError extends Error {
6
- public readonly statusCode: number;
7
- public readonly contentType: string;
8
-
9
- constructor(
10
- message: string,
11
- public readonly rawResponse: Response,
12
- public readonly body: string = "",
13
- ) {
14
- const statusCode = rawResponse.status;
15
- const contentType = rawResponse.headers.get("content-type") || "";
16
- const bodyString = body.length > 0 ? `\n${body}` : "";
17
-
18
- super(
19
- `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`,
20
- );
21
-
22
- this.statusCode = statusCode;
23
- this.contentType = contentType;
24
-
25
- this.name = "APIError";
26
- }
27
- }