@zyphr-dev/node-sdk 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 (41) hide show
  1. package/dist/index.cjs +1793 -626
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +1766 -604
  4. package/dist/index.d.ts +1766 -604
  5. package/dist/index.js +1668 -609
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/.openapi-generator/FILES +25 -4
  9. package/src/src/apis/AuthRegistrationApi.ts +69 -4
  10. package/src/src/apis/WorkflowsApi.ts +912 -0
  11. package/src/src/apis/index.ts +1 -1
  12. package/src/src/models/AddWorkflowStep201Response.ts +88 -0
  13. package/src/src/models/AddWorkflowStepRequest.ts +136 -0
  14. package/src/src/models/CreateWorkflow201Response.ts +88 -0
  15. package/src/src/models/CreateWorkflowRequest.ts +98 -0
  16. package/src/src/models/DeleteWorkflow200Response.ts +88 -0
  17. package/src/src/models/{TopicDeleteResponseData.ts → DeleteWorkflow200ResponseData.ts} +12 -12
  18. package/src/src/models/DeleteWorkflowStep200Response.ts +88 -0
  19. package/src/src/models/DeleteWorkflowStep200ResponseData.ts +81 -0
  20. package/src/src/models/ListWorkflowExecutions200Response.ts +88 -0
  21. package/src/src/models/{SmsListResponseMeta.ts → ListWorkflowExecutions200ResponseMeta.ts} +15 -15
  22. package/src/src/models/ListWorkflows200Response.ts +88 -0
  23. package/src/src/models/ListWorkflows200ResponseMeta.ts +121 -0
  24. package/src/src/models/ReorderWorkflowStepsRequest.ts +66 -0
  25. package/src/src/models/SignInWithGameCenterRequest.ts +1 -1
  26. package/src/src/models/SignInWithGooglePlayGamesRequest.ts +66 -0
  27. package/src/src/models/SmsListResponse.ts +10 -10
  28. package/src/src/models/TopicDeleteResponse.ts +10 -10
  29. package/src/src/models/TriggerWorkflow202Response.ts +88 -0
  30. package/src/src/models/TriggerWorkflow202ResponseData.ts +81 -0
  31. package/src/src/models/TriggerWorkflowRequest.ts +90 -0
  32. package/src/src/models/UpdateWorkflowRequest.ts +89 -0
  33. package/src/src/models/UpdateWorkflowStatusRequest.ts +76 -0
  34. package/src/src/models/UpdateWorkflowStepRequest.ts +73 -0
  35. package/src/src/models/Workflow.ts +187 -0
  36. package/src/src/models/WorkflowStatus.ts +55 -0
  37. package/src/src/models/WorkflowStep.ts +176 -0
  38. package/src/src/models/WorkflowStepType.ts +60 -0
  39. package/src/src/models/index.ts +24 -3
  40. package/src/src/apis/MuseApi.ts +0 -531
  41. package/src/src/models/V1MuseSubjectsSuggestPostRequest.ts +0 -105
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyphr-dev/node-sdk",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "Official Zyphr SDK for Node.js, React, and React Native",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -23,7 +23,6 @@ src/apis/EmailsApi.ts
23
23
  src/apis/ExecutionsApi.ts
24
24
  src/apis/InboundEmailApi.ts
25
25
  src/apis/InboxApi.ts
26
- src/apis/MuseApi.ts
27
26
  src/apis/PushApi.ts
28
27
  src/apis/SMSApi.ts
29
28
  src/apis/SlackApi.ts
@@ -38,6 +37,7 @@ src/apis/WaaSEventTypesApi.ts
38
37
  src/apis/WaaSEventsApi.ts
39
38
  src/apis/WaaSPortalApi.ts
40
39
  src/apis/WebhooksApi.ts
40
+ src/apis/WorkflowsApi.ts
41
41
  src/apis/index.ts
42
42
  src/index.ts
43
43
  src/models/AddDomain200Response.ts
@@ -45,6 +45,8 @@ src/models/AddDomain200ResponseMeta.ts
45
45
  src/models/AddDomainRequest.ts
46
46
  src/models/AddOrganizationMemberRequest.ts
47
47
  src/models/AddTopicSubscribersRequest.ts
