@blezgo/api-sdk 0.1.0
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 +6 -0
- package/README.md +27 -0
- package/dist/account/client.d.ts +3 -0
- package/dist/account/client.d.ts.map +1 -0
- package/dist/account/client.js +3 -0
- package/dist/account/client.js.map +1 -0
- package/dist/account/generated.d.ts +2648 -0
- package/dist/account/generated.d.ts.map +1 -0
- package/dist/account/generated.js +6 -0
- package/dist/account/generated.js.map +1 -0
- package/dist/account/index.d.ts +2 -0
- package/dist/account/index.d.ts.map +1 -0
- package/dist/account/index.js +2 -0
- package/dist/account/index.js.map +1 -0
- package/dist/admin/client.d.ts +3 -0
- package/dist/admin/client.d.ts.map +1 -0
- package/dist/admin/client.js +3 -0
- package/dist/admin/client.js.map +1 -0
- package/dist/admin/generated.d.ts +956 -0
- package/dist/admin/generated.d.ts.map +1 -0
- package/dist/admin/generated.js +6 -0
- package/dist/admin/generated.js.map +1 -0
- package/dist/admin/index.d.ts +2 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +2 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/authentication/client.d.ts +3 -0
- package/dist/authentication/client.d.ts.map +1 -0
- package/dist/authentication/client.js +3 -0
- package/dist/authentication/client.js.map +1 -0
- package/dist/authentication/generated.d.ts +746 -0
- package/dist/authentication/generated.d.ts.map +1 -0
- package/dist/authentication/generated.js +6 -0
- package/dist/authentication/generated.js.map +1 -0
- package/dist/authentication/index.d.ts +2 -0
- package/dist/authentication/index.d.ts.map +1 -0
- package/dist/authentication/index.js +2 -0
- package/dist/authentication/index.js.map +1 -0
- package/dist/cache/client.d.ts +3 -0
- package/dist/cache/client.d.ts.map +1 -0
- package/dist/cache/client.js +3 -0
- package/dist/cache/client.js.map +1 -0
- package/dist/cache/generated.d.ts +3355 -0
- package/dist/cache/generated.d.ts.map +1 -0
- package/dist/cache/generated.js +6 -0
- package/dist/cache/generated.js.map +1 -0
- package/dist/cache/index.d.ts +2 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +2 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/config/client.d.ts +3 -0
- package/dist/config/client.d.ts.map +1 -0
- package/dist/config/client.js +3 -0
- package/dist/config/client.js.map +1 -0
- package/dist/config/generated.d.ts +1150 -0
- package/dist/config/generated.d.ts.map +1 -0
- package/dist/config/generated.js +6 -0
- package/dist/config/generated.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -0
- package/dist/dashboard/client.d.ts +3 -0
- package/dist/dashboard/client.d.ts.map +1 -0
- package/dist/dashboard/client.js +3 -0
- package/dist/dashboard/client.js.map +1 -0
- package/dist/dashboard/generated.d.ts +4831 -0
- package/dist/dashboard/generated.d.ts.map +1 -0
- package/dist/dashboard/generated.js +6 -0
- package/dist/dashboard/generated.js.map +1 -0
- package/dist/dashboard/index.d.ts +2 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +2 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/errors/client.d.ts +3 -0
- package/dist/errors/client.d.ts.map +1 -0
- package/dist/errors/client.js +3 -0
- package/dist/errors/client.js.map +1 -0
- package/dist/errors/generated.d.ts +340 -0
- package/dist/errors/generated.d.ts.map +1 -0
- package/dist/errors/generated.js +6 -0
- package/dist/errors/generated.js.map +1 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +2 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/internationalization/client.d.ts +3 -0
- package/dist/internationalization/client.d.ts.map +1 -0
- package/dist/internationalization/client.js +3 -0
- package/dist/internationalization/client.js.map +1 -0
- package/dist/internationalization/generated.d.ts +587 -0
- package/dist/internationalization/generated.d.ts.map +1 -0
- package/dist/internationalization/generated.js +6 -0
- package/dist/internationalization/generated.js.map +1 -0
- package/dist/internationalization/index.d.ts +2 -0
- package/dist/internationalization/index.d.ts.map +1 -0
- package/dist/internationalization/index.js +2 -0
- package/dist/internationalization/index.js.map +1 -0
- package/dist/invitations/client.d.ts +3 -0
- package/dist/invitations/client.d.ts.map +1 -0
- package/dist/invitations/client.js +3 -0
- package/dist/invitations/client.js.map +1 -0
- package/dist/invitations/generated.d.ts +4019 -0
- package/dist/invitations/generated.d.ts.map +1 -0
- package/dist/invitations/generated.js +6 -0
- package/dist/invitations/generated.js.map +1 -0
- package/dist/invitations/index.d.ts +2 -0
- package/dist/invitations/index.d.ts.map +1 -0
- package/dist/invitations/index.js +2 -0
- package/dist/invitations/index.js.map +1 -0
- package/dist/registration/client.d.ts +3 -0
- package/dist/registration/client.d.ts.map +1 -0
- package/dist/registration/client.js +3 -0
- package/dist/registration/client.js.map +1 -0
- package/dist/registration/generated.d.ts +1010 -0
- package/dist/registration/generated.d.ts.map +1 -0
- package/dist/registration/generated.js +6 -0
- package/dist/registration/generated.js.map +1 -0
- package/dist/registration/index.d.ts +2 -0
- package/dist/registration/index.d.ts.map +1 -0
- package/dist/registration/index.js +2 -0
- package/dist/registration/index.js.map +1 -0
- package/dist/role/client.d.ts +3 -0
- package/dist/role/client.d.ts.map +1 -0
- package/dist/role/client.js +3 -0
- package/dist/role/client.js.map +1 -0
- package/dist/role/generated.d.ts +6324 -0
- package/dist/role/generated.d.ts.map +1 -0
- package/dist/role/generated.js +6 -0
- package/dist/role/generated.js.map +1 -0
- package/dist/role/index.d.ts +2 -0
- package/dist/role/index.d.ts.map +1 -0
- package/dist/role/index.js +2 -0
- package/dist/role/index.js.map +1 -0
- package/dist/tenant/client.d.ts +3 -0
- package/dist/tenant/client.d.ts.map +1 -0
- package/dist/tenant/client.js +3 -0
- package/dist/tenant/client.js.map +1 -0
- package/dist/tenant/generated.d.ts +8273 -0
- package/dist/tenant/generated.d.ts.map +1 -0
- package/dist/tenant/generated.js +6 -0
- package/dist/tenant/generated.js.map +1 -0
- package/dist/tenant/index.d.ts +2 -0
- package/dist/tenant/index.d.ts.map +1 -0
- package/dist/tenant/index.js +2 -0
- package/dist/tenant/index.js.map +1 -0
- package/dist/tokens/client.d.ts +3 -0
- package/dist/tokens/client.d.ts.map +1 -0
- package/dist/tokens/client.js +3 -0
- package/dist/tokens/client.js.map +1 -0
- package/dist/tokens/generated.d.ts +528 -0
- package/dist/tokens/generated.d.ts.map +1 -0
- package/dist/tokens/generated.js +6 -0
- package/dist/tokens/generated.js.map +1 -0
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +2 -0
- package/dist/tokens/index.js.map +1 -0
- package/dist/user/client.d.ts +3 -0
- package/dist/user/client.d.ts.map +1 -0
- package/dist/user/client.js +3 -0
- package/dist/user/client.js.map +1 -0
- package/dist/user/generated.d.ts +4350 -0
- package/dist/user/generated.d.ts.map +1 -0
- package/dist/user/generated.js +6 -0
- package/dist/user/generated.js.map +1 -0
- package/dist/user/index.d.ts +2 -0
- package/dist/user/index.d.ts.map +1 -0
- package/dist/user/index.js +2 -0
- package/dist/user/index.js.map +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,1150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/v1/config/validate-domain": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
get?: never;
|
|
14
|
+
put?: never;
|
|
15
|
+
/**
|
|
16
|
+
* Validate Domain
|
|
17
|
+
* @description Validate domain and return complete tenant configuration (PUBLIC endpoint)
|
|
18
|
+
*
|
|
19
|
+
* **For**: Frontend applications on startup
|
|
20
|
+
* **Purpose**: Discover API endpoint, API key, branding, and feature flags
|
|
21
|
+
*
|
|
22
|
+
* **FLEXIBLE INPUT**: Accepts domain in ANY format (Industry Standard)
|
|
23
|
+
* - Full URLs: https://client1.yourdomain.com/path?query=1
|
|
24
|
+
* - Partial URLs: client1.yourdomain.com/path
|
|
25
|
+
* - With/without protocol: http://client1.yourdomain.com or client1.yourdomain.com
|
|
26
|
+
* - With ports: client1.yourdomain.com:8080
|
|
27
|
+
* - With trailing slashes: client1.yourdomain.com/
|
|
28
|
+
* - Mixed case: Client1.Yourdomain.COM
|
|
29
|
+
* - With www: www.client1.yourdomain.com
|
|
30
|
+
*
|
|
31
|
+
* Backend automatically extracts and normalizes the domain - no client-side cleanup needed!
|
|
32
|
+
*
|
|
33
|
+
* **How Frontend Uses This**:
|
|
34
|
+
* ```javascript
|
|
35
|
+
* // Step 1: Get domain (ANY format works!)
|
|
36
|
+
* const domain = window.location.href; // Full URL: "https://client1.yourdomain.com/dashboard"
|
|
37
|
+
* // OR just hostname: window.location.hostname; // "client1.yourdomain.com"
|
|
38
|
+
*
|
|
39
|
+
* // Step 2: Call validation endpoint (fallback API)
|
|
40
|
+
* const response = await fetch('https://api.yourdomain.com/v1/config/validate-domain', {
|
|
41
|
+
* method: 'POST',
|
|
42
|
+
* headers: { 'Content-Type': 'application/json' },
|
|
43
|
+
* body: JSON.stringify({ domain }) // Works with ANY format!
|
|
44
|
+
* });
|
|
45
|
+
*
|
|
46
|
+
* // Step 3: Cache config
|
|
47
|
+
* const config = await response.json();
|
|
48
|
+
* localStorage.setItem('tenant_config', JSON.stringify({
|
|
49
|
+
* data: config.data,
|
|
50
|
+
* expiresAt: Date.now() + (config.data.cache_ttl * 1000)
|
|
51
|
+
* }));
|
|
52
|
+
*
|
|
53
|
+
* // Step 4: Use cached config for all API calls
|
|
54
|
+
* const apiClient = {
|
|
55
|
+
* baseURL: config.data.api.endpoint,
|
|
56
|
+
* apiKey: config.data.api.public_key,
|
|
57
|
+
* orgId: config.data.tenant.org_id
|
|
58
|
+
* };
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* **Example Request Bodies** (ALL formats accepted):
|
|
62
|
+
* ```json
|
|
63
|
+
* // Simple domain
|
|
64
|
+
* {"domain": "client1.yourdomain.com"}
|
|
65
|
+
*
|
|
66
|
+
* // Full URL with path
|
|
67
|
+
* {"domain": "https://client1.yourdomain.com/dashboard"}
|
|
68
|
+
*
|
|
69
|
+
* // With port
|
|
70
|
+
* {"domain": "client1.yourdomain.com:8080"}
|
|
71
|
+
*
|
|
72
|
+
* // With trailing slash and query
|
|
73
|
+
* {"domain": "https://app.client1.com/?ref=landing"}
|
|
74
|
+
*
|
|
75
|
+
* // Mixed case (normalized automatically)
|
|
76
|
+
* {"domain": "Client1.Yourdomain.COM"}
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* **Example Response** (data field - FULL configuration):
|
|
80
|
+
* ```json
|
|
81
|
+
* {
|
|
82
|
+
* "tenant_id": "tenant_123",
|
|
83
|
+
* "tenant_name": "Client1 Platform",
|
|
84
|
+
* "tenant_slug": "client1",
|
|
85
|
+
* "is_active": true,
|
|
86
|
+
* "subscription_tier": "professional",
|
|
87
|
+
* "tenant": {
|
|
88
|
+
* "org_id": 123,
|
|
89
|
+
* "subdomain": "client1",
|
|
90
|
+
* "custom_domain": "app.client1.com",
|
|
91
|
+
* "custom_domain_verified": true,
|
|
92
|
+
* "use_custom_domain": true,
|
|
93
|
+
* "primary_domain": "app.client1.com",
|
|
94
|
+
* "fallback_domain": "client1.yourdomain.com"
|
|
95
|
+
* },
|
|
96
|
+
* "api": {
|
|
97
|
+
* "endpoint": "https://api.yourdomain.com",
|
|
98
|
+
* "public_key": "pk_live_5E6F7G8hI9J0kl1M",
|
|
99
|
+
* "version": "v1",
|
|
100
|
+
* "environment": "live",
|
|
101
|
+
* "rate_limits": {"per_minute": 60, "per_hour": 3600, "per_day": 100000},
|
|
102
|
+
* "websocket_url": "wss://ws.yourdomain.com",
|
|
103
|
+
* "cdn_url": "https://cdn.yourdomain.com",
|
|
104
|
+
* "upload_url": "https://upload.yourdomain.com"
|
|
105
|
+
* },
|
|
106
|
+
* "branding": {
|
|
107
|
+
* "logo_url": "https://cdn.client1.com/logo.png",
|
|
108
|
+
* "logo_dark_url": "https://cdn.client1.com/logo-dark.png",
|
|
109
|
+
* "favicon_url": "https://cdn.client1.com/favicon.ico",
|
|
110
|
+
* "brand_name": "Client1 Platform",
|
|
111
|
+
* "tagline": "Your learning platform"
|
|
112
|
+
* },
|
|
113
|
+
* "theme": {
|
|
114
|
+
* "default_mode": "light",
|
|
115
|
+
* "allow_toggle": true,
|
|
116
|
+
* "colors_light": {"primary": "#6366f1", "background": "#ffffff"},
|
|
117
|
+
* "colors_dark": {"primary": "#818cf8", "background": "#1f2937"}
|
|
118
|
+
* },
|
|
119
|
+
* "typography": {
|
|
120
|
+
* "font_family_sans": "Inter, system-ui, sans-serif",
|
|
121
|
+
* "font_urls": ["https://fonts.googleapis.com/css2?family=Inter"]
|
|
122
|
+
* },
|
|
123
|
+
* "layout": {
|
|
124
|
+
* "max_width": "1280px",
|
|
125
|
+
* "header": {"height": "64px", "sticky": true},
|
|
126
|
+
* "sidebar": {"width": "256px", "collapsible": true}
|
|
127
|
+
* },
|
|
128
|
+
* "navigation_public": {
|
|
129
|
+
* "header_menu": [{"id": "home", "label": "Home", "href": "/"}],
|
|
130
|
+
* "footer_menu": [{"id": "about", "label": "About", "href": "/about"}]
|
|
131
|
+
* },
|
|
132
|
+
* "features": {
|
|
133
|
+
* "auth_email_password": true,
|
|
134
|
+
* "auth_social_google": true,
|
|
135
|
+
* "cart_enabled": true,
|
|
136
|
+
* "search_enabled": true
|
|
137
|
+
* },
|
|
138
|
+
* "seo": {
|
|
139
|
+
* "default_title": "Client1 Platform",
|
|
140
|
+
* "title_template": "%s | Client1",
|
|
141
|
+
* "default_description": "Your learning platform"
|
|
142
|
+
* },
|
|
143
|
+
* "localization": {
|
|
144
|
+
* "default_language": "en-US",
|
|
145
|
+
* "supported_languages": ["en-US", "es-ES"],
|
|
146
|
+
* "default_currency": "USD",
|
|
147
|
+
* "timezone": "America/New_York"
|
|
148
|
+
* },
|
|
149
|
+
* "contact": {
|
|
150
|
+
* "email": "support@client1.com",
|
|
151
|
+
* "phone": "+1-555-123-4567"
|
|
152
|
+
* },
|
|
153
|
+
* "legal": {
|
|
154
|
+
* "privacy_policy_url": "https://client1.com/privacy",
|
|
155
|
+
* "terms_of_service_url": "https://client1.com/terms"
|
|
156
|
+
* },
|
|
157
|
+
* "custom_code": {
|
|
158
|
+
* "head_scripts": "",
|
|
159
|
+
* "custom_css": ""
|
|
160
|
+
* },
|
|
161
|
+
* "spaces": {
|
|
162
|
+
* "homepage": 1,
|
|
163
|
+
* "teachers_marketplace": 223
|
|
164
|
+
* },
|
|
165
|
+
* "kill_switches": {
|
|
166
|
+
* "disable_login": false,
|
|
167
|
+
* "disable_signup": false,
|
|
168
|
+
* "disable_checkout": false
|
|
169
|
+
* },
|
|
170
|
+
* "cors": {
|
|
171
|
+
* "allowed_origins": ["https://client1.yourdomain.com", "https://app.client1.com"]
|
|
172
|
+
* },
|
|
173
|
+
* "metadata": {
|
|
174
|
+
* "cached_at": "2025-11-22T12:00:00Z",
|
|
175
|
+
* "cache_ttl": 3600,
|
|
176
|
+
* "config_version": "1.0.0"
|
|
177
|
+
* }
|
|
178
|
+
* }
|
|
179
|
+
* ```
|
|
180
|
+
*
|
|
181
|
+
* **Required Fields**: domain
|
|
182
|
+
* **Note**: user_agent and client_ip are automatically extracted from request headers
|
|
183
|
+
*
|
|
184
|
+
* **Rate Limit**: 10 requests per minute per domain
|
|
185
|
+
* **Authentication**: None (public endpoint)
|
|
186
|
+
* **Headers**: None required
|
|
187
|
+
*
|
|
188
|
+
* **Response Codes**:
|
|
189
|
+
* - 200: Domain validated, configuration returned
|
|
190
|
+
* - 404: Domain not found or not active
|
|
191
|
+
* - 403: Custom domain not verified
|
|
192
|
+
* - 429: Rate limit exceeded
|
|
193
|
+
* - 500: Server error
|
|
194
|
+
*
|
|
195
|
+
* **Industry Standard**: Auth0, Shopify, Intercom all have similar endpoints for tenant configuration discovery
|
|
196
|
+
*/
|
|
197
|
+
post: operations["validateDomain"];
|
|
198
|
+
delete?: never;
|
|
199
|
+
options?: never;
|
|
200
|
+
head?: never;
|
|
201
|
+
patch?: never;
|
|
202
|
+
trace?: never;
|
|
203
|
+
};
|
|
204
|
+
"/v1/config/check-domain-availability": {
|
|
205
|
+
parameters: {
|
|
206
|
+
query?: never;
|
|
207
|
+
header?: never;
|
|
208
|
+
path?: never;
|
|
209
|
+
cookie?: never;
|
|
210
|
+
};
|
|
211
|
+
get?: never;
|
|
212
|
+
put?: never;
|
|
213
|
+
/**
|
|
214
|
+
* Check Domain Availability
|
|
215
|
+
* @description Check if custom domain is available for registration
|
|
216
|
+
*
|
|
217
|
+
* **For**: Admin panel - Custom domain setup
|
|
218
|
+
* **Purpose**: Check if custom domain can be added before DNS verification
|
|
219
|
+
*
|
|
220
|
+
* **Example Request Body**:
|
|
221
|
+
* ```json
|
|
222
|
+
* {
|
|
223
|
+
* "custom_domain": "app.client1.com"
|
|
224
|
+
* }
|
|
225
|
+
* ```
|
|
226
|
+
*
|
|
227
|
+
* **Example Responses**:
|
|
228
|
+
*
|
|
229
|
+
* **Available**:
|
|
230
|
+
* ```json
|
|
231
|
+
* {
|
|
232
|
+
* "available": true,
|
|
233
|
+
* "reason": "Available for registration"
|
|
234
|
+
* }
|
|
235
|
+
* ```
|
|
236
|
+
*
|
|
237
|
+
* **Already in use (different org)**:
|
|
238
|
+
* ```json
|
|
239
|
+
* {
|
|
240
|
+
* "available": false,
|
|
241
|
+
* "reason": "Already in use by another organization"
|
|
242
|
+
* }
|
|
243
|
+
* ```
|
|
244
|
+
*
|
|
245
|
+
* **Already registered (same org)**:
|
|
246
|
+
* ```json
|
|
247
|
+
* {
|
|
248
|
+
* "available": true,
|
|
249
|
+
* "reason": "Already registered to your organization"
|
|
250
|
+
* }
|
|
251
|
+
* ```
|
|
252
|
+
*
|
|
253
|
+
* **Required Fields**: custom_domain
|
|
254
|
+
* **Rate Limit**: 10 requests per minute
|
|
255
|
+
* **Authentication**: Required (JWT token or API key)
|
|
256
|
+
* **Headers**: Authorization: Bearer {token} OR X-Api-Key: {api_key}
|
|
257
|
+
*
|
|
258
|
+
* **Response Codes**:
|
|
259
|
+
* - 200: Availability checked
|
|
260
|
+
* - 400: Invalid domain format
|
|
261
|
+
* - 401: Unauthorized (missing auth)
|
|
262
|
+
* - 429: Rate limit exceeded
|
|
263
|
+
* - 500: Server error
|
|
264
|
+
*
|
|
265
|
+
* **Workflow**:
|
|
266
|
+
* 1. Admin enters custom domain in UI
|
|
267
|
+
* 2. Frontend calls this endpoint to check availability
|
|
268
|
+
* 3. If available, proceed to DNS verification setup
|
|
269
|
+
* 4. If not available, show error message
|
|
270
|
+
*/
|
|
271
|
+
post: operations["checkDomainAvailability"];
|
|
272
|
+
delete?: never;
|
|
273
|
+
options?: never;
|
|
274
|
+
head?: never;
|
|
275
|
+
patch?: never;
|
|
276
|
+
trace?: never;
|
|
277
|
+
};
|
|
278
|
+
"/v1/config/navigation": {
|
|
279
|
+
parameters: {
|
|
280
|
+
query?: never;
|
|
281
|
+
header?: never;
|
|
282
|
+
path?: never;
|
|
283
|
+
cookie?: never;
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* Get Navigation
|
|
287
|
+
* @description Get role-based navigation for authenticated user (AUTHENTICATED endpoint)
|
|
288
|
+
*
|
|
289
|
+
* **For**: Frontend after user login
|
|
290
|
+
* **Purpose**: Get navigation menus based on user's role(s)
|
|
291
|
+
*
|
|
292
|
+
* **How Navigation Works**:
|
|
293
|
+
* 1. User logs in, frontend calls this endpoint
|
|
294
|
+
* 2. Backend extracts user's roles from JWT
|
|
295
|
+
* 3. Returns merged navigation for all user roles
|
|
296
|
+
* 4. Frontend renders role-specific menus
|
|
297
|
+
*
|
|
298
|
+
* **Example Response**:
|
|
299
|
+
* ```json
|
|
300
|
+
* {
|
|
301
|
+
* "status": "success",
|
|
302
|
+
* "data": {
|
|
303
|
+
* "user": {
|
|
304
|
+
* "id": "user_12345",
|
|
305
|
+
* "email": "admin@example.com",
|
|
306
|
+
* "name": "John Admin",
|
|
307
|
+
* "avatar": "https://cdn.example.com/avatar.png",
|
|
308
|
+
* "role": "admin",
|
|
309
|
+
* "roles": ["admin", "instructor"],
|
|
310
|
+
* "permissions": ["manage_users", "manage_courses"]
|
|
311
|
+
* },
|
|
312
|
+
* "header_menu": [
|
|
313
|
+
* {
|
|
314
|
+
* "id": "dashboard",
|
|
315
|
+
* "label": "Dashboard",
|
|
316
|
+
* "href": "/dashboard",
|
|
317
|
+
* "icon": "LayoutDashboard"
|
|
318
|
+
* }
|
|
319
|
+
* ],
|
|
320
|
+
* "sidebar_menu": [
|
|
321
|
+
* {
|
|
322
|
+
* "section": "main",
|
|
323
|
+
* "label": "Main",
|
|
324
|
+
* "items": [
|
|
325
|
+
* {
|
|
326
|
+
* "id": "dashboard",
|
|
327
|
+
* "label": "Dashboard",
|
|
328
|
+
* "href": "/dashboard",
|
|
329
|
+
* "icon": "LayoutDashboard",
|
|
330
|
+
* "badge": null
|
|
331
|
+
* },
|
|
332
|
+
* {
|
|
333
|
+
* "id": "courses",
|
|
334
|
+
* "label": "Courses",
|
|
335
|
+
* "href": "/courses",
|
|
336
|
+
* "icon": "BookOpen",
|
|
337
|
+
* "badge": {"text": "5", "variant": "info"}
|
|
338
|
+
* }
|
|
339
|
+
* ]
|
|
340
|
+
* }
|
|
341
|
+
* ],
|
|
342
|
+
* "user_menu": [
|
|
343
|
+
* {
|
|
344
|
+
* "id": "profile",
|
|
345
|
+
* "label": "Profile",
|
|
346
|
+
* "href": "/profile",
|
|
347
|
+
* "icon": "User"
|
|
348
|
+
* },
|
|
349
|
+
* {
|
|
350
|
+
* "id": "settings",
|
|
351
|
+
* "label": "Settings",
|
|
352
|
+
* "href": "/settings",
|
|
353
|
+
* "icon": "Settings"
|
|
354
|
+
* },
|
|
355
|
+
* {
|
|
356
|
+
* "id": "logout",
|
|
357
|
+
* "label": "Logout",
|
|
358
|
+
* "href": "/logout",
|
|
359
|
+
* "icon": "LogOut",
|
|
360
|
+
* "is_danger": true
|
|
361
|
+
* }
|
|
362
|
+
* ],
|
|
363
|
+
* "quick_actions": [
|
|
364
|
+
* {
|
|
365
|
+
* "id": "new_course",
|
|
366
|
+
* "label": "New Course",
|
|
367
|
+
* "href": "/courses/new",
|
|
368
|
+
* "icon": "Plus",
|
|
369
|
+
* "primary": true
|
|
370
|
+
* }
|
|
371
|
+
* ],
|
|
372
|
+
* "notifications": {
|
|
373
|
+
* "enabled": true,
|
|
374
|
+
* "unread_count": 7,
|
|
375
|
+
* "show_badge": true
|
|
376
|
+
* },
|
|
377
|
+
* "dashboard_widgets": [
|
|
378
|
+
* {
|
|
379
|
+
* "id": "recent_activity",
|
|
380
|
+
* "type": "activity_feed",
|
|
381
|
+
* "position": {"col": 1, "row": 1, "width": 2, "height": 1}
|
|
382
|
+
* }
|
|
383
|
+
* ],
|
|
384
|
+
* "metadata": {
|
|
385
|
+
* "cached_at": "2025-11-22T12:00:00Z",
|
|
386
|
+
* "cache_ttl": 300
|
|
387
|
+
* }
|
|
388
|
+
* }
|
|
389
|
+
* }
|
|
390
|
+
* ```
|
|
391
|
+
*
|
|
392
|
+
* **Rate Limit**: 60 requests per minute
|
|
393
|
+
* **Authentication**: Required (JWT token)
|
|
394
|
+
* **Headers**: Authorization: Bearer {token}
|
|
395
|
+
*
|
|
396
|
+
* **Response Codes**:
|
|
397
|
+
* - 200: Navigation returned successfully
|
|
398
|
+
* - 401: Unauthorized (missing or invalid JWT)
|
|
399
|
+
* - 403: Forbidden (insufficient permissions)
|
|
400
|
+
* - 500: Server error
|
|
401
|
+
*/
|
|
402
|
+
get: operations["getNavigation"];
|
|
403
|
+
put?: never;
|
|
404
|
+
post?: never;
|
|
405
|
+
delete?: never;
|
|
406
|
+
options?: never;
|
|
407
|
+
head?: never;
|
|
408
|
+
patch?: never;
|
|
409
|
+
trace?: never;
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
export type webhooks = Record<string, never>;
|
|
413
|
+
export interface components {
|
|
414
|
+
schemas: {
|
|
415
|
+
Extensions: {
|
|
416
|
+
/** @example GENERIC_ERROR */
|
|
417
|
+
message_code?: string;
|
|
418
|
+
/** @example [] */
|
|
419
|
+
invalid_params?: components["schemas"]["InvalidParam"][];
|
|
420
|
+
extra_data?: Record<string, never> | null;
|
|
421
|
+
/** @example Detailed debug information */
|
|
422
|
+
debug?: string | null;
|
|
423
|
+
};
|
|
424
|
+
/**
|
|
425
|
+
* CheckDomainAvailabilityRequest
|
|
426
|
+
* @description Request model for checking custom domain availability
|
|
427
|
+
*
|
|
428
|
+
* Example:
|
|
429
|
+
* {
|
|
430
|
+
* "custom_domain": "app.client1.com"
|
|
431
|
+
* }
|
|
432
|
+
* @example {
|
|
433
|
+
* "custom_domain": "app.client1.com"
|
|
434
|
+
* }
|
|
435
|
+
*/
|
|
436
|
+
CheckDomainAvailabilityRequest: {
|
|
437
|
+
/**
|
|
438
|
+
* Custom Domain
|
|
439
|
+
* @description Custom domain to check availability
|
|
440
|
+
* @example app.client1.com
|
|
441
|
+
*/
|
|
442
|
+
custom_domain: string;
|
|
443
|
+
};
|
|
444
|
+
InvalidParam: {
|
|
445
|
+
/** @example items[0].quantity */
|
|
446
|
+
field?: string;
|
|
447
|
+
/** @example Input should be greater than or equal to 1 */
|
|
448
|
+
error?: string;
|
|
449
|
+
};
|
|
450
|
+
/**
|
|
451
|
+
* @example {
|
|
452
|
+
* "status": "success",
|
|
453
|
+
* "message": "Operation successful",
|
|
454
|
+
* "message_code": "api_suc_20001",
|
|
455
|
+
* "data": {},
|
|
456
|
+
* "metadata": {
|
|
457
|
+
* "timestamp": "2026-03-26T10:00:00.000Z",
|
|
458
|
+
* "requestId": "07e22004-cb60-4dfc-bc9c-b6f99664dca1",
|
|
459
|
+
* "traceId": "a9f1204c-bb82-41de-b234-7c3a9e120000",
|
|
460
|
+
* "version": "v1",
|
|
461
|
+
* "executionTime": 42,
|
|
462
|
+
* "language": "en-US"
|
|
463
|
+
* }
|
|
464
|
+
* }
|
|
465
|
+
*/
|
|
466
|
+
StandardResponse: {
|
|
467
|
+
/** @example success */
|
|
468
|
+
status?: string;
|
|
469
|
+
data?: Record<string, never> | null;
|
|
470
|
+
/** @example Operation successful */
|
|
471
|
+
message?: string | null;
|
|
472
|
+
/** @example api_suc_20001 */
|
|
473
|
+
message_code?: string | null;
|
|
474
|
+
metadata?: Record<string, never> | null;
|
|
475
|
+
error?: components["schemas"]["ErrorResponse"];
|
|
476
|
+
};
|
|
477
|
+
/**
|
|
478
|
+
* ValidateDomainRequest
|
|
479
|
+
* @description Request model for POST /v1/config/validate-domain
|
|
480
|
+
*
|
|
481
|
+
* ACCEPTS ANY FORMAT - Very Forgiving Input Parsing (Industry Standard):
|
|
482
|
+
* - Full URLs: https://client1.yourdomain.com/path?query=1
|
|
483
|
+
* - Partial URLs: client1.yourdomain.com/path
|
|
484
|
+
* - With/without protocol: http://client1.yourdomain.com or client1.yourdomain.com
|
|
485
|
+
* - With ports: client1.yourdomain.com:8080
|
|
486
|
+
* - With trailing slashes: client1.yourdomain.com/
|
|
487
|
+
* - Mixed case: Client1.Yourdomain.COM
|
|
488
|
+
* - With www: www.yourdomain.com (www PRESERVED, not removed!)
|
|
489
|
+
*
|
|
490
|
+
* The service automatically extracts and normalizes the domain.
|
|
491
|
+
*
|
|
492
|
+
* NOTE: client_ip and user_agent are automatically extracted from request headers
|
|
493
|
+
* by TrackingContextMiddleware - no need to include in request body.
|
|
494
|
+
*
|
|
495
|
+
* Example:
|
|
496
|
+
* {
|
|
497
|
+
* "domain": "https://www.yourdomain.com/path"
|
|
498
|
+
* }
|
|
499
|
+
* @example {
|
|
500
|
+
* "domain": "client1.yourdomain.com"
|
|
501
|
+
* }
|
|
502
|
+
* @example {
|
|
503
|
+
* "domain": "https://client1.yourdomain.com/dashboard"
|
|
504
|
+
* }
|
|
505
|
+
* @example {
|
|
506
|
+
* "domain": "app.client1.com:8080"
|
|
507
|
+
* }
|
|
508
|
+
* @example {
|
|
509
|
+
* "domain": "https://www.yourdomain.com/"
|
|
510
|
+
* }
|
|
511
|
+
*/
|
|
512
|
+
ValidateDomainRequest: {
|
|
513
|
+
/**
|
|
514
|
+
* Domain
|
|
515
|
+
* @description Domain to validate in ANY format. Accepts: full URLs, subdomains, custom domains, with/without protocol, with ports, trailing slashes, mixed case. Examples: 'client1.yourdomain.com', 'https://app.client1.com/path', 'www.yourdomain.com'
|
|
516
|
+
* @example client1.yourdomain.com
|
|
517
|
+
* @example https://client1.yourdomain.com/dashboard
|
|
518
|
+
* @example app.client1.com:8080
|
|
519
|
+
* @example https://www.yourdomain.com/
|
|
520
|
+
* @example Client1.Yourdomain.COM
|
|
521
|
+
*/
|
|
522
|
+
domain: string;
|
|
523
|
+
};
|
|
524
|
+
ErrorResponse: {
|
|
525
|
+
/** @example about:blank */
|
|
526
|
+
type?: string;
|
|
527
|
+
/** @example GENERIC_ERROR */
|
|
528
|
+
code?: string;
|
|
529
|
+
/** @example Client Error */
|
|
530
|
+
title?: string;
|
|
531
|
+
/** @example 400 */
|
|
532
|
+
status?: number;
|
|
533
|
+
/** @example An error occurred */
|
|
534
|
+
detail?: string;
|
|
535
|
+
/** @example /v1/cart/items */
|
|
536
|
+
instance?: string;
|
|
537
|
+
extensions?: components["schemas"]["Extensions"];
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
responses: never;
|
|
541
|
+
parameters: never;
|
|
542
|
+
requestBodies: never;
|
|
543
|
+
headers: never;
|
|
544
|
+
pathItems: never;
|
|
545
|
+
}
|
|
546
|
+
export type $defs = Record<string, never>;
|
|
547
|
+
export interface operations {
|
|
548
|
+
validateDomain: {
|
|
549
|
+
parameters: {
|
|
550
|
+
query?: never;
|
|
551
|
+
header?: never;
|
|
552
|
+
path?: never;
|
|
553
|
+
cookie?: never;
|
|
554
|
+
};
|
|
555
|
+
requestBody: {
|
|
556
|
+
content: {
|
|
557
|
+
"application/json": components["schemas"]["ValidateDomainRequest"];
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
responses: {
|
|
561
|
+
/** @description Successful Response */
|
|
562
|
+
200: {
|
|
563
|
+
headers: {
|
|
564
|
+
[name: string]: unknown;
|
|
565
|
+
};
|
|
566
|
+
content: {
|
|
567
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
/** @description Bad Request */
|
|
571
|
+
400: {
|
|
572
|
+
headers: {
|
|
573
|
+
[name: string]: unknown;
|
|
574
|
+
};
|
|
575
|
+
content: {
|
|
576
|
+
/**
|
|
577
|
+
* @example {
|
|
578
|
+
* "status": "error",
|
|
579
|
+
* "message": "An error occurred",
|
|
580
|
+
* "message_code": "GENERIC_ERROR",
|
|
581
|
+
* "metadata": {
|
|
582
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
583
|
+
* "requestId": "uuid",
|
|
584
|
+
* "traceId": "uuid",
|
|
585
|
+
* "version": "v1",
|
|
586
|
+
* "executionTime": 0,
|
|
587
|
+
* "language": "en-US",
|
|
588
|
+
* "links": [
|
|
589
|
+
* {
|
|
590
|
+
* "rel": "self",
|
|
591
|
+
* "href": "/v1/cart/items",
|
|
592
|
+
* "method": "POST"
|
|
593
|
+
* }
|
|
594
|
+
* ]
|
|
595
|
+
* },
|
|
596
|
+
* "error": {
|
|
597
|
+
* "type": "https://{your-domain}/errors/client-error",
|
|
598
|
+
* "code": "GENERIC_ERROR",
|
|
599
|
+
* "title": "Client Error",
|
|
600
|
+
* "status": 400,
|
|
601
|
+
* "detail": "An error occurred",
|
|
602
|
+
* "instance": "/v1/cart/items",
|
|
603
|
+
* "extensions": {
|
|
604
|
+
* "message_code": "GENERIC_ERROR",
|
|
605
|
+
* "invalid_params": []
|
|
606
|
+
* }
|
|
607
|
+
* }
|
|
608
|
+
* }
|
|
609
|
+
*/
|
|
610
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
611
|
+
};
|
|
612
|
+
};
|
|
613
|
+
/** @description Unprocessable Entity */
|
|
614
|
+
422: {
|
|
615
|
+
headers: {
|
|
616
|
+
[name: string]: unknown;
|
|
617
|
+
};
|
|
618
|
+
content: {
|
|
619
|
+
/**
|
|
620
|
+
* @example {
|
|
621
|
+
* "status": "error",
|
|
622
|
+
* "message": "One or more input fields are invalid",
|
|
623
|
+
* "message_code": "INVALID_INPUT",
|
|
624
|
+
* "metadata": {
|
|
625
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
626
|
+
* "requestId": "uuid",
|
|
627
|
+
* "traceId": "uuid",
|
|
628
|
+
* "version": "v1",
|
|
629
|
+
* "executionTime": 0,
|
|
630
|
+
* "language": "en-US",
|
|
631
|
+
* "links": [
|
|
632
|
+
* {
|
|
633
|
+
* "rel": "self",
|
|
634
|
+
* "href": "/v1/cart/items",
|
|
635
|
+
* "method": "POST"
|
|
636
|
+
* }
|
|
637
|
+
* ]
|
|
638
|
+
* },
|
|
639
|
+
* "error": {
|
|
640
|
+
* "type": "https://{your-domain}/errors/invalid-input",
|
|
641
|
+
* "code": "INVALID_INPUT",
|
|
642
|
+
* "title": "Invalid Input",
|
|
643
|
+
* "status": 422,
|
|
644
|
+
* "detail": "One or more input fields are invalid",
|
|
645
|
+
* "instance": "/v1/cart/items",
|
|
646
|
+
* "extensions": {
|
|
647
|
+
* "message_code": "INVALID_INPUT",
|
|
648
|
+
* "invalid_params": [
|
|
649
|
+
* {
|
|
650
|
+
* "field": "items[0].quantity",
|
|
651
|
+
* "error": "Input should be greater than or equal to 1"
|
|
652
|
+
* }
|
|
653
|
+
* ]
|
|
654
|
+
* }
|
|
655
|
+
* }
|
|
656
|
+
* }
|
|
657
|
+
*/
|
|
658
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
659
|
+
};
|
|
660
|
+
};
|
|
661
|
+
/** @description Too Many Requests */
|
|
662
|
+
429: {
|
|
663
|
+
headers: {
|
|
664
|
+
[name: string]: unknown;
|
|
665
|
+
};
|
|
666
|
+
content: {
|
|
667
|
+
/**
|
|
668
|
+
* @example {
|
|
669
|
+
* "status": "error",
|
|
670
|
+
* "message": "Too many requests",
|
|
671
|
+
* "message_code": "RATE_LIMIT_EXCEEDED",
|
|
672
|
+
* "metadata": {
|
|
673
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
674
|
+
* "requestId": "uuid",
|
|
675
|
+
* "traceId": "uuid",
|
|
676
|
+
* "version": "v1",
|
|
677
|
+
* "executionTime": 0,
|
|
678
|
+
* "language": "en-US",
|
|
679
|
+
* "links": [
|
|
680
|
+
* {
|
|
681
|
+
* "rel": "self",
|
|
682
|
+
* "href": "/v1/cart/items",
|
|
683
|
+
* "method": "POST"
|
|
684
|
+
* }
|
|
685
|
+
* ]
|
|
686
|
+
* },
|
|
687
|
+
* "error": {
|
|
688
|
+
* "type": "https://{your-domain}/errors/rate-limit-exceeded",
|
|
689
|
+
* "code": "RATE_LIMIT_EXCEEDED",
|
|
690
|
+
* "title": "Rate Limit Exceeded",
|
|
691
|
+
* "status": 429,
|
|
692
|
+
* "detail": "Too many requests",
|
|
693
|
+
* "instance": "/v1/cart/items",
|
|
694
|
+
* "extensions": {
|
|
695
|
+
* "message_code": "RATE_LIMIT_EXCEEDED",
|
|
696
|
+
* "invalid_params": []
|
|
697
|
+
* }
|
|
698
|
+
* }
|
|
699
|
+
* }
|
|
700
|
+
*/
|
|
701
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
/** @description Internal Server Error */
|
|
705
|
+
500: {
|
|
706
|
+
headers: {
|
|
707
|
+
[name: string]: unknown;
|
|
708
|
+
};
|
|
709
|
+
content: {
|
|
710
|
+
/**
|
|
711
|
+
* @example {
|
|
712
|
+
* "status": "error",
|
|
713
|
+
* "message": "An unexpected error occurred",
|
|
714
|
+
* "message_code": "SERVER_ERROR",
|
|
715
|
+
* "metadata": {
|
|
716
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
717
|
+
* "requestId": "uuid",
|
|
718
|
+
* "traceId": "uuid",
|
|
719
|
+
* "version": "v1",
|
|
720
|
+
* "executionTime": 0,
|
|
721
|
+
* "language": "en-US",
|
|
722
|
+
* "links": [
|
|
723
|
+
* {
|
|
724
|
+
* "rel": "self",
|
|
725
|
+
* "href": "/v1/cart/items",
|
|
726
|
+
* "method": "POST"
|
|
727
|
+
* }
|
|
728
|
+
* ]
|
|
729
|
+
* },
|
|
730
|
+
* "error": {
|
|
731
|
+
* "type": "https://{your-domain}/errors/server-error",
|
|
732
|
+
* "code": "SERVER_ERROR",
|
|
733
|
+
* "title": "Server Error",
|
|
734
|
+
* "status": 500,
|
|
735
|
+
* "detail": "An unexpected error occurred",
|
|
736
|
+
* "instance": "/v1/cart/items",
|
|
737
|
+
* "extensions": {
|
|
738
|
+
* "message_code": "SERVER_ERROR",
|
|
739
|
+
* "invalid_params": []
|
|
740
|
+
* }
|
|
741
|
+
* }
|
|
742
|
+
* }
|
|
743
|
+
*/
|
|
744
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
745
|
+
};
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
};
|
|
749
|
+
checkDomainAvailability: {
|
|
750
|
+
parameters: {
|
|
751
|
+
query?: never;
|
|
752
|
+
header?: never;
|
|
753
|
+
path?: never;
|
|
754
|
+
cookie?: never;
|
|
755
|
+
};
|
|
756
|
+
requestBody: {
|
|
757
|
+
content: {
|
|
758
|
+
"application/json": components["schemas"]["CheckDomainAvailabilityRequest"];
|
|
759
|
+
};
|
|
760
|
+
};
|
|
761
|
+
responses: {
|
|
762
|
+
/** @description Successful Response */
|
|
763
|
+
200: {
|
|
764
|
+
headers: {
|
|
765
|
+
[name: string]: unknown;
|
|
766
|
+
};
|
|
767
|
+
content: {
|
|
768
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
/** @description Bad Request */
|
|
772
|
+
400: {
|
|
773
|
+
headers: {
|
|
774
|
+
[name: string]: unknown;
|
|
775
|
+
};
|
|
776
|
+
content: {
|
|
777
|
+
/**
|
|
778
|
+
* @example {
|
|
779
|
+
* "status": "error",
|
|
780
|
+
* "message": "An error occurred",
|
|
781
|
+
* "message_code": "GENERIC_ERROR",
|
|
782
|
+
* "metadata": {
|
|
783
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
784
|
+
* "requestId": "uuid",
|
|
785
|
+
* "traceId": "uuid",
|
|
786
|
+
* "version": "v1",
|
|
787
|
+
* "executionTime": 0,
|
|
788
|
+
* "language": "en-US",
|
|
789
|
+
* "links": [
|
|
790
|
+
* {
|
|
791
|
+
* "rel": "self",
|
|
792
|
+
* "href": "/v1/cart/items",
|
|
793
|
+
* "method": "POST"
|
|
794
|
+
* }
|
|
795
|
+
* ]
|
|
796
|
+
* },
|
|
797
|
+
* "error": {
|
|
798
|
+
* "type": "https://{your-domain}/errors/client-error",
|
|
799
|
+
* "code": "GENERIC_ERROR",
|
|
800
|
+
* "title": "Client Error",
|
|
801
|
+
* "status": 400,
|
|
802
|
+
* "detail": "An error occurred",
|
|
803
|
+
* "instance": "/v1/cart/items",
|
|
804
|
+
* "extensions": {
|
|
805
|
+
* "message_code": "GENERIC_ERROR",
|
|
806
|
+
* "invalid_params": []
|
|
807
|
+
* }
|
|
808
|
+
* }
|
|
809
|
+
* }
|
|
810
|
+
*/
|
|
811
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
812
|
+
};
|
|
813
|
+
};
|
|
814
|
+
/** @description Unprocessable Entity */
|
|
815
|
+
422: {
|
|
816
|
+
headers: {
|
|
817
|
+
[name: string]: unknown;
|
|
818
|
+
};
|
|
819
|
+
content: {
|
|
820
|
+
/**
|
|
821
|
+
* @example {
|
|
822
|
+
* "status": "error",
|
|
823
|
+
* "message": "One or more input fields are invalid",
|
|
824
|
+
* "message_code": "INVALID_INPUT",
|
|
825
|
+
* "metadata": {
|
|
826
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
827
|
+
* "requestId": "uuid",
|
|
828
|
+
* "traceId": "uuid",
|
|
829
|
+
* "version": "v1",
|
|
830
|
+
* "executionTime": 0,
|
|
831
|
+
* "language": "en-US",
|
|
832
|
+
* "links": [
|
|
833
|
+
* {
|
|
834
|
+
* "rel": "self",
|
|
835
|
+
* "href": "/v1/cart/items",
|
|
836
|
+
* "method": "POST"
|
|
837
|
+
* }
|
|
838
|
+
* ]
|
|
839
|
+
* },
|
|
840
|
+
* "error": {
|
|
841
|
+
* "type": "https://{your-domain}/errors/invalid-input",
|
|
842
|
+
* "code": "INVALID_INPUT",
|
|
843
|
+
* "title": "Invalid Input",
|
|
844
|
+
* "status": 422,
|
|
845
|
+
* "detail": "One or more input fields are invalid",
|
|
846
|
+
* "instance": "/v1/cart/items",
|
|
847
|
+
* "extensions": {
|
|
848
|
+
* "message_code": "INVALID_INPUT",
|
|
849
|
+
* "invalid_params": [
|
|
850
|
+
* {
|
|
851
|
+
* "field": "items[0].quantity",
|
|
852
|
+
* "error": "Input should be greater than or equal to 1"
|
|
853
|
+
* }
|
|
854
|
+
* ]
|
|
855
|
+
* }
|
|
856
|
+
* }
|
|
857
|
+
* }
|
|
858
|
+
*/
|
|
859
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
/** @description Too Many Requests */
|
|
863
|
+
429: {
|
|
864
|
+
headers: {
|
|
865
|
+
[name: string]: unknown;
|
|
866
|
+
};
|
|
867
|
+
content: {
|
|
868
|
+
/**
|
|
869
|
+
* @example {
|
|
870
|
+
* "status": "error",
|
|
871
|
+
* "message": "Too many requests",
|
|
872
|
+
* "message_code": "RATE_LIMIT_EXCEEDED",
|
|
873
|
+
* "metadata": {
|
|
874
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
875
|
+
* "requestId": "uuid",
|
|
876
|
+
* "traceId": "uuid",
|
|
877
|
+
* "version": "v1",
|
|
878
|
+
* "executionTime": 0,
|
|
879
|
+
* "language": "en-US",
|
|
880
|
+
* "links": [
|
|
881
|
+
* {
|
|
882
|
+
* "rel": "self",
|
|
883
|
+
* "href": "/v1/cart/items",
|
|
884
|
+
* "method": "POST"
|
|
885
|
+
* }
|
|
886
|
+
* ]
|
|
887
|
+
* },
|
|
888
|
+
* "error": {
|
|
889
|
+
* "type": "https://{your-domain}/errors/rate-limit-exceeded",
|
|
890
|
+
* "code": "RATE_LIMIT_EXCEEDED",
|
|
891
|
+
* "title": "Rate Limit Exceeded",
|
|
892
|
+
* "status": 429,
|
|
893
|
+
* "detail": "Too many requests",
|
|
894
|
+
* "instance": "/v1/cart/items",
|
|
895
|
+
* "extensions": {
|
|
896
|
+
* "message_code": "RATE_LIMIT_EXCEEDED",
|
|
897
|
+
* "invalid_params": []
|
|
898
|
+
* }
|
|
899
|
+
* }
|
|
900
|
+
* }
|
|
901
|
+
*/
|
|
902
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
903
|
+
};
|
|
904
|
+
};
|
|
905
|
+
/** @description Internal Server Error */
|
|
906
|
+
500: {
|
|
907
|
+
headers: {
|
|
908
|
+
[name: string]: unknown;
|
|
909
|
+
};
|
|
910
|
+
content: {
|
|
911
|
+
/**
|
|
912
|
+
* @example {
|
|
913
|
+
* "status": "error",
|
|
914
|
+
* "message": "An unexpected error occurred",
|
|
915
|
+
* "message_code": "SERVER_ERROR",
|
|
916
|
+
* "metadata": {
|
|
917
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
918
|
+
* "requestId": "uuid",
|
|
919
|
+
* "traceId": "uuid",
|
|
920
|
+
* "version": "v1",
|
|
921
|
+
* "executionTime": 0,
|
|
922
|
+
* "language": "en-US",
|
|
923
|
+
* "links": [
|
|
924
|
+
* {
|
|
925
|
+
* "rel": "self",
|
|
926
|
+
* "href": "/v1/cart/items",
|
|
927
|
+
* "method": "POST"
|
|
928
|
+
* }
|
|
929
|
+
* ]
|
|
930
|
+
* },
|
|
931
|
+
* "error": {
|
|
932
|
+
* "type": "https://{your-domain}/errors/server-error",
|
|
933
|
+
* "code": "SERVER_ERROR",
|
|
934
|
+
* "title": "Server Error",
|
|
935
|
+
* "status": 500,
|
|
936
|
+
* "detail": "An unexpected error occurred",
|
|
937
|
+
* "instance": "/v1/cart/items",
|
|
938
|
+
* "extensions": {
|
|
939
|
+
* "message_code": "SERVER_ERROR",
|
|
940
|
+
* "invalid_params": []
|
|
941
|
+
* }
|
|
942
|
+
* }
|
|
943
|
+
* }
|
|
944
|
+
*/
|
|
945
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
};
|
|
949
|
+
};
|
|
950
|
+
getNavigation: {
|
|
951
|
+
parameters: {
|
|
952
|
+
query?: never;
|
|
953
|
+
header?: {
|
|
954
|
+
authorization?: string | null;
|
|
955
|
+
};
|
|
956
|
+
path?: never;
|
|
957
|
+
cookie?: never;
|
|
958
|
+
};
|
|
959
|
+
requestBody?: never;
|
|
960
|
+
responses: {
|
|
961
|
+
/** @description Successful Response */
|
|
962
|
+
200: {
|
|
963
|
+
headers: {
|
|
964
|
+
[name: string]: unknown;
|
|
965
|
+
};
|
|
966
|
+
content: {
|
|
967
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
/** @description Bad Request */
|
|
971
|
+
400: {
|
|
972
|
+
headers: {
|
|
973
|
+
[name: string]: unknown;
|
|
974
|
+
};
|
|
975
|
+
content: {
|
|
976
|
+
/**
|
|
977
|
+
* @example {
|
|
978
|
+
* "status": "error",
|
|
979
|
+
* "message": "An error occurred",
|
|
980
|
+
* "message_code": "GENERIC_ERROR",
|
|
981
|
+
* "metadata": {
|
|
982
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
983
|
+
* "requestId": "uuid",
|
|
984
|
+
* "traceId": "uuid",
|
|
985
|
+
* "version": "v1",
|
|
986
|
+
* "executionTime": 0,
|
|
987
|
+
* "language": "en-US",
|
|
988
|
+
* "links": [
|
|
989
|
+
* {
|
|
990
|
+
* "rel": "self",
|
|
991
|
+
* "href": "/v1/cart/items",
|
|
992
|
+
* "method": "POST"
|
|
993
|
+
* }
|
|
994
|
+
* ]
|
|
995
|
+
* },
|
|
996
|
+
* "error": {
|
|
997
|
+
* "type": "https://{your-domain}/errors/client-error",
|
|
998
|
+
* "code": "GENERIC_ERROR",
|
|
999
|
+
* "title": "Client Error",
|
|
1000
|
+
* "status": 400,
|
|
1001
|
+
* "detail": "An error occurred",
|
|
1002
|
+
* "instance": "/v1/cart/items",
|
|
1003
|
+
* "extensions": {
|
|
1004
|
+
* "message_code": "GENERIC_ERROR",
|
|
1005
|
+
* "invalid_params": []
|
|
1006
|
+
* }
|
|
1007
|
+
* }
|
|
1008
|
+
* }
|
|
1009
|
+
*/
|
|
1010
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
1011
|
+
};
|
|
1012
|
+
};
|
|
1013
|
+
/** @description Unprocessable Entity */
|
|
1014
|
+
422: {
|
|
1015
|
+
headers: {
|
|
1016
|
+
[name: string]: unknown;
|
|
1017
|
+
};
|
|
1018
|
+
content: {
|
|
1019
|
+
/**
|
|
1020
|
+
* @example {
|
|
1021
|
+
* "status": "error",
|
|
1022
|
+
* "message": "One or more input fields are invalid",
|
|
1023
|
+
* "message_code": "INVALID_INPUT",
|
|
1024
|
+
* "metadata": {
|
|
1025
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
1026
|
+
* "requestId": "uuid",
|
|
1027
|
+
* "traceId": "uuid",
|
|
1028
|
+
* "version": "v1",
|
|
1029
|
+
* "executionTime": 0,
|
|
1030
|
+
* "language": "en-US",
|
|
1031
|
+
* "links": [
|
|
1032
|
+
* {
|
|
1033
|
+
* "rel": "self",
|
|
1034
|
+
* "href": "/v1/cart/items",
|
|
1035
|
+
* "method": "POST"
|
|
1036
|
+
* }
|
|
1037
|
+
* ]
|
|
1038
|
+
* },
|
|
1039
|
+
* "error": {
|
|
1040
|
+
* "type": "https://{your-domain}/errors/invalid-input",
|
|
1041
|
+
* "code": "INVALID_INPUT",
|
|
1042
|
+
* "title": "Invalid Input",
|
|
1043
|
+
* "status": 422,
|
|
1044
|
+
* "detail": "One or more input fields are invalid",
|
|
1045
|
+
* "instance": "/v1/cart/items",
|
|
1046
|
+
* "extensions": {
|
|
1047
|
+
* "message_code": "INVALID_INPUT",
|
|
1048
|
+
* "invalid_params": [
|
|
1049
|
+
* {
|
|
1050
|
+
* "field": "items[0].quantity",
|
|
1051
|
+
* "error": "Input should be greater than or equal to 1"
|
|
1052
|
+
* }
|
|
1053
|
+
* ]
|
|
1054
|
+
* }
|
|
1055
|
+
* }
|
|
1056
|
+
* }
|
|
1057
|
+
*/
|
|
1058
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
1059
|
+
};
|
|
1060
|
+
};
|
|
1061
|
+
/** @description Too Many Requests */
|
|
1062
|
+
429: {
|
|
1063
|
+
headers: {
|
|
1064
|
+
[name: string]: unknown;
|
|
1065
|
+
};
|
|
1066
|
+
content: {
|
|
1067
|
+
/**
|
|
1068
|
+
* @example {
|
|
1069
|
+
* "status": "error",
|
|
1070
|
+
* "message": "Too many requests",
|
|
1071
|
+
* "message_code": "RATE_LIMIT_EXCEEDED",
|
|
1072
|
+
* "metadata": {
|
|
1073
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
1074
|
+
* "requestId": "uuid",
|
|
1075
|
+
* "traceId": "uuid",
|
|
1076
|
+
* "version": "v1",
|
|
1077
|
+
* "executionTime": 0,
|
|
1078
|
+
* "language": "en-US",
|
|
1079
|
+
* "links": [
|
|
1080
|
+
* {
|
|
1081
|
+
* "rel": "self",
|
|
1082
|
+
* "href": "/v1/cart/items",
|
|
1083
|
+
* "method": "POST"
|
|
1084
|
+
* }
|
|
1085
|
+
* ]
|
|
1086
|
+
* },
|
|
1087
|
+
* "error": {
|
|
1088
|
+
* "type": "https://{your-domain}/errors/rate-limit-exceeded",
|
|
1089
|
+
* "code": "RATE_LIMIT_EXCEEDED",
|
|
1090
|
+
* "title": "Rate Limit Exceeded",
|
|
1091
|
+
* "status": 429,
|
|
1092
|
+
* "detail": "Too many requests",
|
|
1093
|
+
* "instance": "/v1/cart/items",
|
|
1094
|
+
* "extensions": {
|
|
1095
|
+
* "message_code": "RATE_LIMIT_EXCEEDED",
|
|
1096
|
+
* "invalid_params": []
|
|
1097
|
+
* }
|
|
1098
|
+
* }
|
|
1099
|
+
* }
|
|
1100
|
+
*/
|
|
1101
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
/** @description Internal Server Error */
|
|
1105
|
+
500: {
|
|
1106
|
+
headers: {
|
|
1107
|
+
[name: string]: unknown;
|
|
1108
|
+
};
|
|
1109
|
+
content: {
|
|
1110
|
+
/**
|
|
1111
|
+
* @example {
|
|
1112
|
+
* "status": "error",
|
|
1113
|
+
* "message": "An unexpected error occurred",
|
|
1114
|
+
* "message_code": "SERVER_ERROR",
|
|
1115
|
+
* "metadata": {
|
|
1116
|
+
* "timestamp": "2025-08-05T18:38:57Z",
|
|
1117
|
+
* "requestId": "uuid",
|
|
1118
|
+
* "traceId": "uuid",
|
|
1119
|
+
* "version": "v1",
|
|
1120
|
+
* "executionTime": 0,
|
|
1121
|
+
* "language": "en-US",
|
|
1122
|
+
* "links": [
|
|
1123
|
+
* {
|
|
1124
|
+
* "rel": "self",
|
|
1125
|
+
* "href": "/v1/cart/items",
|
|
1126
|
+
* "method": "POST"
|
|
1127
|
+
* }
|
|
1128
|
+
* ]
|
|
1129
|
+
* },
|
|
1130
|
+
* "error": {
|
|
1131
|
+
* "type": "https://{your-domain}/errors/server-error",
|
|
1132
|
+
* "code": "SERVER_ERROR",
|
|
1133
|
+
* "title": "Server Error",
|
|
1134
|
+
* "status": 500,
|
|
1135
|
+
* "detail": "An unexpected error occurred",
|
|
1136
|
+
* "instance": "/v1/cart/items",
|
|
1137
|
+
* "extensions": {
|
|
1138
|
+
* "message_code": "SERVER_ERROR",
|
|
1139
|
+
* "invalid_params": []
|
|
1140
|
+
* }
|
|
1141
|
+
* }
|
|
1142
|
+
* }
|
|
1143
|
+
*/
|
|
1144
|
+
"application/json": components["schemas"]["StandardResponse"];
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
};
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
//# sourceMappingURL=generated.d.ts.map
|