zyphr 0.1.38 → 0.1.40

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 (93) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -14
  3. data/docs/AddWorkflowStep201Response.md +20 -0
  4. data/docs/AddWorkflowStepRequest.md +30 -0
  5. data/docs/AuthRegistrationApi.md +73 -1
  6. data/docs/CreateWorkflow201Response.md +20 -0
  7. data/docs/CreateWorkflowRequest.md +26 -0
  8. data/docs/DeleteWorkflow200Response.md +20 -0
  9. data/docs/{TopicDeleteResponseData.md → DeleteWorkflow200ResponseData.md} +2 -2
  10. data/docs/DeleteWorkflowStep200Response.md +20 -0
  11. data/docs/DeleteWorkflowStep200ResponseData.md +22 -0
  12. data/docs/ListWorkflowExecutions200Response.md +20 -0
  13. data/docs/{SmsListResponseMeta.md → ListWorkflowExecutions200ResponseMeta.md} +2 -2
  14. data/docs/ListWorkflows200Response.md +20 -0
  15. data/docs/ListWorkflows200ResponseMeta.md +32 -0
  16. data/docs/ReorderWorkflowStepsRequest.md +18 -0
  17. data/docs/SignInWithGameCenterRequest.md +1 -1
  18. data/docs/SignInWithGooglePlayGamesRequest.md +18 -0
  19. data/docs/SmsListResponse.md +1 -1
  20. data/docs/TopicDeleteResponse.md +1 -1
  21. data/docs/TriggerWorkflow202Response.md +20 -0
  22. data/docs/TriggerWorkflow202ResponseData.md +22 -0
  23. data/docs/TriggerWorkflowRequest.md +24 -0
  24. data/docs/UpdateWorkflowRequest.md +24 -0
  25. data/docs/UpdateWorkflowStatusRequest.md +18 -0
  26. data/docs/UpdateWorkflowStepRequest.md +20 -0
  27. data/docs/Workflow.md +42 -0
  28. data/docs/WorkflowStatus.md +15 -0
  29. data/docs/WorkflowStep.md +38 -0
  30. data/docs/WorkflowStepType.md +15 -0
  31. data/docs/WorkflowsApi.md +901 -0
  32. data/lib/zyphr/api/auth_registration_api.rb +70 -2
  33. data/lib/zyphr/api/workflows_api.rb +897 -0
  34. data/lib/zyphr/models/add_workflow_step201_response.rb +229 -0
  35. data/lib/zyphr/models/add_workflow_step_request.rb +384 -0
  36. data/lib/zyphr/models/create_workflow201_response.rb +229 -0
  37. data/lib/zyphr/models/create_workflow_request.rb +292 -0
  38. data/lib/zyphr/models/delete_workflow200_response.rb +229 -0
  39. data/lib/zyphr/models/{topic_delete_response_data.rb → delete_workflow200_response_data.rb} +3 -3
  40. data/lib/zyphr/models/delete_workflow_step200_response.rb +229 -0
  41. data/lib/zyphr/models/delete_workflow_step200_response_data.rb +238 -0
  42. data/lib/zyphr/models/list_workflow_executions200_response.rb +231 -0
  43. data/lib/zyphr/models/{sms_list_response_meta.rb → list_workflow_executions200_response_meta.rb} +3 -3
  44. data/lib/zyphr/models/list_workflows200_response.rb +231 -0
  45. data/lib/zyphr/models/list_workflows200_response_meta.rb +284 -0
  46. data/lib/zyphr/models/reorder_workflow_steps_request.rb +249 -0
  47. data/lib/zyphr/models/sign_in_with_game_center_request.rb +1 -1
  48. data/lib/zyphr/models/sign_in_with_google_play_games_request.rb +238 -0
  49. data/lib/zyphr/models/sms_list_response.rb +1 -1
  50. data/lib/zyphr/models/topic_delete_response.rb +1 -1
  51. data/lib/zyphr/models/trigger_workflow202_response.rb +229 -0
  52. data/lib/zyphr/models/trigger_workflow202_response_data.rb +240 -0
  53. data/lib/zyphr/models/trigger_workflow_request.rb +272 -0
  54. data/lib/zyphr/models/update_workflow_request.rb +269 -0
  55. data/lib/zyphr/models/{v1_muse_subjects_suggest_post_request.rb → update_workflow_status_request.rb} +19 -86
  56. data/lib/zyphr/models/update_workflow_step_request.rb +232 -0
  57. data/lib/zyphr/models/workflow.rb +514 -0
  58. data/lib/zyphr/models/workflow_status.rb +42 -0
  59. data/lib/zyphr/models/workflow_step.rb +505 -0
  60. data/lib/zyphr/models/workflow_step_type.rb +47 -0
  61. data/lib/zyphr.rb +25 -4
  62. data/spec/api/auth_registration_api_spec.rb +13 -1
  63. data/spec/api/workflows_api_spec.rb +192 -0
  64. data/spec/models/add_workflow_step201_response_spec.rb +42 -0
  65. data/spec/models/add_workflow_step_request_spec.rb +76 -0
  66. data/spec/models/create_workflow201_response_spec.rb +42 -0
  67. data/spec/models/{v1_muse_subjects_suggest_post_request_spec.rb → create_workflow_request_spec.rb} +16 -14
  68. data/spec/models/{topic_delete_response_data_spec.rb → delete_workflow200_response_data_spec.rb} +6 -6
  69. data/spec/models/delete_workflow200_response_spec.rb +42 -0
  70. data/spec/models/delete_workflow_step200_response_data_spec.rb +48 -0
  71. data/spec/models/delete_workflow_step200_response_spec.rb +42 -0
  72. data/spec/models/{sms_list_response_meta_spec.rb → list_workflow_executions200_response_meta_spec.rb} +6 -6
  73. data/spec/models/list_workflow_executions200_response_spec.rb +42 -0
  74. data/spec/models/list_workflows200_response_meta_spec.rb +78 -0
  75. data/spec/models/list_workflows200_response_spec.rb +42 -0
  76. data/spec/models/reorder_workflow_steps_request_spec.rb +36 -0
  77. data/spec/models/sign_in_with_google_play_games_request_spec.rb +36 -0
  78. data/spec/models/trigger_workflow202_response_data_spec.rb +48 -0
  79. data/spec/models/trigger_workflow202_response_spec.rb +42 -0
  80. data/spec/models/trigger_workflow_request_spec.rb +54 -0
  81. data/spec/models/update_workflow_request_spec.rb +54 -0
  82. data/spec/models/update_workflow_status_request_spec.rb +36 -0
  83. data/spec/models/update_workflow_step_request_spec.rb +42 -0
  84. data/spec/models/workflow_spec.rb +108 -0
  85. data/spec/models/workflow_status_spec.rb +30 -0
  86. data/spec/models/workflow_step_spec.rb +100 -0
  87. data/spec/models/workflow_step_type_spec.rb +30 -0
  88. data/zyphr.gemspec +1 -1
  89. metadata +102 -18
  90. data/docs/MuseApi.md +0 -681
  91. data/docs/V1MuseSubjectsSuggestPostRequest.md +0 -24
  92. data/lib/zyphr/api/muse_api.rb +0 -644
  93. data/spec/api/muse_api_spec.rb +0 -156
