growsurf-ruby 1.1.1 → 1.1.2

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: 29876fdbf502b86b0f96ce35e6c28d81f4e225b37a214306595c344e7552a5cb
4
- data.tar.gz: 036aea5854c54da9166b77ca1a3e9c8437f4551332856f730d05387dc44759f6
3
+ metadata.gz: d8076462c15a156d463bf26bb5f654d2baf7a6795204be7b8ef79a9dd2ae2053
4
+ data.tar.gz: da320558ee220ff66aac11869a410cdcb402084b9563985763da99c47cce1755
5
5
  SHA512:
6
- metadata.gz: 8653bef46e7cca5d928f99fbff808dd91d2ce46eabf7381c407e63b13c0c6009306587d1162bd6c0c22a7eb00eb62f570be1d5eebc776b2e8adf3046c53160a4
7
- data.tar.gz: a7280a0256a42be4a2577f9070d2fc1132edc376b98d3131f8fc35172221e1ef3acc5934eb18d13c16492c7a6a25f54cdbc88c27fcd3fc579873a3569261b9b6
6
+ metadata.gz: d5c1d9647d05936815ddae19a40e12a06cf4d1ed469f27c86dc03b543b3abd9895923e494c4bb0f7a28ba50c0c219bafa78276c0feb15d94f08b43d40b59f908
7
+ data.tar.gz: fe5bcdf5683be8d8dbf038f33ca365d66d5959f5c3d3a5b7e9c8e9717e0970564d8d5ac9b6d625bbf1af24edda057405aacefd9f4a35e6cd7c48f2aac1023a51
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.2](https://github.com/growsurf/growsurf-ruby/compare/v1.1.1...v1.1.2) (2026-07-11)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * support retry-safe API key rotation ([939cd05](https://github.com/growsurf/growsurf-ruby/commit/939cd054446d85e411652ae77d37d4351c1ad6ab))
9
+
3
10
  ## [1.1.1](https://github.com/growsurf/growsurf-ruby/compare/v1.1.0...v1.1.1) (2026-07-09)
4
11
 
5
12
 
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "growsurf-ruby", "~> 1.1.1"
20
+ gem "growsurf-ruby", "~> 1.1.2"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -84,6 +84,7 @@ module GrowsurfRuby
84
84
  max_retries: max_retries,
85
85
  initial_retry_delay: initial_retry_delay,
86
86
  max_retry_delay: max_retry_delay,
87
+ idempotency_header: "Idempotency-Key",
87
88
  headers: headers
88
89
  )
89
90
 
@@ -5,13 +5,13 @@ module GrowsurfRuby
5
5
  # @see GrowsurfRuby::Resources::Account#rotate_api_key
6
6
  class AccountRotateAPIKeyResponse < GrowsurfRuby::Internal::Type::BaseModel
7
7
  # @!attribute api_key
8
- # The new API key. The previous key is revoked immediately.
8
+ # The new API key. Store it now; the key used for rotation stops working immediately.
9
9
  #
10
10
  # @return [String]
11
11
  required :api_key, String, api_name: :apiKey
12
12
 
13
13
  # @!method initialize(api_key:)
14
- # @param api_key [String] The new API key. The previous key is revoked immediately.
14
+ # @param api_key [String] The new API key. Store it now; the key used for rotation stops working immediately.
15
15
  end
16
16
  end
17
17
  end
@@ -4,9 +4,10 @@ module GrowsurfRuby
4
4
  module Resources
5
5
  class Account
6
6
  # Creates a new GrowSurf account. This is the only endpoint that does not require
7
- # an API key. The response includes an API key for the new account, but the key is
8
- # locked until the account's email address is verified: authenticated endpoints
9
- # outside the `Accounts` group return a `403` with error code
7
+ # an API key. The response includes an API key for the new account, shown once
8
+ # in the response. The key is locked until the account's email address is
9
+ # verified: authenticated endpoints outside the `Accounts` group return a `403`
10
+ # with error code
10
11
  # `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
11
12
  # /account/verification-email`, then retry). A welcome email is sent to the
12
13
  # address with the verification link and a set-password link for dashboard
@@ -91,10 +92,12 @@ module GrowsurfRuby
91
92
  )
92
93
  end
93
94
 
