@dalmore/api-contracts 0.0.0-dev.4545259 → 0.0.0-dev.4614065

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 (103) hide show
  1. package/common/constants.d.ts +43 -0
  2. package/common/constants.js +77 -0
  3. package/common/constants.js.map +1 -0
  4. package/common/helpers/index.d.ts +27 -0
  5. package/common/helpers/index.js +43 -0
  6. package/common/helpers/index.js.map +1 -1
  7. package/common/types/account.types.js +3 -3
  8. package/common/types/account.types.js.map +1 -1
  9. package/common/types/attribution.types.d.ts +582 -0
  10. package/common/types/attribution.types.js +126 -0
  11. package/common/types/attribution.types.js.map +1 -0
  12. package/common/types/auth.types.d.ts +36 -0
  13. package/common/types/auth.types.js +3 -2
  14. package/common/types/auth.types.js.map +1 -1
  15. package/common/types/cap-table.types.d.ts +172 -0
  16. package/common/types/cap-table.types.js +35 -0
  17. package/common/types/cap-table.types.js.map +1 -1
  18. package/common/types/cart.types.d.ts +3 -0
  19. package/common/types/cart.types.js +1 -0
  20. package/common/types/cart.types.js.map +1 -1
  21. package/common/types/common.types.d.ts +14 -4
  22. package/common/types/common.types.js +13 -3
  23. package/common/types/common.types.js.map +1 -1
  24. package/common/types/comply-advantage-api.types.d.ts +12 -12
  25. package/common/types/csv.types.d.ts +3612 -0
  26. package/common/types/csv.types.js +290 -0
  27. package/common/types/csv.types.js.map +1 -0
  28. package/common/types/disbursements.types.d.ts +134 -19
  29. package/common/types/disbursements.types.js +30 -3
  30. package/common/types/disbursements.types.js.map +1 -1
  31. package/common/types/file.types.d.ts +3 -0
  32. package/common/types/file.types.js +3 -0
  33. package/common/types/file.types.js.map +1 -1
  34. package/common/types/index.d.ts +2 -2
  35. package/common/types/index.js +2 -2
  36. package/common/types/index.js.map +1 -1
  37. package/common/types/individuals.types.d.ts +395 -5
  38. package/common/types/individuals.types.js +9 -12
  39. package/common/types/individuals.types.js.map +1 -1
  40. package/common/types/investor-account.types.js +2 -0
  41. package/common/types/investor-account.types.js.map +1 -1
  42. package/common/types/investors-offering.types.d.ts +8 -0
  43. package/common/types/investors-offering.types.js +1 -0
  44. package/common/types/investors-offering.types.js.map +1 -1
  45. package/common/types/invite.types.d.ts +3 -0
  46. package/common/types/invite.types.js +1 -0
  47. package/common/types/invite.types.js.map +1 -1
  48. package/common/types/issuer-offering.types.d.ts +173 -2
  49. package/common/types/issuer-offering.types.js +11 -22
  50. package/common/types/issuer-offering.types.js.map +1 -1
  51. package/common/types/legal-entity.types.d.ts +39 -1
  52. package/common/types/legal-entity.types.js +8 -5
  53. package/common/types/legal-entity.types.js.map +1 -1
  54. package/common/types/mail-template.types.d.ts +4 -4
  55. package/common/types/notification.types.d.ts +1 -0
  56. package/common/types/notification.types.js +3 -0
  57. package/common/types/notification.types.js.map +1 -1
  58. package/common/types/offering-submission.types.js +1 -1
  59. package/common/types/offering.types.d.ts +20 -10
  60. package/common/types/offering.types.js +32 -3
  61. package/common/types/offering.types.js.map +1 -1
  62. package/common/types/payment-methods.types.d.ts +365 -0
  63. package/common/types/payment-methods.types.js +121 -0
  64. package/common/types/payment-methods.types.js.map +1 -1
  65. package/common/types/reports.types.d.ts +12 -12
  66. package/common/types/state-machine.types.d.ts +3 -3
  67. package/common/types/state-machine.types.js +1 -1
  68. package/common/types/state-machine.types.js.map +1 -1
  69. package/common/types/task.types.d.ts +8 -0
  70. package/common/types/task.types.js +3 -0
  71. package/common/types/task.types.js.map +1 -1
  72. package/common/types/trade-line-item.types.d.ts +24 -0
  73. package/common/types/trade-line-item.types.js +3 -0
  74. package/common/types/trade-line-item.types.js.map +1 -1
  75. package/common/types/trade.types.d.ts +11 -14
  76. package/common/types/trade.types.js +16 -7
  77. package/common/types/trade.types.js.map +1 -1
  78. package/common/types/transaction.types.d.ts +24 -1
  79. package/common/types/transaction.types.js +26 -0
  80. package/common/types/transaction.types.js.map +1 -1
  81. package/common/types/user.types.d.ts +6 -112
  82. package/common/types/user.types.js +5 -26
  83. package/common/types/user.types.js.map +1 -1
  84. package/common/types/zapier.types.d.ts +126 -0
  85. package/common/types/zapier.types.js +247 -0
  86. package/common/types/zapier.types.js.map +1 -0
  87. package/contracts/clients/cart/index.d.ts +3 -0
  88. package/contracts/clients/csv/index.d.ts +1988 -0
  89. package/contracts/clients/csv/index.js +96 -0
  90. package/contracts/clients/csv/index.js.map +1 -0
  91. package/contracts/clients/index.d.ts +3847 -1048
  92. package/contracts/clients/index.js +6 -2
  93. package/contracts/clients/index.js.map +1 -1
  94. package/contracts/clients/individuals/index.d.ts +381 -5
  95. package/contracts/clients/legal-entities/index.d.ts +1 -1
  96. package/contracts/clients/offerings/index.d.ts +2 -2
  97. package/contracts/clients/review/index.d.ts +33 -25
  98. package/contracts/clients/review/index.js +5 -1
  99. package/contracts/clients/review/index.js.map +1 -1
  100. package/contracts/clients/webhooks/index.d.ts +506 -0
  101. package/contracts/clients/webhooks/index.js +118 -0
  102. package/contracts/clients/webhooks/index.js.map +1 -0
  103. package/package.json +1 -1
