mirror of
https://github.com/larksuite/cli.git
synced 2026-09-14 18:42:53 +08:00
2a1613484a
* feat: add framework flag aliases and unified IM pagination Introduce declarative exact-name flag aliases at the shortcut framework boundary while keeping semantic compatibility domain-owned. Add a shared, format-aware IM pagination pipeline with consistent flags, metadata, safety bounds, resumable cursors, and request throttling. * fix: align alias attribution and pagination contracts * fix: align alias contracts and documentation * test: remove environment-dependent contact bot e2e * test: restore contact bot e2e * docs: reduce IM pagination guidance noise --------- Co-authored-by: liangshuo-1 <266696938+liangshuo-1@users.noreply.github.com>
41 lines
1.0 KiB
Go
41 lines
1.0 KiB
Go
// Copyright (c) 2026 Lark Technologies Pte. Ltd.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package slides
|
|
|
|
import "github.com/larksuite/cli/shortcuts/common"
|
|
|
|
const presentationRefDescription = "xml_presentation_id, slides URL, or wiki URL that resolves to slides"
|
|
|
|
var presentationFlagAliases = []string{
|
|
"presentation-id",
|
|
"presentation-token",
|
|
"token",
|
|
"presentation_id",
|
|
"xml-presentation-id",
|
|
"url",
|
|
}
|
|
|
|
// basePresentationRefFlag declares the shared Slides presentation-locator
|
|
// contract. Every alias accepts the same token / Slides URL / Wiki URL grammar
|
|
// as the canonical --presentation flag.
|
|
func basePresentationRefFlag() common.Flag {
|
|
return common.Flag{
|
|
Name: "presentation",
|
|
Aliases: append([]string(nil), presentationFlagAliases...),
|
|
Desc: presentationRefDescription,
|
|
}
|
|
}
|
|
|
|
func requiredPresentationRefFlag() common.Flag {
|
|
flag := basePresentationRefFlag()
|
|
flag.Required = true
|
|
return flag
|
|
}
|
|
|
|
func listModePresentationRefFlag() common.Flag {
|
|
flag := basePresentationRefFlag()
|
|
flag.Desc += "; list mode only"
|
|
return flag
|
|
}
|