fix audit report mismatches across backend and android

This commit is contained in:
2026-04-07 16:06:44 -06:00
parent 0173123898
commit 4500b213c6
22 changed files with 586 additions and 157 deletions

View File

@@ -3748,6 +3748,267 @@
}
]
},
{
"name": "Customers Alias (/api/v1/customers)",
"item": [
{
"name": "List Customers - staff 200",
"request": {
"method": "GET",
"url": "{{baseUrl}}/api/v1/customers",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{staffToken}}",
"type": "text"
}
]
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 200', function () {",
" pm.response.to.have.status(200);",
"});"
]
}
}
]
},
{
"name": "List Customers - admin 200",
"request": {
"method": "GET",
"url": "{{baseUrl}}/api/v1/customers",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
]
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 200', function () {",
" pm.response.to.have.status(200);",
"});"
]
}
}
]
},
{
"name": "List Customers - customer 403",
"request": {
"method": "GET",
"url": "{{baseUrl}}/api/v1/customers",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{customerToken}}",
"type": "text"
}
]
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 403', function () {",
" pm.response.to.have.status(403);",
"});"
]
}
}
]
},
{
"name": "Get Customer - staff 200",
"request": {
"method": "GET",
"url": "{{baseUrl}}/api/v1/customers/{{customerId}}",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{staffToken}}",
"type": "text"
}
]
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 200', function () {",
" pm.response.to.have.status(200);",
"});"
]
}
}
]
},
{
"name": "Get Customer - admin 200",
"request": {
"method": "GET",
"url": "{{baseUrl}}/api/v1/customers/{{customerId}}",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
]
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 200', function () {",
" pm.response.to.have.status(200);",
"});"
]
}
}
]
},
{
"name": "Create Customer - admin 201",
"request": {
"method": "POST",
"url": "{{baseUrl}}/api/v1/customers",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"firstName\": \"Alias\",\n \"lastName\": \"Customer\",\n \"email\": \"alias.cust@example.com\",\n \"password\": \"Test1234!\",\n \"role\": \"CUSTOMER\"\n}"
}
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 201', function () {",
" pm.response.to.have.status(201);",
"});"
]
}
}
]
},
{
"name": "Update Customer - admin 200",
"request": {
"method": "PUT",
"url": "{{baseUrl}}/api/v1/customers/{{customerId}}",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"firstName\": \"AliasUpdated\"\n}"
}
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 200', function () {",
" pm.response.to.have.status(200);",
"});"
]
}
}
]
},
{
"name": "Delete Customer - admin 204",
"request": {
"method": "DELETE",
"url": "{{baseUrl}}/api/v1/customers/{{customerId}}",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
]
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 204', function () {",
" pm.response.to.have.status(204);",
"});"
]
}
}
]
}
]
},
{
"name": "Users",
"item": [
@@ -4295,6 +4556,205 @@
}
]
},
{
"name": "Employees Alias (/api/v1/employees)",
"item": [
{
"name": "List Employees - admin 200",
"request": {
"method": "GET",
"url": "{{baseUrl}}/api/v1/employees",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
]
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 200', function () {",
" pm.response.to.have.status(200);",
"});"
]
}
}
]
},
{
"name": "List Employees - staff 403",
"request": {
"method": "GET",
"url": "{{baseUrl}}/api/v1/employees",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{staffToken}}",
"type": "text"
}
]
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 403', function () {",
" pm.response.to.have.status(403);",
"});"
]
}
}
]
},
{
"name": "Get Employee - admin 200",
"request": {
"method": "GET",
"url": "{{baseUrl}}/api/v1/employees/{{employeeId}}",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
]
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 200', function () {",
" pm.response.to.have.status(200);",
"});"
]
}
}
]
},
{
"name": "Create Employee - admin 201",
"request": {
"method": "POST",
"url": "{{baseUrl}}/api/v1/employees",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"firstName\": \"Alias\",\n \"lastName\": \"Employee\",\n \"email\": \"alias.staff@example.com\",\n \"password\": \"Test1234!\",\n \"role\": \"STAFF\"\n}"
}
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 201', function () {",
" pm.response.to.have.status(201);",
"});"
]
}
}
]
},
{
"name": "Update Employee - admin 200",
"request": {
"method": "PUT",
"url": "{{baseUrl}}/api/v1/employees/{{employeeId}}",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"firstName\": \"AliasUpdated\"\n}"
}
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 200', function () {",
" pm.response.to.have.status(200);",
"});"
]
}
}
]
},
{
"name": "Delete Employee - admin 204",
"request": {
"method": "DELETE",
"url": "{{baseUrl}}/api/v1/employees/{{employeeId}}",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Authorization",
"value": "Bearer {{adminToken}}",
"type": "text"
}
]
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('Status code is 204', function () {",
" pm.response.to.have.status(204);",
"});"
]
}
}
]
}
]
},
{
"name": "Stores",
"item": [
@@ -5583,4 +6043,4 @@
]
}
]
}
}