zyphr 0.1.43 → 0.1.45

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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -4
  3. data/docs/ApplicationSelf.md +26 -0
  4. data/docs/ApplicationSelfResponse.md +20 -0
  5. data/docs/AuthApplicationApi.md +158 -0
  6. data/docs/AuthEmailTemplateTestRequest.md +1 -1
  7. data/docs/AuthEmailTemplatesApi.md +1 -1
  8. data/docs/AuthMethods.md +28 -0
  9. data/docs/AuthUserDirectoryApi.md +77 -0
  10. data/docs/AuthUserProfileApi.md +75 -0
  11. data/docs/ChangePasswordRequest.md +20 -0
  12. data/docs/GetEndUserAuthMethods200Response.md +20 -0
  13. data/docs/SetSelfApplicationTestRecipientsRequest.md +18 -0
  14. data/docs/WebhookDelivery.md +1 -1
  15. data/docs/WebhookDeliveryDetail.md +1 -1
  16. data/docs/WebhookEventType.md +15 -0
  17. data/docs/WebhookEventTypesResponseData.md +1 -1
  18. data/docs/WebhookTestEventResponseData.md +1 -1
  19. data/lib/zyphr/api/auth_application_api.rb +147 -0
  20. data/lib/zyphr/api/auth_email_templates_api.rb +2 -2
  21. data/lib/zyphr/api/auth_user_directory_api.rb +63 -0
  22. data/lib/zyphr/api/auth_user_profile_api.rb +68 -0
  23. data/lib/zyphr/models/application_self.rb +371 -0
  24. data/lib/zyphr/models/application_self_response.rb +229 -0
  25. data/lib/zyphr/models/auth_email_template_test_request.rb +1 -1
  26. data/lib/zyphr/models/auth_methods.rb +376 -0
  27. data/lib/zyphr/models/change_password_request.rb +265 -0
  28. data/lib/zyphr/models/get_end_user_auth_methods200_response.rb +229 -0
  29. data/lib/zyphr/models/set_self_application_test_recipients_request.rb +240 -0
  30. data/lib/zyphr/models/webhook_delivery.rb +1 -1
  31. data/lib/zyphr/models/webhook_delivery_detail.rb +1 -1
  32. data/lib/zyphr/models/webhook_event_type.rb +66 -0
  33. data/lib/zyphr/models/webhook_event_types_response_data.rb +1 -1
  34. data/lib/zyphr/models/webhook_test_event_response_data.rb +23 -1
  35. data/lib/zyphr.rb +8 -0
  36. data/spec/api/auth_application_api_spec.rb +58 -0
  37. data/spec/api/auth_email_templates_api_spec.rb +1 -1
  38. data/spec/api/auth_user_directory_api_spec.rb +12 -0
  39. data/spec/api/auth_user_profile_api_spec.rb +12 -0
  40. data/spec/models/application_self_response_spec.rb +42 -0
  41. data/spec/models/application_self_spec.rb +68 -0
  42. data/spec/models/auth_methods_spec.rb +66 -0
  43. data/spec/models/change_password_request_spec.rb +42 -0
  44. data/spec/models/get_end_user_auth_methods200_response_spec.rb +42 -0
  45. data/spec/models/set_self_application_test_recipients_request_spec.rb +36 -0
  46. data/spec/models/webhook_event_type_spec.rb +30 -0
  47. data/zyphr.gemspec +1 -1
  48. metadata +33 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebdab8198569c4cb0ec3851df67ee2f92dc78b98cd10814fdc338141fe394c0a
4
- data.tar.gz: 6093a93aa1280e8b7885ca65d8110badf25cd77bba988ed3cea53c39cea80984
3
+ metadata.gz: 7e7566aa2d26c6c57823ded661edaf884ed4e3aaefa9760ac9e9d75ba552aa6f
4
+ data.tar.gz: 375575ac49fc49d697a2d47b12222e6771a6d0171a116ea93b2b21f1e6ea292b
5
5
  SHA512:
