@dalmore/api-contracts 0.0.0-dev.d8ef117 → 0.0.0-dev.fc1b175
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/types/bonus-tier.types.ts +0 -24
- package/common/types/user.types.ts +0 -5
- package/contracts/compliance/bonus-tiers/index.ts +0 -19
- package/contracts/compliance/users/index.ts +0 -21
- package/contracts/investors/bonus-tiers/index.ts +0 -18
- package/contracts/issuers/bonus-tiers/index.ts +0 -18
- package/package.json +1 -1
|
@@ -145,27 +145,3 @@ export const CompliancePostBonusTierZod = PostBonusTierZod.extend({
|
|
|
145
145
|
export type CompliancePostBonusTierZod = z.infer<
|
|
146
146
|
typeof CompliancePostBonusTierZod
|
|
147
147
|
>;
|
|
148
|
-
export const PurchaseCalculationZod = z.object({
|
|
149
|
-
assetId: assetIdSchema,
|
|
150
|
-
totalAmount: z.number().positive().openapi({ example: 1000 }),
|
|
151
|
-
purchasedShares: z.number().positive().int().openapi({ example: 100 }),
|
|
152
|
-
});
|
|
153
|
-
export type PurchaseCalculationZod = z.infer<typeof PurchaseCalculationZod>;
|
|
154
|
-
|
|
155
|
-
export const PurchaseCalculationResponseZod = z.object({
|
|
156
|
-
bonusTierId: bonusTierIdSchema
|
|
157
|
-
.nullable()
|
|
158
|
-
.openapi({ example: 'bonus_tier_01j5y5ghx5fg68d663j1fvy2x7' }),
|
|
159
|
-
assetId: assetIdSchema.openapi({
|
|
160
|
-
example: 'asset_00041061050r3gg28a1c60t3gf',
|
|
161
|
-
}),
|
|
162
|
-
type: z
|
|
163
|
-
.nativeEnum(BonusType)
|
|
164
|
-
.nullable()
|
|
165
|
-
.openapi({ example: BonusType.PERCENTAGE }),
|
|
166
|
-
bonusShares: z.number().int().openapi({ example: 100 }),
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
export type PurchaseCalculationResponseZod = z.infer<
|
|
170
|
-
typeof PurchaseCalculationResponseZod
|
|
171
|
-
>;
|
|
@@ -51,11 +51,6 @@ export const UserDeleteResponse = z.object({
|
|
|
51
51
|
});
|
|
52
52
|
export type UserDeleteResponse = z.infer<typeof UserDeleteResponse>;
|
|
53
53
|
|
|
54
|
-
export const UserRestoreResponse = z.object({
|
|
55
|
-
message: z.string(),
|
|
56
|
-
});
|
|
57
|
-
export type UserRestoreResponse = z.infer<typeof UserRestoreResponse>;
|
|
58
|
-
|
|
59
54
|
export const GetMeResponse = IBaseEntity.extend({
|
|
60
55
|
accountId: z.string().nullable(),
|
|
61
56
|
accountName: z.string().nullable(),
|
|
@@ -10,8 +10,6 @@ import {
|
|
|
10
10
|
EstimateBonusTierCalculationResponseZod,
|
|
11
11
|
EstimateBonusTierCalculationZod,
|
|
12
12
|
IBonusTierList,
|
|
13
|
-
PurchaseCalculationResponseZod,
|
|
14
|
-
PurchaseCalculationZod,
|
|
15
13
|
} from '../../../common/types/bonus-tier.types';
|
|
16
14
|
|
|
17
15
|
const c = initContract();
|
|
@@ -34,23 +32,6 @@ export const bonusTiersContract = c.router(
|
|
|
34
32
|
500: InternalError,
|
|
35
33
|
},
|
|
36
34
|
},
|
|
37
|
-
purchaseCalculation: {
|
|
38
|
-
summary:
|
|
39
|
-
'[ADMIN] Calculate the bonus shares that would be awarded for a trade',
|
|
40
|
-
method: 'POST',
|
|
41
|
-
path: '/purchase-calculation',
|
|
42
|
-
metadata: {
|
|
43
|
-
auth: true,
|
|
44
|
-
},
|
|
45
|
-
body: PurchaseCalculationZod,
|
|
46
|
-
responses: {
|
|
47
|
-
200: PurchaseCalculationResponseZod,
|
|
48
|
-
400: BadRequestError,
|
|
49
|
-
401: UnauthorizedError,
|
|
50
|
-
403: ForbiddenError,
|
|
51
|
-
500: InternalError,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
35
|
postBonusTier: {
|
|
55
36
|
summary: 'Create a new bonus tier',
|
|
56
37
|
method: 'POST',
|
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
IssuersActiveStatusUpdateZod,
|
|
22
22
|
UpdateLockedStatus,
|
|
23
23
|
UpdateUserRoleZod,
|
|
24
|
-
UserRestoreResponse,
|
|
25
24
|
} from '../../../common/types';
|
|
26
25
|
import { z } from 'zod';
|
|
27
26
|
|
|
@@ -144,26 +143,6 @@ export const usersContract = c.router(
|
|
|
144
143
|
500: InternalError,
|
|
145
144
|
},
|
|
146
145
|
},
|
|
147
|
-
restoreUser: {
|
|
148
|
-
summary: 'Restore user by id',
|
|
149
|
-
method: 'POST',
|
|
150
|
-
path: '/:id/restore',
|
|
151
|
-
metadata: {
|
|
152
|
-
auth: true,
|
|
153
|
-
},
|
|
154
|
-
pathParams: z.object({
|
|
155
|
-
id: userIdSchema,
|
|
156
|
-
}),
|
|
157
|
-
body: z.object({}),
|
|
158
|
-
responses: {
|
|
159
|
-
200: UserRestoreResponse,
|
|
160
|
-
400: BadRequestError,
|
|
161
|
-
401: UnauthorizedError,
|
|
162
|
-
403: ForbiddenError,
|
|
163
|
-
404: NotFoundError,
|
|
164
|
-
500: InternalError,
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
146
|
updateActiveStatus: {
|
|
168
147
|
summary: '[Admin] Update user active status',
|
|
169
148
|
method: 'PATCH',
|
|
@@ -8,8 +8,6 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
EstimateBonusTierCalculationResponseZod,
|
|
10
10
|
EstimateBonusTierCalculationZod,
|
|
11
|
-
PurchaseCalculationResponseZod,
|
|
12
|
-
PurchaseCalculationZod,
|
|
13
11
|
} from '../../../common/types/bonus-tier.types';
|
|
14
12
|
|
|
15
13
|
const c = initContract();
|
|
@@ -32,22 +30,6 @@ export const bonusTiersContract = c.router(
|
|
|
32
30
|
500: InternalError,
|
|
33
31
|
},
|
|
34
32
|
},
|
|
35
|
-
purchaseCalculation: {
|
|
36
|
-
summary: 'Calculate the bonus shares that would be awarded for a trade',
|
|
37
|
-
method: 'POST',
|
|
38
|
-
path: '/purchase-calculation',
|
|
39
|
-
metadata: {
|
|
40
|
-
auth: true,
|
|
41
|
-
},
|
|
42
|
-
body: PurchaseCalculationZod,
|
|
43
|
-
responses: {
|
|
44
|
-
200: PurchaseCalculationResponseZod,
|
|
45
|
-
400: BadRequestError,
|
|
46
|
-
401: UnauthorizedError,
|
|
47
|
-
403: ForbiddenError,
|
|
48
|
-
500: InternalError,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
33
|
},
|
|
52
34
|
{
|
|
53
35
|
pathPrefix: 'bonus-tiers',
|
|
@@ -10,8 +10,6 @@ import {
|
|
|
10
10
|
EstimateBonusTierCalculationZod,
|
|
11
11
|
IBonusTierList,
|
|
12
12
|
PostBonusTierZod,
|
|
13
|
-
PurchaseCalculationResponseZod,
|
|
14
|
-
PurchaseCalculationZod,
|
|
15
13
|
} from '../../../common/types/bonus-tier.types';
|
|
16
14
|
|
|
17
15
|
const c = initContract();
|
|
@@ -34,22 +32,6 @@ export const bonusTiersContract = c.router(
|
|
|
34
32
|
500: InternalError,
|
|
35
33
|
},
|
|
36
34
|
},
|
|
37
|
-
purchaseCalculation: {
|
|
38
|
-
summary: 'Calculate the bonus shares that would be awarded for a trade',
|
|
39
|
-
method: 'POST',
|
|
40
|
-
path: '/purchase-calculation',
|
|
41
|
-
metadata: {
|
|
42
|
-
auth: true,
|
|
43
|
-
},
|
|
44
|
-
body: PurchaseCalculationZod,
|
|
45
|
-
responses: {
|
|
46
|
-
200: PurchaseCalculationResponseZod,
|
|
47
|
-
400: BadRequestError,
|
|
48
|
-
401: UnauthorizedError,
|
|
49
|
-
403: ForbiddenError,
|
|
50
|
-
500: InternalError,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
35
|
postBonusTier: {
|
|
54
36
|
summary: 'Create a new bonus tier',
|
|
55
37
|
method: 'POST',
|
package/package.json
CHANGED