async-playfab-web-sdk 1.192.250526-1 → 1.192.250526-3

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 (87) hide show
  1. package/dist/Addon.d.ts +31 -31
  2. package/dist/Addon.js +4 -448
  3. package/dist/Addon.js.map +1 -1
  4. package/dist/Admin.d.ts +118 -118
  5. package/dist/Admin.js +4 -1108
  6. package/dist/Admin.js.map +1 -1
  7. package/dist/Authentication.d.ts +5 -5
  8. package/dist/Authentication.js +4 -286
  9. package/dist/Authentication.js.map +1 -1
  10. package/dist/Client.d.ts +174 -174
  11. package/dist/Client.js +4 -1889
  12. package/dist/Client.js.map +1 -1
  13. package/dist/CloudScript.d.ts +16 -16
  14. package/dist/CloudScript.js +4 -345
  15. package/dist/CloudScript.js.map +1 -1
  16. package/dist/Data.d.ts +8 -8
  17. package/dist/Data.js +4 -287
  18. package/dist/Data.js.map +1 -1
  19. package/dist/Economy.d.ts +47 -47
  20. package/dist/Economy.js +4 -610
  21. package/dist/Economy.js.map +1 -1
  22. package/dist/Events.d.ts +13 -13
  23. package/dist/Events.js +4 -323
  24. package/dist/Events.js.map +1 -1
  25. package/dist/Experimentation.d.ts +14 -14
  26. package/dist/Experimentation.js +4 -329
  27. package/dist/Experimentation.js.map +1 -1
  28. package/dist/Groups.d.ts +26 -26
  29. package/dist/Groups.js +4 -413
  30. package/dist/Groups.js.map +1 -1
  31. package/dist/Insights.d.ts +7 -7
  32. package/dist/Insights.js +4 -282
  33. package/dist/Insights.js.map +1 -1
  34. package/dist/Localization.d.ts +2 -2
  35. package/dist/Localization.js +4 -245
  36. package/dist/Localization.js.map +1 -1
  37. package/dist/Multiplayer.d.ts +88 -88
  38. package/dist/Multiplayer.js +4 -858
  39. package/dist/Multiplayer.js.map +1 -1
  40. package/dist/{PlayFabCommon-BUv4zqXf.d.ts → PlayFabCommon-BX3jSqGx.d.ts} +4 -6
  41. package/dist/Profiles.d.ts +10 -10
  42. package/dist/Profiles.js +4 -302
  43. package/dist/Profiles.js.map +1 -1
  44. package/dist/Progression.d.ts +24 -24
  45. package/dist/Progression.js +4 -400
  46. package/dist/Progression.js.map +1 -1
  47. package/dist/Server.d.ts +150 -150
  48. package/dist/Server.js +4 -1373
  49. package/dist/Server.js.map +1 -1
  50. package/dist/chunk-3FCAP7OZ.js +187 -0
  51. package/dist/chunk-3FCAP7OZ.js.map +1 -0
  52. package/dist/chunk-62SULWOK.js +195 -0
  53. package/dist/chunk-62SULWOK.js.map +1 -0
  54. package/dist/chunk-A7VD6ALV.js +222 -0
  55. package/dist/chunk-A7VD6ALV.js.map +1 -0
  56. package/dist/chunk-BX65UND2.js +632 -0
  57. package/dist/chunk-BX65UND2.js.map +1 -0
  58. package/dist/chunk-J4QS5VX5.js +19 -0
  59. package/dist/chunk-J4QS5VX5.js.map +1 -0
  60. package/dist/chunk-JGDO2ZE3.js +1663 -0
  61. package/dist/chunk-JGDO2ZE3.js.map +1 -0
  62. package/dist/chunk-POMI7LEF.js +76 -0
  63. package/dist/chunk-POMI7LEF.js.map +1 -0
  64. package/dist/chunk-Q3OF3AOJ.js +97 -0
  65. package/dist/chunk-Q3OF3AOJ.js.map +1 -0
  66. package/dist/chunk-QUZHVSVZ.js +174 -0
  67. package/dist/chunk-QUZHVSVZ.js.map +1 -0
  68. package/dist/chunk-QVLIVSO4.js +1147 -0
  69. package/dist/chunk-QVLIVSO4.js.map +1 -0
  70. package/dist/chunk-R7V7DFCF.js +103 -0
  71. package/dist/chunk-R7V7DFCF.js.map +1 -0
  72. package/dist/chunk-SGSEOIKS.js +56 -0
  73. package/dist/chunk-SGSEOIKS.js.map +1 -0
  74. package/dist/chunk-UOHHNVCJ.js +119 -0
  75. package/dist/chunk-UOHHNVCJ.js.map +1 -0
  76. package/dist/chunk-USKFWNQK.js +384 -0
  77. package/dist/chunk-USKFWNQK.js.map +1 -0
  78. package/dist/chunk-UX7LFJCX.js +61 -0
  79. package/dist/chunk-UX7LFJCX.js.map +1 -0
  80. package/dist/chunk-X34XZJB6.js +60 -0
  81. package/dist/chunk-X34XZJB6.js.map +1 -0
  82. package/dist/chunk-YNZF3WXS.js +882 -0
  83. package/dist/chunk-YNZF3WXS.js.map +1 -0
  84. package/dist/index.d.ts +1 -1
  85. package/dist/index.js +49 -5988
  86. package/dist/index.js.map +1 -1
  87. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { I as IPlayFabRequestCommon, a as IPlayFabResultCommon, P as PlayFabCommon, E as EmptyResponse } from './PlayFabCommon-BUv4zqXf.js';
