@dalmore/api-contracts 0.0.0-dev.685c0b3 → 0.0.0-dev.6f65580

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 (65) 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 +25 -24
  8. package/common/types/activity.types.js +2 -0
  9. package/common/types/activity.types.js.map +1 -1
  10. package/common/types/asset.types.d.ts +298 -0
  11. package/common/types/asset.types.js +191 -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 +45 -4
  17. package/common/types/bonus-tier.types.js +14 -7
  18. package/common/types/bonus-tier.types.js.map +1 -1
  19. package/common/types/cap-table.types.d.ts +8 -8
  20. package/common/types/common.types.d.ts +19 -2
  21. package/common/types/common.types.js +12 -0
  22. package/common/types/common.types.js.map +1 -1
  23. package/common/types/comply-advantage-api.types.d.ts +133 -466
  24. package/common/types/comply-advantage-api.types.js +24 -3
  25. package/common/types/comply-advantage-api.types.js.map +1 -1
  26. package/common/types/dashboard.types.d.ts +7 -7
  27. package/common/types/data-record.types.d.ts +4 -4
  28. package/common/types/disbursements.types.d.ts +596 -392
  29. package/common/types/disbursements.types.js +37 -0
  30. package/common/types/disbursements.types.js.map +1 -1
  31. package/common/types/file.types.d.ts +9 -9
  32. package/common/types/investor-account.types.d.ts +4 -4
  33. package/common/types/issuer-bank-account.types.d.ts +4 -276
  34. package/common/types/issuer-offering.types.d.ts +719 -3
  35. package/common/types/issuer-offering.types.js +139 -4
  36. package/common/types/issuer-offering.types.js.map +1 -1
  37. package/common/types/job-item.types.d.ts +14 -14
  38. package/common/types/note.types.d.ts +15 -15
  39. package/common/types/offering.types.d.ts +320 -1
  40. package/common/types/offering.types.js +150 -11
  41. package/common/types/offering.types.js.map +1 -1
  42. package/common/types/signer.types.d.ts +23 -11
  43. package/common/types/signer.types.js +16 -1
  44. package/common/types/signer.types.js.map +1 -1
  45. package/common/types/site.types.d.ts +20 -0
  46. package/common/types/task.types.d.ts +22 -22
  47. package/common/types/trade-line-item.types.d.ts +18 -1
  48. package/common/types/trade-line-item.types.js +12 -1
  49. package/common/types/trade-line-item.types.js.map +1 -1
  50. package/common/types/trade.types.d.ts +62 -45
  51. package/common/types/trade.types.js +11 -4
  52. package/common/types/trade.types.js.map +1 -1
  53. package/common/types/transaction.types.d.ts +80 -1
  54. package/common/types/transaction.types.js +22 -2
  55. package/common/types/transaction.types.js.map +1 -1
  56. package/common/types/user.types.d.ts +5 -0
  57. package/common/types/user.types.js +1 -0
  58. package/common/types/user.types.js.map +1 -1
  59. package/contracts/clients/assets/index.d.ts +88 -0
  60. package/contracts/clients/files/index.d.ts +3 -3
  61. package/contracts/clients/files-public/index.d.ts +3 -3
  62. package/contracts/clients/index.d.ts +355 -10
  63. package/contracts/clients/offerings/index.d.ts +252 -1
  64. package/contracts/clients/trades/index.d.ts +9 -3
  65. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { ComplianceReview, OfferingType, ManagedByType, SortOrder, SortBy, OfferingVersioningType, OfferingOnboardingStatus, AssetType, DurationType } from './common.types';
3
3
  import { OfferingStatus } from './issuer-offering.types';
