async-playfab-web-sdk 1.192.250526-1

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 (54) hide show
  1. package/dist/Addon.d.ts +591 -0
  2. package/dist/Addon.js +452 -0
  3. package/dist/Addon.js.map +1 -0
  4. package/dist/Admin.d.ts +3484 -0
  5. package/dist/Admin.js +1112 -0
  6. package/dist/Admin.js.map +1 -0
  7. package/dist/Authentication.d.ts +109 -0
  8. package/dist/Authentication.js +290 -0
  9. package/dist/Authentication.js.map +1 -0
  10. package/dist/Client.d.ts +4482 -0
  11. package/dist/Client.js +1893 -0
  12. package/dist/Client.js.map +1 -0
  13. package/dist/CloudScript.d.ts +511 -0
  14. package/dist/CloudScript.js +349 -0
  15. package/dist/CloudScript.js.map +1 -0
  16. package/dist/Data.d.ts +228 -0
  17. package/dist/Data.js +291 -0
  18. package/dist/Data.js.map +1 -0
  19. package/dist/Economy.d.ts +1865 -0
  20. package/dist/Economy.js +614 -0
  21. package/dist/Economy.js.map +1 -0
  22. package/dist/Events.d.ts +307 -0
  23. package/dist/Events.js +327 -0
  24. package/dist/Events.js.map +1 -0
  25. package/dist/Experimentation.d.ts +357 -0
  26. package/dist/Experimentation.js +333 -0
  27. package/dist/Experimentation.js.map +1 -0
  28. package/dist/Groups.d.ts +546 -0
  29. package/dist/Groups.js +417 -0
  30. package/dist/Groups.js.map +1 -0
  31. package/dist/Insights.d.ts +141 -0
  32. package/dist/Insights.js +286 -0
  33. package/dist/Insights.js.map +1 -0
  34. package/dist/Localization.d.ts +20 -0
  35. package/dist/Localization.js +249 -0
  36. package/dist/Localization.js.map +1 -0
  37. package/dist/Multiplayer.d.ts +3059 -0
  38. package/dist/Multiplayer.js +862 -0
  39. package/dist/Multiplayer.js.map +1 -0
  40. package/dist/PlayFabCommon-BUv4zqXf.d.ts +72 -0
  41. package/dist/Profiles.d.ts +278 -0
  42. package/dist/Profiles.js +306 -0
  43. package/dist/Profiles.js.map +1 -0
  44. package/dist/Progression.d.ts +598 -0
  45. package/dist/Progression.js +404 -0
  46. package/dist/Progression.js.map +1 -0
  47. package/dist/Server.d.ts +3889 -0
  48. package/dist/Server.js +1377 -0
  49. package/dist/Server.js.map +1 -0
  50. package/dist/index.d.ts +17 -0
  51. package/dist/index.js +6007 -0
  52. package/dist/index.js.map +1 -0
  53. package/package.json +23 -0
  54. package/readme.md +25 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/constants.ts","../src/PlayFabContext.ts","../src/PlayFabCommon.ts","../src/apis/PlayFabExperimentationApi.ts"],"sourcesContent":["export interface ISettings {\n /** You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website) */\n titleId: string;\n /** For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website) */\n developerSecretKey: string;\n productionServerUrl: string;\n GlobalHeaderInjection?: { [key: string]: string };\n /** The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this */\n verticalName?: string | null;\n}\n\nexport const AuthInfoMap = {\n \"X-EntityToken\": {\n authAttr: \"entityToken\",\n authError: \"errorEntityToken\",\n },\n \"X-Authorization\": {\n authAttr: \"sessionTicket\",\n authError: \"errorLoggedIn\",\n },\n \"X-SecretKey\": {\n authAttr: \"developerSecretKey\",\n authError: \"errorSecretKey\",\n },\n};\n\nexport default {\n sdkVersion: \"1.192.250526\",\n sdkFingerprint: \"JavaScriptSDK-1.192.250526\",\n buildIdentifier: \"custom_async-javascriptsdk\",\n defaultSettings: {\n titleId: \"\",\n developerSecretKey: \"\",\n GlobalHeaderInjection: {},\n productionServerUrl: \".playfabapi.com\",\n verticalName: null\n } as ISettings\n};\n","import constants, { type ISettings } from \"./constants\";\n\nexport type AuthContext = {\n PlayFabId: string | null;\n EntityId: string | null;\n EntityType: string | null;\n SessionTicket: string | null;\n EntityToken: string | null;\n};\n\nexport class PlayFabContext {\n private static _instance: PlayFabContext;\n\n settings: ISettings = constants.defaultSettings;\n\n authenticationContext: AuthContext = {\n PlayFabId: null,\n EntityId: null,\n EntityType: null,\n SessionTicket: null,\n EntityToken: null,\n };\n\n sessionTicket: string | null = null;\n\n entityToken: string | null = null;\n\n private constructor() {}\n\n public static get instance(): PlayFabContext {\n if (!PlayFabContext._instance) {\n PlayFabContext._instance = new PlayFabContext();\n }\n\n return PlayFabContext._instance;\n }\n}\n","import constants, { ISettings, AuthInfoMap } from \"./constants\";\nimport { AuthContext, PlayFabContext } from \"./PlayFabContext\";\nimport { IPlayFabError, IPlayFabResultCommon } from \"./types/PlayFab\";\n\nexport class PlayFabCommon {\n buildIdentifier: string = constants.buildIdentifier;\n requestGetParams = {\n sdk: constants.sdkFingerprint,\n } as const;\n errorTitleId = \"Must be have settings.titleId set to call this method\";\n errorLoggedIn = \"Must be logged in to call this method\";\n errorEntityToken =\n \"You must successfully call GetEntityToken before calling this\";\n errorSecretKey =\n \"Must have settings.developerSecretKey set to call this method\";\n private _context = PlayFabContext.instance;\n\n constructor(settings: Partial<ISettings> | undefined = undefined) {\n if (settings) {\n Object.assign(this._context.settings, settings);\n }\n }\n\n get settings() {\n return this._context.settings;\n }\n\n get authenticationContext() {\n return this._context.authenticationContext;\n }\n\n get sessionTicket() {\n return this._context.sessionTicket;\n }\n\n set sessionTicket(value: string | null) {\n this._context.sessionTicket = value;\n }\n\n get entityToken() {\n return this._context.entityToken;\n }\n\n set entityToken(value: string | null) {\n this._context.entityToken = value;\n }\n\n GetServerUrl() {\n if (!(this.settings.productionServerUrl.substring(0, 4) === \"http\")) {\n return `https://${this.settings.verticalName || this.settings.titleId}${\n this.settings.productionServerUrl\n }`;\n } else {\n return this.settings.productionServerUrl;\n }\n }\n\n InjectHeaders(\n xhr: XMLHttpRequest,\n headersObj: Record<string, string> | undefined\n ) {\n if (!headersObj) return;\n\n for (const headerKey in headersObj) {\n try {\n xhr.setRequestHeader(headerKey, headersObj[headerKey]);\n } catch (e) {\n console.log(\n `Failed to append header: ${headerKey} = ${headersObj[headerKey]} Error: ${e}`\n );\n }\n }\n }\n\n ExecuteRequest<T extends IPlayFabResultCommon>(\n url: string,\n body: any,\n authkey: string | null,\n authValue: string | null,\n customData: any,\n extraHeaders?: Record<string, string>\n ): Promise<T> {\n return new Promise((resolve, reject) => {\n if (body == null) body = {};\n\n var startTime = new Date().getTime();\n var requestBody = JSON.stringify(body);\n\n var urlArr = [url];\n var getParams = this.requestGetParams;\n if (getParams != null) {\n var firstParam = true;\n for (var key in getParams) {\n if (firstParam) {\n urlArr.push(\"?\");\n firstParam = false;\n } else {\n urlArr.push(\"&\");\n }\n urlArr.push(key);\n urlArr.push(\"=\");\n urlArr.push(getParams[key as keyof typeof getParams]);\n }\n }\n\n var completeUrl = urlArr.join(\"\");\n\n var xhr = new XMLHttpRequest();\n xhr.open(\"POST\", completeUrl, true);\n\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n xhr.setRequestHeader(\n \"X-PlayFabSDK\",\n \"JavaScriptSDK-\" + constants.sdkVersion\n );\n if (authkey != null) {\n xhr.setRequestHeader(authkey, authValue!);\n }\n this.InjectHeaders(xhr, this.settings.GlobalHeaderInjection);\n this.InjectHeaders(xhr, extraHeaders);\n\n xhr.onloadend = () => {\n var result = this.GetPlayFabResponse(body, xhr, startTime, customData);\n if (result.code === 200) {\n resolve(result.data || result);\n } else {\n reject(result);\n }\n };\n\n xhr.onerror = () => {\n var result = this.GetPlayFabResponse(body, xhr, startTime, customData);\n reject(result);\n };\n\n xhr.send(requestBody);\n });\n }\n\n GetPlayFabResponse(\n request: any,\n xhr: XMLHttpRequest,\n startTime: number,\n customData: any\n ) {\n var result = null as any;\n try {\n // window.console.log(\"parsing json result: \" + xhr.responseText);\n result = JSON.parse(xhr.responseText);\n } catch (e) {\n result = {\n code: 503, // Service Unavailable\n status: \"Service Unavailable\",\n error: \"Connection error\",\n errorCode: 2, // PlayFabErrorCode.ConnectionError\n errorMessage: xhr.responseText,\n };\n }\n\n result.CallBackTimeMS = new Date().getTime() - startTime;\n result.Request = request;\n result.CustomData = customData;\n return result;\n }\n\n UpdateAuthenticationContext(currentAuthContext: AuthContext, result: any) {\n var authenticationContextUpdates = {} as AuthContext;\n if (result?.PlayFabId) {\n authenticationContextUpdates.PlayFabId = result.PlayFabId;\n }\n if (result?.SessionTicket) {\n authenticationContextUpdates.SessionTicket = result.SessionTicket;\n }\n if (result?.EntityToken) {\n authenticationContextUpdates.EntityId = result.EntityToken.Entity.Id;\n authenticationContextUpdates.EntityType = result.EntityToken.Entity.Type;\n authenticationContextUpdates.EntityToken = result.EntityToken.EntityToken;\n }\n // Update the authenticationContext with values from the result\n currentAuthContext = Object.assign(\n currentAuthContext,\n authenticationContextUpdates\n );\n\n this._context.authenticationContext = currentAuthContext;\n\n return currentAuthContext;\n }\n\n GetAuthInfo(request: any, authKey: string) {\n // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext\n var authError = AuthInfoMap[authKey as keyof typeof AuthInfoMap].authError;\n var authAttr = AuthInfoMap[authKey as keyof typeof AuthInfoMap].authAttr;\n var defaultAuthValue: string | null = null;\n if (authAttr === \"entityToken\") defaultAuthValue = this.entityToken;\n else if (authAttr === \"sessionTicket\")\n defaultAuthValue = this.sessionTicket;\n else if (authAttr === \"developerSecretKey\")\n defaultAuthValue = this.settings.developerSecretKey;\n var authValue = request.AuthenticationContext\n ? request.AuthenticationContext[authAttr]\n : defaultAuthValue;\n return { authKey, authValue, authError };\n }\n\n ExecuteRequestWrapper<T extends IPlayFabResultCommon>(\n apiURL: string,\n request: any,\n authKey: string | null,\n customData: any,\n extraHeaders?: Record<string, string>\n ) {\n var authValue = null;\n if (authKey !== null) {\n const { authError, ...authInfo } = this.GetAuthInfo(request, authKey);\n authKey = authInfo.authKey;\n authValue = authInfo.authValue;\n if (!authValue) throw authError;\n }\n return this.ExecuteRequest<T>(\n this.GetServerUrl() + apiURL,\n request,\n authKey,\n authValue,\n customData,\n extraHeaders\n );\n }\n\n GenerateErrorReport(error: IPlayFabError | null): string {\n if (error == null) return \"\";\n var fullErrors = error.errorMessage;\n for (var paramName in error.errorDetails)\n for (var msgIdx in error.errorDetails[paramName])\n fullErrors +=\n \"\\n\" + paramName + \": \" + error.errorDetails[paramName][msgIdx];\n return fullErrors;\n }\n\n ForgetAllCredentials() {\n this._context.sessionTicket = null;\n this._context.entityToken = null;\n }\n}\n","import type { EmptyResponse } from \"../types/PlayFab\";\nimport type {\n\n CreateExclusionGroupRequest,\n CreateExperimentRequest,\n DeleteExclusionGroupRequest,\n DeleteExperimentRequest,\n GetExclusionGroupsRequest,\n GetExclusionGroupTrafficRequest,\n GetExperimentsRequest,\n GetLatestScorecardRequest,\n GetTreatmentAssignmentRequest,\n StartExperimentRequest,\n StopExperimentRequest,\n UpdateExclusionGroupRequest,\n UpdateExperimentRequest,\n CreateExclusionGroupResult,\n CreateExperimentResult,\n GetExclusionGroupsResult,\n GetExclusionGroupTrafficResult,\n GetExperimentsResult,\n GetLatestScorecardResult,\n GetTreatmentAssignmentResult,\n} from \"../types/PlayFabExperimentationApi\";\nimport { PlayFabCommon } from \"../PlayFabCommon\";\n\nexport default class PlayFabExperimentationApi extends PlayFabCommon {\n\n /**\n * Creates a new experiment exclusion group for a title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/createexclusiongroup\n */\n CreateExclusionGroup (request: CreateExclusionGroupRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<CreateExclusionGroupResult>(\"/Experimentation/CreateExclusionGroup\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Creates a new experiment for a title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/createexperiment\n */\n CreateExperiment (request: CreateExperimentRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<CreateExperimentResult>(\"/Experimentation/CreateExperiment\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Deletes an existing exclusion group for a title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/deleteexclusiongroup\n */\n DeleteExclusionGroup (request: DeleteExclusionGroupRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Experimentation/DeleteExclusionGroup\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Deletes an existing experiment for a title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/deleteexperiment\n */\n DeleteExperiment (request: DeleteExperimentRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Experimentation/DeleteExperiment\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Gets the details of all exclusion groups for a title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getexclusiongroups\n */\n GetExclusionGroups (request: GetExclusionGroupsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetExclusionGroupsResult>(\"/Experimentation/GetExclusionGroups\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Gets the details of all exclusion groups for a title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getexclusiongrouptraffic\n */\n GetExclusionGroupTraffic (request: GetExclusionGroupTrafficRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetExclusionGroupTrafficResult>(\"/Experimentation/GetExclusionGroupTraffic\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Gets the details of all experiments for a title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getexperiments\n */\n GetExperiments (request: GetExperimentsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetExperimentsResult>(\"/Experimentation/GetExperiments\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Gets the latest scorecard of the experiment for the title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getlatestscorecard\n */\n GetLatestScorecard (request: GetLatestScorecardRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetLatestScorecardResult>(\"/Experimentation/GetLatestScorecard\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Gets the treatment assignments for a player for every running experiment in the title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/gettreatmentassignment\n */\n GetTreatmentAssignment (request: GetTreatmentAssignmentRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetTreatmentAssignmentResult>(\"/Experimentation/GetTreatmentAssignment\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Starts an existing experiment for a title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/startexperiment\n */\n StartExperiment (request: StartExperimentRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Experimentation/StartExperiment\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Stops an existing experiment for a title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/stopexperiment\n */\n StopExperiment (request: StopExperimentRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Experimentation/StopExperiment\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Updates an existing exclusion group for a title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/updateexclusiongroup\n */\n UpdateExclusionGroup (request: UpdateExclusionGroupRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Experimentation/UpdateExclusionGroup\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Updates an existing experiment for a title.\n * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/updateexperiment\n */\n UpdateExperiment (request: UpdateExperimentRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Experimentation/UpdateExperiment\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n};\n"],"mappings":";AAWO,IAAM,cAAc;AAAA,EACzB,iBAAiB;AAAA,IACf,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA,mBAAmB;AAAA,IACjB,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA,eAAe;AAAA,IACb,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AACF;AAEA,IAAO,oBAAQ;AAAA,EACb,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,oBAAoB;AAAA,IACpB,uBAAuB,CAAC;AAAA,IACxB,qBAAqB;AAAA,IACrB,cAAc;AAAA,EAChB;AACF;;;AC3BO,IAAM,iBAAN,MAAM,gBAAe;AAAA,EAiBlB,cAAc;AAdtB,oBAAsB,kBAAU;AAEhC,iCAAqC;AAAA,MACnC,WAAW;AAAA,MACX,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,aAAa;AAAA,IACf;AAEA,yBAA+B;AAE/B,uBAA6B;AAAA,EAEN;AAAA,EAEvB,WAAkB,WAA2B;AAC3C,QAAI,CAAC,gBAAe,WAAW;AAC7B,sBAAe,YAAY,IAAI,gBAAe;AAAA,IAChD;AAEA,WAAO,gBAAe;AAAA,EACxB;AACF;;;AChCO,IAAM,gBAAN,MAAoB;AAAA,EAazB,YAAY,WAA2C,QAAW;AAZlE,2BAA0B,kBAAU;AACpC,4BAAmB;AAAA,MACjB,KAAK,kBAAU;AAAA,IACjB;AACA,wBAAe;AACf,yBAAgB;AAChB,4BACE;AACF,0BACE;AACF,SAAQ,WAAW,eAAe;AAGhC,QAAI,UAAU;AACZ,aAAO,OAAO,KAAK,SAAS,UAAU,QAAQ;AAAA,IAChD;AAAA,EACF;AAAA,EAEA,IAAI,WAAW;AACb,WAAO,KAAK,SA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4C,mCAAmC,SAAS,iBAAiB,YAAY,YAAY;AAAA,EACjJ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,mBAAoB,SAAoC,YAAkB,cAAuC;AAC7G,WAAO,KAAK,sBAAgD,uCAAuC,SAAS,iBAAiB,YAAY,YAAY;AAAA,EACzJ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,uBAAwB,SAAwC,YAAkB,cAAuC;AACrH,WAAO,KAAK,sBAAoD,2CAA2C,SAAS,iBAAiB,YAAY,YAAY;AAAA,EACjK;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBAAiB,SAAiC,YAAkB,cAAuC;AACvG,WAAO,KAAK,sBAAqC,oCAAoC,SAAS,iBAAiB,YAAY,YAAY;AAAA,EAC3I;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,eAAgB,SAAgC,YAAkB,cAAuC;AACrG,WAAO,KAAK,sBAAqC,mCAAmC,SAAS,iBAAiB,YAAY,YAAY;AAAA,EAC1I;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,qBAAsB,SAAsC,YAAkB,cAAuC;AACjH,WAAO,KAAK,sBAAqC,yCAAyC,SAAS,iBAAiB,YAAY,YAAY;AAAA,EAChJ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,iBAAkB,SAAkC,YAAkB,cAAuC;AACzG,WAAO,KAAK,sBAAqC,qCAAqC,SAAS,iBAAiB,YAAY,YAAY;AAAA,EAC5I;AAEJ;","names":[]}
