@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.
@@ -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.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": ">=22.15.0 <23.0.0"
82
+ "node": ">=24.0.0 <25.0.0"
73
83
  }
74
84
  }