zyphr 0.1.44 → 0.1.46

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: bdb232c25df3ba83aad2f1e205941038b186be722997d3f4a0b9a4d4866c5fec
4
- data.tar.gz: c5e28ca2a16b510deca00ff1f99d769f273363bdde11c34afcd8617df54860e4
3
+ metadata.gz: 77f15d268b6cde06333ab1c4730afbd297f5f5eab479921e5e43b65704f78f8a
4
+ data.tar.gz: b1018ca20b1b79c6e8eb6dbab973e046175ee9e3950bbb96fa734e608f12893a
5
5
  SHA512:
6
- metadata.gz: 187ff2bea23ac4b9bd35b5c999a63f25a14e659924d5382d57062fae4a0d20ebb8a64eca421ceb1b517ef17ff855f8465ee9e9a8f64c962af4088f975df3dcd9
7
- data.tar.gz: 54e87dc5d28157446a0feb49196231cf49789db4f2f87982fc2cffde9d2efced47d662e42bd4fa5610f28c64ff19d73900cf65c69b4eaa6fdcbaffab66d6e8f4
6
+ metadata.gz: b918028f5a8ebf48f6573951e75b17fdee5f96ea7943416e9240f513be9f3b9204fee331e52ca355d82eb9ad111198ba5cf53bbcd7fe02641ef924d04e0aab24
7
+ data.tar.gz: 0e714ffc0bddf9ca677f420e2a97a4e4f1ae63612dd4935a417c0fb0a0f3c0cfb7a407a577a0b43a41819bdd9a012ae28259ce4cf138488b10e4d086abaf5f13
data/README.md CHANGED
@@ -138,6 +138,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
138
138
  Class | Method | HTTP request | Description
139
139
  ------------ | ------------- | ------------- | -------------
