@ratio-mcp/docs-server 1.5.0 → 1.6.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.
Files changed (40) hide show
  1. package/README.md +75 -0
  2. package/dist/schemas/app-distribution.json +36 -0
  3. package/dist/schemas/customers.json +26 -0
  4. package/dist/schemas/discounts.json +81 -0
  5. package/dist/schemas/draft_orders.json +112 -0
  6. package/dist/schemas/loyalty.json +147 -0
  7. package/dist/schemas/orders.json +597 -102
  8. package/dist/schemas/product_reviews.json +45 -0
  9. package/dist/schemas/products.json +401 -118
  10. package/dist/schemas/tags.json +98 -0
  11. package/dist/schemas/variants.json +112 -0
  12. package/dist/schemas/webhooks.json +94 -15
  13. package/dist/tools/get-api-reference.d.ts.map +1 -1
  14. package/dist/tools/get-api-reference.js +4 -1
  15. package/dist/tools/get-api-reference.js.map +1 -1
  16. package/dist/tools/get-scope-map.d.ts.map +1 -1
  17. package/dist/tools/get-scope-map.js +7 -1
  18. package/dist/tools/get-scope-map.js.map +1 -1
  19. package/dist/tools/get-scopes.d.ts +3 -0
  20. package/dist/tools/get-scopes.d.ts.map +1 -1
  21. package/dist/tools/get-scopes.js +13 -2
  22. package/dist/tools/get-scopes.js.map +1 -1
  23. package/dist/tools/lookup-docs.d.ts +1 -1
  24. package/dist/tools/lookup-docs.d.ts.map +1 -1
  25. package/dist/tools/lookup-docs.js +27 -4
  26. package/dist/tools/lookup-docs.js.map +1 -1
  27. package/dist/tools/validate-code.d.ts.map +1 -1
  28. package/dist/tools/validate-code.js +0 -4
  29. package/dist/tools/validate-code.js.map +1 -1
  30. package/dist/utils/schema-loader.d.ts +5 -1
  31. package/dist/utils/schema-loader.d.ts.map +1 -1
  32. package/dist/utils/schema-loader.js +8 -2
  33. package/dist/utils/schema-loader.js.map +1 -1
  34. package/package.json +3 -3
  35. package/dist/schemas/schemas/oauth.json +0 -71
  36. package/dist/schemas/schemas/orders.json +0 -167
  37. package/dist/schemas/schemas/products.json +0 -167
  38. package/dist/schemas/schemas/scopes.json +0 -52
  39. package/dist/schemas/schemas/webhooks.json +0 -69
  40. package/dist/schemas/scopes.json +0 -52
