@openfort/openfort-js 0.3.1 → 0.3.2

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.
@@ -2362,6 +2362,37 @@ export interface GetSigninUrlResponse {
2362
2362
  */
2363
2363
  'key': string;
2364
2364
  }
2365
+ /**
2366
+ * Google oauth configuration
2367
+ * @export
2368
+ * @interface GoogleOAuthConfig
2369
+ */
2370
+ export interface GoogleOAuthConfig {
2371
+ /**
2372
+ * Google API client ID.
2373
+ * @type {string}
2374
+ * @memberof GoogleOAuthConfig
2375
+ */
2376
+ 'clientId': string;
2377
+ /**
2378
+ * Google API client secret.
2379
+ * @type {string}
2380
+ * @memberof GoogleOAuthConfig
2381
+ */
2382
+ 'clientSecret': string;
2383
+ /**
2384
+ * The URI to redirect to after completing the auth request. You can use Openfort redirect URL: https://openfort.xyz/auth/v1/google/callback
2385
+ * @type {string}
2386
+ * @memberof GoogleOAuthConfig
2387
+ */
2388
+ 'redirectUri': string;
2389
+ /**
2390
+ *
2391
+ * @type {OAuthProviderGOOGLE}
2392
+ * @memberof GoogleOAuthConfig
2393
+ */
2394
+ 'provider': OAuthProviderGOOGLE;
2395
+ }
2365
2396
  /**
2366
2397
  *
2367
2398
  * @export
@@ -2710,13 +2741,13 @@ export interface OAuthConfig {
2710
2741
  */
2711
2742
  'baseUrl': string;
2712
2743
  /**
2713
- * Client ID of your accelbyte gaming service environment.
2744
+ * Google API client ID.
2714
2745
  * @type {string}
2715
2746
  * @memberof OAuthConfig
2716
2747
  */
2717
2748
  'clientId': string;
2718
2749
  /**
2719
- * Secret of your confidential IAM client.
2750
+ * Google API client secret.
2720
2751
  * @type {string}
2721
2752
  * @memberof OAuthConfig
2722
2753
  */
@@ -2727,6 +2758,12 @@ export interface OAuthConfig {
2727
2758
  * @memberof OAuthConfig
2728
2759
  */
2729
2760
  'provider': OAuthProviderPLAYFAB;
2761
+ /**
2762
+ * The URI to redirect to after completing the auth request. You can use Openfort redirect URL: https://openfort.xyz/auth/v1/google/callback
2763
+ * @type {string}
2764
+ * @memberof OAuthConfig
2765
+ */
2766
+ 'redirectUri': string;
2730
2767
  /**
2731
2768
  * Title ID of your Play Fab gaming service environment.
2732
2769
  * @type {string}
@@ -2780,6 +2817,7 @@ export interface OAuthConfigResponse {
2780
2817
  */
2781
2818
  export declare const OAuthProvider: {
2782
2819
  readonly Accelbyte: "accelbyte";
2820
+ readonly Google: "google";
2783
2821
  readonly Playfab: "playfab";
2784
2822
  };
2785
2823
  export type OAuthProvider = typeof OAuthProvider[keyof typeof OAuthProvider];
@@ -2792,6 +2830,15 @@ export declare const OAuthProviderACCELBYTE: {
2792
2830
  readonly Accelbyte: "accelbyte";
2793
2831
  };
2794
2832
  export type OAuthProviderACCELBYTE = typeof OAuthProviderACCELBYTE[keyof typeof OAuthProviderACCELBYTE];
2833
+ /**
2834
+ *
2835
+ * @export
2836
+ * @enum {string}
2837
+ */
2838
+ export declare const OAuthProviderGOOGLE: {
2839
+ readonly Google: "google";
2840
+ };
2841
+ export type OAuthProviderGOOGLE = typeof OAuthProviderGOOGLE[keyof typeof OAuthProviderGOOGLE];
2795
2842
  /**
2796
2843
  *
2797
2844
  * @export
@@ -4319,16 +4366,10 @@ export interface ProjectResponse {
4319
4366
  'apikeys'?: Array<ApiKeyResponse>;
4320
4367
  /**
4321
4368
  *
4322
- * @type {Array<ProviderResponse>}
4369
+ * @type {Array<WebhookResponse>}
4323
4370
  * @memberof ProjectResponse
4324
4371
  */
4325
- 'providers'?: Array<ProviderResponse>;
4326
- /**
4327
- *
4328
- * @type {Array<ProviderResponse>}
4329
- * @memberof ProjectResponse
4330
- */
4331
- 'webhook'?: Array<ProviderResponse>;
4372
+ 'webhook'?: Array<WebhookResponse>;
4332
4373
  }
