@dalmore/api-contracts 0.0.0-dev.ada6a86 → 0.0.0-dev.ade8992

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 (73) hide show
  1. package/common/types/account-setting.types.d.ts +17 -66
  2. package/common/types/account-setting.types.js +2 -31
  3. package/common/types/account-setting.types.js.map +1 -1
  4. package/common/types/account.types.d.ts +32 -23
  5. package/common/types/account.types.js +1 -0
  6. package/common/types/account.types.js.map +1 -1
  7. package/common/types/activity.types.d.ts +35 -25
  8. package/common/types/activity.types.js +13 -0
  9. package/common/types/activity.types.js.map +1 -1
  10. package/common/types/asset.types.d.ts +212 -0
  11. package/common/types/asset.types.js +115 -42
  12. package/common/types/asset.types.js.map +1 -1
  13. package/common/types/bonus-tier.types.d.ts +11 -0
  14. package/common/types/bonus-tier.types.js +14 -7
  15. package/common/types/bonus-tier.types.js.map +1 -1
  16. package/common/types/cap-table.types.d.ts +15 -0
  17. package/common/types/cap-table.types.js +17 -0
  18. package/common/types/cap-table.types.js.map +1 -1
  19. package/common/types/common.types.d.ts +326 -5
  20. package/common/types/common.types.js +54 -1
  21. package/common/types/common.types.js.map +1 -1
  22. package/common/types/comply-advantage-api.types.d.ts +133 -466
  23. package/common/types/comply-advantage-api.types.js +24 -3
  24. package/common/types/comply-advantage-api.types.js.map +1 -1
  25. package/common/types/dashboard.types.d.ts +7 -7
  26. package/common/types/data-record.types.d.ts +4 -4
  27. package/common/types/disbursements.types.d.ts +106 -626
  28. package/common/types/disbursements.types.js +3 -0
  29. package/common/types/disbursements.types.js.map +1 -1
  30. package/common/types/escrow-account.types.d.ts +17 -0
  31. package/common/types/escrow-account.types.js +3 -0
  32. package/common/types/escrow-account.types.js.map +1 -1
  33. package/common/types/file.types.d.ts +35 -11
  34. package/common/types/file.types.js +11 -0
  35. package/common/types/file.types.js.map +1 -1
  36. package/common/types/index.d.ts +2 -0
  37. package/common/types/index.js +2 -0
  38. package/common/types/index.js.map +1 -1
  39. package/common/types/individuals.types.js +5 -2
  40. package/common/types/individuals.types.js.map +1 -1
  41. package/common/types/issuer-bank-account.types.d.ts +4 -276
  42. package/common/types/issuer-offering.types.d.ts +664 -5
  43. package/common/types/issuer-offering.types.js +128 -17
  44. package/common/types/issuer-offering.types.js.map +1 -1
  45. package/common/types/job-item.types.d.ts +14 -14
  46. package/common/types/note.types.d.ts +15 -15
  47. package/common/types/offering-submission.types.d.ts +198 -0
  48. package/common/types/offering-submission.types.js +16 -3
  49. package/common/types/offering-submission.types.js.map +1 -1
  50. package/common/types/offering.types.d.ts +323 -1
  51. package/common/types/offering.types.js +128 -11
  52. package/common/types/offering.types.js.map +1 -1
  53. package/common/types/reports.types.d.ts +345 -0
  54. package/common/types/reports.types.js +69 -0
  55. package/common/types/reports.types.js.map +1 -0
  56. package/common/types/signer.types.d.ts +8 -8
  57. package/common/types/site.types.d.ts +5 -0
  58. package/common/types/task.types.d.ts +22 -22
  59. package/common/types/trade.types.d.ts +2 -0
  60. package/common/types/trade.types.js +2 -0
  61. package/common/types/trade.types.js.map +1 -1
  62. package/common/types/transaction.types.d.ts +80 -1
  63. package/common/types/transaction.types.js +22 -2
  64. package/common/types/transaction.types.js.map +1 -1
  65. package/common/types/user.types.d.ts +97 -59
  66. package/common/types/user.types.js +5 -1
  67. package/common/types/user.types.js.map +1 -1
  68. package/contracts/clients/assets/index.d.ts +22 -0
  69. package/contracts/clients/files/index.d.ts +3 -3
  70. package/contracts/clients/files-public/index.d.ts +3 -3
  71. package/contracts/clients/index.d.ts +248 -10
  72. package/contracts/clients/offerings/index.d.ts +220 -4
  73. package/package.json +1 -1
