@oatfi/oatfi-sdk-ts 0.11.66 → 0.11.67

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 (108) hide show
  1. package/README.md +5 -0
  2. package/dist/commonjs/funcs/internalProgramSettingsGet.d.ts +18 -0
  3. package/dist/commonjs/funcs/internalProgramSettingsGet.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/internalProgramSettingsGet.js +130 -0
  5. package/dist/commonjs/funcs/internalProgramSettingsGet.js.map +1 -0
  6. package/dist/commonjs/lib/config.d.ts +2 -2
  7. package/dist/commonjs/lib/config.js +2 -2
  8. package/dist/commonjs/models/index.d.ts +4 -0
  9. package/dist/commonjs/models/index.d.ts.map +1 -1
  10. package/dist/commonjs/models/index.js +4 -0
  11. package/dist/commonjs/models/index.js.map +1 -1
  12. package/dist/commonjs/models/lmsbusinesstype.d.ts +18 -0
  13. package/dist/commonjs/models/lmsbusinesstype.d.ts.map +1 -0
  14. package/dist/commonjs/models/lmsbusinesstype.js +52 -0
  15. package/dist/commonjs/models/lmsbusinesstype.js.map +1 -0
  16. package/dist/commonjs/models/operations/index.d.ts +1 -0
  17. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  18. package/dist/commonjs/models/operations/index.js +1 -0
  19. package/dist/commonjs/models/operations/index.js.map +1 -1
  20. package/dist/commonjs/models/operations/internalprogramsettingscontrollergetprogramsettings.d.ts +15 -0
  21. package/dist/commonjs/models/operations/internalprogramsettingscontrollergetprogramsettings.d.ts.map +1 -0
  22. package/dist/commonjs/models/operations/internalprogramsettingscontrollergetprogramsettings.js +50 -0
  23. package/dist/commonjs/models/operations/internalprogramsettingscontrollergetprogramsettings.js.map +1 -0
  24. package/dist/commonjs/models/programonboardingsettingsdto.d.ts +41 -0
  25. package/dist/commonjs/models/programonboardingsettingsdto.d.ts.map +1 -0
  26. package/dist/commonjs/models/programonboardingsettingsdto.js +69 -0
  27. package/dist/commonjs/models/programonboardingsettingsdto.js.map +1 -0
  28. package/dist/commonjs/models/programsettingsresponsedto.d.ts +31 -0
  29. package/dist/commonjs/models/programsettingsresponsedto.d.ts.map +1 -0
  30. package/dist/commonjs/models/programsettingsresponsedto.js +64 -0
  31. package/dist/commonjs/models/programsettingsresponsedto.js.map +1 -0
  32. package/dist/commonjs/models/programunderwritingsettingsdto.d.ts +135 -0
  33. package/dist/commonjs/models/programunderwritingsettingsdto.d.ts.map +1 -0
  34. package/dist/commonjs/models/programunderwritingsettingsdto.js +135 -0
  35. package/dist/commonjs/models/programunderwritingsettingsdto.js.map +1 -0
  36. package/dist/commonjs/models/underwritingsettingsdto.d.ts +22 -30
  37. package/dist/commonjs/models/underwritingsettingsdto.d.ts.map +1 -1
  38. package/dist/commonjs/models/underwritingsettingsdto.js +30 -31
  39. package/dist/commonjs/models/underwritingsettingsdto.js.map +1 -1
  40. package/dist/commonjs/sdk/internalprogramsettings.d.ts +13 -0
  41. package/dist/commonjs/sdk/internalprogramsettings.d.ts.map +1 -0
  42. package/dist/commonjs/sdk/internalprogramsettings.js +22 -0
  43. package/dist/commonjs/sdk/internalprogramsettings.js.map +1 -0
  44. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  45. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  46. package/dist/commonjs/sdk/sdk.js +4 -0
  47. package/dist/commonjs/sdk/sdk.js.map +1 -1
  48. package/dist/esm/funcs/internalProgramSettingsGet.d.ts +18 -0
  49. package/dist/esm/funcs/internalProgramSettingsGet.d.ts.map +1 -0
  50. package/dist/esm/funcs/internalProgramSettingsGet.js +94 -0
  51. package/dist/esm/funcs/internalProgramSettingsGet.js.map +1 -0
  52. package/dist/esm/lib/config.d.ts +2 -2
  53. package/dist/esm/lib/config.js +2 -2
  54. package/dist/esm/models/index.d.ts +4 -0
  55. package/dist/esm/models/index.d.ts.map +1 -1
  56. package/dist/esm/models/index.js +4 -0
  57. package/dist/esm/models/index.js.map +1 -1
  58. package/dist/esm/models/lmsbusinesstype.d.ts +18 -0
  59. package/dist/esm/models/lmsbusinesstype.d.ts.map +1 -0
  60. package/dist/esm/models/lmsbusinesstype.js +16 -0
  61. package/dist/esm/models/lmsbusinesstype.js.map +1 -0
  62. package/dist/esm/models/operations/index.d.ts +1 -0
  63. package/dist/esm/models/operations/index.d.ts.map +1 -1
  64. package/dist/esm/models/operations/index.js +1 -0
  65. package/dist/esm/models/operations/index.js.map +1 -1
  66. package/dist/esm/models/operations/internalprogramsettingscontrollergetprogramsettings.d.ts +15 -0
  67. package/dist/esm/models/operations/internalprogramsettingscontrollergetprogramsettings.d.ts.map +1 -0
  68. package/dist/esm/models/operations/internalprogramsettingscontrollergetprogramsettings.js +13 -0
  69. package/dist/esm/models/operations/internalprogramsettingscontrollergetprogramsettings.js.map +1 -0
  70. package/dist/esm/models/programonboardingsettingsdto.d.ts +41 -0
  71. package/dist/esm/models/programonboardingsettingsdto.d.ts.map +1 -0
  72. package/dist/esm/models/programonboardingsettingsdto.js +32 -0
  73. package/dist/esm/models/programonboardingsettingsdto.js.map +1 -0
  74. package/dist/esm/models/programsettingsresponsedto.d.ts +31 -0
  75. package/dist/esm/models/programsettingsresponsedto.d.ts.map +1 -0
  76. package/dist/esm/models/programsettingsresponsedto.js +27 -0
  77. package/dist/esm/models/programsettingsresponsedto.js.map +1 -0
  78. package/dist/esm/models/programunderwritingsettingsdto.d.ts +135 -0
  79. package/dist/esm/models/programunderwritingsettingsdto.d.ts.map +1 -0
  80. package/dist/esm/models/programunderwritingsettingsdto.js +98 -0
  81. package/dist/esm/models/programunderwritingsettingsdto.js.map +1 -0
  82. package/dist/esm/models/underwritingsettingsdto.d.ts +22 -30
  83. package/dist/esm/models/underwritingsettingsdto.d.ts.map +1 -1
  84. package/dist/esm/models/underwritingsettingsdto.js +29 -30
  85. package/dist/esm/models/underwritingsettingsdto.js.map +1 -1
  86. package/dist/esm/sdk/internalprogramsettings.d.ts +13 -0
  87. package/dist/esm/sdk/internalprogramsettings.d.ts.map +1 -0
  88. package/dist/esm/sdk/internalprogramsettings.js +18 -0
  89. package/dist/esm/sdk/internalprogramsettings.js.map +1 -0
  90. package/dist/esm/sdk/sdk.d.ts +3 -0
  91. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  92. package/dist/esm/sdk/sdk.js +4 -0
  93. package/dist/esm/sdk/sdk.js.map +1 -1
  94. package/jsr.json +1 -1
  95. package/package.json +1 -1
  96. package/scripts/fix-overlay.ts +449 -0
  97. package/src/funcs/internalProgramSettingsGet.ts +180 -0
  98. package/src/lib/config.ts +2 -2
  99. package/src/models/index.ts +4 -0
  100. package/src/models/lmsbusinesstype.ts +27 -0
  101. package/src/models/operations/index.ts +1 -0
  102. package/src/models/operations/internalprogramsettingscontrollergetprogramsettings.ts +38 -0
  103. package/src/models/programonboardingsettingsdto.ts +81 -0
  104. package/src/models/programsettingsresponsedto.ts +74 -0
  105. package/src/models/programunderwritingsettingsdto.ts +236 -0
  106. package/src/models/underwritingsettingsdto.ts +71 -63
  107. package/src/sdk/internalprogramsettings.ts +29 -0
  108. package/src/sdk/sdk.ts +8 -0
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+
7
+ export type InternalProgramSettingsControllerGetProgramSettingsRequest = {
8
+ /**
9
+ * ID of the loan program
10
+ */
11
+ id: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export type InternalProgramSettingsControllerGetProgramSettingsRequest$Outbound =
16
+ {
17
+ id: string;
18
+ };
19
+
20
+ /** @internal */
21
+ export const InternalProgramSettingsControllerGetProgramSettingsRequest$outboundSchema:
22
+ z.ZodType<
23
+ InternalProgramSettingsControllerGetProgramSettingsRequest$Outbound,
24
+ z.ZodTypeDef,
25
+ InternalProgramSettingsControllerGetProgramSettingsRequest
26
+ > = z.object({
27
+ id: z.string(),
28
+ });
29
+
30
+ export function internalProgramSettingsControllerGetProgramSettingsRequestToJSON(
31
+ internalProgramSettingsControllerGetProgramSettingsRequest:
32
+ InternalProgramSettingsControllerGetProgramSettingsRequest,
33
+ ): string {
34
+ return JSON.stringify(
35
+ InternalProgramSettingsControllerGetProgramSettingsRequest$outboundSchema
36
+ .parse(internalProgramSettingsControllerGetProgramSettingsRequest),
37
+ );
38
+ }
@@ -0,0 +1,81 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import * as types from "../types/primitives.js";
10
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
11
+
12
+ export type ProgramOnboardingSettingsDto = {
13
+ /**
14
+ * Allow onboarding
15
+ */
16
+ allowOnboarding?: boolean | undefined;
17
+ /**
18
+ * Run underwriting during onboarding
19
+ */
20
+ runUnderwriting?: boolean | undefined;
21
+ /**
22
+ * Enable Plaid integration
23
+ */
24
+ plaid?: boolean | undefined;
25
+ /**
26
+ * Require bank statements
27
+ */
28
+ bankStatements?: boolean | undefined;
29
+ /**
30
+ * Require financial statements
31
+ */
32
+ financialStatements?: boolean | undefined;
33
+ /**
34
+ * Collect self-reported annual revenue
35
+ */
36
+ collectSelfReportedAnnualRevenue?: boolean | undefined;
37
+ /**
38
+ * Allow user to request credit limit
39
+ */
40
+ allowUserRequestCreditLimit?: boolean | undefined;
41
+ /**
42
+ * Allow products
43
+ */
44
+ allowProducts?: boolean | undefined;
45
+ };
46
+
47
+ /** @internal */
48
+ export const ProgramOnboardingSettingsDto$inboundSchema: z.ZodType<
49
+ ProgramOnboardingSettingsDto,
50
+ z.ZodTypeDef,
51
+ unknown
52
+ > = z.object({
53
+ allow_onboarding: types.optional(types.boolean()),
54
+ run_underwriting: types.optional(types.boolean()),
55
+ plaid: types.optional(types.boolean()),
56
+ bank_statements: types.optional(types.boolean()),
57
+ financial_statements: types.optional(types.boolean()),
58
+ collect_self_reported_annual_revenue: types.optional(types.boolean()),
59
+ allow_user_request_credit_limit: types.optional(types.boolean()),
60
+ allow_products: types.optional(types.boolean()),
61
+ }).transform((v) => {
62
+ return remap$(v, {
63
+ "allow_onboarding": "allowOnboarding",
64
+ "run_underwriting": "runUnderwriting",
65
+ "bank_statements": "bankStatements",
66
+ "financial_statements": "financialStatements",
67
+ "collect_self_reported_annual_revenue": "collectSelfReportedAnnualRevenue",
68
+ "allow_user_request_credit_limit": "allowUserRequestCreditLimit",
69
+ "allow_products": "allowProducts",
70
+ });
71
+ });
72
+
73
+ export function programOnboardingSettingsDtoFromJSON(
74
+ jsonString: string,
75
+ ): SafeParseResult<ProgramOnboardingSettingsDto, SDKValidationError> {
76
+ return safeParse(
77
+ jsonString,
78
+ (x) => ProgramOnboardingSettingsDto$inboundSchema.parse(JSON.parse(x)),
79
+ `Failed to parse 'ProgramOnboardingSettingsDto' from JSON`,
80
+ );
81
+ }
@@ -0,0 +1,74 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../types/fp.js";
9
+ import * as types from "../types/primitives.js";
10
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
11
+ import {
12
+ ProgramOnboardingSettingsDto,
13
+ ProgramOnboardingSettingsDto$inboundSchema,
14
+ } from "./programonboardingsettingsdto.js";
15
+ import {
16
+ ProgramUnderwritingSettingsDto,
17
+ ProgramUnderwritingSettingsDto$inboundSchema,
18
+ } from "./programunderwritingsettingsdto.js";
19
+
20
+ export type ProgramSettingsResponseDto = {
21
+ /**
22
+ * Resource type
23
+ */
24
+ object: string;
25
+ /**
26
+ * Loan program ID
27
+ */
28
+ id: string;
29
+ /**
30
+ * Onboarding settings
31
+ */
32
+ onboardingSettings?: ProgramOnboardingSettingsDto | undefined;
33
+ /**
34
+ * Underwriting settings
35
+ */
36
+ underwritingSettings?: ProgramUnderwritingSettingsDto | undefined;
37
+ /**
38
+ * Whether the program has UW terms agreement configured
39
+ */
40
+ hasUwTerms: boolean;
41
+ };
42
+
43
+ /** @internal */
44
+ export const ProgramSettingsResponseDto$inboundSchema: z.ZodType<
45
+ ProgramSettingsResponseDto,
46
+ z.ZodTypeDef,
47
+ unknown
48
+ > = z.object({
49
+ object: types.string(),
50
+ id: types.string(),
51
+ onboarding_settings: types.optional(
52
+ ProgramOnboardingSettingsDto$inboundSchema,
53
+ ),
54
+ underwriting_settings: types.optional(
55
+ ProgramUnderwritingSettingsDto$inboundSchema,
56
+ ),
57
+ has_uw_terms: types.boolean(),
58
+ }).transform((v) => {
59
+ return remap$(v, {
60
+ "onboarding_settings": "onboardingSettings",
61
+ "underwriting_settings": "underwritingSettings",
62
+ "has_uw_terms": "hasUwTerms",
63
+ });
64
+ });
65
+
66
+ export function programSettingsResponseDtoFromJSON(
67
+ jsonString: string,
68
+ ): SafeParseResult<ProgramSettingsResponseDto, SDKValidationError> {
69
+ return safeParse(
70
+ jsonString,
71
+ (x) => ProgramSettingsResponseDto$inboundSchema.parse(JSON.parse(x)),
72
+ `Failed to parse 'ProgramSettingsResponseDto' from JSON`,
73
+ );
74
+ }
@@ -0,0 +1,236 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 * as types from "../types/primitives.js";
11
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
12
+ import {
13
+ LmsBusinessType,
14
+ LmsBusinessType$inboundSchema,
15
+ } from "./lmsbusinesstype.js";
16
+ import {
17
+ UnderwritingFlowDto,
18
+ UnderwritingFlowDto$inboundSchema,
19
+ } from "./underwritingflowdto.js";
20
+
21
+ /**
22
+ * Spend capacity setting
23
+ */
24
+ export const ProgramUnderwritingSettingsDtoSpendCapacity = {
25
+ Eighth: "EIGHTH",
26
+ Quarter: "QUARTER",
27
+ Half: "HALF",
28
+ Full: "FULL",
29
+ Double: "DOUBLE",
30
+ Triple: "TRIPLE",
31
+ } as const;
32
+ /**
33
+ * Spend capacity setting
34
+ */
35
+ export type ProgramUnderwritingSettingsDtoSpendCapacity = ClosedEnum<
36
+ typeof ProgramUnderwritingSettingsDtoSpendCapacity
37
+ >;
38
+
39
+ /**
40
+ * Bureau only underwriting allowed
41
+ */
42
+ export const ProgramUnderwritingSettingsDtoBureauOnlyUwAllowed = {
43
+ Yes: "YES",
44
+ No: "NO",
45
+ ManualReview: "MANUAL REVIEW",
46
+ } as const;
47
+ /**
48
+ * Bureau only underwriting allowed
49
+ */
50
+ export type ProgramUnderwritingSettingsDtoBureauOnlyUwAllowed = ClosedEnum<
51
+ typeof ProgramUnderwritingSettingsDtoBureauOnlyUwAllowed
52
+ >;
53
+
54
+ /**
55
+ * Manual review catch setting
56
+ */
57
+ export const ProgramUnderwritingSettingsDtoManualReviewCatch = {
58
+ All: "ALL",
59
+ AllApproved: "ALL_APPROVED",
60
+ None: "NONE",
61
+ } as const;
62
+ /**
63
+ * Manual review catch setting
64
+ */
65
+ export type ProgramUnderwritingSettingsDtoManualReviewCatch = ClosedEnum<
66
+ typeof ProgramUnderwritingSettingsDtoManualReviewCatch
67
+ >;
68
+
69
+ /**
70
+ * Contractual UCC lien setting
71
+ */
72
+ export const ProgramUnderwritingSettingsDtoContractualUccLien = {
73
+ None: "NONE",
74
+ Upfront: "UPFRONT",
75
+ Springing: "SPRINGING",
76
+ } as const;
77
+ /**
78
+ * Contractual UCC lien setting
79
+ */
80
+ export type ProgramUnderwritingSettingsDtoContractualUccLien = ClosedEnum<
81
+ typeof ProgramUnderwritingSettingsDtoContractualUccLien
82
+ >;
83
+
84
+ export type ProgramUnderwritingSettingsDto = {
85
+ /**
86
+ * Mandatory underwriting approved business types
87
+ */
88
+ mandatoryUwApproved?: Array<LmsBusinessType> | undefined;
89
+ /**
90
+ * Spend capacity setting
91
+ */
92
+ spendCapacity?: ProgramUnderwritingSettingsDtoSpendCapacity | undefined;
93
+ /**
94
+ * Product score (0-5)
95
+ */
96
+ productScore?: number | undefined;
97
+ /**
98
+ * Bureau only underwriting allowed
99
+ */
100
+ bureauOnlyUwAllowed?:
101
+ | ProgramUnderwritingSettingsDtoBureauOnlyUwAllowed
102
+ | undefined;
103
+ /**
104
+ * Minimum days on platform required
105
+ */
106
+ minDaysOnPlatformRequired?: number | undefined;
107
+ /**
108
+ * Minimum invoices required
109
+ */
110
+ minInvoicesRequired?: number | undefined;
111
+ /**
112
+ * Average cash underwriting
113
+ */
114
+ avgCashUw?: number | undefined;
115
+ /**
116
+ * Manual review catch setting
117
+ */
118
+ manualReviewCatch?:
119
+ | ProgramUnderwritingSettingsDtoManualReviewCatch
120
+ | undefined;
121
+ /**
122
+ * Whether new customer underwriting is allowed
123
+ */
124
+ newCustomerUwAllowed?: boolean | undefined;
125
+ /**
126
+ * Whether to run underwriting for payee
127
+ */
128
+ runUwPayee?: boolean | undefined;
129
+ /**
130
+ * Underwriting flow configuration
131
+ */
132
+ underwritingFlow?: UnderwritingFlowDto | undefined;
133
+ /**
134
+ * Whether to auto decrease limit
135
+ */
136
+ autoLimitDecrease?: boolean | undefined;
137
+ /**
138
+ * Minimum revenue required
139
+ */
140
+ minRevenue?: number | undefined;
141
+ /**
142
+ * Contractual UCC lien setting
143
+ */
144
+ contractualUccLien?:
145
+ | ProgramUnderwritingSettingsDtoContractualUccLien
146
+ | undefined;
147
+ /**
148
+ * Onboarding terms agreement ID
149
+ */
150
+ onboardingTermsAgreement?: string | undefined;
151
+ /**
152
+ * Whether third party underwriting is enabled
153
+ */
154
+ thirdPartyUnderwrite?: boolean | undefined;
155
+ };
156
+
157
+ /** @internal */
158
+ export const ProgramUnderwritingSettingsDtoSpendCapacity$inboundSchema:
159
+ z.ZodNativeEnum<typeof ProgramUnderwritingSettingsDtoSpendCapacity> = z
160
+ .nativeEnum(ProgramUnderwritingSettingsDtoSpendCapacity);
161
+
162
+ /** @internal */
163
+ export const ProgramUnderwritingSettingsDtoBureauOnlyUwAllowed$inboundSchema:
164
+ z.ZodNativeEnum<typeof ProgramUnderwritingSettingsDtoBureauOnlyUwAllowed> = z
165
+ .nativeEnum(ProgramUnderwritingSettingsDtoBureauOnlyUwAllowed);
166
+
167
+ /** @internal */
168
+ export const ProgramUnderwritingSettingsDtoManualReviewCatch$inboundSchema:
169
+ z.ZodNativeEnum<typeof ProgramUnderwritingSettingsDtoManualReviewCatch> = z
170
+ .nativeEnum(ProgramUnderwritingSettingsDtoManualReviewCatch);
171
+
172
+ /** @internal */
173
+ export const ProgramUnderwritingSettingsDtoContractualUccLien$inboundSchema:
174
+ z.ZodNativeEnum<typeof ProgramUnderwritingSettingsDtoContractualUccLien> = z
175
+ .nativeEnum(ProgramUnderwritingSettingsDtoContractualUccLien);
176
+
177
+ /** @internal */
178
+ export const ProgramUnderwritingSettingsDto$inboundSchema: z.ZodType<
179
+ ProgramUnderwritingSettingsDto,
180
+ z.ZodTypeDef,
181
+ unknown
182
+ > = z.object({
183
+ mandatory_uw_approved: types.optional(z.array(LmsBusinessType$inboundSchema)),
184
+ spend_capacity: types.optional(
185
+ ProgramUnderwritingSettingsDtoSpendCapacity$inboundSchema,
186
+ ),
187
+ product_score: types.optional(types.number()),
188
+ bureau_only_uw_allowed: types.optional(
189
+ ProgramUnderwritingSettingsDtoBureauOnlyUwAllowed$inboundSchema,
190
+ ),
191
+ min_days_on_platform_required: types.optional(types.number()),
192
+ min_invoices_required: types.optional(types.number()),
193
+ avg_cash_uw: types.optional(types.number()),
194
+ manual_review_catch: types.optional(
195
+ ProgramUnderwritingSettingsDtoManualReviewCatch$inboundSchema,
196
+ ),
197
+ new_customer_uw_allowed: types.optional(types.boolean()),
198
+ run_uw_payee: types.optional(types.boolean()),
199
+ underwriting_flow: types.optional(UnderwritingFlowDto$inboundSchema),
200
+ auto_limit_decrease: types.optional(types.boolean()),
201
+ min_revenue: types.optional(types.number()),
202
+ contractual_ucc_lien: types.optional(
203
+ ProgramUnderwritingSettingsDtoContractualUccLien$inboundSchema,
204
+ ),
205
+ onboarding_terms_agreement: types.optional(types.string()),
206
+ third_party_underwrite: types.optional(types.boolean()),
207
+ }).transform((v) => {
208
+ return remap$(v, {
209
+ "mandatory_uw_approved": "mandatoryUwApproved",
210
+ "spend_capacity": "spendCapacity",
211
+ "product_score": "productScore",
212
+ "bureau_only_uw_allowed": "bureauOnlyUwAllowed",
213
+ "min_days_on_platform_required": "minDaysOnPlatformRequired",
214
+ "min_invoices_required": "minInvoicesRequired",
215
+ "avg_cash_uw": "avgCashUw",
216
+ "manual_review_catch": "manualReviewCatch",
217
+ "new_customer_uw_allowed": "newCustomerUwAllowed",
218
+ "run_uw_payee": "runUwPayee",
219
+ "underwriting_flow": "underwritingFlow",
220
+ "auto_limit_decrease": "autoLimitDecrease",
221
+ "min_revenue": "minRevenue",
222
+ "contractual_ucc_lien": "contractualUccLien",
223
+ "onboarding_terms_agreement": "onboardingTermsAgreement",
224
+ "third_party_underwrite": "thirdPartyUnderwrite",
225
+ });
226
+ });
227
+
228
+ export function programUnderwritingSettingsDtoFromJSON(
229
+ jsonString: string,
230
+ ): SafeParseResult<ProgramUnderwritingSettingsDto, SDKValidationError> {
231
+ return safeParse(
232
+ jsonString,
233
+ (x) => ProgramUnderwritingSettingsDto$inboundSchema.parse(JSON.parse(x)),
234
+ `Failed to parse 'ProgramUnderwritingSettingsDto' from JSON`,
235
+ );
236
+ }
@@ -9,6 +9,11 @@ import { ClosedEnum } from "../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../types/fp.js";
10
10
  import * as types from "../types/primitives.js";
11
11
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
12
+ import {
13
+ LmsBusinessType,
14
+ LmsBusinessType$inboundSchema,
15
+ LmsBusinessType$outboundSchema,
16
+ } from "./lmsbusinesstype.js";
12
17
  import {
13
18
  UnderwritingFlowDto,
14
19
  UnderwritingFlowDto$inboundSchema,
@@ -16,16 +21,10 @@ import {
16
21
  UnderwritingFlowDto$outboundSchema,
17
22
  } from "./underwritingflowdto.js";
18
23
 
19
- export const MandatoryUwApproved = {
20
- Payee: "PAYEE",
21
- Payor: "PAYOR",
22
- } as const;
23
- export type MandatoryUwApproved = ClosedEnum<typeof MandatoryUwApproved>;
24
-
25
24
  /**
26
25
  * Spend capacity setting
27
26
  */
28
- export const SpendCapacity = {
27
+ export const UnderwritingSettingsDtoSpendCapacity = {
29
28
  Eighth: "EIGHTH",
30
29
  Quarter: "QUARTER",
31
30
  Half: "HALF",
@@ -36,12 +35,14 @@ export const SpendCapacity = {
36
35
  /**
37
36
  * Spend capacity setting
38
37
  */
39
- export type SpendCapacity = ClosedEnum<typeof SpendCapacity>;
38
+ export type UnderwritingSettingsDtoSpendCapacity = ClosedEnum<
39
+ typeof UnderwritingSettingsDtoSpendCapacity
40
+ >;
40
41
 
41
42
  /**
42
43
  * Bureau only underwriting allowed
43
44
  */
44
- export const BureauOnlyUwAllowed = {
45
+ export const UnderwritingSettingsDtoBureauOnlyUwAllowed = {
45
46
  Yes: "YES",
46
47
  No: "NO",
47
48
  ManualReview: "MANUAL REVIEW",
@@ -49,12 +50,14 @@ export const BureauOnlyUwAllowed = {
49
50
  /**
50
51
  * Bureau only underwriting allowed
51
52
  */
52
- export type BureauOnlyUwAllowed = ClosedEnum<typeof BureauOnlyUwAllowed>;
53
+ export type UnderwritingSettingsDtoBureauOnlyUwAllowed = ClosedEnum<
54
+ typeof UnderwritingSettingsDtoBureauOnlyUwAllowed
55
+ >;
53
56
 
54
57
  /**
55
58
  * Manual review catch setting
56
59
  */
57
- export const ManualReviewCatch = {
60
+ export const UnderwritingSettingsDtoManualReviewCatch = {
58
61
  All: "ALL",
59
62
  AllApproved: "ALL_APPROVED",
60
63
  None: "NONE",
@@ -62,12 +65,14 @@ export const ManualReviewCatch = {
62
65
  /**
63
66
  * Manual review catch setting
64
67
  */
65
- export type ManualReviewCatch = ClosedEnum<typeof ManualReviewCatch>;
68
+ export type UnderwritingSettingsDtoManualReviewCatch = ClosedEnum<
69
+ typeof UnderwritingSettingsDtoManualReviewCatch
70
+ >;
66
71
 
67
72
  /**
68
73
  * Contractual UCC lien setting
69
74
  */
70
- export const ContractualUccLien = {
75
+ export const UnderwritingSettingsDtoContractualUccLien = {
71
76
  None: "NONE",
72
77
  Upfront: "UPFRONT",
73
78
  Springing: "SPRINGING",
@@ -75,17 +80,19 @@ export const ContractualUccLien = {
75
80
  /**
76
81
  * Contractual UCC lien setting
77
82
  */
78
- export type ContractualUccLien = ClosedEnum<typeof ContractualUccLien>;
83
+ export type UnderwritingSettingsDtoContractualUccLien = ClosedEnum<
84
+ typeof UnderwritingSettingsDtoContractualUccLien
85
+ >;
79
86
 
80
87
  export type UnderwritingSettingsDto = {
81
88
  /**
82
89
  * Mandatory underwriting approved business types
83
90
  */
84
- mandatoryUwApproved?: Array<MandatoryUwApproved> | undefined;
91
+ mandatoryUwApproved?: Array<LmsBusinessType> | undefined;
85
92
  /**
86
93
  * Spend capacity setting
87
94
  */
88
- spendCapacity?: SpendCapacity | undefined;
95
+ spendCapacity?: UnderwritingSettingsDtoSpendCapacity | undefined;
89
96
  /**
90
97
  * Product score (0-5)
91
98
  */
@@ -93,7 +100,7 @@ export type UnderwritingSettingsDto = {
93
100
  /**
94
101
  * Bureau only underwriting allowed
95
102
  */
96
- bureauOnlyUwAllowed?: BureauOnlyUwAllowed | undefined;
103
+ bureauOnlyUwAllowed?: UnderwritingSettingsDtoBureauOnlyUwAllowed | undefined;
97
104
  /**
98
105
  * Minimum days on platform required
99
106
  */
@@ -109,7 +116,7 @@ export type UnderwritingSettingsDto = {
109
116
  /**
110
117
  * Manual review catch setting
111
118
  */
112
- manualReviewCatch?: ManualReviewCatch | undefined;
119
+ manualReviewCatch?: UnderwritingSettingsDtoManualReviewCatch | undefined;
113
120
  /**
114
121
  * Whether new customer underwriting is allowed
115
122
  */
@@ -133,7 +140,7 @@ export type UnderwritingSettingsDto = {
133
140
  /**
134
141
  * Contractual UCC lien setting
135
142
  */
136
- contractualUccLien?: ContractualUccLien | undefined;
143
+ contractualUccLien?: UnderwritingSettingsDtoContractualUccLien | undefined;
137
144
  /**
138
145
  * Onboarding terms agreement ID
139
146
  */
@@ -145,49 +152,41 @@ export type UnderwritingSettingsDto = {
145
152
  };
146
153
 
147
154
  /** @internal */
148
- export const MandatoryUwApproved$inboundSchema: z.ZodNativeEnum<
149
- typeof MandatoryUwApproved
150
- > = z.nativeEnum(MandatoryUwApproved);
151
- /** @internal */
152
- export const MandatoryUwApproved$outboundSchema: z.ZodNativeEnum<
153
- typeof MandatoryUwApproved
154
- > = MandatoryUwApproved$inboundSchema;
155
-
156
- /** @internal */
157
- export const SpendCapacity$inboundSchema: z.ZodNativeEnum<
158
- typeof SpendCapacity
159
- > = z.nativeEnum(SpendCapacity);
155
+ export const UnderwritingSettingsDtoSpendCapacity$inboundSchema:
156
+ z.ZodNativeEnum<typeof UnderwritingSettingsDtoSpendCapacity> = z.nativeEnum(
157
+ UnderwritingSettingsDtoSpendCapacity,
158
+ );
160
159
  /** @internal */
161
- export const SpendCapacity$outboundSchema: z.ZodNativeEnum<
162
- typeof SpendCapacity
163
- > = SpendCapacity$inboundSchema;
160
+ export const UnderwritingSettingsDtoSpendCapacity$outboundSchema:
161
+ z.ZodNativeEnum<typeof UnderwritingSettingsDtoSpendCapacity> =
162
+ UnderwritingSettingsDtoSpendCapacity$inboundSchema;
164
163
 
165
164
  /** @internal */
166
- export const BureauOnlyUwAllowed$inboundSchema: z.ZodNativeEnum<
167
- typeof BureauOnlyUwAllowed
168
- > = z.nativeEnum(BureauOnlyUwAllowed);
165
+ export const UnderwritingSettingsDtoBureauOnlyUwAllowed$inboundSchema:
166
+ z.ZodNativeEnum<typeof UnderwritingSettingsDtoBureauOnlyUwAllowed> = z
167
+ .nativeEnum(UnderwritingSettingsDtoBureauOnlyUwAllowed);
169
168
  /** @internal */
170
- export const BureauOnlyUwAllowed$outboundSchema: z.ZodNativeEnum<
171
- typeof BureauOnlyUwAllowed
172
- > = BureauOnlyUwAllowed$inboundSchema;
169
+ export const UnderwritingSettingsDtoBureauOnlyUwAllowed$outboundSchema:
170
+ z.ZodNativeEnum<typeof UnderwritingSettingsDtoBureauOnlyUwAllowed> =
171
+ UnderwritingSettingsDtoBureauOnlyUwAllowed$inboundSchema;
173
172
 
174
173
  /** @internal */
175
- export const ManualReviewCatch$inboundSchema: z.ZodNativeEnum<
176
- typeof ManualReviewCatch
177
- > = z.nativeEnum(ManualReviewCatch);
174
+ export const UnderwritingSettingsDtoManualReviewCatch$inboundSchema:
175
+ z.ZodNativeEnum<typeof UnderwritingSettingsDtoManualReviewCatch> = z
176
+ .nativeEnum(UnderwritingSettingsDtoManualReviewCatch);
178
177
  /** @internal */
179
- export const ManualReviewCatch$outboundSchema: z.ZodNativeEnum<
180
- typeof ManualReviewCatch
181
- > = ManualReviewCatch$inboundSchema;
178
+ export const UnderwritingSettingsDtoManualReviewCatch$outboundSchema:
179
+ z.ZodNativeEnum<typeof UnderwritingSettingsDtoManualReviewCatch> =
180
+ UnderwritingSettingsDtoManualReviewCatch$inboundSchema;
182
181
 
183
182
  /** @internal */
184
- export const ContractualUccLien$inboundSchema: z.ZodNativeEnum<
185
- typeof ContractualUccLien
186
- > = z.nativeEnum(ContractualUccLien);
183
+ export const UnderwritingSettingsDtoContractualUccLien$inboundSchema:
184
+ z.ZodNativeEnum<typeof UnderwritingSettingsDtoContractualUccLien> = z
185
+ .nativeEnum(UnderwritingSettingsDtoContractualUccLien);
187
186
  /** @internal */
188
- export const ContractualUccLien$outboundSchema: z.ZodNativeEnum<
189
- typeof ContractualUccLien
190
- > = ContractualUccLien$inboundSchema;
187
+ export const UnderwritingSettingsDtoContractualUccLien$outboundSchema:
188
+ z.ZodNativeEnum<typeof UnderwritingSettingsDtoContractualUccLien> =
189
+ UnderwritingSettingsDtoContractualUccLien$inboundSchema;
191
190
 
192
191
  /** @internal */
193
192
  export const UnderwritingSettingsDto$inboundSchema: z.ZodType<
@@ -195,22 +194,28 @@ export const UnderwritingSettingsDto$inboundSchema: z.ZodType<
195
194
  z.ZodTypeDef,
196
195
  unknown
197
196
  > = z.object({
198
- mandatory_uw_approved: types.optional(
199
- z.array(MandatoryUwApproved$inboundSchema),
197
+ mandatory_uw_approved: types.optional(z.array(LmsBusinessType$inboundSchema)),
198
+ spend_capacity: types.optional(
199
+ UnderwritingSettingsDtoSpendCapacity$inboundSchema,
200
200
  ),
201
- spend_capacity: types.optional(SpendCapacity$inboundSchema),
202
201
  product_score: types.optional(types.number()),
203
- bureau_only_uw_allowed: types.optional(BureauOnlyUwAllowed$inboundSchema),
202
+ bureau_only_uw_allowed: types.optional(
203
+ UnderwritingSettingsDtoBureauOnlyUwAllowed$inboundSchema,
204
+ ),
204
205
  min_days_on_platform_required: types.optional(types.number()),
205
206
  min_invoices_required: types.optional(types.number()),
206
207
  avg_cash_uw: types.optional(types.number()),
207
- manual_review_catch: types.optional(ManualReviewCatch$inboundSchema),
208
+ manual_review_catch: types.optional(
209
+ UnderwritingSettingsDtoManualReviewCatch$inboundSchema,
210
+ ),
208
211
  new_customer_uw_allowed: types.optional(types.boolean()),
209
212
  run_uw_payee: types.optional(types.boolean()),
210
213
  underwriting_flow: UnderwritingFlowDto$inboundSchema,
211
214
  auto_limit_decrease: types.optional(types.boolean()),
212
215
  min_revenue: types.optional(types.number()),
213
- contractual_ucc_lien: types.optional(ContractualUccLien$inboundSchema),
216
+ contractual_ucc_lien: types.optional(
217
+ UnderwritingSettingsDtoContractualUccLien$inboundSchema,
218
+ ),
214
219
  onboarding_terms_agreement: types.optional(types.string()),
215
220
  third_party_underwrite: types.optional(types.boolean()),
216
221
  }).transform((v) => {
@@ -259,20 +264,23 @@ export const UnderwritingSettingsDto$outboundSchema: z.ZodType<
259
264
  z.ZodTypeDef,
260
265
  UnderwritingSettingsDto
261
266
  > = z.object({
262
- mandatoryUwApproved: z.array(MandatoryUwApproved$outboundSchema).optional(),
263
- spendCapacity: SpendCapacity$outboundSchema.optional(),
267
+ mandatoryUwApproved: z.array(LmsBusinessType$outboundSchema).optional(),
268
+ spendCapacity: UnderwritingSettingsDtoSpendCapacity$outboundSchema.optional(),
264
269
  productScore: z.number().optional(),
265
- bureauOnlyUwAllowed: BureauOnlyUwAllowed$outboundSchema.optional(),
270
+ bureauOnlyUwAllowed: UnderwritingSettingsDtoBureauOnlyUwAllowed$outboundSchema
271
+ .optional(),
266
272
  minDaysOnPlatformRequired: z.number().optional(),
267
273
  minInvoicesRequired: z.number().optional(),
268
274
  avgCashUw: z.number().optional(),
269
- manualReviewCatch: ManualReviewCatch$outboundSchema.optional(),
275
+ manualReviewCatch: UnderwritingSettingsDtoManualReviewCatch$outboundSchema
276
+ .optional(),
270
277
  newCustomerUwAllowed: z.boolean().optional(),
271
278
  runUwPayee: z.boolean().optional(),
272
279
  underwritingFlow: UnderwritingFlowDto$outboundSchema,
273
280
  autoLimitDecrease: z.boolean().optional(),
274
281
  minRevenue: z.number().optional(),
275
- contractualUccLien: ContractualUccLien$outboundSchema.optional(),
282
+ contractualUccLien: UnderwritingSettingsDtoContractualUccLien$outboundSchema
283
+ .optional(),
276
284
  onboardingTermsAgreement: z.string().optional(),
277
285
  thirdPartyUnderwrite: z.boolean().optional(),
278
286
  }).transform((v) => {