@dalmore/api-contracts 1.0.3 → 1.0.6
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/README.md +34 -60
- package/index.mjs +1001 -18638
- package/package.json +5 -53
- package/src/common/types/address.spec.ts +203 -0
- package/src/common/types/batch-jobs.types.ts +1 -0
- package/src/common/types/common.types.spec.ts +336 -0
- package/src/common/types/files.types.spec.ts +154 -0
- package/src/common/types/issuer-payment-method.types.spec.ts +612 -0
- package/src/common/types/offering.types.spec.ts +91 -0
- package/src/common/types/phone.spec.ts +76 -0
- package/src/common/types/queue.types.ts +1 -0
- package/src/common/types/reminder-config.types.ts +40 -0
- package/src/common/types/site-link.types.spec.ts +134 -0
- package/src/common/types/trade.types.ts +2 -4
- package/clients/index.mjs +0 -10970
- package/compliance/index.mjs +0 -20016
- package/compliance-apikey/index.mjs +0 -9795
- package/helpers/index.mjs +0 -146
- package/investors/index.mjs +0 -12844
- package/issuers/index.mjs +0 -16168
- package/secondaries/index.mjs +0 -10282
- package/src/common/helpers/index.ts +0 -205
- package/src/contracts/compliance/account-contacts/index.ts +0 -82
- package/src/contracts/compliance/account-managers/index.ts +0 -142
- package/src/contracts/compliance/accounts/index.ts +0 -187
- package/src/contracts/compliance/activities/index.ts +0 -55
- package/src/contracts/compliance/aic/index.ts +0 -60
- package/src/contracts/compliance/api-keys/index.ts +0 -91
- package/src/contracts/compliance/assets/index.ts +0 -122
- package/src/contracts/compliance/auth/index.ts +0 -134
- package/src/contracts/compliance/batch-jobs/index.ts +0 -62
- package/src/contracts/compliance/bonus-tiers/index.ts +0 -55
- package/src/contracts/compliance/checklist/index.ts +0 -87
- package/src/contracts/compliance/checklist-items/index.ts +0 -86
- package/src/contracts/compliance/covered-persons/index.ts +0 -97
- package/src/contracts/compliance/dashboard/index.ts +0 -111
- package/src/contracts/compliance/data-records/index.ts +0 -116
- package/src/contracts/compliance/data-rooms/index.ts +0 -113
- package/src/contracts/compliance/default-theme-configs/index.ts +0 -95
- package/src/contracts/compliance/disbursement/index.ts +0 -165
- package/src/contracts/compliance/disbursement-approval-users/index.ts +0 -84
- package/src/contracts/compliance/disbursement-transactions/index.ts +0 -37
- package/src/contracts/compliance/domain-filters/index.ts +0 -117
- package/src/contracts/compliance/email-themes/index.ts +0 -284
- package/src/contracts/compliance/escrow-accounts/index.ts +0 -85
- package/src/contracts/compliance/exchange-api-keys/index.ts +0 -129
- package/src/contracts/compliance/exchange-imports/index.ts +0 -137
- package/src/contracts/compliance/files/index.ts +0 -267
- package/src/contracts/compliance/files-public/index.ts +0 -188
- package/src/contracts/compliance/health/index.ts +0 -26
- package/src/contracts/compliance/index.ts +0 -147
- package/src/contracts/compliance/individuals/index.ts +0 -57
- package/src/contracts/compliance/investor-accounts/index.ts +0 -141
- package/src/contracts/compliance/invites/index.ts +0 -137
- package/src/contracts/compliance/issuer-bank-accounts/index.ts +0 -81
- package/src/contracts/compliance/issuer-payment-methods/index.ts +0 -81
- package/src/contracts/compliance/issuers/index.ts +0 -97
- package/src/contracts/compliance/job-items/index.ts +0 -58
- package/src/contracts/compliance/jobs/index.ts +0 -59
- package/src/contracts/compliance/kyb/index.ts +0 -54
- package/src/contracts/compliance/kyc/index.ts +0 -77
- package/src/contracts/compliance/legal-entities/index.ts +0 -57
- package/src/contracts/compliance/login-histories/index.ts +0 -37
- package/src/contracts/compliance/notes/index.ts +0 -69
- package/src/contracts/compliance/notion-databases/index.ts +0 -107
- package/src/contracts/compliance/notion-pages/index.ts +0 -105
- package/src/contracts/compliance/offering-reports/index.ts +0 -149
- package/src/contracts/compliance/offerings/index.ts +0 -233
- package/src/contracts/compliance/pages/index.ts +0 -178
- package/src/contracts/compliance/payment-methods/index.ts +0 -57
- package/src/contracts/compliance/rejection-reasons/index.ts +0 -32
- package/src/contracts/compliance/review/index.ts +0 -169
- package/src/contracts/compliance/roles/index.ts +0 -34
- package/src/contracts/compliance/secondary-customers/index.ts +0 -77
- package/src/contracts/compliance/secondary-orders/index.ts +0 -60
- package/src/contracts/compliance/secondary-trades/index.ts +0 -100
- package/src/contracts/compliance/secure-requests/index.ts +0 -54
- package/src/contracts/compliance/signer/index.ts +0 -369
- package/src/contracts/compliance/site-links/index.ts +0 -128
- package/src/contracts/compliance/site-settings/index.ts +0 -669
- package/src/contracts/compliance/sites/index.ts +0 -56
- package/src/contracts/compliance/state-machine/index.ts +0 -94
- package/src/contracts/compliance/tasks/index.ts +0 -91
- package/src/contracts/compliance/third-parties/index.ts +0 -52
- package/src/contracts/compliance/trade-line-items/index.ts +0 -59
- package/src/contracts/compliance/trades/index.ts +0 -230
- package/src/contracts/compliance/transactions/index.ts +0 -161
- package/src/contracts/compliance/user-manuals/index.ts +0 -271
- package/src/contracts/compliance/user-settings/index.ts +0 -189
- package/src/contracts/compliance/users/index.ts +0 -200
- package/src/contracts/compliance/webhooks/index.ts +0 -41
- package/src/contracts/compliance-apikey/accounts/index.ts +0 -58
- package/src/contracts/compliance-apikey/index.ts +0 -14
- package/src/contracts/index.ts +0 -6
- package/src/contracts/investors/account-contacts/index.ts +0 -58
- package/src/contracts/investors/aic/index.ts +0 -59
- package/src/contracts/investors/assets/index.ts +0 -61
- package/src/contracts/investors/auth/index.ts +0 -116
- package/src/contracts/investors/bonus-tiers/index.ts +0 -37
- package/src/contracts/investors/cart/index.ts +0 -75
- package/src/contracts/investors/contact-us/index.ts +0 -48
- package/src/contracts/investors/data-records/index.ts +0 -113
- package/src/contracts/investors/data-rooms/index.ts +0 -96
- package/src/contracts/investors/files/index.ts +0 -167
- package/src/contracts/investors/files-public/index.ts +0 -185
- package/src/contracts/investors/index.ts +0 -72
- package/src/contracts/investors/individuals/index.ts +0 -99
- package/src/contracts/investors/investor-accounts/index.ts +0 -110
- package/src/contracts/investors/issuer-payment-methods/index.ts +0 -36
- package/src/contracts/investors/issuers/index.ts +0 -30
- package/src/contracts/investors/legal-entities/index.ts +0 -93
- package/src/contracts/investors/notes/index.ts +0 -69
- package/src/contracts/investors/offerings/index.ts +0 -93
- package/src/contracts/investors/pages/index.ts +0 -88
- package/src/contracts/investors/payment-methods/index.ts +0 -149
- package/src/contracts/investors/portfolios/index.ts +0 -53
- package/src/contracts/investors/sites/index.ts +0 -96
- package/src/contracts/investors/tasks/index.ts +0 -111
- package/src/contracts/investors/trade-line-items/index.ts +0 -75
- package/src/contracts/investors/trades/index.ts +0 -114
- package/src/contracts/investors/transactions/index.ts +0 -37
- package/src/contracts/investors/trusted-contacts/index.ts +0 -93
- package/src/contracts/investors/user-manuals/index.ts +0 -62
- package/src/contracts/investors/user-settings/index.ts +0 -170
- package/src/contracts/investors/users/index.ts +0 -45
- package/src/contracts/investors/webhooks/index.ts +0 -30
- package/src/contracts/issuers/account-contacts/index.ts +0 -76
- package/src/contracts/issuers/account-integrations/index.ts +0 -97
- package/src/contracts/issuers/accounts/index.ts +0 -97
- package/src/contracts/issuers/activities/index.ts +0 -54
- package/src/contracts/issuers/aic/index.ts +0 -39
- package/src/contracts/issuers/api-key-logs/index.ts +0 -53
- package/src/contracts/issuers/api-keys/index.ts +0 -93
- package/src/contracts/issuers/assets/index.ts +0 -122
- package/src/contracts/issuers/auth/index.ts +0 -152
- package/src/contracts/issuers/bonus-tiers/index.ts +0 -55
- package/src/contracts/issuers/contact-us/index.ts +0 -48
- package/src/contracts/issuers/covered-persons/index.ts +0 -136
- package/src/contracts/issuers/dashboard/index.ts +0 -72
- package/src/contracts/issuers/data-records/index.ts +0 -257
- package/src/contracts/issuers/data-rooms/index.ts +0 -134
- package/src/contracts/issuers/disbursement-approval-users/index.ts +0 -82
- package/src/contracts/issuers/disbursement-transactions/index.ts +0 -53
- package/src/contracts/issuers/disbursements/index.ts +0 -153
- package/src/contracts/issuers/email-themes/index.ts +0 -242
- package/src/contracts/issuers/escrow-accounts/index.ts +0 -81
- package/src/contracts/issuers/exchange-api-keys/index.ts +0 -144
- package/src/contracts/issuers/files/index.ts +0 -166
- package/src/contracts/issuers/files-public/index.ts +0 -166
- package/src/contracts/issuers/health/index.ts +0 -24
- package/src/contracts/issuers/index.ts +0 -112
- package/src/contracts/issuers/investor-accounts/index.ts +0 -148
- package/src/contracts/issuers/invites/index.ts +0 -129
- package/src/contracts/issuers/issuer/index.ts +0 -94
- package/src/contracts/issuers/issuer-bank-accounts/index.ts +0 -81
- package/src/contracts/issuers/issuer-payment-methods/index.ts +0 -136
- package/src/contracts/issuers/kyc/index.ts +0 -38
- package/src/contracts/issuers/login-histories/index.ts +0 -51
- package/src/contracts/issuers/notes/index.ts +0 -69
- package/src/contracts/issuers/offerings/index.ts +0 -206
- package/src/contracts/issuers/pages/index.ts +0 -138
- package/src/contracts/issuers/payment-methods/index.ts +0 -61
- package/src/contracts/issuers/portfolios/index.ts +0 -36
- package/src/contracts/issuers/rejection-reasons/index.ts +0 -32
- package/src/contracts/issuers/review/index.ts +0 -63
- package/src/contracts/issuers/secondary-customers/index.ts +0 -55
- package/src/contracts/issuers/secondary-orders/index.ts +0 -57
- package/src/contracts/issuers/secondary-trades/index.ts +0 -57
- package/src/contracts/issuers/secure-requests/index.ts +0 -34
- package/src/contracts/issuers/site-links/index.ts +0 -116
- package/src/contracts/issuers/site-settings/index.ts +0 -585
- package/src/contracts/issuers/sites/index.ts +0 -32
- package/src/contracts/issuers/tasks/index.ts +0 -111
- package/src/contracts/issuers/trades/index.ts +0 -132
- package/src/contracts/issuers/transactions/index.ts +0 -158
- package/src/contracts/issuers/user-manuals/index.ts +0 -62
- package/src/contracts/issuers/user-settings/index.ts +0 -170
- package/src/contracts/issuers/users/index.ts +0 -126
- package/src/contracts/secondaries/accounts/index.ts +0 -58
- package/src/contracts/secondaries/index.ts +0 -23
- package/src/contracts/secondaries/secondary-customers/index.ts +0 -55
- package/src/contracts/secondaries/secondary-issuers/index.ts +0 -94
- package/src/contracts/secondaries/secondary-orders/index.ts +0 -56
- package/src/contracts/secondaries/secondary-securities/index.ts +0 -95
- package/src/contracts/secondaries/secondary-trades/index.ts +0 -56
- package/types/index.mjs +0 -10320
package/README.md
CHANGED
|
@@ -5,80 +5,54 @@ Type-safe API contracts for Dalmore Client Portal, powered by [ts-rest](https://
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
# Production (stable releases from main branch)
|
|
9
8
|
npm install @dalmore/api-contracts
|
|
10
|
-
|
|
11
|
-
# Development (latest from dev branch)
|
|
12
|
-
npm install @dalmore/api-contracts@dev
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
### Import specific contracts (recommended for tree-shaking)
|
|
18
|
-
|
|
19
|
-
```typescript
|
|
20
|
-
import { complianceContract } from '@dalmore/api-contracts/compliance';
|
|
21
|
-
import { investorsContract } from '@dalmore/api-contracts/investors';
|
|
22
|
-
import { issuersContract } from '@dalmore/api-contracts/issuers';
|
|
23
|
-
import { clientsContract } from '@dalmore/api-contracts/clients';
|
|
24
9
|
```
|
|
25
10
|
|
|
26
|
-
###
|
|
11
|
+
### Peer Dependencies
|
|
27
12
|
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
import type { ITrade } from '@dalmore/api-contracts/types';
|
|
13
|
+
```bash
|
|
14
|
+
npm install @ts-rest/core zod @anatine/zod-openapi @nestjs/common libphonenumber-js neverthrow typeid-js
|
|
31
15
|
```
|
|
32
16
|
|
|
33
|
-
|
|
17
|
+
## Usage
|
|
34
18
|
|
|
35
19
|
```typescript
|
|
36
|
-
import {
|
|
20
|
+
import { clientsContract } from '@dalmore/api-contracts';
|
|
37
21
|
import { initClient } from '@ts-rest/core';
|
|
38
22
|
|
|
39
|
-
const client = initClient(
|
|
40
|
-
baseUrl: 'https://
|
|
23
|
+
const client = initClient(clientsContract, {
|
|
24
|
+
baseUrl: 'https://api.example.com',
|
|
41
25
|
baseHeaders: {
|
|
42
|
-
|
|
26
|
+
'x-api-key': 'your-api-key',
|
|
43
27
|
},
|
|
44
28
|
});
|
|
45
29
|
|
|
46
30
|
// Fully typed API calls
|
|
47
|
-
const { status, body } = await client.accounts.getAccounts(
|
|
48
|
-
query: { page: 1, limit: 10 },
|
|
49
|
-
});
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Peer Dependencies
|
|
53
|
-
|
|
54
|
-
This package requires the following peer dependencies:
|
|
55
|
-
|
|
56
|
-
- `@ts-rest/core` ^3.52.1
|
|
57
|
-
- `@anatine/zod-openapi` ^1.14.2
|
|
58
|
-
- `zod` ^3.24.4
|
|
59
|
-
- `typeid-js` ^1.2.0
|
|
60
|
-
- `@nestjs/common` ^11.0.0
|
|
61
|
-
- `libphonenumber-js` ^1.12.0
|
|
62
|
-
- `neverthrow` ^8.0.0
|
|
31
|
+
const { status, body } = await client.accounts.getAccounts();
|
|
63
32
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- `complianceContract` - Compliance portal API
|
|
67
|
-
- `investorsContract` - Investor portal API
|
|
68
|
-
- `issuersContract` - Issuer portal API
|
|
69
|
-
- `clientsContract` - Client API (API key auth)
|
|
70
|
-
- `secondariesContract` - Secondaries API
|
|
71
|
-
- `complianceApiKeyContract` - Compliance API (API key auth)
|
|
72
|
-
|
|
73
|
-
## TypeScript Configuration
|
|
74
|
-
|
|
75
|
-
Add `skipLibCheck: true` to your `tsconfig.json` for best compatibility:
|
|
76
|
-
|
|
77
|
-
```json
|
|
78
|
-
{
|
|
79
|
-
"compilerOptions": {
|
|
80
|
-
"moduleResolution": "bundler",
|
|
81
|
-
"skipLibCheck": true
|
|
82
|
-
}
|
|
83
|
-
}
|
|
33
|
+
// Access nested endpoints
|
|
34
|
+
const trade = await client.trades.getTrade({ params: { id: 'trade_123' } });
|
|
84
35
|
```
|
|
36
|
+
|
|
37
|
+
## Available Endpoints
|
|
38
|
+
|
|
39
|
+
The `clientsContract` includes:
|
|
40
|
+
|
|
41
|
+
| Endpoint | Description |
|
|
42
|
+
| ------------------ | ----------------------- |
|
|
43
|
+
| `accounts` | Account management |
|
|
44
|
+
| `aic` | AIC verification |
|
|
45
|
+
| `auth` | Authentication |
|
|
46
|
+
| `apiKeys` | API key management |
|
|
47
|
+
| `apiKeyLogs` | API key usage logs |
|
|
48
|
+
| `assets` | Asset management |
|
|
49
|
+
| `files` | File uploads |
|
|
50
|
+
| `filesPublic` | Public file access |
|
|
51
|
+
| `individuals` | Individual management |
|
|
52
|
+
| `investorAccounts` | Investor accounts |
|
|
53
|
+
| `issuers` | Issuer information |
|
|
54
|
+
| `legalEntities` | Legal entity management |
|
|
55
|
+
| `offerings` | Offering data |
|
|
56
|
+
| `secureRequests` | Secure request handling |
|
|
57
|
+
| `sites` | Site configuration |
|
|
58
|
+
| `trades` | Trade management |
|