@inklok/api-spec 7.2.0 → 7.2.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.
- package/README.md +101 -90
- package/openapi.yaml +1 -1
- package/package.json +12 -7
package/README.md
CHANGED
|
@@ -1,134 +1,145 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Inklok API Specification
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Canonical OpenAPI v3 specification for the Inklok public API.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This package contains the API contract used by Inklok developer tools, SDKs, and integrations. It defines available endpoints, request and response schemas, authentication requirements, and shared API components.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- Terraform uses this spec to configure API Gateway integrations
|
|
11
|
-
- `opaqueink_core` consumes this spec but does not own it
|
|
12
|
-
- All API changes must be made here first, then propagated to implementations
|
|
9
|
+
Install the specification package from npm:
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
```bash
|
|
12
|
+
npm install @inklok/api-spec
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
The specification can be used to:
|
|
18
|
+
|
|
19
|
+
- Generate API clients
|
|
20
|
+
- Generate strongly typed models
|
|
21
|
+
- Validate requests and responses
|
|
22
|
+
- Build custom integrations
|
|
23
|
+
- Keep integrations aligned with the Inklok API contract
|
|
15
24
|
|
|
16
|
-
|
|
25
|
+
Example:
|
|
17
26
|
|
|
18
|
-
|
|
27
|
+
```js
|
|
28
|
+
import fs from "node:fs";
|
|
19
29
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
const openapi = fs.readFileSync(
|
|
31
|
+
"node_modules/@inklok/api-spec/openapi.yaml",
|
|
32
|
+
"utf8"
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
console.log(openapi);
|
|
24
36
|
```
|
|
25
37
|
|
|
26
|
-
|
|
38
|
+
## API Documentation
|
|
27
39
|
|
|
28
|
-
|
|
40
|
+
The interactive API reference is available at:
|
|
29
41
|
|
|
30
|
-
|
|
42
|
+
https://docs.inklok.com/docs/api-reference
|
|
31
43
|
|
|
32
|
-
|
|
33
|
-
- **`components/`** - Modular component definitions (for maintainability, but consolidated into openapi.yaml for API Gateway)
|
|
34
|
-
- `schemas.yaml` - Data model schemas
|
|
35
|
-
- `responses.yaml` - Standard response definitions
|
|
36
|
-
- `security.yaml` - Security scheme definitions
|
|
37
|
-
- **`package.json`** - Node.js dependencies for validation and deployment
|
|
44
|
+
The API reference includes:
|
|
38
45
|
|
|
39
|
-
|
|
46
|
+
- Endpoint documentation
|
|
47
|
+
- Authentication requirements
|
|
48
|
+
- Request and response schemas
|
|
49
|
+
- Example requests and responses
|
|
50
|
+
- Interactive API exploration
|
|
40
51
|
|
|
41
|
-
|
|
52
|
+
## API Endpoint
|
|
42
53
|
|
|
43
|
-
|
|
44
|
-
cd api
|
|
45
|
-
npm install
|
|
46
|
-
```
|
|
54
|
+
The production Inklok API endpoint is:
|
|
47
55
|
|
|
48
|
-
|
|
56
|
+
https://api.inklok.com
|
|
49
57
|
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
npm install
|
|
53
|
-
npm run validate-basic
|
|
54
|
-
# or directly:
|
|
55
|
-
node validate-basic.js
|
|
56
|
-
```
|
|
58
|
+
SDK clients and integrations should use this as the API base URL.
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
chmod +x validate.sh
|
|
61
|
-
./validate.sh
|
|
62
|
-
```
|
|
60
|
+
## Package Contents
|
|
63
61
|
|
|
64
|
-
|
|
62
|
+
This package contains:
|
|
65
63
|
|
|
66
|
-
```
|
|
67
|
-
|
|
64
|
+
```text
|
|
65
|
+
openapi.yaml
|
|
66
|
+
components/
|
|
67
|
+
schemas.yaml
|
|
68
|
+
responses.yaml
|
|
69
|
+
security.yaml
|
|
70
|
+
package.json
|
|
68
71
|
```
|
|
69
72
|
|
|
70
|
-
|
|
73
|
+
## Specification Details
|
|
71
74
|
|
|
72
|
-
|
|
75
|
+
This package follows the OpenAPI specification format.
|
|
73
76
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
It defines:
|
|
78
|
+
|
|
79
|
+
- API paths and operations
|
|
80
|
+
- Request parameters
|
|
81
|
+
- Request bodies
|
|
82
|
+
- Response schemas
|
|
83
|
+
- Authentication schemes
|
|
84
|
+
- Shared response definitions
|
|
79
85
|
|
|
80
|
-
|
|
86
|
+
## Authentication
|
|
81
87
|
|
|
82
|
-
|
|
88
|
+
The Inklok API uses authenticated requests.
|
|
83
89
|
|
|
84
|
-
|
|
90
|
+
Supported authentication methods include:
|
|
85
91
|
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
- Request/response mappings
|
|
89
|
-
- CORS behavior
|
|
92
|
+
- User access tokens
|
|
93
|
+
- Inklok API keys
|
|
90
94
|
|
|
91
|
-
|
|
95
|
+
See the API reference for authentication details and examples.
|
|
92
96
|
|
|
93
97
|
## API Versioning
|
|
94
98
|
|
|
95
|
-
|
|
99
|
+
The Inklok API uses versioned endpoints.
|
|
100
|
+
|
|
101
|
+
New API capabilities are introduced using version prefixes:
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
/v1/agreements
|
|
105
|
+
/v1/documents
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Applications should use the versioned API paths documented in the API reference.
|
|
109
|
+
|
|
110
|
+
## Validation
|
|
111
|
+
|
|
112
|
+
To validate the specification locally:
|
|
96
113
|
|
|
97
|
-
|
|
114
|
+
```bash
|
|
115
|
+
npm install
|
|
116
|
+
npm run validate-basic
|
|
117
|
+
```
|
|
98
118
|
|
|
99
|
-
|
|
100
|
-
- ✅ New endpoint: `/v1/orgs/{orgId}/members`
|
|
101
|
-
- ❌ Missing version: `/orgs/{orgId}/members` (not allowed for new endpoints)
|
|
119
|
+
## Consuming Updates
|
|
102
120
|
|
|
103
|
-
|
|
121
|
+
The package is published as:
|
|
104
122
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
6. **Run validation**: `npm run validate-basic`
|
|
111
|
-
7. **Update Terraform** in `../api_gateway/` to reference the new Lambda function
|
|
123
|
+
```text
|
|
124
|
+
@inklok/api-spec
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Install:
|
|
112
128
|
|
|
113
|
-
|
|
129
|
+
```bash
|
|
130
|
+
npm install @inklok/api-spec
|
|
131
|
+
```
|
|
114
132
|
|
|
115
|
-
|
|
116
|
-
- **Operation IDs** must be unique and descriptive (use kebab-case)
|
|
117
|
-
- **All endpoints** require Bearer JWT authentication (defined globally)
|
|
118
|
-
- **Error responses** should use component references from `components/responses`
|
|
119
|
-
- **Schemas** should be defined in `components/schemas` and referenced
|
|
120
|
-
- **Tags** should be used consistently to group related operations
|
|
133
|
+
New versions are released as the Inklok API evolves.
|
|
121
134
|
|
|
122
|
-
##
|
|
135
|
+
## Related Resources
|
|
123
136
|
|
|
124
|
-
|
|
137
|
+
API Reference:
|
|
138
|
+
https://docs.inklok.com/docs/api-reference
|
|
125
139
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
- **Consuming:** `npm install @inklok/api-spec`
|
|
140
|
+
Inklok:
|
|
141
|
+
https://inklok.com
|
|
129
142
|
|
|
130
|
-
##
|
|
143
|
+
## License
|
|
131
144
|
|
|
132
|
-
|
|
133
|
-
- [API Gateway OpenAPI Extensions](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html)
|
|
134
|
-
- [Scalar API Reference](https://github.com/scalar/scalar)
|
|
145
|
+
See package metadata for licensing information.
|
package/openapi.yaml
CHANGED
|
@@ -8,7 +8,7 @@ info:
|
|
|
8
8
|
Authenticate using an API key or bearer token, then use the resources below to manage
|
|
9
9
|
templates, agreements, documents, and signing. For your first integration, start with
|
|
10
10
|
the Quick Start guide.
|
|
11
|
-
version: "7.2.
|
|
11
|
+
version: "7.2.1"
|
|
12
12
|
contact:
|
|
13
13
|
name: Inklok API Support
|
|
14
14
|
email: support@inklok.com
|
package/package.json
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inklok/api-spec",
|
|
3
|
-
"version": "7.2.
|
|
4
|
-
"description": "OpenAPI specification for
|
|
3
|
+
"version": "7.2.1",
|
|
4
|
+
"description": "Canonical OpenAPI specification for the Inklok public API.",
|
|
5
5
|
"main": "openapi.yaml",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"inklok",
|
|
9
|
+
"api",
|
|
10
|
+
"openapi",
|
|
11
|
+
"sdk",
|
|
12
|
+
"typescript",
|
|
13
|
+
"integration",
|
|
14
|
+
"developer"
|
|
15
|
+
],
|
|
6
16
|
"files": [
|
|
7
17
|
"openapi.yaml",
|
|
8
18
|
"components/",
|
|
@@ -22,11 +32,6 @@
|
|
|
22
32
|
"engines": {
|
|
23
33
|
"node": ">=18.0.0"
|
|
24
34
|
},
|
|
25
|
-
"repository": {
|
|
26
|
-
"type": "git",
|
|
27
|
-
"url": "https://github.com/ryan-m-erickson/opaqueink_infra.git",
|
|
28
|
-
"directory": "api"
|
|
29
|
-
},
|
|
30
35
|
"publishConfig": {
|
|
31
36
|
"registry": "https://registry.npmjs.org",
|
|
32
37
|
"access": "public"
|