@@ -224,7 +224,7 @@ module Zyphr
224
224
  end
225
225
 
226
226
  # Sign in with Apple Game Center
227
- # Exchange an Apple Game Center identity-verification assertion for a Zyphr end-user session. Zyphr independently re-verifies the assertion server-side (Apple certificate chain, RSA-SHA256 signature, timestamp freshness, single-use replay guard, and bundle-id binding) before provisioning-or-looking-up the user and minting tokens. The user is keyed on the modern scoped `playerId` (gamePlayerID). ## Producing the assertion (Integration) The assertion is produced **on-device by the iOS app** — there is no server-side way to mint it. The app calls GameKit's `GKLocalPlayer.fetchItems(forIdentityVerificationSignature:)`, which returns `publicKeyURL`, `signature`, `salt`, and `timestamp`; combine those with the local player's `gamePlayerID` and the app's bundle identifier and submit them here. Two integration shapes are supported: - **client-direct** — the iOS app holds the Zyphr application public key and calls this endpoint itself. - **backend-relayed** — the app forwards the fetched assertion fields to the customer's own backend, which relays them to this endpoint; the app never holds Zyphr keys. (This is the common shape for games.) On any verification failure the response is a single opaque `401` `invalid_assertion` — the specific control that failed is never disclosed.
227
+ # Exchange an Apple Game Center identity-verification assertion for a Zyphr end-user session. Zyphr independently re-verifies the assertion server-side (Apple certificate chain, RSA-SHA256 signature, timestamp freshness, single-use replay guard, and bundle-id binding) before provisioning-or-looking-up the user and minting tokens. The user is keyed on the player's `teamPlayerID` (the id GameKit signs the assertion over). ## Producing the assertion (Integration) The assertion is produced **on-device by the iOS app** — there is no server-side way to mint it. The app calls GameKit's `GKLocalPlayer.fetchItems(forIdentityVerificationSignature:)`, which returns `publicKeyURL`, `signature`, `salt`, and `timestamp`; combine those with the local player's `teamPlayerID` (NOT `gamePlayerID`) and the app's bundle identifier and submit them here. Two integration shapes are supported: - **client-direct** — the iOS app holds the Zyphr application public key and calls this endpoint itself. - **backend-relayed** — the app forwards the fetched assertion fields to the customer's own backend, which relays them to this endpoint; the app never holds Zyphr keys. (This is the common shape for games.) On any verification failure the response is a single opaque `401` `invalid_assertion` — the specific control that failed is never disclosed.
228
228
  # @param sign_in_with_game_center_request [SignInWithGameCenterRequest]
