@dalmore/api-contracts 0.0.0-dev.d2fe663 → 0.0.0-dev.d38f1ff

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/common/types/account-setting.types.d.ts +64 -0
  2. package/common/types/account-setting.types.js +8 -0
  3. package/common/types/account-setting.types.js.map +1 -1
  4. package/common/types/account.types.d.ts +38 -2
  5. package/common/types/account.types.js +3 -0
  6. package/common/types/account.types.js.map +1 -1
  7. package/common/types/activity.types.d.ts +27 -24
  8. package/common/types/activity.types.js +6 -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/auth.types.d.ts +1 -1
  14. package/common/types/auth.types.js +1 -1
  15. package/common/types/auth.types.js.map +1 -1
  16. package/common/types/bonus-tier.types.d.ts +128 -25
  17. package/common/types/bonus-tier.types.js +48 -12
  18. package/common/types/bonus-tier.types.js.map +1 -1
  19. package/common/types/cap-table.types.d.ts +1124 -0
  20. package/common/types/cap-table.types.js +406 -0
  21. package/common/types/cap-table.types.js.map +1 -0
  22. package/common/types/common.types.d.ts +30 -3
  23. package/common/types/common.types.js +18 -0
  24. package/common/types/common.types.js.map +1 -1
  25. package/common/types/comply-advantage-api.types.d.ts +133 -466
  26. package/common/types/comply-advantage-api.types.js +24 -3
  27. package/common/types/comply-advantage-api.types.js.map +1 -1
  28. package/common/types/dashboard.types.d.ts +7 -7
  29. package/common/types/data-record.types.d.ts +4 -4
  30. package/common/types/disbursements.types.d.ts +613 -392
  31. package/common/types/disbursements.types.js +37 -0
  32. package/common/types/disbursements.types.js.map +1 -1
  33. package/common/types/escrow-account.types.d.ts +17 -0
  34. package/common/types/escrow-account.types.js +3 -0
  35. package/common/types/escrow-account.types.js.map +1 -1
  36. package/common/types/file.types.d.ts +14 -11
  37. package/common/types/file.types.js +2 -0
  38. package/common/types/file.types.js.map +1 -1
  39. package/common/types/index.d.ts +2 -0
  40. package/common/types/index.js +2 -0
  41. package/common/types/index.js.map +1 -1
  42. package/common/types/individuals.types.js +5 -2
  43. package/common/types/individuals.types.js.map +1 -1
  44. package/common/types/investor-account.types.d.ts +4 -4
  45. package/common/types/issuer-bank-account.types.d.ts +4 -276
  46. package/common/types/issuer-offering.types.d.ts +662 -5
  47. package/common/types/issuer-offering.types.js +100 -6
  48. package/common/types/issuer-offering.types.js.map +1 -1
  49. package/common/types/job-item.types.d.ts +14 -14
  50. package/common/types/note.types.d.ts +15 -15
  51. package/common/types/offering-submission.types.js +2 -2
  52. package/common/types/offering.types.d.ts +281 -1
  53. package/common/types/offering.types.js +109 -10
  54. package/common/types/offering.types.js.map +1 -1
  55. package/common/types/portfolio.types.d.ts +6 -6
  56. package/common/types/reports.types.d.ts +345 -0
  57. package/common/types/reports.types.js +69 -0
  58. package/common/types/reports.types.js.map +1 -0
  59. package/common/types/signer.types.d.ts +23 -11
  60. package/common/types/signer.types.js +16 -1
  61. package/common/types/signer.types.js.map +1 -1
  62. package/common/types/site.types.d.ts +5 -0
  63. package/common/types/task.types.d.ts +22 -22
  64. package/common/types/trade-line-item.types.d.ts +18 -1
  65. package/common/types/trade-line-item.types.js +12 -1
  66. package/common/types/trade-line-item.types.js.map +1 -1
  67. package/common/types/trade.types.d.ts +64 -45
  68. package/common/types/trade.types.js +13 -4
  69. package/common/types/trade.types.js.map +1 -1
  70. package/common/types/transaction.types.d.ts +80 -1
  71. package/common/types/transaction.types.js +22 -2
  72. package/common/types/transaction.types.js.map +1 -1
  73. package/common/types/user.types.d.ts +34 -0
  74. package/common/types/user.types.js +4 -0
  75. package/common/types/user.types.js.map +1 -1
  76. package/contracts/clients/assets/index.d.ts +22 -0
  77. package/contracts/clients/files/index.d.ts +3 -3
  78. package/contracts/clients/files-public/index.d.ts +3 -3
  79. package/contracts/clients/index.d.ts +257 -13
  80. package/contracts/clients/offerings/index.d.ts +220 -4
  81. package/contracts/clients/trades/index.d.ts +9 -3
  82. 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,6 +353,13 @@ 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;