48
+ src/models/AddWorkflowStep201Response.ts
49
+ src/models/AddWorkflowStepRequest.ts
48
50
  src/models/ApiError.ts
49
51
  src/models/ApiErrorError.ts
50
52
  src/models/ApiErrorMeta.ts
@@ -111,10 +113,16 @@ src/models/CreateWaaSEndpointResponse.ts
111
113
  src/models/CreateWaaSEventType201Response.ts
112
114
  src/models/CreateWaaSEventTypeRequest.ts
113
115
  src/models/CreateWebhookRequest.ts
116
+ src/models/CreateWorkflow201Response.ts
117
+ src/models/CreateWorkflowRequest.ts
114
118
  src/models/DeleteDomainResponse.ts
115
119
  src/models/DeleteDomainResponseData.ts
116
120
  src/models/DeleteResult.ts
117
121
  src/models/DeleteResultData.ts
122
+ src/models/DeleteWorkflow200Response.ts
123
+ src/models/DeleteWorkflow200ResponseData.ts
124
+ src/models/DeleteWorkflowStep200Response.ts
125
+ src/models/DeleteWorkflowStep200ResponseData.ts
118
126
  src/models/Device.ts
119
127
  src/models/DeviceListResponse.ts
120
128
  src/models/DevicePushTopic.ts
@@ -172,6 +180,10 @@ src/models/ListWaaSApplications200Response.ts
172
180
  src/models/ListWaaSEndpointDeliveries200Response.ts
173
181
  src/models/ListWaaSEndpoints200Response.ts
174
182
  src/models/ListWaaSEventTypes200Response.ts
183
+ src/models/ListWorkflowExecutions200Response.ts
184
+ src/models/ListWorkflowExecutions200ResponseMeta.ts
185
+ src/models/ListWorkflows200Response.ts
186
+ src/models/ListWorkflows200ResponseMeta.ts
175
187
  src/models/LoginRequest.ts
176
188
  src/models/MagicLinkSendRequest.ts
177
189
  src/models/MagicLinkVerifyRequest.ts
@@ -266,6 +278,7 @@ src/models/RegisterRequest.ts
266
278
  src/models/RemoveTopicSubscribersRequest.ts
267
279
  src/models/RenameWebAuthnCredentialRequest.ts
268
280
  src/models/RenderTemplateRequest.ts
281
+ src/models/ReorderWorkflowStepsRequest.ts
269
282
  src/models/ReplayWebhookEventsRequest.ts
270
283
  src/models/RequestMeta.ts
271
284
  src/models/ResetPasswordRequest.ts
@@ -321,6 +334,7 @@ src/models/SetPreferencesRequest.ts
321
334
  src/models/SetPreferencesRequestPreferencesInner.ts
322
335
  src/models/SignInAnonymouslyRequest.ts
323
336
  src/models/SignInWithGameCenterRequest.ts
337
+ src/models/SignInWithGooglePlayGamesRequest.ts
324
338
  src/models/SlackMessage.ts
325
339
  src/models/SlackMessageListResponse.ts
326
340
  src/models/SlackMessageListResponseMeta.ts
@@ -335,7 +349,6 @@ src/models/SmsConfigDeleteResponseData.ts
335
349
  src/models/SmsConfigResponse.ts
336
350
  src/models/SmsDetailResponse.ts
337
351
  src/models/SmsListResponse.ts
338
- src/models/SmsListResponseMeta.ts
339
352
  src/models/SmsMessage.ts
340
353
  src/models/SmsMessageDetail.ts
341
354
  src/models/SubscribePushTopicRequest.ts
@@ -357,7 +370,6 @@ src/models/TemplateResponse.ts
357
370
  src/models/TestWebhookTransformRequest.ts
358
371
  src/models/Topic.ts
359
372
  src/models/TopicDeleteResponse.ts
360
- src/models/TopicDeleteResponseData.ts
361
373
  src/models/TopicListResponse.ts
362
374
  src/models/TopicResponse.ts
363
375
  src/models/TopicStatsData.ts
@@ -369,6 +381,9 @@ src/models/TopicSubscribersAddResponse.ts
369
381
  src/models/TopicSubscribersAddResult.ts
370
382
  src/models/TopicSubscribersRemoveResponse.ts
371
383
  src/models/TopicSubscribersRemoveResult.ts
