@x12i/catalox-openapi 5.9.8

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.
Files changed (2) hide show
  1. package/openapi.json +167 -0
  2. package/package.json +17 -0
package/openapi.json ADDED
@@ -0,0 +1,167 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Catalox Internal API",
5
+ "version": "5.9.7",
6
+ "description": "Internal private Catalox HTTP API (5.9.7). Open mode uses X-Catalox-Context; authix mode uses Bearer tokens."
7
+ },
8
+ "servers": [{ "url": "http://catalox-service.internal:3200", "description": "Internal cluster" }],
9
+ "components": {
10
+ "securitySchemes": {
11
+ "CataloxContextHeader": {
12
+ "type": "apiKey",
13
+ "in": "header",
14
+ "name": "X-Catalox-Context",
15
+ "description": "JSON CataloxContext (open mode, internal only)"
16
+ },
17
+ "BearerAuth": {
18
+ "type": "http",
19
+ "scheme": "bearer",
20
+ "description": "Authix ax1.* token (authix mode)"
21
+ }
22
+ },
23
+ "schemas": {
24
+ "CataloxContext": {
25
+ "type": "object",
26
+ "properties": {
27
+ "appId": { "type": "string" },
28
+ "superAdmin": { "type": "boolean" },
29
+ "scope": { "type": "object" }
30
+ }
31
+ },
32
+ "OutcomeWrapper": {
33
+ "type": "object",
34
+ "properties": {
35
+ "outcome": { "type": "string" },
36
+ "result": { "type": "object" },
37
+ "error": { "type": "object" }
38
+ }
39
+ }
40
+ }
41
+ },
42
+ "paths": {
43
+ "/health": {
44
+ "get": {
45
+ "summary": "Health check",
46
+ "responses": {
47
+ "200": {
48
+ "description": "OK",
49
+ "content": {
50
+ "application/json": {
51
+ "schema": {
52
+ "type": "object",
53
+ "properties": {
54
+ "status": { "type": "string" },
55
+ "version": { "type": "string" }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ },
64
+ "/v1/apps/{appId}/catalogs": {
65
+ "get": {
66
+ "summary": "List catalogs for app",
67
+ "parameters": [{ "name": "appId", "in": "path", "required": true, "schema": { "type": "string" } }],
68
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
69
+ "responses": { "200": { "description": "Catalog list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutcomeWrapper" } } } } }
70
+ }
71
+ },
72
+ "/v1/apps/{appId}/bootstrap": {
73
+ "get": {
74
+ "summary": "App catalog bootstrap",
75
+ "parameters": [{ "name": "appId", "in": "path", "required": true, "schema": { "type": "string" } }],
76
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
77
+ "responses": { "200": { "description": "Bootstrap", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutcomeWrapper" } } } } }
78
+ }
79
+ },
80
+ "/v1/catalogs/{catalogId}/items": {
81
+ "get": {
82
+ "summary": "List catalog items",
83
+ "parameters": [
84
+ { "name": "catalogId", "in": "path", "required": true, "schema": { "type": "string" } },
85
+ { "name": "limit", "in": "query", "schema": { "type": "integer" } },
86
+ { "name": "offset", "in": "query", "schema": { "type": "integer" } }
87
+ ],
88
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
89
+ "responses": {
90
+ "200": { "description": "ok or empty" },
91
+ "403": { "description": "denied" },
92
+ "409": { "description": "misconfigured" },
93
+ "422": { "description": "mapping_blocked" }
94
+ }
95
+ }
96
+ },
97
+ "/v1/catalogs/{catalogId}/items/{itemId}": {
98
+ "get": {
99
+ "summary": "Get catalog item",
100
+ "parameters": [
101
+ { "name": "catalogId", "in": "path", "required": true, "schema": { "type": "string" } },
102
+ { "name": "itemId", "in": "path", "required": true, "schema": { "type": "string" } }
103
+ ],
104
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
105
+ "responses": { "200": { "description": "Item" } }
106
+ },
107
+ "put": {
108
+ "summary": "Upsert native item",
109
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
110
+ "responses": { "200": { "description": "Upserted" } }
111
+ },
112
+ "patch": {
113
+ "summary": "Patch native item",
114
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
115
+ "responses": { "200": { "description": "Updated" } }
116
+ }
117
+ },
118
+ "/v1/catalogs/{catalogId}/items/{itemId}/native-record": {
119
+ "get": {
120
+ "summary": "Get native catalog item record envelope",
121
+ "parameters": [
122
+ { "name": "catalogId", "in": "path", "required": true, "schema": { "type": "string" } },
123
+ { "name": "itemId", "in": "path", "required": true, "schema": { "type": "string" } }
124
+ ],
125
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
126
+ "responses": { "200": { "description": "NativeCatalogItemRecord" }, "404": { "description": "not_found" } }
127
+ },
128
+ "put": {
129
+ "summary": "Replace native catalog item record (no merge)",
130
+ "parameters": [
131
+ { "name": "catalogId", "in": "path", "required": true, "schema": { "type": "string" } },
132
+ { "name": "itemId", "in": "path", "required": true, "schema": { "type": "string" } }
133
+ ],
134
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
135
+ "responses": { "200": { "description": "Replaced" } }
136
+ }
137
+ },
138
+ "/v1/catalogs/{catalogId}/search": {
139
+ "post": {
140
+ "summary": "Search catalog items",
141
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
142
+ "responses": { "200": { "description": "Search results" } }
143
+ }
144
+ },
145
+ "/v1/catalogs": {
146
+ "get": {
147
+ "summary": "List all catalogs (operator)",
148
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
149
+ "responses": { "200": { "description": "All catalogs" } }
150
+ }
151
+ },
152
+ "/v1/apps/{appId}/catalogs/{catalogId}/bind": {
153
+ "post": {
154
+ "summary": "Bind catalog to app",
155
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
156
+ "responses": { "200": { "description": "Bound" } }
157
+ }
158
+ },
159
+ "/v1/catalogs/{catalogId}/export": {
160
+ "get": {
161
+ "summary": "Export catalog snapshot JSON",
162
+ "security": [{ "CataloxContextHeader": [] }, { "BearerAuth": [] }],
163
+ "responses": { "200": { "description": "Export" } }
164
+ }
165
+ }
166
+ }
167
+ }
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@x12i/catalox-openapi",
3
+ "version": "5.9.8",
4
+ "description": "OpenAPI specification for Catalox HTTP API",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": "./openapi.json",
9
+ "./openapi.yaml": "./openapi.yaml",
10
+ "./openapi.json": "./openapi.json"
11
+ },
12
+ "files": ["openapi.yaml", "openapi.json"],
13
+ "scripts": {
14
+ "build": "node scripts/bundle.js",
15
+ "test": "node -e \"console.log('openapi: no tests')\""
16
+ }
17
+ }