@dalmore/api-contracts 0.0.0-dev.2cea8e5 → 0.0.0-dev.2fec89f
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.
- package/common/constants.d.ts +43 -0
- package/common/constants.js +77 -0
- package/common/constants.js.map +1 -0
- package/common/helpers/index.d.ts +27 -0
- package/common/helpers/index.js +43 -0
- package/common/helpers/index.js.map +1 -1
- package/common/types/account-setting.types.d.ts +5 -0
- package/common/types/account.types.d.ts +6 -6
- package/common/types/account.types.js +3 -3
- package/common/types/account.types.js.map +1 -1
- package/common/types/attribution.types.d.ts +578 -0
- package/common/types/attribution.types.js +152 -0
- package/common/types/attribution.types.js.map +1 -0
- package/common/types/auth.types.d.ts +36 -0
- package/common/types/auth.types.js +3 -2
- package/common/types/auth.types.js.map +1 -1
- package/common/types/cap-table.types.d.ts +211 -39
- package/common/types/cap-table.types.js +35 -0
- package/common/types/cap-table.types.js.map +1 -1
- package/common/types/common.types.d.ts +42 -5
- package/common/types/common.types.js +24 -3
- package/common/types/common.types.js.map +1 -1
- package/common/types/comply-advantage-api.types.d.ts +12 -12
- package/common/types/csv.types.d.ts +3612 -0
- package/common/types/csv.types.js +290 -0
- package/common/types/csv.types.js.map +1 -0
- package/common/types/disbursement-transaction.types.d.ts +1 -1
- package/common/types/disbursement-transaction.types.js +1 -1
- package/common/types/disbursement-transaction.types.js.map +1 -1
- package/common/types/disbursements.types.d.ts +134 -19
- package/common/types/disbursements.types.js +30 -3
- package/common/types/disbursements.types.js.map +1 -1
- package/common/types/exchange-provider.types.d.ts +12 -12
- package/common/types/file.types.d.ts +3 -0
- package/common/types/file.types.js +3 -0
- package/common/types/file.types.js.map +1 -1
- package/common/types/index.d.ts +3 -2
- package/common/types/index.js +3 -2
- package/common/types/index.js.map +1 -1
- package/common/types/individuals.types.d.ts +395 -5
- package/common/types/individuals.types.js +11 -14
- package/common/types/individuals.types.js.map +1 -1
- package/common/types/investor-account.types.d.ts +1 -1
- package/common/types/investor-account.types.js +3 -2
- package/common/types/investor-account.types.js.map +1 -1
- package/common/types/investors-offering.types.d.ts +8 -0
- package/common/types/investors-offering.types.js +1 -0
- package/common/types/investors-offering.types.js.map +1 -1
- package/common/types/invite.types.d.ts +5 -2
- package/common/types/invite.types.js +2 -1
- package/common/types/invite.types.js.map +1 -1
- package/common/types/issuer-offering.types.d.ts +200 -12
- package/common/types/issuer-offering.types.js +45 -31
- package/common/types/issuer-offering.types.js.map +1 -1
- package/common/types/legal-entity.types.d.ts +39 -1
- package/common/types/legal-entity.types.js +8 -5
- package/common/types/legal-entity.types.js.map +1 -1
- package/common/types/mail-template.types.d.ts +4 -4
- package/common/types/notification.types.d.ts +1 -0
- package/common/types/notification.types.js +3 -0
- package/common/types/notification.types.js.map +1 -1
- package/common/types/offering-submission.types.js +1 -1
- package/common/types/offering.types.d.ts +60 -30
- package/common/types/offering.types.js +78 -18
- package/common/types/offering.types.js.map +1 -1
- package/common/types/payment-methods.types.d.ts +365 -0
- package/common/types/payment-methods.types.js +121 -0
- package/common/types/payment-methods.types.js.map +1 -1
- package/common/types/portfolio.types.d.ts +6 -6
- package/common/types/reports.types.d.ts +12 -12
- package/common/types/review.types.js +1 -1
- package/common/types/review.types.js.map +1 -1
- package/common/types/secondary-order.types.d.ts +10 -10
- package/common/types/secondary-trade.types.d.ts +10 -10
- package/common/types/site.types.d.ts +12 -12
- package/common/types/state-machine.types.d.ts +3 -3
- package/common/types/state-machine.types.js +1 -1
- package/common/types/state-machine.types.js.map +1 -1
- package/common/types/task.types.d.ts +8 -0
- package/common/types/task.types.js +3 -0
- package/common/types/task.types.js.map +1 -1
- package/common/types/trade-line-item.types.d.ts +24 -0
- package/common/types/trade-line-item.types.js +3 -0
- package/common/types/trade-line-item.types.js.map +1 -1
- package/common/types/trade.types.d.ts +20 -14
- package/common/types/trade.types.js +17 -7
- package/common/types/trade.types.js.map +1 -1
- package/common/types/transaction.types.d.ts +24 -2
- package/common/types/transaction.types.js +26 -1
- package/common/types/transaction.types.js.map +1 -1
- package/common/types/user.types.d.ts +73 -95
- package/common/types/user.types.js +7 -26
- package/common/types/user.types.js.map +1 -1
- package/common/types/zapier.types.d.ts +126 -0
- package/common/types/zapier.types.js +247 -0
- package/common/types/zapier.types.js.map +1 -0
- package/contracts/clients/csv/index.d.ts +1988 -0
- package/contracts/clients/csv/index.js +96 -0
- package/contracts/clients/csv/index.js.map +1 -0
- package/contracts/clients/index.d.ts +3949 -1061
- package/contracts/clients/index.js +8 -2
- package/contracts/clients/index.js.map +1 -1
- package/contracts/clients/individuals/index.d.ts +381 -5
- package/contracts/clients/legal-entities/index.d.ts +1 -1
- package/contracts/clients/offerings/index.d.ts +20 -5
- package/contracts/clients/review/index.d.ts +85 -0
- package/contracts/clients/review/index.js +27 -0
- package/contracts/clients/review/index.js.map +1 -0
- package/contracts/clients/webhooks/index.d.ts +506 -0
- package/contracts/clients/webhooks/index.js +118 -0
- package/contracts/clients/webhooks/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ComplianceReview, OfferingType, ManagedByType, SortOrder, SortBy, OfferingVersioningType, OfferingOnboardingStatus, AssetType, DurationType, WarrantSharesCalculationMethod } from './common.types';
|
|
3
|
-
import { OfferingStatus } from './issuer-offering.types';
|
|
4
3
|
import { AssetTemplateType } from './asset.types';
|
|
5
4
|
export declare enum OfferingFeeType {
|
|
6
5
|
FIXED = "FIXED",
|
|
@@ -27,6 +26,14 @@ export declare const OfferingPlatformSettings: z.ZodObject<{
|
|
|
27
26
|
export type OfferingPlatformSettings = z.infer<typeof OfferingPlatformSettings>;
|
|
28
27
|
export declare const IOffering: any;
|
|
29
28
|
export type IOffering = z.infer<typeof IOffering>;
|
|
29
|
+
export declare const QueueSoldOutOfferingsCheckResponseSchema: z.ZodObject<{
|
|
30
|
+
message: z.ZodString;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
message: string;
|
|
33
|
+
}, {
|
|
34
|
+
message: string;
|
|
35
|
+
}>;
|
|
36
|
+
export type QueueSoldOutOfferingsCheckResponse = z.infer<typeof QueueSoldOutOfferingsCheckResponseSchema>;
|
|
30
37
|
export declare const IPaginatedOffering: z.ZodObject<{
|
|
31
38
|
items: z.ZodArray<any, "many">;
|
|
32
39
|
meta: z.ZodObject<{
|
|
@@ -68,9 +75,11 @@ export declare const IPaginatedOffering: z.ZodObject<{
|
|
|
68
75
|
};
|
|
69
76
|
}>;
|
|
70
77
|
export type IPaginatedOffering = z.infer<typeof IPaginatedOffering>;
|
|
78
|
+
export declare const OfferingDescriptionZod: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, string | null | undefined>, string | null | undefined, string | null | undefined>;
|
|
79
|
+
export type OfferingDescriptionZod = z.infer<typeof OfferingDescriptionZod>;
|
|
71
80
|
export declare const PatchOfferingBase: z.ZodObject<{
|
|
72
81
|
name: z.ZodOptional<z.ZodString>;
|
|
73
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
82
|
+
description: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, string | null | undefined>, string | null | undefined, string | null | undefined>;
|
|
74
83
|
tid: z.ZodOptional<z.ZodString>;
|
|
75
84
|
type: z.ZodOptional<z.ZodNativeEnum<typeof OfferingType>>;
|
|
76
85
|
targetAmount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -113,6 +122,7 @@ export declare const PatchOfferingBase: z.ZodObject<{
|
|
|
113
122
|
cancellationPeriod: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
114
123
|
showTotalRaised: z.ZodOptional<z.ZodBoolean>;
|
|
115
124
|
issuerId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
125
|
+
shareClassId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
|
|
116
126
|
}, "strip", z.ZodTypeAny, {
|
|
117
127
|
platformSettings: string | null;
|
|
118
128
|
type?: OfferingType | undefined;
|
|
@@ -135,6 +145,7 @@ export declare const PatchOfferingBase: z.ZodObject<{
|
|
|
135
145
|
memorandumId?: string | null | undefined;
|
|
136
146
|
subscriptionAgreementId?: string | null | undefined;
|
|
137
147
|
showTotalRaised?: boolean | undefined;
|
|
148
|
+
shareClassId?: string | null | undefined;
|
|
138
149
|
entitySubscriptionAgreementTemplateId?: string | null | undefined;
|
|
139
150
|
subscriptionAgreementTemplateId?: string | null | undefined;
|
|
140
151
|
jointSubscriptionAgreementTemplateId?: string | null | undefined;
|
|
@@ -165,13 +176,14 @@ export declare const PatchOfferingBase: z.ZodObject<{
|
|
|
165
176
|
memorandumId?: string | null | undefined;
|
|
166
177
|
subscriptionAgreementId?: string | null | undefined;
|
|
167
178
|
showTotalRaised?: boolean | undefined;
|
|
179
|
+
shareClassId?: string | null | undefined;
|
|
168
180
|
entitySubscriptionAgreementTemplateId?: string | null | undefined;
|
|
169
181
|
subscriptionAgreementTemplateId?: string | null | undefined;
|
|
170
182
|
jointSubscriptionAgreementTemplateId?: string | null | undefined;
|
|
171
183
|
}>;
|
|
172
184
|
export declare const PatchOffering: z.ZodObject<{
|
|
173
185
|
name: z.ZodOptional<z.ZodString>;
|
|
174
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
186
|
+
description: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, string | null | undefined>, string | null | undefined, string | null | undefined>;
|
|
175
187
|
tid: z.ZodOptional<z.ZodString>;
|
|
176
188
|
type: z.ZodOptional<z.ZodNativeEnum<typeof OfferingType>>;
|
|
177
189
|
targetAmount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -214,6 +226,7 @@ export declare const PatchOffering: z.ZodObject<{
|
|
|
214
226
|
cancellationPeriod: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
215
227
|
showTotalRaised: z.ZodOptional<z.ZodBoolean>;
|
|
216
228
|
issuerId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
229
|
+
shareClassId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
|
|
217
230
|
} & {
|
|
218
231
|
assetName: z.ZodOptional<z.ZodString>;
|
|
219
232
|
assetType: z.ZodOptional<z.ZodNativeEnum<typeof AssetType>>;
|
|
@@ -307,6 +320,7 @@ export declare const PatchOffering: z.ZodObject<{
|
|
|
307
320
|
warrantPercentage?: number | null | undefined;
|
|
308
321
|
calculationMethod?: WarrantSharesCalculationMethod | null | undefined;
|
|
309
322
|
incrementThreshold?: number | null | undefined;
|
|
323
|
+
shareClassId?: string | null | undefined;
|
|
310
324
|
assetName?: string | undefined;
|
|
311
325
|
assetType?: AssetType | undefined;
|
|
312
326
|
pricePerUnit?: number | null | undefined;
|
|
@@ -365,6 +379,7 @@ export declare const PatchOffering: z.ZodObject<{
|
|
|
365
379
|
warrantPercentage?: number | null | undefined;
|
|
366
380
|
calculationMethod?: WarrantSharesCalculationMethod | null | undefined;
|
|
367
381
|
incrementThreshold?: number | null | undefined;
|
|
382
|
+
shareClassId?: string | null | undefined;
|
|
368
383
|
assetName?: string | undefined;
|
|
369
384
|
assetType?: AssetType | undefined;
|
|
370
385
|
pricePerUnit?: number | null | undefined;
|
|
@@ -430,7 +445,7 @@ export declare const ResolvedOfferingUpdateFieldsZod: z.ZodObject<{
|
|
|
430
445
|
export type ResolvedOfferingUpdateFields = z.infer<typeof ResolvedOfferingUpdateFieldsZod>;
|
|
431
446
|
export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
|
|
432
447
|
name: z.ZodOptional<z.ZodString>;
|
|
433
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
448
|
+
description: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, string | null | undefined>, string | null | undefined, string | null | undefined>;
|
|
434
449
|
tid: z.ZodOptional<z.ZodString>;
|
|
435
450
|
type: z.ZodOptional<z.ZodNativeEnum<typeof OfferingType>>;
|
|
436
451
|
targetAmount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -470,11 +485,11 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
|
|
|
470
485
|
subscriptionAgreementId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
|
|
471
486
|
jointSubscriptionAgreementTemplateId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
472
487
|
cancellationPeriod: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
473
|
-
showTotalRaised: z.ZodOptional<z.ZodBoolean>;
|
|
474
488
|
issuerId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
475
489
|
} & {
|
|
476
490
|
accountId: z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>;
|
|
477
491
|
managedBy: z.ZodOptional<z.ZodNativeEnum<typeof ManagedByType>>;
|
|
492
|
+
shareClassId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
|
|
478
493
|
assetName: z.ZodString;
|
|
479
494
|
assetType: z.ZodNativeEnum<typeof AssetType>;
|
|
480
495
|
pricePerUnit: z.ZodNullable<z.ZodNumber>;
|
|
@@ -532,6 +547,7 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
|
|
|
532
547
|
warrantPercentage: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, number, number>>>;
|
|
533
548
|
calculationMethod: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof WarrantSharesCalculationMethod>>>;
|
|
534
549
|
incrementThreshold: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, number, number>>>;
|
|
550
|
+
showTotalRaised: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
535
551
|
}, "strip", z.ZodTypeAny, {
|
|
536
552
|
accountId: string;
|
|
537
553
|
template: AssetTemplateType;
|
|
@@ -570,6 +586,7 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
|
|
|
570
586
|
warrantPercentage?: number | null | undefined;
|
|
571
587
|
calculationMethod?: WarrantSharesCalculationMethod | null | undefined;
|
|
572
588
|
incrementThreshold?: number | null | undefined;
|
|
589
|
+
shareClassId?: string | null | undefined;
|
|
573
590
|
yield?: number | null | undefined;
|
|
574
591
|
duration?: number | null | undefined;
|
|
575
592
|
durationType?: DurationType | null | undefined;
|
|
@@ -628,6 +645,7 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
|
|
|
628
645
|
warrantPercentage?: number | null | undefined;
|
|
629
646
|
calculationMethod?: WarrantSharesCalculationMethod | null | undefined;
|
|
630
647
|
incrementThreshold?: number | null | undefined;
|
|
648
|
+
shareClassId?: string | null | undefined;
|
|
631
649
|
yield?: number | null | undefined;
|
|
632
650
|
duration?: number | null | undefined;
|
|
633
651
|
durationType?: DurationType | null | undefined;
|
|
@@ -681,6 +699,7 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
|
|
|
681
699
|
warrantPercentage?: number | null | undefined;
|
|
682
700
|
calculationMethod?: WarrantSharesCalculationMethod | null | undefined;
|
|
683
701
|
incrementThreshold?: number | null | undefined;
|
|
702
|
+
shareClassId?: string | null | undefined;
|
|
684
703
|
yield?: number | null | undefined;
|
|
685
704
|
duration?: number | null | undefined;
|
|
686
705
|
durationType?: DurationType | null | undefined;
|
|
@@ -739,6 +758,7 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
|
|
|
739
758
|
warrantPercentage?: number | null | undefined;
|
|
740
759
|
calculationMethod?: WarrantSharesCalculationMethod | null | undefined;
|
|
741
760
|
incrementThreshold?: number | null | undefined;
|
|
761
|
+
shareClassId?: string | null | undefined;
|
|
742
762
|
yield?: number | null | undefined;
|
|
743
763
|
duration?: number | null | undefined;
|
|
744
764
|
durationType?: DurationType | null | undefined;
|
|
@@ -756,7 +776,7 @@ export declare const PostComplianceOffering: z.ZodEffects<z.ZodObject<{
|
|
|
756
776
|
jointSubscriptionAgreementTemplateId?: string | null | undefined;
|
|
757
777
|
}>;
|
|
758
778
|
export type PostComplianceOffering = z.infer<typeof PostComplianceOffering>;
|
|
759
|
-
export declare const offeringsInclude: z.ZodEnum<["account", "issuer", "trades", "assets", "disbursements", "draftVersion", "publishedVersion", "revisions", "onboardingReviewedBy", "bankAccount", "escrowAccount"]>;
|
|
779
|
+
export declare const offeringsInclude: z.ZodEnum<["account", "issuer", "trades", "assets", "disbursements", "draftVersion", "publishedVersion", "revisions", "onboardingReviewedBy", "bankAccount", "escrowAccount", "shareClass"]>;
|
|
760
780
|
/**
|
|
761
781
|
* @description Query parameters for including related entities
|
|
762
782
|
* @xample in contract us as -> query: z.object({}).merge(UsersIncludeQuery),
|
|
@@ -771,23 +791,27 @@ export declare const OfferingsIncludeQuery: z.ZodObject<{
|
|
|
771
791
|
export interface OfferingsIncludeQuery extends z.infer<typeof OfferingsIncludeQuery> {
|
|
772
792
|
}
|
|
773
793
|
/**
|
|
774
|
-
*
|
|
775
|
-
* Filters for querying offerings.
|
|
794
|
+
* Filters supported for querying offerings.
|
|
776
795
|
*
|
|
777
|
-
*
|
|
778
|
-
* -
|
|
779
|
-
* -
|
|
780
|
-
* -
|
|
796
|
+
* Available fields:
|
|
797
|
+
* - `issuerName`: (string, optional) Filter by name of the issuer.
|
|
798
|
+
* - `name`: (string, optional) Filter by offering name.
|
|
799
|
+
* - `accountId`: (AccountId, optional) Filter by tenant/account ID.
|
|
800
|
+
* - `issuerId`: (IssuerId, optional) Filter by issuer ID.
|
|
801
|
+
* - `type`: (OfferingType, optional) Filter by offering type.
|
|
802
|
+
* - `status`: (ComplianceReview, optional) Filter by compliance review status.
|
|
803
|
+
* - `enabled`: (boolean, optional) Filter for enabled/active offerings.
|
|
804
|
+
* - `managedBy`: (ManagedByType, optional) Filter by which system or user manages the offering.
|
|
805
|
+
* - `versioningType`: (OfferingVersioningType, optional) Filter by versioning strategy.
|
|
806
|
+
* - `onboardingStatus`: (OfferingOnboardingStatus, optional) Filter by issuer onboarding status.
|
|
781
807
|
*
|
|
782
|
-
*
|
|
783
|
-
*
|
|
784
|
-
* 2. Else if complianceReview is not "APPROVED" → combinedStatus = "IN_COMPLIANCE_REVIEW"
|
|
785
|
-
* 3. Else if onboardingStatus is "COMPLETE" and complianceReview is "APPROVED" →
|
|
786
|
-
* - If enabled is true → combinedStatus = "ACTIVE"
|
|
787
|
-
* - If enabled is false → combinedStatus = "PAUSED"
|
|
808
|
+
* @remarks
|
|
809
|
+
* These filters can be combined to query offerings across multiple dimensions.
|
|
788
810
|
*
|
|
789
|
-
*
|
|
790
|
-
*
|
|
811
|
+
* Example use:
|
|
812
|
+
* ```ts
|
|
813
|
+
* { issuerName: "ABC Capital", type: OfferingType.REG_A }
|
|
814
|
+
* ```
|
|
791
815
|
*/
|
|
792
816
|
export declare const OfferingFiltersZod: z.ZodObject<{
|
|
793
817
|
issuerName: z.ZodOptional<z.ZodString>;
|
|
@@ -799,32 +823,32 @@ export declare const OfferingFiltersZod: z.ZodObject<{
|
|
|
799
823
|
enabled: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
800
824
|
managedBy: z.ZodOptional<z.ZodNativeEnum<typeof ManagedByType>>;
|
|
801
825
|
versioningType: z.ZodOptional<z.ZodNativeEnum<typeof OfferingVersioningType>>;
|
|
802
|
-
combinedStatus: z.ZodOptional<z.ZodNativeEnum<typeof OfferingStatus>>;
|
|
803
826
|
onboardingStatus: z.ZodOptional<z.ZodNativeEnum<typeof OfferingOnboardingStatus>>;
|
|
827
|
+
complianceReview: z.ZodOptional<z.ZodNativeEnum<typeof ComplianceReview>>;
|
|
804
828
|
}, "strip", z.ZodTypeAny, {
|
|
805
829
|
type?: OfferingType | undefined;
|
|
806
830
|
status?: ComplianceReview | undefined;
|
|
807
831
|
accountId?: string | undefined;
|
|
808
832
|
name?: string | undefined;
|
|
809
833
|
managedBy?: ManagedByType | undefined;
|
|
834
|
+
complianceReview?: ComplianceReview | undefined;
|
|
810
835
|
onboardingStatus?: OfferingOnboardingStatus | undefined;
|
|
811
836
|
enabled?: boolean | undefined;
|
|
812
837
|
issuerId?: string | undefined;
|
|
813
838
|
issuerName?: string | undefined;
|
|
814
839
|
versioningType?: OfferingVersioningType | undefined;
|
|
815
|
-
combinedStatus?: OfferingStatus | undefined;
|
|
816
840
|
}, {
|
|
817
841
|
type?: OfferingType | undefined;
|
|
818
842
|
status?: ComplianceReview | undefined;
|
|
819
843
|
accountId?: string | undefined;
|
|
820
844
|
name?: string | undefined;
|
|
821
845
|
managedBy?: ManagedByType | undefined;
|
|
846
|
+
complianceReview?: ComplianceReview | undefined;
|
|
822
847
|
onboardingStatus?: OfferingOnboardingStatus | undefined;
|
|
823
848
|
enabled?: unknown;
|
|
824
849
|
issuerId?: string | undefined;
|
|
825
850
|
issuerName?: string | undefined;
|
|
826
851
|
versioningType?: OfferingVersioningType | undefined;
|
|
827
|
-
combinedStatus?: OfferingStatus | undefined;
|
|
828
852
|
}>;
|
|
829
853
|
export type OfferingFiltersZod = z.infer<typeof OfferingFiltersZod>;
|
|
830
854
|
export declare const OfferingSortZod: z.ZodObject<{
|
|
@@ -1251,7 +1275,7 @@ export declare const OfferingSettings: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.
|
|
|
1251
1275
|
export type OfferingSettings = z.infer<typeof OfferingSettings>;
|
|
1252
1276
|
export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.ZodObject<{
|
|
1253
1277
|
name: z.ZodOptional<z.ZodString>;
|
|
1254
|
-
description: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
1278
|
+
description: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, string | null | undefined>, string | null | undefined, string | null | undefined>;
|
|
1255
1279
|
tid: z.ZodOptional<z.ZodString>;
|
|
1256
1280
|
type: z.ZodOptional<z.ZodNativeEnum<typeof OfferingType>>;
|
|
1257
1281
|
targetAmount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1294,6 +1318,7 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
|
|
|
1294
1318
|
cancellationPeriod: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
1295
1319
|
showTotalRaised: z.ZodOptional<z.ZodBoolean>;
|
|
1296
1320
|
issuerId: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
1321
|
+
shareClassId: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodEffects<z.ZodString, string, string>>>>;
|
|
1297
1322
|
} & {
|
|
1298
1323
|
assetName: z.ZodOptional<z.ZodString>;
|
|
1299
1324
|
assetType: z.ZodOptional<z.ZodNativeEnum<typeof AssetType>>;
|
|
@@ -1387,6 +1412,7 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
|
|
|
1387
1412
|
warrantPercentage?: number | null | undefined;
|
|
1388
1413
|
calculationMethod?: WarrantSharesCalculationMethod | null | undefined;
|
|
1389
1414
|
incrementThreshold?: number | null | undefined;
|
|
1415
|
+
shareClassId?: string | null | undefined;
|
|
1390
1416
|
assetName?: string | undefined;
|
|
1391
1417
|
assetType?: AssetType | undefined;
|
|
1392
1418
|
pricePerUnit?: number | null | undefined;
|
|
@@ -1445,6 +1471,7 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
|
|
|
1445
1471
|
warrantPercentage?: number | null | undefined;
|
|
1446
1472
|
calculationMethod?: WarrantSharesCalculationMethod | null | undefined;
|
|
1447
1473
|
incrementThreshold?: number | null | undefined;
|
|
1474
|
+
shareClassId?: string | null | undefined;
|
|
1448
1475
|
assetName?: string | undefined;
|
|
1449
1476
|
assetType?: AssetType | undefined;
|
|
1450
1477
|
pricePerUnit?: number | null | undefined;
|
|
@@ -1729,6 +1756,7 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
|
|
|
1729
1756
|
warrantPercentage?: number | null | undefined;
|
|
1730
1757
|
calculationMethod?: WarrantSharesCalculationMethod | null | undefined;
|
|
1731
1758
|
incrementThreshold?: number | null | undefined;
|
|
1759
|
+
shareClassId?: string | null | undefined;
|
|
1732
1760
|
assetName?: string | undefined;
|
|
1733
1761
|
assetType?: AssetType | undefined;
|
|
1734
1762
|
pricePerUnit?: number | null | undefined;
|
|
@@ -1798,6 +1826,7 @@ export declare const PatchComplianceOffering: z.ZodEffects<z.ZodIntersection<z.Z
|
|
|
1798
1826
|
warrantPercentage?: number | null | undefined;
|
|
1799
1827
|
calculationMethod?: WarrantSharesCalculationMethod | null | undefined;
|
|
1800
1828
|
incrementThreshold?: number | null | undefined;
|
|
1829
|
+
shareClassId?: string | null | undefined;
|
|
1801
1830
|
assetName?: string | undefined;
|
|
1802
1831
|
assetType?: AssetType | undefined;
|
|
1803
1832
|
pricePerUnit?: number | null | undefined;
|
|
@@ -2551,6 +2580,7 @@ export type OfferingUpdateFields = {
|
|
|
2551
2580
|
managedBy?: ManagedByType | null;
|
|
2552
2581
|
showTotalRaised?: boolean;
|
|
2553
2582
|
enabled?: boolean;
|
|
2583
|
+
shareClassId?: string | null;
|
|
2554
2584
|
};
|
|
2555
2585
|
export declare const ReviewOfferingOnboarding: z.ZodObject<{
|
|
2556
2586
|
onboardingStatus: z.ZodNativeEnum<typeof OfferingOnboardingStatus>;
|
|
@@ -2576,20 +2606,20 @@ export declare const OnboardingOfferingSummaryZod: z.ZodObject<{
|
|
|
2576
2606
|
offeringId: string;
|
|
2577
2607
|
memorandumId: string | null;
|
|
2578
2608
|
subscriptionAgreementId: string | null;
|
|
2609
|
+
offeringName: string;
|
|
2579
2610
|
entitySubscriptionAgreementTemplateId: string | null;
|
|
2580
2611
|
subscriptionAgreementTemplateId: string | null;
|
|
2581
2612
|
jointSubscriptionAgreementTemplateId: string | null;
|
|
2582
|
-
offeringName: string;
|
|
2583
2613
|
}, {
|
|
2584
2614
|
accountId: string;
|
|
2585
2615
|
accountName: string;
|
|
2586
2616
|
offeringId: string;
|
|
2587
2617
|
memorandumId: string | null;
|
|
2588
2618
|
subscriptionAgreementId: string | null;
|
|
2619
|
+
offeringName: string;
|
|
2589
2620
|
entitySubscriptionAgreementTemplateId: string | null;
|
|
2590
2621
|
subscriptionAgreementTemplateId: string | null;
|
|
2591
2622
|
jointSubscriptionAgreementTemplateId: string | null;
|
|
2592
|
-
offeringName: string;
|
|
2593
2623
|
}>;
|
|
2594
2624
|
export type OnboardingOfferingSummaryZod = z.infer<typeof OnboardingOfferingSummaryZod>;
|
|
2595
2625
|
export declare const OnboardingOfferingSummaryFilterZod: z.ZodObject<{
|
|
@@ -2620,20 +2650,20 @@ export declare const IPaginatedOnboardingOfferingSummaryResponse: z.ZodObject<{
|
|
|
2620
2650
|
offeringId: string;
|
|
2621
2651
|
memorandumId: string | null;
|
|
2622
2652
|
subscriptionAgreementId: string | null;
|
|
2653
|
+
offeringName: string;
|
|
2623
2654
|
entitySubscriptionAgreementTemplateId: string | null;
|
|
2624
2655
|
subscriptionAgreementTemplateId: string | null;
|
|
2625
2656
|
jointSubscriptionAgreementTemplateId: string | null;
|
|
2626
|
-
offeringName: string;
|
|
2627
2657
|
}, {
|
|
2628
2658
|
accountId: string;
|
|
2629
2659
|
accountName: string;
|
|
2630
2660
|
offeringId: string;
|
|
2631
2661
|
memorandumId: string | null;
|
|
2632
2662
|
subscriptionAgreementId: string | null;
|
|
2663
|
+
offeringName: string;
|
|
2633
2664
|
entitySubscriptionAgreementTemplateId: string | null;
|
|
2634
2665
|
subscriptionAgreementTemplateId: string | null;
|
|
2635
2666
|
jointSubscriptionAgreementTemplateId: string | null;
|
|
2636
|
-
offeringName: string;
|
|
2637
2667
|
}>, "many">;
|
|
2638
2668
|
meta: z.ZodObject<{
|
|
2639
2669
|
itemCount: z.ZodNumber;
|
|
@@ -2661,10 +2691,10 @@ export declare const IPaginatedOnboardingOfferingSummaryResponse: z.ZodObject<{
|
|
|
2661
2691
|
offeringId: string;
|
|
2662
2692
|
memorandumId: string | null;
|
|
2663
2693
|
subscriptionAgreementId: string | null;
|
|
2694
|
+
offeringName: string;
|
|
2664
2695
|
entitySubscriptionAgreementTemplateId: string | null;
|
|
2665
2696
|
subscriptionAgreementTemplateId: string | null;
|
|
2666
2697
|
jointSubscriptionAgreementTemplateId: string | null;
|
|
2667
|
-
offeringName: string;
|
|
2668
2698
|
}[];
|
|
2669
2699
|
meta: {
|
|
2670
2700
|
itemCount: number;
|
|
@@ -2680,10 +2710,10 @@ export declare const IPaginatedOnboardingOfferingSummaryResponse: z.ZodObject<{
|
|
|
2680
2710
|
offeringId: string;
|
|
2681
2711
|
memorandumId: string | null;
|
|
2682
2712
|
subscriptionAgreementId: string | null;
|
|
2713
|
+
offeringName: string;
|
|
2683
2714
|
entitySubscriptionAgreementTemplateId: string | null;
|
|
2684
2715
|
subscriptionAgreementTemplateId: string | null;
|
|
2685
2716
|
jointSubscriptionAgreementTemplateId: string | null;
|
|
2686
|
-
offeringName: string;
|
|
2687
2717
|
}[];
|
|
2688
2718
|
meta: {
|
|
2689
2719
|
itemCount: number;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { extendZodWithOpenApi } from '@anatine/zod-openapi';
|
|
2
2
|
import { TypeID } from 'typeid-js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
+
import { sanitizeHtmlWithPurify } from '../helpers/index.js';
|
|
4
5
|
import { accountIdSchema } from './account.types.js';
|
|
6
|
+
import { capShareClassIdSchema } from './cap-table.types.js';
|
|
5
7
|
import { AccountZod, ComplianceReview, dateSchema, IPaginationMeta, OfferingType, ManagedByType, PaginationOptionsZod, UrlSchema, SortOrder, SortBy, OfferingVersioningType, OfferingOnboardingStatus, AssetType, DurationType, StringToBooleanSchema, HttpMethod, numberPrecisionSchema, WarrantSharesCalculationMethod, } from './common.types.js';
|
|
6
8
|
import { IBaseEntity } from './entity.types.js';
|
|
7
9
|
import { fileIdSchema, FileZod } from './file.types.js';
|
|
8
10
|
import { IIssuer, issuerIdSchema } from './issuer.types.js';
|
|
9
11
|
import { InvestorsOfferingFiltersZod, InvestorsOfferingsIncludeQuery, } from './investors-offering.types.js';
|
|
10
|
-
import {
|
|
12
|
+
import { escrowValidationRefinement, postOfferingRefinement, warrantsValidationRefinement, } from './issuer-offering.types.js';
|
|
11
13
|
import { postAssetRefinement, AssetTemplateType } from './asset.types.js';
|
|
12
14
|
import { IIssuerBankAccount, issuerBankAccountIdSchema, } from './issuer-bank-account.types.js';
|
|
13
15
|
import { escrowAccountIdSchema, IEscrowAccount } from './escrow-account.types.js';
|
|
@@ -108,14 +110,43 @@ export const IOffering = IBaseEntity.extend({
|
|
|
108
110
|
.optional(),
|
|
109
111
|
incrementThreshold: z.number().nullable().optional(),
|
|
110
112
|
fullyDilutedShares: z.number().nullable().optional(),
|
|
113
|
+
shareClassId: z.string().nullable().optional(),
|
|
114
|
+
soldOut: z.boolean().optional(),
|
|
115
|
+
});
|
|
116
|
+
export const QueueSoldOutOfferingsCheckResponseSchema = z.object({
|
|
117
|
+
message: z.string(),
|
|
111
118
|
});
|
|
112
119
|
export const IPaginatedOffering = z.object({
|
|
113
120
|
items: z.array(IOffering),
|
|
114
121
|
meta: IPaginationMeta,
|
|
115
122
|
});
|
|
123
|
+
export const OfferingDescriptionZod = z
|
|
124
|
+
.string()
|
|
125
|
+
.max(15000, {
|
|
126
|
+
message: 'Description must be 15,000 characters or less before sanitization',
|
|
127
|
+
})
|
|
128
|
+
.nullable()
|
|
129
|
+
.optional()
|
|
130
|
+
.transform((val) => {
|
|
131
|
+
if (!val)
|
|
132
|
+
return val;
|
|
133
|
+
return sanitizeHtmlWithPurify(val);
|
|
134
|
+
})
|
|
135
|
+
.superRefine((val, ctx) => {
|
|
136
|
+
if (val && val.length > 10000) {
|
|
137
|
+
ctx.addIssue({
|
|
138
|
+
code: z.ZodIssueCode.custom,
|
|
139
|
+
message: `Description must be 10,000 characters or less after sanitization found ${val.length} characters`,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
})
|
|
143
|
+
.openapi({ example: 'This is a description of the offering.' });
|
|
116
144
|
export const PatchOfferingBase = z.object({
|
|
117
|
-
name: z
|
|
118
|
-
|
|
145
|
+
name: z
|
|
146
|
+
.string()
|
|
147
|
+
.max(150, { message: 'Name must be 150 characters or less' })
|
|
148
|
+
.optional(),
|
|
149
|
+
description: OfferingDescriptionZod,
|
|
119
150
|
tid: z.string().optional(),
|
|
120
151
|
type: z.nativeEnum(OfferingType).optional(),
|
|
121
152
|
targetAmount: z.number().min(0.01).max(10000000000).optional(),
|
|
@@ -170,6 +201,10 @@ export const PatchOfferingBase = z.object({
|
|
|
170
201
|
cancellationPeriod: z.number().min(1).max(30).optional().nullable(),
|
|
171
202
|
showTotalRaised: z.boolean().optional(),
|
|
172
203
|
issuerId: issuerIdSchema.optional(),
|
|
204
|
+
shareClassId: z
|
|
205
|
+
.lazy(() => capShareClassIdSchema)
|
|
206
|
+
.nullable()
|
|
207
|
+
.optional(),
|
|
173
208
|
});
|
|
174
209
|
export const PatchOffering = PatchOfferingBase.merge(z.object({
|
|
175
210
|
assetName: z
|
|
@@ -302,6 +337,11 @@ export const ResolvedOfferingUpdateFieldsZod = z.object({
|
|
|
302
337
|
export const PostComplianceOffering = PatchOfferingBase.merge(z.object({
|
|
303
338
|
accountId: z.lazy(() => accountIdSchema),
|
|
304
339
|
managedBy: z.nativeEnum(ManagedByType).optional(),
|
|
340
|
+
shareClassId: z
|
|
341
|
+
.lazy(() => capShareClassIdSchema)
|
|
342
|
+
.nullable()
|
|
343
|
+
.optional()
|
|
344
|
+
.openapi({ example: 'cap_table_share_class_01j1xgme...' }),
|
|
305
345
|
assetName: z.string().min(2).max(50).openapi({ example: 'Asset name' }),
|
|
306
346
|
assetType: z.nativeEnum(AssetType).openapi({ example: AssetType.STOCK }),
|
|
307
347
|
pricePerUnit: z
|
|
@@ -396,6 +436,11 @@ export const PostComplianceOffering = PatchOfferingBase.merge(z.object({
|
|
|
396
436
|
.nullable()
|
|
397
437
|
.optional()
|
|
398
438
|
.openapi({ example: 10 }),
|
|
439
|
+
showTotalRaised: z
|
|
440
|
+
.boolean()
|
|
441
|
+
.default(true)
|
|
442
|
+
.optional()
|
|
443
|
+
.openapi({ example: true }),
|
|
399
444
|
})).superRefine((data, ctx) => {
|
|
400
445
|
postOfferingRefinement(data, ctx);
|
|
401
446
|
postAssetRefinement(data, ctx);
|
|
@@ -415,6 +460,7 @@ export const offeringsInclude = z.enum([
|
|
|
415
460
|
'onboardingReviewedBy',
|
|
416
461
|
'bankAccount',
|
|
417
462
|
'escrowAccount',
|
|
463
|
+
'shareClass',
|
|
418
464
|
]);
|
|
419
465
|
/**
|
|
420
466
|
* @description Query parameters for including related entities
|
|
@@ -433,23 +479,27 @@ export const OfferingsIncludeQuery = z.object({
|
|
|
433
479
|
}),
|
|
434
480
|
});
|
|
435
481
|
/**
|
|
436
|
-
*
|
|
437
|
-
* Filters for querying offerings.
|
|
482
|
+
* Filters supported for querying offerings.
|
|
438
483
|
*
|
|
439
|
-
*
|
|
440
|
-
* -
|
|
441
|
-
* -
|
|
442
|
-
* -
|
|
484
|
+
* Available fields:
|
|
485
|
+
* - `issuerName`: (string, optional) Filter by name of the issuer.
|
|
486
|
+
* - `name`: (string, optional) Filter by offering name.
|
|
487
|
+
* - `accountId`: (AccountId, optional) Filter by tenant/account ID.
|
|
488
|
+
* - `issuerId`: (IssuerId, optional) Filter by issuer ID.
|
|
489
|
+
* - `type`: (OfferingType, optional) Filter by offering type.
|
|
490
|
+
* - `status`: (ComplianceReview, optional) Filter by compliance review status.
|
|
491
|
+
* - `enabled`: (boolean, optional) Filter for enabled/active offerings.
|
|
492
|
+
* - `managedBy`: (ManagedByType, optional) Filter by which system or user manages the offering.
|
|
493
|
+
* - `versioningType`: (OfferingVersioningType, optional) Filter by versioning strategy.
|
|
494
|
+
* - `onboardingStatus`: (OfferingOnboardingStatus, optional) Filter by issuer onboarding status.
|
|
443
495
|
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
* 2. Else if complianceReview is not "APPROVED" → combinedStatus = "IN_COMPLIANCE_REVIEW"
|
|
447
|
-
* 3. Else if onboardingStatus is "COMPLETE" and complianceReview is "APPROVED" →
|
|
448
|
-
* - If enabled is true → combinedStatus = "ACTIVE"
|
|
449
|
-
* - If enabled is false → combinedStatus = "PAUSED"
|
|
496
|
+
* @remarks
|
|
497
|
+
* These filters can be combined to query offerings across multiple dimensions.
|
|
450
498
|
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
499
|
+
* Example use:
|
|
500
|
+
* ```ts
|
|
501
|
+
* { issuerName: "ABC Capital", type: OfferingType.REG_A }
|
|
502
|
+
* ```
|
|
453
503
|
*/
|
|
454
504
|
export const OfferingFiltersZod = z.object({
|
|
455
505
|
issuerName: z.string().optional(),
|
|
@@ -461,8 +511,8 @@ export const OfferingFiltersZod = z.object({
|
|
|
461
511
|
enabled: StringToBooleanSchema.optional(),
|
|
462
512
|
managedBy: z.nativeEnum(ManagedByType).optional(),
|
|
463
513
|
versioningType: z.nativeEnum(OfferingVersioningType).optional(),
|
|
464
|
-
combinedStatus: z.nativeEnum(OfferingStatus).optional(),
|
|
465
514
|
onboardingStatus: z.nativeEnum(OfferingOnboardingStatus).optional(),
|
|
515
|
+
complianceReview: z.nativeEnum(ComplianceReview).optional(),
|
|
466
516
|
});
|
|
467
517
|
export const OfferingSortZod = z.object({
|
|
468
518
|
sort: z.enum([SortBy.NAME, SortBy.CREATED_AT, SortBy.UPDATED_AT]).optional(),
|
|
@@ -564,6 +614,16 @@ export const PatchComplianceOffering = z
|
|
|
564
614
|
});
|
|
565
615
|
}
|
|
566
616
|
}
|
|
617
|
+
if (data.type === OfferingType.REG_CF) {
|
|
618
|
+
if (data.contingencyAmount === null ||
|
|
619
|
+
data.contingencyAmount === undefined ||
|
|
620
|
+
(typeof data.contingencyAmount === 'number' && data.contingencyAmount <= 0)) {
|
|
621
|
+
ctx.addIssue({
|
|
622
|
+
code: z.ZodIssueCode.custom,
|
|
623
|
+
message: 'Contingency amount is required for REG_CF offerings.',
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
}
|
|
567
627
|
// Apply escrow-specific refinements
|
|
568
628
|
escrowValidationRefinement(data, ctx, HttpMethod.PATCH);
|
|
569
629
|
// Apply bonus-tier-specific refinements
|