{ "openapi": "3.1.0", "info": { "title": "Laravel", "version": "0.0.1" }, "servers": [ { "url": "http://localhost/api" } ], "security": [ { "http": [] } ], "paths": { "/audit-logs": { "get": { "operationId": "auditLog.index", "tags": [ "AuditLog" ], "parameters": [ { "name": "module", "in": "query", "description": "Filter berdasarkan nama modul audit.", "schema": { "type": [ "string", "null" ], "maxLength": 100 } }, { "name": "action", "in": "query", "description": "Filter berdasarkan nama action audit.", "schema": { "type": [ "string", "null" ], "maxLength": 100 } }, { "name": "user_id", "in": "query", "description": "Filter berdasarkan ID user pelaku.", "schema": { "type": [ "integer", "null" ] } }, { "name": "tenant_id", "in": "query", "description": "Filter berdasarkan ID tenant.", "schema": { "type": [ "integer", "null" ] } }, { "name": "page", "in": "query", "description": "Nomor halaman yang ingin diambil.", "schema": { "type": [ "integer", "null" ], "minimum": 1 } }, { "name": "per_page", "in": "query", "description": "Jumlah data per halaman, maksimal 100.", "schema": { "type": [ "integer", "null" ], "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Data audit log berhasil diambil" }, "data": { "type": "string" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/audit-logs/{id}": { "get": { "operationId": "auditLog.show", "tags": [ "AuditLog" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Detail audit log berhasil diambil" }, "data": { "$ref": "#/components/schemas/AuditLogResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/login": { "post": { "operationId": "auth.login", "tags": [ "Auth" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "login": { "type": "string" }, "password": { "type": "string" } }, "required": [ "login", "password" ] } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "token": { "type": "string" }, "user": { "anyOf": [ { "$ref": "#/components/schemas/User" }, { "type": "null" } ] } }, "required": [ "success", "token", "user" ] } } } }, "403": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "const": "Akun belum aktif. Silakan verifikasi terlebih dahulu." } }, "required": [ "success", "message" ] } } } }, "401": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "const": "Username/email atau password salah." } }, "required": [ "success", "message" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } }, "security": [] } }, "/register": { "post": { "operationId": "auth.register", "tags": [ "Auth" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "const": "Register berhasil, silakan verifikasi kode." }, "data": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" }, "verification": { "type": "object", "properties": { "channel": { "type": [ "string", "null" ] }, "target": { "type": [ "string", "null" ] }, "code": { "type": "string" }, "expires_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "channel", "target", "code", "expires_at" ] } }, "required": [ "user", "verification" ] } }, "required": [ "success", "message", "data" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } }, "security": [] } }, "/register/verify": { "post": { "operationId": "auth.verifyRegistration", "tags": [ "Auth" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyRegistrationRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "const": "Verifikasi berhasil, user sudah aktif." }, "data": { "$ref": "#/components/schemas/User" } }, "required": [ "success", "message", "data" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } }, "security": [] } }, "/register/resend-code": { "post": { "operationId": "auth.resendVerificationCode", "tags": [ "Auth" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResendVerificationCodeRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string", "const": "Kode verifikasi baru berhasil dibuat." }, "data": { "type": "object", "properties": { "verification": { "type": "object", "properties": { "channel": { "type": [ "string", "null" ] }, "target": { "type": [ "string", "null" ] }, "code": { "type": "string" }, "expires_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "channel", "target", "code", "expires_at" ] } }, "required": [ "verification" ] } }, "required": [ "success", "message", "data" ] } } } }, "422": { "$ref": "#/components/responses/ValidationException" } }, "security": [] } }, "/materials": { "get": { "operationId": "material.index", "tags": [ "Material" ], "parameters": [ { "name": "search", "in": "query", "description": "Kata kunci untuk mencari barcode atau nama material.", "schema": { "type": [ "string", "null" ], "maxLength": 255 } }, { "name": "user_id", "in": "query", "description": "Filter material berdasarkan ID user/teknisi.", "schema": { "type": [ "integer", "null" ] } }, { "name": "type", "in": "query", "description": "Filter jenis material.", "schema": { "type": [ "string", "null" ], "enum": [ "serialized", "consumable" ] } }, { "name": "status", "in": "query", "description": "Filter status material.", "schema": { "type": [ "string", "null" ], "maxLength": 50 } }, { "name": "page", "in": "query", "description": "Nomor halaman yang ingin diambil.", "schema": { "type": [ "integer", "null" ], "minimum": 1 } }, { "name": "per_page", "in": "query", "description": "Jumlah data per halaman, maksimal 100.", "schema": { "type": [ "integer", "null" ], "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "List material user berhasil diambil" }, "data": { "type": "string" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/materials/assign": { "post": { "operationId": "material.assign", "tags": [ "Material" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignMaterialRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 201 }, "message": { "type": "string", "const": "Material berhasil di-assign" }, "data": { "$ref": "#/components/schemas/MaterialResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/materials/transfer": { "post": { "operationId": "material.transfer", "tags": [ "Material" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferMaterialRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Material berhasil di-transfer" }, "data": { "$ref": "#/components/schemas/MaterialResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/materials/return": { "post": { "operationId": "material.return", "tags": [ "Material" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReturnMaterialRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Material berhasil direturn" }, "data": { "$ref": "#/components/schemas/MaterialResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/materials/user/{user_id}": { "get": { "operationId": "material.listByUser", "tags": [ "Material" ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "List material user berhasil diambil" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/MaterialResource" } } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/materials/history/{barcode_id}": { "get": { "operationId": "material.history", "tags": [ "Material" ], "parameters": [ { "name": "barcode_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "History material berhasil diambil" }, "data": { "type": "string" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/me/menus": { "get": { "operationId": "menu.myMenus", "tags": [ "Menu" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Menu berhasil diambil" }, "data": { "type": "object", "properties": { "is_master": { "type": "boolean" }, "access_level": { "type": "string" }, "tenant_id": { "type": "string" }, "menus": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "parent_id": { "type": "string" }, "name": { "type": "string" }, "slug": { "type": "string" }, "url": { "type": "string" }, "icon": { "type": "string" }, "component": { "type": "string" }, "sort_order": { "type": "string" }, "permissions": { "type": "string" }, "children": { "type": "array", "items": {} } }, "required": [ "id", "parent_id", "name", "slug", "url", "icon", "component", "sort_order", "permissions", "children" ] } } }, "required": [ "is_master", "access_level", "tenant_id", "menus" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/menu-groups": { "get": { "operationId": "menu-groups.index", "tags": [ "MenuGroup" ], "parameters": [ { "name": "search", "in": "query", "description": "Kata kunci untuk mencari nama atau deskripsi menu group.", "schema": { "type": [ "string", "null" ], "maxLength": 255 } }, { "name": "is_active", "in": "query", "description": "Filter status aktif menu group.", "schema": { "type": [ "boolean", "null" ] } }, { "name": "page", "in": "query", "description": "Nomor halaman yang ingin diambil.", "schema": { "type": [ "integer", "null" ], "minimum": 1 } }, { "name": "per_page", "in": "query", "description": "Jumlah data per halaman, maksimal 100.", "schema": { "type": [ "integer", "null" ], "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Data Menu Group berhasil diambil" }, "data": { "type": "object", "properties": { "current_page": { "type": "integer", "minimum": 1 }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/MenuGroup" } }, "first_page_url": { "type": [ "string", "null" ] }, "from": { "type": [ "integer", "null" ], "minimum": 1 }, "last_page_url": { "type": [ "string", "null" ] }, "last_page": { "type": "integer", "minimum": 1 }, "links": { "type": "array", "description": "Generated paginator links.", "items": { "type": "object", "properties": { "url": { "type": [ "string", "null" ] }, "label": { "type": "string" }, "active": { "type": "boolean" } }, "required": [ "url", "label", "active" ] } }, "next_page_url": { "type": [ "string", "null" ] }, "path": { "type": [ "string", "null" ], "description": "Base path for paginator generated URLs." }, "per_page": { "type": "integer", "description": "Number of items shown per page.", "minimum": 0 }, "prev_page_url": { "type": [ "string", "null" ] }, "to": { "type": [ "integer", "null" ], "description": "Number of the last item in the slice.", "minimum": 1 }, "total": { "type": "integer", "description": "Total number of items being paginated.", "minimum": 0 } }, "required": [ "current_page", "data", "first_page_url", "from", "last_page_url", "last_page", "links", "next_page_url", "path", "per_page", "prev_page_url", "to", "total" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "post": { "operationId": "menu-groups.store", "tags": [ "MenuGroup" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreMenuGroupRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 201 }, "message": { "type": "string", "const": "Menu Group berhasil dibuat" }, "data": { "$ref": "#/components/schemas/MenuGroupResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/menu-groups/{menu_group}": { "get": { "operationId": "menu-groups.show", "tags": [ "MenuGroup" ], "parameters": [ { "name": "menu_group", "in": "path", "required": true, "description": "The menu group ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Detail Menu Group berhasil diambil" }, "data": { "$ref": "#/components/schemas/MenuGroupResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "menu-groups.update", "tags": [ "MenuGroup" ], "parameters": [ { "name": "menu_group", "in": "path", "required": true, "description": "The menu group ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMenuGroupRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Menu Group berhasil diupdate" }, "data": { "$ref": "#/components/schemas/MenuGroupResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "menu-groups.destroy", "tags": [ "MenuGroup" ], "parameters": [ { "name": "menu_group", "in": "path", "required": true, "description": "The menu group ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Menu Group berhasil dihapus" } }, "required": [ "success", "code", "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/menu-groups/{menu_group}/menus": { "get": { "operationId": "menuGroup.menus", "tags": [ "MenuGroup" ], "parameters": [ { "name": "menu_group", "in": "path", "required": true, "description": "The menu group ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Mapping menu group berhasil diambil" }, "data": { "type": "object", "properties": { "menu_group_id": { "type": "integer" }, "menu_group": { "$ref": "#/components/schemas/MenuGroupResource" }, "menus": { "type": "array", "items": { "type": "object", "properties": { "menu_id": { "type": "integer" }, "parent_id": { "type": [ "integer", "null" ] }, "name": { "type": "string" }, "slug": { "type": "string" }, "url": { "type": "string" }, "icon": { "type": "string" }, "component": { "type": "string" }, "sort_order": { "type": "integer" }, "permissions": { "type": "object", "properties": { "can_view": { "type": "boolean" }, "can_create": { "type": "boolean" }, "can_update": { "type": "boolean" }, "can_delete": { "type": "boolean" }, "can_approve": { "type": "boolean" }, "can_export": { "type": "boolean" } }, "required": [ "can_view", "can_create", "can_update", "can_delete", "can_approve", "can_export" ] } }, "required": [ "menu_id", "parent_id", "name", "slug", "url", "icon", "component", "sort_order", "permissions" ] } } }, "required": [ "menu_group_id", "menu_group", "menus" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "menuGroup.syncMenus", "tags": [ "MenuGroup" ], "parameters": [ { "name": "menu_group", "in": "path", "required": true, "description": "The menu group ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncMenuGroupMenusRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Mapping menu group berhasil disimpan" }, "data": { "type": "object", "properties": { "menu_group_id": { "type": "integer" }, "menu_group": { "$ref": "#/components/schemas/MenuGroupResource" }, "menus": { "type": "array", "items": { "type": "object", "properties": { "menu_id": { "type": "integer" }, "parent_id": { "type": [ "integer", "null" ] }, "name": { "type": "string" }, "slug": { "type": "string" }, "url": { "type": "string" }, "icon": { "type": "string" }, "component": { "type": "string" }, "sort_order": { "type": "integer" }, "permissions": { "type": "object", "properties": { "can_view": { "type": "boolean" }, "can_create": { "type": "boolean" }, "can_update": { "type": "boolean" }, "can_delete": { "type": "boolean" }, "can_approve": { "type": "boolean" }, "can_export": { "type": "boolean" } }, "required": [ "can_view", "can_create", "can_update", "can_delete", "can_approve", "can_export" ] } }, "required": [ "menu_id", "parent_id", "name", "slug", "url", "icon", "component", "sort_order", "permissions" ] } } }, "required": [ "menu_group_id", "menu_group", "menus" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/menu-groups/{menu_group}/available-menus": { "get": { "operationId": "menuGroup.availableMenus", "tags": [ "MenuGroup" ], "parameters": [ { "name": "menu_group", "in": "path", "required": true, "description": "The menu group ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Daftar menu tersedia berdasarkan akses user berhasil diambil" }, "data": { "type": "object", "properties": { "menu_group_id": { "type": "integer" }, "menu_group": { "$ref": "#/components/schemas/MenuGroupResource" }, "menus": { "anyOf": [ { "type": "array", "items": { "type": "object", "properties": { "menu_id": { "type": "integer" }, "parent_id": { "type": [ "integer", "null" ] }, "name": { "type": "string" }, "sort_order": { "type": "integer" }, "permissions": { "type": "object", "properties": { "can_view": { "type": "boolean" }, "can_create": { "type": "boolean" }, "can_update": { "type": "boolean" }, "can_delete": { "type": "boolean" }, "can_approve": { "type": "boolean" }, "can_export": { "type": "boolean" } }, "required": [ "can_view", "can_create", "can_update", "can_delete", "can_approve", "can_export" ] } }, "required": [ "menu_id", "parent_id", "name", "sort_order", "permissions" ] } }, { "type": "array", "items": { "type": "object", "properties": { "menu_id": { "type": "integer" }, "parent_id": { "type": [ "integer", "null" ] }, "name": { "type": "string" }, "slug": { "type": "string" }, "url": { "type": "string" }, "icon": { "type": "string" }, "component": { "type": "string" }, "sort_order": { "type": "integer" }, "permissions": { "type": "object", "properties": { "can_view": { "type": "boolean" }, "can_create": { "type": "boolean" }, "can_update": { "type": "boolean" }, "can_delete": { "type": "boolean" }, "can_approve": { "type": "boolean" }, "can_export": { "type": "boolean" } }, "required": [ "can_view", "can_create", "can_update", "can_delete", "can_approve", "can_export" ] } }, "required": [ "menu_id", "parent_id", "name", "slug", "url", "icon", "component", "sort_order", "permissions" ] } } ] } }, "required": [ "menu_group_id", "menu_group", "menus" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "404": { "$ref": "#/components/responses/ModelNotFoundException" } } } }, "/users/{user}/menu-groups": { "get": { "operationId": "menuGroup.userAssignments", "tags": [ "MenuGroup" ], "parameters": [ { "name": "user", "in": "path", "required": true, "description": "The user ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Assignment user menu group berhasil diambil" }, "data": { "type": "object", "properties": { "user_id": { "type": "integer" }, "assignments": { "type": "array", "items": { "type": "object", "properties": { "menu_group_id": { "type": "integer" }, "menu_group_name": { "type": "string" }, "menu_group_is_active": { "type": "boolean" }, "tenant_id": { "type": [ "integer", "null" ] }, "tenant_name": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "menu_group_id", "menu_group_name", "menu_group_is_active", "tenant_id", "tenant_name", "created_at", "updated_at" ] } } }, "required": [ "user_id", "assignments" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "403": { "description": "An error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Error overview.", "example": "" } }, "required": [ "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "menuGroup.syncUserAssignments", "tags": [ "MenuGroup" ], "parameters": [ { "name": "user", "in": "path", "required": true, "description": "The user ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SyncUserMenuGroupsRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Assignment user menu group berhasil disimpan" }, "data": { "type": "object", "properties": { "user_id": { "type": "integer" }, "assignments": { "type": "array", "items": { "type": "object", "properties": { "menu_group_id": { "type": "integer" }, "menu_group_name": { "type": "string" }, "menu_group_is_active": { "type": "boolean" }, "tenant_id": { "type": [ "integer", "null" ] }, "tenant_name": { "type": "string" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": [ "menu_group_id", "menu_group_name", "menu_group_is_active", "tenant_id", "tenant_name", "created_at", "updated_at" ] } } }, "required": [ "user_id", "assignments" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "403": { "description": "An error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Error overview.", "example": "" } }, "required": [ "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/menus": { "get": { "operationId": "menus.index", "tags": [ "MenuList" ], "parameters": [ { "name": "search", "in": "query", "description": "Kata kunci untuk mencari nama, slug, atau URL menu.", "schema": { "type": [ "string", "null" ], "maxLength": 255 } }, { "name": "is_active", "in": "query", "description": "Filter status aktif menu.", "schema": { "type": [ "boolean", "null" ] } }, { "name": "page", "in": "query", "description": "Nomor halaman yang ingin diambil.", "schema": { "type": [ "integer", "null" ], "minimum": 1 } }, { "name": "per_page", "in": "query", "description": "Jumlah data per halaman, maksimal 100.", "schema": { "type": [ "integer", "null" ], "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Data Menu List berhasil diambil" }, "data": { "type": "object", "properties": { "current_page": { "type": "integer", "minimum": 1 }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/MenuList" } }, "first_page_url": { "type": [ "string", "null" ] }, "from": { "type": [ "integer", "null" ], "minimum": 1 }, "last_page_url": { "type": [ "string", "null" ] }, "last_page": { "type": "integer", "minimum": 1 }, "links": { "type": "array", "description": "Generated paginator links.", "items": { "type": "object", "properties": { "url": { "type": [ "string", "null" ] }, "label": { "type": "string" }, "active": { "type": "boolean" } }, "required": [ "url", "label", "active" ] } }, "next_page_url": { "type": [ "string", "null" ] }, "path": { "type": [ "string", "null" ], "description": "Base path for paginator generated URLs." }, "per_page": { "type": "integer", "description": "Number of items shown per page.", "minimum": 0 }, "prev_page_url": { "type": [ "string", "null" ] }, "to": { "type": [ "integer", "null" ], "description": "Number of the last item in the slice.", "minimum": 1 }, "total": { "type": "integer", "description": "Total number of items being paginated.", "minimum": 0 } }, "required": [ "current_page", "data", "first_page_url", "from", "last_page_url", "last_page", "links", "next_page_url", "path", "per_page", "prev_page_url", "to", "total" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "post": { "operationId": "menus.store", "tags": [ "MenuList" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreMenuListRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 201 }, "message": { "type": "string", "const": "Menu List berhasil dibuat" }, "data": { "$ref": "#/components/schemas/MenuListResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/menus/{menu_list}": { "get": { "operationId": "menus.show", "tags": [ "MenuList" ], "parameters": [ { "name": "menu_list", "in": "path", "required": true, "description": "The menu list ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Detail Menu List berhasil diambil" }, "data": { "$ref": "#/components/schemas/MenuListResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "menus.update", "tags": [ "MenuList" ], "parameters": [ { "name": "menu_list", "in": "path", "required": true, "description": "The menu list ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMenuListRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Menu List berhasil diupdate" }, "data": { "$ref": "#/components/schemas/MenuListResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "menus.destroy", "tags": [ "MenuList" ], "parameters": [ { "name": "menu_list", "in": "path", "required": true, "description": "The menu list ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Menu List berhasil dihapus" } }, "required": [ "success", "code", "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/me/profile": { "get": { "operationId": "profile.show", "tags": [ "Profile" ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Profile berhasil diambil" }, "data": { "$ref": "#/components/schemas/UserResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "profile.update", "tags": [ "Profile" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProfileRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Profile berhasil diperbarui" }, "data": { "$ref": "#/components/schemas/UserResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tenants": { "get": { "operationId": "tenants.index", "tags": [ "Tenant" ], "parameters": [ { "name": "search", "in": "query", "description": "Kata kunci untuk mencari kode, nama, atau email tenant.", "schema": { "type": [ "string", "null" ], "maxLength": 255 } }, { "name": "status", "in": "query", "description": "Filter status tenant.", "schema": { "type": [ "string", "null" ], "enum": [ "active", "inactive" ] } }, { "name": "page", "in": "query", "description": "Nomor halaman yang ingin diambil.", "schema": { "type": [ "integer", "null" ], "minimum": 1 } }, { "name": "per_page", "in": "query", "description": "Jumlah data per halaman, maksimal 100.", "schema": { "type": [ "integer", "null" ], "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Data Tenant berhasil diambil" }, "data": { "type": "object", "properties": { "current_page": { "type": "integer", "minimum": 1 }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Tenant" } }, "first_page_url": { "type": [ "string", "null" ] }, "from": { "type": [ "integer", "null" ], "minimum": 1 }, "last_page_url": { "type": [ "string", "null" ] }, "last_page": { "type": "integer", "minimum": 1 }, "links": { "type": "array", "description": "Generated paginator links.", "items": { "type": "object", "properties": { "url": { "type": [ "string", "null" ] }, "label": { "type": "string" }, "active": { "type": "boolean" } }, "required": [ "url", "label", "active" ] } }, "next_page_url": { "type": [ "string", "null" ] }, "path": { "type": [ "string", "null" ], "description": "Base path for paginator generated URLs." }, "per_page": { "type": "integer", "description": "Number of items shown per page.", "minimum": 0 }, "prev_page_url": { "type": [ "string", "null" ] }, "to": { "type": [ "integer", "null" ], "description": "Number of the last item in the slice.", "minimum": 1 }, "total": { "type": "integer", "description": "Total number of items being paginated.", "minimum": 0 } }, "required": [ "current_page", "data", "first_page_url", "from", "last_page_url", "last_page", "links", "next_page_url", "path", "per_page", "prev_page_url", "to", "total" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "post": { "operationId": "tenants.store", "tags": [ "Tenant" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreTenantRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 201 }, "message": { "type": "string", "const": "Tenant berhasil dibuat" }, "data": { "$ref": "#/components/schemas/TenantResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tenants/{tenant}": { "get": { "operationId": "tenants.show", "tags": [ "Tenant" ], "parameters": [ { "name": "tenant", "in": "path", "required": true, "description": "The tenant ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Detail Tenant berhasil diambil" }, "data": { "$ref": "#/components/schemas/TenantResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "tenants.update", "tags": [ "Tenant" ], "parameters": [ { "name": "tenant", "in": "path", "required": true, "description": "The tenant ID", "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTenantRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Tenant berhasil diupdate" }, "data": { "$ref": "#/components/schemas/TenantResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "tenants.destroy", "tags": [ "Tenant" ], "parameters": [ { "name": "tenant", "in": "path", "required": true, "description": "The tenant ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Tenant berhasil dihapus" } }, "required": [ "success", "code", "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/tickets": { "get": { "operationId": "tickets.index", "tags": [ "Ticket" ], "parameters": [ { "name": "search", "in": "query", "description": "Kata kunci untuk mencari nomor, judul, atau deskripsi ticket.", "schema": { "type": [ "string", "null" ], "maxLength": 255 } }, { "name": "status", "in": "query", "description": "Filter berdasarkan status ticket.", "schema": { "type": [ "string", "null" ], "enum": [ "draft", "open", "approved", "assigned", "progress", "pending", "resolved", "closed", "cancelled", "rejected" ] } }, { "name": "priority", "in": "query", "description": "Filter berdasarkan prioritas ticket.", "schema": { "type": [ "string", "null" ], "enum": [ "low", "medium", "high", "critical" ] } }, { "name": "ticket_type_id", "in": "query", "description": "Filter berdasarkan ID tipe ticket.", "schema": { "type": [ "integer", "null" ] } }, { "name": "customer_id", "in": "query", "description": "Filter berdasarkan ID customer.", "schema": { "type": [ "integer", "null" ] } }, { "name": "page", "in": "query", "description": "Nomor halaman yang ingin diambil.", "schema": { "type": [ "integer", "null" ], "minimum": 1 } }, { "name": "per_page", "in": "query", "description": "Jumlah data per halaman, maksimal 100.", "schema": { "type": [ "integer", "null" ], "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Data Ticket berhasil diambil" }, "data": { "type": "object", "properties": { "current_page": { "type": "integer", "minimum": 1 }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/Ticket" } }, "first_page_url": { "type": [ "string", "null" ] }, "from": { "type": [ "integer", "null" ], "minimum": 1 }, "last_page_url": { "type": [ "string", "null" ] }, "last_page": { "type": "integer", "minimum": 1 }, "links": { "type": "array", "description": "Generated paginator links.", "items": { "type": "object", "properties": { "url": { "type": [ "string", "null" ] }, "label": { "type": "string" }, "active": { "type": "boolean" } }, "required": [ "url", "label", "active" ] } }, "next_page_url": { "type": [ "string", "null" ] }, "path": { "type": [ "string", "null" ], "description": "Base path for paginator generated URLs." }, "per_page": { "type": "integer", "description": "Number of items shown per page.", "minimum": 0 }, "prev_page_url": { "type": [ "string", "null" ] }, "to": { "type": [ "integer", "null" ], "description": "Number of the last item in the slice.", "minimum": 1 }, "total": { "type": "integer", "description": "Total number of items being paginated.", "minimum": 0 } }, "required": [ "current_page", "data", "first_page_url", "from", "last_page_url", "last_page", "links", "next_page_url", "path", "per_page", "prev_page_url", "to", "total" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "post": { "operationId": "tickets.store", "tags": [ "Ticket" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreTicketRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 201 }, "message": { "type": "string", "const": "Ticket berhasil dibuat" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets/{ticket}": { "get": { "operationId": "tickets.show", "tags": [ "Ticket" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Success" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "tickets.update", "tags": [ "Ticket" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTicketRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket berhasil diperbarui" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "tickets.destroy", "tags": [ "Ticket" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket berhasil dibatalkan" } }, "required": [ "success", "code", "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/ticket-incident-types": { "get": { "operationId": "ticket-incident-types.index", "tags": [ "TicketIncidentType" ], "parameters": [ { "name": "search", "in": "query", "description": "Kata kunci untuk mencari nama incident type.", "schema": { "type": [ "string", "null" ], "maxLength": 255 } }, { "name": "is_active", "in": "query", "description": "Filter status aktif incident type.", "schema": { "type": [ "boolean", "null" ] } }, { "name": "page", "in": "query", "description": "Nomor halaman yang ingin diambil.", "schema": { "type": [ "integer", "null" ], "minimum": 1 } }, { "name": "per_page", "in": "query", "description": "Jumlah data per halaman, maksimal 100.", "schema": { "type": [ "integer", "null" ], "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Data Incident Type berhasil diambil" }, "data": { "type": "object", "properties": { "current_page": { "type": "integer", "minimum": 1 }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/TicketIncidentType" } }, "first_page_url": { "type": [ "string", "null" ] }, "from": { "type": [ "integer", "null" ], "minimum": 1 }, "last_page_url": { "type": [ "string", "null" ] }, "last_page": { "type": "integer", "minimum": 1 }, "links": { "type": "array", "description": "Generated paginator links.", "items": { "type": "object", "properties": { "url": { "type": [ "string", "null" ] }, "label": { "type": "string" }, "active": { "type": "boolean" } }, "required": [ "url", "label", "active" ] } }, "next_page_url": { "type": [ "string", "null" ] }, "path": { "type": [ "string", "null" ], "description": "Base path for paginator generated URLs." }, "per_page": { "type": "integer", "description": "Number of items shown per page.", "minimum": 0 }, "prev_page_url": { "type": [ "string", "null" ] }, "to": { "type": [ "integer", "null" ], "description": "Number of the last item in the slice.", "minimum": 1 }, "total": { "type": "integer", "description": "Total number of items being paginated.", "minimum": 0 } }, "required": [ "current_page", "data", "first_page_url", "from", "last_page_url", "last_page", "links", "next_page_url", "path", "per_page", "prev_page_url", "to", "total" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "post": { "operationId": "ticket-incident-types.store", "tags": [ "TicketIncidentType" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreTicketIncidentTypeRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 201 }, "message": { "type": "string", "const": "Incident Type berhasil dibuat" }, "data": { "$ref": "#/components/schemas/TicketIncidentTypeResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/ticket-incident-types/{ticketIncidentType}": { "get": { "operationId": "ticket-incident-types.show", "tags": [ "TicketIncidentType" ], "parameters": [ { "name": "ticketIncidentType", "in": "path", "required": true, "description": "The ticket incident type ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Success" }, "data": { "$ref": "#/components/schemas/TicketIncidentTypeResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "ticket-incident-types.update", "tags": [ "TicketIncidentType" ], "parameters": [ { "name": "ticketIncidentType", "in": "path", "required": true, "description": "The ticket incident type ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTicketIncidentTypeRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Incident Type berhasil diupdate" }, "data": { "$ref": "#/components/schemas/TicketIncidentTypeResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "ticket-incident-types.destroy", "tags": [ "TicketIncidentType" ], "parameters": [ { "name": "ticketIncidentType", "in": "path", "required": true, "description": "The ticket incident type ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Incident Type berhasil dihapus" } }, "required": [ "success", "code", "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/ticket-types": { "get": { "operationId": "ticket-types.index", "tags": [ "TicketType" ], "parameters": [ { "name": "search", "in": "query", "description": "Kata kunci untuk mencari kode atau nama tipe ticket.", "schema": { "type": [ "string", "null" ], "maxLength": 255 } }, { "name": "page", "in": "query", "description": "Nomor halaman yang ingin diambil.", "schema": { "type": [ "integer", "null" ], "minimum": 1 } }, { "name": "per_page", "in": "query", "description": "Jumlah data per halaman, maksimal 100.", "schema": { "type": [ "integer", "null" ], "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Data Ticket Type berhasil diambil" }, "data": { "type": "object", "properties": { "current_page": { "type": "integer", "minimum": 1 }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/TicketType" } }, "first_page_url": { "type": [ "string", "null" ] }, "from": { "type": [ "integer", "null" ], "minimum": 1 }, "last_page_url": { "type": [ "string", "null" ] }, "last_page": { "type": "integer", "minimum": 1 }, "links": { "type": "array", "description": "Generated paginator links.", "items": { "type": "object", "properties": { "url": { "type": [ "string", "null" ] }, "label": { "type": "string" }, "active": { "type": "boolean" } }, "required": [ "url", "label", "active" ] } }, "next_page_url": { "type": [ "string", "null" ] }, "path": { "type": [ "string", "null" ], "description": "Base path for paginator generated URLs." }, "per_page": { "type": "integer", "description": "Number of items shown per page.", "minimum": 0 }, "prev_page_url": { "type": [ "string", "null" ] }, "to": { "type": [ "integer", "null" ], "description": "Number of the last item in the slice.", "minimum": 1 }, "total": { "type": "integer", "description": "Total number of items being paginated.", "minimum": 0 } }, "required": [ "current_page", "data", "first_page_url", "from", "last_page_url", "last_page", "links", "next_page_url", "path", "per_page", "prev_page_url", "to", "total" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "post": { "operationId": "ticket-types.store", "tags": [ "TicketType" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreTicketTypeRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 201 }, "message": { "type": "string", "const": "Ticket Type berhasil dibuat" }, "data": { "$ref": "#/components/schemas/TicketTypeResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/ticket-types/{ticket_type}": { "get": { "operationId": "ticket-types.show", "tags": [ "TicketType" ], "parameters": [ { "name": "ticket_type", "in": "path", "required": true, "description": "The ticket type ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Detail Ticket Type berhasil diambil" }, "data": { "$ref": "#/components/schemas/TicketTypeResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "ticket-types.update", "tags": [ "TicketType" ], "parameters": [ { "name": "ticket_type", "in": "path", "required": true, "description": "The ticket type ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTicketTypeRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket Type berhasil diupdate" }, "data": { "$ref": "#/components/schemas/TicketTypeResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "ticket-types.destroy", "tags": [ "TicketType" ], "parameters": [ { "name": "ticket_type", "in": "path", "required": true, "description": "The ticket type ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket Type berhasil dihapus" } }, "required": [ "success", "code", "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/tickets/{ticket}/workflow": { "get": { "operationId": "ticketWorkflow.history", "summary": "History Workflow", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Workflow berhasil diambil" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/TicketLog" } } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/tickets/{ticket}/assign": { "post": { "operationId": "ticketWorkflow.assign", "summary": "Assign Teknisi", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignTicketRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Teknisi berhasil ditugaskan" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets/{ticket}/reassign": { "post": { "operationId": "ticketWorkflow.reassign", "summary": "Reassign Teknisi", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReassignTicketRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Penugasan berhasil diperbarui" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets/{ticket}/approve": { "post": { "operationId": "ticketWorkflow.approve", "summary": "Approve", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApproveTicketRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket berhasil disetujui" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets/{ticket}/reject": { "post": { "operationId": "ticketWorkflow.reject", "summary": "Reject", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RejectTicketRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket berhasil ditolak" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets/{ticket}/start": { "post": { "operationId": "ticketWorkflow.start", "summary": "Start Work", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StartTicketRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Pekerjaan dimulai" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets/{ticket}/pending": { "post": { "operationId": "ticketWorkflow.pending", "summary": "Pending", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PendingTicketRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket pending" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets/{ticket}/resume": { "post": { "operationId": "ticketWorkflow.resume", "summary": "Resume", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket dilanjutkan" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } }, "/tickets/{ticket}/resolve": { "post": { "operationId": "ticketWorkflow.resolve", "summary": "Resolve", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveTicketRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket berhasil diselesaikan" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets/{ticket}/close": { "post": { "operationId": "ticketWorkflow.close", "summary": "Close", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CloseTicketRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket berhasil ditutup" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets/{ticket}/cancel": { "post": { "operationId": "ticketWorkflow.cancel", "summary": "Cancel", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CancelTicketRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket berhasil dibatalkan" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/tickets/{ticket}/escalate": { "post": { "operationId": "ticketWorkflow.escalate", "summary": "Escalate", "tags": [ "TicketWorkflow" ], "parameters": [ { "name": "ticket", "in": "path", "required": true, "description": "The ticket ID", "schema": { "type": "integer" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EscalateTicketRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Ticket berhasil dieskalasi" }, "data": { "$ref": "#/components/schemas/TicketResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/users": { "get": { "operationId": "users.index", "tags": [ "User" ], "parameters": [ { "name": "search", "in": "query", "description": "Kata kunci untuk mencari nama, username, email, atau nomor WhatsApp.", "schema": { "type": [ "string", "null" ], "maxLength": 255 } }, { "name": "status", "in": "query", "description": "Filter status akun user.", "schema": { "type": [ "string", "null" ], "enum": [ "active", "inactive", "suspended" ] } }, { "name": "access_level", "in": "query", "description": "Filter level akses user.", "schema": { "$ref": "#/components/schemas/UserAccessLevel" } }, { "name": "page", "in": "query", "description": "Nomor halaman yang ingin diambil.", "schema": { "type": [ "integer", "null" ], "minimum": 1 } }, { "name": "per_page", "in": "query", "description": "Jumlah data per halaman, maksimal 100.", "schema": { "type": [ "integer", "null" ], "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Data User berhasil diambil" }, "data": { "type": "object", "properties": { "current_page": { "type": "integer", "minimum": 1 }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/User" } }, "first_page_url": { "type": [ "string", "null" ] }, "from": { "type": [ "integer", "null" ], "minimum": 1 }, "last_page_url": { "type": [ "string", "null" ] }, "last_page": { "type": "integer", "minimum": 1 }, "links": { "type": "array", "description": "Generated paginator links.", "items": { "type": "object", "properties": { "url": { "type": [ "string", "null" ] }, "label": { "type": "string" }, "active": { "type": "boolean" } }, "required": [ "url", "label", "active" ] } }, "next_page_url": { "type": [ "string", "null" ] }, "path": { "type": [ "string", "null" ], "description": "Base path for paginator generated URLs." }, "per_page": { "type": "integer", "description": "Number of items shown per page.", "minimum": 0 }, "prev_page_url": { "type": [ "string", "null" ] }, "to": { "type": [ "integer", "null" ], "description": "Number of the last item in the slice.", "minimum": 1 }, "total": { "type": "integer", "description": "Total number of items being paginated.", "minimum": 0 } }, "required": [ "current_page", "data", "first_page_url", "from", "last_page_url", "last_page", "links", "next_page_url", "path", "per_page", "prev_page_url", "to", "total" ] } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "post": { "operationId": "users.store", "tags": [ "User" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreUserRequest" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 201 }, "message": { "type": "string", "const": "User berhasil dibuat" }, "data": { "$ref": "#/components/schemas/UserResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } } }, "/users/{user}": { "get": { "operationId": "users.show", "tags": [ "User" ], "parameters": [ { "name": "user", "in": "path", "required": true, "description": "The user ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "Detail User berhasil diambil" }, "data": { "$ref": "#/components/schemas/UserResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "403": { "description": "An error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Error overview.", "example": "" } }, "required": [ "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } }, "put": { "operationId": "users.update", "tags": [ "User" ], "parameters": [ { "name": "user", "in": "path", "required": true, "description": "The user ID", "schema": { "type": "integer" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserRequest" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "User berhasil diupdate" }, "data": { "$ref": "#/components/schemas/UserResource" } }, "required": [ "success", "code", "message", "data" ] } } } }, "403": { "description": "An error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Error overview.", "example": "" } }, "required": [ "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" }, "422": { "$ref": "#/components/responses/ValidationException" } } }, "delete": { "operationId": "users.destroy", "tags": [ "User" ], "parameters": [ { "name": "user", "in": "path", "required": true, "description": "The user ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "code": { "type": "integer", "const": 200 }, "message": { "type": "string", "const": "User berhasil dihapus" } }, "required": [ "success", "code", "message" ] } } } }, "403": { "description": "An error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Error overview.", "example": "" } }, "required": [ "message" ] } } } }, "404": { "$ref": "#/components/responses/ModelNotFoundException" }, "401": { "$ref": "#/components/responses/AuthenticationException" } } } } }, "components": { "securitySchemes": { "http": { "type": "http", "scheme": "bearer" } }, "schemas": { "ApproveTicketRequest": { "type": "object", "properties": { "notes": { "type": [ "string", "null" ], "maxLength": 1000 } }, "title": "ApproveTicketRequest" }, "AssignMaterialRequest": { "type": "object", "properties": { "user_id": { "type": "integer" }, "barcode_id": { "type": "string" }, "material_name": { "type": "string" }, "type": { "type": "string", "enum": [ "serialized", "consumable" ] }, "serial_number": { "type": [ "string", "null" ] }, "qty": { "type": [ "number", "null" ] }, "unit": { "type": [ "string", "null" ] } }, "required": [ "user_id", "barcode_id", "material_name", "type" ], "title": "AssignMaterialRequest" }, "AssignTicketRequest": { "type": "object", "properties": { "technicians": { "type": "array", "items": { "type": "string" }, "minItems": 1 }, "leader_id": { "type": "integer" } }, "required": [ "technicians", "leader_id" ], "title": "AssignTicketRequest" }, "AuditLogResource": { "type": "object", "properties": { "id": { "type": "integer" }, "user_id": { "type": [ "integer", "null" ] }, "tenant_id": { "type": [ "integer", "null" ] }, "module": { "type": "string" }, "action": { "type": "string" }, "table_name": { "type": [ "string", "null" ] }, "record_id": { "type": [ "integer", "null" ] }, "old_values": { "type": [ "array", "null" ], "items": {} }, "new_values": { "type": [ "array", "null" ], "items": {} }, "description": { "type": [ "string", "null" ] }, "ip_address": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "user_id", "tenant_id", "module", "action", "table_name", "record_id", "old_values", "new_values", "description", "ip_address", "created_at" ], "title": "AuditLogResource" }, "CancelTicketRequest": { "type": "object", "properties": { "reason": { "type": "string", "maxLength": 2000 } }, "required": [ "reason" ], "title": "CancelTicketRequest" }, "CloseTicketRequest": { "type": "object", "properties": { "notes": { "type": [ "string", "null" ], "maxLength": 2000 } }, "title": "CloseTicketRequest" }, "EscalateTicketRequest": { "type": "object", "properties": { "reason": { "type": "string", "maxLength": 2000 }, "level": { "type": [ "string", "null" ], "enum": [ "L1", "L2", "L3", "NOC" ] } }, "required": [ "reason" ], "title": "EscalateTicketRequest" }, "MaterialResource": { "type": "object", "properties": { "barcode_id": { "type": "string", "description": "universal" }, "material_name": { "type": "string" }, "user_id": { "type": "string" }, "type": { "type": "string", "description": "detect type model", "enum": [ "serialized", "consumable" ] }, "serial_number": { "type": "string", "description": "serialized only" }, "qty": { "type": "object", "description": "consumable only", "properties": { "received": { "type": [ "string", "null" ] }, "used": { "type": [ "string", "null" ] }, "remaining": { "type": [ "string", "null" ] }, "unit": { "type": [ "string", "null" ] } }, "required": [ "received", "used", "remaining", "unit" ] }, "status": { "type": [ "string", "null" ], "description": "status (beda logic tapi tetap dipakai keduanya)" }, "assigned_at": { "type": [ "string", "null" ], "description": "optional tracking info" } }, "required": [ "barcode_id", "material_name", "user_id", "type", "status", "assigned_at" ], "title": "MaterialResource" }, "MenuGroup": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "is_active": { "type": "boolean" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "tenant_id": { "type": [ "integer", "null" ] }, "is_system": { "type": "boolean" } }, "required": [ "id", "name", "description", "is_active", "created_at", "updated_at", "tenant_id", "is_system" ], "title": "MenuGroup" }, "MenuGroupResource": { "type": "object", "properties": { "id": { "type": "integer" }, "tenant_id": { "type": [ "integer", "null" ] }, "name": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "is_system": { "type": "boolean" }, "is_active": { "type": "boolean" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "tenant_id", "name", "description", "is_system", "is_active", "created_at", "updated_at" ], "title": "MenuGroupResource" }, "MenuList": { "type": "object", "properties": { "id": { "type": "integer" }, "parent_id": { "type": [ "integer", "null" ] }, "name": { "type": "string" }, "slug": { "type": "string" }, "url": { "type": [ "string", "null" ] }, "icon": { "type": [ "string", "null" ] }, "component": { "type": [ "string", "null" ] }, "sort_order": { "type": "integer" }, "is_active": { "type": "boolean" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "parent_id", "name", "slug", "url", "icon", "component", "sort_order", "is_active", "created_at", "updated_at" ], "title": "MenuList" }, "MenuListResource": { "type": "object", "properties": { "id": { "type": "integer" }, "parent_id": { "type": [ "integer", "null" ] }, "name": { "type": "string" }, "slug": { "type": "string" }, "url": { "type": [ "string", "null" ] }, "icon": { "type": [ "string", "null" ] }, "component": { "type": [ "string", "null" ] }, "sort_order": { "type": "integer" }, "is_active": { "type": "boolean" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "parent_id", "name", "slug", "url", "icon", "component", "sort_order", "is_active", "created_at", "updated_at" ], "title": "MenuListResource" }, "PendingTicketRequest": { "type": "object", "properties": { "reason": { "type": "string", "maxLength": 1000 } }, "required": [ "reason" ], "title": "PendingTicketRequest" }, "ReassignTicketRequest": { "type": "object", "properties": { "leader_id": { "type": "integer" }, "technicians": { "type": "array", "items": { "type": "integer" }, "minItems": 1 } }, "required": [ "leader_id", "technicians" ], "title": "ReassignTicketRequest" }, "RegisterRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 100 }, "username": { "type": [ "string", "null" ], "maxLength": 50 }, "email": { "type": "string", "format": "email", "maxLength": 100 }, "whatsapp_number": { "type": "string", "maxLength": 20 }, "password": { "type": "string", "minLength": 8, "maxLength": 100 }, "verification_channel": { "type": "string", "enum": [ "email", "whatsapp" ] }, "verification_target": { "type": "string", "maxLength": 100 } }, "required": [ "name", "email", "whatsapp_number", "password", "verification_channel", "verification_target" ], "title": "RegisterRequest" }, "RejectTicketRequest": { "type": "object", "properties": { "reason": { "type": "string", "maxLength": 1000 } }, "required": [ "reason" ], "title": "RejectTicketRequest" }, "ResendVerificationCodeRequest": { "type": "object", "properties": { "verification_channel": { "type": "string", "enum": [ "email", "whatsapp" ] }, "verification_target": { "type": "string", "maxLength": 100 } }, "required": [ "verification_channel", "verification_target" ], "title": "ResendVerificationCodeRequest" }, "ResolveTicketRequest": { "type": "object", "properties": { "notes": { "type": "string", "maxLength": 2000 } }, "required": [ "notes" ], "title": "ResolveTicketRequest" }, "ReturnMaterialRequest": { "type": "object", "properties": { "barcode_id": { "type": "string" }, "user_id": { "type": "integer" } }, "required": [ "barcode_id", "user_id" ], "title": "ReturnMaterialRequest" }, "StartTicketRequest": { "type": "object", "properties": { "latitude": { "type": [ "number", "null" ] }, "longitude": { "type": [ "number", "null" ] }, "notes": { "type": [ "string", "null" ], "maxLength": 1000 } }, "title": "StartTicketRequest" }, "StoreMenuGroupRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 100 }, "description": { "type": [ "string", "null" ] }, "is_active": { "type": [ "boolean", "null" ] } }, "required": [ "name" ], "title": "StoreMenuGroupRequest" }, "StoreMenuListRequest": { "type": "object", "properties": { "parent_id": { "type": [ "integer", "null" ] }, "name": { "type": "string", "maxLength": 255 }, "slug": { "type": "string", "maxLength": 255 }, "url": { "type": [ "string", "null" ], "maxLength": 255 }, "icon": { "type": [ "string", "null" ], "maxLength": 255 }, "component": { "type": [ "string", "null" ], "maxLength": 255 }, "sort_order": { "type": [ "integer", "null" ], "minimum": 0 }, "is_active": { "type": [ "boolean", "null" ] } }, "required": [ "name", "slug" ], "title": "StoreMenuListRequest" }, "StoreTenantRequest": { "type": "object", "properties": { "tenant_code": { "type": "string", "maxLength": 100 }, "tenant_name": { "type": "string", "maxLength": 255 }, "phone": { "type": [ "string", "null" ], "maxLength": 50 }, "email": { "type": [ "string", "null" ], "format": "email", "maxLength": 255 }, "address": { "type": [ "string", "null" ] }, "status": { "type": [ "string", "null" ], "enum": [ "active", "inactive" ] } }, "required": [ "tenant_code", "tenant_name" ], "title": "StoreTenantRequest" }, "StoreTicketIncidentTypeRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255 }, "is_active": { "type": "boolean" } }, "required": [ "name" ], "title": "StoreTicketIncidentTypeRequest" }, "StoreTicketRequest": { "type": "object", "properties": { "ticket_type_id": { "type": "integer" }, "customer_id": { "type": [ "integer", "null" ] }, "title": { "type": "string", "maxLength": 255 }, "description": { "type": [ "string", "null" ] }, "priority": { "type": "string", "enum": [ "low", "medium", "high", "critical" ] } }, "required": [ "ticket_type_id", "title", "priority" ], "title": "StoreTicketRequest" }, "StoreTicketTypeRequest": { "type": "object", "properties": { "code": { "type": "string", "maxLength": 50 }, "name": { "type": "string", "maxLength": 100 }, "need_approval": { "type": [ "boolean", "null" ] }, "sla_minutes": { "type": [ "integer", "null" ], "minimum": 1 }, "require_photo": { "type": [ "boolean", "null" ] }, "require_material": { "type": [ "boolean", "null" ] }, "need_customer": { "type": [ "boolean", "null" ] }, "need_incident_type": { "type": [ "boolean", "null" ] } }, "required": [ "code", "name" ], "title": "StoreTicketTypeRequest" }, "StoreUserRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255 }, "username": { "type": [ "string", "null" ], "maxLength": 255 }, "email": { "type": "string", "format": "email", "maxLength": 255 }, "whatsapp_number": { "type": [ "string", "null" ], "maxLength": 20 }, "password": { "type": "string", "minLength": 8 }, "is_master": { "type": [ "boolean", "null" ] }, "access_level": { "$ref": "#/components/schemas/UserAccessLevel" }, "status": { "type": "string", "enum": [ "active", "inactive", "suspended" ] }, "user_profile": { "type": "object", "properties": { "nik": { "type": [ "string", "null" ], "maxLength": 30 }, "address": { "type": [ "string", "null" ] }, "provinsi_id": { "type": [ "integer", "null" ] }, "kabupaten_id": { "type": [ "integer", "null" ] }, "kecamatan_id": { "type": [ "integer", "null" ] }, "desa_id": { "type": [ "integer", "null" ] } } }, "user_tenants": { "type": [ "array", "null" ], "items": { "type": "object", "properties": { "tenant_id": { "type": "integer" }, "is_default": { "type": [ "boolean", "null" ] } } } }, "user_menu_groups": { "type": [ "array", "null" ], "items": { "type": "object", "properties": { "menu_group_id": { "type": "integer" }, "tenant_id": { "type": [ "integer", "null" ] } } } } }, "required": [ "name", "email", "password", "status" ], "title": "StoreUserRequest" }, "SyncMenuGroupMenusRequest": { "type": "object", "properties": { "menus": { "type": "array", "items": { "type": "object", "properties": { "menu_id": { "type": "integer" }, "can_view": { "type": [ "boolean", "null" ] }, "can_create": { "type": [ "boolean", "null" ] }, "can_update": { "type": [ "boolean", "null" ] }, "can_delete": { "type": [ "boolean", "null" ] }, "can_approve": { "type": [ "boolean", "null" ] }, "can_export": { "type": [ "boolean", "null" ] } }, "required": [ "menu_id" ] }, "minItems": 1 } }, "required": [ "menus" ], "title": "SyncMenuGroupMenusRequest" }, "SyncUserMenuGroupsRequest": { "type": "object", "properties": { "assignments": { "type": "array", "items": { "type": "object", "properties": { "menu_group_id": { "type": "integer" }, "tenant_id": { "type": [ "integer", "null" ] } }, "required": [ "menu_group_id" ] }, "minItems": 1 } }, "required": [ "assignments" ], "title": "SyncUserMenuGroupsRequest" }, "Tenant": { "type": "object", "properties": { "id": { "type": "integer" }, "tenant_code": { "type": "string" }, "tenant_name": { "type": "string" }, "phone": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "address": { "type": [ "string", "null" ] }, "status": { "type": "string" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "tenant_code", "tenant_name", "phone", "email", "address", "status", "created_at", "updated_at" ], "title": "Tenant" }, "TenantResource": { "type": "object", "properties": { "id": { "type": "integer" }, "tenant_code": { "type": "string" }, "tenant_name": { "type": "string" }, "phone": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "address": { "type": [ "string", "null" ] }, "status": { "type": "string" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "tenant_code", "tenant_name", "phone", "email", "address", "status", "created_at", "updated_at" ], "title": "TenantResource" }, "Ticket": { "type": "object", "properties": { "id": { "type": "integer" }, "ticket_no": { "type": "string" }, "ticket_type_id": { "type": "integer" }, "tenant_id": { "type": "integer" }, "customer_id": { "type": [ "integer", "null" ] }, "title": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "priority": { "type": "string" }, "status": { "type": "string" }, "sla_minutes": { "type": [ "integer", "null" ] }, "created_by": { "type": "integer" }, "approved_by": { "type": [ "integer", "null" ] }, "approved_at": { "type": [ "string", "null" ] }, "rejected_by": { "type": [ "integer", "null" ] }, "rejected_at": { "type": [ "string", "null" ] }, "rejection_reason": { "type": [ "string", "null" ] }, "assigned_at": { "type": [ "string", "null" ] }, "resolved_at": { "type": [ "string", "null" ] }, "closed_at": { "type": [ "string", "null" ] }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "ticket_no", "ticket_type_id", "tenant_id", "customer_id", "title", "description", "priority", "status", "sla_minutes", "created_by", "approved_by", "approved_at", "rejected_by", "rejected_at", "rejection_reason", "assigned_at", "resolved_at", "closed_at", "created_at", "updated_at" ], "title": "Ticket" }, "TicketIncidentType": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "is_active": { "type": "boolean" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "deleted": { "type": "string" }, "deleted_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "name", "is_active", "created_at", "updated_at", "deleted", "deleted_at" ], "title": "TicketIncidentType" }, "TicketIncidentTypeResource": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "is_active": { "type": "boolean" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "name", "is_active", "created_at", "updated_at" ], "title": "TicketIncidentTypeResource" }, "TicketLog": { "type": "object", "properties": { "id": { "type": "integer" }, "ticket_id": { "type": "integer" }, "user_id": { "type": "integer" }, "activity": { "type": "string" }, "notes": { "type": [ "string", "null" ] }, "latitude": { "type": [ "string", "null" ] }, "longitude": { "type": [ "string", "null" ] }, "created_at": { "type": [ "string", "null" ] } }, "required": [ "id", "ticket_id", "user_id", "activity", "notes", "latitude", "longitude", "created_at" ], "title": "TicketLog" }, "TicketResource": { "type": "object", "properties": { "id": { "type": "integer" }, "ticket_no": { "type": "string" }, "ticket_type_id": { "type": "integer" }, "customer_id": { "type": [ "integer", "null" ] }, "title": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "priority": { "type": "string" }, "status": { "type": "string" }, "created_by": { "type": "integer" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "ticket_no", "ticket_type_id", "customer_id", "title", "description", "priority", "status", "created_by", "created_at", "updated_at" ], "title": "TicketResource" }, "TicketType": { "type": "object", "properties": { "id": { "type": "integer" }, "code": { "type": "string" }, "name": { "type": "string" }, "need_approval": { "type": "boolean" }, "sla_minutes": { "type": [ "integer", "null" ] }, "require_photo": { "type": "boolean" }, "require_material": { "type": "boolean" }, "need_customer": { "type": "boolean" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "need_incident_type": { "type": "boolean" } }, "required": [ "id", "code", "name", "need_approval", "sla_minutes", "require_photo", "require_material", "need_customer", "created_at", "updated_at", "need_incident_type" ], "title": "TicketType" }, "TicketTypeResource": { "type": "object", "properties": { "id": { "type": "integer" }, "code": { "type": "string" }, "name": { "type": "string" }, "need_approval": { "type": "boolean" }, "sla_minutes": { "type": [ "integer", "null" ] }, "require_photo": { "type": "boolean" }, "require_material": { "type": "boolean" }, "need_customer": { "type": "boolean" }, "need_incident_type": { "type": "boolean" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "code", "name", "need_approval", "sla_minutes", "require_photo", "require_material", "need_customer", "need_incident_type", "created_at", "updated_at" ], "title": "TicketTypeResource" }, "TransferMaterialRequest": { "type": "object", "properties": { "barcode_id": { "type": "string" }, "from_user_id": { "type": "integer" }, "to_user_id": { "type": "integer" } }, "required": [ "barcode_id", "from_user_id", "to_user_id" ], "title": "TransferMaterialRequest" }, "UpdateMenuGroupRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 100 }, "description": { "type": [ "string", "null" ] }, "is_active": { "type": [ "boolean", "null" ] } }, "required": [ "name" ], "title": "UpdateMenuGroupRequest" }, "UpdateMenuListRequest": { "type": "object", "properties": { "parent_id": { "type": [ "integer", "null" ] }, "name": { "type": "string", "maxLength": 255 }, "slug": { "type": "string", "maxLength": 255 }, "url": { "type": [ "string", "null" ], "maxLength": 255 }, "icon": { "type": [ "string", "null" ], "maxLength": 255 }, "component": { "type": [ "string", "null" ], "maxLength": 255 }, "sort_order": { "type": [ "integer", "null" ], "minimum": 0 }, "is_active": { "type": [ "boolean", "null" ] } }, "required": [ "name", "slug" ], "title": "UpdateMenuListRequest" }, "UpdateProfileRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255 }, "username": { "type": [ "string", "null" ], "maxLength": 255 }, "email": { "type": "string", "format": "email", "maxLength": 255 }, "whatsapp_number": { "type": [ "string", "null" ], "maxLength": 20 }, "current_password": { "type": [ "string", "null" ] }, "password": { "type": [ "string", "null" ], "minLength": 8 }, "password_confirmation": { "type": [ "string", "null" ], "minLength": 8 }, "user_profile": { "type": "object", "properties": { "nik": { "type": [ "string", "null" ], "maxLength": 30 }, "address": { "type": [ "string", "null" ] }, "provinsi_id": { "type": [ "integer", "null" ] }, "kabupaten_id": { "type": [ "integer", "null" ] }, "kecamatan_id": { "type": [ "integer", "null" ] }, "desa_id": { "type": [ "integer", "null" ] } } } }, "required": [ "name", "email" ], "title": "UpdateProfileRequest" }, "UpdateTenantRequest": { "type": "object", "properties": { "tenant_code": { "type": "string", "maxLength": 100 }, "tenant_name": { "type": "string", "maxLength": 255 }, "phone": { "type": [ "string", "null" ], "maxLength": 50 }, "email": { "type": [ "string", "null" ], "format": "email", "maxLength": 255 }, "address": { "type": [ "string", "null" ] }, "status": { "type": "string", "enum": [ "active", "inactive" ] } }, "title": "UpdateTenantRequest" }, "UpdateTicketIncidentTypeRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255 }, "is_active": { "type": "boolean" } }, "required": [ "name", "is_active" ], "title": "UpdateTicketIncidentTypeRequest" }, "UpdateTicketRequest": { "type": "object", "properties": { "ticket_type_id": { "type": "integer" }, "customer_id": { "type": [ "integer", "null" ] }, "title": { "type": "string", "maxLength": 255 }, "description": { "type": [ "string", "null" ] }, "priority": { "type": "string", "enum": [ "low", "medium", "high", "critical" ] }, "status": { "type": "string", "enum": [ "draft", "open", "approved", "assigned", "progress", "pending", "resolved", "closed", "cancelled", "rejected" ] } }, "title": "UpdateTicketRequest" }, "UpdateTicketTypeRequest": { "type": "object", "properties": { "code": { "type": "string", "maxLength": 50 }, "name": { "type": "string", "maxLength": 100 }, "need_approval": { "type": [ "boolean", "null" ] }, "sla_minutes": { "type": [ "integer", "null" ], "minimum": 1 }, "require_photo": { "type": [ "boolean", "null" ] }, "require_material": { "type": [ "boolean", "null" ] }, "need_customer": { "type": [ "boolean", "null" ] }, "need_incident_type": { "type": [ "boolean", "null" ] } }, "required": [ "code", "name" ], "title": "UpdateTicketTypeRequest" }, "UpdateUserRequest": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255 }, "username": { "type": [ "string", "null" ], "maxLength": 255 }, "email": { "type": "string", "format": "email", "maxLength": 255 }, "whatsapp_number": { "type": [ "string", "null" ], "maxLength": 20 }, "password": { "type": [ "string", "null" ], "minLength": 8 }, "is_master": { "type": [ "boolean", "null" ] }, "access_level": { "$ref": "#/components/schemas/UserAccessLevel" }, "status": { "type": "string", "enum": [ "active", "inactive", "suspended" ] }, "user_profile": { "type": "object", "properties": { "nik": { "type": [ "string", "null" ], "maxLength": 30 }, "address": { "type": [ "string", "null" ] }, "provinsi_id": { "type": [ "integer", "null" ] }, "kabupaten_id": { "type": [ "integer", "null" ] }, "kecamatan_id": { "type": [ "integer", "null" ] }, "desa_id": { "type": [ "integer", "null" ] } } }, "user_tenants": { "type": [ "array", "null" ], "items": { "type": "object", "properties": { "tenant_id": { "type": "integer" }, "is_default": { "type": [ "boolean", "null" ] } } } }, "user_menu_groups": { "type": [ "array", "null" ], "items": { "type": "object", "properties": { "menu_group_id": { "type": "integer" }, "tenant_id": { "type": [ "integer", "null" ] } } } } }, "title": "UpdateUserRequest" }, "User": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "email": { "type": "string" }, "email_verified_at": { "type": [ "string", "null" ], "format": "date-time" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "username": { "type": [ "string", "null" ] }, "status": { "type": "string" }, "last_login_at": { "type": [ "string", "null" ] }, "is_master": { "type": "boolean" }, "verification_channel": { "type": [ "string", "null" ] }, "verification_target": { "type": [ "string", "null" ] }, "verification_code": { "type": [ "string", "null" ] }, "verification_code_expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "verified_at": { "type": [ "string", "null" ], "format": "date-time" }, "whatsapp_number": { "type": [ "string", "null" ] }, "deleted_at": { "type": [ "string", "null" ], "format": "date-time" }, "access_level": { "$ref": "#/components/schemas/UserAccessLevel" } }, "required": [ "id", "name", "email", "email_verified_at", "created_at", "updated_at", "username", "status", "last_login_at", "is_master", "verification_channel", "verification_target", "verification_code", "verification_code_expires_at", "verified_at", "whatsapp_number", "deleted_at", "access_level" ], "title": "User" }, "UserAccessLevel": { "type": "string", "enum": [ "customer", "staff", "tenant_owner", "master_admin" ], "title": "UserAccessLevel" }, "UserResource": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "username": { "type": [ "string", "null" ] }, "email": { "type": "string" }, "whatsapp_number": { "type": [ "string", "null" ] }, "is_master": { "type": "boolean" }, "access_level": { "type": "string" }, "status": { "type": "string" }, "verification_channel": { "type": [ "string", "null" ] }, "verification_target": { "type": [ "string", "null" ] }, "verified_at": { "type": [ "string", "null" ], "format": "date-time" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user_profile": { "type": [ "object", "null" ], "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "nik": { "type": [ "string", "null" ] }, "address": { "type": [ "string", "null" ] }, "provinsi_id": { "type": [ "integer", "null" ] }, "kabupaten_id": { "type": [ "integer", "null" ] }, "kecamatan_id": { "type": [ "integer", "null" ] }, "desa_id": { "type": [ "integer", "null" ] }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } }, "required": [ "id", "user_id", "nik", "address", "provinsi_id", "kabupaten_id", "kecamatan_id", "desa_id", "created_at", "updated_at" ] }, "user_tenants": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "tenant_id": { "type": "integer" }, "is_default": { "type": "boolean" }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "tenant": { "type": [ "object", "null" ], "properties": { "id": { "type": "integer" }, "tenant_code": { "type": "string" }, "tenant_name": { "type": "string" } }, "required": [ "id", "tenant_code", "tenant_name" ] } }, "required": [ "id", "user_id", "tenant_id", "is_default", "created_at", "updated_at", "tenant" ] } }, "user_menu_groups": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "user_id": { "type": "integer" }, "menu_group_id": { "type": "integer" }, "tenant_id": { "type": [ "integer", "null" ] }, "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "menu_group": { "type": [ "object", "null" ], "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "menu_group_name": { "type": [ "string", "null" ] } }, "required": [ "id", "name", "menu_group_name" ] }, "tenant": { "type": [ "object", "null" ], "properties": { "id": { "type": "integer" }, "tenant_code": { "type": "string" }, "tenant_name": { "type": "string" } }, "required": [ "id", "tenant_code", "tenant_name" ] } }, "required": [ "id", "user_id", "menu_group_id", "tenant_id", "created_at", "updated_at", "menu_group", "tenant" ] } } }, "required": [ "id", "name", "username", "email", "whatsapp_number", "is_master", "access_level", "status", "verification_channel", "verification_target", "verified_at", "created_at", "updated_at" ], "title": "UserResource" }, "VerifyRegistrationRequest": { "type": "object", "properties": { "verification_channel": { "type": "string", "enum": [ "email", "whatsapp" ] }, "verification_target": { "type": "string", "maxLength": 100 }, "verification_code": { "type": "string" } }, "required": [ "verification_channel", "verification_target", "verification_code" ], "title": "VerifyRegistrationRequest" } }, "responses": { "ValidationException": { "description": "Validation error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Errors overview." }, "errors": { "type": "object", "description": "A detailed description of each field that failed validation.", "additionalProperties": { "type": "array", "items": { "type": "string" } } } }, "required": [ "message", "errors" ] } } } }, "AuthenticationException": { "description": "Unauthenticated", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Error overview." } }, "required": [ "message" ] } } } }, "ModelNotFoundException": { "description": "Not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Error overview." } }, "required": [ "message" ] } } } } } } }