@@ -0,0 +1,290 @@
1
+ import { z } from 'zod';
2
+ import { extendZodWithOpenApi } from '@anatine/zod-openapi';
3
+ import { InvestorAccountType, AicAccreditationType, StringToBooleanSchema, } from './common.types.js';
4
+ import { investorAccountIdSchema, PostClientInvestorAccountBodySchema, } from './investor-account.types.js';
5
+ import { IndividualRole, PostIndividualBaseObject, aicQuestionnaire, UpdateIndividualBaseObject, individualIdSchema, } from './individuals.types.js';
6
+ import { userIdSchema } from './user.types.js';
7
+ import { RegisterBodyInvestorsBase, IRegisterClientIssuerBodyZod, } from './auth.types.js';
8
+ import { AddressSchema } from './address.types.js';
9
+ import { fileIdSchema } from './file.types.js';
10
+ import { PostKycBodySchema } from './kyc.types.js';
11
+ import { PostIssuerZod } from './issuer.types.js';
12
+ import { issuerIdSchema } from './issuer.types.js';
13
+ import { IOffering } from './offering.types.js';
14
+ import { IAsset } from './asset.types.js';
15
+ import { PostIssuerOfferingBaseObject } from './issuer-offering.types.js';
16
+ extendZodWithOpenApi(z);
17
+ /**
18
+ * Zod schema for CSV validation result (for API contracts)
19
+ */
20
+ export const CsvValidationResultZod = z.object({
21
+ valid: z.boolean(),
22
+ totalRows: z.number(),
23
+ validRows: z.number(),
24
+ invalidRows: z.number(),
25
+ data: z.array(z.record(z.any())),
26
+ errors: z
27
+ .array(z.object({
28
+ row: z.number(),
29
+ issues: z.array(z.string()),
30
+ }))
31
+ .optional(),
32
+ });
33
+ /**
34
+ * Zod schema for created investor account info
35
+ */
36
+ const CreatedInvestorAccountInfoZod = z.object({
37
+ row: z.number(),
38
+ userId: z.string(),
39
+ investorAccountId: z.string(),
40
+ });
41
+ /**
42
+ * Zod schema for created issuer account info
43
+ */
44
+ const CreatedIssuerAccountInfoZod = z.object({
45
+ row: z.number(),
46
+ userId: z.string(),
47
+ accountId: z.string(),
48
+ });
49
+ /**
50
+ * Zod schema for CSV persistence result (for API contracts)
51
+ *
52
+ * Note: With all-or-nothing transactions:
53
+ * - Success returns this schema with all accounts created
54
+ * - Failure returns ExtendedErrorResult with transaction rollback
55
+ * - failedRows removed: always 0 on success, redundant
56
+ *
57
+ * Schema supports both investor and issuer accounts using discriminated union
58
+ */
59
+ export const CsvPersistenceResultZod = z.object({
60
+ totalRows: z.number(),
61
+ successfulRows: z.number(),
62
+ createdAccounts: z.array(z.union([CreatedInvestorAccountInfoZod, CreatedIssuerAccountInfoZod])),
63
+ });
64
+ /**
65
+ * Common schema extensions used across all investor CSV types
66
+ * Extracted to follow DRY principle and avoid code duplication
67
+ */
68
+ const CommonInvestorCsvExtensions = RegisterBodyInvestorsBase.extend({
69
+ site: z
70
+ .string()
71
+ .min(2, 'site is less than 2 characters')
72
+ .max(253, 'site is more than 253 characters')
73
+ .openapi({
74
+ example: 'func.co',
75
+ })
76
+ .optional(),
77
+ })
78
+ .and(PostClientInvestorAccountBodySchema.extend({
79
+ investorAccountType: z.nativeEnum(InvestorAccountType).optional(),
80
+ userId: z
81
+ .lazy(() => {
82
+ return userIdSchema;
83
+ })
84
+ .optional(),
85
+ }))
86
+ .and(PostIndividualBaseObject.extend({
87
+ investorAccountId: z.string().optional(),
88
+ role: z.nativeEnum(IndividualRole).optional(),
89
+ }));
90
+ /**
91
+ * Base schema for INDIVIDUAL investor accounts
92
+ * Includes common registration fields, individual updates, and address
93
+ */
94
+ export const BaseIndividualCsvFields = CommonInvestorCsvExtensions.and(UpdateIndividualBaseObject.omit({
95
+ firstName: true,
96
+ lastName: true,
97
+ }))
98
+ .and(AddressSchema)
99
+ .refine((data) => data.password === data.confirmPassword, {
100
+ message: 'Passwords do not match',
101
+ path: ['confirmPassword'],
102
+ });
103
+ /**
104
+ * Base schema for JOINT investor accounts
105
+ * Extends INDIVIDUAL schema with required second holder fields
106
+ */
107
+ export const BaseJointCsvFields = z
108
+ .object({
109
+ // Second holder fields for JOINT accounts (required for JOINT type)
110
+ secondHolderFirstName: z
111
+ .string()
112
+ .min(2, 'secondHolderFirstName must be at least 2 characters')
113
+ .max(20, 'secondHolderFirstName must be at most 20 characters'),
114
+ secondHolderLastName: z
115
+ .string()
116
+ .min(2, 'secondHolderLastName must be at least 2 characters')
117
+ .max(20, 'secondHolderLastName must be at most 20 characters'),
118
+ secondHolderEmail: z
119
+ .string()
120
+ .email('secondHolderEmail must be a valid email'),
121
+ secondHolderPhone: z.string().min(1, 'secondHolderPhone is required'),
122
+ secondHolderDob: z.coerce
123
+ .date({
124
+ required_error: 'secondHolderDob is required',
125
+ invalid_type_error: 'secondHolderDob must be a valid date',
126
+ })
127
+ .optional(),
128
+ secondHolderDateOfBirth: z.coerce
129
+ .date({
130
+ invalid_type_error: 'secondHolderDateOfBirth must be a valid date',
131
+ })
132
+ .optional(),
133
+ secondHolderSsn: z
134
+ .string()
135
+ .length(9, 'secondHolderSsn must be exactly 9 digits'),
136
+ secondHolderOwnership: z.coerce
137
+ .number({
138
+ required_error: 'secondHolderOwnership is required',
139
+ invalid_type_error: 'secondHolderOwnership must be a number',
140
+ })
141
+ .min(0, 'secondHolderOwnership must be at least 0')
142
+ .max(100, 'secondHolderOwnership must be at most 100'),
143
+ secondHolderIsUsCitizenOrGreenCardHolder: StringToBooleanSchema,
144
+ secondHolderCitizenship: z
145
+ .string()
146
+ .min(1, 'secondHolderCitizenship is required'),
147
+ })
148
+ .and(BaseIndividualCsvFields);
149
+ /**
150
+ * Base schema for LEGAL_ENTITY investor accounts
151
+ * Extends INDIVIDUAL schema with required entity fields and optional second holder (UBO2)
152
+ */
153
+ export const BaseLegalEntityCsvFields = z
154
+ .object({
155
+ // Entity-specific fields (required for LEGAL_ENTITY type)
156
+ entityName: z
157
+ .string()
158
+ .min(2, 'entityName must be at least 2 characters')
159
+ .max(100, 'entityName must be at most 100 characters'),
160
+ ein: z.string().min(1, 'ein is required'),
161
+ companyType: z.string().min(1, 'companyType is required'),
162
+ dateOfIncorporation: z.coerce.date({
163
+ required_error: 'dateOfIncorporation is required',
164
+ invalid_type_error: 'dateOfIncorporation must be a valid date',
165
+ }),
166
+ stateOfIncorporation: z.string().min(1, 'stateOfIncorporation is required'),
167
+ // Second holder fields for LEGAL_ENTITY (optional UBO2)
168
+ secondHolderFirstName: z.string().min(2).max(20).optional(),
169
+ secondHolderLastName: z.string().min(2).max(20).optional(),
170
+ secondHolderEmail: z.string().email().optional(),
171
+ secondHolderPhone: z.string().optional(),
172
+ secondHolderDob: z.coerce.date().optional(),
173
+ secondHolderDateOfBirth: z.coerce.date().optional(),
174
+ secondHolderSsn: z.string().length(9).optional(),
175
+ secondHolderOwnership: z.coerce.number().min(0).max(100).optional(),
176
+ secondHolderIsUsCitizenOrGreenCardHolder: StringToBooleanSchema.optional(),
177
+ secondHolderCitizenship: z.string().optional(),
178
+ })
179
+ .and(BaseIndividualCsvFields);
180
+ // Validation schemas with type discriminators for CSV upload
181
+ export const IndividualCsvSchemaWithType = z
182
+ .object({
183
+ type: z.literal('INDIVIDUAL'),
184
+ })
185
+ .and(BaseIndividualCsvFields);
186
+ export const JointCsvSchemaWithType = z
187
+ .object({
188
+ type: z.literal('JOINT'),
189
+ })
190
+ .and(BaseJointCsvFields);
191
+ export const LegalEntityCsvSchemaWithType = z
192
+ .object({
193
+ type: z.literal('LEGAL_ENTITY'),
194
+ })
195
+ .and(BaseLegalEntityCsvFields);
196
+ /**
197
+ * Base schema for unified CSV that only validates the type field
198
+ * The actual type-specific validation happens in the service layer
199
+ * to avoid duplicate error messages from overlapping field definitions
200
+ */
201
+ export const UnifiedInvestorCsvBaseSchema = z.object({
202
+ type: z.enum(['INDIVIDUAL', 'JOINT', 'LEGAL_ENTITY']),
203
+ });
204
+ /**
205
+ * Zod schema for AIC questionnaire CSV validation
206
+ * Reuses the existing aicQuestionnaire schema from individuals.types.ts
207
+ */
208
+ export const AicQuestionnaireCsvSchema = aicQuestionnaire.shape.AIC_Questionnaire;
209
+ /**
210
+ * Query parameters for investor account CSV upload
211
+ */
212
+ export const UploadInvestorCsvQuery = z.object({
213
+ type: z.nativeEnum(InvestorAccountType),
214
+ });
215
+ /**
216
+ * Query parameters for AIC questionnaire CSV upload
217
+ */
218
+ export const UploadAicCsvQuery = z.object({
219
+ accredited: z.coerce.boolean(),
220
+ aicAccreditationType: z.nativeEnum(AicAccreditationType),
221
+ investorAccountId: investorAccountIdSchema,
222
+ });
223
+ /**
224
+ * KYC CSV row structure
225
+ * Omits file ID fields (kycDocumentFrontFileId, kycDocumentBackFileId, kycSelfieFileId)
226
+ * because they come from query parameters, not the CSV file
227
+ * Accepts string dates for CSV parsing which will be coerced to Date objects
228
+ */
229
+ export const KycCsvSchema = PostKycBodySchema.omit({
230
+ kycDocumentFrontFileId: true,
231
+ kycDocumentBackFileId: true,
232
+ kycSelfieFileId: true,
233
+ }).extend({
234
+ kycDocumentIssuedDate: z.coerce.date(),
235
+ kycDocumentExpirationDate: z.coerce.date(),
236
+ kycDocumentDob: z.coerce.date(),
237
+ });
238
+ /**
239
+ * Query parameters for KYC CSV upload
240
+ */
241
+ export const UploadKycCsvQuery = z.object({
242
+ individualId: individualIdSchema,
243
+ frontFileId: fileIdSchema,
244
+ backFileId: fileIdSchema.optional(),
245
+ selfieFileId: fileIdSchema.optional(),
246
+ });
247
+ /**
248
+ * Base issuer CSV fields schema
249
+ * Combines IRegisterClientIssuerBodyZod and PostIssuerZod with accountName type override
250
+ */
251
+ export const BaseIssuerCsvFields = IRegisterClientIssuerBodyZod.and(PostIssuerZod).and(z.object({
252
+ accountName: z.string().min(2).max(50).optional().openapi({
253
+ example: 'Example Account',
254
+ }),
255
+ }));
256
+ /**
257
+ * Offering CSV row structure with coercion for CSV string values
258
+ * CSV files contain all values as strings, so we need to coerce them to proper types
259
+ */
260
+ export const OfferingCsvSchema = PostIssuerOfferingBaseObject.extend({
261
+ issuerId: issuerIdSchema.optional(),
262
+ targetAmount: z.coerce.number().min(0.01).max(10000000000),
263
+ raiseAmount: z.coerce.number().min(0).max(10000000000).optional(),
264
+ minInvestment: z.coerce.number().min(0).max(10000000000).optional(),
265
+ maxInvestment: z.coerce.number().min(0).max(10000000000).optional(),
266
+ contingencyAmount: z.coerce.number().min(0).max(10000000000).optional(),
267
+ cancellationPeriod: z.coerce.number().min(1).max(30).optional().nullable(),
268
+ active: StringToBooleanSchema.optional(),
269
+ pricePerUnit: z.coerce.number().min(0.01).max(10000000000).nullable(),
270
+ totalUnits: z.coerce.number().min(1).max(10000000000).nullable(),
271
+ yield: z.coerce.number().min(0.01).max(10000000000).nullable().optional(),
272
+ duration: z.coerce.number().min(1).max(1000).nullable().optional(),
273
+ enableBonus: StringToBooleanSchema.optional(),
274
+ interestRate: z.coerce.number().min(0.01).max(100).nullable().optional(),
275
+ });
276
+ /**
277
+ * Query parameters for offering CSV upload
278
+ */
279
+ export const UploadOfferingCsvQuery = z.object({
280
+ issuerId: issuerIdSchema,
281
+ });
282
+ /**
283
+ * Response type for offering CSV upload
284
+ * Returns the full offering object with its assets array
285
+ * Reuses IOffering schema for consistency with other offering endpoints
286
+ */
287
+ export const OfferingCsvResponseZod = z.lazy(() => IOffering.extend({
288
+ assets: z.array(IAsset).optional(),
289
+ }));
290
+ //# sourceMappingURL=csv.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csv.types.js","sourceRoot":"","sources":["csv.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GAEtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,uBAAuB,EACvB,mCAAmC,GACpC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,gBAAgB,EAChB,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAgDxB;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC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AAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAClE,WAAW,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IAC7C,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACzE,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,QAAQ,EAAE,cAAc;CACzB,CAAC,CAAC;AAIH;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAChD,SAAS,CAAC,MAAM,CAAC;IACf,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;CACnC,CAAC,CACH,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { ComplianceReview } from './common.types';
2
+ import { ComplianceReview, UserRole } from './common.types';
3
3
  import { DisbursementAdjustmentType } from './disbursement-adjustment.types';