@@ -359,6 +422,46 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
359
422
  template: z.ZodDefault<z.ZodNativeEnum<typeof AssetTemplateType>>;
360
423
  tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
361
424
  enableBonus: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
425
+ hasEscrow: z.ZodOptional<z.ZodBoolean>;
426
+ bankAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
427
+ escrowAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
428
+ interestRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
429
+ bonusTiers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
430
+ type: z.ZodNativeEnum<typeof import("./bonus-tier.types").BonusType>;
431
+ value: z.ZodEffects<z.ZodNumber, number, number>;
432
+ startAmount: z.ZodEffects<z.ZodNumber, number, number>;
433
+ endAmount: z.ZodEffects<z.ZodNumber, number, number>;
434
+ }, "strip", z.ZodTypeAny, {
435
+ value: number;
436
+ type: import("./bonus-tier.types").BonusType;
437
+ startAmount: number;
438
+ endAmount: number;
439
+ }, {
440
+ value: number;
441
+ type: import("./bonus-tier.types").BonusType;
442
+ startAmount: number;
443
+ endAmount: number;
444
+ }>, {
445
+ value: number;
446
+ type: import("./bonus-tier.types").BonusType;
447
+ startAmount: number;
448
+ endAmount: number;
449
+ }, {
450
+ value: number;
451
+ type: import("./bonus-tier.types").BonusType;
452
+ startAmount: number;
453
+ endAmount: number;
454
+ }>, {
455
+ value: number;
456
+ type: import("./bonus-tier.types").BonusType;
457
+ startAmount: number;
458
+ endAmount: number;
459
+ }, {
460
+ value: number;
461
+ type: import("./bonus-tier.types").BonusType;
462
+ startAmount: number;
463
+ endAmount: number;
464
+ }>, "many">>;
362
465
  }, "strip", z.ZodTypeAny, {
363
466
  accountId: string;
364
467
  template: AssetTemplateType;
@@ -387,11 +490,21 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
387
490
  memorandumId?: string | null | undefined;
388
491
  subscriptionAgreementId?: string | null | undefined;
389
492
  showTotalRaised?: boolean | undefined;
493
+ hasEscrow?: boolean | undefined;
494
+ bankAccountId?: string | null | undefined;
495
+ escrowAccountId?: string | null | undefined;
390
496
  yield?: number | null | undefined;
391
497
  duration?: number | null | undefined;
392
498
  durationType?: DurationType | null | undefined;
393
499
  tiers?: number[] | null | undefined;
394
500
  enableBonus?: boolean | undefined;
501
+ interestRate?: number | null | undefined;
502
+ bonusTiers?: {
503
+ value: number;
504
+ type: import("./bonus-tier.types").BonusType;
505
+ startAmount: number;
506
+ endAmount: number;
507
+ }[] | undefined;
395
508
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
396
509
  subscriptionAgreementTemplateId?: string | null | undefined;
397
510
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -428,11 +541,21 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
428
541
  memorandumId?: string | null | undefined;
429
542
  subscriptionAgreementId?: string | null | undefined;
430
543
  showTotalRaised?: boolean | undefined;
544
+ hasEscrow?: boolean | undefined;
545
+ bankAccountId?: string | null | undefined;
546
+ escrowAccountId?: string | null | undefined;
431
547
  yield?: number | null | undefined;
432
548
  duration?: number | null | undefined;
433
549
  durationType?: DurationType | null | undefined;
434
550
  tiers?: number[] | null | undefined;
435
551
  enableBonus?: boolean | undefined;
552
+ interestRate?: number | null | undefined;
553
+ bonusTiers?: {
554
+ value: number;
555
+ type: import("./bonus-tier.types").BonusType;
556
+ startAmount: number;
557
+ endAmount: number;
558
+ }[] | undefined;
436
559
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
437
560
  subscriptionAgreementTemplateId?: string | null | undefined;
438
561
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -464,11 +587,21 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
464
587
  memorandumId?: string | null | undefined;
465
588
  subscriptionAgreementId?: string | null | undefined;
466
589
  showTotalRaised?: boolean | undefined;
590
+ hasEscrow?: boolean | undefined;
591
+ bankAccountId?: string | null | undefined;
592
+ escrowAccountId?: string | null | undefined;
467
593
  yield?: number | null | undefined;
468
594
  duration?: number | null | undefined;
469
595
  durationType?: DurationType | null | undefined;
470
596
  tiers?: number[] | null | undefined;
471
597
  enableBonus?: boolean | undefined;
598
+ interestRate?: number | null | undefined;
599
+ bonusTiers?: {
600
+ value: number;
601
+ type: import("./bonus-tier.types").BonusType;
602
+ startAmount: number;
603
+ endAmount: number;
604
+ }[] | undefined;
472
605
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
473
606
  subscriptionAgreementTemplateId?: string | null | undefined;
474
607
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -505,17 +638,27 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
505
638
  memorandumId?: string | null | undefined;
506
639
  subscriptionAgreementId?: string | null | undefined;
507
640
  showTotalRaised?: boolean | undefined;
641
+ hasEscrow?: boolean | undefined;
642
+ bankAccountId?: string | null | undefined;
643
+ escrowAccountId?: string | null | undefined;
508
644
  yield?: number | null | undefined;
509
645
  duration?: number | null | undefined;
510
646
  durationType?: DurationType | null | undefined;
511
647
  tiers?: number[] | null | undefined;
512
648
  enableBonus?: boolean | undefined;
649
+ interestRate?: number | null | undefined;
650
+ bonusTiers?: {
651
+ value: number;
652
+ type: import("./bonus-tier.types").BonusType;
653
+ startAmount: number;
654
+ endAmount: number;
655
+ }[] | undefined;
513
656
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
514
657
  subscriptionAgreementTemplateId?: string | null | undefined;
515
658
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
516
659
  }>;