229
229
  # @param [Hash] opts the optional parameters
230
230
  # @return [AuthResultResponse]
@@ -234,7 +234,7 @@ module Zyphr
234
234
  end
235
235
 
236
236
  # Sign in with Apple Game Center
237
- # Exchange an Apple Game Center identity-verification assertion for a Zyphr end-user session. Zyphr independently re-verifies the assertion server-side (Apple certificate chain, RSA-SHA256 signature, timestamp freshness, single-use replay guard, and bundle-id binding) before provisioning-or-looking-up the user and minting tokens. The user is keyed on the modern scoped `playerId` (gamePlayerID). ## Producing the assertion (Integration) The assertion is produced **on-device by the iOS app** — there is no server-side way to mint it. The app calls GameKit's `GKLocalPlayer.fetchItems(forIdentityVerificationSignature:)`, which returns `publicKeyURL`, `signature`, `salt`, and `timestamp`; combine those with the local player's `gamePlayerID` and the app's bundle identifier and submit them here. Two integration shapes are supported: - **client-direct** — the iOS app holds the Zyphr application public key and calls this endpoint itself. - **backend-relayed** — the app forwards the fetched assertion fields to the customer's own backend, which relays them to this endpoint; the app never holds Zyphr keys. (This is the common shape for games.) On any verification failure the response is a single opaque `401` `invalid_assertion` — the specific control that failed is never disclosed.
237
+ # Exchange an Apple Game Center identity-verification assertion for a Zyphr end-user session. Zyphr independently re-verifies the assertion server-side (Apple certificate chain, RSA-SHA256 signature, timestamp freshness, single-use replay guard, and bundle-id binding) before provisioning-or-looking-up the user and minting tokens. The user is keyed on the player's `teamPlayerID` (the id GameKit signs the assertion over). ## Producing the assertion (Integration) The assertion is produced **on-device by the iOS app** — there is no server-side way to mint it. The app calls GameKit's `GKLocalPlayer.fetchItems(forIdentityVerificationSignature:)`, which returns `publicKeyURL`, `signature`, `salt`, and `timestamp`; combine those with the local player's `teamPlayerID` (NOT `gamePlayerID`) and the app's bundle identifier and submit them here. Two integration shapes are supported: - **client-direct** — the iOS app holds the Zyphr application public key and calls this endpoint itself. - **backend-relayed** — the app forwards the fetched assertion fields to the customer's own backend, which relays them to this endpoint; the app never holds Zyphr keys. (This is the common shape for games.) On any verification failure the response is a single opaque `401` `invalid_assertion` — the specific control that failed is never disclosed.
238
238
  # @param sign_in_with_game_center_request [SignInWithGameCenterRequest]
239
239
  # @param [Hash] opts the optional parameters
240
240
  # @return [Array<(AuthResultResponse, Integer, Hash)>] AuthResultResponse data, response status code and response headers
@@ -290,5 +290,73 @@ module Zyphr
290
290
  end
291
291
  return data, status_code, headers
292
292
  end