4
4
  export declare const disbursementIdSchema: z.ZodEffects<z.ZodString, string, string>;
5
5
  export declare enum DisbursementStatus {
@@ -1032,7 +1032,7 @@ export declare const DisbursementsIncludeQuery: z.ZodObject<{
1032
1032
  export interface DisbursementsIncludeQuery extends z.infer<typeof DisbursementsIncludeQuery> {
1033
1033
  }
1034
1034
  export declare const PostDisbursementZod: z.ZodObject<{
1035
- name: z.ZodString;
1035
+ name: z.ZodOptional<z.ZodString>;
1036
1036
  offeringId: z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>;
1037
1037
  issuerId: z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>;
1038
1038
  issuerBankAccountId: z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>;
@@ -1061,12 +1061,10 @@ export declare const PostDisbursementZod: z.ZodObject<{
1061
1061
  type: DisbursementAdjustmentType;
1062
1062
  description: string;
1063
1063
  }[]>;
1064
- escrowAccountId: z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>;
1064
+ escrowAccountId: z.ZodOptional<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>;
1065
1065
  }, "strip", z.ZodTypeAny, {
1066
- name: string;
1067
1066
  offeringId: string;
1068
1067
  issuerId: string;
1069
- escrowAccountId: string;
1070
1068
  tradeIds: string[];
1071
1069
  requestedAmount: number;
1072
1070
  netAmount: number;
@@ -1076,12 +1074,12 @@ export declare const PostDisbursementZod: z.ZodObject<{
1076
1074
  description: string;
1077
1075
  }[];
1078
1076
  issuerBankAccountId: string;
1077
+ name?: string | undefined;
1078
+ escrowAccountId?: string | undefined;
1079
1079
  disbursedAt?: Date | null | undefined;
1080
1080
  }, {
1081
- name: string;
1082
1081
  offeringId: string;
1083
1082
  issuerId: string;
1084
- escrowAccountId: string;
1085
1083
  tradeIds: string[];
1086
1084
  requestedAmount: number;
1087
1085
  netAmount: number;
@@ -1091,11 +1089,13 @@ export declare const PostDisbursementZod: z.ZodObject<{
1091
1089
  description: string;
1092
1090
  }[];
1093
1091
  issuerBankAccountId: string;
1092
+ name?: string | undefined;
1093
+ escrowAccountId?: string | undefined;
1094
1094
  disbursedAt?: string | null | undefined;
1095
1095
  }>;
1096
1096
  export type PostDisbursementZod = z.infer<typeof PostDisbursementZod>;
1097
1097
  export declare const CompliancePostDisbursementZod: z.ZodObject<{
1098
- name: z.ZodString;
1098
+ name: z.ZodOptional<z.ZodString>;
1099
1099
  offeringId: z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>;
1100
1100
  issuerId: z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>;
1101
1101
  issuerBankAccountId: z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>;
@@ -1124,15 +1124,13 @@ export declare const CompliancePostDisbursementZod: z.ZodObject<{
1124
1124
  type: DisbursementAdjustmentType;
1125
1125
  description: string;
1126
1126
  }[]>;
1127
- escrowAccountId: z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>;
1127
+ escrowAccountId: z.ZodOptional<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>;
1128
1128
  } & {
1129
1129
  accountId: z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>;
1130
1130
  }, "strip", z.ZodTypeAny, {
1131
1131
  accountId: string;
1132
- name: string;
1133
1132
  offeringId: string;
1134
1133
  issuerId: string;
1135
- escrowAccountId: string;
1136
1134
  tradeIds: string[];
1137
1135
  requestedAmount: number;
1138
1136
  netAmount: number;
@@ -1142,13 +1140,13 @@ export declare const CompliancePostDisbursementZod: z.ZodObject<{
1142
1140
  description: string;
1143
1141
  }[];
1144
1142
  issuerBankAccountId: string;
1143
+ name?: string | undefined;
1144
+ escrowAccountId?: string | undefined;
1145
1145
  disbursedAt?: Date | null | undefined;
1146
1146
  }, {
1147
1147
  accountId: string;
1148
- name: string;
1149
1148
  offeringId: string;
1150
1149
  issuerId: string;
1151
- escrowAccountId: string;
1152
1150
  tradeIds: string[];
1153
1151
  requestedAmount: number;
1154
1152
  netAmount: number;
@@ -1158,6 +1156,8 @@ export declare const CompliancePostDisbursementZod: z.ZodObject<{
1158
1156
  description: string;
1159
1157
  }[];
1160
1158
  issuerBankAccountId: string;
1159
+ name?: string | undefined;
1160
+ escrowAccountId?: string | undefined;
1161
1161
  disbursedAt?: string | null | undefined;
1162
1162
  }>;
1163
1163
  export type CompliancePostDisbursementZod = z.infer<typeof CompliancePostDisbursementZod>;
@@ -2586,6 +2586,121 @@ export declare const DisbursementDetailZod: z.ZodObject<{
2586
2586
  disbursementTransactions?: any[] | undefined;
2587
2587
  }>;
2588
2588
  export type DisbursementDetailZod = z.infer<typeof DisbursementDetailZod>;
2589
+ export declare const DisbursementApproverZod: z.ZodObject<{
2590
+ name: z.ZodString;
2591
+ email: z.ZodString;
2592
+ reviewedAt: z.ZodNullable<z.ZodDate>;
2593
+ status: z.ZodNativeEnum<typeof DisbursementStatus>;
2594
+ role: z.ZodNativeEnum<typeof UserRole>;
2595
+ }, "strip", z.ZodTypeAny, {
2596
+ status: DisbursementStatus;
2597
+ email: string;
2598
+ name: string;
2599
+ role: UserRole;
2600
+ reviewedAt: Date | null;
2601
+ }, {
2602
+ status: DisbursementStatus;
2603
+ email: string;
2604
+ name: string;
2605
+ role: UserRole;
2606
+ reviewedAt: Date | null;
2607
+ }>;
2608
+ export type DisbursementApproverZod = z.infer<typeof DisbursementApproverZod>;
2609
+ export declare const DisbursementDeclinedBannerZod: z.ZodObject<{
2610
+ disbursementStatus: z.ZodNativeEnum<typeof DisbursementStatus>;
2611
+ declinedByName: z.ZodString;
2612
+ declinedByRole: z.ZodNativeEnum<typeof UserRole>;
2613
+ declinedAt: z.ZodDate;
2614
+ }, "strip", z.ZodTypeAny, {
2615
+ disbursementStatus: DisbursementStatus;
2616
+ declinedByName: string;
2617
+ declinedByRole: UserRole;
2618
+ declinedAt: Date;
2619
+ }, {
2620
+ disbursementStatus: DisbursementStatus;
2621
+ declinedByName: string;
2622
+ declinedByRole: UserRole;
2623
+ declinedAt: Date;
2624
+ }>;
2625
+ export type DisbursementDeclinedBannerZod = z.infer<typeof DisbursementDeclinedBannerZod>;
2626
+ export declare const DisbursementApprovalsTabZod: z.ZodObject<{
2627
+ disbursementId: z.ZodString;
2628
+ disbursementName: z.ZodString;
2629
+ issuerName: z.ZodString;
2630
+ offeringName: z.ZodString;
2631
+ approvers: z.ZodArray<z.ZodObject<{
2632
+ name: z.ZodString;
2633
+ email: z.ZodString;
2634
+ reviewedAt: z.ZodNullable<z.ZodDate>;
2635
+ status: z.ZodNativeEnum<typeof DisbursementStatus>;
2636
+ role: z.ZodNativeEnum<typeof UserRole>;
2637
+ }, "strip", z.ZodTypeAny, {
2638
+ status: DisbursementStatus;
2639
+ email: string;
2640
+ name: string;
2641
+ role: UserRole;
2642
+ reviewedAt: Date | null;
2643
+ }, {
2644
+ status: DisbursementStatus;
2645
+ email: string;
2646
+ name: string;
2647
+ role: UserRole;
2648
+ reviewedAt: Date | null;
2649
+ }>, "many">;
2650
+ declinedBanner: z.ZodNullable<z.ZodObject<{
2651
+ disbursementStatus: z.ZodNativeEnum<typeof DisbursementStatus>;
2652
+ declinedByName: z.ZodString;
2653
+ declinedByRole: z.ZodNativeEnum<typeof UserRole>;
2654
+ declinedAt: z.ZodDate;
2655
+ }, "strip", z.ZodTypeAny, {
2656
+ disbursementStatus: DisbursementStatus;
2657
+ declinedByName: string;
2658
+ declinedByRole: UserRole;
2659
+ declinedAt: Date;
2660
+ }, {
2661
+ disbursementStatus: DisbursementStatus;
2662
+ declinedByName: string;
2663
+ declinedByRole: UserRole;
2664
+ declinedAt: Date;
2665
+ }>>;
2666
+ }, "strip", z.ZodTypeAny, {
2667
+ offeringName: string;
2668
+ issuerName: string;
2669
+ disbursementId: string;
2670
+ disbursementName: string;
2671
+ approvers: {
2672
+ status: DisbursementStatus;
2673
+ email: string;
2674
+ name: string;
2675
+ role: UserRole;
2676
+ reviewedAt: Date | null;
2677
+ }[];
2678
+ declinedBanner: {
2679
+ disbursementStatus: DisbursementStatus;
2680
+ declinedByName: string;
2681
+ declinedByRole: UserRole;
2682
+ declinedAt: Date;
2683
+ } | null;
2684
+ }, {
2685
+ offeringName: string;
2686
+ issuerName: string;
2687
+ disbursementId: string;
2688
+ disbursementName: string;
2689
+ approvers: {
2690
+ status: DisbursementStatus;
2691
+ email: string;
2692
+ name: string;
2693
+ role: UserRole;
2694
+ reviewedAt: Date | null;
2695
+ }[];
2696
+ declinedBanner: {
2697
+ disbursementStatus: DisbursementStatus;
2698
+ declinedByName: string;
2699
+ declinedByRole: UserRole;
2700
+ declinedAt: Date;
2701
+ } | null;
2702
+ }>;
2703
+ export type DisbursementApprovalsTabZod = z.infer<typeof DisbursementApprovalsTabZod>;
2589
2704
  export declare const DisbursementDetailsTabHeaderZod: z.ZodObject<{
2590
2705
  disbursementId: z.ZodEffects<z.ZodString, string, string>;
2591
2706
  disbursementDate: z.ZodNullable<z.ZodDate>;
@@ -2745,8 +2860,8 @@ export declare const DisbursementDetailsTabGeneralInfoZod: z.ZodObject<{
2745
2860
  company?: string | null | undefined;
2746
2861
  } | null;
2747
2862
  offeringId: string;
2748
- issuerName: string;
2749
2863
  offeringName: string;
2864
+ issuerName: string;
2750
2865
  to?: any;
2751
2866
  }, {
2752
2867
  from: {
@@ -2778,8 +2893,8 @@ export declare const DisbursementDetailsTabGeneralInfoZod: z.ZodObject<{
2778
2893
  company?: string | null | undefined;
2779
2894
  } | null;
2780
2895
  offeringId: string;
2781
- issuerName: string;
2782
2896
  offeringName: string;
2897
+ issuerName: string;
2783
2898
  to?: any;
2784
2899
  }>;
2785
2900
  export type DisbursementDetailsTabGeneralInfoZod = z.infer<typeof DisbursementDetailsTabGeneralInfoZod>;
@@ -3072,8 +3187,8 @@ export declare const DisbursementDetailsTabZod: z.ZodObject<{
3072
3187
  company?: string | null | undefined;
3073
3188
  } | null;
3074
3189
  offeringId: string;
3075
- issuerName: string;
3076
3190
  offeringName: string;
3191
+ issuerName: string;
3077
3192
  to?: any;
3078
3193
  }, {
3079
3194
  from: {
@@ -3105,8 +3220,8 @@ export declare const DisbursementDetailsTabZod: z.ZodObject<{
3105
3220
  company?: string | null | undefined;
3106
3221
  } | null;
3107
3222
  offeringId: string;
3108
- issuerName: string;
3109
3223
  offeringName: string;
3224
+ issuerName: string;
3110
3225
  to?: any;
3111
3226
  }>;
3112
3227
  financials: z.ZodObject<{
@@ -3271,8 +3386,8 @@ export declare const DisbursementDetailsTabZod: z.ZodObject<{
3271
3386
  company?: string | null | undefined;
3272
3387
  } | null;
3273
3388
  offeringId: string;
3274
- issuerName: string;
3275
3389
  offeringName: string;
3390
+ issuerName: string;
3276
3391
  to?: any;
3277
3392
  };
3278
3393
  financials: {
@@ -3347,8 +3462,8 @@ export declare const DisbursementDetailsTabZod: z.ZodObject<{
3347
3462
  company?: string | null | undefined;
3348
3463
  } | null;
3349
3464
  offeringId: string;
3350
- issuerName: string;
3351
3465
  offeringName: string;
3466
+ issuerName: string;
3352
3467
  to?: any;
3353
3468
  };
3354
3469
  financials: {
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { IBaseEntity } from './entity.types.js';
3
3
  import { IOffering, offeringIdSchema } from './offering.types.js';
4
- import { AccountZod, BaseStatus, ComplianceReview, dateSchema, IPaginationMeta, } from './common.types.js';
4
+ import { AccountZod, BaseStatus, ComplianceReview, dateSchema, IPaginationMeta, UserRole, } from './common.types.js';
5
5
  import { tradeIdSchema } from './trade.types.js';
6
6
  import { accountIdSchema } from './account.types.js';
7
7
  import { TypeID } from 'typeid-js';
@@ -135,7 +135,7 @@ export const DisbursementsIncludeQuery = z.object({
135
135
  }),
136
136
  });
137
137
  export const PostDisbursementZod = z.object({
138
- name: z.string().max(50).openapi({ example: 'Dalmore' }),
138
+ name: z.string().max(50).optional().openapi({ example: 'Dalmore' }),
139
139
  offeringId: z
140
140
  .lazy(() => offeringIdSchema)
141
141
  .openapi({
@@ -166,7 +166,7 @@ export const PostDisbursementZod = z.object({
166
166
  }, {
167
167
  message: `All disbursement adjustments are required: ${Object.values(DisbursementAdjustmentType).join(', ')}`,
168
168
  }),
169
- escrowAccountId: z.lazy(() => escrowAccountIdSchema),
169
+ escrowAccountId: z.lazy(() => escrowAccountIdSchema).optional(),
170
170
  });
171
171
  export const CompliancePostDisbursementZod = PostDisbursementZod.extend({
172
172
  accountId: z.lazy(() => accountIdSchema),
@@ -345,6 +345,33 @@ export const DisbursementDetailZod = DisbursementZod.extend({
345
345
  disbursementReviews: z.array(z.any()).optional(),
346
346
  disbursementTransactions: z.array(z.any()).optional(),
347
347
  });
348
+ // Single approver object for the approvals tab
349
+ export const DisbursementApproverZod = z.object({
350
+ name: z.string(),
351
+ email: z.string().email(),
352
+ reviewedAt: z.date().nullable(),
353
+ status: z.nativeEnum(DisbursementStatus),
354
+ role: z.nativeEnum(UserRole),
355
+ });
356
+ // Declined banner info (reusable across tabs)
357
+ export const DisbursementDeclinedBannerZod = z.object({
358
+ disbursementStatus: z.nativeEnum(DisbursementStatus),
359
+ declinedByName: z.string(),
360
+ declinedByRole: z.nativeEnum(UserRole),
361
+ declinedAt: z.date(),
362
+ });
363
+ // Complete response for GET /disbursements/:id/approvals
364
+ export const DisbursementApprovalsTabZod = z.object({
365
+ // Disbursement header fields
366
+ disbursementId: z.string(),
367
+ disbursementName: z.string(),
368
+ issuerName: z.string(),
369
+ offeringName: z.string(),
370
+ // Approvers list
371
+ approvers: z.array(DisbursementApproverZod),
372
+ // Declined banner info (nullable if not declined)
373
+ declinedBanner: DisbursementDeclinedBannerZod.nullable(),
374
+ });
348
375
  // Disbursement Details Tab - Read-Only View Schemas (DGP-3181)
349
376
  // Disbursement Header
350
377
  export const DisbursementDetailsTabHeaderZod = z.object({