517
660
  export type PostComplianceOffering = z.infer<typeof PostComplianceOffering>;
518
- export declare const offeringsInclude: z.ZodEnum<["account", "issuer", "trades", "assets", "disbursements", "draftVersion", "publishedVersion", "revisions", "onboardingReviewedBy"]>;
661
+ export declare const offeringsInclude: z.ZodEnum<["account", "issuer", "trades", "assets", "disbursements", "draftVersion", "publishedVersion", "revisions", "onboardingReviewedBy", "bankAccount", "escrowAccount"]>;
519
662
  /**
520
663
  * @description Query parameters for including related entities
521
664
  * @xample in contract us as -> query: z.object({}).merge(UsersIncludeQuery),
@@ -1064,6 +1207,47 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1064
1207
  template: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNativeEnum<typeof AssetTemplateType>>>>;
1065
1208
  tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
1066
1209
  enableBonus: z.ZodOptional<z.ZodBoolean>;
1210
+ interestRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1211
+ bonusTiers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
1212
+ type: z.ZodNativeEnum<typeof import("./bonus-tier.types").BonusType>;
1213
+ value: z.ZodEffects<z.ZodNumber, number, number>;
1214
+ startAmount: z.ZodEffects<z.ZodNumber, number, number>;
1215
+ endAmount: z.ZodEffects<z.ZodNumber, number, number>;
1216
+ }, "strip", z.ZodTypeAny, {
1217
+ value: number;
1218
+ type: import("./bonus-tier.types").BonusType;
1219
+ startAmount: number;
1220
+ endAmount: number;
1221
+ }, {
1222
+ value: number;
1223
+ type: import("./bonus-tier.types").BonusType;
1224
+ startAmount: number;
1225
+ endAmount: number;
1226
+ }>, {
1227
+ value: number;
1228
+ type: import("./bonus-tier.types").BonusType;
1229
+ startAmount: number;
1230
+ endAmount: number;
1231
+ }, {
1232
+ value: number;
1233
+ type: import("./bonus-tier.types").BonusType;
1234
+ startAmount: number;
1235
+ endAmount: number;
1236
+ }>, {
1237
+ value: number;
1238
+ type: import("./bonus-tier.types").BonusType;
1239
+ startAmount: number;
1240
+ endAmount: number;
1241
+ }, {
1242
+ value: number;
1243
+ type: import("./bonus-tier.types").BonusType;
1244
+ startAmount: number;
1245
+ endAmount: number;
1246
+ }>, "many">>;
1247
+ hasEscrow: z.ZodOptional<z.ZodBoolean>;
1248
+ bankAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
1249
+ escrowAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
1250
+ escrowAgreementFileId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
1067
1251
  }, "strip", z.ZodTypeAny, {
1068
1252
  platformSettings: string | null;
1069
1253
  type?: OfferingType | undefined;
@@ -1087,6 +1271,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1087
1271
  memorandumId?: string | null | undefined;
1088
1272
  subscriptionAgreementId?: string | null | undefined;
1089
1273
  showTotalRaised?: boolean | undefined;
1274
+ hasEscrow?: boolean | undefined;
1275
+ escrowAgreementFileId?: string | null | undefined;
1276
+ bankAccountId?: string | null | undefined;
1277
+ escrowAccountId?: string | null | undefined;
1090
1278
  assetName?: string | undefined;
1091
1279
  assetType?: AssetType | undefined;
1092
1280
  pricePerUnit?: number | null | undefined;
@@ -1096,6 +1284,13 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1096
1284
  durationType?: DurationType | null | undefined;
1097
1285
  tiers?: number[] | null | undefined;
1098
1286
  enableBonus?: boolean | undefined;
1287
+ interestRate?: number | null | undefined;
1288
+ bonusTiers?: {
1289
+ value: number;
1290
+ type: import("./bonus-tier.types").BonusType;
1291
+ startAmount: number;
1292
+ endAmount: number;
1293
+ }[] | undefined;
1099
1294
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1100
1295
  subscriptionAgreementTemplateId?: string | null | undefined;
1101
1296
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -1127,6 +1322,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1127
1322
  memorandumId?: string | null | undefined;
1128
1323
  subscriptionAgreementId?: string | null | undefined;
1129
1324
  showTotalRaised?: boolean | undefined;
1325
+ hasEscrow?: boolean | undefined;
1326
+ escrowAgreementFileId?: string | null | undefined;
1327
+ bankAccountId?: string | null | undefined;
1328
+ escrowAccountId?: string | null | undefined;
1130
1329
  assetName?: string | undefined;
1131
1330
  assetType?: AssetType | undefined;
1132
1331
  pricePerUnit?: number | null | undefined;
@@ -1136,6 +1335,13 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1136
1335
  durationType?: DurationType | null | undefined;
1137
1336
  tiers?: number[] | null | undefined;
1138
1337
  enableBonus?: boolean | undefined;
1338
+ interestRate?: number | null | undefined;
1339
+ bonusTiers?: {
1340
+ value: number;
1341
+ type: import("./bonus-tier.types").BonusType;
1342
+ startAmount: number;
1343
+ endAmount: number;
1344
+ }[] | undefined;
1139
1345
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1140
1346
  subscriptionAgreementTemplateId?: string | null | undefined;
1141
1347
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -1393,6 +1599,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1393
1599
  memorandumId?: string | null | undefined;
1394
1600
  subscriptionAgreementId?: string | null | undefined;
1395
1601
  showTotalRaised?: boolean | undefined;
1602
+ hasEscrow?: boolean | undefined;
1603
+ escrowAgreementFileId?: string | null | undefined;
1604
+ bankAccountId?: string | null | undefined;
1605
+ escrowAccountId?: string | null | undefined;
1396
1606
  assetName?: string | undefined;
1397
1607
  assetType?: AssetType | undefined;
1398
1608
  pricePerUnit?: number | null | undefined;
@@ -1402,6 +1612,13 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1402
1612
  durationType?: DurationType | null | undefined;
1403
1613
  tiers?: number[] | null | undefined;
1404
1614
  enableBonus?: boolean | undefined;
1615
+ interestRate?: number | null | undefined;
1616
+ bonusTiers?: {
1617
+ value: number;
1618
+ type: import("./bonus-tier.types").BonusType;
1619
+ startAmount: number;
1620
+ endAmount: number;
1621
+ }[] | undefined;
1405
1622
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1406
1623
  subscriptionAgreementTemplateId?: string | null | undefined;
1407
1624
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -1444,6 +1661,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1444
1661
  memorandumId?: string | null | undefined;
1445
1662
  subscriptionAgreementId?: string | null | undefined;
1446
1663
  showTotalRaised?: boolean | undefined;
1664
+ hasEscrow?: boolean | undefined;
1665
+ escrowAgreementFileId?: string | null | undefined;
1666
+ bankAccountId?: string | null | undefined;
1667
+ escrowAccountId?: string | null | undefined;
1447
1668
  assetName?: string | undefined;
1448
1669
  assetType?: AssetType | undefined;
1449
1670
  pricePerUnit?: number | null | undefined;
@@ -1453,6 +1674,13 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1453
1674
  durationType?: DurationType | null | undefined;
1454
1675
  tiers?: number[] | null | undefined;
1455
1676
  enableBonus?: boolean | undefined;
1677
+ interestRate?: number | null | undefined;
1678
+ bonusTiers?: {
1679
+ value: number;
1680
+ type: import("./bonus-tier.types").BonusType;
1681
+ startAmount: number;
1682
+ endAmount: number;
1683
+ }[] | undefined;
1456
1684
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1457
1685
  subscriptionAgreementTemplateId?: string | null | undefined;
1458
1686
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -2333,3 +2561,55 @@ export declare const IPaginatedOnboardingOfferingSummaryResponse: z.ZodObject<{
2333
2561
  };
2334
2562
  }>;
2335
2563
  export type IPaginatedOnboardingOfferingSummaryResponse = z.infer<typeof IPaginatedOnboardingOfferingSummaryResponse>;
2564
+ /**
2565
+ * Maps asset types to fields that should be reset (nullified) when converting
2566
+ * from one asset type to another. This ensures incompatible fields from the
2567
+ * previous type are cleared when the asset type changes.
2568
+ */
2569
+ export declare const ESCROW_ENABLED_OFFERING_FIELD_RESETS: Partial<IOffering>;
2570
+ /**
2571
+ * Schema for escrow validation data input
2572
+ */
2573
+ export declare const EscrowValidationDataZod: z.ZodObject<{
2574
+ hasEscrow: z.ZodOptional<z.ZodBoolean>;
2575
+ bankAccountId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2576
+ escrowAccountId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2577
+ escrowAgreementFileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2578
+ }, "strip", z.ZodTypeAny, {
2579
+ hasEscrow?: boolean | undefined;
2580
+ escrowAgreementFileId?: string | null | undefined;
2581
+ bankAccountId?: string | null | undefined;
2582
+ escrowAccountId?: string | null | undefined;
2583
+ }, {
2584
+ hasEscrow?: boolean | undefined;
2585
+ escrowAgreementFileId?: string | null | undefined;
2586
+ bankAccountId?: string | null | undefined;
2587
+ escrowAccountId?: string | null | undefined;
2588
+ }>;
2589
+ export type EscrowValidationData = z.infer<typeof EscrowValidationDataZod>;
2590
+ /**
2591
+ * Schema for escrow validation context
2592
+ */
2593
+ export declare const EscrowValidationContextZod: z.ZodObject<{
2594
+ accountId: z.ZodString;
2595
+ issuerId: z.ZodString;
2596
+ offeringId: z.ZodString;
2597
+ currentBankAccountId: z.ZodNullable<z.ZodString>;
2598
+ currentEscrowAccountId: z.ZodNullable<z.ZodString>;
2599
+ currentEscrowAgreementFileId: z.ZodNullable<z.ZodString>;
2600
+ }, "strip", z.ZodTypeAny, {
2601
+ accountId: string;
2602
+ offeringId: string;
2603
+ issuerId: string;
2604
+ currentBankAccountId: string | null;
2605
+ currentEscrowAccountId: string | null;
2606
+ currentEscrowAgreementFileId: string | null;
2607
+ }, {
2608
+ accountId: string;
2609
+ offeringId: string;
2610
+ issuerId: string;
2611
+ currentBankAccountId: string | null;
2612
+ currentEscrowAccountId: string | null;
2613
+ currentEscrowAgreementFileId: string | null;
2614
+ }>;
2615
+ 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, } 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),
@@ -197,6 +212,27 @@ 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
  }));
