@dalmore/api-contracts 0.0.0-dev.4c056b7 → 0.0.0-dev.4ec8ae0

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 (33) hide show
  1. package/common/types/account-setting.types.ts +31 -0
  2. package/common/types/activity.types.ts +1 -1
  3. package/common/types/bonus-tier.types.ts +24 -0
  4. package/common/types/cart.types.ts +4 -1
  5. package/common/types/common.types.ts +16 -6
  6. package/common/types/dashboard.types.ts +2 -9
  7. package/common/types/disbursements.types.ts +97 -3
  8. package/common/types/file.types.ts +17 -1
  9. package/common/types/i-will-do-it-later.types.ts +68 -0
  10. package/common/types/index.ts +1 -0
  11. package/common/types/individuals.types.ts +2 -15
  12. package/common/types/issuer-offering.types.ts +8 -9
  13. package/common/types/notification.types.ts +239 -29
  14. package/common/types/offering.types.ts +4 -9
  15. package/common/types/site.types.ts +2 -9
  16. package/common/types/{trade-line-item.type.ts → trade-line-item.types.ts} +2 -9
  17. package/common/types/trade.types.ts +1 -1
  18. package/common/types/transaction.types.ts +12 -1
  19. package/common/types/user.types.ts +15 -28
  20. package/contracts/clients/cart/index.ts +21 -1
  21. package/contracts/clients/index.ts +2 -0
  22. package/contracts/clients/trade-line-items/index.ts +1 -1
  23. package/contracts/clients/trades/index.ts +1 -1
  24. package/contracts/clients/transactions/index.ts +37 -0
  25. package/contracts/compliance/bonus-tiers/index.ts +19 -0
  26. package/contracts/compliance/trade-line-items/index.ts +1 -1
  27. package/contracts/compliance/users/index.ts +21 -0
  28. package/contracts/investors/bonus-tiers/index.ts +18 -0
  29. package/contracts/investors/individuals/index.ts +22 -0
  30. package/contracts/investors/trade-line-items/index.ts +1 -1
  31. package/contracts/issuers/bonus-tiers/index.ts +18 -0
  32. package/contracts/issuers/disbursements/index.ts +18 -0
  33. package/package.json +1 -1
@@ -13,7 +13,7 @@ import {
13
13
  ReviewTradeLineItemStatus,
14
14
  TradeLineItemFiltersQuery,
15
15
  TradeLineItemResponse,
16
- } from '../../../common/types/trade-line-item.type';
16
+ } from '../../../common/types/trade-line-item.types';
17
17
 
18
18
  import { z } from 'zod';
19
19
  const c = initContract();
@@ -21,6 +21,7 @@ import {
21
21
  IssuersActiveStatusUpdateZod,
22
22
  UpdateLockedStatus,
23
23
  UpdateUserRoleZod,
24
+ UserRestoreResponse,
24
25
  } from '../../../common/types';
25
26
  import { z } from 'zod';
26
27
 
@@ -143,6 +144,26 @@ export const usersContract = c.router(
143
144
  500: InternalError,
144
145
  },
145
146
  },
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
+ },
146
167
  updateActiveStatus: {
147
168
  summary: '[Admin] Update user active status',
148
169
  method: 'PATCH',
@@ -8,6 +8,8 @@ import {
8
8
  import {
9
9
  EstimateBonusTierCalculationResponseZod,
10
10
  EstimateBonusTierCalculationZod,
11
+ PurchaseCalculationResponseZod,
12
+ PurchaseCalculationZod,
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
+ 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
+ },
33
51
  },
34
52
  {
35
53
  pathPrefix: 'bonus-tiers',
@@ -14,6 +14,8 @@ import {
14
14
  IIndividualZod,
15
15
  BadRequestError,
16
16
  InternalError,
17
+ IWillDoItLaterBodySchema,
18
+ IWillDoItLaterResponseSchema,
17
19
  } from '../../../common/types';
18
20
  import { z } from 'zod';
19
21
 
@@ -92,6 +94,26 @@ export const individualsContract = c.router(
92
94
  403: ForbiddenError,
93
95
  },
94
96
  },
97
+ iWillDoItLater: {
98
+ summary: "I'll do it later - Create a task for later completion",
99
+ method: 'POST',
100
+ path: '/:id/defer',
101
+ metadata: {
102
+ auth: true,
103
+ },
104
+ pathParams: z.object({
105
+ id: individualIdSchema,
106
+ }),
107
+ body: IWillDoItLaterBodySchema,
108
+ responses: {
109
+ 201: IWillDoItLaterResponseSchema,
110
+ 400: BadRequestError,
111
+ 401: UnauthorizedError,
112
+ 403: ForbiddenError,
113
+ 404: NotFoundError,
114
+ 500: InternalError,
115
+ },
116
+ },
95
117
  },
96
118
  {
97
119
  pathPrefix: 'individuals',
@@ -13,7 +13,7 @@ import {
13
13
  TradeLineItemResponse,
14
14
  TradeLineItemUpdate,
15
15
  TradeLineItemSignStatusUpdate,
16
- } from '../../../common/types/trade-line-item.type';
16
+ } from '../../../common/types/trade-line-item.types';
17
17
 
18
18
  const c = initContract();
19
19
 
@@ -10,6 +10,8 @@ import {
10
10
  EstimateBonusTierCalculationZod,
11
11
  IBonusTierList,
12
12
  PostBonusTierZod,
13
+ PurchaseCalculationResponseZod,
14
+ PurchaseCalculationZod,
13
15
  } from '../../../common/types/bonus-tier.types';
14
16
 
15
17
  const c = initContract();
@@ -32,6 +34,22 @@ export const bonusTiersContract = c.router(
32
34
  500: InternalError,
33
35
  },
34
36
  },
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
+ },
35
53
  postBonusTier: {
36
54
  summary: 'Create a new bonus tier',
37
55
  method: 'POST',
@@ -17,8 +17,10 @@ import {
17
17
  DisbursementMissingConfigZod,
18
18
  DisbursementsIncludeQuery,
19
19
  DisbursementsMissingConfigQuery,
20
+ DisbursementPreviewZod,
20
21
  DisbursementSummaryZod,
21
22
  DisbursementZod,
23
+ GetDisbursementPreviewQueryZod,
22
24
  EligibleOfferingsFiltersZod,
23
25
  IPaginatedDisbursement,
24
26
  IPaginatedEligibleOffering,
@@ -148,6 +150,22 @@ export const disbursementsContract = c.router(
148
150
  500: InternalError,
149
151
  },
150
152
  },
153
+ getDisbursementPreview: {
154
+ summary: 'Get disbursement preview data for Step 2',
155
+ method: 'GET',
156
+ path: '/preview',
157
+ metadata: {
158
+ auth: true,
159
+ },
160
+ query: GetDisbursementPreviewQueryZod,
161
+ responses: {
162
+ 200: DisbursementPreviewZod,
163
+ 400: BadRequestError,
164
+ 401: UnauthorizedError,
165
+ 404: NotFoundError,
166
+ 500: InternalError,
167
+ },
168
+ },
151
169
  getEligibleOfferings: {
152
170
  summary: 'Get eligible offerings for disbursement',
153
171
  method: 'GET',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dalmore/api-contracts",
3
- "version": "0.0.0-dev.4c056b7",
3
+ "version": "0.0.0-dev.4ec8ae0",
4
4
  "description": "Type-safe API contracts for Dalmore Client Portal",
5
5
  "main": "./contracts/index.ts",
6
6
  "types": "./contracts/index.ts",