aha_builder_core 1.0.10 → 1.0.12

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f7d7e8eb61eea4472fc5960558e667e654e1cebaacddae46b1a01ed732298ef
4
- data.tar.gz: 535a6ddfcd22bf55c5b3a81f4e1763ea455e9e38a15f404c9faa7b7d2d9c4160
3
+ metadata.gz: 6f587457e1e82ad9b4a22fd94b57e5bbd05e5ff6763f6bae6e085fac11393f1e
4
+ data.tar.gz: 7ef22938cdbc4c7a6e39a9c60c5534457db865c96a5fffd3f857e8d21e2c90c7
5
5
  SHA512:
6
- metadata.gz: 165ef19eb864fb64c1ee7518f6a3ae1a61da09781e99d31eecff2ce5a2d0f4a5d660c42afa4e62c33dc00892cd06f75642cd0de09e6852b79305504ec34997d2
7
- data.tar.gz: 3d0a95fafd99aab8e4973245512c48c7daa36333379a230a1d0206c9bcfed608948101205df65789587f37e24faacd890b26dd91e57af4a38365fe57a4480e4e
6
+ metadata.gz: 1cc85c41ce5216bbed1044ad8c2dc0425562370a536638236313bfee9d883446a01562e05fb4258d2be19bbaac9c4d93d97c0990e4704a977b7e6c3ce13c48e7
7
+ data.tar.gz: 1cd8e3729355ecb16c09ebe1a8106062aa7ec9653ebdaa040fb7e9dd5e574fe0f3ffddd47fb8229d52adbf598a53c59e73e2fff8039bfd102f8df0f39dd9a470
data/README.md CHANGED
@@ -178,3 +178,27 @@ rescue Aha::Auth::ApiError => e
178
178
  # Other API error, check e.status and e.body
179
179
  end
180
180
  ```
181
+
182
+ ## User Guide
183
+
184
+ Access user guide pages created in Aha! for your application. The user guide is made up of many pages.
185
+
186
+ ```ruby
187
+ # Get the table of contents (all pages, metadata only)
188
+ result = Aha::UserGuide.table_of_contents
189
+ pages = result[:pages] # Array of page hashes without content.
190
+
191
+ # Load a specific page with HTML content
192
+ page = Aha::UserGuide.load_page(id)
193
+ html_content = page["content_html"]
194
+ ```
195
+
196
+ ### Page Structure
197
+
198
+ Each page hash contains:
199
+ - `id` - Page ID
200
+ - `name` - Page title
201
+ - `parent_id` - Parent page ID for building table of contents hierarchy (nil for top level pages)
202
+ - `position` - Sort order (integer)
203
+ - `children_count` - Number of child pages
204
+ - `content_html` - HTML content (only in `load_page` response)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aha
4
4
  module Auth
5
- VERSION = "1.0.10"
5
+ VERSION = "1.0.12"
6
6
  end
7
7
  end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aha
4
+ module UserGuide
5
+ class << self
6
+ def table_of_contents
7
+ response = client.send(:get, "/api/core/user_guide/table_of_contents")
8
+ {
9
+ pages: response["pages"] || []
10
+ }
11
+ end
12
+
13
+ def load_page(id)
14
+ client.send(:get, "/api/core/user_guide/pages/#{id}")
15
+ end
16
+
17
+ private
18
+
19
+ def client
20
+ Aha::Auth.send(:client)
21
+ end
22
+ end
23
+ end
24
+ end
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "aha/auth"
4
+ require_relative "aha/user_guide"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aha_builder_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aha! Labs Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-14 00:00:00.000000000 Z
11
+ date: 2026-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -124,6 +124,7 @@ files:
124
124
  - lib/aha/auth/user.rb
125
125
  - lib/aha/auth/users_resource.rb
126
126
  - lib/aha/auth/version.rb
127
+ - lib/aha/user_guide.rb
127
128
  - lib/aha_builder_core.rb
128
129
  - lib/generators/aha_builder_core/auth/USAGE
129
130
  - lib/generators/aha_builder_core/auth/auth_generator.rb