feat(seo): generate slugs for brands, categories and products, add GET /sitemap and the Postman collection

This commit is contained in:
MastersGame
2026-11-14 11:08:51 +01:00
parent d07c4df52d
commit 657e8a6b30
26 changed files with 750 additions and 12 deletions

View File

@@ -0,0 +1,3 @@
$kind: collection
variables:
baseUrl: "http://localhost:3000"

View File

@@ -0,0 +1,21 @@
$kind: http-example
request:
url: "{{baseUrl}}/sitemap"
method: GET
headers:
Accept: application/json
response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json; charset=utf-8
Cache-Control: public, max-age=600
body:
type: json
content: |
{
"brands": [{ "slug": "stray-kids", "updatedAt": "2026-11-08T10:00:00.000Z" }],
"categories": [{ "slug": "albums", "updatedAt": "2026-11-08T10:00:00.000Z" }],
"products": [{ "slug": "ate-digipack", "updatedAt": "2026-11-08T10:00:00.000Z" }]
}
order: 1000

View File

@@ -0,0 +1,16 @@
$kind: http-example
request:
url: "{{baseUrl}}/sync"
method: POST
headers:
Accept: application/json
response:
statusCode: 503
statusText: Service Unavailable
headers:
Content-Type: application/json; charset=utf-8
body:
type: json
content: |
{ "message": "This instance is shutting down, retry in a moment", "error": "Service Unavailable", "statusCode": 503 }
order: 4000

View File

@@ -0,0 +1,17 @@
$kind: http-example
request:
url: "{{baseUrl}}/sync"
method: POST
headers:
Accept: application/json
response:
statusCode: 429
statusText: Too Many Requests
headers:
Content-Type: application/json; charset=utf-8
Retry-After: "30"
body:
type: json
content: |
{ "statusCode": 429, "message": "ThrottlerException: Too Many Requests" }
order: 3000

View File

@@ -0,0 +1,16 @@
$kind: http-example
request:
url: "{{baseUrl}}/sync"
method: POST
headers:
Accept: application/json
response:
statusCode: 409
statusText: Conflict
headers:
Content-Type: application/json; charset=utf-8
body:
type: json
content: |
{ "message": "A Hiboutik synchronization is already in progress", "error": "Conflict", "statusCode": 409 }
order: 2000

View File

@@ -0,0 +1,16 @@
$kind: http-example
request:
url: "{{baseUrl}}/sync"
method: POST
headers:
Accept: application/json
response:
statusCode: 202
statusText: Accepted
headers:
Content-Type: application/json; charset=utf-8
body:
type: json
content: |
{ "message": "Hiboutik synchronization started" }
order: 1000

View File

@@ -0,0 +1,16 @@
$kind: http-example
request:
url: "{{baseUrl}}/sync"
method: POST
headers:
Accept: application/json
response:
statusCode: 500
statusText: Internal Server Error
headers:
Content-Type: application/json; charset=utf-8
body:
type: json
content: |
{ "message": "Internal Server Error", "statusCode": 500 }
order: 5000