4333
4374
  /**
4334
4375
  *
@@ -4349,62 +4390,6 @@ export interface ProjectWebhookRequest {
4349
4390
  */
4350
4391
  'apiKey'?: string;
4351
4392
  }
4352
- /**
4353
- *
4354
- * @export
4355
- * @interface ProviderRequest
4356
- */
4357
- export interface ProviderRequest {
4358
- /**
4359
- * The Google client ID.
4360
- * @type {string}
4361
- * @memberof ProviderRequest
4362
- */
4363
- 'googleClientId': string;
4364
- /**
4365
- * Specifies whether Google Auth is enabled.
4366
- * @type {boolean}
4367
- * @memberof ProviderRequest
4368
- */
4369
- 'googleEnabled': boolean;
4370
- /**
4371
- * The Google client secret.
4372
- * @type {string}
4373
- * @memberof ProviderRequest
4374
- */
4375
- 'googleClientSecret': string;
4376
- }
4377
- /**
4378
- *
4379
- * @export
4380
- * @interface ProviderResponse
4381
- */
4382
- export interface ProviderResponse {
4383
- /**
4384
- *
4385
- * @type {boolean}
4386
- * @memberof ProviderResponse
4387
- */
4388
- 'EXTERNAL_GOOGLE_ENABLED'?: boolean;
4389
- /**
4390
- *
4391
- * @type {string}
4392
- * @memberof ProviderResponse
4393
- */
4394
- 'EXTERNAL_GOOGLE_CLIENT_ID'?: string;
4395
- /**
4396
- *
4397
- * @type {string}
4398
- * @memberof ProviderResponse
4399
- */
4400
- 'EXTERNAL_GOOGLE_SECRET'?: string;
4401
- /**
4402
- *
4403
- * @type {boolean}
4404
- * @memberof ProviderResponse
4405
- */
4406
- 'livemode': boolean;
4407
- }
4408
4393
  /**
4409
4394
  *
4410
4395
  * @export
@@ -5786,6 +5771,25 @@ export interface UserResponse {
5786
5771
  */
5787
5772
  'email': string;
5788
5773
  }
5774
+ /**
5775
+ *
5776
+ * @export
5777
+ * @interface WebhookResponse
5778
+ */
5779
+ export interface WebhookResponse {
5780
+ /**
5781
+ *
5782
+ * @type {string}
5783
+ * @memberof WebhookResponse
5784
+ */
5785
+ 'webhook': string | null;
5786
+ /**
5787
+ *
5788
+ * @type {boolean}
5789
+ * @memberof WebhookResponse
5790
+ */
5791
+ 'livemode': boolean;
5792
+ }
5789
5793
  /**
5790
5794
  * AccountsApi - axios parameter creator
5791
5795
  * @export
@@ -6274,65 +6278,6 @@ export declare class AuthenticationApi extends BaseAPI {
6274
6278
  */
6275
6279
  verifyAuthToken(token: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PlayerResponse, any>>;
6276
6280
  }
