lex-aha 0.1.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.
- checksums.yaml +7 -0
- data/.github/workflows/ci.yml +16 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.rubocop.yml +66 -0
- data/CHANGELOG.md +12 -0
- data/CLAUDE.md +88 -0
- data/Dockerfile +6 -0
- data/Gemfile +12 -0
- data/LICENSE +21 -0
- data/README.md +62 -0
- data/lex-aha.gemspec +30 -0
- data/lib/legion/extensions/aha/base_client.rb +23 -0
- data/lib/legion/extensions/aha/core/client.rb +42 -0
- data/lib/legion/extensions/aha/core/runners/admin.rb +65 -0
- data/lib/legion/extensions/aha/core/runners/attachments.rb +39 -0
- data/lib/legion/extensions/aha/core/runners/audits.rb +37 -0
- data/lib/legion/extensions/aha/core/runners/comments.rb +66 -0
- data/lib/legion/extensions/aha/core/runners/custom_fields.rb +59 -0
- data/lib/legion/extensions/aha/core/runners/custom_table_records.rb +42 -0
- data/lib/legion/extensions/aha/core/runners/integrations.rb +49 -0
- data/lib/legion/extensions/aha/core/runners/me.rb +35 -0
- data/lib/legion/extensions/aha/core/runners/record_links.rb +42 -0
- data/lib/legion/extensions/aha/core/runners/teams.rb +71 -0
- data/lib/legion/extensions/aha/core/runners/todos.rb +59 -0
- data/lib/legion/extensions/aha/core/runners/users.rb +49 -0
- data/lib/legion/extensions/aha/core/runners/webhooks.rb +25 -0
- data/lib/legion/extensions/aha/core/runners/workflows.rb +30 -0
- data/lib/legion/extensions/aha/core.rb +26 -0
- data/lib/legion/extensions/aha/helpers/client.rb +23 -0
- data/lib/legion/extensions/aha/ideas/client.rb +30 -0
- data/lib/legion/extensions/aha/ideas/runners/idea_categories.rb +25 -0
- data/lib/legion/extensions/aha/ideas/runners/idea_comments.rb +40 -0
- data/lib/legion/extensions/aha/ideas/runners/idea_organizations.rb +45 -0
- data/lib/legion/extensions/aha/ideas/runners/idea_portals.rb +30 -0
- data/lib/legion/extensions/aha/ideas/runners/idea_subscriptions.rb +40 -0
- data/lib/legion/extensions/aha/ideas/runners/idea_users.rb +45 -0
- data/lib/legion/extensions/aha/ideas/runners/idea_votes.rb +50 -0
- data/lib/legion/extensions/aha/ideas/runners/ideas.rb +55 -0
- data/lib/legion/extensions/aha/ideas.rb +20 -0
- data/lib/legion/extensions/aha/knowledge/client.rb +20 -0
- data/lib/legion/extensions/aha/knowledge/runners/knowledge_bases.rb +29 -0
- data/lib/legion/extensions/aha/knowledge/runners/notes.rb +44 -0
- data/lib/legion/extensions/aha/knowledge/runners/pages.rb +44 -0
- data/lib/legion/extensions/aha/knowledge.rb +15 -0
- data/lib/legion/extensions/aha/roadmaps/client.rb +42 -0
- data/lib/legion/extensions/aha/roadmaps/runners/capacity.rb +54 -0
- data/lib/legion/extensions/aha/roadmaps/runners/competitors.rb +44 -0
- data/lib/legion/extensions/aha/roadmaps/runners/epics.rb +59 -0
- data/lib/legion/extensions/aha/roadmaps/runners/features.rb +59 -0
- data/lib/legion/extensions/aha/roadmaps/runners/goals.rb +54 -0
- data/lib/legion/extensions/aha/roadmaps/runners/initiatives.rb +54 -0
- data/lib/legion/extensions/aha/roadmaps/runners/key_results.rb +44 -0
- data/lib/legion/extensions/aha/roadmaps/runners/personas.rb +44 -0
- data/lib/legion/extensions/aha/roadmaps/runners/products.rb +34 -0
- data/lib/legion/extensions/aha/roadmaps/runners/release_phases.rb +49 -0
- data/lib/legion/extensions/aha/roadmaps/runners/releases.rb +49 -0
- data/lib/legion/extensions/aha/roadmaps/runners/requirements.rb +44 -0
- data/lib/legion/extensions/aha/roadmaps/runners/roll_up_releases.rb +39 -0
- data/lib/legion/extensions/aha/roadmaps/runners/strategy.rb +49 -0
- data/lib/legion/extensions/aha/roadmaps.rb +26 -0
- data/lib/legion/extensions/aha/version.rb +9 -0
- data/lib/legion/extensions/aha.rb +17 -0
- metadata +122 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 4edcbc42b570b10bda7fa2491a1ec5086d3952c26849607f282ef1494aaf40f6
|
|
4
|
+
data.tar.gz: 5b1da0f466468dee0781f175f076784fa9eb1409cd25569e564fce5dee62c72d
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b5e74963b6182b339137cb5d6d3b8e87c39583900ce1c2ad3409a2036b5a1e935ac7c44e0f40f0caaef8645678b1fde17f540fa9dd6acc03f7c9986aa683f723
|
|
7
|
+
data.tar.gz: 5a7ef453860736c3477a0de40c8be57c2c68648cbcba2b427dc21605f0479512e5fec9bf740f46505e8863690667f839b614e1c6d147cb57385ced8d8495676c
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
ci:
|
|
9
|
+
uses: LegionIO/.github/.github/workflows/ci.yml@main
|
|
10
|
+
|
|
11
|
+
release:
|
|
12
|
+
needs: ci
|
|
13
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
14
|
+
uses: LegionIO/.github/.github/workflows/release.yml@main
|
|
15
|
+
secrets:
|
|
16
|
+
rubygems-api-key: ${{ secrets.RUBYGEMS_API_KEY }}
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
TargetRubyVersion: 3.4
|
|
3
|
+
NewCops: enable
|
|
4
|
+
SuggestExtensions: false
|
|
5
|
+
|
|
6
|
+
Layout/LineLength:
|
|
7
|
+
Max: 160
|
|
8
|
+
|
|
9
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
|
10
|
+
EnforcedStyle: space
|
|
11
|
+
|
|
12
|
+
Layout/HashAlignment:
|
|
13
|
+
EnforcedHashRocketStyle: table
|
|
14
|
+
EnforcedColonStyle: table
|
|
15
|
+
|
|
16
|
+
Metrics/MethodLength:
|
|
17
|
+
Max: 50
|
|
18
|
+
|
|
19
|
+
Metrics/ClassLength:
|
|
20
|
+
Max: 1500
|
|
21
|
+
|
|
22
|
+
Metrics/ModuleLength:
|
|
23
|
+
Max: 1500
|
|
24
|
+
|
|
25
|
+
Metrics/BlockLength:
|
|
26
|
+
Max: 40
|
|
27
|
+
Exclude:
|
|
28
|
+
- 'spec/**/*'
|
|
29
|
+
|
|
30
|
+
Metrics/AbcSize:
|
|
31
|
+
Max: 60
|
|
32
|
+
|
|
33
|
+
Metrics/CyclomaticComplexity:
|
|
34
|
+
Max: 15
|
|
35
|
+
|
|
36
|
+
Metrics/PerceivedComplexity:
|
|
37
|
+
Max: 17
|
|
38
|
+
|
|
39
|
+
Metrics/ParameterLists:
|
|
40
|
+
Max: 10
|
|
41
|
+
|
|
42
|
+
Style/Documentation:
|
|
43
|
+
Enabled: false
|
|
44
|
+
|
|
45
|
+
Style/SymbolArray:
|
|
46
|
+
Enabled: true
|
|
47
|
+
|
|
48
|
+
Style/FrozenStringLiteralComment:
|
|
49
|
+
Enabled: true
|
|
50
|
+
EnforcedStyle: always
|
|
51
|
+
|
|
52
|
+
Naming/FileName:
|
|
53
|
+
Enabled: false
|
|
54
|
+
|
|
55
|
+
Naming/PredicateMethod:
|
|
56
|
+
Enabled: false
|
|
57
|
+
|
|
58
|
+
Naming/PredicatePrefix:
|
|
59
|
+
Enabled: false
|
|
60
|
+
|
|
61
|
+
Gemspec/DevelopmentDependencies:
|
|
62
|
+
Enabled: false
|
|
63
|
+
|
|
64
|
+
Lint/EmptyClass:
|
|
65
|
+
Exclude:
|
|
66
|
+
- 'spec/**/*'
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.1.0] - 2026-04-02
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Initial release with 4 sub-modules: Roadmaps, Ideas, Knowledge, Core
|
|
8
|
+
- 39 runner modules covering 198 Aha! API v1 endpoints
|
|
9
|
+
- Shared Helpers::Client with Bearer token auth and subdomain-based URL
|
|
10
|
+
- BaseClient for sub-module client inheritance
|
|
11
|
+
- Standalone Client classes for each sub-module
|
|
12
|
+
- Full RSpec test suite
|
data/CLAUDE.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# lex-aha: Aha! Integration for LegionIO
|
|
2
|
+
|
|
3
|
+
**Repository Level 3 Documentation**
|
|
4
|
+
- **Category**: `/Users/miverso2/rubymine/legion/extensions-other/CLAUDE.md`
|
|
5
|
+
|
|
6
|
+
## Purpose
|
|
7
|
+
|
|
8
|
+
Legion Extension that connects LegionIO to the Aha! product management platform. Monolith-style extension with 4 sub-modules covering 198 API endpoints across 39 runners.
|
|
9
|
+
|
|
10
|
+
**GitHub**: https://github.com/LegionIO/lex-aha
|
|
11
|
+
**License**: MIT
|
|
12
|
+
|
|
13
|
+
## Architecture
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Legion::Extensions::Aha
|
|
17
|
+
├── Helpers::Client # Shared Faraday connection (Bearer auth, subdomain-based URL)
|
|
18
|
+
├── BaseClient # Shared base class for sub-module clients
|
|
19
|
+
├── Roadmaps/ # Aha! Roadmaps product
|
|
20
|
+
│ ├── Runners::Products # Product CRUD
|
|
21
|
+
│ ├── Runners::Releases # Release management + phases + roll-ups
|
|
22
|
+
│ ├── Runners::Features # Feature CRUD + convert to epic
|
|
23
|
+
│ ├── Runners::Epics # Epic CRUD
|
|
24
|
+
│ ├── Runners::Requirements # Requirement CRUD + convert to feature
|
|
25
|
+
│ ├── Runners::Initiatives # Initiative CRUD
|
|
26
|
+
│ ├── Runners::Goals # Goal CRUD
|
|
27
|
+
│ ├── Runners::KeyResults # Key result CRUD
|
|
28
|
+
│ ├── Runners::Strategy # Strategic models, positionings, visions
|
|
29
|
+
│ ├── Runners::Competitors # Competitor analysis
|
|
30
|
+
│ ├── Runners::Personas # Product personas
|
|
31
|
+
│ ├── Runners::Capacity # Capacity planning (scenarios, investments, estimates)
|
|
32
|
+
│ └── Client # Standalone Roadmaps client (< BaseClient)
|
|
33
|
+
├── Ideas/ # Aha! Ideas product
|
|
34
|
+
│ ├── Runners::Ideas # Idea CRUD + promote + related
|
|
35
|
+
│ ├── Runners::IdeaComments # Portal-visible comments
|
|
36
|
+
│ ├── Runners::IdeaPortals # Portal configuration
|
|
37
|
+
│ ├── Runners::IdeaOrganizations # Organization management
|
|
38
|
+
│ ├── Runners::IdeaUsers # Idea portal users
|
|
39
|
+
│ ├── Runners::IdeaVotes # Endorsements/votes
|
|
40
|
+
│ ├── Runners::IdeaSubscriptions # Subscription management
|
|
41
|
+
│ ├── Runners::IdeaCategories # Category listing
|
|
42
|
+
│ └── Client # Standalone Ideas client (< BaseClient)
|
|
43
|
+
├── Knowledge/ # Aha! Knowledge product
|
|
44
|
+
│ ├── Runners::KnowledgeBases # Knowledge base listing
|
|
45
|
+
│ ├── Runners::Pages # Knowledge base page CRUD
|
|
46
|
+
│ ├── Runners::Notes # Product note CRUD
|
|
47
|
+
│ └── Client # Standalone Knowledge client (< BaseClient)
|
|
48
|
+
└── Core/ # Cross-product resources
|
|
49
|
+
├── Runners::Users # User management + product roles
|
|
50
|
+
├── Runners::Teams # Team CRUD + memberships
|
|
51
|
+
├── Runners::Me # Current user profile + assigned records
|
|
52
|
+
├── Runners::Comments # Comments on any record type
|
|
53
|
+
├── Runners::Attachments # Attachment management
|
|
54
|
+
├── Runners::Todos # To-do/task management
|
|
55
|
+
├── Runners::RecordLinks # Cross-record linking
|
|
56
|
+
├── Runners::CustomFields # Custom field definitions + options + layouts
|
|
57
|
+
├── Runners::CustomTableRecords # Custom table record CRUD
|
|
58
|
+
├── Runners::Integrations # Integration management
|
|
59
|
+
├── Runners::Workflows # Workflow listing
|
|
60
|
+
├── Runners::Audits # Audit trail + historical search
|
|
61
|
+
├── Runners::Webhooks # Webhook validation
|
|
62
|
+
├── Runners::Admin # Account backups, deletions, identity providers, paid seats, schedules
|
|
63
|
+
└── Client # Standalone Core client (< BaseClient)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Authentication
|
|
67
|
+
|
|
68
|
+
- Bearer token via `Authorization` header
|
|
69
|
+
- Base URL: `https://{subdomain}.aha.io/api/v1`
|
|
70
|
+
- API keys generated at `https://secure.aha.io/settings/api_keys`
|
|
71
|
+
|
|
72
|
+
## Dependencies
|
|
73
|
+
|
|
74
|
+
| Gem | Purpose |
|
|
75
|
+
|-----|---------|
|
|
76
|
+
| `faraday` >= 2.0 | HTTP client for Aha! REST API |
|
|
77
|
+
|
|
78
|
+
## Testing
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
bundle install
|
|
82
|
+
bundle exec rspec
|
|
83
|
+
bundle exec rubocop
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
**Maintained By**: Matthew Iverson (@Esity)
|
data/Dockerfile
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Esity
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# lex-aha
|
|
2
|
+
|
|
3
|
+
Aha! product management integration for [LegionIO](https://github.com/LegionIO/LegionIO). Provides runners for the full Aha! REST API v1 across four sub-modules matching Aha! product lines.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
gem install lex-aha
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Sub-modules
|
|
12
|
+
|
|
13
|
+
### Roadmaps (`Legion::Extensions::Aha::Roadmaps::Client`)
|
|
14
|
+
|
|
15
|
+
Products, Releases, Release Phases, Roll-up Releases, Features, Epics, Requirements, Initiatives, Goals, Key Results, Strategy, Competitors, Personas, Capacity
|
|
16
|
+
|
|
17
|
+
### Ideas (`Legion::Extensions::Aha::Ideas::Client`)
|
|
18
|
+
|
|
19
|
+
Ideas, Idea Comments, Idea Portals, Idea Organizations, Idea Users, Idea Votes, Idea Subscriptions, Idea Categories
|
|
20
|
+
|
|
21
|
+
### Knowledge (`Legion::Extensions::Aha::Knowledge::Client`)
|
|
22
|
+
|
|
23
|
+
Knowledge Bases, Pages, Notes
|
|
24
|
+
|
|
25
|
+
### Core (`Legion::Extensions::Aha::Core::Client`)
|
|
26
|
+
|
|
27
|
+
Users, Teams, Me, Comments, Attachments, To-dos, Record Links, Custom Fields, Custom Table Records, Integrations, Workflows, Audits, Webhooks, Admin
|
|
28
|
+
|
|
29
|
+
## Standalone Usage
|
|
30
|
+
|
|
31
|
+
```ruby
|
|
32
|
+
require 'legion/extensions/aha'
|
|
33
|
+
|
|
34
|
+
roadmaps = Legion::Extensions::Aha::Roadmaps::Client.new(
|
|
35
|
+
subdomain: 'yourcompany',
|
|
36
|
+
api_key: 'your-api-key'
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
products = roadmaps.list_products
|
|
40
|
+
features = roadmaps.list_features_in_product(product_id: 'PROD-1')
|
|
41
|
+
|
|
42
|
+
ideas = Legion::Extensions::Aha::Ideas::Client.new(
|
|
43
|
+
subdomain: 'yourcompany',
|
|
44
|
+
api_key: 'your-api-key'
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
all_ideas = ideas.list_ideas
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Authentication
|
|
51
|
+
|
|
52
|
+
Aha! supports Bearer token authentication. Generate API keys at `https://secure.aha.io/settings/api_keys`.
|
|
53
|
+
|
|
54
|
+
## Requirements
|
|
55
|
+
|
|
56
|
+
- Ruby >= 3.4
|
|
57
|
+
- [LegionIO](https://github.com/LegionIO/LegionIO) framework (optional, for runner/actor integration)
|
|
58
|
+
- Aha! account with API access
|
|
59
|
+
|
|
60
|
+
## License
|
|
61
|
+
|
|
62
|
+
MIT
|
data/lex-aha.gemspec
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'lib/legion/extensions/aha/version'
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = 'lex-aha'
|
|
7
|
+
spec.version = Legion::Extensions::Aha::VERSION
|
|
8
|
+
spec.authors = ['Esity']
|
|
9
|
+
spec.email = ['matthewdiverson@gmail.com']
|
|
10
|
+
|
|
11
|
+
spec.summary = 'LEX Aha'
|
|
12
|
+
spec.description = 'Connects LegionIO to the Aha! product management platform'
|
|
13
|
+
spec.homepage = 'https://github.com/LegionIO/lex-aha'
|
|
14
|
+
spec.license = 'MIT'
|
|
15
|
+
spec.required_ruby_version = '>= 3.4'
|
|
16
|
+
|
|
17
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
|
18
|
+
spec.metadata['source_code_uri'] = 'https://github.com/LegionIO/lex-aha'
|
|
19
|
+
spec.metadata['documentation_uri'] = 'https://github.com/LegionIO/lex-aha'
|
|
20
|
+
spec.metadata['changelog_uri'] = 'https://github.com/LegionIO/lex-aha/blob/main/CHANGELOG.md'
|
|
21
|
+
spec.metadata['bug_tracker_uri'] = 'https://github.com/LegionIO/lex-aha/issues'
|
|
22
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
23
|
+
|
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
25
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
26
|
+
end
|
|
27
|
+
spec.require_paths = ['lib']
|
|
28
|
+
|
|
29
|
+
spec.add_dependency 'faraday', '>= 2.0'
|
|
30
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'helpers/client'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module Extensions
|
|
7
|
+
module Aha
|
|
8
|
+
class BaseClient
|
|
9
|
+
include Helpers::Client
|
|
10
|
+
|
|
11
|
+
attr_reader :opts
|
|
12
|
+
|
|
13
|
+
def initialize(subdomain:, api_key:, **)
|
|
14
|
+
@opts = { subdomain: subdomain, api_key: api_key }.compact
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def client(**override)
|
|
18
|
+
super(**@opts, **override)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative '../base_client'
|
|
4
|
+
require_relative 'runners/users'
|
|
5
|
+
require_relative 'runners/teams'
|
|
6
|
+
require_relative 'runners/me'
|
|
7
|
+
require_relative 'runners/comments'
|
|
8
|
+
require_relative 'runners/attachments'
|
|
9
|
+
require_relative 'runners/todos'
|
|
10
|
+
require_relative 'runners/record_links'
|
|
11
|
+
require_relative 'runners/custom_fields'
|
|
12
|
+
require_relative 'runners/custom_table_records'
|
|
13
|
+
require_relative 'runners/integrations'
|
|
14
|
+
require_relative 'runners/workflows'
|
|
15
|
+
require_relative 'runners/audits'
|
|
16
|
+
require_relative 'runners/webhooks'
|
|
17
|
+
require_relative 'runners/admin'
|
|
18
|
+
|
|
19
|
+
module Legion
|
|
20
|
+
module Extensions
|
|
21
|
+
module Aha
|
|
22
|
+
module Core
|
|
23
|
+
class Client < Legion::Extensions::Aha::BaseClient
|
|
24
|
+
include Runners::Users
|
|
25
|
+
include Runners::Teams
|
|
26
|
+
include Runners::Me
|
|
27
|
+
include Runners::Comments
|
|
28
|
+
include Runners::Attachments
|
|
29
|
+
include Runners::Todos
|
|
30
|
+
include Runners::RecordLinks
|
|
31
|
+
include Runners::CustomFields
|
|
32
|
+
include Runners::CustomTableRecords
|
|
33
|
+
include Runners::Integrations
|
|
34
|
+
include Runners::Workflows
|
|
35
|
+
include Runners::Audits
|
|
36
|
+
include Runners::Webhooks
|
|
37
|
+
include Runners::Admin
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'legion/extensions/aha/helpers/client'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module Extensions
|
|
7
|
+
module Aha
|
|
8
|
+
module Core
|
|
9
|
+
module Runners
|
|
10
|
+
module Admin
|
|
11
|
+
extend Legion::Extensions::Aha::Helpers::Client
|
|
12
|
+
|
|
13
|
+
def list_account_backups(**)
|
|
14
|
+
response = client(**).get('/account_backups')
|
|
15
|
+
{ result: response.body, status: response.status }
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def create_account_backup(**)
|
|
19
|
+
response = client(**).post('/account_backups')
|
|
20
|
+
{ result: response.body, status: response.status }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def get_account_backup(id:, **)
|
|
24
|
+
response = client(**).get("/account_backups/#{id}")
|
|
25
|
+
{ result: response.body, status: response.status }
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def list_deletions(**)
|
|
29
|
+
response = client(**).get('/deletions')
|
|
30
|
+
{ result: response.body, status: response.status }
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def restore_deletion(id:, **)
|
|
34
|
+
response = client(**).post("/deletions/#{id}/restore")
|
|
35
|
+
{ result: response.body, status: response.status }
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def list_identity_providers(**)
|
|
39
|
+
response = client(**).get('/identity_providers')
|
|
40
|
+
{ result: response.body, status: response.status }
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def get_identity_provider(id:, **)
|
|
44
|
+
response = client(**).get("/identity_providers/#{id}")
|
|
45
|
+
{ result: response.body, status: response.status }
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def list_paid_seat_groups(**)
|
|
49
|
+
response = client(**).get('/paid_seat_groups')
|
|
50
|
+
{ result: response.body, status: response.status }
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def list_schedules(**)
|
|
54
|
+
response = client(**).get('/schedules')
|
|
55
|
+
{ result: response.body, status: response.status }
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
|
|
59
|
+
Legion::Extensions::Helpers.const_defined?(:Lex)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'legion/extensions/aha/helpers/client'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module Extensions
|
|
7
|
+
module Aha
|
|
8
|
+
module Core
|
|
9
|
+
module Runners
|
|
10
|
+
module Attachments
|
|
11
|
+
extend Legion::Extensions::Aha::Helpers::Client
|
|
12
|
+
|
|
13
|
+
def create_attachment_on_comment(comment_id:, attachment:, **)
|
|
14
|
+
response = client(**).post("/comments/#{comment_id}/attachments") do |req|
|
|
15
|
+
req.body = attachment
|
|
16
|
+
end
|
|
17
|
+
{ result: response.body, status: response.status }
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def create_attachment_on_note(note_id:, attachment:, **)
|
|
21
|
+
response = client(**).post("/notes/#{note_id}/attachments") do |req|
|
|
22
|
+
req.body = attachment
|
|
23
|
+
end
|
|
24
|
+
{ result: response.body, status: response.status }
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def delete_attachment(attachment_id:, **)
|
|
28
|
+
response = client(**).delete("/attachments/#{attachment_id}")
|
|
29
|
+
{ result: response.body, status: response.status }
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
|
|
33
|
+
Legion::Extensions::Helpers.const_defined?(:Lex)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'legion/extensions/aha/helpers/client'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module Extensions
|
|
7
|
+
module Aha
|
|
8
|
+
module Core
|
|
9
|
+
module Runners
|
|
10
|
+
module Audits
|
|
11
|
+
extend Legion::Extensions::Aha::Helpers::Client
|
|
12
|
+
|
|
13
|
+
def list_audits(**)
|
|
14
|
+
response = client(**).get('/audits')
|
|
15
|
+
{ result: response.body, status: response.status }
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def list_historical_audits(**)
|
|
19
|
+
response = client(**).get('/historical_audits')
|
|
20
|
+
{ result: response.body, status: response.status }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def create_historical_audit_search(historical_audit:, **)
|
|
24
|
+
response = client(**).post('/historical_audits') do |req|
|
|
25
|
+
req.body = { historical_audit: historical_audit }
|
|
26
|
+
end
|
|
27
|
+
{ result: response.body, status: response.status }
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
|
|
31
|
+
Legion::Extensions::Helpers.const_defined?(:Lex)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'legion/extensions/aha/helpers/client'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module Extensions
|
|
7
|
+
module Aha
|
|
8
|
+
module Core
|
|
9
|
+
module Runners
|
|
10
|
+
module Comments
|
|
11
|
+
extend Legion::Extensions::Aha::Helpers::Client
|
|
12
|
+
|
|
13
|
+
def list_comments_on_feature(feature_id:, **)
|
|
14
|
+
response = client(**).get("/features/#{feature_id}/comments")
|
|
15
|
+
{ result: response.body, status: response.status }
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def create_comment_on_feature(feature_id:, comment:, **)
|
|
19
|
+
response = client(**).post("/features/#{feature_id}/comments") do |req|
|
|
20
|
+
req.body = { comment: comment }
|
|
21
|
+
end
|
|
22
|
+
{ result: response.body, status: response.status }
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def list_comments_on_idea(idea_id:, **)
|
|
26
|
+
response = client(**).get("/ideas/#{idea_id}/comments")
|
|
27
|
+
{ result: response.body, status: response.status }
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def create_comment_on_idea(idea_id:, comment:, **)
|
|
31
|
+
response = client(**).post("/ideas/#{idea_id}/comments") do |req|
|
|
32
|
+
req.body = { comment: comment }
|
|
33
|
+
end
|
|
34
|
+
{ result: response.body, status: response.status }
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def list_comments_in_product(product_id:, **)
|
|
38
|
+
response = client(**).get("/products/#{product_id}/comments")
|
|
39
|
+
{ result: response.body, status: response.status }
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def get_comment(id:, **)
|
|
43
|
+
response = client(**).get("/comments/#{id}")
|
|
44
|
+
{ result: response.body, status: response.status }
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def update_comment(id:, comment:, **)
|
|
48
|
+
response = client(**).put("/comments/#{id}") do |req|
|
|
49
|
+
req.body = { comment: comment }
|
|
50
|
+
end
|
|
51
|
+
{ result: response.body, status: response.status }
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def delete_comment(id:, **)
|
|
55
|
+
response = client(**).delete("/comments/#{id}")
|
|
56
|
+
{ result: response.body, status: response.status }
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
|
|
60
|
+
Legion::Extensions::Helpers.const_defined?(:Lex)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|