Files
larksuite__cli/shortcuts/slides/presentation_flag.go
liangshuo-1 2a1613484a feat: add framework flag aliases and unified IM pagination (#2146)
* 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>
2026-08-03 19:20:40 +08:00

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
}