shortcutkit 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -13,6 +13,13 @@ export type Action = {
13
13
  WFWorkflowActionParameters: Record<string, Value>;
14
14
  outputName?: string;
15
15
  };
16
+ /** Names the app that provides an App Intents action; written as the AppIntentDescriptor parameter. */
17
+ export type AppIntentDescriptor = {
18
+ BundleIdentifier: string;
19
+ Name: string;
20
+ TeamIdentifier: string;
21
+ AppIntentIdentifier: string;
22
+ };
16
23
  /** WFWorkflowIcon.backgroundColorValue for palette colors 0-14, unsigned as the plist stores it. */
17
24
  export declare const ICON_COLORS: {
18
25
  readonly Red: 4282601983;
@@ -83,6 +90,16 @@ export declare class Shortcut {
83
90
  endIf(gid: string): void;
84
91
  repeatEach(items: Attachment): string;
85
92
  endRepeatEach(gid: string): void;
93
+ /** Open a Repeat block that runs `count` times; returns the grouping identifier for endRepeatCount(). */
94
+ repeatCount(count: number | Attachment): string;
95
+ endRepeatCount(gid: string): void;
96
+ /**
97
+ * Open a Choose from Menu block. Follow with one menuItem() per title, in order, each with the
98
+ * actions of that branch, then endMenu(). Returns the grouping identifier.
99
+ */
100
+ chooseFromMenu(prompt: string | TokenString, items: string[]): string;
101
+ menuItem(gid: string, title: string): void;
102
+ endMenu(gid: string): void;
86
103
  toPlist(): Record<string, PlistValue>;
87
104
  toXml(): string;
88
105
  /** Write the unsigned file. Shortcuts names an import after the file, so the default is "<name>.shortcut". Converts to binary plist via plutil when present. */