4
- import { AssetTemplateType } from './asset.types';
4
+ import { AssetTemplateType, InterestType } from './asset.types';
5
5
  export declare enum OfferingFeeType {
6
6
  FIXED = "FIXED",
7
7
  PERCENTAGE = "PERCENTAGE"
@@ -225,6 +225,50 @@ 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
+ principalAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
229
+ maxTotalRaise: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
230
+ interestRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
231
+ interestType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof InterestType>>>;
232
+ bonusTiers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
233
+ type: z.ZodNativeEnum<typeof import("./bonus-tier.types").BonusType>;
234
+ value: z.ZodEffects<z.ZodNumber, number, number>;
235
+ startAmount: z.ZodEffects<z.ZodNumber, number, number>;
236
+ endAmount: z.ZodEffects<z.ZodNumber, number, number>;
237
+ }, "strip", z.ZodTypeAny, {
238
+ value: number;
239
+ type: import("./bonus-tier.types").BonusType;
240
+ startAmount: number;
241
+ endAmount: number;
242
+ }, {
243
+ value: number;
244
+ type: import("./bonus-tier.types").BonusType;
245
+ startAmount: number;
246
+ endAmount: number;
247
+ }>, {
248
+ value: number;
249
+ type: import("./bonus-tier.types").BonusType;
250
+ startAmount: number;
251
+ endAmount: number;
252
+ }, {
253
+ value: number;
254
+ type: import("./bonus-tier.types").BonusType;
255
+ startAmount: number;
256
+ endAmount: number;
257
+ }>, {
258
+ value: number;
259
+ type: import("./bonus-tier.types").BonusType;
260
+ startAmount: number;
261
+ endAmount: number;
262
+ }, {
263
+ value: number;
264
+ type: import("./bonus-tier.types").BonusType;
265
+ startAmount: number;
266
+ endAmount: number;
267
+ }>, "many">>;
268
+ hasEscrow: z.ZodOptional<z.ZodBoolean>;
269
+ bankAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
270
+ escrowAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
271
+ escrowAgreementFileId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
228
272
  }, "strip", z.ZodTypeAny, {
229
273
  platformSettings: string | null;
230
274
  type?: OfferingType | undefined;
@@ -248,6 +292,10 @@ export declare const PatchOffering: z.ZodObject<{
248
292
  memorandumId?: string | null | undefined;
249
293
  subscriptionAgreementId?: string | null | undefined;
250
294
  showTotalRaised?: boolean | undefined;
295
+ hasEscrow?: boolean | undefined;
296
+ escrowAgreementFileId?: string | null | undefined;
297
+ bankAccountId?: string | null | undefined;
298
+ escrowAccountId?: string | null | undefined;
251
299
  assetName?: string | undefined;
252
300
  assetType?: AssetType | undefined;
253
301
  pricePerUnit?: number | null | undefined;
@@ -257,6 +305,16 @@ export declare const PatchOffering: z.ZodObject<{
257
305
  durationType?: DurationType | null | undefined;
258
306
  tiers?: number[] | null | undefined;
259
307
  enableBonus?: boolean | undefined;
308
+ principalAmount?: number | null | undefined;
309
+ maxTotalRaise?: number | null | undefined;
310
+ interestRate?: number | null | undefined;
311
+ interestType?: InterestType | null | undefined;
312
+ bonusTiers?: {
313
+ value: number;
314
+ type: import("./bonus-tier.types").BonusType;
315
+ startAmount: number;
316
+ endAmount: number;
317
+ }[] | undefined;
260
318
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
261
319
  subscriptionAgreementTemplateId?: string | null | undefined;
262
320
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -288,6 +346,10 @@ export declare const PatchOffering: z.ZodObject<{
288
346
  memorandumId?: string | null | undefined;
289
347
  subscriptionAgreementId?: string | null | undefined;
290
348
  showTotalRaised?: boolean | undefined;
349
+ hasEscrow?: boolean | undefined;
350
+ escrowAgreementFileId?: string | null | undefined;
351
+ bankAccountId?: string | null | undefined;
352
+ escrowAccountId?: string | null | undefined;
291
353
  assetName?: string | undefined;
292
354
  assetType?: AssetType | undefined;
293
355
  pricePerUnit?: number | null | undefined;
@@ -297,6 +359,16 @@ export declare const PatchOffering: z.ZodObject<{
297
359
  durationType?: DurationType | null | undefined;
298
360
  tiers?: number[] | null | undefined;
299
361
  enableBonus?: boolean | undefined;
362
+ principalAmount?: number | null | undefined;
363
+ maxTotalRaise?: number | null | undefined;
364
+ interestRate?: number | null | undefined;
365
+ interestType?: InterestType | null | undefined;
366
+ bonusTiers?: {
367
+ value: number;
368
+ type: import("./bonus-tier.types").BonusType;
369
+ startAmount: number;
370
+ endAmount: number;
371
+ }[] | undefined;
300
372
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
301
373
  subscriptionAgreementTemplateId?: string | null | undefined;
302
374
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -359,6 +431,49 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
359
431
  template: z.ZodDefault<z.ZodNativeEnum<typeof AssetTemplateType>>;
360
432
  tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
361
433
  enableBonus: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
434
+ hasEscrow: z.ZodOptional<z.ZodBoolean>;
435
+ bankAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
436
+ escrowAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
437
+ principalAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
438
+ maxTotalRaise: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
439
+ interestRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
440
+ interestType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof InterestType>>>;
441
+ bonusTiers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
442
+ type: z.ZodNativeEnum<typeof import("./bonus-tier.types").BonusType>;
443
+ value: z.ZodEffects<z.ZodNumber, number, number>;
444
+ startAmount: z.ZodEffects<z.ZodNumber, number, number>;
445
+ endAmount: z.ZodEffects<z.ZodNumber, number, number>;
446
+ }, "strip", z.ZodTypeAny, {
447
+ value: number;
448
+ type: import("./bonus-tier.types").BonusType;
449
+ startAmount: number;
450
+ endAmount: number;
451
+ }, {
452
+ value: number;
453
+ type: import("./bonus-tier.types").BonusType;
454
+ startAmount: number;
455
+ endAmount: number;
456
+ }>, {
457
+ value: number;
458
+ type: import("./bonus-tier.types").BonusType;
459
+ startAmount: number;
460
+ endAmount: number;
461
+ }, {
462
+ value: number;
463
+ type: import("./bonus-tier.types").BonusType;
464
+ startAmount: number;
465
+ endAmount: number;
466
+ }>, {
467
+ value: number;
468
+ type: import("./bonus-tier.types").BonusType;
469
+ startAmount: number;
470
+ endAmount: number;
471
+ }, {
472
+ value: number;
473
+ type: import("./bonus-tier.types").BonusType;
474
+ startAmount: number;
475
+ endAmount: number;
476
+ }>, "many">>;
362
477
  }, "strip", z.ZodTypeAny, {
363
478
  accountId: string;
364
479
  template: AssetTemplateType;
@@ -387,11 +502,24 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
387
502
  memorandumId?: string | null | undefined;
388
503
  subscriptionAgreementId?: string | null | undefined;
389
504
  showTotalRaised?: boolean | undefined;
505
+ hasEscrow?: boolean | undefined;
506
+ bankAccountId?: string | null | undefined;
507
+ escrowAccountId?: string | null | undefined;
390
508
  yield?: number | null | undefined;
391
509
  duration?: number | null | undefined;
392
510
  durationType?: DurationType | null | undefined;
393
511
  tiers?: number[] | null | undefined;
394
512
  enableBonus?: boolean | undefined;
513
+ principalAmount?: number | null | undefined;
514
+ maxTotalRaise?: number | null | undefined;
515
+ interestRate?: number | null | undefined;
516
+ interestType?: InterestType | null | undefined;
517
+ bonusTiers?: {
518
+ value: number;
519
+ type: import("./bonus-tier.types").BonusType;
520
+ startAmount: number;
521
+ endAmount: number;
522
+ }[] | undefined;
395
523
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
396
524
  subscriptionAgreementTemplateId?: string | null | undefined;
397
525
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -428,11 +556,24 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
428
556
  memorandumId?: string | null | undefined;
429
557
  subscriptionAgreementId?: string | null | undefined;
430
558
  showTotalRaised?: boolean | undefined;
559
+ hasEscrow?: boolean | undefined;
560
+ bankAccountId?: string | null | undefined;
561
+ escrowAccountId?: string | null | undefined;
431
562
  yield?: number | null | undefined;
432
563
  duration?: number | null | undefined;
433
564
  durationType?: DurationType | null | undefined;
434
565
  tiers?: number[] | null | undefined;
435
566
  enableBonus?: boolean | undefined;
567
+ principalAmount?: number | null | undefined;
568
+ maxTotalRaise?: number | null | undefined;
569
+ interestRate?: number | null | undefined;
570
+ interestType?: InterestType | null | undefined;
571
+ bonusTiers?: {
572
+ value: number;
573
+ type: import("./bonus-tier.types").BonusType;
574
+ startAmount: number;
575
+ endAmount: number;
576
+ }[] | undefined;
436
577
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
437
578
  subscriptionAgreementTemplateId?: string | null | undefined;
438
579
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -464,11 +605,24 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
464
605
  memorandumId?: string | null | undefined;
465
606
  subscriptionAgreementId?: string | null | undefined;
466
607
  showTotalRaised?: boolean | undefined;
608
+ hasEscrow?: boolean | undefined;
609
+ bankAccountId?: string | null | undefined;
610
+ escrowAccountId?: string | null | undefined;
467
611
  yield?: number | null | undefined;
468
612
  duration?: number | null | undefined;
469
613
  durationType?: DurationType | null | undefined;
470
614
  tiers?: number[] | null | undefined;
471
615
  enableBonus?: boolean | undefined;
616
+ principalAmount?: number | null | undefined;
617
+ maxTotalRaise?: number | null | undefined;
618
+ interestRate?: number | null | undefined;
619
+ interestType?: InterestType | null | undefined;
620
+ bonusTiers?: {
621
+ value: number;
622
+ type: import("./bonus-tier.types").BonusType;
623
+ startAmount: number;
624
+ endAmount: number;
625
+ }[] | undefined;
472
626
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
473
627
  subscriptionAgreementTemplateId?: string | null | undefined;
474
628
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -505,11 +659,24 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
505
659
  memorandumId?: string | null | undefined;
506
660
  subscriptionAgreementId?: string | null | undefined;
507
661
  showTotalRaised?: boolean | undefined;
662
+ hasEscrow?: boolean | undefined;
663
+ bankAccountId?: string | null | undefined;
664
+ escrowAccountId?: string | null | undefined;
508
665
  yield?: number | null | undefined;
509
666
  duration?: number | null | undefined;
510
667
  durationType?: DurationType | null | undefined;
511
668
  tiers?: number[] | null | undefined;
512
669
  enableBonus?: boolean | undefined;
670
+ principalAmount?: number | null | undefined;
671
+ maxTotalRaise?: number | null | undefined;
672
+ interestRate?: number | null | undefined;
673
+ interestType?: InterestType | null | undefined;
674
+ bonusTiers?: {
675
+ value: number;
676
+ type: import("./bonus-tier.types").BonusType;
677
+ startAmount: number;
678
+ endAmount: number;
679
+ }[] | undefined;
513
680
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
514
681
  subscriptionAgreementTemplateId?: string | null | undefined;
515
682
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -1064,6 +1231,50 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1064
1231
  template: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodNativeEnum<typeof AssetTemplateType>>>>;
1065
1232
  tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
1066
1233
  enableBonus: z.ZodOptional<z.ZodBoolean>;
1234
+ principalAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1235
+ maxTotalRaise: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1236
+ interestRate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1237
+ interestType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof InterestType>>>;
1238
+ bonusTiers: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
1239
+ type: z.ZodNativeEnum<typeof import("./bonus-tier.types").BonusType>;
1240
+ value: z.ZodEffects<z.ZodNumber, number, number>;
1241
+ startAmount: z.ZodEffects<z.ZodNumber, number, number>;
1242
+ endAmount: z.ZodEffects<z.ZodNumber, number, number>;
1243
+ }, "strip", z.ZodTypeAny, {
1244
+ value: number;
1245
+ type: import("./bonus-tier.types").BonusType;
1246
+ startAmount: number;
1247
+ endAmount: number;
1248
+ }, {
1249
+ value: number;
1250
+ type: import("./bonus-tier.types").BonusType;
1251
+ startAmount: number;
1252
+ endAmount: number;
1253
+ }>, {
1254
+ value: number;
1255
+ type: import("./bonus-tier.types").BonusType;
1256
+ startAmount: number;
1257
+ endAmount: number;
1258
+ }, {
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
+ }>, "many">>;
1274
+ hasEscrow: z.ZodOptional<z.ZodBoolean>;
1275
+ bankAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
1276
+ escrowAccountId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
1277
+ escrowAgreementFileId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
1067
1278
  }, "strip", z.ZodTypeAny, {
1068
1279
  platformSettings: string | null;
1069
1280
  type?: OfferingType | undefined;
@@ -1087,6 +1298,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1087
1298
  memorandumId?: string | null | undefined;
1088
1299
  subscriptionAgreementId?: string | null | undefined;
1089
1300
  showTotalRaised?: boolean | undefined;
1301
+ hasEscrow?: boolean | undefined;
1302
+ escrowAgreementFileId?: string | null | undefined;
1303
+ bankAccountId?: string | null | undefined;
1304
+ escrowAccountId?: string | null | undefined;
1090
1305
  assetName?: string | undefined;
1091
1306
  assetType?: AssetType | undefined;
1092
1307
  pricePerUnit?: number | null | undefined;
@@ -1096,6 +1311,16 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1096
1311
  durationType?: DurationType | null | undefined;
1097
1312
  tiers?: number[] | null | undefined;
1098
1313
  enableBonus?: boolean | undefined;
1314
+ principalAmount?: number | null | undefined;
1315
+ maxTotalRaise?: number | null | undefined;
1316
+ interestRate?: number | null | undefined;
1317
+ interestType?: InterestType | null | undefined;
1318
+ bonusTiers?: {
1319
+ value: number;
1320
+ type: import("./bonus-tier.types").BonusType;
1321
+ startAmount: number;
1322
+ endAmount: number;
1323
+ }[] | undefined;
1099
1324
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1100
1325
  subscriptionAgreementTemplateId?: string | null | undefined;
1101
1326
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -1127,6 +1352,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1127
1352
  memorandumId?: string | null | undefined;
1128
1353
  subscriptionAgreementId?: string | null | undefined;
1129
1354
  showTotalRaised?: boolean | undefined;
1355
+ hasEscrow?: boolean | undefined;
1356
+ escrowAgreementFileId?: string | null | undefined;
1357
+ bankAccountId?: string | null | undefined;
1358
+ escrowAccountId?: string | null | undefined;
1130
1359
  assetName?: string | undefined;
1131
1360
  assetType?: AssetType | undefined;
1132
1361
  pricePerUnit?: number | null | undefined;
@@ -1136,6 +1365,16 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1136
1365
  durationType?: DurationType | null | undefined;
1137
1366
  tiers?: number[] | null | undefined;
1138
1367
  enableBonus?: boolean | undefined;
1368
+ principalAmount?: number | null | undefined;
1369
+ maxTotalRaise?: number | null | undefined;
1370
+ interestRate?: number | null | undefined;
1371
+ interestType?: InterestType | null | undefined;
1372
+ bonusTiers?: {
1373
+ value: number;
1374
+ type: import("./bonus-tier.types").BonusType;
1375
+ startAmount: number;
1376
+ endAmount: number;
1377
+ }[] | undefined;
1139
1378
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1140
1379
  subscriptionAgreementTemplateId?: string | null | undefined;
1141
1380
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -1393,6 +1632,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1393
1632
  memorandumId?: string | null | undefined;
1394
1633
  subscriptionAgreementId?: string | null | undefined;
1395
1634
  showTotalRaised?: boolean | undefined;
1635
+ hasEscrow?: boolean | undefined;
1636
+ escrowAgreementFileId?: string | null | undefined;
1637
+ bankAccountId?: string | null | undefined;
1638
+ escrowAccountId?: string | null | undefined;
1396
1639
  assetName?: string | undefined;
1397
1640
  assetType?: AssetType | undefined;
1398
1641
  pricePerUnit?: number | null | undefined;
@@ -1402,6 +1645,16 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1402
1645
  durationType?: DurationType | null | undefined;
1403
1646
  tiers?: number[] | null | undefined;
1404
1647
  enableBonus?: boolean | undefined;
1648
+ principalAmount?: number | null | undefined;
1649
+ maxTotalRaise?: number | null | undefined;
1650
+ interestRate?: number | null | undefined;
1651
+ interestType?: InterestType | null | undefined;
1652
+ bonusTiers?: {
1653
+ value: number;
1654
+ type: import("./bonus-tier.types").BonusType;
1655
+ startAmount: number;
1656
+ endAmount: number;
1657
+ }[] | undefined;
1405
1658
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1406
1659
  subscriptionAgreementTemplateId?: string | null | undefined;
1407
1660
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -1444,6 +1697,10 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1444
1697
  memorandumId?: string | null | undefined;
1445
1698
  subscriptionAgreementId?: string | null | undefined;
1446
1699
  showTotalRaised?: boolean | undefined;
1700
+ hasEscrow?: boolean | undefined;
1701
+ escrowAgreementFileId?: string | null | undefined;
1702
+ bankAccountId?: string | null | undefined;
1703
+ escrowAccountId?: string | null | undefined;
1447
1704
  assetName?: string | undefined;
1448
1705
  assetType?: AssetType | undefined;
1449
1706
  pricePerUnit?: number | null | undefined;
@@ -1453,6 +1710,16 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
1453
1710
  durationType?: DurationType | null | undefined;
1454
1711
  tiers?: number[] | null | undefined;
1455
1712
  enableBonus?: boolean | undefined;
1713
+ principalAmount?: number | null | undefined;
1714
+ maxTotalRaise?: number | null | undefined;
1715
+ interestRate?: number | null | undefined;
1716
+ interestType?: InterestType | null | undefined;
1717
+ bonusTiers?: {
1718
+ value: number;
1719
+ type: import("./bonus-tier.types").BonusType;
1720
+ startAmount: number;
1721
+ endAmount: number;
1722
+ }[] | undefined;
1456
1723
  entitySubscriptionAgreementTemplateId?: string | null | undefined;
1457
1724
  subscriptionAgreementTemplateId?: string | null | undefined;
1458
1725
  jointSubscriptionAgreementTemplateId?: string | null | undefined;
@@ -2333,3 +2600,55 @@ export declare const IPaginatedOnboardingOfferingSummaryResponse: z.ZodObject<{
2333
2600
  };
2334
2601
  }>;
2335
2602
  export type IPaginatedOnboardingOfferingSummaryResponse = z.infer<typeof IPaginatedOnboardingOfferingSummaryResponse>;
2603
+ /**
2604
+ * Maps asset types to fields that should be reset (nullified) when converting
2605
+ * from one asset type to another. This ensures incompatible fields from the
2606
+ * previous type are cleared when the asset type changes.
2607
+ */
2608
+ export declare const ESCROW_ENABLED_OFFERING_FIELD_RESETS: Partial<IOffering>;
2609
+ /**
2610
+ * Schema for escrow validation data input
2611
+ */
2612
+ export declare const EscrowValidationDataZod: z.ZodObject<{
2613
+ hasEscrow: z.ZodOptional<z.ZodBoolean>;
2614
+ bankAccountId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2615
+ escrowAccountId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2616
+ escrowAgreementFileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2617
+ }, "strip", z.ZodTypeAny, {
2618
+ hasEscrow?: boolean | undefined;
2619
+ escrowAgreementFileId?: string | null | undefined;
2620
+ bankAccountId?: string | null | undefined;
2621
+ escrowAccountId?: string | null | undefined;
2622
+ }, {
2623
+ hasEscrow?: boolean | undefined;
2624
+ escrowAgreementFileId?: string | null | undefined;
2625
+ bankAccountId?: string | null | undefined;
2626
+ escrowAccountId?: string | null | undefined;
2627
+ }>;
2628
+ export type EscrowValidationData = z.infer<typeof EscrowValidationDataZod>;
2629
+ /**
2630
+ * Schema for escrow validation context
2631
+ */
2632
+ export declare const EscrowValidationContextZod: z.ZodObject<{
2633
+ accountId: z.ZodString;
2634
+ issuerId: z.ZodString;
2635
+ offeringId: z.ZodString;
2636
+ currentBankAccountId: z.ZodNullable<z.ZodString>;
2637
+ currentEscrowAccountId: z.ZodNullable<z.ZodString>;
2638
+ currentEscrowAgreementFileId: z.ZodNullable<z.ZodString>;
2639
+ }, "strip", z.ZodTypeAny, {
2640
+ accountId: string;
2641
+ offeringId: string;
2642
+ issuerId: string;
2643
+ currentBankAccountId: string | null;
2644
+ currentEscrowAccountId: string | null;
2645
+ currentEscrowAgreementFileId: string | null;
2646
+ }, {
2647
+ accountId: string;
2648
+ offeringId: string;
2649
+ issuerId: string;
2650
+ currentBankAccountId: string | null;
2651
+ currentEscrowAccountId: string | null;
2652
+ currentEscrowAgreementFileId: string | null;
2653
+ }>;
2654
+ 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';
11
- import { postAssetRefinement, AssetTemplateType } from './asset.types.js';
10
+ import { OfferingStatus, escrowValidationRefinement, } from './issuer-offering.types.js';
11
+ import { postAssetRefinement, AssetTemplateType, InterestType, } 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,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
+ principalAmount: z
216
+ .number()
217
+ .int()
218
+ .positive()
219
+ .max(10000000000)
220
+ .nullable()
221
+ .optional()
222
+ .openapi({ example: 1000 }),
223
+ maxTotalRaise: z
224
+ .number()
225
+ .int()
226
+ .positive()
227
+ .max(10000000000)
228
+ .nullable()
229
+ .optional()
230
+ .openapi({ example: 100 }),
231
+ interestRate: z
232
+ .number()
233
+ .min(0.01)
234
+ .max(100)
235
+ .nullable()
236
+ .optional()
237
+ .openapi({ example: 10 }),
238
+ interestType: z
239
+ .nativeEnum(InterestType)
240
+ .nullable()
241
+ .optional()
242
+ .openapi({ example: InterestType.SIMPLE }),
243
+ bonusTiers: BonusTierListZod.optional(),
244
+ hasEscrow: z.boolean().optional(),
245
+ bankAccountId: z
246
+ .lazy(() => issuerBankAccountIdSchema)
247
+ .nullable()
248
+ .optional(),
249
+ escrowAccountId: z
250
+ .lazy(() => escrowAccountIdSchema)
251
+ .nullable()
252
+ .optional(),
253
+ escrowAgreementFileId: z
254
+ .lazy(() => fileIdSchema)
255
+ .nullable()
256
+ .optional(),
200
257
  }));
