Widget Stili Oluştur
Mevcut node için bir stil ön ayarı oluşturur. Dönen id, widget'a widgetStyleId olarak verilen değerdir.
Kimlik Doğrulama: Bearer token gereklidir.
Endpoint: POST /api/v2/widget-styles
İstek Gövdesi
| Alan | Tip | Zorunlu | Açıklama |
|---|---|---|---|
| name | string | Evet | min 1, max 255. Node bazında benzersiz |
| primary_color | string | Evet | max 32. CSS renk (#3b82f6, rgb(...)) |
| secondary_color | string | Evet | max 32 |
| background_color | string | Evet | max 32 |
| surface_color | string | Evet | max 32 |
| text_color | string | Evet | max 32 |
| muted_text_color | string | Evet | max 32 |
| border_color | string | Evet | max 32 |
| font_family | string | Evet | max 255. CSS font-family değeri |
| font_size_base | int | Evet | px. min 8, max 32 |
| font_size_heading | int | Evet | px. min 10, max 64 |
| font_weight_heading | int | Evet | min 100, max 900 |
| border_radius | int | Hayır | px. min 0, max 64. Varsayılan 0 |
| custom_css | string | Hayır | max 32768. Üretilen CSS değişkenlerinden sonra eklenen ham CSS — son yazan kazanır |
Yanıt — 201 Created
Oluşturulan WidgetStyleResponse döner (Widget Stilini Getir ile aynı yapı).
| Kod | Açıklama |
|---|---|
| 400 | Doğrulama hatası |
| 401 | Yetkisiz |
| 409 | Bu node'da aynı isimde bir stil zaten mevcut |