Constructor
new Story(story)
Creates a new Story instance from Shortcut story data.
Parameters:
Name | Type | Description |
---|---|---|
story |
ShortcutStory | any | The story data from Shortcut API |
- Source:
Extends
Classes
Members
app_url
Web URL where the story can be accessed in the Shortcut UI
- Source:
app_url :string
Web URL where the story can be accessed in the Shortcut UI
Type:
- string
- Source:
client
The Shortcut API client instance used for making API requests
- Overrides:
- Source:
context
The VS Code extension context
- Overrides:
- Source:
id
Unique identifier for the story
- Source:
id :number
Unique identifier for the story
Type:
- number
- Source:
name
Title/name of the story
- Source:
name :string
Title/name of the story
Type:
- string
- Source:
tasks
List of tasks associated with this story
- Source:
tasks :Array
List of tasks associated with this story
Type:
- Array
- Source:
workflow_id
ID of the workflow this story belongs to
- Source:
workflow_id :number
ID of the workflow this story belongs to
Type:
- number
- Source:
workflow_state_id
ID of the current workflow state of this story
- Source:
workflow_state_id :number
ID of the current workflow state of this story
Type:
- number
- Source:
Methods
(async, static) all() → {Promise.<Array.<Story>>}
Retrieves all active stories with tasks that aren't archived.
- Source:
Returns:
A promise that resolves to an array of Story instances
- Type
- Promise.<Array.<Story>>
(async, static) all() → {Promise.<Array.<Story>>}
Retrieves all active stories with tasks that aren't archived.
- Source:
Returns:
A promise that resolves to an array of Story instances
- Type
- Promise.<Array.<Story>>
(async, static) assignedToMember(workspace) → {Promise.<Array.<Story>>}
Retrieves all stories assigned to the current workspace member.
Parameters:
Name | Type | Description |
---|---|---|
workspace |
Workspace | The current workspace |
- Source:
Returns:
A promise that resolves to an array of Story instances
- Type
- Promise.<Array.<Story>>
(async, static) assignedToMember(workspace) → {Promise.<Array.<Story>>}
Retrieves all stories assigned to the current workspace member.
Parameters:
Name | Type | Description |
---|---|---|
workspace |
Workspace | The current workspace |
- Source:
Returns:
A promise that resolves to an array of Story instances
- Type
- Promise.<Array.<Story>>
(static) parseStorySearchResults(results) → {Array.<Story>}
Parses story search results into Story instances.
Parameters:
Name | Type | Description |
---|---|---|
results |
StorySearchResults | The search results from Shortcut API |
- Source:
Returns:
An array of Story instances
- Type
- Array.<Story>
(static) parseStorySearchResults(results) → {Array.<Story>}
Parses story search results into Story instances.
Parameters:
Name | Type | Description |
---|---|---|
results |
StorySearchResults | The search results from Shortcut API |
- Source:
Returns:
An array of Story instances
- Type
- Array.<Story>
(async, static) pendingTasks(workspace, client) → {Promise.<Array.<Story>>}
Retrieves all stories with pending tasks for the current workspace member.
Parameters:
Name | Type | Description |
---|---|---|
workspace |
Workspace | The current workspace |
client |
ShortcutClient | The Shortcut API client |
- Source:
Returns:
A promise that resolves to an array of Story instances with pending tasks
- Type
- Promise.<Array.<Story>>
(async, static) pendingTasks(workspace, client) → {Promise.<Array.<Story>>}
Retrieves all stories with pending tasks for the current workspace member.
Parameters:
Name | Type | Description |
---|---|---|
workspace |
Workspace | The current workspace |
client |
ShortcutClient | The Shortcut API client |
- Source:
Returns:
A promise that resolves to an array of Story instances with pending tasks
- Type
- Promise.<Array.<Story>>
branchName(workspace) → {string}
Generates a git branch name for the story based on workspace member and story details.
Parameters:
Name | Type | Description |
---|---|---|
workspace |
Workspace | The current workspace |
- Source:
Returns:
The generated branch name
- Type
- string
branchName(workspace) → {string}
Generates a git branch name for the story based on workspace member and story details.
Parameters:
Name | Type | Description |
---|---|---|
workspace |
Workspace | The current workspace |
- Source:
Returns:
The generated branch name
- Type
- string
storyIdentifier() → {string}
Extracts the story identifier from the story's URL.
- Source:
Returns:
The story identifier
- Type
- string
storyIdentifier() → {string}
Extracts the story identifier from the story's URL.
- Source:
Returns:
The story identifier
- Type
- string