384
+ src/models/TriggerWorkflow202Response.ts
385
+ src/models/TriggerWorkflow202ResponseData.ts
386
+ src/models/TriggerWorkflowRequest.ts
372
387
  src/models/UnreadCountData.ts
373
388
  src/models/UnreadCountResponse.ts
374
389
  src/models/Unsubscribe.ts
@@ -389,11 +404,13 @@ src/models/UpdateWaaSApplicationRequest.ts
389
404
  src/models/UpdateWaaSEndpointRequest.ts
390
405
  src/models/UpdateWaaSEventTypeRequest.ts
391
406
  src/models/UpdateWebhookRequest.ts
407
+ src/models/UpdateWorkflowRequest.ts
408
+ src/models/UpdateWorkflowStatusRequest.ts
409
+ src/models/UpdateWorkflowStepRequest.ts
392
410
  src/models/UpsertAuthEmailTemplateRequest.ts
393
411
  src/models/UpsertSmsConfigRequest.ts
394
412
  src/models/UserDevicesDeleteResponse.ts
395
413
  src/models/UserDevicesDeleteResponseData.ts
396
- src/models/V1MuseSubjectsSuggestPostRequest.ts
397
414
  src/models/ValidateResetTokenRequest.ts
398
415
  src/models/ValidateResetTokenResponse.ts
399
416
  src/models/ValidateResetTokenResponseData.ts
@@ -469,10 +486,14 @@ src/models/WebhookVersion.ts
469
486
  src/models/WebhookVersionsResponse.ts
470
487
  src/models/WebhookVersionsResponseData.ts
471
488
  src/models/WithdrawSubscriberConsentRequest.ts
489
+ src/models/Workflow.ts
472
490
  src/models/WorkflowExecution.ts
473
491
  src/models/WorkflowExecutionStatus.ts
492
+ src/models/WorkflowStatus.ts
493
+ src/models/WorkflowStep.ts
474
494
  src/models/WorkflowStepExecution.ts
475
495
  src/models/WorkflowStepExecutionStatus.ts
496
+ src/models/WorkflowStepType.ts
476
497
  src/models/index.ts
477
498
  src/runtime.ts
478
499
  tsconfig.esm.json
@@ -21,6 +21,7 @@ import type {
21
21
  RegisterRequest,
22
22
  SignInAnonymouslyRequest,
23
23
  SignInWithGameCenterRequest,
24
+ SignInWithGooglePlayGamesRequest,
24
25
  } from '../models/index';