@@ -225,6 +225,47 @@ export declare const PatchOffering: z.ZodObject<{
225
225
  template: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNativeEnum<typeof AssetTemplateType>>>>;
226
226
  tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
227
227
  enableBonus: z.ZodOptional<z.ZodBoolean>;
228
+ interestRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
229
+ bonusTiers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
230
+ type: z.ZodNativeEnum<typeof import("./bonus-tier.types").BonusType>;
231
+ value: z.ZodEffects<z.ZodNumber, number, number>;
232
+ startAmount: z.ZodEffects<z.ZodNumber, number, number>;
233
+ endAmount: z.ZodEffects<z.ZodNumber, number, number>;
234
+ }, "strip", z.ZodTypeAny, {
235
+ value: number;
236
+ type: import("./bonus-tier.types").BonusType;
237
+ startAmount: number;
238
+ endAmount: number;
239
+ }, {
240
+ value: number;
241
+ type: import("./bonus-tier.types").BonusType;
242
+ startAmount: number;
243
+ endAmount: number;
244
+ }>, {
245
+ value: number;
246
+ type: import("./bonus-tier.types").BonusType;
247
+ startAmount: number;
248
+ endAmount: number;
249
+ }, {
250
+ value: number;
251
+ type: import("./bonus-tier.types").BonusType;
252
+ startAmount: number;
253
+ endAmount: number;
254
+ }>, {
255
+ value: number;
256
+ type: import("./bonus-tier.types").BonusType;
257
+ startAmount: number;
258
+ endAmount: number;
259
+ }, {
260
+ value: number;
261
+ type: import("./bonus-tier.types").BonusType;
262
+ startAmount: number;
263
+ endAmount: number;
264
+ }>, "many">>;
265
+ hasEscrow: z.ZodOptional<z.ZodBoolean>;
266
+ bankAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
267
+ escrowAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
268
+ escrowAgreementFileId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
228
269
  }, "strip", z.ZodTypeAny, {
229
270
  platformSettings: string | null;
230
271
  type?: OfferingType | undefined;
@@ -248,6 +289,10 @@ export declare const PatchOffering: z.ZodObject<{
248
289
  memorandumId?: string | null | undefined;
249
290
  subscriptionAgreementId?: string | null | undefined;
250
291
  showTotalRaised?: boolean | undefined;
292
+ hasEscrow?: boolean | undefined;
293
+ escrowAgreementFileId?: string | null | undefined;
294
+ bankAccountId?: string | null | undefined;
295
+ escrowAccountId?: string | null | undefined;
251
296
  assetName?: string | undefined;
252
297
  assetType?: AssetType | undefined;
253
298
  pricePerUnit?: number | null | undefined;
@@ -257,6 +302,13 @@ export declare const PatchOffering: z.ZodObject<{
257
302
  durationType?: DurationType | null | undefined;
258
303
  tiers?: number[] | null | undefined;
259
304
  enableBonus?: boolean | undefined;
305
+ interestRate?: number | null | undefined;
306
+ bonusTiers?: {
307
+ value: number;
308
+ type: import("./bonus-tier.types").BonusType;
309
+ startAmount: number;
310
+ endAmount: number;
311
+ }[] | undefined;
260
312
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
261
313
  subscriptionAgreementTemplateId?: string | null | undefined;
262
314
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -288,6 +340,10 @@ export declare const PatchOffering: z.ZodObject<{
288
340
  memorandumId?: string | null | undefined;
289
341
  subscriptionAgreementId?: string | null | undefined;
290
342
  showTotalRaised?: boolean | undefined;
343
+ hasEscrow?: boolean | undefined;
344
+ escrowAgreementFileId?: string | null | undefined;
345
+ bankAccountId?: string | null | undefined;
346
+ escrowAccountId?: string | null | undefined;
291
347
  assetName?: string | undefined;
292
348
  assetType?: AssetType | undefined;
293
349
  pricePerUnit?: number | null | undefined;
@@ -297,11 +353,60 @@ export declare const PatchOffering: z.ZodObject<{
297
353
  durationType?: DurationType | null | undefined;
298
354
  tiers?: number[] | null | undefined;
299
355
  enableBonus?: boolean | undefined;
356
+ interestRate?: number | null | undefined;
357
+ bonusTiers?: {
358
+ value: number;
359
+ type: import("./bonus-tier.types").BonusType;
360
+ startAmount: number;
361
+ endAmount: number;
362
+ }[] | undefined;
300
363
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
301
364
  subscriptionAgreementTemplateId?: string | null | undefined;
302
365
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
303
366
  }>;
304
367
  export type PatchOffering = z.infer<typeof PatchOffering>;
368
+ /**
369
+ * Optional params for resolveAndValidateOfferingUpdateFields.
370
+ * All fields are optional and nullable; resolution merges with offering/asset values.
371
+ */
372
+ export declare const ResolveOfferingUpdateFieldsParamsZod: z.ZodObject<{
373
+ minInvestment: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
374
+ maxInvestment: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
375
+ targetAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
376
+ pricePerUnit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
377
+ }, "strip", z.ZodTypeAny, {
378
+ targetAmount?: number | null | undefined;
379
+ minInvestment?: number | null | undefined;
380
+ maxInvestment?: number | null | undefined;
381
+ pricePerUnit?: number | null | undefined;
382
+ }, {
383
+ targetAmount?: number | null | undefined;
384
+ minInvestment?: number | null | undefined;
385
+ maxInvestment?: number | null | undefined;
386
+ pricePerUnit?: number | null | undefined;
387
+ }>;
388
+ export type ResolveOfferingUpdateFieldsParams = z.infer<typeof ResolveOfferingUpdateFieldsParamsZod>;
389
+ /**
390
+ * Resolved, validated offering update fields (price per unit, target amount, min/max investment).
391
+ * Returned by resolveAndValidateOfferingUpdateFields and passed into validateBonusTiersForUpdate.
392
+ */
393
+ export declare const ResolvedOfferingUpdateFieldsZod: z.ZodObject<{
394
+ pricePerUnit: z.ZodNumber;
395
+ targetAmount: z.ZodNumber;
396
+ minInvestment: z.ZodNullable<z.ZodNumber>;
397
+ maxInvestment: z.ZodNullable<z.ZodNumber>;
398
+ }, "strip", z.ZodTypeAny, {
399
+ targetAmount: number;
400
+ minInvestment: number | null;
401
+ maxInvestment: number | null;
402
+ pricePerUnit: number;
403
+ }, {
404
+ targetAmount: number;
405
+ minInvestment: number | null;
406
+ maxInvestment: number | null;
407
+ pricePerUnit: number;
408
+ }>;
409
+ export type ResolvedOfferingUpdateFields = z.infer<typeof ResolvedOfferingUpdateFieldsZod>;
305
410
  export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
306
411
  name: z.ZodOptional<z.ZodString>;
307
412
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -359,6 +464,46 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
359
464
  template: z.ZodDefault<z.ZodNativeEnum<typeof AssetTemplateType>>;
360
465
  tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
361
466
  enableBonus: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
467
+ hasEscrow: z.ZodOptional<z.ZodBoolean>;
468
+ bankAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
469
+ escrowAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
470
+ interestRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
471
+ bonusTiers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
472
+ type: z.ZodNativeEnum<typeof import("./bonus-tier.types").BonusType>;
473
+ value: z.ZodEffects<z.ZodNumber, number, number>;
474
+ startAmount: z.ZodEffects<z.ZodNumber, number, number>;
475
+ endAmount: z.ZodEffects<z.ZodNumber, number, number>;
476
+ }, "strip", z.ZodTypeAny, {
477
+ value: number;
478
+ type: import("./bonus-tier.types").BonusType;
479
+ startAmount: number;
480
+ endAmount: number;
481
+ }, {
482
+ value: number;
483
+ type: import("./bonus-tier.types").BonusType;
484
+ startAmount: number;
485
+ endAmount: number;
486
+ }>, {
487
+ value: number;
488
+ type: import("./bonus-tier.types").BonusType;
489
+ startAmount: number;
490
+ endAmount: number;
491
+ }, {
492
+ value: number;
493
+ type: import("./bonus-tier.types").BonusType;
494
+ startAmount: number;
495
+ endAmount: number;
496
+ }>, {
497
+ value: number;
498
+ type: import("./bonus-tier.types").BonusType;
499
+ startAmount: number;
500
+ endAmount: number;
501
+ }, {
502
+ value: number;
503
+ type: import("./bonus-tier.types").BonusType;
504
+ startAmount: number;
505
+ endAmount: number;
506
+ }>, "many">>;
362
507
  }, "strip", z.ZodTypeAny, {
363
508
  accountId: string;
364
509
  template: AssetTemplateType;
@@ -387,11 +532,21 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
387
532
  memorandumId?: string | null | undefined;
388
533
  subscriptionAgreementId?: string | null | undefined;
389
534
  showTotalRaised?: boolean | undefined;
535
+ hasEscrow?: boolean | undefined;
536
+ bankAccountId?: string | null | undefined;
537
+ escrowAccountId?: string | null | undefined;
390
538
  yield?: number | null | undefined;
391
539
  duration?: number | null | undefined;
392
540
  durationType?: DurationType | null | undefined;
393
541
  tiers?: number[] | null | undefined;
394
542
  enableBonus?: boolean | undefined;
543
+ interestRate?: number | null | undefined;
544
+ bonusTiers?: {
545
+ value: number;
546
+ type: import("./bonus-tier.types").BonusType;
547
+ startAmount: number;
548
+ endAmount: number;
549
+ }[] | undefined;
395
550
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
396
551
  subscriptionAgreementTemplateId?: string | null | undefined;
397
552
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -428,11 +583,21 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
428
583
  memorandumId?: string | null | undefined;
429
584
  subscriptionAgreementId?: string | null | undefined;
430
585
  showTotalRaised?: boolean | undefined;
586
+ hasEscrow?: boolean | undefined;
587
+ bankAccountId?: string | null | undefined;
588
+ escrowAccountId?: string | null | undefined;
431
589
  yield?: number | null | undefined;
432
590
  duration?: number | null | undefined;
433
591
  durationType?: DurationType | null | undefined;
434
592
  tiers?: number[] | null | undefined;
435
593
  enableBonus?: boolean | undefined;
594
+ interestRate?: number | null | undefined;
595
+ bonusTiers?: {
596
+ value: number;
597
+ type: import("./bonus-tier.types").BonusType;
598
+ startAmount: number;
599
+ endAmount: number;
600
+ }[] | undefined;
436
601
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
437
602
  subscriptionAgreementTemplateId?: string | null | undefined;
438
603
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -464,11 +629,21 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
464
629
  memorandumId?: string | null | undefined;
465
630
  subscriptionAgreementId?: string | null | undefined;
466
631
  showTotalRaised?: boolean | undefined;
632
+ hasEscrow?: boolean | undefined;
633
+ bankAccountId?: string | null | undefined;
634
+ escrowAccountId?: string | null | undefined;
467
635
  yield?: number | null | undefined;
468
636
  duration?: number | null | undefined;
469
637
  durationType?: DurationType | null | undefined;
470
638
  tiers?: number[] | null | undefined;
471
639
  enableBonus?: boolean | undefined;
640
+ interestRate?: number | null | undefined;
641
+ bonusTiers?: {
642
+ value: number;
643
+ type: import("./bonus-tier.types").BonusType;
644
+ startAmount: number;
645
+ endAmount: number;
646
+ }[] | undefined;
472
647
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
473
648
  subscriptionAgreementTemplateId?: string | null | undefined;
474
649
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -505,17 +680,27 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
505
680
  memorandumId?: string | null | undefined;
506
681
  subscriptionAgreementId?: string | null | undefined;
507
682
  showTotalRaised?: boolean | undefined;
683
+ hasEscrow?: boolean | undefined;
684
+ bankAccountId?: string | null | undefined;
685
+ escrowAccountId?: string | null | undefined;
508
686
  yield?: number | null | undefined;
509
687
  duration?: number | null | undefined;
510
688
  durationType?: DurationType | null | undefined;
511
689
  tiers?: number[] | null | undefined;
512
690
  enableBonus?: boolean | undefined;
691
+ interestRate?: number | null | undefined;
692
+ bonusTiers?: {
693
+ value: number;
694
+ type: import("./bonus-tier.types").BonusType;
695
+ startAmount: number;
696
+ endAmount: number;
697
+ }[] | undefined;
513
698
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
514
699
  subscriptionAgreementTemplateId?: string | null | undefined;
515
700
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
516
701
  }>;
517
702
  export type PostComplianceOffering = z.infer<typeof PostComplianceOffering>;
518
- export declare const offeringsInclude: z.ZodEnum<["account", "issuer", "trades", "assets", "disbursements", "draftVersion", "publishedVersion", "revisions", "onboardingReviewedBy"]>;
703
+ export declare const offeringsInclude: z.ZodEnum<["account", "issuer", "trades", "assets", "disbursements", "draftVersion", "publishedVersion", "revisions", "onboardingReviewedBy", "bankAccount", "escrowAccount"]>;
519
704
  /**
520
705
  * @description Query parameters for including related entities
521
706
  * @xample in contract us as -> query: z.object({}).merge(UsersIncludeQuery),
@@ -1064,6 +1249,47 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1064
1249
  template: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNativeEnum<typeof AssetTemplateType>>>>;
1065
1250
  tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
1066
1251
  enableBonus: z.ZodOptional<z.ZodBoolean>;
1252
+ interestRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1253
+ bonusTiers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
1254
+ type: z.ZodNativeEnum<typeof import("./bonus-tier.types").BonusType>;
1255
+ value: z.ZodEffects<z.ZodNumber, number, number>;
1256
+ startAmount: z.ZodEffects<z.ZodNumber, number, number>;
1257
+ endAmount: z.ZodEffects<z.ZodNumber, number, number>;
1258
+ }, "strip", z.ZodTypeAny, {
1259
+ value: number;
1260
+ type: import("./bonus-tier.types").BonusType;
1261
+ startAmount: number;
1262
+ endAmount: number;
1263
+ }, {
1264
+ value: number;
1265
+ type: import("./bonus-tier.types").BonusType;
1266
+ startAmount: number;
1267
+ endAmount: number;
1268
+ }>, {
1269
+ value: number;
1270
+ type: import("./bonus-tier.types").BonusType;
1271
+ startAmount: number;
1272
+ endAmount: number;
1273
+ }, {
1274
+ value: number;
1275
+ type: import("./bonus-tier.types").BonusType;
1276
+ startAmount: number;
1277
+ endAmount: number;
1278
+ }>, {
1279
+ value: number;
1280
+ type: import("./bonus-tier.types").BonusType;
1281
+ startAmount: number;
1282
+ endAmount: number;
1283
+ }, {
1284
+ value: number;
1285
+ type: import("./bonus-tier.types").BonusType;
1286
+ startAmount: number;
1287
+ endAmount: number;
1288
+ }>, "many">>;
1289
+ hasEscrow: z.ZodOptional<z.ZodBoolean>;
1290
+ bankAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
1291
+ escrowAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
1292
+ escrowAgreementFileId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
1067
1293
  }, "strip", z.ZodTypeAny, {
1068
1294
  platformSettings: string | null;
1069
1295
  type?: OfferingType | undefined;
@@ -1087,6 +1313,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1087
1313
  memorandumId?: string | null | undefined;
1088
1314
  subscriptionAgreementId?: string | null | undefined;
1089
1315
  showTotalRaised?: boolean | undefined;
1316
+ hasEscrow?: boolean | undefined;
1317
+ escrowAgreementFileId?: string | null | undefined;
1318
+ bankAccountId?: string | null | undefined;
1319
+ escrowAccountId?: string | null | undefined;
1090
1320
  assetName?: string | undefined;
1091
1321
  assetType?: AssetType | undefined;
1092
1322
  pricePerUnit?: number | null | undefined;
@@ -1096,6 +1326,13 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1096
1326
  durationType?: DurationType | null | undefined;
1097
1327
  tiers?: number[] | null | undefined;
1098
1328
  enableBonus?: boolean | undefined;
1329
+ interestRate?: number | null | undefined;
1330
+ bonusTiers?: {
1331
+ value: number;
1332
+ type: import("./bonus-tier.types").BonusType;
1333
+ startAmount: number;
1334
+ endAmount: number;
1335
+ }[] | undefined;
1099
1336
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1100
1337
  subscriptionAgreementTemplateId?: string | null | undefined;
1101
1338
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -1127,6 +1364,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1127
1364
  memorandumId?: string | null | undefined;
1128
1365
  subscriptionAgreementId?: string | null | undefined;
1129
1366
  showTotalRaised?: boolean | undefined;
1367
+ hasEscrow?: boolean | undefined;
1368
+ escrowAgreementFileId?: string | null | undefined;
1369
+ bankAccountId?: string | null | undefined;
1370
+ escrowAccountId?: string | null | undefined;
1130
1371
  assetName?: string | undefined;
1131
1372
  assetType?: AssetType | undefined;
1132
1373
  pricePerUnit?: number | null | undefined;
@@ -1136,6 +1377,13 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1136
1377
  durationType?: DurationType | null | undefined;
1137
1378
  tiers?: number[] | null | undefined;
1138
1379
  enableBonus?: boolean | undefined;
1380
+ interestRate?: number | null | undefined;
1381
+ bonusTiers?: {
1382
+ value: number;
1383
+ type: import("./bonus-tier.types").BonusType;
1384
+ startAmount: number;
1385
+ endAmount: number;
1386
+ }[] | undefined;
1139
1387
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1140
1388
  subscriptionAgreementTemplateId?: string | null | undefined;
1141
1389
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -1393,6 +1641,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1393
1641
  memorandumId?: string | null | undefined;
1394
1642
  subscriptionAgreementId?: string | null | undefined;
1395
1643
  showTotalRaised?: boolean | undefined;
1644
+ hasEscrow?: boolean | undefined;
1645
+ escrowAgreementFileId?: string | null | undefined;
1646
+ bankAccountId?: string | null | undefined;
1647
+ escrowAccountId?: string | null | undefined;
1396
1648
  assetName?: string | undefined;
1397
1649
  assetType?: AssetType | undefined;
1398
1650
  pricePerUnit?: number | null | undefined;
@@ -1402,6 +1654,13 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1402
1654
  durationType?: DurationType | null | undefined;
1403
1655
  tiers?: number[] | null | undefined;
1404
1656
  enableBonus?: boolean | undefined;
1657
+ interestRate?: number | null | undefined;
1658
+ bonusTiers?: {
1659
+ value: number;
1660
+ type: import("./bonus-tier.types").BonusType;
1661
+ startAmount: number;
1662
+ endAmount: number;
1663
+ }[] | undefined;
1405
1664
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1406
1665
  subscriptionAgreementTemplateId?: string | null | undefined;
1407
1666
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -1444,6 +1703,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1444
1703
  memorandumId?: string | null | undefined;
1445
1704
  subscriptionAgreementId?: string | null | undefined;
1446
1705
  showTotalRaised?: boolean | undefined;
1706
+ hasEscrow?: boolean | undefined;
1707
+ escrowAgreementFileId?: string | null | undefined;
1708
+ bankAccountId?: string | null | undefined;
1709
+ escrowAccountId?: string | null | undefined;
1447
1710
  assetName?: string | undefined;
1448
1711
  assetType?: AssetType | undefined;
1449
1712
  pricePerUnit?: number | null | undefined;
@@ -1453,6 +1716,13 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1453
1716
  durationType?: DurationType | null | undefined;
1454
1717
  tiers?: number[] | null | undefined;
1455
1718
  enableBonus?: boolean | undefined;
1719
+ interestRate?: number | null | undefined;
1720
+ bonusTiers?: {
1721
+ value: number;
1722
+ type: import("./bonus-tier.types").BonusType;
1723
+ startAmount: number;
1724
+ endAmount: number;
1725
+ }[] | undefined;
1456
1726
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1457
1727
  subscriptionAgreementTemplateId?: string | null | undefined;
1458
1728
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -2333,3 +2603,55 @@ export declare const IPaginatedOnboardingOfferingSummaryResponse: z.ZodObject<{
2333
2603
  };
2334
2604
  }>;
2335
2605
  export type IPaginatedOnboardingOfferingSummaryResponse = z.infer<typeof IPaginatedOnboardingOfferingSummaryResponse>;
2606
+ /**
2607
+ * Maps asset types to fields that should be reset (nullified) when converting
2608
+ * from one asset type to another. This ensures incompatible fields from the
2609
+ * previous type are cleared when the asset type changes.
2610
+ */
2611
+ export declare const ESCROW_ENABLED_OFFERING_FIELD_RESETS: Partial<IOffering>;
2612
+ /**
2613
+ * Schema for escrow validation data input
2614
+ */
2615
+ export declare const EscrowValidationDataZod: z.ZodObject<{
2616
+ hasEscrow: z.ZodOptional<z.ZodBoolean>;
2617
+ bankAccountId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2618
+ escrowAccountId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2619
+ escrowAgreementFileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2620
+ }, "strip", z.ZodTypeAny, {
2621
+ hasEscrow?: boolean | undefined;
2622
+ escrowAgreementFileId?: string | null | undefined;
2623
+ bankAccountId?: string | null | undefined;
2624
+ escrowAccountId?: string | null | undefined;
2625
+ }, {
2626
+ hasEscrow?: boolean | undefined;
2627
+ escrowAgreementFileId?: string | null | undefined;
2628
+ bankAccountId?: string | null | undefined;
2629
+ escrowAccountId?: string | null | undefined;
2630
+ }>;
2631
+ export type EscrowValidationData = z.infer<typeof EscrowValidationDataZod>;
2632
+ /**
2633
+ * Schema for escrow validation context
2634
+ */
2635
+ export declare const EscrowValidationContextZod: z.ZodObject<{
2636
+ accountId: z.ZodString;
2637
+ issuerId: z.ZodString;
2638
+ offeringId: z.ZodString;
2639
+ currentBankAccountId: z.ZodNullable<z.ZodString>;
2640
+ currentEscrowAccountId: z.ZodNullable<z.ZodString>;
2641
+ currentEscrowAgreementFileId: z.ZodNullable<z.ZodString>;
2642
+ }, "strip", z.ZodTypeAny, {
2643
+ accountId: string;
2644
+ offeringId: string;
2645
+ issuerId: string;
2646
+ currentBankAccountId: string | null;
2647
+ currentEscrowAccountId: string | null;
2648
+ currentEscrowAgreementFileId: string | null;
2649
+ }, {
2650
+ accountId: string;
2651
+ offeringId: string;
2652
+ issuerId: string;
2653
+ currentBankAccountId: string | null;
2654
+ currentEscrowAccountId: string | null;
2655
+ currentEscrowAgreementFileId: string | null;
2656
+ }>;
2657
+ export type EscrowValidationContext = z.infer<typeof EscrowValidationContextZod>;
@@ -2,13 +2,16 @@ import { extendZodWithOpenApi } from '@anatine/zod-openapi';
2
2
  import { TypeID } from 'typeid-js';
3
3
  import { z } from 'zod';
4
4
  import { accountIdSchema } from './account.types.js';
5
- import { AccountZod, ComplianceReview, dateSchema, IPaginationMeta, OfferingType, ManagedByType, PaginationOptionsZod, UrlSchema, SortOrder, SortBy, OfferingVersioningType, OfferingOnboardingStatus, AssetType, DurationType, StringToBooleanSchema, } from './common.types.js';
5
+ import { AccountZod, ComplianceReview, dateSchema, IPaginationMeta, OfferingType, ManagedByType, PaginationOptionsZod, UrlSchema, SortOrder, SortBy, OfferingVersioningType, OfferingOnboardingStatus, AssetType, DurationType, StringToBooleanSchema, HttpMethod, } from './common.types.js';
6
6
  import { IBaseEntity } from './entity.types.js';
7
7
  import { fileIdSchema, FileZod } from './file.types.js';
8
8
  import { IIssuer, issuerIdSchema } from './issuer.types.js';
9
9
  import { InvestorsOfferingFiltersZod, InvestorsOfferingsIncludeQuery, } from './investors-offering.types.js';
10
- import { OfferingStatus } from './issuer-offering.types.js';
10
+ import { OfferingStatus, escrowValidationRefinement, postOfferingRefinement, } from './issuer-offering.types.js';
11
11
  import { postAssetRefinement, AssetTemplateType } from './asset.types.js';
12
+ import { IIssuerBankAccount, issuerBankAccountIdSchema, } from './issuer-bank-account.types.js';
13
+ import { escrowAccountIdSchema, IEscrowAccount } from './escrow-account.types.js';
14
+ import { BonusTierListZod, postBonusTierRefinement } from './bonus-tier.types.js';
12
15
  export var OfferingFeeType;
13
16
  (function (OfferingFeeType) {
14
17
  OfferingFeeType["FIXED"] = "FIXED";
@@ -82,6 +85,18 @@ export const IOffering = IBaseEntity.extend({
82
85
  managedBy: z.nativeEnum(ManagedByType).nullable(),
83
86
  valuationCap: z.number().nullable(),
84
87
  showTotalRaised: z.boolean().optional(),
88
+ hasEscrow: z.boolean().optional(),
89
+ escrowAgreementFileId: z.string().nullable().optional(),
90
+ bankAccountId: z.string().nullable().optional(),
91
+ bankAccount: z
92
+ .lazy(() => IIssuerBankAccount)
93
+ .nullable()
94
+ .optional(),
95
+ escrowAccountId: z.string().nullable().optional(),
96
+ escrowAccount: z
97
+ .lazy(() => IEscrowAccount)
98
+ .nullable()
99
+ .optional(),
85
100
  });
86
101
  export const IPaginatedOffering = z.object({
87
102
  items: z.array(IOffering),
@@ -141,7 +156,7 @@ export const PatchOfferingBase = z.object({
141
156
  .nullable()
142
157
  .optional(),
143
158
  jointSubscriptionAgreementTemplateId: z.string().optional().nullable(),
144
- cancellationPeriod: z.number().min(2).max(5).optional().nullable(),
159
+ cancellationPeriod: z.number().min(1).max(30).optional().nullable(),
145
160
  showTotalRaised: z.boolean().optional(),
146
161
  issuerId: issuerIdSchema.optional(),
147
162
  });
@@ -197,7 +212,48 @@ export const PatchOffering = PatchOfferingBase.merge(z.object({
197
212
  .optional(),
198
213
  tiers: z.array(z.number().positive()).nullable().optional(),
199
214
  enableBonus: z.boolean().optional(),
215
+ interestRate: z
216
+ .number()
217
+ .min(0.01)
218
+ .max(100)
219
+ .nullable()
220
+ .optional()
221
+ .openapi({ example: 10 }),
222
+ bonusTiers: BonusTierListZod.optional(),
223
+ hasEscrow: z.boolean().optional(),
224
+ bankAccountId: z
225
+ .lazy(() => issuerBankAccountIdSchema)
226
+ .nullable()
227
+ .optional(),
228
+ escrowAccountId: z
229
+ .lazy(() => escrowAccountIdSchema)
230
+ .nullable()
231
+ .optional(),
232
+ escrowAgreementFileId: z
233
+ .lazy(() => fileIdSchema)
234
+ .nullable()
235
+ .optional(),
200
236
  }));
237
+ /**
238
+ * Optional params for resolveAndValidateOfferingUpdateFields.
239
+ * All fields are optional and nullable; resolution merges with offering/asset values.
240
+ */
241
+ export const ResolveOfferingUpdateFieldsParamsZod = z.object({
242
+ minInvestment: z.number().nullable().optional(),
243
+ maxInvestment: z.number().nullable().optional(),
244
+ targetAmount: z.number().nullable().optional(),
245
+ pricePerUnit: z.number().nullable().optional(),
246
+ });
247
+ /**
248
+ * Resolved, validated offering update fields (price per unit, target amount, min/max investment).
249
+ * Returned by resolveAndValidateOfferingUpdateFields and passed into validateBonusTiersForUpdate.
250
+ */
251
+ export const ResolvedOfferingUpdateFieldsZod = z.object({
252
+ pricePerUnit: z.number(),
253
+ targetAmount: z.number(),
254
+ minInvestment: z.number().nullable(),
255
+ maxInvestment: z.number().nullable(),
256
+ });
201
257
  export const PostComplianceOffering = PatchOfferingBase.merge(z.object({
202
258
  accountId: z.lazy(() => accountIdSchema),
203
259
  managedBy: z.nativeEnum(ManagedByType).optional(),
@@ -240,7 +296,29 @@ export const PostComplianceOffering = PatchOfferingBase.merge(z.object({
240
296
  .openapi({ example: AssetTemplateType.STANDARD }),
241
297
  tiers: z.array(z.number().positive()).nullable().optional(),
242
298
  enableBonus: z.boolean().default(false).optional(),
243
- })).superRefine(postAssetRefinement);
299
+ hasEscrow: z.boolean().optional(),
300
+ bankAccountId: z
301
+ .lazy(() => issuerBankAccountIdSchema)
302
+ .nullable()
303
+ .optional(),
304
+ escrowAccountId: z
305
+ .lazy(() => escrowAccountIdSchema)
306
+ .nullable()
307
+ .optional(),
308
+ interestRate: z
309
+ .number()
310
+ .min(0.01)
311
+ .max(100)
312
+ .nullable()
313
+ .optional()
314
+ .openapi({ example: 10 }),
315
+ bonusTiers: BonusTierListZod.optional(),
316
+ })).superRefine((data, ctx) => {
317
+ postOfferingRefinement(data, ctx);
318
+ postAssetRefinement(data, ctx);
319
+ escrowValidationRefinement(data, ctx, HttpMethod.POST);
320
+ postBonusTierRefinement(data, ctx);
321
+ });
244
322
  export const offeringsInclude = z.enum([
245
323
  'account',
246
324
  'issuer',
@@ -251,6 +329,8 @@ export const offeringsInclude = z.enum([
251
329
  'publishedVersion',
252
330
  'revisions',
253
331
  'onboardingReviewedBy',
332
+ 'bankAccount',
333
+ 'escrowAccount',
254
334
  ]);
255
335
  /**
256
336
  * @description Query parameters for including related entities
@@ -388,15 +468,22 @@ export const OfferingSettings = BaseOfferingSettings.refine((data) => (data.sett
388
468
  });
389
469
  export const PatchComplianceOffering = z
390
470
  .intersection(PatchOffering, OfferingSettings)
391
- .refine((data) => {
471
+ .superRefine((data, ctx) => {
392
472
  // Check if both values are present, and if so, ensure minInvestment is less than maxInvestment
393
- if (data.minInvestment && data.maxInvestment) {
394
- return data.minInvestment < data.maxInvestment;
473
+ if (typeof data.minInvestment === 'number' &&
474
+ typeof data.maxInvestment === 'number') {
475
+ if (data.minInvestment >= data.maxInvestment) {
476
+ ctx.addIssue({
477
+ code: z.ZodIssueCode.custom,
478
+ message: 'Minimum investment must be less than maximum investment.',
479
+ path: ['minInvestment'],
480
+ });
481
+ }
395
482
  }
396
- return true; // If one or both values are undefined, skip this check
397
- }, {
398
- message: 'Minimum investment must be less than maximum investment.',
399
- path: ['minInvestment'],
483
+ // Apply escrow-specific refinements
484
+ escrowValidationRefinement(data, ctx, HttpMethod.PATCH);
485
+ // Apply bonus-tier-specific refinements
486
+ postBonusTierRefinement(data, ctx);
400
487
  });
401
488
  export const IComplianceOffering = z.intersection(IOffering, OfferingSettings);
402
489
  export const IPaginatedComplianceOffering = z.object({
@@ -502,4 +589,34 @@ export const IPaginatedOnboardingOfferingSummaryResponse = z.object({
502
589
  items: z.array(OnboardingOfferingSummaryZod),
503
590
  meta: IPaginationMeta,
504
591
  });
592
+ /**
593
+ * Maps asset types to fields that should be reset (nullified) when converting
594
+ * from one asset type to another. This ensures incompatible fields from the
595
+ * previous type are cleared when the asset type changes.
596
+ */
597
+ export const ESCROW_ENABLED_OFFERING_FIELD_RESETS = {
598
+ bankAccountId: null,
599
+ escrowAccountId: null,
600
+ escrowAgreementFileId: null,
601
+ };
602
+ /**
603
+ * Schema for escrow validation data input
604
+ */
605
+ export const EscrowValidationDataZod = z.object({
606
+ hasEscrow: z.boolean().optional(),
607
+ bankAccountId: z.string().nullable().optional(),
608
+ escrowAccountId: z.string().nullable().optional(),
609
+ escrowAgreementFileId: z.string().nullable().optional(),
610
+ });
611
+ /**
612
+ * Schema for escrow validation context
613
+ */
614
+ export const EscrowValidationContextZod = z.object({
615
+ accountId: z.string(),
616
+ issuerId: z.string(),
617
+ offeringId: z.string(),
618
+ currentBankAccountId: z.string().nullable(),
619
+ currentEscrowAccountId: z.string().nullable(),
620
+ currentEscrowAgreementFileId: z.string().nullable(),
621
+ });
505
622
  //# sourceMappingURL=offering.types.js.map