@inklok/api-spec 7.2.0 → 7.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/README.md +101 -90
- package/openapi.yaml +54 -2
- 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.2"
|
|
12
12
|
contact:
|
|
13
13
|
name: Inklok API Support
|
|
14
14
|
email: support@inklok.com
|
|
@@ -2480,6 +2480,18 @@ paths:
|
|
|
2480
2480
|
properties:
|
|
2481
2481
|
execution_id:
|
|
2482
2482
|
type: string
|
|
2483
|
+
agreement_title:
|
|
2484
|
+
type: string
|
|
2485
|
+
nullable: true
|
|
2486
|
+
description: Human-readable title for this agreement.
|
|
2487
|
+
agreement_message:
|
|
2488
|
+
type: string
|
|
2489
|
+
nullable: true
|
|
2490
|
+
description: Shared message from the sender for all recipients.
|
|
2491
|
+
recipient_message:
|
|
2492
|
+
type: string
|
|
2493
|
+
nullable: true
|
|
2494
|
+
description: Private message for the authenticated signer only.
|
|
2483
2495
|
version:
|
|
2484
2496
|
type: string
|
|
2485
2497
|
description: Rendering engine version for this agreement
|
|
@@ -4694,11 +4706,26 @@ components:
|
|
|
4694
4706
|
name:
|
|
4695
4707
|
type: string
|
|
4696
4708
|
nullable: true
|
|
4709
|
+
recipientMessage:
|
|
4710
|
+
type: string
|
|
4711
|
+
nullable: true
|
|
4712
|
+
maxLength: 5000
|
|
4713
|
+
description: Optional private message visible only to this recipient.
|
|
4697
4714
|
|
|
4698
4715
|
CreateExecutionRequest:
|
|
4699
4716
|
type: object
|
|
4700
|
-
required: [participants, crypto]
|
|
4717
|
+
required: [agreementTitle, participants, crypto]
|
|
4701
4718
|
properties:
|
|
4719
|
+
agreementTitle:
|
|
4720
|
+
type: string
|
|
4721
|
+
minLength: 1
|
|
4722
|
+
maxLength: 160
|
|
4723
|
+
description: Human-readable title for this agreement.
|
|
4724
|
+
agreementMessage:
|
|
4725
|
+
type: string
|
|
4726
|
+
nullable: true
|
|
4727
|
+
maxLength: 5000
|
|
4728
|
+
description: Optional shared message visible to all recipients.
|
|
4702
4729
|
participants:
|
|
4703
4730
|
type: array
|
|
4704
4731
|
minItems: 1
|
|
@@ -5047,6 +5074,16 @@ components:
|
|
|
5047
5074
|
type: integer
|
|
5048
5075
|
minimum: 1
|
|
5049
5076
|
readOnly: true
|
|
5077
|
+
agreementTitle:
|
|
5078
|
+
type: string
|
|
5079
|
+
nullable: true
|
|
5080
|
+
readOnly: true
|
|
5081
|
+
description: Human-readable title for this agreement.
|
|
5082
|
+
agreementMessage:
|
|
5083
|
+
type: string
|
|
5084
|
+
nullable: true
|
|
5085
|
+
readOnly: true
|
|
5086
|
+
description: Shared message from the sender for all recipients.
|
|
5050
5087
|
pdfEngineVersion:
|
|
5051
5088
|
type: integer
|
|
5052
5089
|
minimum: 1
|
|
@@ -5092,6 +5129,7 @@ components:
|
|
|
5092
5129
|
createdAt,
|
|
5093
5130
|
updatedAt,
|
|
5094
5131
|
pdfEngineVersion,
|
|
5132
|
+
agreementTitle,
|
|
5095
5133
|
participants,
|
|
5096
5134
|
placeholderValues,
|
|
5097
5135
|
]
|
|
@@ -5107,6 +5145,16 @@ components:
|
|
|
5107
5145
|
status:
|
|
5108
5146
|
$ref: '#/components/schemas/ExecutionStatus'
|
|
5109
5147
|
readOnly: true
|
|
5148
|
+
agreementTitle:
|
|
5149
|
+
type: string
|
|
5150
|
+
nullable: true
|
|
5151
|
+
readOnly: true
|
|
5152
|
+
description: Human-readable title for this agreement.
|
|
5153
|
+
agreementMessage:
|
|
5154
|
+
type: string
|
|
5155
|
+
nullable: true
|
|
5156
|
+
readOnly: true
|
|
5157
|
+
description: Shared message from the sender for all recipients.
|
|
5110
5158
|
createdAt:
|
|
5111
5159
|
type: string
|
|
5112
5160
|
format: date-time
|
|
@@ -5173,6 +5221,10 @@ components:
|
|
|
5173
5221
|
color:
|
|
5174
5222
|
type: string
|
|
5175
5223
|
nullable: true
|
|
5224
|
+
recipientMessage:
|
|
5225
|
+
type: string
|
|
5226
|
+
nullable: true
|
|
5227
|
+
description: Private message for this recipient. Signer-scoped responses only include the current signer's message.
|
|
5176
5228
|
|
|
5177
5229
|
ExecutionParticipantSearchResult:
|
|
5178
5230
|
type: object
|
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.2",
|
|
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"
|