@dalmore/api-contracts 1.0.3 → 1.0.5
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.d.mts +17 -0
- package/index.d.ts +17 -0
- package/index.mjs +1001 -18638
- package/package.json +7 -54
- 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/common/types/account-contact.types.ts +0 -98
- package/src/common/types/account-detail.types.ts +0 -27
- package/src/common/types/account-integration.types.ts +0 -143
- package/src/common/types/account-manager.types.ts +0 -124
- package/src/common/types/account.types.ts +0 -296
- package/src/common/types/activity.types.ts +0 -274
- package/src/common/types/address.types.ts +0 -41
- package/src/common/types/aic.types.ts +0 -246
- package/src/common/types/aml.types.ts +0 -18
- package/src/common/types/api-key-logs.types.ts +0 -66
- package/src/common/types/api-keys.types.ts +0 -69
- package/src/common/types/asset.types.ts +0 -338
- package/src/common/types/auth.types.ts +0 -370
- package/src/common/types/batch-jobs.types.ts +0 -150
- package/src/common/types/bonus-tier.types.ts +0 -147
- package/src/common/types/cart.types.ts +0 -18
- package/src/common/types/checklist-items.types.ts +0 -70
- package/src/common/types/checklist.types.ts +0 -97
- package/src/common/types/common.types.ts +0 -1520
- package/src/common/types/comply-advantage-api.types.ts +0 -316
- package/src/common/types/comply-advantage.types.ts +0 -25
- package/src/common/types/contact-us.types.ts +0 -107
- package/src/common/types/contract-helpers.ts +0 -205
- package/src/common/types/countries.types.ts +0 -375
- package/src/common/types/covered-person.types.ts +0 -274
- package/src/common/types/dashboard.types.ts +0 -799
- package/src/common/types/data-record.types.ts +0 -325
- package/src/common/types/data-room.types.ts +0 -242
- package/src/common/types/default-theme-config.types.ts +0 -87
- package/src/common/types/disbursement-adjustment.types.ts +0 -32
- package/src/common/types/disbursement-approval-user.types.ts +0 -100
- package/src/common/types/disbursement-review.types.ts +0 -110
- package/src/common/types/disbursement-transaction.types.ts +0 -72
- package/src/common/types/disbursements.types.ts +0 -310
- package/src/common/types/domain-filter.types.ts +0 -55
- package/src/common/types/email-theme.types.ts +0 -442
- package/src/common/types/entity.types.ts +0 -15
- package/src/common/types/error-responses.types.ts +0 -135
- package/src/common/types/escrow-account.types.ts +0 -104
- package/src/common/types/exchange-api-key.types.ts +0 -121
- package/src/common/types/exchange-import.types.ts +0 -36
- package/src/common/types/exchange-provider.types.ts +0 -329
- package/src/common/types/file.types.ts +0 -461
- package/src/common/types/health.types.ts +0 -29
- package/src/common/types/index.ts +0 -48
- package/src/common/types/individuals.types.ts +0 -554
- package/src/common/types/investor-account.types.ts +0 -1239
- package/src/common/types/investorAccountIdSchema.type.ts +0 -0
- package/src/common/types/investors-offering.types.ts +0 -65
- package/src/common/types/invite.types.ts +0 -133
- package/src/common/types/issuer-bank-account.types.ts +0 -107
- package/src/common/types/issuer-offering.types.ts +0 -306
- package/src/common/types/issuer-payment-method.types.ts +0 -341
- package/src/common/types/issuer.types.ts +0 -312
- package/src/common/types/job-item.types.ts +0 -119
- package/src/common/types/jobs.types.ts +0 -171
- package/src/common/types/kyb.types.ts +0 -53
- package/src/common/types/kyc.types.ts +0 -188
- package/src/common/types/legal-entity.types.ts +0 -185
- package/src/common/types/login-history.types.ts +0 -46
- package/src/common/types/mail-template.types.ts +0 -436
- package/src/common/types/north-cap-integration.types.ts +0 -190
- package/src/common/types/note.types.ts +0 -109
- package/src/common/types/notification.types.ts +0 -58
- package/src/common/types/notion-api.types.ts +0 -374
- package/src/common/types/notion-database.types.ts +0 -125
- package/src/common/types/notion-page.types.ts +0 -267
- package/src/common/types/offering-reports.types.ts +0 -153
- package/src/common/types/offering-submission.types.ts +0 -314
- package/src/common/types/offering.types.ts +0 -590
- package/src/common/types/page-revision.types.ts +0 -86
- package/src/common/types/page.types.ts +0 -436
- package/src/common/types/password.type.ts +0 -15
- package/src/common/types/payment-methods.types.ts +0 -298
- package/src/common/types/phone.type.ts +0 -27
- package/src/common/types/portfolio.types.ts +0 -50
- package/src/common/types/privacy-policy-and-tos.types.ts +0 -231
- package/src/common/types/queue.types.ts +0 -111
- package/src/common/types/registered-reps.types.ts +0 -25
- package/src/common/types/rejection-reasons.types.ts +0 -56
- package/src/common/types/review.types.ts +0 -133
- package/src/common/types/role.types.ts +0 -26
- package/src/common/types/secondary-customer.types.ts +0 -66
- package/src/common/types/secondary-issuer.types.ts +0 -50
- package/src/common/types/secondary-order.types.ts +0 -58
- package/src/common/types/secondary-security.types.ts +0 -60
- package/src/common/types/secondary-trade.entity.ts +0 -16
- package/src/common/types/secondary-trade.types.ts +0 -95
- package/src/common/types/secure-request.types.ts +0 -68
- package/src/common/types/signer.types.ts +0 -651
- package/src/common/types/site-link.types.ts +0 -166
- package/src/common/types/site-settings.types.ts +0 -726
- package/src/common/types/site.types.ts +0 -270
- package/src/common/types/sms.types.ts +0 -30
- package/src/common/types/state-machine.types.ts +0 -177
- package/src/common/types/states.types.ts +0 -163
- package/src/common/types/subdoc-preview.types.ts +0 -35
- package/src/common/types/task.types.ts +0 -258
- package/src/common/types/trade-adjustment.type.ts +0 -33
- package/src/common/types/trade-line-item.type.ts +0 -132
- package/src/common/types/trade.types.ts +0 -931
- package/src/common/types/transaction.types.ts +0 -198
- package/src/common/types/trusted-contact.types.ts +0 -122
- package/src/common/types/typography.types.ts +0 -75
- package/src/common/types/user-manual.types.ts +0 -290
- package/src/common/types/user-setting.types.ts +0 -133
- package/src/common/types/user.types.ts +0 -320
- package/src/common/types/webhook.types.ts +0 -588
- package/src/common/types/zip.type.ts +0 -36
- package/src/contracts/clients/accounts/index.ts +0 -61
- package/src/contracts/clients/aic/index.ts +0 -59
- package/src/contracts/clients/api-key-logs/index.ts +0 -53
- package/src/contracts/clients/api-keys/index.ts +0 -73
- package/src/contracts/clients/assets/index.ts +0 -102
- package/src/contracts/clients/auth/index.ts +0 -50
- package/src/contracts/clients/files/index.ts +0 -166
- package/src/contracts/clients/files-public/index.ts +0 -166
- package/src/contracts/clients/index.ts +0 -44
- package/src/contracts/clients/individuals/index.ts +0 -93
- package/src/contracts/clients/investor-accounts/index.ts +0 -93
- package/src/contracts/clients/issuers/index.ts +0 -94
- package/src/contracts/clients/legal-entities/index.ts +0 -93
- package/src/contracts/clients/offerings/index.ts +0 -117
- package/src/contracts/clients/secure-requests/index.ts +0 -34
- package/src/contracts/clients/sites/index.ts +0 -56
- package/src/contracts/clients/trades/index.ts +0 -122
- 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
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { initContract } from '@ts-rest/core';
|
|
3
|
-
import {
|
|
4
|
-
BadRequestError,
|
|
5
|
-
ForbiddenError,
|
|
6
|
-
InternalError,
|
|
7
|
-
NotFoundError,
|
|
8
|
-
PaginationOptionsZod,
|
|
9
|
-
UnauthorizedError,
|
|
10
|
-
} from '../../../common/types';
|
|
11
|
-
import {
|
|
12
|
-
dataRoomIdSchema,
|
|
13
|
-
DataRoomPasswordQueryZod,
|
|
14
|
-
DataRoomsIncludeQuery,
|
|
15
|
-
DataRoomStructureZod,
|
|
16
|
-
DataRoomZod,
|
|
17
|
-
InvestorDataRoomsFilters,
|
|
18
|
-
IPaginatedDataRooms,
|
|
19
|
-
PublicDataRoomFiltersZod,
|
|
20
|
-
} from '../../../common/types/data-room.types';
|
|
21
|
-
|
|
22
|
-
const c = initContract();
|
|
23
|
-
|
|
24
|
-
export const dataRoomsContract = c.router(
|
|
25
|
-
{
|
|
26
|
-
getDataRooms: {
|
|
27
|
-
summary:
|
|
28
|
-
'Get Data Rooms - returns flat data room objects. See getDataRoomStructure for tree structure',
|
|
29
|
-
method: 'GET',
|
|
30
|
-
path: '',
|
|
31
|
-
metadata: {
|
|
32
|
-
auth: true,
|
|
33
|
-
},
|
|
34
|
-
query: PaginationOptionsZod.merge(InvestorDataRoomsFilters).merge(
|
|
35
|
-
DataRoomsIncludeQuery,
|
|
36
|
-
),
|
|
37
|
-
responses: {
|
|
38
|
-
200: IPaginatedDataRooms,
|
|
39
|
-
401: UnauthorizedError,
|
|
40
|
-
403: ForbiddenError,
|
|
41
|
-
500: InternalError,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
getPublicDataRooms: {
|
|
45
|
-
summary: 'Get public data rooms',
|
|
46
|
-
method: 'GET',
|
|
47
|
-
path: '/public',
|
|
48
|
-
query: PublicDataRoomFiltersZod,
|
|
49
|
-
responses: {
|
|
50
|
-
200: IPaginatedDataRooms,
|
|
51
|
-
400: BadRequestError,
|
|
52
|
-
403: ForbiddenError,
|
|
53
|
-
404: NotFoundError,
|
|
54
|
-
500: InternalError,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
getDataRoom: {
|
|
58
|
-
summary:
|
|
59
|
-
'Get data room by id - returns a flat data room object. See getDataRoomStructure for tree structure',
|
|
60
|
-
method: 'GET',
|
|
61
|
-
path: '/:id',
|
|
62
|
-
metadata: {
|
|
63
|
-
auth: true,
|
|
64
|
-
},
|
|
65
|
-
query: DataRoomsIncludeQuery.merge(DataRoomPasswordQueryZod),
|
|
66
|
-
pathParams: z.object({ id: dataRoomIdSchema }),
|
|
67
|
-
responses: {
|
|
68
|
-
200: DataRoomZod,
|
|
69
|
-
401: UnauthorizedError,
|
|
70
|
-
403: ForbiddenError,
|
|
71
|
-
404: NotFoundError,
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
getDataRoomStructure: {
|
|
75
|
-
summary:
|
|
76
|
-
'Get data room structure by id - shows the proper tree structure of the data room',
|
|
77
|
-
method: 'GET',
|
|
78
|
-
path: '/:id/structure',
|
|
79
|
-
metadata: {
|
|
80
|
-
auth: true,
|
|
81
|
-
},
|
|
82
|
-
pathParams: z.object({ id: dataRoomIdSchema }),
|
|
83
|
-
query: DataRoomPasswordQueryZod,
|
|
84
|
-
responses: {
|
|
85
|
-
200: DataRoomStructureZod,
|
|
86
|
-
401: UnauthorizedError,
|
|
87
|
-
403: ForbiddenError,
|
|
88
|
-
404: NotFoundError,
|
|
89
|
-
500: InternalError,
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
pathPrefix: 'data-rooms',
|
|
95
|
-
},
|
|
96
|
-
);
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { initContract } from '@ts-rest/core';
|
|
2
|
-
import {
|
|
3
|
-
BadGateWayError,
|
|
4
|
-
BadRequestError,
|
|
5
|
-
FileFilters,
|
|
6
|
-
fileIdSchema,
|
|
7
|
-
FilesIncludeQuery,
|
|
8
|
-
FileZod,
|
|
9
|
-
InternalError,
|
|
10
|
-
IPaginatedFile,
|
|
11
|
-
LinkFileZod,
|
|
12
|
-
NotFoundError,
|
|
13
|
-
PaginationOptionsZod,
|
|
14
|
-
PatchFile,
|
|
15
|
-
PostFileQueryParams,
|
|
16
|
-
UnauthorizedError,
|
|
17
|
-
UnprocessableError,
|
|
18
|
-
} from '../../../common/types';
|
|
19
|
-
import { z } from 'zod';
|
|
20
|
-
import { authHeader, generateApiDescription } from '../../../common/helpers';
|
|
21
|
-
|
|
22
|
-
const c = initContract();
|
|
23
|
-
|
|
24
|
-
export const filesContract = c.router(
|
|
25
|
-
{
|
|
26
|
-
postFile: {
|
|
27
|
-
summary: 'Upload a file',
|
|
28
|
-
description: generateApiDescription(
|
|
29
|
-
'Upload a file to the system.',
|
|
30
|
-
'POST',
|
|
31
|
-
'/files',
|
|
32
|
-
{
|
|
33
|
-
query: {
|
|
34
|
-
name: 'test',
|
|
35
|
-
category: 'application',
|
|
36
|
-
targetId: 'trade_01j5tkg6k2fygr0x06fegt27aj',
|
|
37
|
-
},
|
|
38
|
-
headers: authHeader,
|
|
39
|
-
formData: { file: '@"/Users/local/Desktop/test.csv"' },
|
|
40
|
-
},
|
|
41
|
-
),
|
|
42
|
-
method: 'POST',
|
|
43
|
-
path: '',
|
|
44
|
-
query: PostFileQueryParams,
|
|
45
|
-
contentType: 'multipart/form-data',
|
|
46
|
-
body: c.type<{ file: File }>(),
|
|
47
|
-
metadata: {
|
|
48
|
-
auth: true,
|
|
49
|
-
},
|
|
50
|
-
responses: {
|
|
51
|
-
201: FileZod,
|
|
52
|
-
400: BadRequestError,
|
|
53
|
-
401: UnauthorizedError,
|
|
54
|
-
422: UnprocessableError,
|
|
55
|
-
500: InternalError,
|
|
56
|
-
502: BadGateWayError,
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
linkFile: {
|
|
60
|
-
summary: 'Links a file to a new resource',
|
|
61
|
-
method: 'POST',
|
|
62
|
-
path: '/:id/link',
|
|
63
|
-
pathParams: z.object({
|
|
64
|
-
id: fileIdSchema,
|
|
65
|
-
}),
|
|
66
|
-
body: LinkFileZod,
|
|
67
|
-
metadata: {
|
|
68
|
-
auth: true,
|
|
69
|
-
},
|
|
70
|
-
responses: {
|
|
71
|
-
201: FileZod,
|
|
72
|
-
400: BadRequestError,
|
|
73
|
-
401: UnauthorizedError,
|
|
74
|
-
422: UnprocessableError,
|
|
75
|
-
500: InternalError,
|
|
76
|
-
502: BadGateWayError,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
unlinkFile: {
|
|
80
|
-
summary: 'Unlinks a file to the parent resource',
|
|
81
|
-
method: 'POST',
|
|
82
|
-
path: '/:id/unlink',
|
|
83
|
-
pathParams: z.object({
|
|
84
|
-
id: fileIdSchema,
|
|
85
|
-
}),
|
|
86
|
-
body: z.object({}),
|
|
87
|
-
metadata: {
|
|
88
|
-
auth: true,
|
|
89
|
-
},
|
|
90
|
-
responses: {
|
|
91
|
-
202: FileZod,
|
|
92
|
-
400: BadRequestError,
|
|
93
|
-
401: UnauthorizedError,
|
|
94
|
-
422: UnprocessableError,
|
|
95
|
-
500: InternalError,
|
|
96
|
-
502: BadGateWayError,
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
getFiles: {
|
|
100
|
-
summary: 'Get files',
|
|
101
|
-
method: 'GET',
|
|
102
|
-
path: '',
|
|
103
|
-
metadata: {
|
|
104
|
-
auth: true,
|
|
105
|
-
},
|
|
106
|
-
query: PaginationOptionsZod.merge(FilesIncludeQuery).merge(FileFilters),
|
|
107
|
-
responses: {
|
|
108
|
-
200: IPaginatedFile,
|
|
109
|
-
401: UnauthorizedError,
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
getFile: {
|
|
113
|
-
summary: 'Get file by id',
|
|
114
|
-
method: 'GET',
|
|
115
|
-
path: '/:id',
|
|
116
|
-
metadata: {
|
|
117
|
-
auth: true,
|
|
118
|
-
},
|
|
119
|
-
pathParams: z.object({
|
|
120
|
-
id: fileIdSchema,
|
|
121
|
-
}),
|
|
122
|
-
responses: {
|
|
123
|
-
200: FileZod,
|
|
124
|
-
401: UnauthorizedError,
|
|
125
|
-
404: NotFoundError,
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
patchFile: {
|
|
129
|
-
summary: 'Update file by id',
|
|
130
|
-
method: 'PATCH',
|
|
131
|
-
path: '/:id',
|
|
132
|
-
metadata: {
|
|
133
|
-
auth: true,
|
|
134
|
-
},
|
|
135
|
-
pathParams: z.object({
|
|
136
|
-
id: fileIdSchema,
|
|
137
|
-
}),
|
|
138
|
-
body: PatchFile,
|
|
139
|
-
responses: {
|
|
140
|
-
201: FileZod,
|
|
141
|
-
400: BadRequestError,
|
|
142
|
-
401: UnauthorizedError,
|
|
143
|
-
404: NotFoundError,
|
|
144
|
-
500: InternalError,
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
previewFile: {
|
|
148
|
-
summary: 'Preview (stream) a file by id',
|
|
149
|
-
method: 'GET',
|
|
150
|
-
path: '/preview/:id',
|
|
151
|
-
metadata: {
|
|
152
|
-
auth: true,
|
|
153
|
-
},
|
|
154
|
-
pathParams: z.object({
|
|
155
|
-
id: fileIdSchema,
|
|
156
|
-
}),
|
|
157
|
-
responses: {
|
|
158
|
-
200: z.unknown(),
|
|
159
|
-
401: UnauthorizedError,
|
|
160
|
-
404: NotFoundError,
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
pathPrefix: 'files',
|
|
166
|
-
},
|
|
167
|
-
);
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { initContract } from '@ts-rest/core';
|
|
2
|
-
import {
|
|
3
|
-
BadGateWayError,
|
|
4
|
-
BadRequestError,
|
|
5
|
-
FileFilters,
|
|
6
|
-
fileIdSchema,
|
|
7
|
-
FilesIncludeQuery,
|
|
8
|
-
FileZod,
|
|
9
|
-
ForbiddenError,
|
|
10
|
-
InternalError,
|
|
11
|
-
IPaginatedFile,
|
|
12
|
-
LinkFileZod,
|
|
13
|
-
NotFoundError,
|
|
14
|
-
PaginationOptionsZod,
|
|
15
|
-
PatchFile,
|
|
16
|
-
PostFileQueryParams,
|
|
17
|
-
reviewFiles,
|
|
18
|
-
UnauthorizedError,
|
|
19
|
-
UnprocessableError,
|
|
20
|
-
} from '../../../common/types';
|
|
21
|
-
import { z } from 'zod';
|
|
22
|
-
import { authHeader, generateApiDescription } from '../../../common/helpers';
|
|
23
|
-
|
|
24
|
-
const c = initContract();
|
|
25
|
-
|
|
26
|
-
export const filesPublicContract = c.router(
|
|
27
|
-
{
|
|
28
|
-
postFilePublic: {
|
|
29
|
-
summary: 'Upload a public file',
|
|
30
|
-
description: generateApiDescription(
|
|
31
|
-
'Upload a public file to the system.',
|
|
32
|
-
'POST',
|
|
33
|
-
'/files-public',
|
|
34
|
-
{
|
|
35
|
-
query: {
|
|
36
|
-
name: 'test',
|
|
37
|
-
category: 'application',
|
|
38
|
-
targetId: 'trade_01j5tkg6k2fygr0x06fegt27aj',
|
|
39
|
-
},
|
|
40
|
-
headers: authHeader,
|
|
41
|
-
formData: { file: '@"/Users/local/Desktop/test.csv"' },
|
|
42
|
-
},
|
|
43
|
-
),
|
|
44
|
-
method: 'POST',
|
|
45
|
-
path: '',
|
|
46
|
-
query: PostFileQueryParams,
|
|
47
|
-
contentType: 'multipart/form-data',
|
|
48
|
-
body: c.type<{ file: File }>(),
|
|
49
|
-
metadata: {
|
|
50
|
-
auth: true,
|
|
51
|
-
},
|
|
52
|
-
responses: {
|
|
53
|
-
201: FileZod,
|
|
54
|
-
400: BadRequestError,
|
|
55
|
-
401: UnauthorizedError,
|
|
56
|
-
422: UnprocessableError,
|
|
57
|
-
500: InternalError,
|
|
58
|
-
502: BadGateWayError,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
linkFilePublic: {
|
|
62
|
-
summary: 'Links a public file to a new resource',
|
|
63
|
-
method: 'POST',
|
|
64
|
-
path: '/:id/link',
|
|
65
|
-
pathParams: z.object({
|
|
66
|
-
id: fileIdSchema,
|
|
67
|
-
}),
|
|
68
|
-
body: LinkFileZod,
|
|
69
|
-
metadata: {
|
|
70
|
-
auth: true,
|
|
71
|
-
},
|
|
72
|
-
responses: {
|
|
73
|
-
201: FileZod,
|
|
74
|
-
400: BadRequestError,
|
|
75
|
-
401: UnauthorizedError,
|
|
76
|
-
422: UnprocessableError,
|
|
77
|
-
500: InternalError,
|
|
78
|
-
502: BadGateWayError,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
unlinkFilePublic: {
|
|
82
|
-
summary: 'Unlinks a public file to the parent resource',
|
|
83
|
-
method: 'POST',
|
|
84
|
-
path: '/:id/unlink',
|
|
85
|
-
pathParams: z.object({
|
|
86
|
-
id: fileIdSchema,
|
|
87
|
-
}),
|
|
88
|
-
body: z.object({}),
|
|
89
|
-
metadata: {
|
|
90
|
-
auth: true,
|
|
91
|
-
},
|
|
92
|
-
responses: {
|
|
93
|
-
202: FileZod,
|
|
94
|
-
400: BadRequestError,
|
|
95
|
-
401: UnauthorizedError,
|
|
96
|
-
422: UnprocessableError,
|
|
97
|
-
500: InternalError,
|
|
98
|
-
502: BadGateWayError,
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
getFilesPublic: {
|
|
102
|
-
summary: 'Get public files',
|
|
103
|
-
method: 'GET',
|
|
104
|
-
path: '',
|
|
105
|
-
metadata: {
|
|
106
|
-
auth: true,
|
|
107
|
-
},
|
|
108
|
-
query: PaginationOptionsZod.merge(FilesIncludeQuery).merge(FileFilters),
|
|
109
|
-
responses: {
|
|
110
|
-
200: IPaginatedFile,
|
|
111
|
-
401: UnauthorizedError,
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
getFilePublic: {
|
|
115
|
-
summary: 'Get public file by id',
|
|
116
|
-
method: 'GET',
|
|
117
|
-
path: '/:id',
|
|
118
|
-
metadata: {
|
|
119
|
-
auth: true,
|
|
120
|
-
},
|
|
121
|
-
pathParams: z.object({
|
|
122
|
-
id: fileIdSchema,
|
|
123
|
-
}),
|
|
124
|
-
responses: {
|
|
125
|
-
200: FileZod,
|
|
126
|
-
401: UnauthorizedError,
|
|
127
|
-
404: NotFoundError,
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
patchFilePublic: {
|
|
131
|
-
summary: 'Update public file by id',
|
|
132
|
-
method: 'PATCH',
|
|
133
|
-
path: '/:id',
|
|
134
|
-
metadata: {
|
|
135
|
-
auth: true,
|
|
136
|
-
},
|
|
137
|
-
pathParams: z.object({
|
|
138
|
-
id: fileIdSchema,
|
|
139
|
-
}),
|
|
140
|
-
body: PatchFile,
|
|
141
|
-
responses: {
|
|
142
|
-
201: FileZod,
|
|
143
|
-
400: BadRequestError,
|
|
144
|
-
401: UnauthorizedError,
|
|
145
|
-
404: NotFoundError,
|
|
146
|
-
500: InternalError,
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
previewFilePublic: {
|
|
150
|
-
summary: 'Preview (stream) a public file by id',
|
|
151
|
-
method: 'GET',
|
|
152
|
-
path: '/preview/:id',
|
|
153
|
-
metadata: {
|
|
154
|
-
auth: true,
|
|
155
|
-
},
|
|
156
|
-
pathParams: z.object({
|
|
157
|
-
id: fileIdSchema,
|
|
158
|
-
}),
|
|
159
|
-
responses: {
|
|
160
|
-
200: z.unknown(),
|
|
161
|
-
401: UnauthorizedError,
|
|
162
|
-
404: NotFoundError,
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
reviewPublicFiles: {
|
|
166
|
-
summary: 'Review public files',
|
|
167
|
-
method: 'POST',
|
|
168
|
-
path: '/review',
|
|
169
|
-
metadata: {
|
|
170
|
-
auth: true,
|
|
171
|
-
},
|
|
172
|
-
body: reviewFiles,
|
|
173
|
-
responses: {
|
|
174
|
-
201: z.object({ success: z.boolean() }),
|
|
175
|
-
401: UnauthorizedError,
|
|
176
|
-
403: ForbiddenError,
|
|
177
|
-
404: NotFoundError,
|
|
178
|
-
500: InternalError,
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
pathPrefix: 'files-public',
|
|
184
|
-
},
|
|
185
|
-
);
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { initContract } from '@ts-rest/core';
|
|
2
|
-
import { individualsContract } from './individuals';
|
|
3
|
-
import { legalEntityContract } from './legal-entities';
|
|
4
|
-
import { authContract } from './auth';
|
|
5
|
-
import { investorAccountsContract } from './investor-accounts';
|
|
6
|
-
import { offeringsContract } from './offerings';
|
|
7
|
-
import { usersContract } from './users';
|
|
8
|
-
import { sitesContract } from './sites';
|
|
9
|
-
import { paymentMethodsContract } from './payment-methods';
|
|
10
|
-
import { tradesContract } from './trades';
|
|
11
|
-
import { tradeLineItemsContract } from './trade-line-items';
|
|
12
|
-
import { assetsContract } from './assets';
|
|
13
|
-
import { issuersContract } from './issuers';
|
|
14
|
-
import { filesContract } from './files';
|
|
15
|
-
import { cartContract } from './cart';
|
|
16
|
-
import { pagesContract } from './pages';
|
|
17
|
-
import { portfoliosContract } from './portfolios';
|
|
18
|
-
import { dataRecordsContract } from './data-records';
|
|
19
|
-
import { dataRoomsContract } from './data-rooms';
|
|
20
|
-
import { filesPublicContract } from './files-public';
|
|
21
|
-
import { tasksContract } from './tasks';
|
|
22
|
-
import { issuerPaymentMethodsContract } from './issuer-payment-methods';
|
|
23
|
-
import { contactUsContract } from './contact-us';
|
|
24
|
-
import { webhooksContract } from './webhooks';
|
|
25
|
-
import { userManualsContract } from './user-manuals';
|
|
26
|
-
import { investorNotesContract } from './notes';
|
|
27
|
-
import { userSettingsContract } from './user-settings';
|
|
28
|
-
import { trustedContactsContract } from './trusted-contacts';
|
|
29
|
-
import { aicContract } from './aic';
|
|
30
|
-
import { investorsTransactionsContract } from './transactions';
|
|
31
|
-
import { accountContactsContract } from './account-contacts';
|
|
32
|
-
import { bonusTiersContract } from './bonus-tiers';
|
|
33
|
-
const c = initContract();
|
|
34
|
-
|
|
35
|
-
export const investorsContract = c.router(
|
|
36
|
-
{
|
|
37
|
-
accountContacts: accountContactsContract,
|
|
38
|
-
assets: assetsContract,
|
|
39
|
-
auth: authContract,
|
|
40
|
-
aic: aicContract,
|
|
41
|
-
bonusTiers: bonusTiersContract,
|
|
42
|
-
cart: cartContract,
|
|
43
|
-
contactUs: contactUsContract,
|
|
44
|
-
dataRecords: dataRecordsContract,
|
|
45
|
-
dataRooms: dataRoomsContract,
|
|
46
|
-
files: filesContract,
|
|
47
|
-
filesPublic: filesPublicContract,
|
|
48
|
-
individuals: individualsContract,
|
|
49
|
-
investorAccounts: investorAccountsContract,
|
|
50
|
-
issuerPaymentMethods: issuerPaymentMethodsContract,
|
|
51
|
-
issuers: issuersContract,
|
|
52
|
-
legalEntities: legalEntityContract,
|
|
53
|
-
notes: investorNotesContract,
|
|
54
|
-
offerings: offeringsContract,
|
|
55
|
-
pages: pagesContract,
|
|
56
|
-
paymentMethods: paymentMethodsContract,
|
|
57
|
-
portfolios: portfoliosContract,
|
|
58
|
-
sites: sitesContract,
|
|
59
|
-
tasks: tasksContract,
|
|
60
|
-
tradeLineItems: tradeLineItemsContract,
|
|
61
|
-
trades: tradesContract,
|
|
62
|
-
transactions: investorsTransactionsContract,
|
|
63
|
-
trustedContacts: trustedContactsContract,
|
|
64
|
-
userManuals: userManualsContract,
|
|
65
|
-
users: usersContract,
|
|
66
|
-
userSettings: userSettingsContract,
|
|
67
|
-
webhooks: webhooksContract,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
pathPrefix: '/investors/api/v1/',
|
|
71
|
-
},
|
|
72
|
-
);
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { initContract } from '@ts-rest/core';
|
|
2
|
-
import {
|
|
3
|
-
ForbiddenError,
|
|
4
|
-
IPaginatedIndividual,
|
|
5
|
-
NotFoundError,
|
|
6
|
-
PaginationOptionsZod,
|
|
7
|
-
UnauthorizedError,
|
|
8
|
-
IndividualFiltersZod,
|
|
9
|
-
IndividualsIncludeQuery,
|
|
10
|
-
individualIdSchema,
|
|
11
|
-
PostIndividualBodySchema,
|
|
12
|
-
UpdateIndividualBodySchema,
|
|
13
|
-
IndividualResponseSchema,
|
|
14
|
-
IIndividualZod,
|
|
15
|
-
BadRequestError,
|
|
16
|
-
InternalError,
|
|
17
|
-
} from '../../../common/types';
|
|
18
|
-
import { z } from 'zod';
|
|
19
|
-
|
|
20
|
-
const c = initContract();
|
|
21
|
-
|
|
22
|
-
export const individualsContract = c.router(
|
|
23
|
-
{
|
|
24
|
-
createIndividual: {
|
|
25
|
-
summary: 'Create individual',
|
|
26
|
-
method: 'POST',
|
|
27
|
-
path: '/',
|
|
28
|
-
body: PostIndividualBodySchema,
|
|
29
|
-
metadata: {
|
|
30
|
-
auth: true,
|
|
31
|
-
},
|
|
32
|
-
responses: {
|
|
33
|
-
201: IndividualResponseSchema,
|
|
34
|
-
400: BadRequestError,
|
|
35
|
-
401: UnauthorizedError,
|
|
36
|
-
403: ForbiddenError,
|
|
37
|
-
404: NotFoundError,
|
|
38
|
-
500: InternalError,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
updateIndividual: {
|
|
42
|
-
summary: 'Update individual',
|
|
43
|
-
method: 'PATCH',
|
|
44
|
-
path: '/:id',
|
|
45
|
-
pathParams: z.object({
|
|
46
|
-
id: individualIdSchema,
|
|
47
|
-
}),
|
|
48
|
-
body: UpdateIndividualBodySchema,
|
|
49
|
-
metadata: {
|
|
50
|
-
auth: true,
|
|
51
|
-
},
|
|
52
|
-
responses: {
|
|
53
|
-
201: IndividualResponseSchema,
|
|
54
|
-
400: BadRequestError,
|
|
55
|
-
401: UnauthorizedError,
|
|
56
|
-
403: ForbiddenError,
|
|
57
|
-
404: NotFoundError,
|
|
58
|
-
500: InternalError,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
getIndividual: {
|
|
62
|
-
summary: 'Get individual by id',
|
|
63
|
-
method: 'GET',
|
|
64
|
-
path: '/:id',
|
|
65
|
-
metadata: {
|
|
66
|
-
auth: true,
|
|
67
|
-
},
|
|
68
|
-
query: z.object({}).merge(IndividualsIncludeQuery),
|
|
69
|
-
pathParams: z.object({
|
|
70
|
-
id: individualIdSchema,
|
|
71
|
-
}),
|
|
72
|
-
responses: {
|
|
73
|
-
200: IIndividualZod,
|
|
74
|
-
401: UnauthorizedError,
|
|
75
|
-
403: ForbiddenError,
|
|
76
|
-
404: NotFoundError,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
getIndividuals: {
|
|
80
|
-
summary: 'Get individuals',
|
|
81
|
-
method: 'GET',
|
|
82
|
-
path: '',
|
|
83
|
-
metadata: {
|
|
84
|
-
auth: true,
|
|
85
|
-
},
|
|
86
|
-
query: PaginationOptionsZod.merge(IndividualFiltersZod).merge(
|
|
87
|
-
IndividualsIncludeQuery,
|
|
88
|
-
),
|
|
89
|
-
responses: {
|
|
90
|
-
200: IPaginatedIndividual,
|
|
91
|
-
401: UnauthorizedError,
|
|
92
|
-
403: ForbiddenError,
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
pathPrefix: 'individuals',
|
|
98
|
-
},
|
|
99
|
-
);
|