1
+ import { I as IPlayFabRequestCommon, a as IPlayFabResultCommon, P as PlayFabCommon, E as EmptyResponse } from './PlayFabCommon-BX3jSqGx.js';
2
2
 
3
3
  interface CreateExclusionGroupRequest extends IPlayFabRequestCommon {
4
4
  /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
@@ -291,67 +291,67 @@ declare class PlayFabExperimentationApi extends PlayFabCommon {
291
291
  * Creates a new experiment exclusion group for a title.
292
292
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/createexclusiongroup
293
293
  */
294
- CreateExclusionGroup(request: CreateExclusionGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<CreateExclusionGroupResult>;
294
+ CreateExclusionGroup(request: CreateExclusionGroupRequest, extraHeaders?: Record<string, string>): Promise<CreateExclusionGroupResult>;
295
295
  /**
296
296
  * Creates a new experiment for a title.
297
297
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/createexperiment
298
298
  */
299
- CreateExperiment(request: CreateExperimentRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<CreateExperimentResult>;
299
+ CreateExperiment(request: CreateExperimentRequest, extraHeaders?: Record<string, string>): Promise<CreateExperimentResult>;
300
300
  /**
301
301
  * Deletes an existing exclusion group for a title.
302
302
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/deleteexclusiongroup
303
303
  */
304
- DeleteExclusionGroup(request: DeleteExclusionGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
304
+ DeleteExclusionGroup(request: DeleteExclusionGroupRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
305
305
  /**
306
306
  * Deletes an existing experiment for a title.
307
307
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/deleteexperiment
308
308
  */
309
- DeleteExperiment(request: DeleteExperimentRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
309
+ DeleteExperiment(request: DeleteExperimentRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
310
310
  /**
311
311
  * Gets the details of all exclusion groups for a title.
312
312
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getexclusiongroups
313
313
  */
314
- GetExclusionGroups(request: GetExclusionGroupsRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<GetExclusionGroupsResult>;
314
+ GetExclusionGroups(request: GetExclusionGroupsRequest, extraHeaders?: Record<string, string>): Promise<GetExclusionGroupsResult>;
315
315
  /**
316
316
  * Gets the details of all exclusion groups for a title.
317
317
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getexclusiongrouptraffic
318
318
  */
319
- GetExclusionGroupTraffic(request: GetExclusionGroupTrafficRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<GetExclusionGroupTrafficResult>;
319
+ GetExclusionGroupTraffic(request: GetExclusionGroupTrafficRequest, extraHeaders?: Record<string, string>): Promise<GetExclusionGroupTrafficResult>;
320
320
  /**
321
321
  * Gets the details of all experiments for a title.
322
322
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getexperiments
323
323
  */
324
- GetExperiments(request: GetExperimentsRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<GetExperimentsResult>;
324
+ GetExperiments(request: GetExperimentsRequest, extraHeaders?: Record<string, string>): Promise<GetExperimentsResult>;
325
325
  /**
326
326
  * Gets the latest scorecard of the experiment for the title.
327
327
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getlatestscorecard
328
328
  */
329
- GetLatestScorecard(request: GetLatestScorecardRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<GetLatestScorecardResult>;
329
+ GetLatestScorecard(request: GetLatestScorecardRequest, extraHeaders?: Record<string, string>): Promise<GetLatestScorecardResult>;
330
330
  /**
331
331
  * Gets the treatment assignments for a player for every running experiment in the title.
332
332
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/gettreatmentassignment
333
333
  */
334
- GetTreatmentAssignment(request: GetTreatmentAssignmentRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<GetTreatmentAssignmentResult>;
334
+ GetTreatmentAssignment(request: GetTreatmentAssignmentRequest, extraHeaders?: Record<string, string>): Promise<GetTreatmentAssignmentResult>;
335
335
  /**
336
336
  * Starts an existing experiment for a title.
337
337
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/startexperiment
338
338
  */
339
- StartExperiment(request: StartExperimentRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
339
+ StartExperiment(request: StartExperimentRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
340
340
  /**
341
341
  * Stops an existing experiment for a title.
342
342
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/stopexperiment
343
343
  */
344
- StopExperiment(request: StopExperimentRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
344
+ StopExperiment(request: StopExperimentRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
345
345
  /**
346
346
  * Updates an existing exclusion group for a title.
347
347
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/updateexclusiongroup
348
348
  */
349
- UpdateExclusionGroup(request: UpdateExclusionGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
349
+ UpdateExclusionGroup(request: UpdateExclusionGroupRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
350
350
  /**
351
351
  * Updates an existing experiment for a title.
352
352
  * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/updateexperiment
353
353
  */
354
- UpdateExperiment(request: UpdateExperimentRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
354
+ UpdateExperiment(request: UpdateExperimentRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
355
355
  }
356
356
 
357
357
  export { PlayFabExperimentationApi as default };
@@ -1,332 +1,7 @@
1
- // src/constants.ts
2
- var AuthInfoMap = {
3
- "X-EntityToken": {
4
- authAttr: "entityToken",
5
- authError: "errorEntityToken"
6
- },
7
- "X-Authorization": {
8
- authAttr: "sessionTicket",
9
- authError: "errorLoggedIn"
10
- },
11
- "X-SecretKey": {
12
- authAttr: "developerSecretKey",
13
- authError: "errorSecretKey"
14
- }
15
- };
16
- var constants_default = {
17
- sdkVersion: "1.192.250526",
18
- sdkFingerprint: "JavaScriptSDK-1.192.250526",
19
- buildIdentifier: "custom_async-javascriptsdk",
20
- defaultSettings: {
21
- titleId: "",
22
- developerSecretKey: "",
23
- GlobalHeaderInjection: {},
24
- productionServerUrl: ".playfabapi.com",
25
- verticalName: null
26
- }
27
- };
28
-
29
- // src/PlayFabContext.ts
30
- var PlayFabContext = class _PlayFabContext {
31
- constructor() {
32
- this.settings = constants_default.defaultSettings;
33
- this.authenticationContext = {
34
- PlayFabId: null,
35
- EntityId: null,
36
- EntityType: null,
37
- SessionTicket: null,
38
- EntityToken: null
39
- };
40
- this.sessionTicket = null;
41
- this.entityToken = null;
42
- }
43
- static get instance() {
44
- if (!_PlayFabContext._instance) {
45
- _PlayFabContext._instance = new _PlayFabContext();
46
- }
47
- return _PlayFabContext._instance;
48
- }
49
- };
50
-
51
- // src/PlayFabCommon.ts
52
- var PlayFabCommon = class {
53
- constructor(settings = void 0) {
54
- this.buildIdentifier = constants_default.buildIdentifier;
55
- this.requestGetParams = {
56
- sdk: constants_default.sdkFingerprint
57
- };
58
- this.errorTitleId = "Must be have settings.titleId set to call this method";
59
- this.errorLoggedIn = "Must be logged in to call this method";
60
- this.errorEntityToken = "You must successfully call GetEntityToken before calling this";
61
- this.errorSecretKey = "Must have settings.developerSecretKey set to call this method";
62
- this._context = PlayFabContext.instance;
63
- if (settings) {
64
- Object.assign(this._context.settings, settings);
65
- }
66
- }
67
- get settings() {
68
- return this._context.settings;
69
- }
70
- get authenticationContext() {
71
- return this._context.authenticationContext;
72
- }
73
- get sessionTicket() {
74
- return this._context.sessionTicket;
75
- }
76
- set sessionTicket(value) {
77
- this._context.sessionTicket = value;
78
- }
79
- get entityToken() {
80
- return this._context.entityToken;
81
- }
82
- set entityToken(value) {
83
- this._context.entityToken = value;
84
- }
85
- GetServerUrl() {
86
- if (!(this.settings.productionServerUrl.substring(0, 4) === "http")) {
87
- return `https://${this.settings.verticalName || this.settings.titleId}${this.settings.productionServerUrl}`;
88
- } else {
89
- return this.settings.productionServerUrl;
90
- }
91
- }
92
- InjectHeaders(xhr, headersObj) {
93
- if (!headersObj) return;
94
- for (const headerKey in headersObj) {
95
- try {
96
- xhr.setRequestHeader(headerKey, headersObj[headerKey]);
97
- } catch (e) {
98
- console.log(
99
- `Failed to append header: ${headerKey} = ${headersObj[headerKey]} Error: ${e}`
100
- );
101
- }
102
- }
103
- }
104
- ExecuteRequest(url, body, authkey, authValue, customData, extraHeaders) {
105
- return new Promise((resolve, reject) => {
106
- if (body == null) body = {};
107
- var startTime = (/* @__PURE__ */ new Date()).getTime();
108
- var requestBody = JSON.stringify(body);
109
- var urlArr = [url];
110
- var getParams = this.requestGetParams;
111
- if (getParams != null) {
112
- var firstParam = true;
113
- for (var key in getParams) {
114
- if (firstParam) {
115
- urlArr.push("?");
116
- firstParam = false;
117
- } else {
118
- urlArr.push("&");
119
- }
120
- urlArr.push(key);
121
- urlArr.push("=");
122
- urlArr.push(getParams[key]);
123
- }
124
- }
125
- var completeUrl = urlArr.join("");
126
- var xhr = new XMLHttpRequest();
127
- xhr.open("POST", completeUrl, true);
128
- xhr.setRequestHeader("Content-Type", "application/json");
129
- xhr.setRequestHeader(
130
- "X-PlayFabSDK",
131
- "JavaScriptSDK-" + constants_default.sdkVersion
132
- );
133
- if (authkey != null) {
134
- xhr.setRequestHeader(authkey, authValue);
135
- }
136
- this.InjectHeaders(xhr, this.settings.GlobalHeaderInjection);
137
- this.InjectHeaders(xhr, extraHeaders);
138
- xhr.onloadend = () => {
139
- var result = this.GetPlayFabResponse(body, xhr, startTime, customData);
140
- if (result.code === 200) {
141
- resolve(result.data || result);
142
- } else {
143
- reject(result);
144
- }
145
- };
146
- xhr.onerror = () => {
147
- var result = this.GetPlayFabResponse(body, xhr, startTime, customData);
148
- reject(result);
149
- };
150
- xhr.send(requestBody);
151
- });
152
- }
153
- GetPlayFabResponse(request, xhr, startTime, customData) {
154
- var result = null;
155
- try {
156
- result = JSON.parse(xhr.responseText);
157
- } catch (e) {
158
- result = {
159
- code: 503,
160
- // Service Unavailable
161
- status: "Service Unavailable",
162
- error: "Connection error",
163
- errorCode: 2,
164
- // PlayFabErrorCode.ConnectionError
165
- errorMessage: xhr.responseText
166
- };
167
- }
168
- result.CallBackTimeMS = (/* @__PURE__ */ new Date()).getTime() - startTime;
169
- result.Request = request;
170
- result.CustomData = customData;
171
- return result;
172
- }
173
- UpdateAuthenticationContext(currentAuthContext, result) {
174
- var authenticationContextUpdates = {};
175
- if (result == null ? void 0 : result.PlayFabId) {
176
- authenticationContextUpdates.PlayFabId = result.PlayFabId;
177
- }
178
- if (result == null ? void 0 : result.SessionTicket) {
179
- authenticationContextUpdates.SessionTicket = result.SessionTicket;
180
- }
181
- if (result == null ? void 0 : result.EntityToken) {
182
- authenticationContextUpdates.EntityId = result.EntityToken.Entity.Id;
183
- authenticationContextUpdates.EntityType = result.EntityToken.Entity.Type;
184
- authenticationContextUpdates.EntityToken = result.EntityToken.EntityToken;
185
- }
186
- currentAuthContext = Object.assign(
187
- currentAuthContext,
188
- authenticationContextUpdates
189
- );
190
- this._context.authenticationContext = currentAuthContext;
191
- return currentAuthContext;
192
- }
193
- GetAuthInfo(request, authKey) {
194
- var authError = AuthInfoMap[authKey].authError;
195
- var authAttr = AuthInfoMap[authKey].authAttr;
196
- var defaultAuthValue = null;
197
- if (authAttr === "entityToken") defaultAuthValue = this.entityToken;
198
- else if (authAttr === "sessionTicket")
199
- defaultAuthValue = this.sessionTicket;
200
- else if (authAttr === "developerSecretKey")
201
- defaultAuthValue = this.settings.developerSecretKey;
202
- var authValue = request.AuthenticationContext ? request.AuthenticationContext[authAttr] : defaultAuthValue;
203
- return { authKey, authValue, authError };
204
- }
205
- ExecuteRequestWrapper(apiURL, request, authKey, customData, extraHeaders) {
206
- var authValue = null;
207
- if (authKey !== null) {
208
- const { authError, ...authInfo } = this.GetAuthInfo(request, authKey);
209
- authKey = authInfo.authKey;
210
- authValue = authInfo.authValue;
211
- if (!authValue) throw authError;
212
- }
213
- return this.ExecuteRequest(
214
- this.GetServerUrl() + apiURL,
215
- request,
216
- authKey,
217
- authValue,
218
- customData,
219
- extraHeaders
220
- );
221
- }
222
- GenerateErrorReport(error) {
223
- if (error == null) return "";
224
- var fullErrors = error.errorMessage;
225
- for (var paramName in error.errorDetails)
226
- for (var msgIdx in error.errorDetails[paramName])
227
- fullErrors += "\n" + paramName + ": " + error.errorDetails[paramName][msgIdx];
228
- return fullErrors;
229
- }
230
- ForgetAllCredentials() {
231
- this._context.sessionTicket = null;
232
- this._context.entityToken = null;
233
- }
234
- };
235
-
236
- // src/apis/PlayFabExperimentationApi.ts
237
- var PlayFabExperimentationApi = class extends PlayFabCommon {
238
- /**
239
- * Creates a new experiment exclusion group for a title.
240
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/createexclusiongroup
241
- */
242
- CreateExclusionGroup(request, customData, extraHeaders) {
243
- return this.ExecuteRequestWrapper("/Experimentation/CreateExclusionGroup", request, "X-EntityToken", customData, extraHeaders);
244
- }
245
- /**
246
- * Creates a new experiment for a title.
247
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/createexperiment
248
- */
249
- CreateExperiment(request, customData, extraHeaders) {
250
- return this.ExecuteRequestWrapper("/Experimentation/CreateExperiment", request, "X-EntityToken", customData, extraHeaders);
251
- }
252
- /**
253
- * Deletes an existing exclusion group for a title.
254
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/deleteexclusiongroup
255
- */
256
- DeleteExclusionGroup(request, customData, extraHeaders) {
257
- return this.ExecuteRequestWrapper("/Experimentation/DeleteExclusionGroup", request, "X-EntityToken", customData, extraHeaders);
258
- }
259
- /**
260
- * Deletes an existing experiment for a title.
261
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/deleteexperiment
262
- */
263
- DeleteExperiment(request, customData, extraHeaders) {
264
- return this.ExecuteRequestWrapper("/Experimentation/DeleteExperiment", request, "X-EntityToken", customData, extraHeaders);
265
- }
266
- /**
267
- * Gets the details of all exclusion groups for a title.
268
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getexclusiongroups
269
- */
270
- GetExclusionGroups(request, customData, extraHeaders) {
271
- return this.ExecuteRequestWrapper("/Experimentation/GetExclusionGroups", request, "X-EntityToken", customData, extraHeaders);
272
- }
273
- /**
274
- * Gets the details of all exclusion groups for a title.
275
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getexclusiongrouptraffic
276
- */
277
- GetExclusionGroupTraffic(request, customData, extraHeaders) {
278
- return this.ExecuteRequestWrapper("/Experimentation/GetExclusionGroupTraffic", request, "X-EntityToken", customData, extraHeaders);
279
- }
280
- /**
281
- * Gets the details of all experiments for a title.
282
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getexperiments
283
- */
284
- GetExperiments(request, customData, extraHeaders) {
285
- return this.ExecuteRequestWrapper("/Experimentation/GetExperiments", request, "X-EntityToken", customData, extraHeaders);
286
- }
287
- /**
288
- * Gets the latest scorecard of the experiment for the title.
289
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/getlatestscorecard
290
- */
291
- GetLatestScorecard(request, customData, extraHeaders) {
292
- return this.ExecuteRequestWrapper("/Experimentation/GetLatestScorecard", request, "X-EntityToken", customData, extraHeaders);
293
- }
294
- /**
295
- * Gets the treatment assignments for a player for every running experiment in the title.
296
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/gettreatmentassignment
297
- */
298
- GetTreatmentAssignment(request, customData, extraHeaders) {
299
- return this.ExecuteRequestWrapper("/Experimentation/GetTreatmentAssignment", request, "X-EntityToken", customData, extraHeaders);
300
- }
301
- /**
302
- * Starts an existing experiment for a title.
303
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/startexperiment
304
- */
305
- StartExperiment(request, customData, extraHeaders) {
306
- return this.ExecuteRequestWrapper("/Experimentation/StartExperiment", request, "X-EntityToken", customData, extraHeaders);
307
- }
308
- /**
309
- * Stops an existing experiment for a title.
310
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/stopexperiment
311
- */
312
- StopExperiment(request, customData, extraHeaders) {
313
- return this.ExecuteRequestWrapper("/Experimentation/StopExperiment", request, "X-EntityToken", customData, extraHeaders);
314
- }
315
- /**
316
- * Updates an existing exclusion group for a title.
317
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/updateexclusiongroup
318
- */
319
- UpdateExclusionGroup(request, customData, extraHeaders) {
320
- return this.ExecuteRequestWrapper("/Experimentation/UpdateExclusionGroup", request, "X-EntityToken", customData, extraHeaders);
321
- }
322
- /**
323
- * Updates an existing experiment for a title.
324
- * https://docs.microsoft.com/rest/api/playfab/experimentation/experimentation/updateexperiment
325
- */
326
- UpdateExperiment(request, customData, extraHeaders) {
327
- return this.ExecuteRequestWrapper("/Experimentation/UpdateExperiment", request, "X-EntityToken", customData, extraHeaders);
328
- }
329
- };
1
+ import {
2
+ PlayFabExperimentationApi
3
+ } from "./chunk-R7V7DFCF.js";
4
+ import "./chunk-62SULWOK.js";
330
5
  export {
331
6
  PlayFabExperimentationApi as default
332
7
  };
@@ -1 +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,oB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AY;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":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/Groups.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { I as IPlayFabRequestCommon, a as IPlayFabResultCommon, P as PlayFabCommon, E as EmptyResponse } from './PlayFabCommon-BUv4zqXf.js';
1
+ import { I as IPlayFabRequestCommon, a as IPlayFabResultCommon, P as PlayFabCommon, E as EmptyResponse } from './PlayFabCommon-BX3jSqGx.js';
2
2
 
3
3
  interface AcceptGroupApplicationRequest extends IPlayFabRequestCommon {
4
4
  /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
@@ -420,127 +420,127 @@ declare class PlayFabGroupsApi extends PlayFabCommon {
420
420
  * Accepts an outstanding invitation to to join a group
421
421
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/acceptgroupapplication
422
422
  */
423
- AcceptGroupApplication(request: AcceptGroupApplicationRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
423
+ AcceptGroupApplication(request: AcceptGroupApplicationRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
424
424
  /**
425
425
  * Accepts an invitation to join a group
426
426
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/acceptgroupinvitation
427
427
  */
428
- AcceptGroupInvitation(request: AcceptGroupInvitationRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
428
+ AcceptGroupInvitation(request: AcceptGroupInvitationRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
429
429
  /**
430
430
  * Adds members to a group or role.
431
431
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/addmembers
432
432
  */
433
- AddMembers(request: AddMembersRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
433
+ AddMembers(request: AddMembersRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
434
434
  /**
435
435
  * Applies to join a group
436
436
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/applytogroup
437
437
  */
438
- ApplyToGroup(request: ApplyToGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ApplyToGroupResponse>;
438
+ ApplyToGroup(request: ApplyToGroupRequest, extraHeaders?: Record<string, string>): Promise<ApplyToGroupResponse>;
439
439
  /**
440
440
  * Blocks a list of entities from joining a group.
441
441
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/blockentity
442
442
  */
443
- BlockEntity(request: BlockEntityRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
443
+ BlockEntity(request: BlockEntityRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
444
444
  /**
445
445
  * Changes the role membership of a list of entities from one role to another.
446
446
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/changememberrole
447
447
  */
448
- ChangeMemberRole(request: ChangeMemberRoleRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
448
+ ChangeMemberRole(request: ChangeMemberRoleRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
449
449
  /**
450
450
  * Creates a new group.
451
451
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/creategroup
452
452
  */
453
- CreateGroup(request: CreateGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<CreateGroupResponse>;
453
+ CreateGroup(request: CreateGroupRequest, extraHeaders?: Record<string, string>): Promise<CreateGroupResponse>;
454
454
  /**
455
455
  * Creates a new group role.
456
456
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/createrole
457
457
  */
458
- CreateRole(request: CreateGroupRoleRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<CreateGroupRoleResponse>;
458
+ CreateRole(request: CreateGroupRoleRequest, extraHeaders?: Record<string, string>): Promise<CreateGroupRoleResponse>;
459
459
  /**
460
460
  * Deletes a group and all roles, invitations, join requests, and blocks associated with it.
461
461
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/deletegroup
462
462
  */
463
- DeleteGroup(request: DeleteGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
463
+ DeleteGroup(request: DeleteGroupRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
464
464
  /**
465
465
  * Deletes an existing role in a group.
466
466
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/deleterole
467
467
  */
468
- DeleteRole(request: DeleteRoleRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
468
+ DeleteRole(request: DeleteRoleRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
469
469
  /**
470
470
  * Gets information about a group and its roles
471
471
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/getgroup
472
472
  */
473
- GetGroup(request: GetGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<GetGroupResponse>;
473
+ GetGroup(request: GetGroupRequest, extraHeaders?: Record<string, string>): Promise<GetGroupResponse>;
474
474
  /**
475
475
  * Invites a player to join a group
476
476
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/invitetogroup
477
477
  */
478
- InviteToGroup(request: InviteToGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<InviteToGroupResponse>;
478
+ InviteToGroup(request: InviteToGroupRequest, extraHeaders?: Record<string, string>): Promise<InviteToGroupResponse>;
479
479
  /**
480
480
  * Checks to see if an entity is a member of a group or role within the group
481
481
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/ismember
482
482
  */
483
- IsMember(request: IsMemberRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<IsMemberResponse>;
483
+ IsMember(request: IsMemberRequest, extraHeaders?: Record<string, string>): Promise<IsMemberResponse>;
484
484
  /**
485
485
  * Lists all outstanding requests to join a group
486
486
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/listgroupapplications
487
487
  */
488
- ListGroupApplications(request: ListGroupApplicationsRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListGroupApplicationsResponse>;
488
+ ListGroupApplications(request: ListGroupApplicationsRequest, extraHeaders?: Record<string, string>): Promise<ListGroupApplicationsResponse>;
489
489
  /**
490
490
  * Lists all entities blocked from joining a group
491
491
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/listgroupblocks
492
492
  */
493
- ListGroupBlocks(request: ListGroupBlocksRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListGroupBlocksResponse>;
493
+ ListGroupBlocks(request: ListGroupBlocksRequest, extraHeaders?: Record<string, string>): Promise<ListGroupBlocksResponse>;
494
494
  /**
495
495
  * Lists all outstanding invitations for a group
496
496
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/listgroupinvitations
497
497
  */
498
- ListGroupInvitations(request: ListGroupInvitationsRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListGroupInvitationsResponse>;
498
+ ListGroupInvitations(request: ListGroupInvitationsRequest, extraHeaders?: Record<string, string>): Promise<ListGroupInvitationsResponse>;
499
499
  /**
500
500
  * Lists all members for a group
501
501
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/listgroupmembers
502
502
  */
503
- ListGroupMembers(request: ListGroupMembersRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListGroupMembersResponse>;
503
+ ListGroupMembers(request: ListGroupMembersRequest, extraHeaders?: Record<string, string>): Promise<ListGroupMembersResponse>;
504
504
  /**
505
505
  * Lists all groups and roles for an entity
506
506
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/listmembership
507
507
  */
508
- ListMembership(request: ListMembershipRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListMembershipResponse>;
508
+ ListMembership(request: ListMembershipRequest, extraHeaders?: Record<string, string>): Promise<ListMembershipResponse>;
509
509
  /**
510
510
  * Lists all outstanding invitations and group applications for an entity
511
511
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/listmembershipopportunities
512
512
  */
513
- ListMembershipOpportunities(request: ListMembershipOpportunitiesRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListMembershipOpportunitiesResponse>;
513
+ ListMembershipOpportunities(request: ListMembershipOpportunitiesRequest, extraHeaders?: Record<string, string>): Promise<ListMembershipOpportunitiesResponse>;
514
514
  /**
515
515
  * Removes an application to join a group
516
516
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/removegroupapplication
517
517
  */
518
- RemoveGroupApplication(request: RemoveGroupApplicationRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
518
+ RemoveGroupApplication(request: RemoveGroupApplicationRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
519
519
  /**
520
520
  * Removes an invitation join a group
521
521
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/removegroupinvitation
522
522
  */
523
- RemoveGroupInvitation(request: RemoveGroupInvitationRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
523
+ RemoveGroupInvitation(request: RemoveGroupInvitationRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
524
524
  /**
525
525
  * Removes members from a group.
526
526
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/removemembers
527
527
  */
528
- RemoveMembers(request: RemoveMembersRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
528
+ RemoveMembers(request: RemoveMembersRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
529
529
  /**
530
530
  * Unblocks a list of entities from joining a group
531
531
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/unblockentity
532
532
  */
533
- UnblockEntity(request: UnblockEntityRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
533
+ UnblockEntity(request: UnblockEntityRequest, extraHeaders?: Record<string, string>): Promise<EmptyResponse>;
534
534
  /**
535
535
  * Updates non-membership data about a group.
536
536
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/updategroup
537
537
  */
538
- UpdateGroup(request: UpdateGroupRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<UpdateGroupResponse>;
538
+ UpdateGroup(request: UpdateGroupRequest, extraHeaders?: Record<string, string>): Promise<UpdateGroupResponse>;
539
539
  /**
540
540
  * Updates metadata about a role.
541
541
  * https://docs.microsoft.com/rest/api/playfab/groups/groups/updaterole
542
542
  */
543
- UpdateRole(request: UpdateGroupRoleRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<UpdateGroupRoleResponse>;
543
+ UpdateRole(request: UpdateGroupRoleRequest, extraHeaders?: Record<string, string>): Promise<UpdateGroupRoleResponse>;
544
544
  }
545
545
 
546
546
  export { PlayFabGroupsApi as default };