nahook 0.1.0 → 0.1.1
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 +4 -4
- data/lib/nahook/resources/endpoints.rb +5 -1
- data/lib/nahook/resources/portal_sessions.rb +5 -1
- data/lib/nahook/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 06f9b63028d18b1d6b6c6c1c89a1c2583c3407faf379e66cc21f8a15a4558829
|
|
4
|
+
data.tar.gz: 96c50392e9d71244838c5726168117481310e8f48b269ecb4305b97bd253e057
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 32e6ce367ebaa16276a0580ef1caea905e0926cf312223b7fdd6e2c0ce9628ba4498c4d15e040e336600d7d88c204c1d595ee5e12d34491b821b6bd875a859bf
|
|
7
|
+
data.tar.gz: 3fd57195f0019f5bfe8347a60fc0a317a0fc15e5b29525b55cf2de7e628ceb7205720df0d1dc940ee749756ef7901ad981a69325312bfd23ba05438fa22c6375
|
|
@@ -39,9 +39,12 @@ module Nahook
|
|
|
39
39
|
# @param config [Hash, nil] endpoint-specific configuration
|
|
40
40
|
# @param auth_username [String, nil] basic auth username
|
|
41
41
|
# @param auth_password [String, nil] basic auth password
|
|
42
|
+
# @param environment_id [String, nil] optional public id (e.g. "env_abc123") of the
|
|
43
|
+
# environment to scope this endpoint. If omitted, the workspace's
|
|
44
|
+
# default environment is used.
|
|
42
45
|
# @return [Hash] the created endpoint
|
|
43
46
|
def create(workspace_id, url:, type: nil, description: nil, metadata: nil, config: nil,
|
|
44
|
-
auth_username: nil, auth_password: nil)
|
|
47
|
+
auth_username: nil, auth_password: nil, environment_id: nil)
|
|
45
48
|
body = { "url" => url }
|
|
46
49
|
body["type"] = type if type
|
|
47
50
|
body["description"] = description if description
|
|
@@ -49,6 +52,7 @@ module Nahook
|
|
|
49
52
|
body["config"] = config if config
|
|
50
53
|
body["authUsername"] = auth_username if auth_username
|
|
51
54
|
body["authPassword"] = auth_password if auth_password
|
|
55
|
+
body["environmentId"] = environment_id if environment_id
|
|
52
56
|
|
|
53
57
|
@http.request(
|
|
54
58
|
method: :post,
|
|
@@ -25,10 +25,14 @@ module Nahook
|
|
|
25
25
|
# @param workspace_id [String] the workspace public ID
|
|
26
26
|
# @param app_id [String] the application public ID
|
|
27
27
|
# @param metadata [Hash, nil] optional metadata for the session
|
|
28
|
+
# @param role [String, nil] optional role for the portal session
|
|
29
|
+
# @param expires_in_minutes [Integer, nil] optional session lifetime in minutes
|
|
28
30
|
# @return [Hash] session with "url", "code", and "expiresAt" keys
|
|
29
|
-
def create(workspace_id, app_id, metadata: nil)
|
|
31
|
+
def create(workspace_id, app_id, metadata: nil, role: nil, expires_in_minutes: nil)
|
|
30
32
|
body = {}
|
|
31
33
|
body["metadata"] = metadata if metadata
|
|
34
|
+
body["role"] = role if role
|
|
35
|
+
body["expiresInMinutes"] = expires_in_minutes if expires_in_minutes
|
|
32
36
|
|
|
33
37
|
@http.request(
|
|
34
38
|
method: :post,
|
data/lib/nahook/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nahook
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nahook
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-05-25 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: faraday
|
|
@@ -56,6 +57,7 @@ metadata:
|
|
|
56
57
|
bug_tracker_uri: https://github.com/getnahook/nahook-ruby/issues
|
|
57
58
|
documentation_uri: https://docs.nahook.com/sdks/ruby
|
|
58
59
|
rubygems_mfa_required: 'true'
|
|
60
|
+
post_install_message:
|
|
59
61
|
rdoc_options: []
|
|
60
62
|
require_paths:
|
|
61
63
|
- lib
|
|
@@ -70,7 +72,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
70
72
|
- !ruby/object:Gem::Version
|
|
71
73
|
version: '0'
|
|
72
74
|
requirements: []
|
|
73
|
-
rubygems_version:
|
|
75
|
+
rubygems_version: 3.5.22
|
|
76
|
+
signing_key:
|
|
74
77
|
specification_version: 4
|
|
75
78
|
summary: Official Ruby SDK for the Nahook webhook platform
|
|
76
79
|
test_files: []
|