140
140
  *Zyphr::AuthApplicationApi* | [**get_self_application**](docs/AuthApplicationApi.md#get_self_application) | **GET** /auth/application | Get the authenticating application
141
+ *Zyphr::AuthApplicationApi* | [**set_self_application_test_recipients**](docs/AuthApplicationApi.md#set_self_application_test_recipients) | **PATCH** /auth/application | Set the authenticating application's auth-email test allowlist
141
142
  *Zyphr::AuthEmailOTPApi* | [**check_email_otp_availability**](docs/AuthEmailOTPApi.md#check_email_otp_availability) | **GET** /auth/email-otp/available | Check email OTP availability
142
143
  *Zyphr::AuthEmailOTPApi* | [**send_email_otp_login**](docs/AuthEmailOTPApi.md#send_email_otp_login) | **POST** /auth/email-otp/login/send | Send email OTP for login
143
144
  *Zyphr::AuthEmailOTPApi* | [**send_email_otp_registration**](docs/AuthEmailOTPApi.md#send_email_otp_registration) | **POST** /auth/email-otp/register/send | Send email OTP for registration
@@ -211,6 +212,7 @@ Class | Method | HTTP request | Description
211
212
  *Zyphr::AuthUserDirectoryApi* | [**list_end_users**](docs/AuthUserDirectoryApi.md#list_end_users) | **GET** /auth/users | List / search end users (server-side admin)
212
213
  *Zyphr::AuthUserDirectoryApi* | [**set_end_user_claims**](docs/AuthUserDirectoryApi.md#set_end_user_claims) | **PUT** /auth/users/{user_id}/claims | Set an end user's stored custom claims (server-side admin)
213
214
  *Zyphr::AuthUserDirectoryApi* | [**update_end_user_by_application**](docs/AuthUserDirectoryApi.md#update_end_user_by_application) | **PATCH** /auth/users/{user_id} | Update an end user (server-side admin)
215
+ *Zyphr::AuthUserProfileApi* | [**change_end_user_password**](docs/AuthUserProfileApi.md#change_end_user_password) | **POST** /auth/users/change-password | Change password (authenticated session)
214
216
  *Zyphr::AuthUserProfileApi* | [**delete_end_user**](docs/AuthUserProfileApi.md#delete_end_user) | **DELETE** /auth/users/me | Delete current end user account
215
217
  *Zyphr::AuthUserProfileApi* | [**get_end_user**](docs/AuthUserProfileApi.md#get_end_user) | **GET** /auth/users/me | Get current end user profile
216
218
  *Zyphr::AuthUserProfileApi* | [**update_end_user**](docs/AuthUserProfileApi.md#update_end_user) | **PATCH** /auth/users/me | Update current end user profile
@@ -440,6 +442,7 @@ Class | Method | HTTP request | Description
440
442
  - [Zyphr::Category](docs/Category.md)
441
443
  - [Zyphr::CategoryListResponse](docs/CategoryListResponse.md)
442
444
  - [Zyphr::CategoryResponse](docs/CategoryResponse.md)
445
+ - [Zyphr::ChangePasswordRequest](docs/ChangePasswordRequest.md)
443
446
  - [Zyphr::CloseWaaSEndpointCircuit200Response](docs/CloseWaaSEndpointCircuit200Response.md)
444
447
  - [Zyphr::CloseWaaSEndpointCircuit200ResponseData](docs/CloseWaaSEndpointCircuit200ResponseData.md)
445
448
  - [Zyphr::ConfirmEmailVerificationRequest](docs/ConfirmEmailVerificationRequest.md)
@@ -719,6 +722,7 @@ Class | Method | HTTP request | Description
719
722
  - [Zyphr::SetEndUserClaimsRequest](docs/SetEndUserClaimsRequest.md)
720
723
  - [Zyphr::SetPreferencesRequest](docs/SetPreferencesRequest.md)
721
724
  - [Zyphr::SetPreferencesRequestPreferencesInner](docs/SetPreferencesRequestPreferencesInner.md)
725
+ - [Zyphr::SetSelfApplicationTestRecipientsRequest](docs/SetSelfApplicationTestRecipientsRequest.md)
722
726
  - [Zyphr::SignInAnonymouslyRequest](docs/SignInAnonymouslyRequest.md)
723
727
  - [Zyphr::SignInWithGameCenterRequest](docs/SignInWithGameCenterRequest.md)
724
728
  - [Zyphr::SignInWithGooglePlayGamesRequest](docs/SignInWithGooglePlayGamesRequest.md)
@@ -856,6 +860,7 @@ Class | Method | HTTP request | Description
856
860
  - [Zyphr::WebhookDeliveryResponse](docs/WebhookDeliveryResponse.md)
857
861
  - [Zyphr::WebhookDeliveryRetryResponse](docs/WebhookDeliveryRetryResponse.md)
858
862
  - [Zyphr::WebhookDeliveryRetryResponseData](docs/WebhookDeliveryRetryResponseData.md)
863
+ - [Zyphr::WebhookEventType](docs/WebhookEventType.md)
859
864
  - [Zyphr::WebhookEventTypesResponse](docs/WebhookEventTypesResponse.md)
860
865
  - [Zyphr::WebhookEventTypesResponseData](docs/WebhookEventTypesResponseData.md)
861
866
  - [Zyphr::WebhookIpsResponse](docs/WebhookIpsResponse.md)
@@ -8,6 +8,7 @@
8
8
  | **name** | **String** | Human-readable application name. | |
9
9
  | **environment** | **String** | The environment mode of the credentials used to authenticate this request. `null` when the environment cannot be determined (e.g. a legacy application-level key that predates environment-scoped keys) — not defaulted to a guessed value. | |
10
10
  | **signing_algorithm** | **String** | JWT signing algorithm for this application's end-user tokens. | |
11
+ | **test_recipients** | **Array<String>** | The auth-email test allowlist. When non-empty, only these addresses receive auth emails (the gate from sc-7443); an empty array disables the gate. Settable via PATCH /auth/application (sc-7600). | |
11
12
 
12
13
  ## Example
13
14
 
@@ -18,7 +19,8 @@ instance = Zyphr::ApplicationSelf.new(
18
19
  id: null,
19
20
  name: null,
20
21
  environment: null,
21
- signing_algorithm: null
22
+ signing_algorithm: null,
23
+ test_recipients: null
22
24
  )
23
25
  ```
24
26
 
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**get_self_application**](AuthApplicationApi.md#get_self_application) | **GET** /auth/application | Get the authenticating application |
8
+ | [**set_self_application_test_recipients**](AuthApplicationApi.md#set_self_application_test_recipients) | **PATCH** /auth/application | Set the authenticating application's auth-email test allowlist |
8
9
 
9
10
 
10
11
  ## get_self_application
@@ -79,3 +80,79 @@ This endpoint does not need any parameter.
79
80
  - **Content-Type**: Not defined
80
81
  - **Accept**: application/json
81
82
 
83
+
84
+ ## set_self_application_test_recipients
85
+
86
+ > <ApplicationSelfResponse> set_self_application_test_recipients(set_self_application_test_recipients_request)
87
+
88
+ Set the authenticating application's auth-email test allowlist
89
+
90
+ Set `test_recipients` — the per-application auth-email allowlist — on the application whose credentials authenticated this request. When non-empty, this allowlist gates ALL auth emails (only listed addresses receive them); an EMPTY array clears it and disables the gate. Lets an integrator manage the allowlist from their own infrastructure config instead of the dashboard. Application-SECRET scoped (server-side write): requires X-Application-Key AND X-Application-Secret. Mutates ONLY the authenticating application — it never takes an application id from the request, so there is no cross-tenant write path. The response mirrors GET /auth/application exactly (never returns secrets).
91
+
92
+ ### Examples
93
+
94
+ ```ruby
95
+ require 'time'
96
+ require 'zyphr'
97
+ # setup authorization
98
+ Zyphr.configure do |config|
99
+ # Configure API key authorization: ApplicationSecret
100
+ config.api_key['X-Application-Secret'] = 'YOUR API KEY'
101
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
102
+ # config.api_key_prefix['X-Application-Secret'] = 'Bearer'
103
+
104
+ # Configure API key authorization: ApplicationPublicKey
105
+ config.api_key['X-Application-Key'] = 'YOUR API KEY'
106
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
107
+ # config.api_key_prefix['X-Application-Key'] = 'Bearer'
108
+ end
109
+
110
+ api_instance = Zyphr::AuthApplicationApi.new
111
+ set_self_application_test_recipients_request = Zyphr::SetSelfApplicationTestRecipientsRequest.new({test_recipients: ['test_recipients_example']}) # SetSelfApplicationTestRecipientsRequest |
112
+
113
+ begin
114
+ # Set the authenticating application's auth-email test allowlist
115
+ result = api_instance.set_self_application_test_recipients(set_self_application_test_recipients_request)
116
+ p result
117
+ rescue Zyphr::ApiError => e
118
+ puts "Error when calling AuthApplicationApi->set_self_application_test_recipients: #{e}"
119
+ end
120
+ ```
121
+
122
+ #### Using the set_self_application_test_recipients_with_http_info variant
123
+
124
+ This returns an Array which contains the response data, status code and headers.
125
+
126
+ > <Array(<ApplicationSelfResponse>, Integer, Hash)> set_self_application_test_recipients_with_http_info(set_self_application_test_recipients_request)
127
+
128
+ ```ruby
129
+ begin
130
+ # Set the authenticating application's auth-email test allowlist
131
+ data, status_code, headers = api_instance.set_self_application_test_recipients_with_http_info(set_self_application_test_recipients_request)
132
+ p status_code # => 2xx
133
+ p headers # => { ... }
134
+ p data # => <ApplicationSelfResponse>
135
+ rescue Zyphr::ApiError => e
136
+ puts "Error when calling AuthApplicationApi->set_self_application_test_recipients_with_http_info: #{e}"
137
+ end
138
+ ```
139
+
140
+ ### Parameters
141
+
142
+ | Name | Type | Description | Notes |
143
+ | ---- | ---- | ----------- | ----- |
144
+ | **set_self_application_test_recipients_request** | [**SetSelfApplicationTestRecipientsRequest**](SetSelfApplicationTestRecipientsRequest.md) | | |
145
+
146
+ ### Return type
147
+
148
+ [**ApplicationSelfResponse**](ApplicationSelfResponse.md)
149
+
150
+ ### Authorization
151
+
152
+ [ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
153
+
154
+ ### HTTP request headers
155
+
156
+ - **Content-Type**: application/json
157
+ - **Accept**: application/json
158
+
@@ -4,11 +4,86 @@ All URIs are relative to *https://api.zyphr.dev/v1*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
+ | [**change_end_user_password**](AuthUserProfileApi.md#change_end_user_password) | **POST** /auth/users/change-password | Change password (authenticated session) |
7
8
  | [**delete_end_user**](AuthUserProfileApi.md#delete_end_user) | **DELETE** /auth/users/me | Delete current end user account |
8
9
  | [**get_end_user**](AuthUserProfileApi.md#get_end_user) | **GET** /auth/users/me | Get current end user profile |
9
10
  | [**update_end_user**](AuthUserProfileApi.md#update_end_user) | **PATCH** /auth/users/me | Update current end user profile |
10
11
 
11
12
 
13
+ ## change_end_user_password
14
+
15
+ > <RefreshTokenResponse> change_end_user_password(change_password_request)
16
+
17
+ Change password (authenticated session)
18
+
19
+ Change the currently authenticated end user's password from a logged-in session. The caller must prove possession of the CURRENT password (`current_password`); the user is identified from the end-user token, not the request body, so a user can only change their own password. On success, all existing sessions are revoked and a fresh token pair is returned so the current session stays authenticated. Emits the `user.password_changed` webhook.
20
+
21
+ ### Examples
22
+
23
+ ```ruby
24
+ require 'time'
25
+ require 'zyphr'
26
+ # setup authorization
27
+ Zyphr.configure do |config|
28
+ # Configure Bearer authorization (JWT): EndUserToken
29
+ config.access_token = 'YOUR_BEARER_TOKEN'
30
+
31
+ # Configure API key authorization: ApplicationPublicKey
32
+ config.api_key['X-Application-Key'] = 'YOUR API KEY'
33
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
34
+ # config.api_key_prefix['X-Application-Key'] = 'Bearer'
35
+ end
36
+
37
+ api_instance = Zyphr::AuthUserProfileApi.new
38
+ change_password_request = Zyphr::ChangePasswordRequest.new({current_password: 'current_password_example', new_password: 'new_password_example'}) # ChangePasswordRequest |
39
+
40
+ begin
41
+ # Change password (authenticated session)
42
+ result = api_instance.change_end_user_password(change_password_request)
43
+ p result
44
+ rescue Zyphr::ApiError => e
45
+ puts "Error when calling AuthUserProfileApi->change_end_user_password: #{e}"
46
+ end
47
+ ```
48
+
49
+ #### Using the change_end_user_password_with_http_info variant
50
+
51
+ This returns an Array which contains the response data, status code and headers.
52
+
53
+ > <Array(<RefreshTokenResponse>, Integer, Hash)> change_end_user_password_with_http_info(change_password_request)
54
+
55
+ ```ruby
56
+ begin
57
+ # Change password (authenticated session)
58
+ data, status_code, headers = api_instance.change_end_user_password_with_http_info(change_password_request)
59
+ p status_code # => 2xx
60
+ p headers # => { ... }
61
+ p data # => <RefreshTokenResponse>
62
+ rescue Zyphr::ApiError => e
63
+ puts "Error when calling AuthUserProfileApi->change_end_user_password_with_http_info: #{e}"
64
+ end
65
+ ```
66
+
67
+ ### Parameters
68
+
69
+ | Name | Type | Description | Notes |
70
+ | ---- | ---- | ----------- | ----- |
71
+ | **change_password_request** | [**ChangePasswordRequest**](ChangePasswordRequest.md) | | |
72
+
73
+ ### Return type
74
+
75
+ [**RefreshTokenResponse**](RefreshTokenResponse.md)
76
+
77
+ ### Authorization
78
+
79
+ [EndUserToken](../README.md#EndUserToken), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
80
+
81
+ ### HTTP request headers
82
+
83
+ - **Content-Type**: application/json
84
+ - **Accept**: application/json
85
+
86
+
12
87
  ## delete_end_user
13
88
 
14
89
  > <EndUserDeleteResponse> delete_end_user
@@ -0,0 +1,20 @@
1
+ # Zyphr::ChangePasswordRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **current_password** | **String** | The user&#39;s current password, for verification. | |
8
+ | **new_password** | **String** | The new password. Must satisfy the application&#39;s password policy. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zyphr'
14
+
15
+ instance = Zyphr::ChangePasswordRequest.new(
16
+ current_password: null,
17
+ new_password: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # Zyphr::SetSelfApplicationTestRecipientsRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **test_recipients** | **Array&lt;String&gt;** | Email addresses allowed to receive auth emails. An empty array clears the allowlist (disables the gate). | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zyphr'
13
+
14
+ instance = Zyphr::SetSelfApplicationTestRecipientsRequest.new(
15
+ test_recipients: null
16
+ )
17
+ ```
18
+
@@ -7,7 +7,7 @@
7
7
  | **id** | **String** | | [optional] |
8
8
  | **msg_id** | **String** | | [optional] |
9
9
  | **event_id** | **String** | | [optional] |
10
- | **event_type** | **String** | | [optional] |
10
+ | **event_type** | [**WebhookEventType**](WebhookEventType.md) | | [optional] |
11
11
  | **status** | **String** | | [optional] |
12
12
  | **attempts** | **Integer** | | [optional] |
13
13
  | **max_attempts** | **Integer** | | [optional] |
@@ -7,7 +7,7 @@
7
7
  | **id** | **String** | | [optional] |
8
8
  | **msg_id** | **String** | | [optional] |
9
9
  | **event_id** | **String** | | [optional] |
10
- | **event_type** | **String** | | [optional] |
10
+ | **event_type** | [**WebhookEventType**](WebhookEventType.md) | | [optional] |
11
11
  | **status** | **String** | | [optional] |
12
12
  | **attempts** | **Integer** | | [optional] |
13
13
  | **max_attempts** | **Integer** | | [optional] |
@@ -0,0 +1,15 @@
1
+ # Zyphr::WebhookEventType
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'zyphr'
12
+
13
+ instance = Zyphr::WebhookEventType.new()
14
+ ```
15
+
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **event_types** | **Array&lt;String&gt;** | | [optional] |
7
+ | **event_types** | [**Array&lt;WebhookEventType&gt;**](WebhookEventType.md) | | [optional] |
8
8
  | **registry** | **Array&lt;Object&gt;** | | [optional] |
9
9
  | **categories** | **Array&lt;String&gt;** | | [optional] |
10
10
  | **api_version** | **String** | | [optional] |
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **delivery_id** | **String** | | [optional] |
8
- | **event_type** | **String** | | [optional] |
8
+ | **event_type** | [**WebhookEventType**](WebhookEventType.md) | | [optional] |
9
9
  | **payload** | **Object** | | [optional] |
10
10
  | **status** | **String** | | [optional] |
11
11
 
@@ -75,5 +75,73 @@ module Zyphr
75
75
  end
76
76
  return data, status_code, headers
77
77
  end
78
+
79
+ # Set the authenticating application's auth-email test allowlist
80
+ # Set `test_recipients` — the per-application auth-email allowlist — on the application whose credentials authenticated this request. When non-empty, this allowlist gates ALL auth emails (only listed addresses receive them); an EMPTY array clears it and disables the gate. Lets an integrator manage the allowlist from their own infrastructure config instead of the dashboard. Application-SECRET scoped (server-side write): requires X-Application-Key AND X-Application-Secret. Mutates ONLY the authenticating application — it never takes an application id from the request, so there is no cross-tenant write path. The response mirrors GET /auth/application exactly (never returns secrets).
81
+ # @param set_self_application_test_recipients_request [SetSelfApplicationTestRecipientsRequest]
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [ApplicationSelfResponse]
84
+ def set_self_application_test_recipients(set_self_application_test_recipients_request, opts = {})
85
+ data, _status_code, _headers = set_self_application_test_recipients_with_http_info(set_self_application_test_recipients_request, opts)
86
+ data
87
+ end
88
+
89
+ # Set the authenticating application&#39;s auth-email test allowlist
90
+ # Set &#x60;test_recipients&#x60; — the per-application auth-email allowlist — on the application whose credentials authenticated this request. When non-empty, this allowlist gates ALL auth emails (only listed addresses receive them); an EMPTY array clears it and disables the gate. Lets an integrator manage the allowlist from their own infrastructure config instead of the dashboard. Application-SECRET scoped (server-side write): requires X-Application-Key AND X-Application-Secret. Mutates ONLY the authenticating application — it never takes an application id from the request, so there is no cross-tenant write path. The response mirrors GET /auth/application exactly (never returns secrets).
91
+ # @param set_self_application_test_recipients_request [SetSelfApplicationTestRecipientsRequest]
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [Array<(ApplicationSelfResponse, Integer, Hash)>] ApplicationSelfResponse data, response status code and response headers
94
+ def set_self_application_test_recipients_with_http_info(set_self_application_test_recipients_request, opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug 'Calling API: AuthApplicationApi.set_self_application_test_recipients ...'
97
+ end
98
+ # verify the required parameter 'set_self_application_test_recipients_request' is set
99
+ if @api_client.config.client_side_validation && set_self_application_test_recipients_request.nil?
100
+ fail ArgumentError, "Missing the required parameter 'set_self_application_test_recipients_request' when calling AuthApplicationApi.set_self_application_test_recipients"
101
+ end
102
+ # resource path
103
+ local_var_path = '/auth/application'
104
+
105
+ # query parameters
106
+ query_params = opts[:query_params] || {}
107
+
108
+ # header parameters
109
+ header_params = opts[:header_params] || {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
112
+ # HTTP header 'Content-Type'
113
+ content_type = @api_client.select_header_content_type(['application/json'])
114
+ if !content_type.nil?
115
+ header_params['Content-Type'] = content_type
116
+ end
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+
121
+ # http body (model)
122
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_self_application_test_recipients_request)
123
+
124
+ # return_type
125
+ return_type = opts[:debug_return_type] || 'ApplicationSelfResponse'
126
+
127
+ # auth_names
128
+ auth_names = opts[:debug_auth_names] || ['ApplicationSecret', 'ApplicationPublicKey']
129
+
130
+ new_options = opts.merge(
131
+ :operation => :"AuthApplicationApi.set_self_application_test_recipients",
132
+ :header_params => header_params,
133
+ :query_params => query_params,
134
+ :form_params => form_params,
135
+ :body => post_body,
136
+ :auth_names => auth_names,
137
+ :return_type => return_type
138
+ )
139
+
140
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug "API called: AuthApplicationApi#set_self_application_test_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
+ end
144
+ return data, status_code, headers
145
+ end
78
146
  end
79
147
  end
@@ -19,6 +19,74 @@ module Zyphr
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Change password (authenticated session)
23
+ # Change the currently authenticated end user's password from a logged-in session. The caller must prove possession of the CURRENT password (`current_password`); the user is identified from the end-user token, not the request body, so a user can only change their own password. On success, all existing sessions are revoked and a fresh token pair is returned so the current session stays authenticated. Emits the `user.password_changed` webhook.
24
+ # @param change_password_request [ChangePasswordRequest]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [RefreshTokenResponse]
27
+ def change_end_user_password(change_password_request, opts = {})
28
+ data, _status_code, _headers = change_end_user_password_with_http_info(change_password_request, opts)
29
+ data
30
+ end
31
+
32
+ # Change password (authenticated session)
33
+ # Change the currently authenticated end user&#39;s password from a logged-in session. The caller must prove possession of the CURRENT password (&#x60;current_password&#x60;); the user is identified from the end-user token, not the request body, so a user can only change their own password. On success, all existing sessions are revoked and a fresh token pair is returned so the current session stays authenticated. Emits the &#x60;user.password_changed&#x60; webhook.
34
+ # @param change_password_request [ChangePasswordRequest]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(RefreshTokenResponse, Integer, Hash)>] RefreshTokenResponse data, response status code and response headers
37
+ def change_end_user_password_with_http_info(change_password_request, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: AuthUserProfileApi.change_end_user_password ...'
40
+ end
41
+ # verify the required parameter 'change_password_request' is set
42
+ if @api_client.config.client_side_validation && change_password_request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'change_password_request' when calling AuthUserProfileApi.change_end_user_password"
44
+ end
45
+ # resource path
46
+ local_var_path = '/auth/users/change-password'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(change_password_request)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'RefreshTokenResponse'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['EndUserToken', 'ApplicationPublicKey']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"AuthUserProfileApi.change_end_user_password",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: AuthUserProfileApi#change_end_user_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
22
90
  # Delete current end user account
23
91
  # Delete the current end user account (GDPR right to erasure). This is a soft delete — the account is marked as deleted but data is retained for a period to allow for recovery or legal requirements.
24
92
  # @param [Hash] opts the optional parameters
@@ -28,6 +28,9 @@ module Zyphr
28
28
  # JWT signing algorithm for this application's end-user tokens.
29
29
  attr_accessor :signing_algorithm
30
30
 
31
+ # The auth-email test allowlist. When non-empty, only these addresses receive auth emails (the gate from sc-7443); an empty array disables the gate. Settable via PATCH /auth/application (sc-7600).
32
+ attr_accessor :test_recipients
33
+
31
34
  class EnumAttributeValidator
32
35
  attr_reader :datatype
33
36
  attr_reader :allowable_values
@@ -56,7 +59,8 @@ module Zyphr
56
59
  :'id' => :'id',
57
60
  :'name' => :'name',
58
61
  :'environment' => :'environment',
59
- :'signing_algorithm' => :'signing_algorithm'
62
+ :'signing_algorithm' => :'signing_algorithm',
63
+ :'test_recipients' => :'test_recipients'
60
64
  }
61
65
  end
62
66
 
@@ -76,7 +80,8 @@ module Zyphr
76
80
  :'id' => :'String',
77
81
  :'name' => :'String',
78
82
  :'environment' => :'String',
79
- :'signing_algorithm' => :'String'
83
+ :'signing_algorithm' => :'String',
84
+ :'test_recipients' => :'Array<String>'
80
85
  }
81
86
  end
82
87
 
@@ -126,6 +131,14 @@ module Zyphr
126
131
  else
127
132
  self.signing_algorithm = nil
128
133
  end
134
+
135
+ if attributes.key?(:'test_recipients')
136
+ if (value = attributes[:'test_recipients']).is_a?(Array)
137
+ self.test_recipients = value
138
+ end
139
+ else
140
+ self.test_recipients = nil
141
+ end
129
142
  end
130
143
 
131
144
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -145,6 +158,10 @@ module Zyphr
145
158
  invalid_properties.push('invalid value for "signing_algorithm", signing_algorithm cannot be nil.')
146
159
  end
147
160
 
161
+ if @test_recipients.nil?
162
+ invalid_properties.push('invalid value for "test_recipients", test_recipients cannot be nil.')
163
+ end
164
+
148
165
  invalid_properties
149
166
  end
150
167
 
@@ -159,6 +176,7 @@ module Zyphr
159
176
  return false if @signing_algorithm.nil?
160
177
  signing_algorithm_validator = EnumAttributeValidator.new('String', ["HS256", "RS256", "ES256"])
161
178
  return false unless signing_algorithm_validator.valid?(@signing_algorithm)
179
+ return false if @test_recipients.nil?
162
180
  true
163
181
  end
164
182
 
@@ -202,6 +220,16 @@ module Zyphr
202
220
  @signing_algorithm = signing_algorithm
203
221
  end
204
222
 
223
+ # Custom attribute writer method with validation
224
+ # @param [Object] test_recipients Value to be assigned
225
+ def test_recipients=(test_recipients)
226
+ if test_recipients.nil?
227
+ fail ArgumentError, 'test_recipients cannot be nil'
228
+ end
229
+
230
+ @test_recipients = test_recipients
231
+ end
232
+
205
233
  # Checks equality by comparing each attribute.
206
234
  # @param [Object] Object to be compared
207
235
  def ==(o)
@@ -210,7 +238,8 @@ module Zyphr
210
238
  id == o.id &&
211
239
  name == o.name &&
212
240
  environment == o.environment &&
213
- signing_algorithm == o.signing_algorithm
241
+ signing_algorithm == o.signing_algorithm &&
242
+ test_recipients == o.test_recipients
214
243
  end
215
244
 
216
245
  # @see the `==` method
@@ -222,7 +251,7 @@ module Zyphr
222
251
  # Calculates hash code according to all attributes.
223
252
  # @return [Integer] Hash code
224
253
  def hash
225
- [id, name, environment, signing_algorithm].hash
254
+ [id, name, environment, signing_algorithm, test_recipients].hash
226
255
  end
227
256
 
228
257
  # Builds the object from hash