6
- metadata.gz: 458f05916058c46f4af69e41fa2921737cd03f7fba339284f3728d3335269cd7b5f78a5a05ee9d8bf2cbd2b615d5ec0f3cdd958feac2f107ecf41e4f04793d62
7
- data.tar.gz: 83cb0d9771508e9761f720c73f6769ef72864d47a524b593ebbf4645f343196cea6b7ef5f96bf774a748a769f928631ea217c90987c5de06d5bdb9d771f19bc6
6
+ metadata.gz: 4469bc22bf4a139e723b8f1cf339cafd440d2de808459f31ce67cbe0fbbad5462ce127c45ff61ee87b2d3571f1d509a7410592833fb0e68859e1d66606697fef
7
+ data.tar.gz: 821c2fc9241c4ce1ba257668d00056b1d628da96b9b632eaa478a63833915725cec8d44ec69ad598ce74c59be09bc6c53e8ff6943916fa2b994e9e158bea79d9
data/README.md CHANGED
@@ -104,6 +104,13 @@ require 'zyphr'
104
104
 
105
105
  # Setup authorization
106
106
  Zyphr.configure do |config|
107
+ # Configure API key authorization: ApplicationSecret
108
+ config.api_key['X-Application-Secret'] = 'YOUR API KEY'
109
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
110
+ # config.api_key_prefix['X-Application-Secret'] = 'Bearer'
111
+ # Configure faraday connection
112
+ config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
113
+
107
114
  # Configure API key authorization: ApplicationPublicKey
108
115
  config.api_key['X-Application-Key'] = 'YOUR API KEY'
109
116
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
@@ -112,14 +119,14 @@ Zyphr.configure do |config|
112
119
  config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
113
120
  end
114
121
 
115
- api_instance = Zyphr::AuthEmailOTPApi.new
122
+ api_instance = Zyphr::AuthApplicationApi.new
116
123
 
117
124
  begin
118
- #Check email OTP availability
119
- result = api_instance.check_email_otp_availability
125
+ #Get the authenticating application
126
+ result = api_instance.get_self_application
120
127
  p result
121
128
  rescue Zyphr::ApiError => e
122
- puts "Exception when calling AuthEmailOTPApi->check_email_otp_availability: #{e}"
129
+ puts "Exception when calling AuthApplicationApi->get_self_application: #{e}"
123
130
  end
124
131
 