201
237
  export const PostComplianceOffering = PatchOfferingBase.merge(z.object({
202
238
  accountId: z.lazy(() => accountIdSchema),
@@ -240,7 +276,31 @@ export const PostComplianceOffering = PatchOfferingBase.merge(z.object({
240
276
  .openapi({ example: AssetTemplateType.STANDARD }),
241
277
  tiers: z.array(z.number().positive()).nullable().optional(),
242
278
  enableBonus: z.boolean().default(false).optional(),
243
- })).superRefine(postAssetRefinement);
279
+ hasEscrow: z.boolean().optional(),
280
+ bankAccountId: z
281
+ .lazy(() => issuerBankAccountIdSchema)
282
+ .nullable()
283
+ .optional(),
284
+ escrowAccountId: z
285
+ .lazy(() => escrowAccountIdSchema)
286
+ .nullable()
287
+ .optional(),
288
+ interestRate: z
289
+ .number()
290
+ .min(0.01)
291
+ .max(100)
292
+ .nullable()
293
+ .optional()
294
+ .openapi({ example: 10 }),
295
+ bonusTiers: BonusTierListZod.optional(),
296
+ })).superRefine((data, ctx) => {
297
+ // Apply asset-specific refinements
298
+ postAssetRefinement(data, ctx);
299
+ // Apply escrow-specific refinements
300
+ escrowValidationRefinement(data, ctx, HttpMethod.POST);
301
+ // Apply bonus-tier-specific refinements
302
+ postBonusTierRefinement(data, ctx);
303
+ });
244
304
  export const offeringsInclude = z.enum([
245
305
  'account',
246
306
  'issuer',
@@ -251,6 +311,8 @@ export const offeringsInclude = z.enum([
251
311
  'publishedVersion',
252
312
  'revisions',
253
313
  'onboardingReviewedBy',
314
+ 'bankAccount',
315
+ 'escrowAccount',
254
316
  ]);
255
317
  /**
256
318
  * @description Query parameters for including related entities
@@ -388,15 +450,22 @@ export const OfferingSettings = BaseOfferingSettings.refine((data) => (data.sett
388
450
  });
389
451
  export const PatchComplianceOffering = z
390
452
  .intersection(PatchOffering, OfferingSettings)
391
- .refine((data) => {
453
+ .superRefine((data, ctx) => {
392
454
  // 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;
455
+ if (typeof data.minInvestment === 'number' &&
456
+ typeof data.maxInvestment === 'number') {
457
+ if (data.minInvestment >= data.maxInvestment) {
458
+ ctx.addIssue({
459
+ code: z.ZodIssueCode.custom,
460
+ message: 'Minimum investment must be less than maximum investment.',
461
+ path: ['minInvestment'],
462
+ });
463
+ }
395
464
  }
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'],
465
+ // Apply escrow-specific refinements
466
+ escrowValidationRefinement(data, ctx, HttpMethod.PATCH);
467
+ // Apply bonus-tier-specific refinements
468
+ postBonusTierRefinement(data, ctx);
400
469
  });
401
470
  export const IComplianceOffering = z.intersection(IOffering, OfferingSettings);
402
471
  export const IPaginatedComplianceOffering = z.object({
@@ -502,4 +571,34 @@ export const IPaginatedOnboardingOfferingSummaryResponse = z.object({
502
571
  items: z.array(OnboardingOfferingSummaryZod),
503
572
  meta: IPaginationMeta,
504
573
  });
574
+ /**
575
+ * Maps asset types to fields that should be reset (nullified) when converting
576
+ * from one asset type to another. This ensures incompatible fields from the
577
+ * previous type are cleared when the asset type changes.
578
+ */
579
+ export const ESCROW_ENABLED_OFFERING_FIELD_RESETS = {
580
+ bankAccountId: null,
581
+ escrowAccountId: null,
582
+ escrowAgreementFileId: null,
583
+ };
584
+ /**
585
+ * Schema for escrow validation data input
586
+ */
587
+ export const EscrowValidationDataZod = z.object({
588
+ hasEscrow: z.boolean().optional(),
589
+ bankAccountId: z.string().nullable().optional(),
590
+ escrowAccountId: z.string().nullable().optional(),
591
+ escrowAgreementFileId: z.string().nullable().optional(),
592
+ });
593
+ /**
594
+ * Schema for escrow validation context
595
+ */
596
+ export const EscrowValidationContextZod = z.object({
597
+ accountId: z.string(),
598
+ issuerId: z.string(),
599
+ offeringId: z.string(),
600
+ currentBankAccountId: z.string().nullable(),
601
+ currentEscrowAccountId: z.string().nullable(),
602
+ currentEscrowAgreementFileId: z.string().nullable(),
603
+ });
505
604
  //# sourceMappingURL=offering.types.js.map