6277
- /**
6278
- * ConfigAuthenticationApi - axios parameter creator
6279
- * @export
6280
- */
6281
- export declare const ConfigAuthenticationApiAxiosParamCreator: (configuration?: Configuration) => {
6282
- /**
6283
- *
6284
- * @summary Configure Google OAuth2.
6285
- * @param {ProviderRequest} providerRequest
6286
- * @param {*} [options] Override http request option.
6287
- * @throws {RequiredError}
6288
- */
6289
- editProvider: (providerRequest: ProviderRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
6290
- };
6291
- /**
6292
- * ConfigAuthenticationApi - functional programming interface
6293
- * @export
6294
- */
6295
- export declare const ConfigAuthenticationApiFp: (configuration?: Configuration) => {
6296
- /**
6297
- *
6298
- * @summary Configure Google OAuth2.
6299
- * @param {ProviderRequest} providerRequest
6300
- * @param {*} [options] Override http request option.
6301
- * @throws {RequiredError}
6302
- */
6303
- editProvider(providerRequest: ProviderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProjectResponse>>;
6304
- };
6305
- /**
6306
- * ConfigAuthenticationApi - factory interface
6307
- * @export
6308
- */
6309
- export declare const ConfigAuthenticationApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
6310
- /**
6311
- *
6312
- * @summary Configure Google OAuth2.
6313
- * @param {ProviderRequest} providerRequest
6314
- * @param {*} [options] Override http request option.
6315
- * @throws {RequiredError}
6316
- */
6317
- editProvider(providerRequest: ProviderRequest, options?: any): AxiosPromise<ProjectResponse>;
6318
- };
6319
- /**
6320
- * ConfigAuthenticationApi - object-oriented interface
6321
- * @export
6322
- * @class ConfigAuthenticationApi
6323
- * @extends {BaseAPI}
6324
- */
6325
- export declare class ConfigAuthenticationApi extends BaseAPI {
6326
- /**
6327
- *
6328
- * @summary Configure Google OAuth2.
6329
- * @param {ProviderRequest} providerRequest
6330
- * @param {*} [options] Override http request option.
6331
- * @throws {RequiredError}
6332
- * @memberof ConfigAuthenticationApi
6333
- */
6334
- editProvider(providerRequest: ProviderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ProjectResponse, any>>;
6335
- }
6336
6281
  /**
6337
6282
  * ContractsApi - axios parameter creator
6338
6283
  * @export
@@ -16,8 +16,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.AccountsApi = exports.AccountsApiFactory = exports.AccountsApiFp = exports.AccountsApiAxiosParamCreator = exports.UserProjectRoleMEMBER = exports.UserProjectRoleADMIN = exports.UserProjectRole = exports.TransactionIntentResponseExpandable = exports.TimeIntervalType = exports.SponsorSchemaPAYFORUSER = exports.SponsorSchemaFIXEDRATE = exports.SponsorSchemaCHARGECUSTOMTOKENS = exports.SponsorSchema = exports.SortOrder = exports.SessionResponseExpandable = exports.ResponseTypeLIST = exports.PrivateKeyPolicy = exports.PolicyRuleTypeRATELIMIT = exports.PolicyRuleTypeCONTRACT = exports.PolicyRuleTypeACCOUNT = exports.PolicyRuleType = exports.PolicyRuleListQueriesExpandEnum = exports.PolicyResponseExpandable = exports.PolicyRateLimitGASPERTRANSACTION = exports.PolicyRateLimitGASPERINTERVAL = exports.PolicyRateLimitCOUNTPERINTERVAL = exports.PolicyRateLimit = exports.PlayerResponseExpandable = exports.ObsoleteAssetType = exports.OAuthProviderPLAYFAB = exports.OAuthProviderACCELBYTE = exports.OAuthProvider = exports.NextActionType = exports.ErrorTypeINVALIDREQUESTERROR = exports.EntityTypeUSER = exports.EntityTypeTRANSACTIONINTENT = exports.EntityTypeSIGNATURE = exports.EntityTypeSESSION = exports.EntityTypePROJECT = exports.EntityTypePOLICYRULE = exports.EntityTypePOLICY = exports.EntityTypePLAYER = exports.EntityTypeINVENTORY = exports.EntityTypeCONTRACT = exports.EntityTypeACCOUNT = exports.DataAccountTypes = exports.Currency = exports.AssetType = exports.ApiKeyType = exports.AccountResponseExpandable = void 0;
20
- exports.TransactionIntentsApi = exports.TransactionIntentsApiFactory = exports.TransactionIntentsApiFp = exports.TransactionIntentsApiAxiosParamCreator = exports.SessionsApi = exports.SessionsApiFactory = exports.SessionsApiFp = exports.SessionsApiAxiosParamCreator = exports.PolicyRulesApi = exports.PolicyRulesApiFactory = exports.PolicyRulesApiFp = exports.PolicyRulesApiAxiosParamCreator = exports.PoliciesApi = exports.PoliciesApiFactory = exports.PoliciesApiFp = exports.PoliciesApiAxiosParamCreator = exports.PlayersAuthenticationApi = exports.PlayersAuthenticationApiFactory = exports.PlayersAuthenticationApiFp = exports.PlayersAuthenticationApiAxiosParamCreator = exports.PlayersApi = exports.PlayersApiFactory = exports.PlayersApiFp = exports.PlayersApiAxiosParamCreator = exports.OAuthApi = exports.OAuthApiFactory = exports.OAuthApiFp = exports.OAuthApiAxiosParamCreator = exports.InventoriesApi = exports.InventoriesApiFactory = exports.InventoriesApiFp = exports.InventoriesApiAxiosParamCreator = exports.GoogleAuthenticationApi = exports.GoogleAuthenticationApiFactory = exports.GoogleAuthenticationApiFp = exports.GoogleAuthenticationApiAxiosParamCreator = exports.ContractsApi = exports.ContractsApiFactory = exports.ContractsApiFp = exports.ContractsApiAxiosParamCreator = exports.ConfigAuthenticationApi = exports.ConfigAuthenticationApiFactory = exports.ConfigAuthenticationApiFp = exports.ConfigAuthenticationApiAxiosParamCreator = exports.AuthenticationApi = exports.AuthenticationApiFactory = exports.AuthenticationApiFp = exports.AuthenticationApiAxiosParamCreator = void 0;
19
+ exports.AccountsApiFactory = exports.AccountsApiFp = exports.AccountsApiAxiosParamCreator = exports.UserProjectRoleMEMBER = exports.UserProjectRoleADMIN = exports.UserProjectRole = exports.TransactionIntentResponseExpandable = exports.TimeIntervalType = exports.SponsorSchemaPAYFORUSER = exports.SponsorSchemaFIXEDRATE = exports.SponsorSchemaCHARGECUSTOMTOKENS = exports.SponsorSchema = exports.SortOrder = exports.SessionResponseExpandable = exports.ResponseTypeLIST = exports.PrivateKeyPolicy = exports.PolicyRuleTypeRATELIMIT = exports.PolicyRuleTypeCONTRACT = exports.PolicyRuleTypeACCOUNT = exports.PolicyRuleType = exports.PolicyRuleListQueriesExpandEnum = exports.PolicyResponseExpandable = exports.PolicyRateLimitGASPERTRANSACTION = exports.PolicyRateLimitGASPERINTERVAL = exports.PolicyRateLimitCOUNTPERINTERVAL = exports.PolicyRateLimit = exports.PlayerResponseExpandable = exports.ObsoleteAssetType = exports.OAuthProviderPLAYFAB = exports.OAuthProviderGOOGLE = exports.OAuthProviderACCELBYTE = exports.OAuthProvider = exports.NextActionType = exports.ErrorTypeINVALIDREQUESTERROR = exports.EntityTypeUSER = exports.EntityTypeTRANSACTIONINTENT = exports.EntityTypeSIGNATURE = exports.EntityTypeSESSION = exports.EntityTypePROJECT = exports.EntityTypePOLICYRULE = exports.EntityTypePOLICY = exports.EntityTypePLAYER = exports.EntityTypeINVENTORY = exports.EntityTypeCONTRACT = exports.EntityTypeACCOUNT = exports.DataAccountTypes = exports.Currency = exports.AssetType = exports.ApiKeyType = exports.AccountResponseExpandable = void 0;
20
+ exports.TransactionIntentsApi = exports.TransactionIntentsApiFactory = exports.TransactionIntentsApiFp = exports.TransactionIntentsApiAxiosParamCreator = exports.SessionsApi = exports.SessionsApiFactory = exports.SessionsApiFp = exports.SessionsApiAxiosParamCreator = exports.PolicyRulesApi = exports.PolicyRulesApiFactory = exports.PolicyRulesApiFp = exports.PolicyRulesApiAxiosParamCreator = exports.PoliciesApi = exports.PoliciesApiFactory = exports.PoliciesApiFp = exports.PoliciesApiAxiosParamCreator = exports.PlayersAuthenticationApi = exports.PlayersAuthenticationApiFactory = exports.PlayersAuthenticationApiFp = exports.PlayersAuthenticationApiAxiosParamCreator = exports.PlayersApi = exports.PlayersApiFactory = exports.PlayersApiFp = exports.PlayersApiAxiosParamCreator = exports.OAuthApi = exports.OAuthApiFactory = exports.OAuthApiFp = exports.OAuthApiAxiosParamCreator = exports.InventoriesApi = exports.InventoriesApiFactory = exports.InventoriesApiFp = exports.InventoriesApiAxiosParamCreator = exports.GoogleAuthenticationApi = exports.GoogleAuthenticationApiFactory = exports.GoogleAuthenticationApiFp = exports.GoogleAuthenticationApiAxiosParamCreator = exports.ContractsApi = exports.ContractsApiFactory = exports.ContractsApiFp = exports.ContractsApiAxiosParamCreator = exports.AuthenticationApi = exports.AuthenticationApiFactory = exports.AuthenticationApiFp = exports.AuthenticationApiAxiosParamCreator = exports.AccountsApi = void 0;
21
21
  const axios_1 = __importDefault(require("axios"));
22
22
  // Some imports not used depending on template conditions
23
23
  // @ts-ignore
@@ -182,6 +182,7 @@ exports.NextActionType = {
182
182
  */
183
183
  exports.OAuthProvider = {
184
184
  Accelbyte: 'accelbyte',
185
+ Google: 'google',
185
186
  Playfab: 'playfab'
186
187
  };
187
188
  /**
@@ -192,6 +193,14 @@ exports.OAuthProvider = {
192
193
  exports.OAuthProviderACCELBYTE = {
193
194
  Accelbyte: 'accelbyte'
194
195
  };
196
+ /**
197
+ *
198
+ * @export
199
+ * @enum {string}
200
+ */
201
+ exports.OAuthProviderGOOGLE = {
202
+ Google: 'google'
203
+ };
195
204
  /**
196
205
  *
197
206
  * @export
@@ -1343,109 +1352,6 @@ class AuthenticationApi extends base_1.BaseAPI {
1343
1352
  }
1344
1353
  }
1345
1354
  exports.AuthenticationApi = AuthenticationApi;
1346
- /**
1347
- * ConfigAuthenticationApi - axios parameter creator
1348
- * @export
1349
- */
1350
- const ConfigAuthenticationApiAxiosParamCreator = function (configuration) {
1351
- return {
1352
- /**
1353
- *
1354
- * @summary Configure Google OAuth2.
1355
- * @param {ProviderRequest} providerRequest
1356
- * @param {*} [options] Override http request option.
1357
- * @throws {RequiredError}
1358
- */
1359
- editProvider: async (providerRequest, options = {}) => {
1360
- // verify required parameter 'providerRequest' is not null or undefined
1361
- (0, common_1.assertParamExists)('editProvider', 'providerRequest', providerRequest);
1362
- const localVarPath = `/auth/v1/config`;
1363
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1364
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1365
- let baseOptions;
1366
- if (configuration) {
1367
- baseOptions = configuration.baseOptions;
1368
- }
1369
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1370
- const localVarHeaderParameter = {};
1371
- const localVarQueryParameter = {};
1372
- // authentication sk required
1373
- // http bearer authentication required
1374
- await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1375
- localVarHeaderParameter['Content-Type'] = 'application/json';
1376
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1377
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1378
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1379
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(providerRequest, localVarRequestOptions, configuration);
1380
- return {
1381
- url: (0, common_1.toPathString)(localVarUrlObj),
1382
- options: localVarRequestOptions,
1383
- };
1384
- },
1385
- };
1386
- };
1387
- exports.ConfigAuthenticationApiAxiosParamCreator = ConfigAuthenticationApiAxiosParamCreator;
1388
- /**
1389
- * ConfigAuthenticationApi - functional programming interface
1390
- * @export
1391
- */
1392
- const ConfigAuthenticationApiFp = function (configuration) {
1393
- const localVarAxiosParamCreator = (0, exports.ConfigAuthenticationApiAxiosParamCreator)(configuration);
1394
- return {
1395
- /**
1396
- *
1397
- * @summary Configure Google OAuth2.
1398
- * @param {ProviderRequest} providerRequest
1399
- * @param {*} [options] Override http request option.
1400
- * @throws {RequiredError}
1401
- */
1402
- async editProvider(providerRequest, options) {
1403
- const localVarAxiosArgs = await localVarAxiosParamCreator.editProvider(providerRequest, options);
1404
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1405
- },
1406
- };
1407
- };
1408
- exports.ConfigAuthenticationApiFp = ConfigAuthenticationApiFp;
1409
- /**
1410
- * ConfigAuthenticationApi - factory interface
1411
- * @export
1412
- */
1413
- const ConfigAuthenticationApiFactory = function (configuration, basePath, axios) {
1414
- const localVarFp = (0, exports.ConfigAuthenticationApiFp)(configuration);
1415
- return {
1416
- /**
1417
- *
1418
- * @summary Configure Google OAuth2.
1419
- * @param {ProviderRequest} providerRequest
1420
- * @param {*} [options] Override http request option.
1421
- * @throws {RequiredError}
1422
- */
1423
- editProvider(providerRequest, options) {
1424
- return localVarFp.editProvider(providerRequest, options).then((request) => request(axios, basePath));
1425
- },
1426
- };
1427
- };
1428
- exports.ConfigAuthenticationApiFactory = ConfigAuthenticationApiFactory;
1429
- /**
1430
- * ConfigAuthenticationApi - object-oriented interface
1431
- * @export
1432
- * @class ConfigAuthenticationApi
1433
- * @extends {BaseAPI}
1434
- */
1435
- class ConfigAuthenticationApi extends base_1.BaseAPI {
1436
- /**
1437
- *
1438
- * @summary Configure Google OAuth2.
1439
- * @param {ProviderRequest} providerRequest
1440
- * @param {*} [options] Override http request option.
1441
- * @throws {RequiredError}
1442
- * @memberof ConfigAuthenticationApi
1443
- */
1444
- editProvider(providerRequest, options) {
1445
- return (0, exports.ConfigAuthenticationApiFp)(this.configuration).editProvider(providerRequest, options).then((request) => request(this.axios, this.basePath));
1446
- }
1447
- }
1448
- exports.ConfigAuthenticationApi = ConfigAuthenticationApi;
1449
1355
  /**
1450
1356
  * ContractsApi - axios parameter creator
1451
1357
  * @export