mirror of
https://github.com/larksuite/cli.git
synced 2026-07-08 02:00:19 +08:00
* fix(base): improve --json help examples and group guide * fix(base): unify --json help tips format * docs(base): fix view-set-group schema with group_config * fix(base): remove array wording from view-set-group json help --------- Co-authored-by: kongenpei <kongenpei@users.noreply.github.com>
37 lines
1.0 KiB
Go
37 lines
1.0 KiB
Go
// Copyright (c) 2026 Lark Technologies Pte. Ltd.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package base
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/larksuite/cli/shortcuts/common"
|
|
)
|
|
|
|
var BaseViewSetTimebar = common.Shortcut{
|
|
Service: "base",
|
|
Command: "+view-set-timebar",
|
|
Description: "Set view timebar configuration",
|
|
Risk: "write",
|
|
Scopes: []string{"base:view:write_only"},
|
|
AuthTypes: authTypes(),
|
|
Flags: []common.Flag{
|
|
baseTokenFlag(true),
|
|
tableRefFlag(true),
|
|
viewRefFlag(true),
|
|
{Name: "json", Desc: "timebar JSON object", Required: true},
|
|
},
|
|
Tips: []string{
|
|
`Example: --json '{"start_time":"fldStart","end_time":"fldEnd","title":"fldTitle"}'`,
|
|
"Agent hint: use the lark-base skill's view-set-timebar guide for usage and limits.",
|
|
},
|
|
Validate: func(ctx context.Context, runtime *common.RuntimeContext) error {
|
|
return validateViewJSONObject(runtime)
|
|
},
|
|
DryRun: dryRunViewSetTimebar,
|
|
Execute: func(ctx context.Context, runtime *common.RuntimeContext) error {
|
|
return executeViewSetJSONObject(runtime, "timebar", "timebar")
|
|
},
|
|
}
|