@@ -0,0 +1,45 @@
1
+ {
2
+ "resource": "product_reviews",
3
+ "auth": {
4
+ "type": "bearer",
5
+ "header": "Authorization",
6
+ "format": "Bearer <access_token>"
7
+ },
8
+ "common_headers": {
9
+ "gk-merchant-id": "Required. Tenant/merchant context for the request."
10
+ },
11
+ "endpoints": [
12
+ {
13
+ "method": "GET",
14
+ "path": "/api/v1/v1/reviews/:productId",
15
+ "controller_order": 1,
16
+ "handler_name": "getProductReviews",
17
+ "required_scope": "read_product_reviews",
18
+ "summary": "Get reviews for a product",
19
+ "description": "List customer reviews for a given product. Read-only. Note the path carries a doubled /v1 segment (global /api/v1 prefix + controller 'v1/reviews').",
20
+ "path_params": [
21
+ { "name": "productId", "type": "string", "required": true, "description": "The product ID to fetch reviews for" }
22
+ ],
23
+ "query_params": [
24
+ { "name": "limit", "type": "number", "required": false, "description": "Number of reviews per page" },
25
+ { "name": "offset", "type": "number", "required": false, "description": "Offset for pagination" },
26
+ { "name": "rating", "type": "number", "required": false, "description": "Filter by star rating" },
27
+ { "name": "sort", "type": "string", "required": false, "description": "Sort order" }
28
+ ],
29
+ "request_body": null,
30
+ "response_schema": "ProductReviewListResponse"
31
+ }
32
+ ],
33
+ "schemas": {
34
+ "ProductReview": {
35
+ "id": "string — review identifier",
36
+ "product_id": "string",
37
+ "rating": "number — star rating",
38
+ "title": "string | null",
39
+ "body": "string | null",
40
+ "author": "string | null",
41
+ "status": "string — moderation status",
42
+ "created_at": "string — ISO 8601"
43
+ }
44
+ }
45
+ }
@@ -1,167 +1,450 @@
1
1
  {
2
2
  "resource": "products",
3
- "base_url": "https://gkx.gokwik.co/aes",
4
3
  "auth": {
5
4
  "type": "bearer",
6
5
  "header": "Authorization",
7
6
  "format": "Bearer <access_token>"
8
7
  },
8
+ "_generated": "by scripts/sync-schemas.mjs from backend OpenAPI (x-required-scope). Do not hand-edit.",
9
9
  "endpoints": [
10
10
  {
11
11
  "method": "GET",
12
12
  "path": "/api/v1/v1/products",
13
13
  "controller_order": 1,
14
- "handler_name": "getProducts",
14
+ "handler_name": "findAll",
15
15
  "required_scope": "read_products",
16
- "summary": "List products with pagination and filtering",
17
- "description": "Retrieve a paginated list of products. Supports filtering by status, vendor, tags, category, collection, and search.",
16
+ "summary": "Get a list of products",
18
17
  "query_params": [
19
- { "name": "limit", "type": "number", "required": false, "default": 10, "description": "Number of products per page" },
20
- { "name": "page", "type": "number", "required": false, "default": 1, "description": "Page number for pagination" },
21
- { "name": "offset", "type": "number", "required": false, "default": 0, "description": "Offset for pagination" },
22
- { "name": "all", "type": "boolean", "required": false, "description": "Return all products (ignore pagination)" },
23
- { "name": "search", "type": "string", "required": false, "description": "Search products by title" },
24
- { "name": "status", "type": "string", "required": false, "enum": ["draft", "active", "archived"], "description": "Filter by product status" },
25
- { "name": "vendor", "type": "string", "required": false, "description": "Filter by vendor/brand name" },
26
- { "name": "categoryId", "type": "string", "required": false, "description": "Filter by category ID" },
27
- { "name": "collectionId", "type": "string", "required": false, "description": "Filter by collection ID" },
28
- { "name": "tagId", "type": "string", "required": false, "description": "Filter by tag ID" },
29
- { "name": "tags", "type": "string", "required": false, "description": "Filter by tags" },
30
- { "name": "published", "type": "boolean", "required": false, "description": "Filter by published status" },
31
- { "name": "show_variants", "type": "boolean", "required": false, "default": false, "description": "Include variant details in response" }
18
+ {
19
+ "name": "limit",
20
+ "type": "number",
21
+ "required": false,
22
+ "default": 10
23
+ },
24
+ {
25
+ "name": "all",
26
+ "type": "boolean",
27
+ "required": false
28
+ },
29
+ {
30
+ "name": "page",
31
+ "type": "number",
32
+ "required": false,
33
+ "default": 1
34
+ },
35
+ {
36
+ "name": "offset",
37
+ "type": "number",
38
+ "required": false,
39
+ "default": 0
40
+ },
41
+ {
42
+ "name": "search",
43
+ "type": "string",
44
+ "required": false
45
+ },
46
+ {
47
+ "name": "categoryId",
48
+ "type": "string",
49
+ "required": false
50
+ },
51
+ {
52
+ "name": "collectionId",
53
+ "type": "string",
54
+ "required": false
55
+ },
56
+ {
57
+ "name": "tagId",
58
+ "type": "string",
59
+ "required": false
60
+ },
61
+ {
62
+ "name": "tags",
63
+ "type": "string",
64
+ "required": false
65
+ },
66
+ {
67
+ "name": "vendor",
68
+ "type": "string",
69
+ "required": false
70
+ },
71
+ {
72
+ "name": "status",
73
+ "type": "string",
74
+ "required": false,
75
+ "enum": [
76
+ "draft",
77
+ "active",
78
+ "archived"
79
+ ]
80
+ },
81
+ {
82
+ "name": "published",
83
+ "type": "boolean",
84
+ "required": false
85
+ },
86
+ {
87
+ "name": "show_variants",
88
+ "type": "boolean",
89
+ "required": false,
90
+ "default": false
91
+ }
32
92
  ],
33
- "request_body": null,
34
- "response_schema": "ProductListResponse"
35
- },
36
- {
37
- "method": "GET",
38
- "path": "/api/v1/v1/products/:id",
39
- "controller_order": 2,
40
- "handler_name": "getProductById",
41
- "required_scope": "read_products",
42
- "summary": "Get a single product by ID",
43
- "description": "Retrieve the full details of a single product.",
44
- "path_params": [
45
- { "name": "id", "type": "string", "required": true, "description": "The product ID" }
46
- ],
47
- "query_params": [
48
- { "name": "show_variants", "type": "boolean", "required": false, "description": "Include variant details in response" }
49
- ],
50
- "request_body": null,
51
- "response_schema": "Product"
93
+ "request_body": null
52
94
  },
53
95
  {
54
96
  "method": "POST",
55
97
  "path": "/api/v1/v1/products",
56
- "controller_order": 3,
57
- "handler_name": "createProduct",
98
+ "controller_order": 2,
99
+ "handler_name": "create",
58
100
  "required_scope": "write_products",
59
101
  "summary": "Create a product",
60
- "description": "Create a product in the merchant's store. The body must be wrapped in a { product: { ... } } object.",
61
102
  "request_body": {
62
103
  "content_type": "application/json",
63
- "note": "The request body MUST be wrapped: { \"product\": { ... } }",
64
104
  "fields": [
65
- { "name": "title", "type": "string", "required": true, "description": "Product title" },
66
- { "name": "body_html", "type": "string", "required": false, "description": "HTML description" },
67
- { "name": "handle", "type": "string", "required": false, "description": "URL-friendly slug" },
68
- { "name": "product_type", "type": "string", "required": false, "description": "Product type/category" },
69
- { "name": "vendor", "type": "string", "required": false, "description": "Manufacturer/brand" },
70
- { "name": "status", "type": "string", "required": false, "enum": ["draft", "active", "archived"], "description": "Product status" },
71
- { "name": "tags", "type": "string", "required": false, "description": "Comma-separated tags" },
72
- { "name": "price", "type": "number", "required": false, "description": "Price in paise (integer)" },
73
- { "name": "compare_at_price", "type": "number", "required": false, "description": "Compare-at price in paise" },
74
- { "name": "sku", "type": "string", "required": false, "description": "Stock keeping unit" },
75
- { "name": "barcode", "type": "string", "required": false, "description": "Barcode" },
76
- { "name": "weight", "type": "number", "required": false, "description": "Weight value" },
77
- { "name": "weight_unit", "type": "string", "required": false, "description": "Weight unit (kg, g, lb, oz)" },
78
- { "name": "charge_tax", "type": "boolean", "required": false, "description": "Charge tax on this product" },
79
- { "name": "track_inventory", "type": "boolean", "required": false, "description": "Track inventory" },
80
- { "name": "is_physical_product", "type": "boolean", "required": false, "description": "Is physical product" },
81
- { "name": "seo_title", "type": "string", "required": false, "description": "SEO title" },
82
- { "name": "seo_description", "type": "string", "required": false, "description": "SEO description" },
83
- { "name": "categoryId", "type": "string", "required": false, "description": "Category ID" },
84
- { "name": "collectionIds", "type": "string[]", "required": false, "description": "Collection IDs" },
85
- { "name": "tagIds", "type": "string[]", "required": false, "description": "Tag IDs" },
86
- { "name": "metadata", "type": "object", "required": false, "description": "Additional metadata" }
105
+ {
106
+ "name": "product",
107
+ "type": "object",
108
+ "required": true
109
+ }
87
110
  ]
88
- },
89
- "response_schema": "Product"
111
+ }
112
+ },
113
+ {
114
+ "method": "GET",
115
+ "path": "/api/v1/v1/products/:id",
116
+ "controller_order": 3,
117
+ "handler_name": "findOne",
118
+ "required_scope": "read_products",
119
+ "summary": "Get a single product by ID",
120
+ "query_params": [
121
+ {
122
+ "name": "show_variants",
123
+ "type": "boolean",
124
+ "required": false
125
+ }
126
+ ],
127
+ "path_params": [
128
+ {
129
+ "name": "id",
130
+ "type": "string",
131
+ "required": true
132
+ }
133
+ ],
134
+ "request_body": null
90
135
  },
91
136
  {
92
137
  "method": "PUT",
93
138
  "path": "/api/v1/v1/products/:id",
94
139
  "controller_order": 4,
95
- "handler_name": "updateProduct",
140
+ "handler_name": "update",
96
141
  "required_scope": "write_products",
97
142
  "summary": "Update a product",
98
- "description": "Update product fields. Only provided fields are modified.",
99
143
  "path_params": [
100
- { "name": "id", "type": "string", "required": true, "description": "The product ID to update" }
144
+ {
145
+ "name": "id",
146
+ "type": "string",
147
+ "required": true
148
+ }
101
149
  ],
102
150
  "request_body": {
103
151
  "content_type": "application/json",
104
152
  "fields": [
105
- { "name": "title", "type": "string", "required": false },
106
- { "name": "body_html", "type": "string", "required": false },
107
- { "name": "handle", "type": "string", "required": false },
108
- { "name": "product_type", "type": "string", "required": false },
109
- { "name": "vendor", "type": "string", "required": false },
110
- { "name": "status", "type": "string", "required": false, "enum": ["draft", "active", "archived"] },
111
- { "name": "tags", "type": "string", "required": false },
112
- { "name": "price", "type": "number", "required": false },
113
- { "name": "compare_at_price", "type": "number", "required": false },
114
- { "name": "sku", "type": "string", "required": false },
115
- { "name": "barcode", "type": "string", "required": false },
116
- { "name": "weight", "type": "number", "required": false },
117
- { "name": "weight_unit", "type": "string", "required": false },
118
- { "name": "seo_title", "type": "string", "required": false },
119
- { "name": "seo_description", "type": "string", "required": false },
120
- { "name": "categoryId", "type": "string", "required": false },
121
- { "name": "collectionIds", "type": "string[]", "required": false },
122
- { "name": "tagIds", "type": "string[]", "required": false },
123
- { "name": "metadata", "type": "object", "required": false }
153
+ {
154
+ "name": "title",
155
+ "type": "string",
156
+ "required": false,
157
+ "description": "The title of the product"
158
+ },
159
+ {
160
+ "name": "body_html",
161
+ "type": "string",
162
+ "required": false,
163
+ "description": "HTML description of the product"
164
+ },
165
+ {
166
+ "name": "handle",
167
+ "type": "string",
168
+ "required": false,
169
+ "description": "URL-friendly slug for the product"
170
+ },
171
+ {
172
+ "name": "product_type",
173
+ "type": "string",
174
+ "required": false,
175
+ "description": "The type of product"
176
+ },
177
+ {
178
+ "name": "vendor",
179
+ "type": "string",
180
+ "required": false,
181
+ "description": "The manufacturer or brand of the product"
182
+ },
183
+ {
184
+ "name": "published_at",
185
+ "type": "object",
186
+ "required": false,
187
+ "description": "The date and time when the product was published"
188
+ },
189
+ {
190
+ "name": "publishedAt",
191
+ "type": "object",
192
+ "required": false,
193
+ "description": "The specific date and time when the product was published"
194
+ },
195
+ {
196
+ "name": "template_suffix",
197
+ "type": "object",
198
+ "required": false,
199
+ "description": "The template suffix"
200
+ },
201
+ {
202
+ "name": "published_scope",
203
+ "type": "string",
204
+ "required": false,
205
+ "description": "The published scope",
206
+ "default": "web"
207
+ },
208
+ {
209
+ "name": "tags",
210
+ "type": "string",
211
+ "required": false,
212
+ "description": "The tags of the product, comma-separated"
213
+ },
214
+ {
215
+ "name": "status",
216
+ "type": "string",
217
+ "required": false,
218
+ "description": "The current status of the product",
219
+ "enum": [
220
+ "draft",
221
+ "active",
222
+ "archived"
223
+ ],
224
+ "default": "draft"
225
+ },
226
+ {
227
+ "name": "metadata",
228
+ "type": "object",
229
+ "required": false,
230
+ "description": "Additional flexible metadata for the product"
231
+ },
232
+ {
233
+ "name": "seo_title",
234
+ "type": "string",
235
+ "required": false,
236
+ "description": "SEO title for the product"
237
+ },
238
+ {
239
+ "name": "seo_url_handle",
240
+ "type": "string",
241
+ "required": false,
242
+ "description": "SEO URL handle (can be different from the product handle)"
243
+ },
244
+ {
245
+ "name": "seo_description",
246
+ "type": "string",
247
+ "required": false,
248
+ "description": "SEO description for the product"
249
+ },
250
+ {
251
+ "name": "price",
252
+ "type": "number",
253
+ "required": false,
254
+ "description": "The price of the product in paise (integer)"
255
+ },
256
+ {
257
+ "name": "compare_at_price",
258
+ "type": "number",
259
+ "required": false,
260
+ "description": "The compare-at price of the product in paise (integer)"
261
+ },
262
+ {
263
+ "name": "cost_per_item",
264
+ "type": "number",
265
+ "required": false,
266
+ "description": "The cost per item for profit calculations in paise (integer)"
267
+ },
268
+ {
269
+ "name": "profit",
270
+ "type": "number",
271
+ "required": false,
272
+ "description": "The profit for this product in paise (integer)"
273
+ },
274
+ {
275
+ "name": "margin",
276
+ "type": "number",
277
+ "required": false,
278
+ "description": "The profit margin percentage for this product"
279
+ },
280
+ {
281
+ "name": "charge_tax",
282
+ "type": "boolean",
283
+ "required": false,
284
+ "description": "Whether to charge tax on this product",
285
+ "default": true
286
+ },
287
+ {
288
+ "name": "track_inventory",
289
+ "type": "boolean",
290
+ "required": false,
291
+ "description": "Whether to track inventory for this product",
292
+ "default": true
293
+ },
294
+ {
295
+ "name": "continue_selling_out_of_stock",
296
+ "type": "boolean",
297
+ "required": false,
298
+ "description": "Whether to continue selling when out of stock",
299
+ "default": false
300
+ },
301
+ {
302
+ "name": "has_sku_or_barcode",
303
+ "type": "boolean",
304
+ "required": false,
305
+ "description": "Whether this product has SKU or barcode",
306
+ "default": false
307
+ },
308
+ {
309
+ "name": "sku",
310
+ "type": "string",
311
+ "required": false,
312
+ "description": "The SKU (Stock Keeping Unit) of the product"
313
+ },
314
+ {
315
+ "name": "barcode",
316
+ "type": "string",
317
+ "required": false,
318
+ "description": "The barcode (ISBN, UPC, GTIN, etc.) of the product"
319
+ },
320
+ {
321
+ "name": "is_physical_product",
322
+ "type": "boolean",
323
+ "required": false,
324
+ "description": "Whether the product is a physical product",
325
+ "default": true
326
+ },
327
+ {
328
+ "name": "is_deleted",
329
+ "type": "boolean",
330
+ "required": false,
331
+ "description": "Whether the product is marked for deletion",
332
+ "default": false
333
+ },
334
+ {
335
+ "name": "weight",
336
+ "type": "number",
337
+ "required": false,
338
+ "description": "The weight of the product"
339
+ },
340
+ {
341
+ "name": "weight_unit",
342
+ "type": "string",
343
+ "required": false,
344
+ "description": "The unit of weight measurement"
345
+ },
346
+ {
347
+ "name": "country_of_origin",
348
+ "type": "string",
349
+ "required": false,
350
+ "description": "The country or region of origin"
351
+ },
352
+ {
353
+ "name": "hs_code",
354
+ "type": "string",
355
+ "required": false,
356
+ "description": "The Harmonized System (HS) code for tax classification"
357
+ },
358
+ {
359
+ "name": "external_id",
360
+ "type": "string",
361
+ "required": false,
362
+ "description": "External identifier for the product from external systems"
363
+ },
364
+ {
365
+ "name": "shop_location",
366
+ "type": "string",
367
+ "required": false,
368
+ "description": "The shop location where the product is available"
369
+ },
370
+ {
371
+ "name": "warehouseQt",
372
+ "type": "object[]",
373
+ "required": false,
374
+ "description": "Warehouse quantities for inventory tracking"
375
+ },
376
+ {
377
+ "name": "sales_channel",
378
+ "type": "string[]",
379
+ "required": false,
380
+ "description": "The sales channels where the product is available"
381
+ },
382
+ {
383
+ "name": "categoryId",
384
+ "type": "string",
385
+ "required": false,
386
+ "description": "The category ID this product belongs to (UUID or Shopify GID)"
387
+ },
388
+ {
389
+ "name": "collectionIds",
390
+ "type": "string[]",
391
+ "required": false,
392
+ "description": "Array of collection IDs this product belongs to"
393
+ },
394
+ {
395
+ "name": "tagIds",
396
+ "type": "string[]",
397
+ "required": false,
398
+ "description": "Array of tag IDs associated with this product"
399
+ },
400
+ {
401
+ "name": "variants",
402
+ "type": "array",
403
+ "required": false,
404
+ "description": "Product variants"
405
+ },
406
+ {
407
+ "name": "options",
408
+ "type": "array",
409
+ "required": false,
410
+ "description": "Product options (like size, color)"
411
+ },
412
+ {
413
+ "name": "images",
414
+ "type": "array",
415
+ "required": false,
416
+ "description": "Product images"
417
+ },
418
+ {
419
+ "name": "product_category",
420
+ "type": "string",
421
+ "required": false,
422
+ "description": "Product category taxonomy information"
423
+ },
424
+ {
425
+ "name": "metafields",
426
+ "type": "array",
427
+ "required": false,
428
+ "description": "Metafields for the product"
429
+ }
124
430
  ]
125
- },
126
- "response_schema": "Product"
431
+ }
127
432
  },
