@opexa/portal-sdk 0.59.124 → 0.59.126

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.
@@ -14,6 +14,16 @@ function gql(strings, ...values) {
14
14
  }
15
15
 
16
16
  // src/services/queries.ts
17
+ var GENERATE_OUTBOUND_SINGLE_SIGN_ON_REDIRECT_URL_MUTATION = gql`
18
+ mutation GenerateOutboundSingleSignOnRedirectUrl(
19
+ $input: GenerateOutboundSingleSignOnRedirectUrlInput!
20
+ ) {
21
+ generateOutboundSingleSignOnRedirectUrl(input: $input) {
22
+ token
23
+ url
24
+ }
25
+ }
26
+ `;
17
27
  var FILE_FRAGMENT = gql`
18
28
  fragment FileFragment on File {
19
29
  id
@@ -314,6 +324,9 @@ var CREATE_GAME_SESSION_MUTATION = gql`
314
324
  ... on GameTypeNotEnabledError {
315
325
  __typename
316
326
  }
327
+ ... on GameNotEnabledError {
328
+ __typename
329
+ }
317
330
  }
318
331
  }
319
332
  `;
@@ -4064,6 +4077,7 @@ function createOperationError(code) {
4064
4077
  FileNotReadyError: "File is not yet ready",
4065
4078
  FileSizeTooBigError: "File size is too big",
4066
4079
  GameDoesNotExistError: "Game does not exist",
4080
+ GameNotEnabledError: "Game is not enabled",
4067
4081
  InsufficientPointsError: "Insufficient points",
4068
4082
  InvalidPlatformError: "Invalid platform",
4069
4083
  InvalidReCAPTCHAResponseError: "Invalid reCAPTCHA",
@@ -4847,11 +4861,25 @@ var ERROR_MAP = {
4847
4861
  // src/services/auth.service.ts
4848
4862
  var AuthService = class {
4849
4863
  url;
4864
+ graphqlClient;
4850
4865
  options;
4851
4866
  constructor(config) {
4852
4867
  this.url = config.url;
4868
+ this.graphqlClient = config.graphqlClient;
4853
4869
  this.options = config.fetchOptions ?? {};
4854
4870
  }
4871
+ async generateOutboundSingleSignOnRedirectUrl(variables) {
4872
+ if (!this.graphqlClient) {
4873
+ return {
4874
+ ok: false,
4875
+ error: {
4876
+ name: "UnknownError",
4877
+ message: "Something went wrong"
4878
+ }
4879
+ };
4880
+ }
4881
+ return await this.graphqlClient.request(GENERATE_OUTBOUND_SINGLE_SIGN_ON_REDIRECT_URL_MUTATION, variables);
4882
+ }
4855
4883
  get headers() {
4856
4884
  const headers = new Headers(this.options.headers);
4857
4885
  headers.append("Accept", "application/json, text/plain");