@openfort/openfort-js 0.8.8 → 0.8.9

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.
package/dist/index.cjs CHANGED
@@ -1187,6 +1187,43 @@ const AuthenticationApiAxiosParamCreator = function (configuration) {
1187
1187
  options: localVarRequestOptions,
1188
1188
  };
1189
1189
  },
1190
+ /**
1191
+ * Authenticate a player from an identity token.
1192
+ * @summary OIDC Identity token.
1193
+ * @param {LoginOIDCRequest} loginOIDCRequest
1194
+ * @param {string} [xGame]
1195
+ * @param {*} [options] Override http request option.
1196
+ * @throws {RequiredError}
1197
+ */
1198
+ loginOIDC: async (loginOIDCRequest, xGame, options = {}) => {
1199
+ // verify required parameter 'loginOIDCRequest' is not null or undefined
1200
+ assertParamExists('loginOIDC', 'loginOIDCRequest', loginOIDCRequest);
1201
+ const localVarPath = `/iam/v1/oidc/login`;
1202
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1203
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1204
+ let baseOptions;
1205
+ if (configuration) {
1206
+ baseOptions = configuration.baseOptions;
1207
+ }
1208
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1209
+ const localVarHeaderParameter = {};
1210
+ const localVarQueryParameter = {};
1211
+ // authentication pk required
1212
+ // http bearer authentication required
1213
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1214
+ if (xGame != null) {
1215
+ localVarHeaderParameter['x-game'] = String(xGame);
1216
+ }
1217
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1218
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1219
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1220
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1221
+ localVarRequestOptions.data = serializeDataIfNeeded(loginOIDCRequest, localVarRequestOptions, configuration);
1222
+ return {
1223
+ url: toPathString(localVarUrlObj),
1224
+ options: localVarRequestOptions,
1225
+ };
1226
+ },
1190
1227
  /**
1191
1228
  * When using Openfort Auth, the endpoint logs out the player.
1192
1229
  * @summary Log out a player.
@@ -1800,6 +1837,18 @@ const AuthenticationApiFp = function (configuration) {
1800
1837
  const localVarAxiosArgs = await localVarAxiosParamCreator.loginEmailPassword(loginRequest, xGame, options);
1801
1838
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1802
1839
  },
1840
+ /**
1841
+ * Authenticate a player from an identity token.
1842
+ * @summary OIDC Identity token.
1843
+ * @param {LoginOIDCRequest} loginOIDCRequest
1844
+ * @param {string} [xGame]
1845
+ * @param {*} [options] Override http request option.
1846
+ * @throws {RequiredError}
1847
+ */
1848
+ async loginOIDC(loginOIDCRequest, xGame, options) {
1849
+ const localVarAxiosArgs = await localVarAxiosParamCreator.loginOIDC(loginOIDCRequest, xGame, options);
1850
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1851
+ },
1803
1852
  /**
1804
1853
  * When using Openfort Auth, the endpoint logs out the player.
1805
1854
  * @summary Log out a player.
@@ -2086,6 +2135,17 @@ class AuthenticationApi extends BaseAPI {
2086
2135
  loginEmailPassword(requestParameters, options) {
2087
2136
  return AuthenticationApiFp(this.configuration).loginEmailPassword(requestParameters.loginRequest, requestParameters.xGame, options).then((request) => request(this.axios, this.basePath));
2088
2137
  }
2138
+ /**
2139
+ * Authenticate a player from an identity token.
2140
+ * @summary OIDC Identity token.
2141
+ * @param {AuthenticationApiLoginOIDCRequest} requestParameters Request parameters.
2142
+ * @param {*} [options] Override http request option.
2143
+ * @throws {RequiredError}
2144
+ * @memberof AuthenticationApi
2145
+ */
2146
+ loginOIDC(requestParameters, options) {
2147
+ return AuthenticationApiFp(this.configuration).loginOIDC(requestParameters.loginOIDCRequest, requestParameters.xGame, options).then((request) => request(this.axios, this.basePath));
2148
+ }
2089
2149
  /**
2090
2150
  * When using Openfort Auth, the endpoint logs out the player.
2091
2151
  * @summary Log out a player.
@@ -2798,8 +2858,8 @@ const TransactionIntentsApiAxiosParamCreator = function (configuration) {
2798
2858
  };
2799
2859
  },
2800
2860
  /**
2801
- * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `userOperationHash`. Openfort will then put it on-chain.
2802
- * @summary Send a signed transaction userOperationHash.
2861
+ * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `signableHash`. Openfort will then put it on-chain.
2862
+ * @summary Send a signed transaction signableHash.
2803
2863
  * @param {string} id Specifies the unique transaction intent ID (starts with tin_).
2804
2864
  * @param {SignatureRequest} signatureRequest
2805
2865
  * @param {*} [options] Override http request option.
@@ -2901,8 +2961,8 @@ const TransactionIntentsApiFp = function (configuration) {
2901
2961
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2902
2962
  },
2903
2963
  /**
2904
- * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `userOperationHash`. Openfort will then put it on-chain.
2905
- * @summary Send a signed transaction userOperationHash.
2964
+ * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `signableHash`. Openfort will then put it on-chain.
2965
+ * @summary Send a signed transaction signableHash.
2906
2966
  * @param {string} id Specifies the unique transaction intent ID (starts with tin_).
2907
2967
  * @param {SignatureRequest} signatureRequest
2908
2968
  * @param {*} [options] Override http request option.
@@ -2966,8 +3026,8 @@ class TransactionIntentsApi extends BaseAPI {
2966
3026
  return TransactionIntentsApiFp(this.configuration).getTransactionIntents(requestParameters.limit, requestParameters.skip, requestParameters.order, requestParameters.expand, requestParameters.chainId, requestParameters.account, requestParameters.player, requestParameters.status, requestParameters.policy, options).then((request) => request(this.axios, this.basePath));
2967
3027
  }
2968
3028
  /**
2969
- * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `userOperationHash`. Openfort will then put it on-chain.
2970
- * @summary Send a signed transaction userOperationHash.
3029
+ * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `signableHash`. Openfort will then put it on-chain.
3030
+ * @summary Send a signed transaction signableHash.
2971
3031
  * @param {TransactionIntentsApiSignatureRequest} requestParameters Request parameters.
2972
3032
  * @param {*} [options] Override http request option.
2973
3033
  * @throws {RequiredError}
@@ -3165,7 +3225,7 @@ class KeyPair extends signingKey.SigningKey {
3165
3225
  }
3166
3226
  }
3167
3227
 
3168
- const VERSION = '0.8.8';
3228
+ const VERSION = '0.8.9';
3169
3229
 
3170
3230
  var Event;
3171
3231
  (function (Event) {
@@ -4112,6 +4172,7 @@ exports.OAuthProvider = void 0;
4112
4172
  OAuthProvider["FACEBOOK"] = "facebook";
4113
4173
  OAuthProvider["DISCORD"] = "discord";
4114
4174
  OAuthProvider["EPIC_GAMES"] = "epic_games";
4175
+ OAuthProvider["TELEGRAM"] = "telegram";
4115
4176
  })(exports.OAuthProvider || (exports.OAuthProvider = {}));
4116
4177
  var CodeChallengeMethodEnum;
4117
4178
  (function (CodeChallengeMethodEnum) {
package/dist/index.d.ts CHANGED
@@ -153,6 +153,7 @@ declare const AUTH_PROVIDER: {
153
153
  readonly wallet: "wallet";
154
154
  readonly google: "google";
155
155
  readonly twitter: "twitter";
156
+ readonly telegram: "telegram";
156
157
  readonly discord: "discord";
157
158
  readonly facebook: "facebook";
158
159
  readonly epicGames: "epic_games";
@@ -170,7 +171,8 @@ declare enum OAuthProvider {
170
171
  TWITTER = "twitter",
171
172
  FACEBOOK = "facebook",
172
173
  DISCORD = "discord",
173
- EPIC_GAMES = "epic_games"
174
+ EPIC_GAMES = "epic_games",
175
+ TELEGRAM = "telegram"
174
176
  }
175
177
  interface NextActionPayload {
176
178
  'userOperation'?: any;
package/dist/index.js CHANGED
@@ -1164,6 +1164,43 @@ const AuthenticationApiAxiosParamCreator = function (configuration) {
1164
1164
  options: localVarRequestOptions,
1165
1165
  };
1166
1166
  },
1167
+ /**
1168
+ * Authenticate a player from an identity token.
1169
+ * @summary OIDC Identity token.
1170
+ * @param {LoginOIDCRequest} loginOIDCRequest
1171
+ * @param {string} [xGame]
1172
+ * @param {*} [options] Override http request option.
1173
+ * @throws {RequiredError}
1174
+ */
1175
+ loginOIDC: async (loginOIDCRequest, xGame, options = {}) => {
1176
+ // verify required parameter 'loginOIDCRequest' is not null or undefined
1177
+ assertParamExists('loginOIDC', 'loginOIDCRequest', loginOIDCRequest);
1178
+ const localVarPath = `/iam/v1/oidc/login`;
1179
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1180
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1181
+ let baseOptions;
1182
+ if (configuration) {
1183
+ baseOptions = configuration.baseOptions;
1184
+ }
1185
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1186
+ const localVarHeaderParameter = {};
1187
+ const localVarQueryParameter = {};
1188
+ // authentication pk required
1189
+ // http bearer authentication required
1190
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
1191
+ if (xGame != null) {
1192
+ localVarHeaderParameter['x-game'] = String(xGame);
1193
+ }
1194
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1195
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1196
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1197
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1198
+ localVarRequestOptions.data = serializeDataIfNeeded(loginOIDCRequest, localVarRequestOptions, configuration);
1199
+ return {
1200
+ url: toPathString(localVarUrlObj),
1201
+ options: localVarRequestOptions,
1202
+ };
1203
+ },
1167
1204
  /**
1168
1205
  * When using Openfort Auth, the endpoint logs out the player.
1169
1206
  * @summary Log out a player.
@@ -1777,6 +1814,18 @@ const AuthenticationApiFp = function (configuration) {
1777
1814
  const localVarAxiosArgs = await localVarAxiosParamCreator.loginEmailPassword(loginRequest, xGame, options);
1778
1815
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1779
1816
  },
1817
+ /**
1818
+ * Authenticate a player from an identity token.
1819
+ * @summary OIDC Identity token.
1820
+ * @param {LoginOIDCRequest} loginOIDCRequest
1821
+ * @param {string} [xGame]
1822
+ * @param {*} [options] Override http request option.
1823
+ * @throws {RequiredError}
1824
+ */
1825
+ async loginOIDC(loginOIDCRequest, xGame, options) {
1826
+ const localVarAxiosArgs = await localVarAxiosParamCreator.loginOIDC(loginOIDCRequest, xGame, options);
1827
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1828
+ },
1780
1829
  /**
1781
1830
  * When using Openfort Auth, the endpoint logs out the player.
1782
1831
  * @summary Log out a player.
@@ -2063,6 +2112,17 @@ class AuthenticationApi extends BaseAPI {
2063
2112
  loginEmailPassword(requestParameters, options) {
2064
2113
  return AuthenticationApiFp(this.configuration).loginEmailPassword(requestParameters.loginRequest, requestParameters.xGame, options).then((request) => request(this.axios, this.basePath));
2065
2114
  }
2115
+ /**
2116
+ * Authenticate a player from an identity token.
2117
+ * @summary OIDC Identity token.
2118
+ * @param {AuthenticationApiLoginOIDCRequest} requestParameters Request parameters.
2119
+ * @param {*} [options] Override http request option.
2120
+ * @throws {RequiredError}
2121
+ * @memberof AuthenticationApi
2122
+ */
2123
+ loginOIDC(requestParameters, options) {
2124
+ return AuthenticationApiFp(this.configuration).loginOIDC(requestParameters.loginOIDCRequest, requestParameters.xGame, options).then((request) => request(this.axios, this.basePath));
2125
+ }
2066
2126
  /**
2067
2127
  * When using Openfort Auth, the endpoint logs out the player.
2068
2128
  * @summary Log out a player.
@@ -2775,8 +2835,8 @@ const TransactionIntentsApiAxiosParamCreator = function (configuration) {
2775
2835
  };
2776
2836
  },
2777
2837
  /**
2778
- * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `userOperationHash`. Openfort will then put it on-chain.
2779
- * @summary Send a signed transaction userOperationHash.
2838
+ * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `signableHash`. Openfort will then put it on-chain.
2839
+ * @summary Send a signed transaction signableHash.
2780
2840
  * @param {string} id Specifies the unique transaction intent ID (starts with tin_).
2781
2841
  * @param {SignatureRequest} signatureRequest
2782
2842
  * @param {*} [options] Override http request option.
@@ -2878,8 +2938,8 @@ const TransactionIntentsApiFp = function (configuration) {
2878
2938
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2879
2939
  },
2880
2940
  /**
2881
- * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `userOperationHash`. Openfort will then put it on-chain.
2882
- * @summary Send a signed transaction userOperationHash.
2941
+ * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `signableHash`. Openfort will then put it on-chain.
2942
+ * @summary Send a signed transaction signableHash.
2883
2943
  * @param {string} id Specifies the unique transaction intent ID (starts with tin_).
2884
2944
  * @param {SignatureRequest} signatureRequest
2885
2945
  * @param {*} [options] Override http request option.
@@ -2943,8 +3003,8 @@ class TransactionIntentsApi extends BaseAPI {
2943
3003
  return TransactionIntentsApiFp(this.configuration).getTransactionIntents(requestParameters.limit, requestParameters.skip, requestParameters.order, requestParameters.expand, requestParameters.chainId, requestParameters.account, requestParameters.player, requestParameters.status, requestParameters.policy, options).then((request) => request(this.axios, this.basePath));
2944
3004
  }
2945
3005
  /**
2946
- * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `userOperationHash`. Openfort will then put it on-chain.
2947
- * @summary Send a signed transaction userOperationHash.
3006
+ * Broadcasts a signed TransactionIntent to the blockchain. Use this endpoint to send the signed `signableHash`. Openfort will then put it on-chain.
3007
+ * @summary Send a signed transaction signableHash.
2948
3008
  * @param {TransactionIntentsApiSignatureRequest} requestParameters Request parameters.
2949
3009
  * @param {*} [options] Override http request option.
2950
3010
  * @throws {RequiredError}
@@ -3142,7 +3202,7 @@ class KeyPair extends SigningKey {
3142
3202
  }
3143
3203
  }
3144
3204
 
3145
- const VERSION = '0.8.8';
3205
+ const VERSION = '0.8.9';
3146
3206
 
3147
3207
  var Event;
3148
3208
  (function (Event) {
@@ -4089,6 +4149,7 @@ var OAuthProvider;
4089
4149
  OAuthProvider["FACEBOOK"] = "facebook";
4090
4150
  OAuthProvider["DISCORD"] = "discord";
4091
4151
  OAuthProvider["EPIC_GAMES"] = "epic_games";
4152
+ OAuthProvider["TELEGRAM"] = "telegram";
4092
4153
  })(OAuthProvider || (OAuthProvider = {}));
4093
4154
  var CodeChallengeMethodEnum;
4094
4155
  (function (CodeChallengeMethodEnum) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfort/openfort-js",
3
- "version": "0.8.8",
3
+ "version": "0.8.9",
4
4
  "author": "Openfort (https://www.openfort.xyz)",
5
5
  "bugs": "https://github.com/openfort-xyz/openfort-js/issues",
6
6
  "repository": "openfort-xyz/openfort-js.git",