128
433
  {
129
434
  "method": "DELETE",
130
435
  "path": "/api/v1/v1/products/:id",
131
436
  "controller_order": 5,
132
- "handler_name": "deleteProduct",
437
+ "handler_name": "remove",
133
438
  "required_scope": "write_products",
134
439
  "summary": "Delete a product",
135
- "description": "Permanently delete a product from the merchant's store.",
136
440
  "path_params": [
137
- { "name": "id", "type": "string", "required": true, "description": "The product ID to delete" }
441
+ {
442
+ "name": "id",
443
+ "type": "string",
444
+ "required": true
445
+ }
138
446
  ],
139
- "request_body": null,
140
- "response_schema": null
141
- }
142
- ],
143
- "schemas": {
144
- "Product": {
145
- "id": "string — unique product identifier (UUID)",
146
- "title": "string — product title",
147
- "body_html": "string | null — HTML description",
148
- "handle": "string — URL-friendly slug",
149
- "product_type": "string | null — product type/category",
150
- "vendor": "string | null — vendor/brand name",
151
- "status": "'draft' | 'active' | 'archived'",
152
- "tags": "string — comma-separated tags",
153
- "price": "number — price in paise",
154
- "compare_at_price": "number | null — compare-at price in paise",
155
- "sku": "string | null — stock keeping unit",
156
- "barcode": "string | null — barcode",
157
- "weight": "number | null — weight value",
158
- "weight_unit": "string | null — weight unit",
159
- "published_at": "string | null — ISO 8601 timestamp",
160
- "created_at": "string — ISO 8601 timestamp",
161
- "updated_at": "string — ISO 8601 timestamp",
162
- "variants": "Variant[] — product variants (when show_variants=true)",
163
- "images": "Image[] — product images"
447
+ "request_body": null
164
448
  }
165
- },
166
- "statuses": ["draft", "active", "archived"]
449
+ ]
167
450
  }