94
- # Generates a new API key and immediately revokes the old one. The key used to make
95
- # this request stops working as soon as the response is returned — update every
96
- # integration that used the old key with the new one. The account owner is
97
- # notified by email whenever the key is rotated.
95
+ # Generates a new API key and invalidates the key used for the request. The SDK
96
+ # sends a retry-safe `Idempotency-Key`, so automatic retries return the same
97
+ # replacement. Store the returned key, then update every integration that used
98
+ # the old key. The account owner is notified by email whenever the key is rotated.
99
+ # Requires an API key with `api_key:rotate`. This operation is available only through
100
+ # the REST API or a GrowSurf API SDK, not through MCP.
98
101
  #
99
102
  # @overload rotate_api_key(request_options: {})
100
103
  #
@@ -33,7 +33,8 @@ module GrowsurfRuby
33
33
  )
34
34
  end
35
35
 
36
- # Approves a manually approved reward earned by a participant.
36
+ # Approves a manually approved reward earned by a participant. Requires
37
+ # `reward:write`. Passing `fulfill: true` also requires `reward:fulfill`.
37
38
  #
38
39
  # @overload approve(reward_id, id:, fulfill: nil, request_options: {})
39
40
  #
@@ -63,7 +64,7 @@ module GrowsurfRuby
63
64
  )
64
65
  end
65
66
 
66
- # Marks an approved participant reward as fulfilled.
67
+ # Marks an approved participant reward as fulfilled. Requires `reward:fulfill`.
67
68
  #
68
69
  # @overload fulfill(reward_id, id:, request_options: {})
69
70
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GrowsurfRuby
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
@@ -11,13 +11,13 @@ module GrowsurfRuby
11
11
  )
12
12
  end
13
13
 
14
- # The new API key. The previous key is revoked immediately.
14
+ # The new API key. Store it now; the key used for rotation stops working immediately.
15
15
  sig { returns(String) }
16
16
  attr_accessor :api_key
17
17
 
18
18
  sig { params(api_key: String).returns(T.attached_class) }
19
19
  def self.new(
20
- # The new API key. The previous key is revoked immediately.
20
+ # The new API key. Store it now; the key used for rotation stops working immediately.
21
21
  api_key:
22
22
  )
23
23
  end
@@ -4,9 +4,10 @@ module GrowsurfRuby
4
4
  module Resources
5
5
  class Account
6
6
  # Creates a new GrowSurf account. This is the only endpoint that does not require
7
- # an API key. The response includes an API key for the new account, but the key is
8
- # locked until the account's email address is verified: authenticated endpoints
9
- # outside the `Accounts` group return a `403` with error code
7
+ # an API key. The response includes an API key for the new account, shown once
8
+ # in the response. The key is locked until the account's email address is
9
+ # verified: authenticated endpoints outside the `Accounts` group return a `403`
10
+ # with error code
10
11
  # `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
11
12
  # /account/verification-email`, then retry). A welcome email is sent to the
12
13
  # address with the verification link and a set-password link for dashboard
@@ -67,10 +68,12 @@ module GrowsurfRuby
67
68
  )
68
69
  end
69
70
 
70
- # Generates a new API key and immediately revokes the old one. The key used to make
71
- # this request stops working as soon as the response is returned — update every
72
- # integration that used the old key with the new one. The account owner is
73
- # notified by email whenever the key is rotated.
71
+ # Generates a new API key and invalidates the key used for the request. The SDK
72
+ # sends a retry-safe `Idempotency-Key`, so automatic retries return the same
73
+ # replacement. Store the returned key, then update every integration that used
74
+ # the old key. The account owner is notified by email whenever the key is rotated.
75
+ # Requires an API key with `api_key:rotate`. This operation is available only through
76
+ # the REST API or a GrowSurf API SDK, not through MCP.
74
77
  sig do
75
78
  params(request_options: GrowsurfRuby::RequestOptions::OrHash).returns(
76
79
  GrowsurfRuby::Models::AccountRotateAPIKeyResponse
@@ -23,7 +23,8 @@ module GrowsurfRuby
23
23
  )
24
24
  end
25
25
 
26
- # Approves a manually approved reward earned by a participant.
26
+ # Approves a manually approved reward earned by a participant. Requires
27
+ # `reward:write`. Passing `fulfill: true` also requires `reward:fulfill`.
27
28
  sig do
28
29
  params(
29
30
  reward_id: String,
@@ -43,7 +44,7 @@ module GrowsurfRuby
43
44
  )
44
45
  end
45
46
 
46
- # Marks an approved participant reward as fulfilled.
47
+ # Marks an approved participant reward as fulfilled. Requires `reward:fulfill`.
47
48
  sig do
48
49
  params(
49
50
  reward_id: String,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: growsurf-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Growsurf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-09 00:00:00.000000000 Z
11
+ date: 2026-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi