[sheet-service] updated readme

This commit is contained in:
Ittipat Lusuk 2026-05-06 15:12:34 +07:00
parent 97d07b97e5
commit 9ca7bf961f

View file

@ -3,60 +3,70 @@
Sheet controller by grist
## PUBLISH sheet-service/catalogs
### Get any catalog lists and status
```
PUBLISH sheet-service/catalogs '{"type": "sheet","payload": {"user_info": {"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxx"},"srv_name": "sheet-service","values": {"country": "tha"}}}'
```
## PUBLISH sheet-service/enter
### Enter to catalog to get permission to use any command
```
PUBLISH sheet-service/enter '{"type": "sheet","payload": {"user_info": {"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxx"},"srv_name": "sheet-service","values": {"country": "tha","catalog":"page_catalog_group_coffee.skt"}}}'
```
## PUBLISH sheet-service/heartbeat
### Renew permission
```
PUBLISH sheet-service/heartbeat '{"type": "sheet","payload": {"user_info": {"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxx"},"srv_name": "sheet-service","values": {"country": "tha","catalog":"page_catalog_group_coffee.skt"}}}'
```
## PUBLISH sheet-service/exit
### Clear catalog permission
```
PUBLISH sheet-service/exit '{"type": "sheet","payload": {"user_info": {"user_id": "xxxxxxxxxxxxxxxxxxxxxxxxxx"},"srv_name": "sheet-service","values": {"country": "tha"}}}'
```
## PUBLISH sheet-service/catalog/menu
### Get menu in catalog
```
PUBLISH sheet-service/catalog/menu '{"type": "sheet","payload": {"user_info": {"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxx"},"srv_name": "sheet-service","values": {"country": "tha","catalog":"page_catalog_group_coffee.skt"}}}'
```
## PUBLISH sheet-service/add/catalog
### Add the catalog sheet
```
PUBLISH sheet-service/add/catalog '{"type": "sheet","payload": {"user_info": {"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxx"},"srv_name": "sheet-service","values": {"country": "tha","catalog_name":"Coffee","catalog":"page_catalog_group_coffee9.skt"}}}'
```
## PUBLISH sheet-service/add/menu
### Add menu in the catalog
```
PUBLISH sheet-service/add/menu '{"type": "sheet","payload": {"user_info": {"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxx"},"srv_name": "sheet-service","values": {"country": "tha","catalog":"page_catalog_group_coffee.skt","content": [{"cells":["", "", "ซูปราาาาาแอพพพพ", "Supra menuuu", "กาแฟ และน้ำ ", "Espresso, Water", "99-01-01-0003", "99-01-02-0001", "99-01-03-0001", "bn_hot_america_no.png", "99-99-01-0003", "99-99-02-0001", "-", "posi1", "-", "-", "-", "-", "Coffee,CoffeeNoMilk,ShakeShake", ""], "payload": {"lang_name":["冰镇能量饮料\n加量苏打","-","-",""], "lang_desc": ["","-","-",""]}},{"cells":["", "", "new supar menuuu", "Supra menuuu", "กาแฟ และน้ำ ", "Espresso, Water", "99-99-01-0003", "99-99-02-0001", "99-99-03-0001", "bn_hot_america_no.png", "99-99-01-0003", "99-99-02-0001", "99-99-03-0003", "posi1", "-", "-", "-", "-", "Coffee,CoffeeNoMilk,ShakeShake", ""], "payload": {"lang_name":["冰镇能量饮料\n加量苏打","-","-",""], "lang_desc": ["","-","-",""]}}]}}}'
```
## PUBLISH sheet-service/update/menu
### Edit menu in the catalog
```
PUBLISH sheet-service/update/menu '{"type": "sheet","payload": {"user_info": {"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxx"},"srv_name": "sheet-service","values": {"country": "tha","catalog": "page_catalog_group_coffee.skt","content": [{"new_layout_v2": [{"row_index": 1, "cells": [{"value": "", "coord": {"row": 1, "col": 1}}, {"value": "name", "coord": {"row": 1, "col": 2}}, {"value": "Americano", "coord": {"row": 1, "col": 3}}, {"value": "อเมริกาโน test", "coord": {"row": 1, "col": 4}}, {"value": "美式咖啡 จีน", "coord": {"row": 1, "col": 5}}, {"value": "-", "coord": {"row": 1, "col": 6}}, {"value": "-", "coord": {"row": 1, "col": 7}}, {"value": "အမေရိကာနို พม่า", "coord": {"row": 1, "col": 8}}, {"value": "12-01-01-0003,12-21-01-0003", "coord": {"row": 1, "col": 9}}, {"value": "12-01-02-0001,12-21-02-0001", "coord": {"row": 1, "col": 10}}, {"value": "แท็ก Coffee,CoffeeNoMilk", "coord": {"row": 1, "col": 23}}]}, {"row_index": 2, "cells": [{"value": "", "coord": {"row": 2, "col": 1}}, {"value": "desc", "coord": {"row": 2, "col": 2}}, {"value": "Espresso, Water", "coord": {"row": 2, "col": 3}}, {"value": "กาแฟ และน้ำ sure? ", "coord": {"row": 2, "col": 4}}, {"value": "จีนเมกาโน่ 浓缩咖啡、水", "coord": {"row": 2, "col": 5}}]}, {"row_index": 3, "cells": [{"value": "", "coord": {"row": 3, "col": 1}}, {"value": "img", "coord": {"row": 3, "col": 2}}, {"value": "bn_hot_america_no.png", "coord": {"row": 3, "col": 3}}, {"value": "posi1 เทส", "coord": {"row": 3, "col": 9}}]}, {"row_index": 4, "cells": []}], "name_desc_v2": [{"key": "MENU.12-21-01-0003.name", "row_index": 3, "cells": [{"value": "จีนน 热美式咖啡", "coord": {"row": 3, "col": 5}}, {"value": "-", "coord": {"row": 3, "col": 6}}, {"value": "-", "coord": {"row": 3, "col": 7}}, {"value": "พม่าา ဟော့အမေရိကန်နို", "coord": {"row": 3, "col": 8}}]}, {"key": "MENU.12-21-01-0003.desc", "row_index": 4, "cells": [{"value": "จีนนน 浓缩咖啡、水", "coord": {"row": 4, "col": 5}}, {"value": "-", "coord": {"row": 4, "col": 6}}, {"value": "-", "coord": {"row": 4, "col": 7}}, {"value": "พม่า Espresso၊ ရေ", "coord": {"row": 4, "col": 8}}]}, {"key": "MENU.12-21-02-0001.name", "row_index": 7, "cells": [{"value": "จนน 热美式咖啡", "coord": {"row": 7, "col": 5}}, {"value": "-", "coord": {"row": 7, "col": 6}}, {"value": "-", "coord": {"row": 7, "col": 7}}, {"value": "พมาาဟော့အမေရိကန်နို", "coord": {"row": 7, "col": 8}}]}, {"key": "MENU.12-21-02-0001.desc", "row_index": 8, "cells": [{"value": "จันน浓缩咖啡、水", "coord": {"row": 8, "col": 5}}, {"value": "-", "coord": {"row": 8, "col": 6}}, {"value": "-", "coord": {"row": 8, "col": 7}}, {"value": "myanmar Espresso၊ ရေ", "coord": {"row": 8, "col": 8}}]}, {"key": "MENU.12-01-01-0003.name", "row_index": 1, "cells": [{"value": "myanmar 热美式咖啡", "coord": {"row": 1, "col": 5}}, {"value": "-", "coord": {"row": 1, "col": 6}}, {"value": "-", "coord": {"row": 1, "col": 7}}, {"value": "myanmar ဟော့အမေရိကန်နို", "coord": {"row": 1, "col": 8}}]}]}]}}}'
```
## PUBLISH sheet-service/delete/menu
### Delete menu in the catalog
```
PUBLISH sheet-service/delete/menu '{"type": "sheet","payload": {"user_info": {"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxx"},"srv_name": "sheet-service","values": {"country": "tha","catalog":"page_catalog_group_coffee.skt","content": [{"target_id":389}, {"target_id":393}]}}}'
```
## PUBLISH sheet-service/swap/menu
### Swap menu in the catalog
```
PUBLISH sheet-service/swap/menu '{"type": "sheet","payload": {"user_info": {"uid": "xxxxxxxxxxxxxxxxxxxxxxxxxx"},"srv_name": "sheet-service","values": {"country": "tha","catalog":"page_catalog_group_coffee.skt","content": [{ "target_id": 1, "source_id": 9 },{ "target_id": 5, "source_id": 1 },{ "target_id": 9, "source_id": 5 }]}}}'