201
258
  export const PostComplianceOffering = PatchOfferingBase.merge(z.object({
202
259
  accountId: z.lazy(() => accountIdSchema),
@@ -240,7 +297,52 @@ export const PostComplianceOffering = PatchOfferingBase.merge(z.object({
240
297
  .openapi({ example: AssetTemplateType.STANDARD }),
241
298
  tiers: z.array(z.number().positive()).nullable().optional(),
242
299
  enableBonus: z.boolean().default(false).optional(),
243
- })).superRefine(postAssetRefinement);
300
+ hasEscrow: z.boolean().optional(),
301
+ bankAccountId: z
302
+ .lazy(() => issuerBankAccountIdSchema)
303
+ .nullable()
304
+ .optional(),
305
+ escrowAccountId: z
306
+ .lazy(() => escrowAccountIdSchema)
307
+ .nullable()
308
+ .optional(),
309
+ principalAmount: z
310
+ .number()
311
+ .int()
312
+ .positive()
313
+ .max(10000000000)
314
+ .nullable()
315
+ .optional()
316
+ .openapi({ example: 1000 }),
317
+ maxTotalRaise: z
318
+ .number()
319
+ .int()
320
+ .positive()
321
+ .max(10000000000)
322
+ .nullable()
323
+ .optional()
324
+ .openapi({ example: 100 }),
325
+ interestRate: z
326
+ .number()
327
+ .min(0.01)
328
+ .max(100)
329
+ .nullable()
330
+ .optional()
331
+ .openapi({ example: 10 }),
332
+ interestType: z
333
+ .nativeEnum(InterestType)
334
+ .nullable()
335
+ .optional()
336
+ .openapi({ example: InterestType.SIMPLE }),
337
+ bonusTiers: BonusTierListZod.optional(),
338
+ })).superRefine((data, ctx) => {
339
+ // Apply asset-specific refinements
340
+ postAssetRefinement(data, ctx);
341
+ // Apply escrow-specific refinements
342
+ escrowValidationRefinement(data, ctx, HttpMethod.POST);
343
+ // Apply bonus-tier-specific refinements
344
+ postBonusTierRefinement(data, ctx);
345
+ });
244
346
  export const offeringsInclude = z.enum([
245
347
  'account',
246
348
  'issuer',
@@ -388,15 +490,22 @@ export const OfferingSettings = BaseOfferingSettings.refine((data) => (data.sett
388
490
  });
389
491
  export const PatchComplianceOffering = z
390
492
  .intersection(PatchOffering, OfferingSettings)
391
- .refine((data) => {
493
+ .superRefine((data, ctx) => {
392
494
  // 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;
495
+ if (typeof data.minInvestment === 'number' &&
496
+ typeof data.maxInvestment === 'number') {
497
+ if (data.minInvestment >= data.maxInvestment) {
498
+ ctx.addIssue({
499
+ code: z.ZodIssueCode.custom,
500
+ message: 'Minimum investment must be less than maximum investment.',
501
+ path: ['minInvestment'],
502
+ });
503
+ }
395
504
  }
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'],
505
+ // Apply escrow-specific refinements
506
+ escrowValidationRefinement(data, ctx, HttpMethod.PATCH);
507
+ // Apply bonus-tier-specific refinements
508
+ postBonusTierRefinement(data, ctx);
400
509
  });
401
510
  export const IComplianceOffering = z.intersection(IOffering, OfferingSettings);
402
511
  export const IPaginatedComplianceOffering = z.object({
@@ -502,4 +611,34 @@ export const IPaginatedOnboardingOfferingSummaryResponse = z.object({
502
611
  items: z.array(OnboardingOfferingSummaryZod),
503
612
  meta: IPaginationMeta,
504
613
  });
614
+ /**
615
+ * Maps asset types to fields that should be reset (nullified) when converting
616
+ * from one asset type to another. This ensures incompatible fields from the
617
+ * previous type are cleared when the asset type changes.
618
+ */
619
+ export const ESCROW_ENABLED_OFFERING_FIELD_RESETS = {
620
+ bankAccountId: null,
621
+ escrowAccountId: null,
622
+ escrowAgreementFileId: null,
623
+ };
624
+ /**
625
+ * Schema for escrow validation data input
626
+ */
627
+ export const EscrowValidationDataZod = z.object({
628
+ hasEscrow: z.boolean().optional(),
629
+ bankAccountId: z.string().nullable().optional(),
630
+ escrowAccountId: z.string().nullable().optional(),
631
+ escrowAgreementFileId: z.string().nullable().optional(),
632
+ });
633
+ /**
634
+ * Schema for escrow validation context
635
+ */
636
+ export const EscrowValidationContextZod = z.object({
637
+ accountId: z.string(),
638
+ issuerId: z.string(),
639
+ offeringId: z.string(),
640
+ currentBankAccountId: z.string().nullable(),
641
+ currentEscrowAccountId: z.string().nullable(),
642
+ currentEscrowAgreementFileId: z.string().nullable(),
643
+ });
505
644
  //# sourceMappingURL=offering.types.js.map