@@ -0,0 +1,546 @@
1
+ import { I as IPlayFabRequestCommon, a as IPlayFabResultCommon, P as PlayFabCommon, E as EmptyResponse } from './PlayFabCommon-BUv4zqXf.js';
2
+
3
+ interface AcceptGroupApplicationRequest extends IPlayFabRequestCommon {
4
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
5
+ CustomTags?: Record<string, string | null>;
6
+ /**
7
+ * Type of the entity to accept as. Must be the same entity as the claimant or an entity that is a child of the claimant
8
+ * entity.
9
+ */
10
+ Entity: EntityKey;
11
+ /** The identifier of the group */
12
+ Group: EntityKey;
13
+ }
14
+ interface AcceptGroupInvitationRequest extends IPlayFabRequestCommon {
15
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
16
+ CustomTags?: Record<string, string | null>;
17
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
18
+ Entity?: EntityKey;
19
+ /** The identifier of the group */
20
+ Group: EntityKey;
21
+ }
22
+ interface AddMembersRequest extends IPlayFabRequestCommon {
23
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
24
+ CustomTags?: Record<string, string | null>;
25
+ /** The identifier of the group */
26
+ Group: EntityKey;
27
+ /** List of entities to add to the group. Only entities of type title_player_account and character may be added to groups. */
28
+ Members: EntityKey[];
29
+ /**
30
+ * Optional: The ID of the existing role to add the entities to. If this is not specified, the default member role for the
31
+ * group will be used. Role IDs must be between 1 and 64 characters long.
32
+ */
33
+ RoleId?: string;
34
+ }
35
+ interface ApplyToGroupRequest extends IPlayFabRequestCommon {
36
+ /** Optional, default true. Automatically accept an outstanding invitation if one exists instead of creating an application */
37
+ AutoAcceptOutstandingInvite?: boolean;
38
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
39
+ CustomTags?: Record<string, string | null>;
40
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
41
+ Entity?: EntityKey;
42
+ /** The identifier of the group */
43
+ Group: EntityKey;
44
+ }
45
+ interface ApplyToGroupResponse extends IPlayFabResultCommon {
46
+ /** Type of entity that requested membership */
47
+ Entity?: EntityWithLineage;
48
+ /** When the application to join will expire and be deleted */
49
+ Expires: string;
50
+ /** ID of the group that the entity requesting membership to */
51
+ Group?: EntityKey;
52
+ }
53
+ interface BlockEntityRequest extends IPlayFabRequestCommon {
54
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
55
+ CustomTags?: Record<string, string | null>;
56
+ /** The entity to perform this action on. */
57
+ Entity: EntityKey;
58
+ /** The identifier of the group */
59
+ Group: EntityKey;
60
+ }
61
+ interface ChangeMemberRoleRequest extends IPlayFabRequestCommon {
62
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
63
+ CustomTags?: Record<string, string | null>;
64
+ /**
65
+ * The ID of the role that the entities will become a member of. This must be an existing role. Role IDs must be between 1
66
+ * and 64 characters long.
67
+ */
68
+ DestinationRoleId?: string;
69
+ /** The identifier of the group */
70
+ Group: EntityKey;
71
+ /**
72
+ * List of entities to move between roles in the group. All entities in this list must be members of the group and origin
73
+ * role.
74
+ */
75
+ Members: EntityKey[];
76
+ /** The ID of the role that the entities currently are a member of. Role IDs must be between 1 and 64 characters long. */
77
+ OriginRoleId: string;
78
+ }
79
+ interface CreateGroupRequest extends IPlayFabRequestCommon {
80
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
81
+ CustomTags?: Record<string, string | null>;
82
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
83
+ Entity?: EntityKey;
84
+ /** The name of the group. This is unique at the title level by default. */
85
+ GroupName: string;
86
+ }
87
+ interface CreateGroupResponse extends IPlayFabResultCommon {
88
+ /** The ID of the administrator role for the group. */
89
+ AdminRoleId?: string;
90
+ /** The server date and time the group was created. */
91
+ Created: string;
92
+ /** The identifier of the group */
93
+ Group: EntityKey;
94
+ /** The name of the group. */
95
+ GroupName?: string;
96
+ /** The ID of the default member role for the group. */
97
+ MemberRoleId?: string;
98
+ /** The current version of the profile, can be used for concurrency control during updates. */
99
+ ProfileVersion: number;
100
+ /** The list of roles and names that belong to the group. */
101
+ Roles?: Record<string, string | null>;
102
+ }
103
+ interface CreateGroupRoleRequest extends IPlayFabRequestCommon {
104
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
105
+ CustomTags?: Record<string, string | null>;
106
+ /** The identifier of the group */
107
+ Group: EntityKey;
108
+ /**
109
+ * The ID of the role. This must be unique within the group and cannot be changed. Role IDs must be between 1 and 64
110
+ * characters long and are restricted to a-Z, A-Z, 0-9, '(', ')', '_', '-' and '.'.
111
+ */
112
+ RoleId: string;
113
+ /**
114
+ * The name of the role. This must be unique within the group and can be changed later. Role names must be between 1 and
115
+ * 100 characters long
116
+ */
117
+ RoleName: string;
118
+ }
119
+ interface CreateGroupRoleResponse extends IPlayFabResultCommon {
120
+ /** The current version of the group profile, can be used for concurrency control during updates. */
121
+ ProfileVersion: number;
122
+ /** ID for the role */
123
+ RoleId?: string;
124
+ /** The name of the role */
125
+ RoleName?: string;
126
+ }
127
+ interface DeleteGroupRequest extends IPlayFabRequestCommon {
128
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
129
+ CustomTags?: Record<string, string | null>;
130
+ /** ID of the group or role to remove */
131
+ Group: EntityKey;
132
+ }
133
+ interface DeleteRoleRequest extends IPlayFabRequestCommon {
134
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
135
+ CustomTags?: Record<string, string | null>;
136
+ /** The identifier of the group */
137
+ Group: EntityKey;
138
+ /** The ID of the role to delete. Role IDs must be between 1 and 64 characters long. */
139
+ RoleId?: string;
140
+ }
141
+ interface EntityKey {
142
+ /** Unique ID of the entity. */
143
+ Id: string;
144
+ /** Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types */
145
+ Type?: string;
146
+ }
147
+ interface EntityMemberRole {
148
+ /** The list of members in the role */
149
+ Members?: EntityWithLineage[];
150
+ /** The ID of the role. */
151
+ RoleId?: string;
152
+ /** The name of the role */
153
+ RoleName?: string;
154
+ }
155
+ interface EntityWithLineage {
156
+ /** The entity key for the specified entity */
157
+ Key?: EntityKey;
158
+ /** Dictionary of entity keys for related entities. Dictionary key is entity type. */
159
+ Lineage?: Record<string, EntityKey>;
160
+ }
161
+ interface GetGroupRequest extends IPlayFabRequestCommon {
162
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
163
+ CustomTags?: Record<string, string | null>;
164
+ /** The identifier of the group */
165
+ Group?: EntityKey;
166
+ /** The full name of the group */
167
+ GroupName?: string;
168
+ }
169
+ interface GetGroupResponse extends IPlayFabResultCommon {
170
+ /** The ID of the administrator role for the group. */
171
+ AdminRoleId?: string;
172
+ /** The server date and time the group was created. */
173
+ Created: string;
174
+ /** The identifier of the group */
175
+ Group: EntityKey;
176
+ /** The name of the group. */
177
+ GroupName?: string;
178
+ /** The ID of the default member role for the group. */
179
+ MemberRoleId?: string;
180
+ /** The current version of the profile, can be used for concurrency control during updates. */
181
+ ProfileVersion: number;
182
+ /** The list of roles and names that belong to the group. */
183
+ Roles?: Record<string, string | null>;
184
+ }
185
+ interface GroupApplication {
186
+ /** Type of entity that requested membership */
187
+ Entity?: EntityWithLineage;
188
+ /** When the application to join will expire and be deleted */
189
+ Expires: string;
190
+ /** ID of the group that the entity requesting membership to */
191
+ Group?: EntityKey;
192
+ }
193
+ interface GroupBlock {
194
+ /** The entity that is blocked */
195
+ Entity?: EntityWithLineage;
196
+ /** ID of the group that the entity is blocked from */
197
+ Group: EntityKey;
198
+ }
199
+ interface GroupInvitation {
200
+ /** When the invitation will expire and be deleted */
201
+ Expires: string;
202
+ /** The group that the entity invited to */
203
+ Group?: EntityKey;
204
+ /** The entity that created the invitation */
205
+ InvitedByEntity?: EntityWithLineage;
206
+ /** The entity that is invited */
207
+ InvitedEntity?: EntityWithLineage;
208
+ /** ID of the role in the group to assign the user to. */
209
+ RoleId?: string;
210
+ }
211
+ interface GroupRole {
212
+ /** ID for the role */
213
+ RoleId?: string;
214
+ /** The name of the role */
215
+ RoleName?: string;
216
+ }
217
+ interface GroupWithRoles {
218
+ /** ID for the group */
219
+ Group?: EntityKey;
220
+ /** The name of the group */
221
+ GroupName?: string;
222
+ /** The current version of the profile, can be used for concurrency control during updates. */
223
+ ProfileVersion: number;
224
+ /** The list of roles within the group */
225
+ Roles?: GroupRole[];
226
+ }
227
+ interface InviteToGroupRequest extends IPlayFabRequestCommon {
228
+ /** Optional, default true. Automatically accept an application if one exists instead of creating an invitation */
229
+ AutoAcceptOutstandingApplication?: boolean;
230
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
231
+ CustomTags?: Record<string, string | null>;
232
+ /** The entity to perform this action on. */
233
+ Entity: EntityKey;
234
+ /** The identifier of the group */
235
+ Group: EntityKey;
236
+ /**
237
+ * Optional. ID of an existing a role in the group to assign the user to. The group's default member role is used if this
238
+ * is not specified. Role IDs must be between 1 and 64 characters long.
239
+ */
240
+ RoleId?: string;
241
+ }
242
+ interface InviteToGroupResponse extends IPlayFabResultCommon {
243
+ /** When the invitation will expire and be deleted */
244
+ Expires: string;
245
+ /** The group that the entity invited to */
246
+ Group?: EntityKey;
247
+ /** The entity that created the invitation */
248
+ InvitedByEntity?: EntityWithLineage;
249
+ /** The entity that is invited */
250
+ InvitedEntity?: EntityWithLineage;
251
+ /** ID of the role in the group to assign the user to. */
252
+ RoleId?: string;
253
+ }
254
+ interface IsMemberRequest extends IPlayFabRequestCommon {
255
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
256
+ CustomTags?: Record<string, string | null>;
257
+ /** The entity to perform this action on. */
258
+ Entity: EntityKey;
259
+ /** The identifier of the group */
260
+ Group: EntityKey;
261
+ /**
262
+ * Optional: ID of the role to check membership of. Defaults to any role (that is, check to see if the entity is a member
263
+ * of the group in any capacity) if not specified.
264
+ */
265
+ RoleId?: string;
266
+ }
267
+ interface IsMemberResponse extends IPlayFabResultCommon {
268
+ /** A value indicating whether or not the entity is a member. */
269
+ IsMember: boolean;
270
+ }
271
+ interface ListGroupApplicationsRequest extends IPlayFabRequestCommon {
272
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
273
+ CustomTags?: Record<string, string | null>;
274
+ /** The identifier of the group */
275
+ Group: EntityKey;
276
+ }
277
+ interface ListGroupApplicationsResponse extends IPlayFabResultCommon {
278
+ /** The requested list of applications to the group. */
279
+ Applications?: GroupApplication[];
280
+ }
281
+ interface ListGroupBlocksRequest extends IPlayFabRequestCommon {
282
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
283
+ CustomTags?: Record<string, string | null>;
284
+ /** The identifier of the group */
285
+ Group: EntityKey;
286
+ }
287
+ interface ListGroupBlocksResponse extends IPlayFabResultCommon {
288
+ /** The requested list blocked entities. */
289
+ BlockedEntities?: GroupBlock[];
290
+ }
291
+ interface ListGroupInvitationsRequest extends IPlayFabRequestCommon {
292
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
293
+ CustomTags?: Record<string, string | null>;
294
+ /** The identifier of the group */
295
+ Group: EntityKey;
296
+ }
297
+ interface ListGroupInvitationsResponse extends IPlayFabResultCommon {
298
+ /** The requested list of group invitations. */
299
+ Invitations?: GroupInvitation[];
300
+ }
301
+ interface ListGroupMembersRequest extends IPlayFabRequestCommon {
302
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
303
+ CustomTags?: Record<string, string | null>;
304
+ /** ID of the group to list the members and roles for */
305
+ Group: EntityKey;
306
+ }
307
+ interface ListGroupMembersResponse extends IPlayFabResultCommon {
308
+ /** The requested list of roles and member entity IDs. */
309
+ Members?: EntityMemberRole[];
310
+ }
311
+ interface ListMembershipOpportunitiesRequest extends IPlayFabRequestCommon {
312
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
313
+ CustomTags?: Record<string, string | null>;
314
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
315
+ Entity?: EntityKey;
316
+ }
317
+ interface ListMembershipOpportunitiesResponse extends IPlayFabResultCommon {
318
+ /** The requested list of group applications. */
319
+ Applications?: GroupApplication[];
320
+ /** The requested list of group invitations. */
321
+ Invitations?: GroupInvitation[];
322
+ }
323
+ interface ListMembershipRequest extends IPlayFabRequestCommon {
324
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
325
+ CustomTags?: Record<string, string | null>;
326
+ /** The optional entity to perform this action on. Defaults to the currently logged in entity. */
327
+ Entity?: EntityKey;
328
+ }
329
+ interface ListMembershipResponse extends IPlayFabResultCommon {
330
+ /** The list of groups */
331
+ Groups?: GroupWithRoles[];
332
+ }
333
+ interface RemoveGroupApplicationRequest extends IPlayFabRequestCommon {
334
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
335
+ CustomTags?: Record<string, string | null>;
336
+ /** The entity to perform this action on. */
337
+ Entity: EntityKey;
338
+ /** The identifier of the group */
339
+ Group: EntityKey;
340
+ }
341
+ interface RemoveGroupInvitationRequest extends IPlayFabRequestCommon {
342
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
343
+ CustomTags?: Record<string, string | null>;
344
+ /** The entity to perform this action on. */
345
+ Entity: EntityKey;
346
+ /** The identifier of the group */
347
+ Group: EntityKey;
348
+ }
349
+ interface RemoveMembersRequest extends IPlayFabRequestCommon {
350
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
351
+ CustomTags?: Record<string, string | null>;
352
+ /** The identifier of the group */
353
+ Group: EntityKey;
354
+ /** List of entities to remove */
355
+ Members: EntityKey[];
356
+ /** The ID of the role to remove the entities from. */
357
+ RoleId?: string;
358
+ }
359
+ interface UnblockEntityRequest extends IPlayFabRequestCommon {
360
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
361
+ CustomTags?: Record<string, string | null>;
362
+ /** The entity to perform this action on. */
363
+ Entity: EntityKey;
364
+ /** The identifier of the group */
365
+ Group: EntityKey;
366
+ }
367
+ interface UpdateGroupRequest extends IPlayFabRequestCommon {
368
+ /** Optional: the ID of an existing role to set as the new administrator role for the group */
369
+ AdminRoleId?: string;
370
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
371
+ CustomTags?: Record<string, string | null>;
372
+ /**
373
+ * Optional field used for concurrency control. By specifying the previously returned value of ProfileVersion from the
374
+ * GetGroup API, you can ensure that the group data update will only be performed if the group has not been updated by any
375
+ * other clients since the version you last loaded.
376
+ */
377
+ ExpectedProfileVersion?: number;
378
+ /** The identifier of the group */
379
+ Group: EntityKey;
380
+ /** Optional: the new name of the group */
381
+ GroupName?: string;
382
+ /** Optional: the ID of an existing role to set as the new member role for the group */
383
+ MemberRoleId?: string;
384
+ }
385
+ interface UpdateGroupResponse extends IPlayFabResultCommon {
386
+ /** Optional reason to explain why the operation was the result that it was. */
387
+ OperationReason?: string;
388
+ /** New version of the group data. */
389
+ ProfileVersion: number;
390
+ /** Indicates which operation was completed, either Created, Updated, Deleted or None. */
391
+ SetResult?: string;
392
+ }
393
+ interface UpdateGroupRoleRequest extends IPlayFabRequestCommon {
394
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
395
+ CustomTags?: Record<string, string | null>;
396
+ /**
397
+ * Optional field used for concurrency control. By specifying the previously returned value of ProfileVersion from the
398
+ * GetGroup API, you can ensure that the group data update will only be performed if the group has not been updated by any
399
+ * other clients since the version you last loaded.
400
+ */
401
+ ExpectedProfileVersion?: number;
402
+ /** The identifier of the group */
403
+ Group: EntityKey;
404
+ /** ID of the role to update. Role IDs must be between 1 and 64 characters long. */
405
+ RoleId?: string;
406
+ /** The new name of the role */
407
+ RoleName: string;
408
+ }
409
+ interface UpdateGroupRoleResponse extends IPlayFabResultCommon {
410
+ /** Optional reason to explain why the operation was the result that it was. */
411
+ OperationReason?: string;
412
+ /** New version of the role data. */
413
+ ProfileVersion: number;
414
+ /** Indicates which operation was completed, either Created, Updated, Deleted or None. */
415
+ SetResult?: string;
416
+ }
417
+
418
+ declare class PlayFabGroupsApi extends PlayFabCommon {
419
+ /**
420
+ * Accepts an outstanding invitation to to join a group
421
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/acceptgroupapplication
422
+ */
423
+ AcceptGroupApplication(request: AcceptGroupApplicationRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
424
+ /**
425
+ * Accepts an invitation to join a group
426
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/acceptgroupinvitation
427
+ */
428
+ AcceptGroupInvitation(request: AcceptGroupInvitationRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
429
+ /**
430
+ * Adds members to a group or role.
431
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/addmembers
432
+ */
433
+ AddMembers(request: AddMembersRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
434
+ /**
435
+ * Applies to join a group
436
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/applytogroup
437
+ */
438
+ ApplyToGroup(request: ApplyToGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ApplyToGroupResponse>;
439
+ /**
440
+ * Blocks a list of entities from joining a group.
441
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/blockentity
442
+ */
443
+ BlockEntity(request: BlockEntityRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
444
+ /**
445
+ * Changes the role membership of a list of entities from one role to another.
446
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/changememberrole
447
+ */
448
+ ChangeMemberRole(request: ChangeMemberRoleRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
449
+ /**
450
+ * Creates a new group.
451
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/creategroup
452
+ */
453
+ CreateGroup(request: CreateGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<CreateGroupResponse>;
454
+ /**
455
+ * Creates a new group role.
456
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/createrole
457
+ */
458
+ CreateRole(request: CreateGroupRoleRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<CreateGroupRoleResponse>;
459
+ /**
460
+ * Deletes a group and all roles, invitations, join requests, and blocks associated with it.
461
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/deletegroup
462
+ */
463
+ DeleteGroup(request: DeleteGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
464
+ /**
465
+ * Deletes an existing role in a group.
466
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/deleterole
467
+ */
468
+ DeleteRole(request: DeleteRoleRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
469
+ /**
470
+ * Gets information about a group and its roles
471
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/getgroup
472
+ */
473
+ GetGroup(request: GetGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<GetGroupResponse>;
474
+ /**
475
+ * Invites a player to join a group
476
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/invitetogroup
477
+ */
478
+ InviteToGroup(request: InviteToGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<InviteToGroupResponse>;
479
+ /**
480
+ * Checks to see if an entity is a member of a group or role within the group
481
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/ismember
482
+ */
483
+ IsMember(request: IsMemberRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<IsMemberResponse>;
484
+ /**
485
+ * Lists all outstanding requests to join a group
486
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/listgroupapplications
487
+ */
488
+ ListGroupApplications(request: ListGroupApplicationsRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListGroupApplicationsResponse>;
489
+ /**
490
+ * Lists all entities blocked from joining a group
491
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/listgroupblocks
492
+ */
493
+ ListGroupBlocks(request: ListGroupBlocksRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListGroupBlocksResponse>;
494
+ /**
495
+ * Lists all outstanding invitations for a group
496
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/listgroupinvitations
497
+ */
498
+ ListGroupInvitations(request: ListGroupInvitationsRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListGroupInvitationsResponse>;
499
+ /**
500
+ * Lists all members for a group
501
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/listgroupmembers
502
+ */
503
+ ListGroupMembers(request: ListGroupMembersRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListGroupMembersResponse>;
504
+ /**
505
+ * Lists all groups and roles for an entity
506
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/listmembership
507
+ */
508
+ ListMembership(request: ListMembershipRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListMembershipResponse>;
509
+ /**
510
+ * Lists all outstanding invitations and group applications for an entity
511
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/listmembershipopportunities
512
+ */
513
+ ListMembershipOpportunities(request: ListMembershipOpportunitiesRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListMembershipOpportunitiesResponse>;
514
+ /**
515
+ * Removes an application to join a group
516
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/removegroupapplication
517
+ */
518
+ RemoveGroupApplication(request: RemoveGroupApplicationRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
519
+ /**
520
+ * Removes an invitation join a group
521
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/removegroupinvitation
522
+ */
523
+ RemoveGroupInvitation(request: RemoveGroupInvitationRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
524
+ /**
525
+ * Removes members from a group.
526
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/removemembers
527
+ */
528
+ RemoveMembers(request: RemoveMembersRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
529
+ /**
530
+ * Unblocks a list of entities from joining a group
531
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/unblockentity
532
+ */
533
+ UnblockEntity(request: UnblockEntityRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
534
+ /**
535
+ * Updates non-membership data about a group.
536
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/updategroup
537
+ */
538
+ UpdateGroup(request: UpdateGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<UpdateGroupResponse>;
539
+ /**
540
+ * Updates metadata about a role.
541
+ * https://docs.microsoft.com/rest/api/playfab/groups/groups/updaterole
542
+ */
543
+ UpdateRole(request: UpdateGroupRoleRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<UpdateGroupRoleResponse>;
544
+ }
545
+
546
+ export { PlayFabGroupsApi as default };