25
26
  import {
26
27
  ApiErrorFromJSON,
@@ -35,6 +36,8 @@ import {
35
36
  SignInAnonymouslyRequestToJSON,
36
37
  SignInWithGameCenterRequestFromJSON,
37
38
  SignInWithGameCenterRequestToJSON,
39
+ SignInWithGooglePlayGamesRequestFromJSON,
40
+ SignInWithGooglePlayGamesRequestToJSON,
38
41
  } from '../models/index';
39
42
 
40
43
  export interface AuthRegistrationApiConvertAnonymousUserOperationRequest {
@@ -53,6 +56,10 @@ export interface AuthRegistrationApiSignInWithGameCenterOperationRequest {
53
56
  signInWithGameCenterRequest: SignInWithGameCenterRequest;
54
57
  }
55
58
 
59
+ export interface AuthRegistrationApiSignInWithGooglePlayGamesOperationRequest {
60
+ signInWithGooglePlayGamesRequest: SignInWithGooglePlayGamesRequest;
61
+ }
62
+
56
63
  /**
57
64
  * AuthRegistrationApi - interface
58
65
  *
@@ -109,7 +116,7 @@ export interface AuthRegistrationApiInterface {
109
116
  signInAnonymously(signInAnonymouslyRequest: SignInAnonymouslyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthResultResponse>;
110
117
 
111
118
  /**
112
- * 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.
119
+ * 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.
113
120
  * @summary Sign in with Apple Game Center
114
121
  * @param {SignInWithGameCenterRequest} signInWithGameCenterRequest
115
122
  * @param {*} [options] Override http request option.
@@ -119,11 +126,27 @@ export interface AuthRegistrationApiInterface {
119
126
  signInWithGameCenterRaw(requestParameters: AuthRegistrationApiSignInWithGameCenterOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthResultResponse>>;
120
127
 
121
128
  /**
122
- * 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.
129
+ * 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.
123
130
  * Sign in with Apple Game Center
124
131
  */
125
132
  signInWithGameCenter(signInWithGameCenterRequest: SignInWithGameCenterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthResultResponse>;
126
133
 
134
+ /**
135
+ * 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.
136
+ * @summary Sign in with Google Play Games Services
137
+ * @param {SignInWithGooglePlayGamesRequest} signInWithGooglePlayGamesRequest
138
+ * @param {*} [options] Override http request option.
139
+ * @throws {RequiredError}
140
+ * @memberof AuthRegistrationApiInterface
141
+ */
142
+ signInWithGooglePlayGamesRaw(requestParameters: AuthRegistrationApiSignInWithGooglePlayGamesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthResultResponse>>;
143
+
144
+ /**
145
+ * 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.
146
+ * Sign in with Google Play Games Services
147
+ */
148
+ signInWithGooglePlayGames(signInWithGooglePlayGamesRequest: SignInWithGooglePlayGamesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthResultResponse>;
149
+
127
150
  }
128
151
 
129
152
  /**
@@ -258,7 +281,7 @@ export class AuthRegistrationApi extends runtime.BaseAPI implements AuthRegistra
258
281
  }
259
282
 
260
283
  /**
261
- * 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.
284
+ * 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.
262
285
  * Sign in with Apple Game Center
263
286
  */
264
287
  async signInWithGameCenterRaw(requestParameters: AuthRegistrationApiSignInWithGameCenterOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthResultResponse>> {
@@ -291,7 +314,7 @@ export class AuthRegistrationApi extends runtime.BaseAPI implements AuthRegistra
291
314
  }
292
315
 
293
316
  /**
294
- * 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.
317
+ * 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.
295
318
  * Sign in with Apple Game Center
296
319
  */
297
320
  async signInWithGameCenter(signInWithGameCenterRequest: SignInWithGameCenterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthResultResponse> {
@@ -299,4 +322,46 @@ export class AuthRegistrationApi extends runtime.BaseAPI implements AuthRegistra
299
322
  return await response.value();
300
323
  }
301
324
 
325
+ /**
326
+ * 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.
327
+ * Sign in with Google Play Games Services
328
+ */
329
+ async signInWithGooglePlayGamesRaw(requestParameters: AuthRegistrationApiSignInWithGooglePlayGamesOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuthResultResponse>> {
330
+ if (requestParameters['signInWithGooglePlayGamesRequest'] == null) {
331
+ throw new runtime.RequiredError(
332
+ 'signInWithGooglePlayGamesRequest',
333
+ 'Required parameter "signInWithGooglePlayGamesRequest" was null or undefined when calling signInWithGooglePlayGames().'
334
+ );
335
+ }
336
+
337
+ const queryParameters: any = {};
338
+
339
+ const headerParameters: runtime.HTTPHeaders = {};
340
+
341
+ headerParameters['Content-Type'] = 'application/json';
342
+
343
+ if (this.configuration && this.configuration.apiKey) {
344
+ headerParameters["X-Application-Key"] = await this.configuration.apiKey("X-Application-Key"); // ApplicationPublicKey authentication
345
+ }
346
+
347
+ const response = await this.request({
348
+ path: `/auth/google-play-games`,
349
+ method: 'POST',
350
+ headers: headerParameters,
351
+ query: queryParameters,
352
+ body: SignInWithGooglePlayGamesRequestToJSON(requestParameters['signInWithGooglePlayGamesRequest']),
353
+ }, initOverrides);
354
+
355
+ return new runtime.JSONApiResponse(response, (jsonValue) => AuthResultResponseFromJSON(jsonValue));
356
+ }
357
+
358
+ /**
359
+ * 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.
360
+ * Sign in with Google Play Games Services
361
+ */
362
+ async signInWithGooglePlayGames(signInWithGooglePlayGamesRequest: SignInWithGooglePlayGamesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuthResultResponse> {
363
+ const response = await this.signInWithGooglePlayGamesRaw({ signInWithGooglePlayGamesRequest: signInWithGooglePlayGamesRequest }, initOverrides);
364
+ return await response.value();
365
+ }
366
+
302
367
  }