@superblocksteam/vite-plugin-file-sync 2.0.22-next.2 → 2.0.22-next.21
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/dist/ai-service/context/app-context.d.ts.map +1 -1
- package/dist/ai-service/context/app-context.js +4 -4
- package/dist/ai-service/context/app-context.js.map +1 -1
- package/dist/ai-service/evals/fixtures/open-api-example-schemas.d.ts +1591 -0
- package/dist/ai-service/evals/fixtures/open-api-example-schemas.d.ts.map +1 -0
- package/dist/ai-service/evals/fixtures/open-api-example-schemas.js +1766 -0
- package/dist/ai-service/evals/fixtures/open-api-example-schemas.js.map +1 -0
- package/dist/ai-service/evals/helpers/critical-scorers.d.ts.map +1 -1
- package/dist/ai-service/evals/helpers/critical-scorers.js +36 -60
- package/dist/ai-service/evals/helpers/critical-scorers.js.map +1 -1
- package/dist/ai-service/evals/helpers/eval-scoring.d.ts +9 -3
- package/dist/ai-service/evals/helpers/eval-scoring.d.ts.map +1 -1
- package/dist/ai-service/evals/helpers/eval-scoring.js +25 -14
- package/dist/ai-service/evals/helpers/eval-scoring.js.map +1 -1
- package/dist/ai-service/evals/helpers/index.d.ts.map +1 -1
- package/dist/ai-service/evals/helpers/index.js +11 -3
- package/dist/ai-service/evals/helpers/index.js.map +1 -1
- package/dist/ai-service/prompt-builder-service/builders/{openai-intent.d.ts → openapi-intent.d.ts} +1 -1
- package/dist/ai-service/prompt-builder-service/builders/openapi-intent.d.ts.map +1 -0
- package/dist/ai-service/prompt-builder-service/builders/{openai-intent.js → openapi-intent.js} +1 -1
- package/dist/ai-service/prompt-builder-service/builders/openapi-intent.js.map +1 -0
- package/dist/ai-service/prompt-builder-service/index.d.ts +1 -1
- package/dist/ai-service/prompt-builder-service/index.d.ts.map +1 -1
- package/dist/ai-service/prompt-builder-service/index.js +1 -1
- package/dist/ai-service/prompt-builder-service/index.js.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ButtonPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/CheckboxPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ColumnPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ContainerPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DatePickerPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DropdownPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/IconPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ImagePropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/InputPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ModalPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/PagePropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SectionPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SlideoutPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SwitchPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TablePropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TextPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/Annotations.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/Dim.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/EventFlow.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/TextStyleWithVariant.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/full-examples.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.d.ts +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.d.ts.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.js +2 -2
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.js.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-components-rules.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-custom-components.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-data-filtering.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-event-flow.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-forms.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-layouts.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-page.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-rbac.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-routes.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-state.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-theming.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.d.ts +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.d.ts.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.js +2 -2
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.js.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-incremental.d.ts +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-incremental.d.ts.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-incremental.js +2 -2
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-incremental.js.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.d.ts +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.d.ts.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.js +2 -2
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.js.map +1 -1
- package/dist/ai-service/template-renderer.d.ts +1 -0
- package/dist/ai-service/template-renderer.d.ts.map +1 -1
- package/dist/ai-service/template-renderer.js +3 -0
- package/dist/ai-service/template-renderer.js.map +1 -1
- package/dist/ai-service/transform/api-builder/to-sdk-transformer.js +2 -2
- package/dist/ai-service/transform/api-builder/to-sdk-transformer.js.map +1 -1
- package/dist/file-sync-vite-plugin.d.ts.map +1 -1
- package/dist/file-sync-vite-plugin.js +1 -1
- package/dist/file-sync-vite-plugin.js.map +1 -1
- package/dist/injected-index.d.ts +1 -1
- package/dist/injected-index.d.ts.map +1 -1
- package/dist/injected-index.js +1 -28
- package/dist/injected-index.js.map +1 -1
- package/dist/parsing/events/to-code-events.d.ts.map +1 -1
- package/dist/parsing/events/to-code-events.js +9 -1
- package/dist/parsing/events/to-code-events.js.map +1 -1
- package/dist/parsing/events/to-value-events.d.ts.map +1 -1
- package/dist/parsing/events/to-value-events.js +22 -0
- package/dist/parsing/events/to-value-events.js.map +1 -1
- package/dist/plugin-options.d.ts +0 -1
- package/dist/plugin-options.d.ts.map +1 -1
- package/dist/plugin-options.js.map +1 -1
- package/package.json +6 -6
- package/dist/ai-service/prompt-builder-service/builders/openai-intent.d.ts.map +0 -1
- package/dist/ai-service/prompt-builder-service/builders/openai-intent.js.map +0 -1
|
@@ -0,0 +1,1766 @@
|
|
|
1
|
+
export const mockECommerce = {
|
|
2
|
+
openapi: "3.0.3",
|
|
3
|
+
info: {
|
|
4
|
+
title: "Ecommerce API",
|
|
5
|
+
description: "A comprehensive ecommerce API for managing users, products, orders, carts, and wishlists",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
contact: {
|
|
8
|
+
name: "API Support",
|
|
9
|
+
email: "support@ecommerce.com",
|
|
10
|
+
},
|
|
11
|
+
license: {
|
|
12
|
+
name: "MIT",
|
|
13
|
+
url: "https://opensource.org/licenses/MIT",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
servers: [
|
|
17
|
+
{
|
|
18
|
+
url: "https://api.ecommerce.com/v1",
|
|
19
|
+
description: "Production server",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
url: "https://staging-api.ecommerce.com/v1",
|
|
23
|
+
description: "Staging server",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
security: [
|
|
27
|
+
{
|
|
28
|
+
bearerAuth: [],
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
paths: {
|
|
32
|
+
"/users": {
|
|
33
|
+
get: {
|
|
34
|
+
summary: "Get all users",
|
|
35
|
+
tags: ["Users"],
|
|
36
|
+
security: [
|
|
37
|
+
{
|
|
38
|
+
bearerAuth: [],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
parameters: [
|
|
42
|
+
{
|
|
43
|
+
name: "page",
|
|
44
|
+
in: "query",
|
|
45
|
+
description: "Page number",
|
|
46
|
+
schema: {
|
|
47
|
+
type: "integer",
|
|
48
|
+
minimum: 1,
|
|
49
|
+
default: 1,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "limit",
|
|
54
|
+
in: "query",
|
|
55
|
+
description: "Items per page",
|
|
56
|
+
schema: {
|
|
57
|
+
type: "integer",
|
|
58
|
+
minimum: 1,
|
|
59
|
+
maximum: 100,
|
|
60
|
+
default: 20,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
responses: {
|
|
65
|
+
"200": {
|
|
66
|
+
description: "List of users",
|
|
67
|
+
content: {
|
|
68
|
+
"application/json": {
|
|
69
|
+
schema: {
|
|
70
|
+
type: "object",
|
|
71
|
+
properties: {
|
|
72
|
+
users: {
|
|
73
|
+
type: "array",
|
|
74
|
+
items: {
|
|
75
|
+
$ref: "#/components/schemas/User",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
pagination: {
|
|
79
|
+
$ref: "#/components/schemas/Pagination",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
post: {
|
|
89
|
+
summary: "Create a new user",
|
|
90
|
+
tags: ["Users"],
|
|
91
|
+
security: [],
|
|
92
|
+
requestBody: {
|
|
93
|
+
required: true,
|
|
94
|
+
content: {
|
|
95
|
+
"application/json": {
|
|
96
|
+
schema: {
|
|
97
|
+
$ref: "#/components/schemas/CreateUserRequest",
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
responses: {
|
|
103
|
+
"201": {
|
|
104
|
+
description: "User created successfully",
|
|
105
|
+
content: {
|
|
106
|
+
"application/json": {
|
|
107
|
+
schema: {
|
|
108
|
+
$ref: "#/components/schemas/User",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
"400": {
|
|
114
|
+
$ref: "#/components/responses/BadRequest",
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
"/users/{userId}": {
|
|
120
|
+
get: {
|
|
121
|
+
summary: "Get user by ID",
|
|
122
|
+
tags: ["Users"],
|
|
123
|
+
parameters: [
|
|
124
|
+
{
|
|
125
|
+
name: "userId",
|
|
126
|
+
in: "path",
|
|
127
|
+
required: true,
|
|
128
|
+
schema: {
|
|
129
|
+
type: "string",
|
|
130
|
+
format: "uuid",
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
responses: {
|
|
135
|
+
"200": {
|
|
136
|
+
description: "User details",
|
|
137
|
+
content: {
|
|
138
|
+
"application/json": {
|
|
139
|
+
schema: {
|
|
140
|
+
$ref: "#/components/schemas/User",
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
"404": {
|
|
146
|
+
$ref: "#/components/responses/NotFound",
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
put: {
|
|
151
|
+
summary: "Update user",
|
|
152
|
+
tags: ["Users"],
|
|
153
|
+
parameters: [
|
|
154
|
+
{
|
|
155
|
+
name: "userId",
|
|
156
|
+
in: "path",
|
|
157
|
+
required: true,
|
|
158
|
+
schema: {
|
|
159
|
+
type: "string",
|
|
160
|
+
format: "uuid",
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
requestBody: {
|
|
165
|
+
required: true,
|
|
166
|
+
content: {
|
|
167
|
+
"application/json": {
|
|
168
|
+
schema: {
|
|
169
|
+
$ref: "#/components/schemas/UpdateUserRequest",
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
responses: {
|
|
175
|
+
"200": {
|
|
176
|
+
description: "User updated successfully",
|
|
177
|
+
content: {
|
|
178
|
+
"application/json": {
|
|
179
|
+
schema: {
|
|
180
|
+
$ref: "#/components/schemas/User",
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
"404": {
|
|
186
|
+
$ref: "#/components/responses/NotFound",
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
delete: {
|
|
191
|
+
summary: "Delete user",
|
|
192
|
+
tags: ["Users"],
|
|
193
|
+
parameters: [
|
|
194
|
+
{
|
|
195
|
+
name: "userId",
|
|
196
|
+
in: "path",
|
|
197
|
+
required: true,
|
|
198
|
+
schema: {
|
|
199
|
+
type: "string",
|
|
200
|
+
format: "uuid",
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
responses: {
|
|
205
|
+
"204": {
|
|
206
|
+
description: "User deleted successfully",
|
|
207
|
+
},
|
|
208
|
+
"404": {
|
|
209
|
+
$ref: "#/components/responses/NotFound",
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
"/products": {
|
|
215
|
+
get: {
|
|
216
|
+
summary: "Get all products",
|
|
217
|
+
tags: ["Products"],
|
|
218
|
+
security: [],
|
|
219
|
+
parameters: [
|
|
220
|
+
{
|
|
221
|
+
name: "category",
|
|
222
|
+
in: "query",
|
|
223
|
+
description: "Filter by category",
|
|
224
|
+
schema: {
|
|
225
|
+
type: "string",
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: "minPrice",
|
|
230
|
+
in: "query",
|
|
231
|
+
description: "Minimum price filter",
|
|
232
|
+
schema: {
|
|
233
|
+
type: "number",
|
|
234
|
+
format: "float",
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: "maxPrice",
|
|
239
|
+
in: "query",
|
|
240
|
+
description: "Maximum price filter",
|
|
241
|
+
schema: {
|
|
242
|
+
type: "number",
|
|
243
|
+
format: "float",
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: "search",
|
|
248
|
+
in: "query",
|
|
249
|
+
description: "Search in product name and description",
|
|
250
|
+
schema: {
|
|
251
|
+
type: "string",
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: "page",
|
|
256
|
+
in: "query",
|
|
257
|
+
schema: {
|
|
258
|
+
type: "integer",
|
|
259
|
+
minimum: 1,
|
|
260
|
+
default: 1,
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
name: "limit",
|
|
265
|
+
in: "query",
|
|
266
|
+
schema: {
|
|
267
|
+
type: "integer",
|
|
268
|
+
minimum: 1,
|
|
269
|
+
maximum: 100,
|
|
270
|
+
default: 20,
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
],
|
|
274
|
+
responses: {
|
|
275
|
+
"200": {
|
|
276
|
+
description: "List of products",
|
|
277
|
+
content: {
|
|
278
|
+
"application/json": {
|
|
279
|
+
schema: {
|
|
280
|
+
type: "object",
|
|
281
|
+
properties: {
|
|
282
|
+
products: {
|
|
283
|
+
type: "array",
|
|
284
|
+
items: {
|
|
285
|
+
$ref: "#/components/schemas/Product",
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
pagination: {
|
|
289
|
+
$ref: "#/components/schemas/Pagination",
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
post: {
|
|
299
|
+
summary: "Create a new product",
|
|
300
|
+
tags: ["Products"],
|
|
301
|
+
requestBody: {
|
|
302
|
+
required: true,
|
|
303
|
+
content: {
|
|
304
|
+
"application/json": {
|
|
305
|
+
schema: {
|
|
306
|
+
$ref: "#/components/schemas/CreateProductRequest",
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
responses: {
|
|
312
|
+
"201": {
|
|
313
|
+
description: "Product created successfully",
|
|
314
|
+
content: {
|
|
315
|
+
"application/json": {
|
|
316
|
+
schema: {
|
|
317
|
+
$ref: "#/components/schemas/Product",
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
"/products/{productId}": {
|
|
326
|
+
get: {
|
|
327
|
+
summary: "Get product by ID",
|
|
328
|
+
tags: ["Products"],
|
|
329
|
+
security: [],
|
|
330
|
+
parameters: [
|
|
331
|
+
{
|
|
332
|
+
name: "productId",
|
|
333
|
+
in: "path",
|
|
334
|
+
required: true,
|
|
335
|
+
schema: {
|
|
336
|
+
type: "string",
|
|
337
|
+
format: "uuid",
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
],
|
|
341
|
+
responses: {
|
|
342
|
+
"200": {
|
|
343
|
+
description: "Product details",
|
|
344
|
+
content: {
|
|
345
|
+
"application/json": {
|
|
346
|
+
schema: {
|
|
347
|
+
$ref: "#/components/schemas/Product",
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
"404": {
|
|
353
|
+
$ref: "#/components/responses/NotFound",
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
put: {
|
|
358
|
+
summary: "Update product",
|
|
359
|
+
tags: ["Products"],
|
|
360
|
+
parameters: [
|
|
361
|
+
{
|
|
362
|
+
name: "productId",
|
|
363
|
+
in: "path",
|
|
364
|
+
required: true,
|
|
365
|
+
schema: {
|
|
366
|
+
type: "string",
|
|
367
|
+
format: "uuid",
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
],
|
|
371
|
+
requestBody: {
|
|
372
|
+
required: true,
|
|
373
|
+
content: {
|
|
374
|
+
"application/json": {
|
|
375
|
+
schema: {
|
|
376
|
+
$ref: "#/components/schemas/UpdateProductRequest",
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
responses: {
|
|
382
|
+
"200": {
|
|
383
|
+
description: "Product updated successfully",
|
|
384
|
+
content: {
|
|
385
|
+
"application/json": {
|
|
386
|
+
schema: {
|
|
387
|
+
$ref: "#/components/schemas/Product",
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
delete: {
|
|
395
|
+
summary: "Delete product",
|
|
396
|
+
tags: ["Products"],
|
|
397
|
+
parameters: [
|
|
398
|
+
{
|
|
399
|
+
name: "productId",
|
|
400
|
+
in: "path",
|
|
401
|
+
required: true,
|
|
402
|
+
schema: {
|
|
403
|
+
type: "string",
|
|
404
|
+
format: "uuid",
|
|
405
|
+
},
|
|
406
|
+
},
|
|
407
|
+
],
|
|
408
|
+
responses: {
|
|
409
|
+
"204": {
|
|
410
|
+
description: "Product deleted successfully",
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
"/users/{userId}/cart": {
|
|
416
|
+
get: {
|
|
417
|
+
summary: "Get user's cart",
|
|
418
|
+
tags: ["Cart"],
|
|
419
|
+
parameters: [
|
|
420
|
+
{
|
|
421
|
+
name: "userId",
|
|
422
|
+
in: "path",
|
|
423
|
+
required: true,
|
|
424
|
+
schema: {
|
|
425
|
+
type: "string",
|
|
426
|
+
format: "uuid",
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
],
|
|
430
|
+
responses: {
|
|
431
|
+
"200": {
|
|
432
|
+
description: "User's cart",
|
|
433
|
+
content: {
|
|
434
|
+
"application/json": {
|
|
435
|
+
schema: {
|
|
436
|
+
$ref: "#/components/schemas/Cart",
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
post: {
|
|
444
|
+
summary: "Add item to cart",
|
|
445
|
+
tags: ["Cart"],
|
|
446
|
+
parameters: [
|
|
447
|
+
{
|
|
448
|
+
name: "userId",
|
|
449
|
+
in: "path",
|
|
450
|
+
required: true,
|
|
451
|
+
schema: {
|
|
452
|
+
type: "string",
|
|
453
|
+
format: "uuid",
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
],
|
|
457
|
+
requestBody: {
|
|
458
|
+
required: true,
|
|
459
|
+
content: {
|
|
460
|
+
"application/json": {
|
|
461
|
+
schema: {
|
|
462
|
+
$ref: "#/components/schemas/AddToCartRequest",
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
responses: {
|
|
468
|
+
"200": {
|
|
469
|
+
description: "Item added to cart",
|
|
470
|
+
content: {
|
|
471
|
+
"application/json": {
|
|
472
|
+
schema: {
|
|
473
|
+
$ref: "#/components/schemas/Cart",
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
delete: {
|
|
481
|
+
summary: "Clear cart",
|
|
482
|
+
tags: ["Cart"],
|
|
483
|
+
parameters: [
|
|
484
|
+
{
|
|
485
|
+
name: "userId",
|
|
486
|
+
in: "path",
|
|
487
|
+
required: true,
|
|
488
|
+
schema: {
|
|
489
|
+
type: "string",
|
|
490
|
+
format: "uuid",
|
|
491
|
+
},
|
|
492
|
+
},
|
|
493
|
+
],
|
|
494
|
+
responses: {
|
|
495
|
+
"204": {
|
|
496
|
+
description: "Cart cleared",
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
"/users/{userId}/cart/items/{itemId}": {
|
|
502
|
+
put: {
|
|
503
|
+
summary: "Update cart item quantity",
|
|
504
|
+
tags: ["Cart"],
|
|
505
|
+
parameters: [
|
|
506
|
+
{
|
|
507
|
+
name: "userId",
|
|
508
|
+
in: "path",
|
|
509
|
+
required: true,
|
|
510
|
+
schema: {
|
|
511
|
+
type: "string",
|
|
512
|
+
format: "uuid",
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
name: "itemId",
|
|
517
|
+
in: "path",
|
|
518
|
+
required: true,
|
|
519
|
+
schema: {
|
|
520
|
+
type: "string",
|
|
521
|
+
format: "uuid",
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
],
|
|
525
|
+
requestBody: {
|
|
526
|
+
required: true,
|
|
527
|
+
content: {
|
|
528
|
+
"application/json": {
|
|
529
|
+
schema: {
|
|
530
|
+
type: "object",
|
|
531
|
+
properties: {
|
|
532
|
+
quantity: {
|
|
533
|
+
type: "integer",
|
|
534
|
+
minimum: 1,
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
required: ["quantity"],
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
responses: {
|
|
543
|
+
"200": {
|
|
544
|
+
description: "Cart item updated",
|
|
545
|
+
content: {
|
|
546
|
+
"application/json": {
|
|
547
|
+
schema: {
|
|
548
|
+
$ref: "#/components/schemas/Cart",
|
|
549
|
+
},
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
},
|
|
555
|
+
delete: {
|
|
556
|
+
summary: "Remove item from cart",
|
|
557
|
+
tags: ["Cart"],
|
|
558
|
+
parameters: [
|
|
559
|
+
{
|
|
560
|
+
name: "userId",
|
|
561
|
+
in: "path",
|
|
562
|
+
required: true,
|
|
563
|
+
schema: {
|
|
564
|
+
type: "string",
|
|
565
|
+
format: "uuid",
|
|
566
|
+
},
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
name: "itemId",
|
|
570
|
+
in: "path",
|
|
571
|
+
required: true,
|
|
572
|
+
schema: {
|
|
573
|
+
type: "string",
|
|
574
|
+
format: "uuid",
|
|
575
|
+
},
|
|
576
|
+
},
|
|
577
|
+
],
|
|
578
|
+
responses: {
|
|
579
|
+
"204": {
|
|
580
|
+
description: "Item removed from cart",
|
|
581
|
+
},
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
"/users/{userId}/wishlist": {
|
|
586
|
+
get: {
|
|
587
|
+
summary: "Get user's wishlist",
|
|
588
|
+
tags: ["Wishlist"],
|
|
589
|
+
parameters: [
|
|
590
|
+
{
|
|
591
|
+
name: "userId",
|
|
592
|
+
in: "path",
|
|
593
|
+
required: true,
|
|
594
|
+
schema: {
|
|
595
|
+
type: "string",
|
|
596
|
+
format: "uuid",
|
|
597
|
+
},
|
|
598
|
+
},
|
|
599
|
+
],
|
|
600
|
+
responses: {
|
|
601
|
+
"200": {
|
|
602
|
+
description: "User's wishlist",
|
|
603
|
+
content: {
|
|
604
|
+
"application/json": {
|
|
605
|
+
schema: {
|
|
606
|
+
$ref: "#/components/schemas/Wishlist",
|
|
607
|
+
},
|
|
608
|
+
},
|
|
609
|
+
},
|
|
610
|
+
},
|
|
611
|
+
},
|
|
612
|
+
},
|
|
613
|
+
post: {
|
|
614
|
+
summary: "Add item to wishlist",
|
|
615
|
+
tags: ["Wishlist"],
|
|
616
|
+
parameters: [
|
|
617
|
+
{
|
|
618
|
+
name: "userId",
|
|
619
|
+
in: "path",
|
|
620
|
+
required: true,
|
|
621
|
+
schema: {
|
|
622
|
+
type: "string",
|
|
623
|
+
format: "uuid",
|
|
624
|
+
},
|
|
625
|
+
},
|
|
626
|
+
],
|
|
627
|
+
requestBody: {
|
|
628
|
+
required: true,
|
|
629
|
+
content: {
|
|
630
|
+
"application/json": {
|
|
631
|
+
schema: {
|
|
632
|
+
type: "object",
|
|
633
|
+
properties: {
|
|
634
|
+
productId: {
|
|
635
|
+
type: "string",
|
|
636
|
+
format: "uuid",
|
|
637
|
+
},
|
|
638
|
+
},
|
|
639
|
+
required: ["productId"],
|
|
640
|
+
},
|
|
641
|
+
},
|
|
642
|
+
},
|
|
643
|
+
},
|
|
644
|
+
responses: {
|
|
645
|
+
"200": {
|
|
646
|
+
description: "Item added to wishlist",
|
|
647
|
+
content: {
|
|
648
|
+
"application/json": {
|
|
649
|
+
schema: {
|
|
650
|
+
$ref: "#/components/schemas/Wishlist",
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
},
|
|
657
|
+
},
|
|
658
|
+
"/users/{userId}/wishlist/{productId}": {
|
|
659
|
+
delete: {
|
|
660
|
+
summary: "Remove item from wishlist",
|
|
661
|
+
tags: ["Wishlist"],
|
|
662
|
+
parameters: [
|
|
663
|
+
{
|
|
664
|
+
name: "userId",
|
|
665
|
+
in: "path",
|
|
666
|
+
required: true,
|
|
667
|
+
schema: {
|
|
668
|
+
type: "string",
|
|
669
|
+
format: "uuid",
|
|
670
|
+
},
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
name: "productId",
|
|
674
|
+
in: "path",
|
|
675
|
+
required: true,
|
|
676
|
+
schema: {
|
|
677
|
+
type: "string",
|
|
678
|
+
format: "uuid",
|
|
679
|
+
},
|
|
680
|
+
},
|
|
681
|
+
],
|
|
682
|
+
responses: {
|
|
683
|
+
"204": {
|
|
684
|
+
description: "Item removed from wishlist",
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
|
+
},
|
|
688
|
+
},
|
|
689
|
+
"/users/{userId}/orders": {
|
|
690
|
+
get: {
|
|
691
|
+
summary: "Get user's orders",
|
|
692
|
+
tags: ["Orders"],
|
|
693
|
+
parameters: [
|
|
694
|
+
{
|
|
695
|
+
name: "userId",
|
|
696
|
+
in: "path",
|
|
697
|
+
required: true,
|
|
698
|
+
schema: {
|
|
699
|
+
type: "string",
|
|
700
|
+
format: "uuid",
|
|
701
|
+
},
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
name: "status",
|
|
705
|
+
in: "query",
|
|
706
|
+
description: "Filter by order status",
|
|
707
|
+
schema: {
|
|
708
|
+
$ref: "#/components/schemas/OrderStatus",
|
|
709
|
+
},
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
name: "page",
|
|
713
|
+
in: "query",
|
|
714
|
+
schema: {
|
|
715
|
+
type: "integer",
|
|
716
|
+
minimum: 1,
|
|
717
|
+
default: 1,
|
|
718
|
+
},
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
name: "limit",
|
|
722
|
+
in: "query",
|
|
723
|
+
schema: {
|
|
724
|
+
type: "integer",
|
|
725
|
+
minimum: 1,
|
|
726
|
+
maximum: 100,
|
|
727
|
+
default: 20,
|
|
728
|
+
},
|
|
729
|
+
},
|
|
730
|
+
],
|
|
731
|
+
responses: {
|
|
732
|
+
"200": {
|
|
733
|
+
description: "User's orders",
|
|
734
|
+
content: {
|
|
735
|
+
"application/json": {
|
|
736
|
+
schema: {
|
|
737
|
+
type: "object",
|
|
738
|
+
properties: {
|
|
739
|
+
orders: {
|
|
740
|
+
type: "array",
|
|
741
|
+
items: {
|
|
742
|
+
$ref: "#/components/schemas/Order",
|
|
743
|
+
},
|
|
744
|
+
},
|
|
745
|
+
pagination: {
|
|
746
|
+
$ref: "#/components/schemas/Pagination",
|
|
747
|
+
},
|
|
748
|
+
},
|
|
749
|
+
},
|
|
750
|
+
},
|
|
751
|
+
},
|
|
752
|
+
},
|
|
753
|
+
},
|
|
754
|
+
},
|
|
755
|
+
post: {
|
|
756
|
+
summary: "Create a new order",
|
|
757
|
+
tags: ["Orders"],
|
|
758
|
+
parameters: [
|
|
759
|
+
{
|
|
760
|
+
name: "userId",
|
|
761
|
+
in: "path",
|
|
762
|
+
required: true,
|
|
763
|
+
schema: {
|
|
764
|
+
type: "string",
|
|
765
|
+
format: "uuid",
|
|
766
|
+
},
|
|
767
|
+
},
|
|
768
|
+
],
|
|
769
|
+
requestBody: {
|
|
770
|
+
required: true,
|
|
771
|
+
content: {
|
|
772
|
+
"application/json": {
|
|
773
|
+
schema: {
|
|
774
|
+
$ref: "#/components/schemas/CreateOrderRequest",
|
|
775
|
+
},
|
|
776
|
+
},
|
|
777
|
+
},
|
|
778
|
+
},
|
|
779
|
+
responses: {
|
|
780
|
+
"201": {
|
|
781
|
+
description: "Order created successfully",
|
|
782
|
+
content: {
|
|
783
|
+
"application/json": {
|
|
784
|
+
schema: {
|
|
785
|
+
$ref: "#/components/schemas/Order",
|
|
786
|
+
},
|
|
787
|
+
},
|
|
788
|
+
},
|
|
789
|
+
},
|
|
790
|
+
},
|
|
791
|
+
},
|
|
792
|
+
},
|
|
793
|
+
"/orders/{orderId}": {
|
|
794
|
+
get: {
|
|
795
|
+
summary: "Get order by ID",
|
|
796
|
+
tags: ["Orders"],
|
|
797
|
+
parameters: [
|
|
798
|
+
{
|
|
799
|
+
name: "orderId",
|
|
800
|
+
in: "path",
|
|
801
|
+
required: true,
|
|
802
|
+
schema: {
|
|
803
|
+
type: "string",
|
|
804
|
+
format: "uuid",
|
|
805
|
+
},
|
|
806
|
+
},
|
|
807
|
+
],
|
|
808
|
+
responses: {
|
|
809
|
+
"200": {
|
|
810
|
+
description: "Order details",
|
|
811
|
+
content: {
|
|
812
|
+
"application/json": {
|
|
813
|
+
schema: {
|
|
814
|
+
$ref: "#/components/schemas/Order",
|
|
815
|
+
},
|
|
816
|
+
},
|
|
817
|
+
},
|
|
818
|
+
},
|
|
819
|
+
"404": {
|
|
820
|
+
$ref: "#/components/responses/NotFound",
|
|
821
|
+
},
|
|
822
|
+
},
|
|
823
|
+
},
|
|
824
|
+
put: {
|
|
825
|
+
summary: "Update order status",
|
|
826
|
+
tags: ["Orders"],
|
|
827
|
+
parameters: [
|
|
828
|
+
{
|
|
829
|
+
name: "orderId",
|
|
830
|
+
in: "path",
|
|
831
|
+
required: true,
|
|
832
|
+
schema: {
|
|
833
|
+
type: "string",
|
|
834
|
+
format: "uuid",
|
|
835
|
+
},
|
|
836
|
+
},
|
|
837
|
+
],
|
|
838
|
+
requestBody: {
|
|
839
|
+
required: true,
|
|
840
|
+
content: {
|
|
841
|
+
"application/json": {
|
|
842
|
+
schema: {
|
|
843
|
+
type: "object",
|
|
844
|
+
properties: {
|
|
845
|
+
status: {
|
|
846
|
+
$ref: "#/components/schemas/OrderStatus",
|
|
847
|
+
},
|
|
848
|
+
},
|
|
849
|
+
required: ["status"],
|
|
850
|
+
},
|
|
851
|
+
},
|
|
852
|
+
},
|
|
853
|
+
},
|
|
854
|
+
responses: {
|
|
855
|
+
"200": {
|
|
856
|
+
description: "Order updated successfully",
|
|
857
|
+
content: {
|
|
858
|
+
"application/json": {
|
|
859
|
+
schema: {
|
|
860
|
+
$ref: "#/components/schemas/Order",
|
|
861
|
+
},
|
|
862
|
+
},
|
|
863
|
+
},
|
|
864
|
+
},
|
|
865
|
+
},
|
|
866
|
+
},
|
|
867
|
+
},
|
|
868
|
+
"/auth/login": {
|
|
869
|
+
post: {
|
|
870
|
+
summary: "User login",
|
|
871
|
+
tags: ["Authentication"],
|
|
872
|
+
security: [],
|
|
873
|
+
requestBody: {
|
|
874
|
+
required: true,
|
|
875
|
+
content: {
|
|
876
|
+
"application/json": {
|
|
877
|
+
schema: {
|
|
878
|
+
type: "object",
|
|
879
|
+
properties: {
|
|
880
|
+
email: {
|
|
881
|
+
type: "string",
|
|
882
|
+
format: "email",
|
|
883
|
+
},
|
|
884
|
+
password: {
|
|
885
|
+
type: "string",
|
|
886
|
+
minLength: 8,
|
|
887
|
+
},
|
|
888
|
+
},
|
|
889
|
+
required: ["email", "password"],
|
|
890
|
+
},
|
|
891
|
+
},
|
|
892
|
+
},
|
|
893
|
+
},
|
|
894
|
+
responses: {
|
|
895
|
+
"200": {
|
|
896
|
+
description: "Login successful",
|
|
897
|
+
content: {
|
|
898
|
+
"application/json": {
|
|
899
|
+
schema: {
|
|
900
|
+
type: "object",
|
|
901
|
+
properties: {
|
|
902
|
+
token: {
|
|
903
|
+
type: "string",
|
|
904
|
+
},
|
|
905
|
+
user: {
|
|
906
|
+
$ref: "#/components/schemas/User",
|
|
907
|
+
},
|
|
908
|
+
},
|
|
909
|
+
},
|
|
910
|
+
},
|
|
911
|
+
},
|
|
912
|
+
},
|
|
913
|
+
"401": {
|
|
914
|
+
$ref: "#/components/responses/Unauthorized",
|
|
915
|
+
},
|
|
916
|
+
},
|
|
917
|
+
},
|
|
918
|
+
},
|
|
919
|
+
"/auth/logout": {
|
|
920
|
+
post: {
|
|
921
|
+
summary: "User logout",
|
|
922
|
+
tags: ["Authentication"],
|
|
923
|
+
responses: {
|
|
924
|
+
"204": {
|
|
925
|
+
description: "Logout successful",
|
|
926
|
+
},
|
|
927
|
+
},
|
|
928
|
+
},
|
|
929
|
+
},
|
|
930
|
+
},
|
|
931
|
+
components: {
|
|
932
|
+
securitySchemes: {
|
|
933
|
+
bearerAuth: {
|
|
934
|
+
type: "http",
|
|
935
|
+
scheme: "bearer",
|
|
936
|
+
bearerFormat: "JWT",
|
|
937
|
+
},
|
|
938
|
+
},
|
|
939
|
+
schemas: {
|
|
940
|
+
User: {
|
|
941
|
+
type: "object",
|
|
942
|
+
properties: {
|
|
943
|
+
id: {
|
|
944
|
+
type: "string",
|
|
945
|
+
format: "uuid",
|
|
946
|
+
example: "123e4567-e89b-12d3-a456-426614174000",
|
|
947
|
+
},
|
|
948
|
+
email: {
|
|
949
|
+
type: "string",
|
|
950
|
+
format: "email",
|
|
951
|
+
example: "john.doe@example.com",
|
|
952
|
+
},
|
|
953
|
+
firstName: {
|
|
954
|
+
type: "string",
|
|
955
|
+
example: "John",
|
|
956
|
+
},
|
|
957
|
+
lastName: {
|
|
958
|
+
type: "string",
|
|
959
|
+
example: "Doe",
|
|
960
|
+
},
|
|
961
|
+
dateOfBirth: {
|
|
962
|
+
type: "string",
|
|
963
|
+
format: "date",
|
|
964
|
+
example: "1990-01-15",
|
|
965
|
+
},
|
|
966
|
+
phoneNumber: {
|
|
967
|
+
type: "string",
|
|
968
|
+
example: "+1234567890",
|
|
969
|
+
},
|
|
970
|
+
address: {
|
|
971
|
+
$ref: "#/components/schemas/Address",
|
|
972
|
+
},
|
|
973
|
+
createdAt: {
|
|
974
|
+
type: "string",
|
|
975
|
+
format: "date-time",
|
|
976
|
+
example: "2023-01-01T00:00:00Z",
|
|
977
|
+
},
|
|
978
|
+
updatedAt: {
|
|
979
|
+
type: "string",
|
|
980
|
+
format: "date-time",
|
|
981
|
+
example: "2023-01-01T00:00:00Z",
|
|
982
|
+
},
|
|
983
|
+
},
|
|
984
|
+
required: [
|
|
985
|
+
"id",
|
|
986
|
+
"email",
|
|
987
|
+
"firstName",
|
|
988
|
+
"lastName",
|
|
989
|
+
"createdAt",
|
|
990
|
+
"updatedAt",
|
|
991
|
+
],
|
|
992
|
+
},
|
|
993
|
+
CreateUserRequest: {
|
|
994
|
+
type: "object",
|
|
995
|
+
properties: {
|
|
996
|
+
email: {
|
|
997
|
+
type: "string",
|
|
998
|
+
format: "email",
|
|
999
|
+
},
|
|
1000
|
+
password: {
|
|
1001
|
+
type: "string",
|
|
1002
|
+
minLength: 8,
|
|
1003
|
+
},
|
|
1004
|
+
firstName: {
|
|
1005
|
+
type: "string",
|
|
1006
|
+
},
|
|
1007
|
+
lastName: {
|
|
1008
|
+
type: "string",
|
|
1009
|
+
},
|
|
1010
|
+
dateOfBirth: {
|
|
1011
|
+
type: "string",
|
|
1012
|
+
format: "date",
|
|
1013
|
+
},
|
|
1014
|
+
phoneNumber: {
|
|
1015
|
+
type: "string",
|
|
1016
|
+
},
|
|
1017
|
+
address: {
|
|
1018
|
+
$ref: "#/components/schemas/Address",
|
|
1019
|
+
},
|
|
1020
|
+
},
|
|
1021
|
+
required: ["email", "password", "firstName", "lastName"],
|
|
1022
|
+
},
|
|
1023
|
+
UpdateUserRequest: {
|
|
1024
|
+
type: "object",
|
|
1025
|
+
properties: {
|
|
1026
|
+
firstName: {
|
|
1027
|
+
type: "string",
|
|
1028
|
+
},
|
|
1029
|
+
lastName: {
|
|
1030
|
+
type: "string",
|
|
1031
|
+
},
|
|
1032
|
+
dateOfBirth: {
|
|
1033
|
+
type: "string",
|
|
1034
|
+
format: "date",
|
|
1035
|
+
},
|
|
1036
|
+
phoneNumber: {
|
|
1037
|
+
type: "string",
|
|
1038
|
+
},
|
|
1039
|
+
address: {
|
|
1040
|
+
$ref: "#/components/schemas/Address",
|
|
1041
|
+
},
|
|
1042
|
+
},
|
|
1043
|
+
},
|
|
1044
|
+
Address: {
|
|
1045
|
+
type: "object",
|
|
1046
|
+
properties: {
|
|
1047
|
+
street: {
|
|
1048
|
+
type: "string",
|
|
1049
|
+
example: "123 Main St",
|
|
1050
|
+
},
|
|
1051
|
+
city: {
|
|
1052
|
+
type: "string",
|
|
1053
|
+
example: "New York",
|
|
1054
|
+
},
|
|
1055
|
+
state: {
|
|
1056
|
+
type: "string",
|
|
1057
|
+
example: "NY",
|
|
1058
|
+
},
|
|
1059
|
+
zipCode: {
|
|
1060
|
+
type: "string",
|
|
1061
|
+
example: "10001",
|
|
1062
|
+
},
|
|
1063
|
+
country: {
|
|
1064
|
+
type: "string",
|
|
1065
|
+
example: "USA",
|
|
1066
|
+
},
|
|
1067
|
+
},
|
|
1068
|
+
required: ["street", "city", "state", "zipCode", "country"],
|
|
1069
|
+
},
|
|
1070
|
+
Product: {
|
|
1071
|
+
type: "object",
|
|
1072
|
+
properties: {
|
|
1073
|
+
id: {
|
|
1074
|
+
type: "string",
|
|
1075
|
+
format: "uuid",
|
|
1076
|
+
example: "123e4567-e89b-12d3-a456-426614174001",
|
|
1077
|
+
},
|
|
1078
|
+
name: {
|
|
1079
|
+
type: "string",
|
|
1080
|
+
example: "Wireless Headphones",
|
|
1081
|
+
},
|
|
1082
|
+
description: {
|
|
1083
|
+
type: "string",
|
|
1084
|
+
example: "High-quality wireless headphones with noise cancellation",
|
|
1085
|
+
},
|
|
1086
|
+
price: {
|
|
1087
|
+
type: "number",
|
|
1088
|
+
format: "float",
|
|
1089
|
+
example: 299.99,
|
|
1090
|
+
},
|
|
1091
|
+
category: {
|
|
1092
|
+
type: "string",
|
|
1093
|
+
example: "Electronics",
|
|
1094
|
+
},
|
|
1095
|
+
brand: {
|
|
1096
|
+
type: "string",
|
|
1097
|
+
example: "AudioTech",
|
|
1098
|
+
},
|
|
1099
|
+
sku: {
|
|
1100
|
+
type: "string",
|
|
1101
|
+
example: "WH-001",
|
|
1102
|
+
},
|
|
1103
|
+
stock: {
|
|
1104
|
+
type: "integer",
|
|
1105
|
+
example: 50,
|
|
1106
|
+
},
|
|
1107
|
+
images: {
|
|
1108
|
+
type: "array",
|
|
1109
|
+
items: {
|
|
1110
|
+
type: "string",
|
|
1111
|
+
format: "uri",
|
|
1112
|
+
},
|
|
1113
|
+
example: [
|
|
1114
|
+
"https://example.com/image1.jpg",
|
|
1115
|
+
"https://example.com/image2.jpg",
|
|
1116
|
+
],
|
|
1117
|
+
},
|
|
1118
|
+
specifications: {
|
|
1119
|
+
type: "object",
|
|
1120
|
+
additionalProperties: true,
|
|
1121
|
+
example: {
|
|
1122
|
+
color: "Black",
|
|
1123
|
+
weight: "250g",
|
|
1124
|
+
batteryLife: "30 hours",
|
|
1125
|
+
},
|
|
1126
|
+
},
|
|
1127
|
+
tags: {
|
|
1128
|
+
type: "array",
|
|
1129
|
+
items: {
|
|
1130
|
+
type: "string",
|
|
1131
|
+
},
|
|
1132
|
+
example: ["wireless", "noise-cancelling", "bluetooth"],
|
|
1133
|
+
},
|
|
1134
|
+
rating: {
|
|
1135
|
+
type: "number",
|
|
1136
|
+
format: "float",
|
|
1137
|
+
minimum: 0,
|
|
1138
|
+
maximum: 5,
|
|
1139
|
+
example: 4.5,
|
|
1140
|
+
},
|
|
1141
|
+
reviewCount: {
|
|
1142
|
+
type: "integer",
|
|
1143
|
+
example: 127,
|
|
1144
|
+
},
|
|
1145
|
+
isActive: {
|
|
1146
|
+
type: "boolean",
|
|
1147
|
+
example: true,
|
|
1148
|
+
},
|
|
1149
|
+
createdAt: {
|
|
1150
|
+
type: "string",
|
|
1151
|
+
format: "date-time",
|
|
1152
|
+
},
|
|
1153
|
+
updatedAt: {
|
|
1154
|
+
type: "string",
|
|
1155
|
+
format: "date-time",
|
|
1156
|
+
},
|
|
1157
|
+
},
|
|
1158
|
+
required: [
|
|
1159
|
+
"id",
|
|
1160
|
+
"name",
|
|
1161
|
+
"price",
|
|
1162
|
+
"category",
|
|
1163
|
+
"stock",
|
|
1164
|
+
"isActive",
|
|
1165
|
+
"createdAt",
|
|
1166
|
+
"updatedAt",
|
|
1167
|
+
],
|
|
1168
|
+
},
|
|
1169
|
+
CreateProductRequest: {
|
|
1170
|
+
type: "object",
|
|
1171
|
+
properties: {
|
|
1172
|
+
name: {
|
|
1173
|
+
type: "string",
|
|
1174
|
+
},
|
|
1175
|
+
description: {
|
|
1176
|
+
type: "string",
|
|
1177
|
+
},
|
|
1178
|
+
price: {
|
|
1179
|
+
type: "number",
|
|
1180
|
+
format: "float",
|
|
1181
|
+
minimum: 0,
|
|
1182
|
+
},
|
|
1183
|
+
category: {
|
|
1184
|
+
type: "string",
|
|
1185
|
+
},
|
|
1186
|
+
brand: {
|
|
1187
|
+
type: "string",
|
|
1188
|
+
},
|
|
1189
|
+
sku: {
|
|
1190
|
+
type: "string",
|
|
1191
|
+
},
|
|
1192
|
+
stock: {
|
|
1193
|
+
type: "integer",
|
|
1194
|
+
minimum: 0,
|
|
1195
|
+
},
|
|
1196
|
+
images: {
|
|
1197
|
+
type: "array",
|
|
1198
|
+
items: {
|
|
1199
|
+
type: "string",
|
|
1200
|
+
format: "uri",
|
|
1201
|
+
},
|
|
1202
|
+
},
|
|
1203
|
+
specifications: {
|
|
1204
|
+
type: "object",
|
|
1205
|
+
additionalProperties: true,
|
|
1206
|
+
},
|
|
1207
|
+
tags: {
|
|
1208
|
+
type: "array",
|
|
1209
|
+
items: {
|
|
1210
|
+
type: "string",
|
|
1211
|
+
},
|
|
1212
|
+
},
|
|
1213
|
+
},
|
|
1214
|
+
required: ["name", "price", "category", "stock"],
|
|
1215
|
+
},
|
|
1216
|
+
UpdateProductRequest: {
|
|
1217
|
+
type: "object",
|
|
1218
|
+
properties: {
|
|
1219
|
+
name: {
|
|
1220
|
+
type: "string",
|
|
1221
|
+
},
|
|
1222
|
+
description: {
|
|
1223
|
+
type: "string",
|
|
1224
|
+
},
|
|
1225
|
+
price: {
|
|
1226
|
+
type: "number",
|
|
1227
|
+
format: "float",
|
|
1228
|
+
minimum: 0,
|
|
1229
|
+
},
|
|
1230
|
+
category: {
|
|
1231
|
+
type: "string",
|
|
1232
|
+
},
|
|
1233
|
+
brand: {
|
|
1234
|
+
type: "string",
|
|
1235
|
+
},
|
|
1236
|
+
stock: {
|
|
1237
|
+
type: "integer",
|
|
1238
|
+
minimum: 0,
|
|
1239
|
+
},
|
|
1240
|
+
images: {
|
|
1241
|
+
type: "array",
|
|
1242
|
+
items: {
|
|
1243
|
+
type: "string",
|
|
1244
|
+
format: "uri",
|
|
1245
|
+
},
|
|
1246
|
+
},
|
|
1247
|
+
specifications: {
|
|
1248
|
+
type: "object",
|
|
1249
|
+
additionalProperties: true,
|
|
1250
|
+
},
|
|
1251
|
+
tags: {
|
|
1252
|
+
type: "array",
|
|
1253
|
+
items: {
|
|
1254
|
+
type: "string",
|
|
1255
|
+
},
|
|
1256
|
+
},
|
|
1257
|
+
isActive: {
|
|
1258
|
+
type: "boolean",
|
|
1259
|
+
},
|
|
1260
|
+
},
|
|
1261
|
+
},
|
|
1262
|
+
Cart: {
|
|
1263
|
+
type: "object",
|
|
1264
|
+
properties: {
|
|
1265
|
+
id: {
|
|
1266
|
+
type: "string",
|
|
1267
|
+
format: "uuid",
|
|
1268
|
+
},
|
|
1269
|
+
userId: {
|
|
1270
|
+
type: "string",
|
|
1271
|
+
format: "uuid",
|
|
1272
|
+
},
|
|
1273
|
+
items: {
|
|
1274
|
+
type: "array",
|
|
1275
|
+
items: {
|
|
1276
|
+
$ref: "#/components/schemas/CartItem",
|
|
1277
|
+
},
|
|
1278
|
+
},
|
|
1279
|
+
totalAmount: {
|
|
1280
|
+
type: "number",
|
|
1281
|
+
format: "float",
|
|
1282
|
+
example: 599.98,
|
|
1283
|
+
},
|
|
1284
|
+
itemCount: {
|
|
1285
|
+
type: "integer",
|
|
1286
|
+
example: 2,
|
|
1287
|
+
},
|
|
1288
|
+
createdAt: {
|
|
1289
|
+
type: "string",
|
|
1290
|
+
format: "date-time",
|
|
1291
|
+
},
|
|
1292
|
+
updatedAt: {
|
|
1293
|
+
type: "string",
|
|
1294
|
+
format: "date-time",
|
|
1295
|
+
},
|
|
1296
|
+
},
|
|
1297
|
+
required: [
|
|
1298
|
+
"id",
|
|
1299
|
+
"userId",
|
|
1300
|
+
"items",
|
|
1301
|
+
"totalAmount",
|
|
1302
|
+
"itemCount",
|
|
1303
|
+
"createdAt",
|
|
1304
|
+
"updatedAt",
|
|
1305
|
+
],
|
|
1306
|
+
},
|
|
1307
|
+
CartItem: {
|
|
1308
|
+
type: "object",
|
|
1309
|
+
properties: {
|
|
1310
|
+
id: {
|
|
1311
|
+
type: "string",
|
|
1312
|
+
format: "uuid",
|
|
1313
|
+
},
|
|
1314
|
+
productId: {
|
|
1315
|
+
type: "string",
|
|
1316
|
+
format: "uuid",
|
|
1317
|
+
},
|
|
1318
|
+
product: {
|
|
1319
|
+
$ref: "#/components/schemas/Product",
|
|
1320
|
+
},
|
|
1321
|
+
quantity: {
|
|
1322
|
+
type: "integer",
|
|
1323
|
+
minimum: 1,
|
|
1324
|
+
example: 2,
|
|
1325
|
+
},
|
|
1326
|
+
unitPrice: {
|
|
1327
|
+
type: "number",
|
|
1328
|
+
format: "float",
|
|
1329
|
+
example: 299.99,
|
|
1330
|
+
},
|
|
1331
|
+
totalPrice: {
|
|
1332
|
+
type: "number",
|
|
1333
|
+
format: "float",
|
|
1334
|
+
example: 599.98,
|
|
1335
|
+
},
|
|
1336
|
+
addedAt: {
|
|
1337
|
+
type: "string",
|
|
1338
|
+
format: "date-time",
|
|
1339
|
+
},
|
|
1340
|
+
},
|
|
1341
|
+
required: [
|
|
1342
|
+
"id",
|
|
1343
|
+
"productId",
|
|
1344
|
+
"product",
|
|
1345
|
+
"quantity",
|
|
1346
|
+
"unitPrice",
|
|
1347
|
+
"totalPrice",
|
|
1348
|
+
"addedAt",
|
|
1349
|
+
],
|
|
1350
|
+
},
|
|
1351
|
+
AddToCartRequest: {
|
|
1352
|
+
type: "object",
|
|
1353
|
+
properties: {
|
|
1354
|
+
productId: {
|
|
1355
|
+
type: "string",
|
|
1356
|
+
format: "uuid",
|
|
1357
|
+
},
|
|
1358
|
+
quantity: {
|
|
1359
|
+
type: "integer",
|
|
1360
|
+
minimum: 1,
|
|
1361
|
+
default: 1,
|
|
1362
|
+
},
|
|
1363
|
+
},
|
|
1364
|
+
required: ["productId"],
|
|
1365
|
+
},
|
|
1366
|
+
Wishlist: {
|
|
1367
|
+
type: "object",
|
|
1368
|
+
properties: {
|
|
1369
|
+
id: {
|
|
1370
|
+
type: "string",
|
|
1371
|
+
format: "uuid",
|
|
1372
|
+
},
|
|
1373
|
+
userId: {
|
|
1374
|
+
type: "string",
|
|
1375
|
+
format: "uuid",
|
|
1376
|
+
},
|
|
1377
|
+
items: {
|
|
1378
|
+
type: "array",
|
|
1379
|
+
items: {
|
|
1380
|
+
$ref: "#/components/schemas/WishlistItem",
|
|
1381
|
+
},
|
|
1382
|
+
},
|
|
1383
|
+
itemCount: {
|
|
1384
|
+
type: "integer",
|
|
1385
|
+
example: 3,
|
|
1386
|
+
},
|
|
1387
|
+
createdAt: {
|
|
1388
|
+
type: "string",
|
|
1389
|
+
format: "date-time",
|
|
1390
|
+
},
|
|
1391
|
+
updatedAt: {
|
|
1392
|
+
type: "string",
|
|
1393
|
+
format: "date-time",
|
|
1394
|
+
},
|
|
1395
|
+
},
|
|
1396
|
+
required: [
|
|
1397
|
+
"id",
|
|
1398
|
+
"userId",
|
|
1399
|
+
"items",
|
|
1400
|
+
"itemCount",
|
|
1401
|
+
"createdAt",
|
|
1402
|
+
"updatedAt",
|
|
1403
|
+
],
|
|
1404
|
+
},
|
|
1405
|
+
WishlistItem: {
|
|
1406
|
+
type: "object",
|
|
1407
|
+
properties: {
|
|
1408
|
+
productId: {
|
|
1409
|
+
type: "string",
|
|
1410
|
+
format: "uuid",
|
|
1411
|
+
},
|
|
1412
|
+
product: {
|
|
1413
|
+
$ref: "#/components/schemas/Product",
|
|
1414
|
+
},
|
|
1415
|
+
addedAt: {
|
|
1416
|
+
type: "string",
|
|
1417
|
+
format: "date-time",
|
|
1418
|
+
},
|
|
1419
|
+
},
|
|
1420
|
+
required: ["productId", "product", "addedAt"],
|
|
1421
|
+
},
|
|
1422
|
+
Order: {
|
|
1423
|
+
type: "object",
|
|
1424
|
+
properties: {
|
|
1425
|
+
id: {
|
|
1426
|
+
type: "string",
|
|
1427
|
+
format: "uuid",
|
|
1428
|
+
example: "123e4567-e89b-12d3-a456-426614174002",
|
|
1429
|
+
},
|
|
1430
|
+
orderNumber: {
|
|
1431
|
+
type: "string",
|
|
1432
|
+
example: "ORD-2023-001",
|
|
1433
|
+
},
|
|
1434
|
+
userId: {
|
|
1435
|
+
type: "string",
|
|
1436
|
+
format: "uuid",
|
|
1437
|
+
},
|
|
1438
|
+
items: {
|
|
1439
|
+
type: "array",
|
|
1440
|
+
items: {
|
|
1441
|
+
$ref: "#/components/schemas/OrderItem",
|
|
1442
|
+
},
|
|
1443
|
+
},
|
|
1444
|
+
status: {
|
|
1445
|
+
$ref: "#/components/schemas/OrderStatus",
|
|
1446
|
+
},
|
|
1447
|
+
subtotal: {
|
|
1448
|
+
type: "number",
|
|
1449
|
+
format: "float",
|
|
1450
|
+
example: 599.98,
|
|
1451
|
+
},
|
|
1452
|
+
tax: {
|
|
1453
|
+
type: "number",
|
|
1454
|
+
format: "float",
|
|
1455
|
+
example: 48,
|
|
1456
|
+
},
|
|
1457
|
+
shipping: {
|
|
1458
|
+
type: "number",
|
|
1459
|
+
format: "float",
|
|
1460
|
+
example: 9.99,
|
|
1461
|
+
},
|
|
1462
|
+
total: {
|
|
1463
|
+
type: "number",
|
|
1464
|
+
format: "float",
|
|
1465
|
+
example: 657.97,
|
|
1466
|
+
},
|
|
1467
|
+
shippingAddress: {
|
|
1468
|
+
$ref: "#/components/schemas/Address",
|
|
1469
|
+
},
|
|
1470
|
+
billingAddress: {
|
|
1471
|
+
$ref: "#/components/schemas/Address",
|
|
1472
|
+
},
|
|
1473
|
+
paymentMethod: {
|
|
1474
|
+
type: "string",
|
|
1475
|
+
example: "credit_card",
|
|
1476
|
+
},
|
|
1477
|
+
trackingNumber: {
|
|
1478
|
+
type: "string",
|
|
1479
|
+
example: "1Z999AA1234567890",
|
|
1480
|
+
},
|
|
1481
|
+
estimatedDelivery: {
|
|
1482
|
+
type: "string",
|
|
1483
|
+
format: "date",
|
|
1484
|
+
example: "2023-12-25",
|
|
1485
|
+
},
|
|
1486
|
+
createdAt: {
|
|
1487
|
+
type: "string",
|
|
1488
|
+
format: "date-time",
|
|
1489
|
+
},
|
|
1490
|
+
updatedAt: {
|
|
1491
|
+
type: "string",
|
|
1492
|
+
format: "date-time",
|
|
1493
|
+
},
|
|
1494
|
+
},
|
|
1495
|
+
required: [
|
|
1496
|
+
"id",
|
|
1497
|
+
"orderNumber",
|
|
1498
|
+
"userId",
|
|
1499
|
+
"items",
|
|
1500
|
+
"status",
|
|
1501
|
+
"subtotal",
|
|
1502
|
+
"tax",
|
|
1503
|
+
"shipping",
|
|
1504
|
+
"total",
|
|
1505
|
+
"shippingAddress",
|
|
1506
|
+
"paymentMethod",
|
|
1507
|
+
"createdAt",
|
|
1508
|
+
"updatedAt",
|
|
1509
|
+
],
|
|
1510
|
+
},
|
|
1511
|
+
OrderItem: {
|
|
1512
|
+
type: "object",
|
|
1513
|
+
properties: {
|
|
1514
|
+
productId: {
|
|
1515
|
+
type: "string",
|
|
1516
|
+
format: "uuid",
|
|
1517
|
+
},
|
|
1518
|
+
product: {
|
|
1519
|
+
$ref: "#/components/schemas/Product",
|
|
1520
|
+
},
|
|
1521
|
+
quantity: {
|
|
1522
|
+
type: "integer",
|
|
1523
|
+
minimum: 1,
|
|
1524
|
+
},
|
|
1525
|
+
unitPrice: {
|
|
1526
|
+
type: "number",
|
|
1527
|
+
format: "float",
|
|
1528
|
+
},
|
|
1529
|
+
totalPrice: {
|
|
1530
|
+
type: "number",
|
|
1531
|
+
format: "float",
|
|
1532
|
+
},
|
|
1533
|
+
},
|
|
1534
|
+
required: [
|
|
1535
|
+
"productId",
|
|
1536
|
+
"product",
|
|
1537
|
+
"quantity",
|
|
1538
|
+
"unitPrice",
|
|
1539
|
+
"totalPrice",
|
|
1540
|
+
],
|
|
1541
|
+
},
|
|
1542
|
+
CreateOrderRequest: {
|
|
1543
|
+
type: "object",
|
|
1544
|
+
properties: {
|
|
1545
|
+
items: {
|
|
1546
|
+
type: "array",
|
|
1547
|
+
items: {
|
|
1548
|
+
type: "object",
|
|
1549
|
+
properties: {
|
|
1550
|
+
productId: {
|
|
1551
|
+
type: "string",
|
|
1552
|
+
format: "uuid",
|
|
1553
|
+
},
|
|
1554
|
+
quantity: {
|
|
1555
|
+
type: "integer",
|
|
1556
|
+
minimum: 1,
|
|
1557
|
+
},
|
|
1558
|
+
},
|
|
1559
|
+
required: ["productId", "quantity"],
|
|
1560
|
+
},
|
|
1561
|
+
},
|
|
1562
|
+
shippingAddress: {
|
|
1563
|
+
$ref: "#/components/schemas/Address",
|
|
1564
|
+
},
|
|
1565
|
+
billingAddress: {
|
|
1566
|
+
$ref: "#/components/schemas/Address",
|
|
1567
|
+
},
|
|
1568
|
+
paymentMethod: {
|
|
1569
|
+
type: "string",
|
|
1570
|
+
enum: [
|
|
1571
|
+
"credit_card",
|
|
1572
|
+
"debit_card",
|
|
1573
|
+
"paypal",
|
|
1574
|
+
"apple_pay",
|
|
1575
|
+
"google_pay",
|
|
1576
|
+
],
|
|
1577
|
+
},
|
|
1578
|
+
},
|
|
1579
|
+
required: ["items", "shippingAddress", "paymentMethod"],
|
|
1580
|
+
},
|
|
1581
|
+
OrderStatus: {
|
|
1582
|
+
type: "string",
|
|
1583
|
+
enum: [
|
|
1584
|
+
"pending",
|
|
1585
|
+
"confirmed",
|
|
1586
|
+
"processing",
|
|
1587
|
+
"shipped",
|
|
1588
|
+
"delivered",
|
|
1589
|
+
"cancelled",
|
|
1590
|
+
"refunded",
|
|
1591
|
+
],
|
|
1592
|
+
example: "confirmed",
|
|
1593
|
+
},
|
|
1594
|
+
Pagination: {
|
|
1595
|
+
type: "object",
|
|
1596
|
+
properties: {
|
|
1597
|
+
page: {
|
|
1598
|
+
type: "integer",
|
|
1599
|
+
example: 1,
|
|
1600
|
+
},
|
|
1601
|
+
limit: {
|
|
1602
|
+
type: "integer",
|
|
1603
|
+
example: 20,
|
|
1604
|
+
},
|
|
1605
|
+
total: {
|
|
1606
|
+
type: "integer",
|
|
1607
|
+
example: 100,
|
|
1608
|
+
},
|
|
1609
|
+
totalPages: {
|
|
1610
|
+
type: "integer",
|
|
1611
|
+
example: 5,
|
|
1612
|
+
},
|
|
1613
|
+
hasNext: {
|
|
1614
|
+
type: "boolean",
|
|
1615
|
+
example: true,
|
|
1616
|
+
},
|
|
1617
|
+
hasPrevious: {
|
|
1618
|
+
type: "boolean",
|
|
1619
|
+
example: false,
|
|
1620
|
+
},
|
|
1621
|
+
},
|
|
1622
|
+
required: [
|
|
1623
|
+
"page",
|
|
1624
|
+
"limit",
|
|
1625
|
+
"total",
|
|
1626
|
+
"totalPages",
|
|
1627
|
+
"hasNext",
|
|
1628
|
+
"hasPrevious",
|
|
1629
|
+
],
|
|
1630
|
+
},
|
|
1631
|
+
Error: {
|
|
1632
|
+
type: "object",
|
|
1633
|
+
properties: {
|
|
1634
|
+
code: {
|
|
1635
|
+
type: "string",
|
|
1636
|
+
example: "VALIDATION_ERROR",
|
|
1637
|
+
},
|
|
1638
|
+
message: {
|
|
1639
|
+
type: "string",
|
|
1640
|
+
example: "Invalid input provided",
|
|
1641
|
+
},
|
|
1642
|
+
details: {
|
|
1643
|
+
type: "array",
|
|
1644
|
+
items: {
|
|
1645
|
+
type: "object",
|
|
1646
|
+
properties: {
|
|
1647
|
+
field: {
|
|
1648
|
+
type: "string",
|
|
1649
|
+
},
|
|
1650
|
+
message: {
|
|
1651
|
+
type: "string",
|
|
1652
|
+
},
|
|
1653
|
+
},
|
|
1654
|
+
},
|
|
1655
|
+
},
|
|
1656
|
+
},
|
|
1657
|
+
required: ["code", "message"],
|
|
1658
|
+
},
|
|
1659
|
+
},
|
|
1660
|
+
responses: {
|
|
1661
|
+
BadRequest: {
|
|
1662
|
+
description: "Bad request",
|
|
1663
|
+
content: {
|
|
1664
|
+
"application/json": {
|
|
1665
|
+
schema: {
|
|
1666
|
+
$ref: "#/components/schemas/Error",
|
|
1667
|
+
},
|
|
1668
|
+
example: {
|
|
1669
|
+
code: "VALIDATION_ERROR",
|
|
1670
|
+
message: "Invalid input provided",
|
|
1671
|
+
details: [
|
|
1672
|
+
{
|
|
1673
|
+
field: "email",
|
|
1674
|
+
message: "Email is required",
|
|
1675
|
+
},
|
|
1676
|
+
],
|
|
1677
|
+
},
|
|
1678
|
+
},
|
|
1679
|
+
},
|
|
1680
|
+
},
|
|
1681
|
+
Unauthorized: {
|
|
1682
|
+
description: "Unauthorized",
|
|
1683
|
+
content: {
|
|
1684
|
+
"application/json": {
|
|
1685
|
+
schema: {
|
|
1686
|
+
$ref: "#/components/schemas/Error",
|
|
1687
|
+
},
|
|
1688
|
+
example: {
|
|
1689
|
+
code: "UNAUTHORIZED",
|
|
1690
|
+
message: "Authentication required",
|
|
1691
|
+
},
|
|
1692
|
+
},
|
|
1693
|
+
},
|
|
1694
|
+
},
|
|
1695
|
+
Forbidden: {
|
|
1696
|
+
description: "Forbidden",
|
|
1697
|
+
content: {
|
|
1698
|
+
"application/json": {
|
|
1699
|
+
schema: {
|
|
1700
|
+
$ref: "#/components/schemas/Error",
|
|
1701
|
+
},
|
|
1702
|
+
example: {
|
|
1703
|
+
code: "FORBIDDEN",
|
|
1704
|
+
message: "Insufficient permissions",
|
|
1705
|
+
},
|
|
1706
|
+
},
|
|
1707
|
+
},
|
|
1708
|
+
},
|
|
1709
|
+
NotFound: {
|
|
1710
|
+
description: "Resource not found",
|
|
1711
|
+
content: {
|
|
1712
|
+
"application/json": {
|
|
1713
|
+
schema: {
|
|
1714
|
+
$ref: "#/components/schemas/Error",
|
|
1715
|
+
},
|
|
1716
|
+
example: {
|
|
1717
|
+
code: "NOT_FOUND",
|
|
1718
|
+
message: "Resource not found",
|
|
1719
|
+
},
|
|
1720
|
+
},
|
|
1721
|
+
},
|
|
1722
|
+
},
|
|
1723
|
+
InternalServerError: {
|
|
1724
|
+
description: "Internal server error",
|
|
1725
|
+
content: {
|
|
1726
|
+
"application/json": {
|
|
1727
|
+
schema: {
|
|
1728
|
+
$ref: "#/components/schemas/Error",
|
|
1729
|
+
},
|
|
1730
|
+
example: {
|
|
1731
|
+
code: "INTERNAL_ERROR",
|
|
1732
|
+
message: "An unexpected error occurred",
|
|
1733
|
+
},
|
|
1734
|
+
},
|
|
1735
|
+
},
|
|
1736
|
+
},
|
|
1737
|
+
},
|
|
1738
|
+
},
|
|
1739
|
+
tags: [
|
|
1740
|
+
{
|
|
1741
|
+
name: "Users",
|
|
1742
|
+
description: "User management operations",
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
name: "Products",
|
|
1746
|
+
description: "Product catalog operations",
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
name: "Cart",
|
|
1750
|
+
description: "Shopping cart operations",
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
name: "Wishlist",
|
|
1754
|
+
description: "Wishlist management operations",
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
name: "Orders",
|
|
1758
|
+
description: "Order management operations",
|
|
1759
|
+
},
|
|
1760
|
+
{
|
|
1761
|
+
name: "Authentication",
|
|
1762
|
+
description: "Authentication and authorization operations",
|
|
1763
|
+
},
|
|
1764
|
+
],
|
|
1765
|
+
};
|
|
1766
|
+
//# sourceMappingURL=open-api-example-schemas.js.map
|