293
+
294
+ # Sign in with Google Play Games Services
295
+ # Exchange a Google Play Games Services (GPGS) **server auth code** for a Zyphr end-user session. Unlike Game Center (which submits an Apple-signed assertion), GPGS is verified by Google: Zyphr exchanges the single-use server auth code at Google's OAuth2 token endpoint, then calls the Play Games REST API (`players/me`) server-side to obtain the trusted, tamper-proof `playerId`. The user is provisioned-or-looked-up on that server-fetched `playerId` and tokens are minted. ## Producing the server auth code (Integration) The server auth code is obtained **on-device by the Android app** — there is no server-side way to mint it. The app calls `GamesSignInClient.requestServerSideAccess(serverClientId, …)` using the Google Cloud **web (server) client id** configured for the game, which returns a single-use auth code string. Submit that string here as `serverAuthCode`. The **backend-relayed** shape is the common one: the app forwards the auth code to the customer's own backend, which relays it to this endpoint; the app never holds Zyphr keys. ## Security The `playerId` is derived **only** from Zyphr's own server-side call to Google after the token exchange — a client-supplied player id is never accepted or trusted. On any verification failure the response is a single opaque `401` `invalid_auth_code`; the specific control that failed is never disclosed.
296
+ # @param sign_in_with_google_play_games_request [SignInWithGooglePlayGamesRequest]
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [AuthResultResponse]
299
+ def sign_in_with_google_play_games(sign_in_with_google_play_games_request, opts = {})
300
+ data, _status_code, _headers = sign_in_with_google_play_games_with_http_info(sign_in_with_google_play_games_request, opts)
301
+ data
302
+ end
303
+
304
+ # Sign in with Google Play Games Services
305
+ # Exchange a Google Play Games Services (GPGS) **server auth code** for a Zyphr end-user session. Unlike Game Center (which submits an Apple-signed assertion), GPGS is verified by Google: Zyphr exchanges the single-use server auth code at Google&#39;s OAuth2 token endpoint, then calls the Play Games REST API (&#x60;players/me&#x60;) server-side to obtain the trusted, tamper-proof &#x60;playerId&#x60;. The user is provisioned-or-looked-up on that server-fetched &#x60;playerId&#x60; and tokens are minted. ## Producing the server auth code (Integration) The server auth code is obtained **on-device by the Android app** — there is no server-side way to mint it. The app calls &#x60;GamesSignInClient.requestServerSideAccess(serverClientId, …)&#x60; using the Google Cloud **web (server) client id** configured for the game, which returns a single-use auth code string. Submit that string here as &#x60;serverAuthCode&#x60;. The **backend-relayed** shape is the common one: the app forwards the auth code to the customer&#39;s own backend, which relays it to this endpoint; the app never holds Zyphr keys. ## Security The &#x60;playerId&#x60; is derived **only** from Zyphr&#39;s own server-side call to Google after the token exchange — a client-supplied player id is never accepted or trusted. On any verification failure the response is a single opaque &#x60;401&#x60; &#x60;invalid_auth_code&#x60;; the specific control that failed is never disclosed.
306
+ # @param sign_in_with_google_play_games_request [SignInWithGooglePlayGamesRequest]
307
+ # @param [Hash] opts the optional parameters
308
+ # @return [Array<(AuthResultResponse, Integer, Hash)>] AuthResultResponse data, response status code and response headers
309
+ def sign_in_with_google_play_games_with_http_info(sign_in_with_google_play_games_request, opts = {})
310
+ if @api_client.config.debugging
311
+ @api_client.config.logger.debug 'Calling API: AuthRegistrationApi.sign_in_with_google_play_games ...'
312
+ end
313
+ # verify the required parameter 'sign_in_with_google_play_games_request' is set
314
+ if @api_client.config.client_side_validation && sign_in_with_google_play_games_request.nil?
315
+ fail ArgumentError, "Missing the required parameter 'sign_in_with_google_play_games_request' when calling AuthRegistrationApi.sign_in_with_google_play_games"
316
+ end
317
+ # resource path
318
+ local_var_path = '/auth/google-play-games'
319
+
320
+ # query parameters
321
+ query_params = opts[:query_params] || {}
322
+
323
+ # header parameters
324
+ header_params = opts[:header_params] || {}
325
+ # HTTP header 'Accept' (if needed)
326
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
327
+ # HTTP header 'Content-Type'
328
+ content_type = @api_client.select_header_content_type(['application/json'])
329
+ if !content_type.nil?
330
+ header_params['Content-Type'] = content_type
331
+ end
332
+
333
+ # form parameters
334
+ form_params = opts[:form_params] || {}
335
+
336
+ # http body (model)
337
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(sign_in_with_google_play_games_request)
338
+
339
+ # return_type
340
+ return_type = opts[:debug_return_type] || 'AuthResultResponse'
341
+
342
+ # auth_names
343
+ auth_names = opts[:debug_auth_names] || ['ApplicationPublicKey']
344
+
345
+ new_options = opts.merge(
346
+ :operation => :"AuthRegistrationApi.sign_in_with_google_play_games",
347
+ :header_params => header_params,
348
+ :query_params => query_params,
349
+ :form_params => form_params,
350
+ :body => post_body,
351
+ :auth_names => auth_names,
352
+ :return_type => return_type
353
+ )
354
+
355
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
356
+ if @api_client.config.debugging
357
+ @api_client.config.logger.debug "API called: AuthRegistrationApi#sign_in_with_google_play_games\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
358
+ end
359
+ return data, status_code, headers
360
+ end
293
361
  end
294
362
  end