docs: refresh readme and legal info
This commit is contained in:
+34
-23
@@ -1,18 +1,18 @@
|
||||
# @serve.zone/dcrouter-interfaces
|
||||
|
||||
Shared TypeScript contracts for dcrouter's TypedRequest API. Use this package when you want compile-time request/response types and shared data models without pulling in the higher-level client SDK.
|
||||
`@serve.zone/dcrouter-interfaces` contains the shared TypeScript data models and TypedRequest contracts used by dcrouter's OpsServer, dashboard, API client, tests, and external automation.
|
||||
|
||||
## Issue Reporting and Security
|
||||
|
||||
For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
|
||||
|
||||
## Installation
|
||||
## Install
|
||||
|
||||
```bash
|
||||
pnpm add @serve.zone/dcrouter-interfaces
|
||||
```
|
||||
|
||||
You can also consume the same contracts through the main package subpath:
|
||||
The same contracts are exposed through the main package subpath:
|
||||
|
||||
```typescript
|
||||
import { data, requests } from '@serve.zone/dcrouter/interfaces';
|
||||
@@ -22,23 +22,24 @@ import { data, requests } from '@serve.zone/dcrouter/interfaces';
|
||||
|
||||
| Export | Purpose |
|
||||
| --- | --- |
|
||||
| `data` | Shared runtime-shaped data such as identities, routes, stats, domains, DNS records, VPN data, remote ingress data, and email-domain data |
|
||||
| `requests` | TypedRequest request/response contracts for OpsServer endpoints |
|
||||
| `typedrequestInterfaces` | Re-exported helper types from `@api.global/typedrequest-interfaces` |
|
||||
| `data` | Shared runtime-shaped models such as identities, routes, DNS records, domains, email domains, remote ingress edges, VPN objects, stats, and security policy data. |
|
||||
| `requests` | TypedRequest request/response contracts for OpsServer methods. |
|
||||
| `typedrequestInterfaces` | Helper types re-exported from `@api.global/typedrequest-interfaces` through `plugins.ts`. |
|
||||
|
||||
## API Surface Covered
|
||||
## Covered API Areas
|
||||
|
||||
| Domain | Examples |
|
||||
| Area | Examples |
|
||||
| --- | --- |
|
||||
| Auth | login, logout, identity verification |
|
||||
| Routes | list merged routes, create, update, delete, toggle |
|
||||
| Access | API tokens, source profiles, target profiles, network targets, users |
|
||||
| DNS and domains | providers, domains, DNS records, ACME config |
|
||||
| Email | email operations and email-domain management |
|
||||
| Auth | admin login, logout, identity verification, users |
|
||||
| Routes | merged route listing, API route CRUD, toggles, warnings, ownership metadata |
|
||||
| Access | API tokens, source profiles, target profiles, network targets |
|
||||
| DNS and domains | DNS providers, domains, DNS records, ACME config |
|
||||
| Email | email-domain management and email operations |
|
||||
| Edge services | remote ingress, VPN, RADIUS |
|
||||
| Observability | stats, health, logs, configuration |
|
||||
| Observability | stats, combined stats, logs, configuration |
|
||||
| WorkHoster | external app/workhoster route ownership contracts |
|
||||
|
||||
## Quick Example
|
||||
## Raw TypedRequest Example
|
||||
|
||||
```typescript
|
||||
import { TypedRequest } from '@api.global/typedrequest';
|
||||
@@ -61,21 +62,31 @@ const request = new TypedRequest<requests.IReq_GetMergedRoutes>(
|
||||
const response = await request.fire({ identity });
|
||||
|
||||
for (const route of response.routes) {
|
||||
console.log(route.id, route.origin, route.systemKey, route.enabled);
|
||||
console.log(route.id, route.origin, route.enabled, route.systemKey);
|
||||
}
|
||||
```
|
||||
|
||||
## When To Use This Package
|
||||
## When To Use It
|
||||
|
||||
- Use it in tests that need strong request/response typing.
|
||||
- Use it in custom CLIs or dashboards that call TypedRequest directly.
|
||||
- Use it in shared code where both client and server need the same data shapes.
|
||||
- Use it in custom CLIs that call dcrouter's TypedRequest API directly.
|
||||
- Use it in tests that need request/response types without the OO client.
|
||||
- Use it in integrations where server and client code need the same data shapes.
|
||||
- Use `@serve.zone/dcrouter-apiclient` instead when you want higher-level managers and builders.
|
||||
|
||||
If you want managers, builders, and resource classes instead of raw contracts, use `@serve.zone/dcrouter-apiclient`.
|
||||
## Development
|
||||
|
||||
This folder is published from the dcrouter monorepo via `tspublish.json` with order `1`, before the client package that imports it.
|
||||
|
||||
Useful source entry points:
|
||||
|
||||
- `index.ts` exports `data` and `requests` namespaces.
|
||||
- `data/index.ts` groups shared data models.
|
||||
- `requests/index.ts` groups TypedRequest contracts.
|
||||
- `data/route-management.ts` defines route ownership, API token scopes, profiles, and network target shapes.
|
||||
|
||||
## License and Legal Information
|
||||
|
||||
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](../license) file.
|
||||
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license](../license) file.
|
||||
|
||||
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
|
||||
|
||||
@@ -87,7 +98,7 @@ Use of these trademarks must comply with Task Venture Capital GmbH's Trademark G
|
||||
|
||||
### Company Information
|
||||
|
||||
Task Venture Capital GmbH
|
||||
Task Venture Capital GmbH
|
||||
Registered at District Court Bremen HRB 35230 HB, Germany
|
||||
|
||||
For any legal inquiries or further information, please contact us via email at hello@task.vc.
|
||||
|
||||
Reference in New Issue
Block a user