@global-torque/domain-types 0.2.2
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/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/NOTICE.md +11 -0
- package/README.md +64 -0
- package/SECURITY.md +9 -0
- package/SUPPORT.md +6 -0
- package/package.json +67 -0
- package/src/accreditationTypes.ts +22 -0
- package/src/analyticsTypes.ts +184 -0
- package/src/authConstants.ts +16 -0
- package/src/authTypes.ts +155 -0
- package/src/blogTypes.ts +30 -0
- package/src/contentTypes.ts +37 -0
- package/src/dashboardTypes.ts +9 -0
- package/src/distributionsTypes.ts +49 -0
- package/src/esignTypes.ts +11 -0
- package/src/evmTypes.ts +525 -0
- package/src/filerTypes.ts +60 -0
- package/src/index.ts +5 -0
- package/src/investmentTypes.ts +204 -0
- package/src/kycTypes.ts +44 -0
- package/src/notificationsTypes.ts +95 -0
- package/src/offerCardTypes.ts +48 -0
- package/src/offerTypes.ts +275 -0
- package/src/onboardingTypes.ts +55 -0
- package/src/profileTypes.ts +9 -0
- package/src/profilesTypes.ts +344 -0
- package/src/settingsTypes.ts +20 -0
- package/src/vaultTypes.ts +250 -0
- package/src/walletTypes.ts +147 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.2 candidate
|
|
4
|
+
|
|
5
|
+
- Reissued the framework candidate for fresh public-release validation; package APIs and runtime source remain unchanged.
|
|
6
|
+
|
|
7
|
+
## 0.2.0 candidate
|
|
8
|
+
|
|
9
|
+
- Created the standalone seven-package framework workspace.
|
|
10
|
+
- Moved investment validation policy and schema helpers into `invest-core`.
|
|
11
|
+
- Kept generic UI validation and URL synchronization at public UI Kit barrels.
|
|
12
|
+
- Removed company social destinations from framework-owned social metadata.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Global Torque
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Notices
|
|
2
|
+
|
|
3
|
+
The framework package sources are transferred from
|
|
4
|
+
`global-torque/dashboard.webdevelop.biz` revision
|
|
5
|
+
`9f35aa0882b765e202538ce7c7d5e82eb1b452d3` under the MIT license. Third party
|
|
6
|
+
dependencies retain their own licenses and notices. This file records source
|
|
7
|
+
provenance only; it is not a blanket rights grant for host assets, fonts, or
|
|
8
|
+
brand material.
|
|
9
|
+
|
|
10
|
+
The checked Unovis patches are retained under `patches/` with their source
|
|
11
|
+
revision and SHA-256 values in `docs/source-reconciliation.md`.
|
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# @global-torque/domain-types
|
|
2
|
+
|
|
3
|
+
Pure investment-domain TypeScript contracts shared by apps and packages.
|
|
4
|
+
|
|
5
|
+
## Ownership
|
|
6
|
+
|
|
7
|
+
This package owns DTOs, status constants, request/response shapes, and data-shape contracts that are safe to consume from any TypeScript runtime.
|
|
8
|
+
|
|
9
|
+
## Allowed Dependencies
|
|
10
|
+
|
|
11
|
+
- TypeScript standard library types.
|
|
12
|
+
- Other pure type packages, after dependency direction is reviewed.
|
|
13
|
+
|
|
14
|
+
## Forbidden Dependencies
|
|
15
|
+
|
|
16
|
+
- Vue, Pinia, Vue Router, or browser-only globals.
|
|
17
|
+
- `import.meta.env` or application runtime config.
|
|
18
|
+
- `@global-torque/ui-kit`, `@global-torque/ui-primitives`, or investment runtime/data packages.
|
|
19
|
+
- App route names unless they are explicitly accepted as cross-app contracts.
|
|
20
|
+
|
|
21
|
+
## Public Exports
|
|
22
|
+
|
|
23
|
+
- `accreditationTypes`: accreditation status constants and raw accreditation response shapes.
|
|
24
|
+
- `analyticsTypes`: analytics DTOs, log levels, client contracts, frontend
|
|
25
|
+
service labels, and client error context shapes.
|
|
26
|
+
- `authConstants`: Ory self-service API endpoint path constants and AAL2 query contract.
|
|
27
|
+
- `authTypes`: Ory session, flow, logout, native auth, schema, and error DTOs;
|
|
28
|
+
identity traits allow flat `first_name`/`last_name` and optional nested `name`.
|
|
29
|
+
- `blogTypes`: public invest content metadata contracts and reviewed content-link slug constants.
|
|
30
|
+
- `distributionsTypes`: distribution response and formatted distribution contracts.
|
|
31
|
+
- `esignTypes`: e-signature request/response contracts.
|
|
32
|
+
- `evmTypes`: EVM wallet, transaction, authorization, withdraw, exchange, and Earn-overlay contracts.
|
|
33
|
+
- `filerTypes`: filer item and sign-url response contracts.
|
|
34
|
+
- `investmentTypes`: investment status constants, request/response shapes, document contracts, and formatted investment contracts.
|
|
35
|
+
- `kycTypes`: KYC status constants and raw KYC response/launch contracts.
|
|
36
|
+
- `notificationsTypes`: notification payload, token, data-field, and formatted notification contracts.
|
|
37
|
+
- `offerTypes`: offer status constants, offer response/comment payload contracts, and formatted offer contracts.
|
|
38
|
+
- `profilesTypes`: profile/user/background-information request and response contracts.
|
|
39
|
+
- `profileTypes`: stable investment profile type constants and unions.
|
|
40
|
+
- `settingsTypes`: session activity and formatted session contracts.
|
|
41
|
+
- `walletTypes`: custodial wallet status constants, funding-source, wallet, transaction, and Plaid response contracts.
|
|
42
|
+
- `vaultTypes`: ERC-7540 deployment, position, redemption, signing, operation,
|
|
43
|
+
and fund-manager fulfillment contracts with exact raw-string amounts.
|
|
44
|
+
|
|
45
|
+
## Example
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { PROFILE_TYPES, type ProfileType } from '@global-torque/domain-types';
|
|
49
|
+
import { AnalyticsLogLevel, type IAnalyticsMessage } from '@global-torque/domain-types/analyticsTypes';
|
|
50
|
+
import { InvestKycTypes, type IKycProfile } from '@global-torque/domain-types/kycTypes';
|
|
51
|
+
|
|
52
|
+
function isEntityProfile(profileType: ProfileType) {
|
|
53
|
+
return profileType === PROFILE_TYPES.ENTITY;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const message: Pick<IAnalyticsMessage, 'level' | 'message'> = {
|
|
57
|
+
level: AnalyticsLogLevel.ERROR,
|
|
58
|
+
message: 'Request failed',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const kycProfile: Pick<IKycProfile, 'kyc_status'> = {
|
|
62
|
+
kyc_status: InvestKycTypes.pending,
|
|
63
|
+
};
|
|
64
|
+
```
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
Please report security issues privately to the package owner before opening a
|
|
4
|
+
public issue. Do not include credentials, personal data, production URLs, or
|
|
5
|
+
real investment records in reports or fixtures.
|
|
6
|
+
|
|
7
|
+
This repository contains client-side framework code. Hosts remain responsible
|
|
8
|
+
for authentication, authorization, service origins, environment loading, and
|
|
9
|
+
provider configuration.
|
package/SUPPORT.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Support
|
|
2
|
+
|
|
3
|
+
Use the package README and public export list for integration questions. A
|
|
4
|
+
package source or type check does not prove that a host backend exposes the
|
|
5
|
+
same API revision. Report the host package, source revision, package version,
|
|
6
|
+
and exact failing public subpath with reproducible fixture data.
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@global-torque/domain-types",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.2.2",
|
|
5
|
+
"description": "Pure investment domain contracts for the Torque framework.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22.12.0"
|
|
9
|
+
},
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./src/index.ts",
|
|
14
|
+
"./accreditationTypes": "./src/accreditationTypes.ts",
|
|
15
|
+
"./authConstants": "./src/authConstants.ts",
|
|
16
|
+
"./authTypes": "./src/authTypes.ts",
|
|
17
|
+
"./analyticsTypes": "./src/analyticsTypes.ts",
|
|
18
|
+
"./blogTypes": "./src/blogTypes.ts",
|
|
19
|
+
"./dashboardTypes": "./src/dashboardTypes.ts",
|
|
20
|
+
"./distributionsTypes": "./src/distributionsTypes.ts",
|
|
21
|
+
"./esignTypes": "./src/esignTypes.ts",
|
|
22
|
+
"./evmTypes": "./src/evmTypes.ts",
|
|
23
|
+
"./filerTypes": "./src/filerTypes.ts",
|
|
24
|
+
"./investmentTypes": "./src/investmentTypes.ts",
|
|
25
|
+
"./kycTypes": "./src/kycTypes.ts",
|
|
26
|
+
"./notificationsTypes": "./src/notificationsTypes.ts",
|
|
27
|
+
"./onboardingTypes": "./src/onboardingTypes.ts",
|
|
28
|
+
"./offerTypes": "./src/offerTypes.ts",
|
|
29
|
+
"./offerCardTypes": "./src/offerCardTypes.ts",
|
|
30
|
+
"./contentTypes": "./src/contentTypes.ts",
|
|
31
|
+
"./profilesTypes": "./src/profilesTypes.ts",
|
|
32
|
+
"./profileTypes": "./src/profileTypes.ts",
|
|
33
|
+
"./vaultTypes": "./src/vaultTypes.ts",
|
|
34
|
+
"./settingsTypes": "./src/settingsTypes.ts",
|
|
35
|
+
"./walletTypes": "./src/walletTypes.ts"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"src",
|
|
39
|
+
"README.md",
|
|
40
|
+
"LICENSE",
|
|
41
|
+
"NOTICE.md",
|
|
42
|
+
"CHANGELOG.md",
|
|
43
|
+
"SECURITY.md",
|
|
44
|
+
"SUPPORT.md"
|
|
45
|
+
],
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/global-torque/torque-packages.git",
|
|
49
|
+
"directory": "packages/domain-types"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://github.com/global-torque/torque-packages#readme",
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/global-torque/torque-packages/issues"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public",
|
|
57
|
+
"provenance": true,
|
|
58
|
+
"tag": "latest"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"typescript": "^6.0.2"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
65
|
+
"test:run": "node --test"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const AccreditationTypes = {
|
|
2
|
+
new: 'new',
|
|
3
|
+
pending: 'pending',
|
|
4
|
+
info_required: 'info_required',
|
|
5
|
+
expired: 'expired',
|
|
6
|
+
approved: 'approved',
|
|
7
|
+
declined: 'declined',
|
|
8
|
+
} as const;
|
|
9
|
+
|
|
10
|
+
export type AccreditationTypes = typeof AccreditationTypes[keyof typeof AccreditationTypes];
|
|
11
|
+
|
|
12
|
+
export interface IAccreditationData {
|
|
13
|
+
completed_at: string;
|
|
14
|
+
created_at: string;
|
|
15
|
+
status: AccreditationTypes;
|
|
16
|
+
notes?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IAccreditation {
|
|
20
|
+
accreditation_data: IAccreditationData[];
|
|
21
|
+
accreditation_status: AccreditationTypes;
|
|
22
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
export const AnalyticsLogLevel = {
|
|
2
|
+
INFO: 'info',
|
|
3
|
+
WARN: 'warn',
|
|
4
|
+
ERROR: 'error',
|
|
5
|
+
DEBUG: 'debug',
|
|
6
|
+
} as const;
|
|
7
|
+
|
|
8
|
+
export type AnalyticsLogLevel = typeof AnalyticsLogLevel[keyof typeof AnalyticsLogLevel];
|
|
9
|
+
|
|
10
|
+
export type AnalyticsEventType =
|
|
11
|
+
| 'open'
|
|
12
|
+
| 'click'
|
|
13
|
+
| 'send'
|
|
14
|
+
| 'close';
|
|
15
|
+
|
|
16
|
+
export type AnalyticsHttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'PATCH';
|
|
17
|
+
export type AnalyticsBody = Record<string, unknown>;
|
|
18
|
+
|
|
19
|
+
export interface IHttpRequest {
|
|
20
|
+
method: string;
|
|
21
|
+
url: string;
|
|
22
|
+
path: string;
|
|
23
|
+
userAgent: string;
|
|
24
|
+
referer: string;
|
|
25
|
+
remoteIp: string;
|
|
26
|
+
protocol: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface IServiceContext {
|
|
30
|
+
httpRequest: IHttpRequest;
|
|
31
|
+
version?: string;
|
|
32
|
+
build_timestamp?: string;
|
|
33
|
+
user?: string;
|
|
34
|
+
request_id?: string;
|
|
35
|
+
service_name?: string;
|
|
36
|
+
event_source?: 'client' | 'server';
|
|
37
|
+
frontend_env?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface IServiceContextEvent {
|
|
41
|
+
httpRequest: {
|
|
42
|
+
method: AnalyticsHttpMethod;
|
|
43
|
+
url: string;
|
|
44
|
+
userAgent: string;
|
|
45
|
+
referer: string;
|
|
46
|
+
remoteIp: string;
|
|
47
|
+
protocol: string;
|
|
48
|
+
};
|
|
49
|
+
user: string;
|
|
50
|
+
request_id: string;
|
|
51
|
+
service_name: string;
|
|
52
|
+
version: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface IAnalyticsData {
|
|
56
|
+
component: string;
|
|
57
|
+
caller: string[];
|
|
58
|
+
stack: string[];
|
|
59
|
+
serviceContext: IServiceContext;
|
|
60
|
+
client?: IClientContext;
|
|
61
|
+
context?: IAnalyticsClientErrorContext;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type AnalyticsClientErrorSource =
|
|
65
|
+
| 'caught'
|
|
66
|
+
| 'global'
|
|
67
|
+
| 'vue'
|
|
68
|
+
| 'vitepress'
|
|
69
|
+
| 'api'
|
|
70
|
+
| 'chunk'
|
|
71
|
+
| 'manual';
|
|
72
|
+
|
|
73
|
+
export interface IAnalyticsRouteContext {
|
|
74
|
+
path?: string;
|
|
75
|
+
name?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface IAnalyticsHttpErrorContext {
|
|
79
|
+
method?: string;
|
|
80
|
+
url?: string;
|
|
81
|
+
path?: string;
|
|
82
|
+
status?: number;
|
|
83
|
+
statusCode?: number;
|
|
84
|
+
responseSource?: 'http' | 'network' | 'offline-cache' | 'cache' | 'unknown';
|
|
85
|
+
offline?: boolean;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface IAnalyticsErrorEventContext {
|
|
89
|
+
filename?: string;
|
|
90
|
+
lineno?: number;
|
|
91
|
+
colno?: number;
|
|
92
|
+
message?: string;
|
|
93
|
+
tagName?: string;
|
|
94
|
+
resourceUrl?: string;
|
|
95
|
+
opaqueScriptError?: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface IAnalyticsPromiseRejectionContext {
|
|
99
|
+
reasonType?: string;
|
|
100
|
+
reasonMessage?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface IAnalyticsRuntimeContext {
|
|
104
|
+
frontendEnv?: string;
|
|
105
|
+
isStaticSite?: boolean;
|
|
106
|
+
isDev?: boolean;
|
|
107
|
+
buildVersion?: string;
|
|
108
|
+
buildTimestamp?: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface IAnalyticsClientErrorContext {
|
|
112
|
+
source?: AnalyticsClientErrorSource;
|
|
113
|
+
route?: IAnalyticsRouteContext;
|
|
114
|
+
http?: IAnalyticsHttpErrorContext;
|
|
115
|
+
errorEvent?: IAnalyticsErrorEventContext;
|
|
116
|
+
promiseRejection?: IAnalyticsPromiseRejectionContext;
|
|
117
|
+
runtime?: IAnalyticsRuntimeContext;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface IViewportInfo {
|
|
121
|
+
width?: number;
|
|
122
|
+
height?: number;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface IScreenInfo {
|
|
126
|
+
width?: number;
|
|
127
|
+
height?: number;
|
|
128
|
+
availWidth?: number;
|
|
129
|
+
availHeight?: number;
|
|
130
|
+
colorDepth?: number;
|
|
131
|
+
pixelRatio?: number;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface IOrientationInfo {
|
|
135
|
+
type?: string;
|
|
136
|
+
angle?: number;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface IClientContext {
|
|
140
|
+
userAgent?: string;
|
|
141
|
+
language?: string;
|
|
142
|
+
languages?: readonly string[];
|
|
143
|
+
onLine?: boolean;
|
|
144
|
+
timeZone?: string;
|
|
145
|
+
viewport?: IViewportInfo;
|
|
146
|
+
screen?: IScreenInfo;
|
|
147
|
+
orientation?: IOrientationInfo;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface IAnalyticsMessage {
|
|
151
|
+
time: string;
|
|
152
|
+
level: AnalyticsLogLevel;
|
|
153
|
+
message: string;
|
|
154
|
+
error: string;
|
|
155
|
+
body: AnalyticsBody;
|
|
156
|
+
data: IAnalyticsData;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface IAnalyticsEventRequest {
|
|
160
|
+
event_type: AnalyticsEventType;
|
|
161
|
+
method: AnalyticsHttpMethod;
|
|
162
|
+
status_code: number;
|
|
163
|
+
identity_id: string;
|
|
164
|
+
request_path: string;
|
|
165
|
+
body: AnalyticsBody;
|
|
166
|
+
service_context: IServiceContextEvent;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface IAnalyticsResponse {
|
|
170
|
+
success: boolean;
|
|
171
|
+
message: string;
|
|
172
|
+
id?: string;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface IAnalyticsError {
|
|
176
|
+
code: string;
|
|
177
|
+
message: string;
|
|
178
|
+
details: Record<string, unknown>;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface AnalyticsClient {
|
|
182
|
+
logMessage(message: IAnalyticsMessage): Promise<IAnalyticsResponse>;
|
|
183
|
+
trackEvent(event: IAnalyticsEventRequest): Promise<IAnalyticsResponse>;
|
|
184
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ory Kratos self-service flow paths.
|
|
3
|
+
*
|
|
4
|
+
* These are API endpoint path constants, not app-owned route names.
|
|
5
|
+
*/
|
|
6
|
+
export const SELFSERVICE = {
|
|
7
|
+
login: '/self-service/login/browser',
|
|
8
|
+
logout: '/self-service/logout/browser',
|
|
9
|
+
registration: '/self-service/registration/browser',
|
|
10
|
+
settings: '/self-service/settings/browser',
|
|
11
|
+
recovery: '/self-service/recovery/browser',
|
|
12
|
+
} as const;
|
|
13
|
+
|
|
14
|
+
export type SELFSERVICE = typeof SELFSERVICE[keyof typeof SELFSERVICE];
|
|
15
|
+
|
|
16
|
+
export const AAL2_QUERY = { aal: 'aal2' } as const;
|
package/src/authTypes.ts
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
interface IAuthenticationMethods {
|
|
2
|
+
method: string;
|
|
3
|
+
completed_at: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
interface IDevice {
|
|
7
|
+
id: string;
|
|
8
|
+
ip_address: string;
|
|
9
|
+
user_agent: string;
|
|
10
|
+
location: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface IIdentityTraits {
|
|
14
|
+
email: string;
|
|
15
|
+
first_name?: string;
|
|
16
|
+
last_name?: string;
|
|
17
|
+
name?: {
|
|
18
|
+
first: string;
|
|
19
|
+
last: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface IIdentityVerifiableAddresses {
|
|
24
|
+
id: string;
|
|
25
|
+
value: string;
|
|
26
|
+
verified: boolean;
|
|
27
|
+
via: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface IIdentityRecoveryAddresses {
|
|
31
|
+
id: string;
|
|
32
|
+
value: string;
|
|
33
|
+
via: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface IIdentity {
|
|
37
|
+
id: string;
|
|
38
|
+
schema_id: string;
|
|
39
|
+
schema_url: string;
|
|
40
|
+
state: string;
|
|
41
|
+
state_changed_at: string;
|
|
42
|
+
traits: IIdentityTraits;
|
|
43
|
+
verifiable_addresses: IIdentityVerifiableAddresses[];
|
|
44
|
+
recovery_addresses: IIdentityRecoveryAddresses[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface ISession {
|
|
48
|
+
active: boolean;
|
|
49
|
+
authenticated_at: string;
|
|
50
|
+
authenticator_assurance_level: string;
|
|
51
|
+
authentication_methods: IAuthenticationMethods[];
|
|
52
|
+
devices: IDevice[];
|
|
53
|
+
expires_at: string;
|
|
54
|
+
id: string;
|
|
55
|
+
identity: IIdentity;
|
|
56
|
+
issued_at: string;
|
|
57
|
+
tokenized: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface IError {
|
|
61
|
+
debug: string;
|
|
62
|
+
error: string;
|
|
63
|
+
error_description: string;
|
|
64
|
+
id: string;
|
|
65
|
+
message: string;
|
|
66
|
+
status_code: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface IErrorGeneric {
|
|
70
|
+
error: IError;
|
|
71
|
+
redirect_browser_to?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface IUIAttribute {
|
|
75
|
+
name: string;
|
|
76
|
+
type: string;
|
|
77
|
+
value: string;
|
|
78
|
+
required: boolean;
|
|
79
|
+
disabled: boolean;
|
|
80
|
+
node_type: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
interface IUIMessage {
|
|
84
|
+
id: number;
|
|
85
|
+
text: string;
|
|
86
|
+
type: string;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
interface IUIMeta {
|
|
90
|
+
label: {
|
|
91
|
+
id: number;
|
|
92
|
+
text: string;
|
|
93
|
+
type: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface IUINode {
|
|
98
|
+
type: string;
|
|
99
|
+
group: string;
|
|
100
|
+
attributes: IUIAttribute;
|
|
101
|
+
messages: IUIMessage[];
|
|
102
|
+
meta: IUIMeta;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface IUI {
|
|
106
|
+
action: string;
|
|
107
|
+
method: string;
|
|
108
|
+
nodes: IUINode[];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
interface IContinueWith {
|
|
112
|
+
action: string;
|
|
113
|
+
redirect_browser_to: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface IAuthFlow {
|
|
117
|
+
id: string;
|
|
118
|
+
continue_with?: IContinueWith[];
|
|
119
|
+
identity?: IIdentity;
|
|
120
|
+
type: string;
|
|
121
|
+
active: string;
|
|
122
|
+
created_at?: string;
|
|
123
|
+
expires_at: string;
|
|
124
|
+
updated_at?: string;
|
|
125
|
+
issued_at: string;
|
|
126
|
+
request_url: string;
|
|
127
|
+
ui: IUI;
|
|
128
|
+
oauth2_login_challenge?: string;
|
|
129
|
+
oauth2_login_request?: object;
|
|
130
|
+
organization_id?: string;
|
|
131
|
+
refresh?: boolean;
|
|
132
|
+
requestred_aal?: string;
|
|
133
|
+
return_to: string;
|
|
134
|
+
session_token_exchange_code?: string;
|
|
135
|
+
state: unknown;
|
|
136
|
+
transient_payload: object;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface ILogoutFlow {
|
|
140
|
+
logout_url: string;
|
|
141
|
+
logout_token: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface ISuccessfullNativeAuth {
|
|
145
|
+
session: ISession;
|
|
146
|
+
session_token: string;
|
|
147
|
+
identity?: IIdentity;
|
|
148
|
+
continue_with?: IContinueWith[];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface ISchema {
|
|
152
|
+
id: string;
|
|
153
|
+
schema: string;
|
|
154
|
+
url: string;
|
|
155
|
+
}
|
package/src/blogTypes.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const PostLinkTypes = {
|
|
2
|
+
cancelInvestment: 'can-i-cancel-my-investment',
|
|
3
|
+
dueDiligenceTips: 'due-diligence-tips',
|
|
4
|
+
investorsDueDiligence: 'investors-due-diligence',
|
|
5
|
+
} as const;
|
|
6
|
+
|
|
7
|
+
export type PostLinkTypes = typeof PostLinkTypes[keyof typeof PostLinkTypes];
|
|
8
|
+
|
|
9
|
+
export interface IMarkdownOptions {
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
date: string;
|
|
13
|
+
image: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IPostContent extends IMarkdownOptions {
|
|
18
|
+
content: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface IAuthor {
|
|
22
|
+
title: string;
|
|
23
|
+
date: string;
|
|
24
|
+
draft?: boolean;
|
|
25
|
+
image: string;
|
|
26
|
+
position?: string;
|
|
27
|
+
description: string;
|
|
28
|
+
favoriteTags?: string[];
|
|
29
|
+
slug?: string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Link fields shared by navigation and related-content UI. */
|
|
2
|
+
export interface UiContentBaseRecord {
|
|
3
|
+
readonly url: string;
|
|
4
|
+
readonly title: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/** Exact metadata consumed by menu, header, and breadcrumb UI. */
|
|
8
|
+
export interface UiNavigationContentRecord extends UiContentBaseRecord {
|
|
9
|
+
readonly rawUrl?: string;
|
|
10
|
+
readonly footerNav?: boolean;
|
|
11
|
+
readonly nav?: boolean;
|
|
12
|
+
readonly menuIcon?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Exact metadata consumed by article-card UI. */
|
|
16
|
+
export interface UiContentCardRecord extends UiContentBaseRecord {
|
|
17
|
+
readonly description: string;
|
|
18
|
+
readonly publishDate: string;
|
|
19
|
+
readonly image: string;
|
|
20
|
+
readonly srcset?: string;
|
|
21
|
+
readonly slug?: string;
|
|
22
|
+
readonly summary?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Exact metadata consumed by full blog-page UI. */
|
|
26
|
+
export interface UiBlogContentRecord extends UiContentCardRecord {
|
|
27
|
+
readonly subTitle?: string;
|
|
28
|
+
readonly updateDate?: string;
|
|
29
|
+
readonly tags?: readonly string[];
|
|
30
|
+
readonly layout?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Exact metadata consumed when rendering a blog author. */
|
|
34
|
+
export interface UiAuthorContentRecord extends UiContentBaseRecord {
|
|
35
|
+
readonly image: string;
|
|
36
|
+
readonly srcset?: string;
|
|
37
|
+
}
|