125
132
  ```
@@ -130,6 +137,8 @@ All URIs are relative to *https://api.zyphr.dev/v1*
130
137
 
131
138
  Class | Method | HTTP request | Description
132
139
  ------------ | ------------- | ------------- | -------------
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
133
142
  *Zyphr::AuthEmailOTPApi* | [**check_email_otp_availability**](docs/AuthEmailOTPApi.md#check_email_otp_availability) | **GET** /auth/email-otp/available | Check email OTP availability
134
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
135
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
@@ -195,6 +204,7 @@ Class | Method | HTTP request | Description
195
204
  *Zyphr::AuthSessionsApi* | [**revoke_all_end_user_sessions**](docs/AuthSessionsApi.md#revoke_all_end_user_sessions) | **POST** /auth/sessions/revoke-all | Revoke all sessions
196
205
  *Zyphr::AuthSessionsApi* | [**revoke_end_user_session**](docs/AuthSessionsApi.md#revoke_end_user_session) | **POST** /auth/sessions/revoke | Revoke a session
197
206
  *Zyphr::AuthUserDirectoryApi* | [**delete_end_user_by_application**](docs/AuthUserDirectoryApi.md#delete_end_user_by_application) | **DELETE** /auth/users/{user_id} | Delete an end user (server-side admin)
207
+ *Zyphr::AuthUserDirectoryApi* | [**get_end_user_auth_methods**](docs/AuthUserDirectoryApi.md#get_end_user_auth_methods) | **GET** /auth/users/{user_id}/auth-methods | Get an end user's sign-in methods (server-side admin)
198
208
  *Zyphr::AuthUserDirectoryApi* | [**get_end_user_by_email**](docs/AuthUserDirectoryApi.md#get_end_user_by_email) | **GET** /auth/users/by-email | Look up an end user by email (server-side admin)
199
209
  *Zyphr::AuthUserDirectoryApi* | [**get_end_user_by_id**](docs/AuthUserDirectoryApi.md#get_end_user_by_id) | **GET** /auth/users/{user_id} | Get an end user by id (server-side admin)
200
210
  *Zyphr::AuthUserDirectoryApi* | [**get_end_user_claims**](docs/AuthUserDirectoryApi.md#get_end_user_claims) | **GET** /auth/users/{user_id}/claims | Get an end user's stored custom claims (server-side admin)
@@ -202,6 +212,7 @@ Class | Method | HTTP request | Description
202
212
  *Zyphr::AuthUserDirectoryApi* | [**list_end_users**](docs/AuthUserDirectoryApi.md#list_end_users) | **GET** /auth/users | List / search end users (server-side admin)
203
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)
204
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)
205
216
  *Zyphr::AuthUserProfileApi* | [**delete_end_user**](docs/AuthUserProfileApi.md#delete_end_user) | **DELETE** /auth/users/me | Delete current end user account
206
217
  *Zyphr::AuthUserProfileApi* | [**get_end_user**](docs/AuthUserProfileApi.md#get_end_user) | **GET** /auth/users/me | Get current end user profile
207
218
  *Zyphr::AuthUserProfileApi* | [**update_end_user**](docs/AuthUserProfileApi.md#update_end_user) | **PATCH** /auth/users/me | Update current end user profile
@@ -393,6 +404,8 @@ Class | Method | HTTP request | Description
393
404
  - [Zyphr::ApiError](docs/ApiError.md)
394
405
  - [Zyphr::ApiErrorError](docs/ApiErrorError.md)
395
406
  - [Zyphr::ApiErrorMeta](docs/ApiErrorMeta.md)
407
+ - [Zyphr::ApplicationSelf](docs/ApplicationSelf.md)
408
+ - [Zyphr::ApplicationSelfResponse](docs/ApplicationSelfResponse.md)
396
409
  - [Zyphr::AuthEmailTemplate](docs/AuthEmailTemplate.md)
397
410
  - [Zyphr::AuthEmailTemplateDefault](docs/AuthEmailTemplateDefault.md)
398
411
  - [Zyphr::AuthEmailTemplateDefaultResponse](docs/AuthEmailTemplateDefaultResponse.md)
@@ -413,6 +426,7 @@ Class | Method | HTTP request | Description
413
426
  - [Zyphr::AuthLoginResponse](docs/AuthLoginResponse.md)
414
427
  - [Zyphr::AuthLoginResult](docs/AuthLoginResult.md)
415
428
  - [Zyphr::AuthLoginResultMfaChallenge](docs/AuthLoginResultMfaChallenge.md)
429
+ - [Zyphr::AuthMethods](docs/AuthMethods.md)
416
430
  - [Zyphr::AuthResult](docs/AuthResult.md)
417
431
  - [Zyphr::AuthResultResponse](docs/AuthResultResponse.md)
418
432
  - [Zyphr::AuthSession](docs/AuthSession.md)
@@ -428,6 +442,7 @@ Class | Method | HTTP request | Description
428
442
  - [Zyphr::Category](docs/Category.md)
429
443
  - [Zyphr::CategoryListResponse](docs/CategoryListResponse.md)
430
444
  - [Zyphr::CategoryResponse](docs/CategoryResponse.md)
445
+ - [Zyphr::ChangePasswordRequest](docs/ChangePasswordRequest.md)
431
446
  - [Zyphr::CloseWaaSEndpointCircuit200Response](docs/CloseWaaSEndpointCircuit200Response.md)
432
447
  - [Zyphr::CloseWaaSEndpointCircuit200ResponseData](docs/CloseWaaSEndpointCircuit200ResponseData.md)
433
448
  - [Zyphr::ConfirmEmailVerificationRequest](docs/ConfirmEmailVerificationRequest.md)
@@ -506,6 +521,7 @@ Class | Method | HTTP request | Description
506
521
  - [Zyphr::GenerateWaaSPortalToken201Response](docs/GenerateWaaSPortalToken201Response.md)
507
522
  - [Zyphr::GetDomain200Response](docs/GetDomain200Response.md)
508
523
  - [Zyphr::GetDomain200ResponseMeta](docs/GetDomain200ResponseMeta.md)
524
+ - [Zyphr::GetEndUserAuthMethods200Response](docs/GetEndUserAuthMethods200Response.md)
509
525
  - [Zyphr::GetEndUserById200Response](docs/GetEndUserById200Response.md)
510
526
  - [Zyphr::GetEndUserClaims200Response](docs/GetEndUserClaims200Response.md)
511
527
  - [Zyphr::GetEndUserClaims200ResponseData](docs/GetEndUserClaims200ResponseData.md)
@@ -706,6 +722,7 @@ Class | Method | HTTP request | Description
706
722
  - [Zyphr::SetEndUserClaimsRequest](docs/SetEndUserClaimsRequest.md)
707
723
  - [Zyphr::SetPreferencesRequest](docs/SetPreferencesRequest.md)
708
724
  - [Zyphr::SetPreferencesRequestPreferencesInner](docs/SetPreferencesRequestPreferencesInner.md)
725
+ - [Zyphr::SetSelfApplicationTestRecipientsRequest](docs/SetSelfApplicationTestRecipientsRequest.md)
709
726
  - [Zyphr::SignInAnonymouslyRequest](docs/SignInAnonymouslyRequest.md)
710
727
  - [Zyphr::SignInWithGameCenterRequest](docs/SignInWithGameCenterRequest.md)
711
728
  - [Zyphr::SignInWithGooglePlayGamesRequest](docs/SignInWithGooglePlayGamesRequest.md)
@@ -843,6 +860,7 @@ Class | Method | HTTP request | Description
843
860
  - [Zyphr::WebhookDeliveryResponse](docs/WebhookDeliveryResponse.md)
844
861
  - [Zyphr::WebhookDeliveryRetryResponse](docs/WebhookDeliveryRetryResponse.md)
845
862
  - [Zyphr::WebhookDeliveryRetryResponseData](docs/WebhookDeliveryRetryResponseData.md)
863
+ - [Zyphr::WebhookEventType](docs/WebhookEventType.md)
846
864
  - [Zyphr::WebhookEventTypesResponse](docs/WebhookEventTypesResponse.md)
847
865
  - [Zyphr::WebhookEventTypesResponseData](docs/WebhookEventTypesResponseData.md)
848
866
  - [Zyphr::WebhookIpsResponse](docs/WebhookIpsResponse.md)
@@ -0,0 +1,26 @@
1
+ # Zyphr::ApplicationSelf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The application's unique id (application_id). | |
8
+ | **name** | **String** | Human-readable application name. | |
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
+ | **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). | |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'zyphr'
17
+
18
+ instance = Zyphr::ApplicationSelf.new(
19
+ id: null,
20
+ name: null,
21
+ environment: null,
22
+ signing_algorithm: null,
23
+ test_recipients: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,20 @@
1
+ # Zyphr::ApplicationSelfResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**ApplicationSelf**](ApplicationSelf.md) | | [optional] |
8
+ | **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zyphr'
14
+
15
+ instance = Zyphr::ApplicationSelfResponse.new(
16
+ data: null,
17
+ meta: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,158 @@
1
+ # Zyphr::AuthApplicationApi
2
+
3
+ All URIs are relative to *https://api.zyphr.dev/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
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 |
9
+
10
+
11
+ ## get_self_application
12
+
13
+ > <ApplicationSelfResponse> get_self_application
14
+
15
+ Get the authenticating application
16
+
17
+ Return non-sensitive metadata about the application whose credentials authenticated this request. Lets an integrator read their own application_id (the sole tenant discriminator embedded in every end-user token) directly from the API, rather than only from the dashboard UI or by decoding a token. Returns only id, name, the calling environment's mode, and the JWT signing algorithm — never secrets, signing keys, or account-internal fields.
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'zyphr'
24
+ # setup authorization
25
+ Zyphr.configure do |config|
26
+ # Configure API key authorization: ApplicationSecret
27
+ config.api_key['X-Application-Secret'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ # config.api_key_prefix['X-Application-Secret'] = 'Bearer'
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::AuthApplicationApi.new
38
+
39
+ begin
40
+ # Get the authenticating application
41
+ result = api_instance.get_self_application
42
+ p result
43
+ rescue Zyphr::ApiError => e
44
+ puts "Error when calling AuthApplicationApi->get_self_application: #{e}"
45
+ end
46
+ ```
47
+
48
+ #### Using the get_self_application_with_http_info variant
49
+
50
+ This returns an Array which contains the response data, status code and headers.
51
+
52
+ > <Array(<ApplicationSelfResponse>, Integer, Hash)> get_self_application_with_http_info
53
+
54
+ ```ruby
55
+ begin
56
+ # Get the authenticating application
57
+ data, status_code, headers = api_instance.get_self_application_with_http_info
58
+ p status_code # => 2xx
59
+ p headers # => { ... }
60
+ p data # => <ApplicationSelfResponse>
61
+ rescue Zyphr::ApiError => e
62
+ puts "Error when calling AuthApplicationApi->get_self_application_with_http_info: #{e}"
63
+ end
64
+ ```
65
+
66
+ ### Parameters
67
+
68
+ This endpoint does not need any parameter.
69
+
70
+ ### Return type
71
+
72
+ [**ApplicationSelfResponse**](ApplicationSelfResponse.md)
73
+
74
+ ### Authorization
75
+
76
+ [ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
77
+
78
+ ### HTTP request headers
79
+
80
+ - **Content-Type**: Not defined
81
+ - **Accept**: application/json
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,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **to** | **String** | Recipient email. Must be in the application&#39;s &#x60;test_recipients&#x60; allowlist. | |
7
+ | **to** | **String** | Recipient email. Must be in the application&#39;s &#x60;test_recipients&#x60; allowlist. When non-empty, &#x60;test_recipients&#x60; gates ALL auth emails the application sends (magic link, password reset, verification, OTP) — only listed recipients receive auth email — which keeps non-production applications safe from mass sends. An empty allowlist imposes no restriction. | |
8
8
  | **variables** | **Hash&lt;String, Object&gt;** | | [optional] |
9
9
 
10
10
  ## Example
@@ -631,7 +631,7 @@ end
631
631
 
632
632
  Send a test render of a template
633
633
 
634
- Renders the template (override or default) using sample/provided variables and sends to the recipient. The recipient must be in the application `test_recipients` allowlist. Rate-limited.
634
+ Renders the template (override or default) using sample/provided variables and sends to the recipient. The recipient must be in the application `test_recipients` allowlist. Rate-limited. When non-empty, `test_recipients` gates ALL auth emails this application sends (magic link, password reset, email verification, and email OTP) — not just these test renders. Only listed recipients receive auth email; any other recipient is silently blocked. Use it to make a non-production application safe from mass sends. An empty allowlist (the default) imposes no restriction and every recipient receives auth email normally.
635
635
 
636
636
  ### Examples
637
637
 
@@ -0,0 +1,28 @@
1
+ # Zyphr::AuthMethods
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **has_password** | **Boolean** | True if the user has a password credential (false for OAuth-only / passwordless users). | |
8
+ | **oauth_providers** | **Array&lt;String&gt;** | Distinct OAuth providers linked to the user (e.g. google, apple). | |
9
+ | **mfa_enabled** | **Boolean** | True if the user has multi-factor authentication enabled. | |
10
+ | **email_verified** | **Boolean** | True if the user&#39;s email address has been verified. | |
11
+ | **phone_verified** | **Boolean** | True if the user&#39;s phone number has been verified. | |
12
+ | **passkeys** | **Integer** | Number of WebAuthn passkeys registered for the user. | |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'zyphr'
18
+
19
+ instance = Zyphr::AuthMethods.new(
20
+ has_password: null,
21
+ oauth_providers: null,
22
+ mfa_enabled: null,
23
+ email_verified: null,
24
+ phone_verified: null,
25
+ passkeys: null
26
+ )
27
+ ```
28
+
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.zyphr.dev/v1*
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**delete_end_user_by_application**](AuthUserDirectoryApi.md#delete_end_user_by_application) | **DELETE** /auth/users/{user_id} | Delete an end user (server-side admin) |
8
+ | [**get_end_user_auth_methods**](AuthUserDirectoryApi.md#get_end_user_auth_methods) | **GET** /auth/users/{user_id}/auth-methods | Get an end user&#39;s sign-in methods (server-side admin) |
8
9
  | [**get_end_user_by_email**](AuthUserDirectoryApi.md#get_end_user_by_email) | **GET** /auth/users/by-email | Look up an end user by email (server-side admin) |
9
10
  | [**get_end_user_by_id**](AuthUserDirectoryApi.md#get_end_user_by_id) | **GET** /auth/users/{user_id} | Get an end user by id (server-side admin) |
10
11
  | [**get_end_user_claims**](AuthUserDirectoryApi.md#get_end_user_claims) | **GET** /auth/users/{user_id}/claims | Get an end user&#39;s stored custom claims (server-side admin) |
@@ -89,6 +90,82 @@ nil (empty response body)
89
90
  - **Accept**: Not defined
90
91
 
91
92
 
93
+ ## get_end_user_auth_methods
94
+
95
+ > <GetEndUserAuthMethods200Response> get_end_user_auth_methods(user_id)
96
+
97
+ Get an end user's sign-in methods (server-side admin)
98
+
99
+ Secret-key-scoped, aggregate view of the sign-in methods configured for a single end user within the authenticating application. Reports whether the user has a password, which OAuth providers are linked, whether MFA is enabled, whether email/phone are verified, and how many passkeys are registered — everything a customer admin needs to build a \"sign-in methods\" screen. Scoped to the application — a caller can never read a user belonging to another application.
100
+
101
+ ### Examples
102
+
103
+ ```ruby
104
+ require 'time'
105
+ require 'zyphr'
106
+ # setup authorization
107
+ Zyphr.configure do |config|
108
+ # Configure API key authorization: ApplicationSecret
109
+ config.api_key['X-Application-Secret'] = 'YOUR API KEY'
110
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
111
+ # config.api_key_prefix['X-Application-Secret'] = 'Bearer'
112
+
113
+ # Configure API key authorization: ApplicationPublicKey
114
+ config.api_key['X-Application-Key'] = 'YOUR API KEY'
115
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
116
+ # config.api_key_prefix['X-Application-Key'] = 'Bearer'
117
+ end
118
+
119
+ api_instance = Zyphr::AuthUserDirectoryApi.new
120
+ user_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
121
+
122
+ begin
123
+ # Get an end user's sign-in methods (server-side admin)
124
+ result = api_instance.get_end_user_auth_methods(user_id)
125
+ p result
126
+ rescue Zyphr::ApiError => e
127
+ puts "Error when calling AuthUserDirectoryApi->get_end_user_auth_methods: #{e}"
128
+ end
129
+ ```
130
+
131
+ #### Using the get_end_user_auth_methods_with_http_info variant
132
+
133
+ This returns an Array which contains the response data, status code and headers.
134
+
135
+ > <Array(<GetEndUserAuthMethods200Response>, Integer, Hash)> get_end_user_auth_methods_with_http_info(user_id)
136
+
137
+ ```ruby
138
+ begin
139
+ # Get an end user's sign-in methods (server-side admin)
140
+ data, status_code, headers = api_instance.get_end_user_auth_methods_with_http_info(user_id)
141
+ p status_code # => 2xx
142
+ p headers # => { ... }
143
+ p data # => <GetEndUserAuthMethods200Response>
144
+ rescue Zyphr::ApiError => e
145
+ puts "Error when calling AuthUserDirectoryApi->get_end_user_auth_methods_with_http_info: #{e}"
146
+ end
147
+ ```
148
+
149
+ ### Parameters
150
+
151
+ | Name | Type | Description | Notes |
152
+ | ---- | ---- | ----------- | ----- |
153
+ | **user_id** | **String** | | |
154
+
155
+ ### Return type
156
+
157
+ [**GetEndUserAuthMethods200Response**](GetEndUserAuthMethods200Response.md)
158
+
159
+ ### Authorization
160
+
161
+ [ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
162
+
163
+ ### HTTP request headers
164
+
165
+ - **Content-Type**: Not defined
166
+ - **Accept**: application/json
167
+
168
+
92
169
  ## get_end_user_by_email
93
170
 
94
171
  > <GetEndUserById200Response> get_end_user_by_email(email)
@@ -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,20 @@
1
+ # Zyphr::GetEndUserAuthMethods200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**AuthMethods**](AuthMethods.md) | | [optional] |
8
+ | **meta** | [**GetDomain200ResponseMeta**](GetDomain200ResponseMeta.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zyphr'
14
+
15
+ instance = Zyphr::GetEndUserAuthMethods200Response.new(
16
+ data: null,
17
+ meta: 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] |