@dalmore/api-contracts 1.0.0 → 1.0.1
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/helpers/index.ts +88 -0
- package/common/types/account-manager.types.ts +10 -0
- package/common/types/account.types.ts +59 -2
- package/common/types/activity.types.ts +38 -0
- package/common/types/asset.types.ts +3 -0
- package/common/types/auth.types.ts +37 -10
- package/common/types/bonus-tier.types.ts +32 -0
- package/common/types/common.types.ts +19 -0
- package/common/types/contract-helpers.ts +88 -0
- package/common/types/investor-account.types.ts +137 -66
- package/common/types/phone.type.ts +1 -1
- package/common/types/secondary-trade.types.ts +8 -0
- package/common/types/trade.types.ts +81 -1
- package/common/types/user.types.ts +2 -0
- package/contracts/clients/accounts/index.ts +3 -0
- package/contracts/clients/auth/index.ts +18 -1
- package/contracts/clients/index.ts +2 -0
- package/contracts/clients/offerings/index.ts +4 -3
- package/contracts/clients/sites/index.ts +56 -0
- package/contracts/compliance/account-managers/index.ts +2 -0
- package/contracts/compliance/accounts/index.ts +4 -2
- package/contracts/compliance/bonus-tiers/index.ts +55 -0
- package/contracts/compliance/index.ts +2 -0
- package/contracts/compliance/investor-accounts/index.ts +4 -0
- package/contracts/issuers/accounts/index.ts +5 -0
- package/contracts/issuers/bonus-tiers/index.ts +18 -0
- package/contracts/issuers/investor-accounts/index.ts +22 -0
- package/package.json +12 -2
|
@@ -66,6 +66,7 @@ import { defaultThemeConfigsContract } from './default-theme-configs';
|
|
|
66
66
|
import { aicContract } from './aic';
|
|
67
67
|
import { stateMachineContract } from './state-machine';
|
|
68
68
|
import { offeringReportsContract } from './offering-reports';
|
|
69
|
+
import { bonusTiersContract } from './bonus-tiers';
|
|
69
70
|
|
|
70
71
|
const c = initContract();
|
|
71
72
|
|
|
@@ -80,6 +81,7 @@ export const complianceContract = c.router(
|
|
|
80
81
|
auth: authContract,
|
|
81
82
|
aic: aicContract,
|
|
82
83
|
batchJobs: batchJobsContract,
|
|
84
|
+
bonusTiers: bonusTiersContract,
|
|
83
85
|
checklist: checkListContract,
|
|
84
86
|
checklistItems: checkListItemsContract,
|
|
85
87
|
coveredPersons: coveredPersonsContract,
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
InternalError,
|
|
7
7
|
NotFoundError,
|
|
8
8
|
PaginationOptionsZod,
|
|
9
|
+
tradeIdSchema,
|
|
9
10
|
UnauthorizedError,
|
|
10
11
|
} from '../../../common/types';
|
|
11
12
|
import { z } from 'zod';
|
|
@@ -89,6 +90,9 @@ export const investorAccountsContract = c.router(
|
|
|
89
90
|
pathParams: z.object({
|
|
90
91
|
id: investorAccountIdSchema,
|
|
91
92
|
}),
|
|
93
|
+
query: z.object({
|
|
94
|
+
tradeId: tradeIdSchema.optional(),
|
|
95
|
+
}),
|
|
92
96
|
responses: {
|
|
93
97
|
200: IInvestorAccountSummary,
|
|
94
98
|
401: UnauthorizedError,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
PatchAccountZod,
|
|
14
14
|
PatchIssuerOnboardingStep,
|
|
15
15
|
IssuerOnboardingStepZod,
|
|
16
|
+
InternalError,
|
|
16
17
|
} from '../../../common/types';
|
|
17
18
|
import { z } from 'zod';
|
|
18
19
|
|
|
@@ -35,6 +36,7 @@ export const accountsContract = c.router(
|
|
|
35
36
|
200: IPaginatedAccount,
|
|
36
37
|
401: UnauthorizedError,
|
|
37
38
|
403: ForbiddenError,
|
|
39
|
+
500: InternalError,
|
|
38
40
|
},
|
|
39
41
|
},
|
|
40
42
|
getAccount: {
|
|
@@ -53,6 +55,7 @@ export const accountsContract = c.router(
|
|
|
53
55
|
401: UnauthorizedError,
|
|
54
56
|
403: ForbiddenError,
|
|
55
57
|
404: NotFoundError,
|
|
58
|
+
500: InternalError,
|
|
56
59
|
},
|
|
57
60
|
},
|
|
58
61
|
patchOnboardingStep: {
|
|
@@ -68,6 +71,7 @@ export const accountsContract = c.router(
|
|
|
68
71
|
401: UnauthorizedError,
|
|
69
72
|
403: ForbiddenError,
|
|
70
73
|
404: NotFoundError,
|
|
74
|
+
500: InternalError,
|
|
71
75
|
},
|
|
72
76
|
},
|
|
73
77
|
patchAccount: {
|
|
@@ -83,6 +87,7 @@ export const accountsContract = c.router(
|
|
|
83
87
|
401: UnauthorizedError,
|
|
84
88
|
403: ForbiddenError,
|
|
85
89
|
404: NotFoundError,
|
|
90
|
+
500: InternalError,
|
|
86
91
|
},
|
|
87
92
|
},
|
|
88
93
|
},
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
EstimateBonusTierCalculationResponseZod,
|
|
10
10
|
EstimateBonusTierCalculationZod,
|
|
11
|
+
IBonusTierList,
|
|
12
|
+
PostBonusTierZod,
|
|
11
13
|
} from '../../../common/types/bonus-tier.types';
|
|
12
14
|
|
|
13
15
|
const c = initContract();
|
|
@@ -30,6 +32,22 @@ export const bonusTiersContract = c.router(
|
|
|
30
32
|
500: InternalError,
|
|
31
33
|
},
|
|
32
34
|
},
|
|
35
|
+
postBonusTier: {
|
|
36
|
+
summary: 'Create a new bonus tier',
|
|
37
|
+
method: 'POST',
|
|
38
|
+
path: '/',
|
|
39
|
+
metadata: {
|
|
40
|
+
auth: true,
|
|
41
|
+
},
|
|
42
|
+
body: PostBonusTierZod,
|
|
43
|
+
responses: {
|
|
44
|
+
201: IBonusTierList,
|
|
45
|
+
400: BadRequestError,
|
|
46
|
+
401: UnauthorizedError,
|
|
47
|
+
403: ForbiddenError,
|
|
48
|
+
500: InternalError,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
33
51
|
},
|
|
34
52
|
{
|
|
35
53
|
pathPrefix: 'bonus-tiers',
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
InternalError,
|
|
7
7
|
NotFoundError,
|
|
8
8
|
PaginationOptionsZod,
|
|
9
|
+
tradeIdSchema,
|
|
9
10
|
UnauthorizedError,
|
|
10
11
|
} from '../../../common/types';
|
|
11
12
|
import { z } from 'zod';
|
|
@@ -19,6 +20,7 @@ import {
|
|
|
19
20
|
GetInvestorAccountDetailsQuery,
|
|
20
21
|
RegisteredInvestorUserFiltersZod,
|
|
21
22
|
IPaginatedRegisteredInvestorUserZod,
|
|
23
|
+
IInvestorAccountSummary,
|
|
22
24
|
} from '../../../common/types/investor-account.types';
|
|
23
25
|
|
|
24
26
|
const c = initContract();
|
|
@@ -119,6 +121,26 @@ export const investorAccountsContract = c.router(
|
|
|
119
121
|
404: NotFoundError,
|
|
120
122
|
},
|
|
121
123
|
},
|
|
124
|
+
getInvestorAccountSummary: {
|
|
125
|
+
summary: 'Get investor account summary',
|
|
126
|
+
method: 'GET',
|
|
127
|
+
path: '/:id/summary',
|
|
128
|
+
metadata: {
|
|
129
|
+
auth: true,
|
|
130
|
+
},
|
|
131
|
+
pathParams: z.object({
|
|
132
|
+
id: investorAccountIdSchema,
|
|
133
|
+
}),
|
|
134
|
+
query: z.object({
|
|
135
|
+
tradeId: tradeIdSchema.optional(),
|
|
136
|
+
}),
|
|
137
|
+
responses: {
|
|
138
|
+
200: IInvestorAccountSummary,
|
|
139
|
+
401: UnauthorizedError,
|
|
140
|
+
403: ForbiddenError,
|
|
141
|
+
404: NotFoundError,
|
|
142
|
+
},
|
|
143
|
+
},
|
|
122
144
|
},
|
|
123
145
|
{
|
|
124
146
|
pathPrefix: 'investor-accounts',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dalmore/api-contracts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Type-safe API contracts for Dalmore Client Portal",
|
|
5
5
|
"main": "./contracts/index.ts",
|
|
6
6
|
"types": "./contracts/index.ts",
|
|
@@ -40,6 +40,10 @@
|
|
|
40
40
|
"./types/*": {
|
|
41
41
|
"types": "./common/types/*.ts",
|
|
42
42
|
"default": "./common/types/*.ts"
|
|
43
|
+
},
|
|
44
|
+
"./helpers": {
|
|
45
|
+
"types": "./common/helpers/index.ts",
|
|
46
|
+
"default": "./common/helpers/index.ts"
|
|
43
47
|
}
|
|
44
48
|
},
|
|
45
49
|
"files": [
|
|
@@ -55,13 +59,19 @@
|
|
|
55
59
|
],
|
|
56
60
|
"author": "Dalmore Group",
|
|
57
61
|
"license": "UNLICENSED",
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public"
|
|
64
|
+
},
|
|
58
65
|
"repository": {
|
|
59
66
|
"type": "git",
|
|
60
67
|
"url": "https://github.com/OfficialDalmoreGroup/dalmore-client-portal-api.git"
|
|
61
68
|
},
|
|
62
69
|
"peerDependencies": {
|
|
63
70
|
"@anatine/zod-openapi": "^1.14.2",
|
|
71
|
+
"@nestjs/common": "^11.0.0",
|
|
64
72
|
"@ts-rest/core": "^3.52.1",
|
|
73
|
+
"libphonenumber-js": "^1.12.0",
|
|
74
|
+
"neverthrow": "^8.0.0",
|
|
65
75
|
"typeid-js": "^1.2.0",
|
|
66
76
|
"zod": "^3.24.4"
|
|
67
77
|
},
|
|
@@ -69,6 +79,6 @@
|
|
|
69
79
|
"typescript": "^5.8.3"
|
|
70
80
|
},
|
|
71
81
|
"engines": {
|
|
72
|
-
"node": ">=
|
|
82
|
+
"node": ">=24.0.0 <25.0.0"
|
|
73
83
|
}
|
|
74
84
|
}
|