@onesignal/node-onesignal 1.0.0-beta8 → 2.0.0-beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/Zapier.yml +34 -0
- package/CHANGELOG.md +15 -0
- package/DefaultApi.md +988 -3
- package/README.md +152 -24
- package/apis/DefaultApi.ts +1339 -98
- package/dist/apis/DefaultApi.d.ts +39 -0
- package/dist/apis/DefaultApi.js +1490 -408
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/models/BasicNotification.d.ts +4 -0
- package/dist/models/BasicNotification.js +12 -0
- package/dist/models/BasicNotification.js.map +1 -1
- package/dist/models/CreateNotificationSuccessResponse.d.ts +2 -2
- package/dist/models/CreateSubscriptionRequestBody.d.ts +19 -0
- package/dist/models/CreateSubscriptionRequestBody.js +28 -0
- package/dist/models/CreateSubscriptionRequestBody.js.map +1 -0
- package/dist/models/CreateUserConflictResponse.d.ts +18 -0
- package/dist/models/CreateUserConflictResponse.js +22 -0
- package/dist/models/CreateUserConflictResponse.js.map +1 -0
- package/dist/models/CreateUserConflictResponseErrorsInner.d.ts +20 -0
- package/dist/models/CreateUserConflictResponseErrorsInner.js +34 -0
- package/dist/models/CreateUserConflictResponseErrorsInner.js.map +1 -0
- package/dist/models/CreateUserConflictResponseErrorsItemsMeta.d.ts +17 -0
- package/dist/models/CreateUserConflictResponseErrorsItemsMeta.js +22 -0
- package/dist/models/CreateUserConflictResponseErrorsItemsMeta.js.map +1 -0
- package/dist/models/IdentifyUserConflictResponse.d.ts +18 -0
- package/dist/models/IdentifyUserConflictResponse.js +22 -0
- package/dist/models/IdentifyUserConflictResponse.js.map +1 -0
- package/dist/models/IdentifyUserConflictResponseErrorsInner.d.ts +18 -0
- package/dist/models/IdentifyUserConflictResponseErrorsInner.js +28 -0
- package/dist/models/IdentifyUserConflictResponseErrorsInner.js.map +1 -0
- package/dist/models/InlineResponse200.d.ts +19 -0
- package/dist/models/InlineResponse200.js +22 -0
- package/dist/models/InlineResponse200.js.map +1 -0
- package/dist/models/InlineResponse2003.d.ts +17 -0
- package/dist/models/InlineResponse2003.js +22 -0
- package/dist/models/InlineResponse2003.js.map +1 -0
- package/dist/models/InlineResponse201.d.ts +18 -0
- package/dist/models/InlineResponse201.js +22 -0
- package/dist/models/InlineResponse201.js.map +1 -0
- package/dist/models/InlineResponse202.d.ts +18 -0
- package/dist/models/InlineResponse202.js +22 -0
- package/dist/models/InlineResponse202.js.map +1 -0
- package/dist/models/Notification.d.ts +4 -0
- package/dist/models/Notification.js +12 -0
- package/dist/models/Notification.js.map +1 -1
- package/dist/models/NotificationTarget.d.ts +4 -0
- package/dist/models/NotificationTarget.js +12 -0
- package/dist/models/NotificationTarget.js.map +1 -1
- package/dist/models/NotificationWithMeta.d.ts +4 -0
- package/dist/models/NotificationWithMeta.js +12 -0
- package/dist/models/NotificationWithMeta.js.map +1 -1
- package/dist/models/ObjectSerializer.d.ts +21 -0
- package/dist/models/ObjectSerializer.js +69 -0
- package/dist/models/ObjectSerializer.js.map +1 -1
- package/dist/models/Player.d.ts +1 -1
- package/dist/models/Player.js +1 -1
- package/dist/models/Player.js.map +1 -1
- package/dist/models/PlayerNotificationTarget.d.ts +4 -0
- package/dist/models/PlayerNotificationTarget.js +12 -0
- package/dist/models/PlayerNotificationTarget.js.map +1 -1
- package/dist/models/PlayerNotificationTargetIncludeAliases.d.ts +17 -0
- package/dist/models/PlayerNotificationTargetIncludeAliases.js +22 -0
- package/dist/models/PlayerNotificationTargetIncludeAliases.js.map +1 -0
- package/dist/models/PropertiesDeltas.d.ts +20 -0
- package/dist/models/PropertiesDeltas.js +34 -0
- package/dist/models/PropertiesDeltas.js.map +1 -0
- package/dist/models/PropertiesObject.d.ts +30 -0
- package/dist/models/PropertiesObject.js +82 -0
- package/dist/models/PropertiesObject.js.map +1 -0
- package/dist/models/Purchase.d.ts +2 -1
- package/dist/models/Purchase.js +7 -1
- package/dist/models/Purchase.js.map +1 -1
- package/dist/models/SubscriptionObject.d.ts +34 -0
- package/dist/models/SubscriptionObject.js +118 -0
- package/dist/models/SubscriptionObject.js.map +1 -0
- package/dist/models/TransferSubscriptionRequestBody.d.ts +19 -0
- package/dist/models/TransferSubscriptionRequestBody.js +22 -0
- package/dist/models/TransferSubscriptionRequestBody.js.map +1 -0
- package/dist/models/UpdateSubscriptionRequestBody.d.ts +18 -0
- package/dist/models/UpdateSubscriptionRequestBody.js +22 -0
- package/dist/models/UpdateSubscriptionRequestBody.js.map +1 -0
- package/dist/models/UpdateUserRequest.d.ts +21 -0
- package/dist/models/UpdateUserRequest.js +34 -0
- package/dist/models/UpdateUserRequest.js.map +1 -0
- package/dist/models/User.d.ts +25 -0
- package/dist/models/User.js +40 -0
- package/dist/models/User.js.map +1 -0
- package/dist/models/UserIdentityRequestBody.d.ts +19 -0
- package/dist/models/UserIdentityRequestBody.js +22 -0
- package/dist/models/UserIdentityRequestBody.js.map +1 -0
- package/dist/models/UserIdentityResponse.d.ts +19 -0
- package/dist/models/UserIdentityResponse.js +22 -0
- package/dist/models/UserIdentityResponse.js.map +1 -0
- package/dist/models/UserSubscriptionOptions.d.ts +17 -0
- package/dist/models/UserSubscriptionOptions.js +22 -0
- package/dist/models/UserSubscriptionOptions.js.map +1 -0
- package/dist/models/all.d.ts +21 -0
- package/dist/models/all.js +21 -0
- package/dist/models/all.js.map +1 -1
- package/dist/types/ObjectParamAPI.d.ts +95 -0
- package/dist/types/ObjectParamAPI.js +42 -0
- package/dist/types/ObjectParamAPI.js.map +1 -1
- package/dist/types/ObservableAPI.d.ts +25 -0
- package/dist/types/ObservableAPI.js +383 -47
- package/dist/types/ObservableAPI.js.map +1 -1
- package/dist/types/PromiseAPI.d.ts +25 -0
- package/dist/types/PromiseAPI.js +56 -0
- package/dist/types/PromiseAPI.js.map +1 -1
- package/models/App.ts +1 -1
- package/models/BadRequestError.ts +1 -1
- package/models/BasicNotification.ts +17 -1
- package/models/BasicNotificationAllOf.ts +1 -1
- package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
- package/models/BeginLiveActivityRequest.ts +1 -1
- package/models/Button.ts +1 -1
- package/models/CancelNotificationSuccessResponse.ts +1 -1
- package/models/CreateNotificationSuccessResponse.ts +3 -3
- package/models/CreatePlayerSuccessResponse.ts +1 -1
- package/models/CreateSegmentConflictResponse.ts +1 -1
- package/models/CreateSegmentSuccessResponse.ts +1 -1
- package/models/CreateSubscriptionRequestBody.ts +39 -0
- package/models/CreateUserConflictResponse.ts +32 -0
- package/models/CreateUserConflictResponseErrorsInner.ts +46 -0
- package/models/CreateUserConflictResponseErrorsItemsMeta.ts +31 -0
- package/models/DeletePlayerNotFoundResponse.ts +1 -1
- package/models/DeletePlayerSuccessResponse.ts +1 -1
- package/models/DeleteSegmentNotFoundResponse.ts +1 -1
- package/models/DeleteSegmentSuccessResponse.ts +1 -1
- package/models/DeliveryData.ts +1 -1
- package/models/ExportPlayersRequestBody.ts +1 -1
- package/models/ExportPlayersSuccessResponse.ts +1 -1
- package/models/Filter.ts +1 -1
- package/models/FilterExpressions.ts +1 -1
- package/models/GetNotificationRequestBody.ts +1 -1
- package/models/IdentifyUserConflictResponse.ts +32 -0
- package/models/IdentifyUserConflictResponseErrorsInner.ts +38 -0
- package/models/InlineResponse200.ts +31 -0
- package/models/InlineResponse2003.ts +31 -0
- package/models/InlineResponse201.ts +32 -0
- package/models/InlineResponse202.ts +32 -0
- package/models/InvalidIdentifierError.ts +1 -1
- package/models/Notification.ts +17 -1
- package/models/Notification200Errors.ts +1 -1
- package/models/NotificationAllOf.ts +1 -1
- package/models/NotificationHistorySuccessResponse.ts +1 -1
- package/models/NotificationSlice.ts +1 -1
- package/models/NotificationTarget.ts +19 -1
- package/models/NotificationWithMeta.ts +17 -1
- package/models/NotificationWithMetaAllOf.ts +1 -1
- package/models/ObjectSerializer.ts +74 -5
- package/models/Operator.ts +1 -1
- package/models/OutcomeData.ts +1 -1
- package/models/OutcomesData.ts +1 -1
- package/models/PlatformDeliveryData.ts +1 -1
- package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
- package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
- package/models/Player.ts +3 -3
- package/models/PlayerNotificationTarget.ts +19 -1
- package/models/PlayerNotificationTargetIncludeAliases.ts +31 -0
- package/models/PlayerSlice.ts +1 -1
- package/models/PropertiesDeltas.ts +46 -0
- package/models/PropertiesObject.ts +102 -0
- package/models/Purchase.ts +10 -3
- package/models/Segment.ts +1 -1
- package/models/SegmentNotificationTarget.ts +1 -1
- package/models/StringMap.ts +1 -1
- package/models/SubscriptionObject.ts +146 -0
- package/models/TransferSubscriptionRequestBody.ts +31 -0
- package/models/UpdateLiveActivityRequest.ts +1 -1
- package/models/UpdateLiveActivitySuccessResponse.ts +1 -1
- package/models/UpdatePlayerSuccessResponse.ts +1 -1
- package/models/UpdatePlayerTagsRequestBody.ts +1 -1
- package/models/UpdatePlayerTagsSuccessResponse.ts +1 -1
- package/models/UpdateSubscriptionRequestBody.ts +32 -0
- package/models/UpdateUserRequest.ts +47 -0
- package/models/User.ts +55 -0
- package/models/UserIdentityRequestBody.ts +31 -0
- package/models/UserIdentityResponse.ts +31 -0
- package/models/UserSubscriptionOptions.ts +31 -0
- package/models/all.ts +21 -0
- package/package.json +2 -2
- package/types/ObjectParamAPI.ts +427 -0
- package/types/ObservableAPI.ts +371 -0
- package/types/PromiseAPI.ts +175 -0
package/apis/DefaultApi.ts
CHANGED
|
@@ -18,6 +18,8 @@ import { CreateNotificationSuccessResponse } from '../models/CreateNotificationS
|
|
|
18
18
|
import { CreatePlayerSuccessResponse } from '../models/CreatePlayerSuccessResponse';
|
|
19
19
|
import { CreateSegmentConflictResponse } from '../models/CreateSegmentConflictResponse';
|
|
20
20
|
import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
|
|
21
|
+
import { CreateSubscriptionRequestBody } from '../models/CreateSubscriptionRequestBody';
|
|
22
|
+
import { CreateUserConflictResponse } from '../models/CreateUserConflictResponse';
|
|
21
23
|
import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResponse';
|
|
22
24
|
import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
|
|
23
25
|
import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
|
|
@@ -25,6 +27,11 @@ import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResp
|
|
|
25
27
|
import { ExportPlayersRequestBody } from '../models/ExportPlayersRequestBody';
|
|
26
28
|
import { ExportPlayersSuccessResponse } from '../models/ExportPlayersSuccessResponse';
|
|
27
29
|
import { GetNotificationRequestBody } from '../models/GetNotificationRequestBody';
|
|
30
|
+
import { IdentifyUserConflictResponse } from '../models/IdentifyUserConflictResponse';
|
|
31
|
+
import { InlineResponse200 } from '../models/InlineResponse200';
|
|
32
|
+
import { InlineResponse2003 } from '../models/InlineResponse2003';
|
|
33
|
+
import { InlineResponse201 } from '../models/InlineResponse201';
|
|
34
|
+
import { InlineResponse202 } from '../models/InlineResponse202';
|
|
28
35
|
import { Notification } from '../models/Notification';
|
|
29
36
|
import { NotificationHistorySuccessResponse } from '../models/NotificationHistorySuccessResponse';
|
|
30
37
|
import { NotificationSlice } from '../models/NotificationSlice';
|
|
@@ -33,11 +40,17 @@ import { OutcomesData } from '../models/OutcomesData';
|
|
|
33
40
|
import { Player } from '../models/Player';
|
|
34
41
|
import { PlayerSlice } from '../models/PlayerSlice';
|
|
35
42
|
import { Segment } from '../models/Segment';
|
|
43
|
+
import { TransferSubscriptionRequestBody } from '../models/TransferSubscriptionRequestBody';
|
|
36
44
|
import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
|
|
37
45
|
import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
|
|
38
46
|
import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
|
|
39
47
|
import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
|
|
40
48
|
import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
|
|
49
|
+
import { UpdateSubscriptionRequestBody } from '../models/UpdateSubscriptionRequestBody';
|
|
50
|
+
import { UpdateUserRequest } from '../models/UpdateUserRequest';
|
|
51
|
+
import { User } from '../models/User';
|
|
52
|
+
import { UserIdentityRequestBody } from '../models/UserIdentityRequestBody';
|
|
53
|
+
import { UserIdentityResponse } from '../models/UserIdentityResponse';
|
|
41
54
|
|
|
42
55
|
/**
|
|
43
56
|
* no description
|
|
@@ -353,6 +366,193 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
353
366
|
return requestContext;
|
|
354
367
|
}
|
|
355
368
|
|
|
369
|
+
/**
|
|
370
|
+
* Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
|
|
371
|
+
* @param appId
|
|
372
|
+
* @param aliasLabel
|
|
373
|
+
* @param aliasId
|
|
374
|
+
* @param createSubscriptionRequestBody
|
|
375
|
+
*/
|
|
376
|
+
public async createSubscription(appId: string, aliasLabel: string, aliasId: string, createSubscriptionRequestBody: CreateSubscriptionRequestBody, _options?: Configuration): Promise<RequestContext> {
|
|
377
|
+
let _config = _options || this.configuration;
|
|
378
|
+
|
|
379
|
+
// verify required parameter 'appId' is not null or undefined
|
|
380
|
+
if (appId === null || appId === undefined) {
|
|
381
|
+
throw new RequiredError("DefaultApi", "createSubscription", "appId");
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
// verify required parameter 'aliasLabel' is not null or undefined
|
|
386
|
+
if (aliasLabel === null || aliasLabel === undefined) {
|
|
387
|
+
throw new RequiredError("DefaultApi", "createSubscription", "aliasLabel");
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
392
|
+
if (aliasId === null || aliasId === undefined) {
|
|
393
|
+
throw new RequiredError("DefaultApi", "createSubscription", "aliasId");
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
// verify required parameter 'createSubscriptionRequestBody' is not null or undefined
|
|
398
|
+
if (createSubscriptionRequestBody === null || createSubscriptionRequestBody === undefined) {
|
|
399
|
+
throw new RequiredError("DefaultApi", "createSubscription", "createSubscriptionRequestBody");
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
// Path Params
|
|
404
|
+
const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions'
|
|
405
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
406
|
+
.replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
|
|
407
|
+
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
408
|
+
|
|
409
|
+
// Make Request Context
|
|
410
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
411
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
// Body Params
|
|
415
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
416
|
+
"application/json"
|
|
417
|
+
]);
|
|
418
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
419
|
+
const serializedBody = ObjectSerializer.stringify(
|
|
420
|
+
ObjectSerializer.serialize(createSubscriptionRequestBody, "CreateSubscriptionRequestBody", ""),
|
|
421
|
+
contentType
|
|
422
|
+
);
|
|
423
|
+
requestContext.setBody(serializedBody);
|
|
424
|
+
|
|
425
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
426
|
+
// Apply auth methods
|
|
427
|
+
authMethod = _config.authMethods["app_key"]
|
|
428
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
429
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
433
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
434
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
return requestContext;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User.
|
|
442
|
+
* @param appId
|
|
443
|
+
* @param user
|
|
444
|
+
*/
|
|
445
|
+
public async createUser(appId: string, user: User, _options?: Configuration): Promise<RequestContext> {
|
|
446
|
+
let _config = _options || this.configuration;
|
|
447
|
+
|
|
448
|
+
// verify required parameter 'appId' is not null or undefined
|
|
449
|
+
if (appId === null || appId === undefined) {
|
|
450
|
+
throw new RequiredError("DefaultApi", "createUser", "appId");
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
// verify required parameter 'user' is not null or undefined
|
|
455
|
+
if (user === null || user === undefined) {
|
|
456
|
+
throw new RequiredError("DefaultApi", "createUser", "user");
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
// Path Params
|
|
461
|
+
const localVarPath = '/apps/{app_id}/users'
|
|
462
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
463
|
+
|
|
464
|
+
// Make Request Context
|
|
465
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
466
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
// Body Params
|
|
470
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
471
|
+
"application/json"
|
|
472
|
+
]);
|
|
473
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
474
|
+
const serializedBody = ObjectSerializer.stringify(
|
|
475
|
+
ObjectSerializer.serialize(user, "User", ""),
|
|
476
|
+
contentType
|
|
477
|
+
);
|
|
478
|
+
requestContext.setBody(serializedBody);
|
|
479
|
+
|
|
480
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
481
|
+
// Apply auth methods
|
|
482
|
+
authMethod = _config.authMethods["app_key"]
|
|
483
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
484
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
488
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
489
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
return requestContext;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Deletes an alias by alias label
|
|
497
|
+
* @param appId
|
|
498
|
+
* @param aliasLabel
|
|
499
|
+
* @param aliasId
|
|
500
|
+
* @param aliasLabelToDelete
|
|
501
|
+
*/
|
|
502
|
+
public async deleteAlias(appId: string, aliasLabel: string, aliasId: string, aliasLabelToDelete: string, _options?: Configuration): Promise<RequestContext> {
|
|
503
|
+
let _config = _options || this.configuration;
|
|
504
|
+
|
|
505
|
+
// verify required parameter 'appId' is not null or undefined
|
|
506
|
+
if (appId === null || appId === undefined) {
|
|
507
|
+
throw new RequiredError("DefaultApi", "deleteAlias", "appId");
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
// verify required parameter 'aliasLabel' is not null or undefined
|
|
512
|
+
if (aliasLabel === null || aliasLabel === undefined) {
|
|
513
|
+
throw new RequiredError("DefaultApi", "deleteAlias", "aliasLabel");
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
518
|
+
if (aliasId === null || aliasId === undefined) {
|
|
519
|
+
throw new RequiredError("DefaultApi", "deleteAlias", "aliasId");
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
// verify required parameter 'aliasLabelToDelete' is not null or undefined
|
|
524
|
+
if (aliasLabelToDelete === null || aliasLabelToDelete === undefined) {
|
|
525
|
+
throw new RequiredError("DefaultApi", "deleteAlias", "aliasLabelToDelete");
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
// Path Params
|
|
530
|
+
const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}'
|
|
531
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
532
|
+
.replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
|
|
533
|
+
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)))
|
|
534
|
+
.replace('{' + 'alias_label_to_delete' + '}', encodeURIComponent(String(aliasLabelToDelete)));
|
|
535
|
+
|
|
536
|
+
// Make Request Context
|
|
537
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
538
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
542
|
+
// Apply auth methods
|
|
543
|
+
authMethod = _config.authMethods["app_key"]
|
|
544
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
545
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
549
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
550
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
return requestContext;
|
|
554
|
+
}
|
|
555
|
+
|
|
356
556
|
/**
|
|
357
557
|
* Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
|
|
358
558
|
* Delete a user record
|
|
@@ -425,12 +625,254 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
425
625
|
|
|
426
626
|
|
|
427
627
|
// Path Params
|
|
428
|
-
const localVarPath = '/apps/{app_id}/segments/{segment_id}'
|
|
628
|
+
const localVarPath = '/apps/{app_id}/segments/{segment_id}'
|
|
629
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
630
|
+
.replace('{' + 'segment_id' + '}', encodeURIComponent(String(segmentId)));
|
|
631
|
+
|
|
632
|
+
// Make Request Context
|
|
633
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
634
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
638
|
+
// Apply auth methods
|
|
639
|
+
authMethod = _config.authMethods["app_key"]
|
|
640
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
641
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
645
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
646
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
return requestContext;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Deletes the Subscription.
|
|
654
|
+
* @param appId
|
|
655
|
+
* @param subscriptionId
|
|
656
|
+
*/
|
|
657
|
+
public async deleteSubscription(appId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
|
|
658
|
+
let _config = _options || this.configuration;
|
|
659
|
+
|
|
660
|
+
// verify required parameter 'appId' is not null or undefined
|
|
661
|
+
if (appId === null || appId === undefined) {
|
|
662
|
+
throw new RequiredError("DefaultApi", "deleteSubscription", "appId");
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
// verify required parameter 'subscriptionId' is not null or undefined
|
|
667
|
+
if (subscriptionId === null || subscriptionId === undefined) {
|
|
668
|
+
throw new RequiredError("DefaultApi", "deleteSubscription", "subscriptionId");
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
// Path Params
|
|
673
|
+
const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}'
|
|
674
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
675
|
+
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
676
|
+
|
|
677
|
+
// Make Request Context
|
|
678
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
679
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
683
|
+
// Apply auth methods
|
|
684
|
+
authMethod = _config.authMethods["app_key"]
|
|
685
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
686
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
690
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
691
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
return requestContext;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases
|
|
699
|
+
* @param appId
|
|
700
|
+
* @param aliasLabel
|
|
701
|
+
* @param aliasId
|
|
702
|
+
*/
|
|
703
|
+
public async deleteUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
|
|
704
|
+
let _config = _options || this.configuration;
|
|
705
|
+
|
|
706
|
+
// verify required parameter 'appId' is not null or undefined
|
|
707
|
+
if (appId === null || appId === undefined) {
|
|
708
|
+
throw new RequiredError("DefaultApi", "deleteUser", "appId");
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
// verify required parameter 'aliasLabel' is not null or undefined
|
|
713
|
+
if (aliasLabel === null || aliasLabel === undefined) {
|
|
714
|
+
throw new RequiredError("DefaultApi", "deleteUser", "aliasLabel");
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
719
|
+
if (aliasId === null || aliasId === undefined) {
|
|
720
|
+
throw new RequiredError("DefaultApi", "deleteUser", "aliasId");
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
// Path Params
|
|
725
|
+
const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
|
|
726
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
727
|
+
.replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
|
|
728
|
+
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
729
|
+
|
|
730
|
+
// Make Request Context
|
|
731
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
732
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
737
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
738
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
return requestContext;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Stops a Live Activity
|
|
746
|
+
* Stop Live Activity
|
|
747
|
+
* @param appId The OneSignal App ID for your app. Available in Keys & IDs.
|
|
748
|
+
* @param activityId Live Activity record ID
|
|
749
|
+
* @param subscriptionId Subscription ID
|
|
750
|
+
*/
|
|
751
|
+
public async endLiveActivity(appId: string, activityId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
|
|
752
|
+
let _config = _options || this.configuration;
|
|
753
|
+
|
|
754
|
+
// verify required parameter 'appId' is not null or undefined
|
|
755
|
+
if (appId === null || appId === undefined) {
|
|
756
|
+
throw new RequiredError("DefaultApi", "endLiveActivity", "appId");
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
// verify required parameter 'activityId' is not null or undefined
|
|
761
|
+
if (activityId === null || activityId === undefined) {
|
|
762
|
+
throw new RequiredError("DefaultApi", "endLiveActivity", "activityId");
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
// verify required parameter 'subscriptionId' is not null or undefined
|
|
767
|
+
if (subscriptionId === null || subscriptionId === undefined) {
|
|
768
|
+
throw new RequiredError("DefaultApi", "endLiveActivity", "subscriptionId");
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
// Path Params
|
|
773
|
+
const localVarPath = '/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}'
|
|
774
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
775
|
+
.replace('{' + 'activity_id' + '}', encodeURIComponent(String(activityId)))
|
|
776
|
+
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
777
|
+
|
|
778
|
+
// Make Request Context
|
|
779
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
|
|
780
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
784
|
+
// Apply auth methods
|
|
785
|
+
authMethod = _config.authMethods["app_key"]
|
|
786
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
787
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
791
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
792
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
return requestContext;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App\'s REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
|
|
800
|
+
* CSV export
|
|
801
|
+
* @param appId The app ID that you want to export devices from
|
|
802
|
+
* @param exportPlayersRequestBody
|
|
803
|
+
*/
|
|
804
|
+
public async exportPlayers(appId: string, exportPlayersRequestBody?: ExportPlayersRequestBody, _options?: Configuration): Promise<RequestContext> {
|
|
805
|
+
let _config = _options || this.configuration;
|
|
806
|
+
|
|
807
|
+
// verify required parameter 'appId' is not null or undefined
|
|
808
|
+
if (appId === null || appId === undefined) {
|
|
809
|
+
throw new RequiredError("DefaultApi", "exportPlayers", "appId");
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
// Path Params
|
|
815
|
+
const localVarPath = '/players/csv_export?app_id={app_id}'
|
|
816
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)));
|
|
817
|
+
|
|
818
|
+
// Make Request Context
|
|
819
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
|
|
820
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
// Body Params
|
|
824
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
825
|
+
"application/json"
|
|
826
|
+
]);
|
|
827
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
828
|
+
const serializedBody = ObjectSerializer.stringify(
|
|
829
|
+
ObjectSerializer.serialize(exportPlayersRequestBody, "ExportPlayersRequestBody", ""),
|
|
830
|
+
contentType
|
|
831
|
+
);
|
|
832
|
+
requestContext.setBody(serializedBody);
|
|
833
|
+
|
|
834
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
835
|
+
// Apply auth methods
|
|
836
|
+
authMethod = _config.authMethods["app_key"]
|
|
837
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
838
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
842
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
843
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
return requestContext;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* Lists all Aliases for the User identified by :subscription_id.
|
|
851
|
+
* @param appId
|
|
852
|
+
* @param subscriptionId
|
|
853
|
+
*/
|
|
854
|
+
public async fetchAliases(appId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
|
|
855
|
+
let _config = _options || this.configuration;
|
|
856
|
+
|
|
857
|
+
// verify required parameter 'appId' is not null or undefined
|
|
858
|
+
if (appId === null || appId === undefined) {
|
|
859
|
+
throw new RequiredError("DefaultApi", "fetchAliases", "appId");
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
// verify required parameter 'subscriptionId' is not null or undefined
|
|
864
|
+
if (subscriptionId === null || subscriptionId === undefined) {
|
|
865
|
+
throw new RequiredError("DefaultApi", "fetchAliases", "subscriptionId");
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
// Path Params
|
|
870
|
+
const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
|
|
429
871
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
430
|
-
.replace('{' + '
|
|
872
|
+
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
431
873
|
|
|
432
874
|
// Make Request Context
|
|
433
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.
|
|
875
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
434
876
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
435
877
|
|
|
436
878
|
|
|
@@ -450,41 +892,40 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
450
892
|
}
|
|
451
893
|
|
|
452
894
|
/**
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
* @param
|
|
456
|
-
* @param
|
|
457
|
-
* @param subscriptionId Subscription ID
|
|
895
|
+
* Returns the User’s properties, Aliases, and Subscriptions.
|
|
896
|
+
* @param appId
|
|
897
|
+
* @param aliasLabel
|
|
898
|
+
* @param aliasId
|
|
458
899
|
*/
|
|
459
|
-
public async
|
|
900
|
+
public async fetchUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
|
|
460
901
|
let _config = _options || this.configuration;
|
|
461
902
|
|
|
462
903
|
// verify required parameter 'appId' is not null or undefined
|
|
463
904
|
if (appId === null || appId === undefined) {
|
|
464
|
-
throw new RequiredError("DefaultApi", "
|
|
905
|
+
throw new RequiredError("DefaultApi", "fetchUser", "appId");
|
|
465
906
|
}
|
|
466
907
|
|
|
467
908
|
|
|
468
|
-
// verify required parameter '
|
|
469
|
-
if (
|
|
470
|
-
throw new RequiredError("DefaultApi", "
|
|
909
|
+
// verify required parameter 'aliasLabel' is not null or undefined
|
|
910
|
+
if (aliasLabel === null || aliasLabel === undefined) {
|
|
911
|
+
throw new RequiredError("DefaultApi", "fetchUser", "aliasLabel");
|
|
471
912
|
}
|
|
472
913
|
|
|
473
914
|
|
|
474
|
-
// verify required parameter '
|
|
475
|
-
if (
|
|
476
|
-
throw new RequiredError("DefaultApi", "
|
|
915
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
916
|
+
if (aliasId === null || aliasId === undefined) {
|
|
917
|
+
throw new RequiredError("DefaultApi", "fetchUser", "aliasId");
|
|
477
918
|
}
|
|
478
919
|
|
|
479
920
|
|
|
480
921
|
// Path Params
|
|
481
|
-
const localVarPath = '/apps/{app_id}/
|
|
922
|
+
const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
|
|
482
923
|
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
483
|
-
.replace('{' + '
|
|
484
|
-
.replace('{' + '
|
|
924
|
+
.replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
|
|
925
|
+
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
485
926
|
|
|
486
927
|
// Make Request Context
|
|
487
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.
|
|
928
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
488
929
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
489
930
|
|
|
490
931
|
|
|
@@ -504,41 +945,43 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
504
945
|
}
|
|
505
946
|
|
|
506
947
|
/**
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
* @param
|
|
510
|
-
* @param
|
|
948
|
+
* Lists all Aliases for the User identified by (:alias_label, :alias_id).
|
|
949
|
+
* @param appId
|
|
950
|
+
* @param aliasLabel
|
|
951
|
+
* @param aliasId
|
|
511
952
|
*/
|
|
512
|
-
public async
|
|
953
|
+
public async fetchUserIdentity(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<RequestContext> {
|
|
513
954
|
let _config = _options || this.configuration;
|
|
514
955
|
|
|
515
956
|
// verify required parameter 'appId' is not null or undefined
|
|
516
957
|
if (appId === null || appId === undefined) {
|
|
517
|
-
throw new RequiredError("DefaultApi", "
|
|
958
|
+
throw new RequiredError("DefaultApi", "fetchUserIdentity", "appId");
|
|
518
959
|
}
|
|
519
960
|
|
|
520
961
|
|
|
962
|
+
// verify required parameter 'aliasLabel' is not null or undefined
|
|
963
|
+
if (aliasLabel === null || aliasLabel === undefined) {
|
|
964
|
+
throw new RequiredError("DefaultApi", "fetchUserIdentity", "aliasLabel");
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
969
|
+
if (aliasId === null || aliasId === undefined) {
|
|
970
|
+
throw new RequiredError("DefaultApi", "fetchUserIdentity", "aliasId");
|
|
971
|
+
}
|
|
972
|
+
|
|
521
973
|
|
|
522
974
|
// Path Params
|
|
523
|
-
const localVarPath = '/
|
|
524
|
-
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
975
|
+
const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
|
|
976
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
977
|
+
.replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
|
|
978
|
+
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
525
979
|
|
|
526
980
|
// Make Request Context
|
|
527
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.
|
|
981
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
528
982
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
529
983
|
|
|
530
984
|
|
|
531
|
-
// Body Params
|
|
532
|
-
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
533
|
-
"application/json"
|
|
534
|
-
]);
|
|
535
|
-
requestContext.setHeaderParam("Content-Type", contentType);
|
|
536
|
-
const serializedBody = ObjectSerializer.stringify(
|
|
537
|
-
ObjectSerializer.serialize(exportPlayersRequestBody, "ExportPlayersRequestBody", ""),
|
|
538
|
-
contentType
|
|
539
|
-
);
|
|
540
|
-
requestContext.setBody(serializedBody);
|
|
541
|
-
|
|
542
985
|
let authMethod: SecurityAuthentication | undefined;
|
|
543
986
|
// Apply auth methods
|
|
544
987
|
authMethod = _config.authMethods["app_key"]
|
|
@@ -622,6 +1065,51 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
622
1065
|
return requestContext;
|
|
623
1066
|
}
|
|
624
1067
|
|
|
1068
|
+
/**
|
|
1069
|
+
* Manifest of In-App Messages the Subscription is eligible to display by the SDK.
|
|
1070
|
+
* @param appId
|
|
1071
|
+
* @param subscriptionId
|
|
1072
|
+
*/
|
|
1073
|
+
public async getEligibleIams(appId: string, subscriptionId: string, _options?: Configuration): Promise<RequestContext> {
|
|
1074
|
+
let _config = _options || this.configuration;
|
|
1075
|
+
|
|
1076
|
+
// verify required parameter 'appId' is not null or undefined
|
|
1077
|
+
if (appId === null || appId === undefined) {
|
|
1078
|
+
throw new RequiredError("DefaultApi", "getEligibleIams", "appId");
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
// verify required parameter 'subscriptionId' is not null or undefined
|
|
1083
|
+
if (subscriptionId === null || subscriptionId === undefined) {
|
|
1084
|
+
throw new RequiredError("DefaultApi", "getEligibleIams", "subscriptionId");
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
// Path Params
|
|
1089
|
+
const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/iams'
|
|
1090
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
1091
|
+
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
1092
|
+
|
|
1093
|
+
// Make Request Context
|
|
1094
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
1095
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
1099
|
+
// Apply auth methods
|
|
1100
|
+
authMethod = _config.authMethods["app_key"]
|
|
1101
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
1102
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
1106
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
1107
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
return requestContext;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
625
1113
|
/**
|
|
626
1114
|
* View the details of a single notification and outcomes associated with it
|
|
627
1115
|
* View notification
|
|
@@ -870,46 +1358,236 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
870
1358
|
}
|
|
871
1359
|
|
|
872
1360
|
/**
|
|
873
|
-
* View the details of an existing device in one of your OneSignal apps
|
|
874
|
-
* View device
|
|
875
|
-
* @param appId Your app_id for this device
|
|
876
|
-
* @param playerId Player\'s OneSignal ID
|
|
877
|
-
* @param emailAuthHash Email - Only required if you have enabled Identity Verification and device_type is email (11).
|
|
1361
|
+
* View the details of an existing device in one of your OneSignal apps
|
|
1362
|
+
* View device
|
|
1363
|
+
* @param appId Your app_id for this device
|
|
1364
|
+
* @param playerId Player\'s OneSignal ID
|
|
1365
|
+
* @param emailAuthHash Email - Only required if you have enabled Identity Verification and device_type is email (11).
|
|
1366
|
+
*/
|
|
1367
|
+
public async getPlayer(appId: string, playerId: string, emailAuthHash?: string, _options?: Configuration): Promise<RequestContext> {
|
|
1368
|
+
let _config = _options || this.configuration;
|
|
1369
|
+
|
|
1370
|
+
// verify required parameter 'appId' is not null or undefined
|
|
1371
|
+
if (appId === null || appId === undefined) {
|
|
1372
|
+
throw new RequiredError("DefaultApi", "getPlayer", "appId");
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
// verify required parameter 'playerId' is not null or undefined
|
|
1377
|
+
if (playerId === null || playerId === undefined) {
|
|
1378
|
+
throw new RequiredError("DefaultApi", "getPlayer", "playerId");
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
// Path Params
|
|
1384
|
+
const localVarPath = '/players/{player_id}'
|
|
1385
|
+
.replace('{' + 'player_id' + '}', encodeURIComponent(String(playerId)));
|
|
1386
|
+
|
|
1387
|
+
// Make Request Context
|
|
1388
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
1389
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1390
|
+
|
|
1391
|
+
// Query Params
|
|
1392
|
+
if (appId !== undefined) {
|
|
1393
|
+
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
// Query Params
|
|
1397
|
+
if (emailAuthHash !== undefined) {
|
|
1398
|
+
requestContext.setQueryParam("email_auth_hash", ObjectSerializer.serialize(emailAuthHash, "string", ""));
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
1403
|
+
// Apply auth methods
|
|
1404
|
+
authMethod = _config.authMethods["app_key"]
|
|
1405
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
1406
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
1410
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
1411
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
return requestContext;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant.
|
|
1419
|
+
* View devices
|
|
1420
|
+
* @param appId The app ID that you want to view players from
|
|
1421
|
+
* @param limit How many devices to return. Max is 300. Default is 300
|
|
1422
|
+
* @param offset Result offset. Default is 0. Results are sorted by id;
|
|
1423
|
+
*/
|
|
1424
|
+
public async getPlayers(appId: string, limit?: number, offset?: number, _options?: Configuration): Promise<RequestContext> {
|
|
1425
|
+
let _config = _options || this.configuration;
|
|
1426
|
+
|
|
1427
|
+
// verify required parameter 'appId' is not null or undefined
|
|
1428
|
+
if (appId === null || appId === undefined) {
|
|
1429
|
+
throw new RequiredError("DefaultApi", "getPlayers", "appId");
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
// Path Params
|
|
1436
|
+
const localVarPath = '/players';
|
|
1437
|
+
|
|
1438
|
+
// Make Request Context
|
|
1439
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
|
|
1440
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1441
|
+
|
|
1442
|
+
// Query Params
|
|
1443
|
+
if (appId !== undefined) {
|
|
1444
|
+
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
// Query Params
|
|
1448
|
+
if (limit !== undefined) {
|
|
1449
|
+
requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
// Query Params
|
|
1453
|
+
if (offset !== undefined) {
|
|
1454
|
+
requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", ""));
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
1459
|
+
// Apply auth methods
|
|
1460
|
+
authMethod = _config.authMethods["app_key"]
|
|
1461
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
1462
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
1466
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
1467
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
return requestContext;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
|
|
1475
|
+
* @param appId
|
|
1476
|
+
* @param aliasLabel
|
|
1477
|
+
* @param aliasId
|
|
1478
|
+
* @param userIdentityRequestBody
|
|
1479
|
+
*/
|
|
1480
|
+
public async identifyUserByAlias(appId: string, aliasLabel: string, aliasId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Promise<RequestContext> {
|
|
1481
|
+
let _config = _options || this.configuration;
|
|
1482
|
+
|
|
1483
|
+
// verify required parameter 'appId' is not null or undefined
|
|
1484
|
+
if (appId === null || appId === undefined) {
|
|
1485
|
+
throw new RequiredError("DefaultApi", "identifyUserByAlias", "appId");
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
|
|
1489
|
+
// verify required parameter 'aliasLabel' is not null or undefined
|
|
1490
|
+
if (aliasLabel === null || aliasLabel === undefined) {
|
|
1491
|
+
throw new RequiredError("DefaultApi", "identifyUserByAlias", "aliasLabel");
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
1496
|
+
if (aliasId === null || aliasId === undefined) {
|
|
1497
|
+
throw new RequiredError("DefaultApi", "identifyUserByAlias", "aliasId");
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
|
|
1501
|
+
// verify required parameter 'userIdentityRequestBody' is not null or undefined
|
|
1502
|
+
if (userIdentityRequestBody === null || userIdentityRequestBody === undefined) {
|
|
1503
|
+
throw new RequiredError("DefaultApi", "identifyUserByAlias", "userIdentityRequestBody");
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
|
|
1507
|
+
// Path Params
|
|
1508
|
+
const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity'
|
|
1509
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
1510
|
+
.replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
|
|
1511
|
+
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
1512
|
+
|
|
1513
|
+
// Make Request Context
|
|
1514
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
|
|
1515
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
// Body Params
|
|
1519
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
1520
|
+
"application/json"
|
|
1521
|
+
]);
|
|
1522
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1523
|
+
const serializedBody = ObjectSerializer.stringify(
|
|
1524
|
+
ObjectSerializer.serialize(userIdentityRequestBody, "UserIdentityRequestBody", ""),
|
|
1525
|
+
contentType
|
|
1526
|
+
);
|
|
1527
|
+
requestContext.setBody(serializedBody);
|
|
1528
|
+
|
|
1529
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
1530
|
+
// Apply auth methods
|
|
1531
|
+
authMethod = _config.authMethods["app_key"]
|
|
1532
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
1533
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
1537
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
1538
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
return requestContext;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* Upserts one or more Aliases for the User identified by :subscription_id.
|
|
1546
|
+
* @param appId
|
|
1547
|
+
* @param subscriptionId
|
|
1548
|
+
* @param userIdentityRequestBody
|
|
878
1549
|
*/
|
|
879
|
-
public async
|
|
1550
|
+
public async identifyUserBySubscriptionId(appId: string, subscriptionId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Promise<RequestContext> {
|
|
880
1551
|
let _config = _options || this.configuration;
|
|
881
1552
|
|
|
882
1553
|
// verify required parameter 'appId' is not null or undefined
|
|
883
1554
|
if (appId === null || appId === undefined) {
|
|
884
|
-
throw new RequiredError("DefaultApi", "
|
|
1555
|
+
throw new RequiredError("DefaultApi", "identifyUserBySubscriptionId", "appId");
|
|
885
1556
|
}
|
|
886
1557
|
|
|
887
1558
|
|
|
888
|
-
// verify required parameter '
|
|
889
|
-
if (
|
|
890
|
-
throw new RequiredError("DefaultApi", "
|
|
1559
|
+
// verify required parameter 'subscriptionId' is not null or undefined
|
|
1560
|
+
if (subscriptionId === null || subscriptionId === undefined) {
|
|
1561
|
+
throw new RequiredError("DefaultApi", "identifyUserBySubscriptionId", "subscriptionId");
|
|
891
1562
|
}
|
|
892
1563
|
|
|
893
1564
|
|
|
1565
|
+
// verify required parameter 'userIdentityRequestBody' is not null or undefined
|
|
1566
|
+
if (userIdentityRequestBody === null || userIdentityRequestBody === undefined) {
|
|
1567
|
+
throw new RequiredError("DefaultApi", "identifyUserBySubscriptionId", "userIdentityRequestBody");
|
|
1568
|
+
}
|
|
1569
|
+
|
|
894
1570
|
|
|
895
1571
|
// Path Params
|
|
896
|
-
const localVarPath = '/
|
|
897
|
-
.replace('{' + '
|
|
1572
|
+
const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/user/identity'
|
|
1573
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
1574
|
+
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
898
1575
|
|
|
899
1576
|
// Make Request Context
|
|
900
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.
|
|
1577
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
|
|
901
1578
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
902
1579
|
|
|
903
|
-
// Query Params
|
|
904
|
-
if (appId !== undefined) {
|
|
905
|
-
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
// Query Params
|
|
909
|
-
if (emailAuthHash !== undefined) {
|
|
910
|
-
requestContext.setQueryParam("email_auth_hash", ObjectSerializer.serialize(emailAuthHash, "string", ""));
|
|
911
|
-
}
|
|
912
1580
|
|
|
1581
|
+
// Body Params
|
|
1582
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
1583
|
+
"application/json"
|
|
1584
|
+
]);
|
|
1585
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1586
|
+
const serializedBody = ObjectSerializer.stringify(
|
|
1587
|
+
ObjectSerializer.serialize(userIdentityRequestBody, "UserIdentityRequestBody", ""),
|
|
1588
|
+
contentType
|
|
1589
|
+
);
|
|
1590
|
+
requestContext.setBody(serializedBody);
|
|
913
1591
|
|
|
914
1592
|
let authMethod: SecurityAuthentication | undefined;
|
|
915
1593
|
// Apply auth methods
|
|
@@ -927,45 +1605,52 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
927
1605
|
}
|
|
928
1606
|
|
|
929
1607
|
/**
|
|
930
|
-
*
|
|
931
|
-
*
|
|
932
|
-
* @param
|
|
933
|
-
* @param
|
|
934
|
-
* @param offset Result offset. Default is 0. Results are sorted by id;
|
|
1608
|
+
* Transfers this Subscription to the User identified by the identity in the payload.
|
|
1609
|
+
* @param appId
|
|
1610
|
+
* @param subscriptionId
|
|
1611
|
+
* @param transferSubscriptionRequestBody
|
|
935
1612
|
*/
|
|
936
|
-
public async
|
|
1613
|
+
public async transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Promise<RequestContext> {
|
|
937
1614
|
let _config = _options || this.configuration;
|
|
938
1615
|
|
|
939
1616
|
// verify required parameter 'appId' is not null or undefined
|
|
940
1617
|
if (appId === null || appId === undefined) {
|
|
941
|
-
throw new RequiredError("DefaultApi", "
|
|
1618
|
+
throw new RequiredError("DefaultApi", "transferSubscription", "appId");
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
// verify required parameter 'subscriptionId' is not null or undefined
|
|
1623
|
+
if (subscriptionId === null || subscriptionId === undefined) {
|
|
1624
|
+
throw new RequiredError("DefaultApi", "transferSubscription", "subscriptionId");
|
|
942
1625
|
}
|
|
943
1626
|
|
|
944
1627
|
|
|
1628
|
+
// verify required parameter 'transferSubscriptionRequestBody' is not null or undefined
|
|
1629
|
+
if (transferSubscriptionRequestBody === null || transferSubscriptionRequestBody === undefined) {
|
|
1630
|
+
throw new RequiredError("DefaultApi", "transferSubscription", "transferSubscriptionRequestBody");
|
|
1631
|
+
}
|
|
945
1632
|
|
|
946
1633
|
|
|
947
1634
|
// Path Params
|
|
948
|
-
const localVarPath = '/
|
|
1635
|
+
const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}/owner'
|
|
1636
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
1637
|
+
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
949
1638
|
|
|
950
1639
|
// Make Request Context
|
|
951
|
-
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.
|
|
1640
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
|
|
952
1641
|
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
953
1642
|
|
|
954
|
-
// Query Params
|
|
955
|
-
if (appId !== undefined) {
|
|
956
|
-
requestContext.setQueryParam("app_id", ObjectSerializer.serialize(appId, "string", ""));
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
// Query Params
|
|
960
|
-
if (limit !== undefined) {
|
|
961
|
-
requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
// Query Params
|
|
965
|
-
if (offset !== undefined) {
|
|
966
|
-
requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", ""));
|
|
967
|
-
}
|
|
968
1643
|
|
|
1644
|
+
// Body Params
|
|
1645
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
1646
|
+
"application/json"
|
|
1647
|
+
]);
|
|
1648
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1649
|
+
const serializedBody = ObjectSerializer.stringify(
|
|
1650
|
+
ObjectSerializer.serialize(transferSubscriptionRequestBody, "TransferSubscriptionRequestBody", ""),
|
|
1651
|
+
contentType
|
|
1652
|
+
);
|
|
1653
|
+
requestContext.setBody(serializedBody);
|
|
969
1654
|
|
|
970
1655
|
let authMethod: SecurityAuthentication | undefined;
|
|
971
1656
|
// Apply auth methods
|
|
@@ -1217,6 +1902,140 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory {
|
|
|
1217
1902
|
return requestContext;
|
|
1218
1903
|
}
|
|
1219
1904
|
|
|
1905
|
+
/**
|
|
1906
|
+
* Updates an existing Subscription’s properties.
|
|
1907
|
+
* @param appId
|
|
1908
|
+
* @param subscriptionId
|
|
1909
|
+
* @param updateSubscriptionRequestBody
|
|
1910
|
+
*/
|
|
1911
|
+
public async updateSubscription(appId: string, subscriptionId: string, updateSubscriptionRequestBody: UpdateSubscriptionRequestBody, _options?: Configuration): Promise<RequestContext> {
|
|
1912
|
+
let _config = _options || this.configuration;
|
|
1913
|
+
|
|
1914
|
+
// verify required parameter 'appId' is not null or undefined
|
|
1915
|
+
if (appId === null || appId === undefined) {
|
|
1916
|
+
throw new RequiredError("DefaultApi", "updateSubscription", "appId");
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
|
|
1920
|
+
// verify required parameter 'subscriptionId' is not null or undefined
|
|
1921
|
+
if (subscriptionId === null || subscriptionId === undefined) {
|
|
1922
|
+
throw new RequiredError("DefaultApi", "updateSubscription", "subscriptionId");
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
|
|
1926
|
+
// verify required parameter 'updateSubscriptionRequestBody' is not null or undefined
|
|
1927
|
+
if (updateSubscriptionRequestBody === null || updateSubscriptionRequestBody === undefined) {
|
|
1928
|
+
throw new RequiredError("DefaultApi", "updateSubscription", "updateSubscriptionRequestBody");
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
|
|
1932
|
+
// Path Params
|
|
1933
|
+
const localVarPath = '/apps/{app_id}/subscriptions/{subscription_id}'
|
|
1934
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
1935
|
+
.replace('{' + 'subscription_id' + '}', encodeURIComponent(String(subscriptionId)));
|
|
1936
|
+
|
|
1937
|
+
// Make Request Context
|
|
1938
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
|
|
1939
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
1940
|
+
|
|
1941
|
+
|
|
1942
|
+
// Body Params
|
|
1943
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
1944
|
+
"application/json"
|
|
1945
|
+
]);
|
|
1946
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
1947
|
+
const serializedBody = ObjectSerializer.stringify(
|
|
1948
|
+
ObjectSerializer.serialize(updateSubscriptionRequestBody, "UpdateSubscriptionRequestBody", ""),
|
|
1949
|
+
contentType
|
|
1950
|
+
);
|
|
1951
|
+
requestContext.setBody(serializedBody);
|
|
1952
|
+
|
|
1953
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
1954
|
+
// Apply auth methods
|
|
1955
|
+
authMethod = _config.authMethods["app_key"]
|
|
1956
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
1957
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
1961
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
1962
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
return requestContext;
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
/**
|
|
1969
|
+
* Updates an existing User’s properties.
|
|
1970
|
+
* @param appId
|
|
1971
|
+
* @param aliasLabel
|
|
1972
|
+
* @param aliasId
|
|
1973
|
+
* @param updateUserRequest
|
|
1974
|
+
*/
|
|
1975
|
+
public async updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, _options?: Configuration): Promise<RequestContext> {
|
|
1976
|
+
let _config = _options || this.configuration;
|
|
1977
|
+
|
|
1978
|
+
// verify required parameter 'appId' is not null or undefined
|
|
1979
|
+
if (appId === null || appId === undefined) {
|
|
1980
|
+
throw new RequiredError("DefaultApi", "updateUser", "appId");
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
|
|
1984
|
+
// verify required parameter 'aliasLabel' is not null or undefined
|
|
1985
|
+
if (aliasLabel === null || aliasLabel === undefined) {
|
|
1986
|
+
throw new RequiredError("DefaultApi", "updateUser", "aliasLabel");
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
|
|
1990
|
+
// verify required parameter 'aliasId' is not null or undefined
|
|
1991
|
+
if (aliasId === null || aliasId === undefined) {
|
|
1992
|
+
throw new RequiredError("DefaultApi", "updateUser", "aliasId");
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
|
|
1996
|
+
// verify required parameter 'updateUserRequest' is not null or undefined
|
|
1997
|
+
if (updateUserRequest === null || updateUserRequest === undefined) {
|
|
1998
|
+
throw new RequiredError("DefaultApi", "updateUser", "updateUserRequest");
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
|
|
2002
|
+
// Path Params
|
|
2003
|
+
const localVarPath = '/apps/{app_id}/users/by/{alias_label}/{alias_id}'
|
|
2004
|
+
.replace('{' + 'app_id' + '}', encodeURIComponent(String(appId)))
|
|
2005
|
+
.replace('{' + 'alias_label' + '}', encodeURIComponent(String(aliasLabel)))
|
|
2006
|
+
.replace('{' + 'alias_id' + '}', encodeURIComponent(String(aliasId)));
|
|
2007
|
+
|
|
2008
|
+
// Make Request Context
|
|
2009
|
+
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.PATCH);
|
|
2010
|
+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
|
|
2011
|
+
|
|
2012
|
+
|
|
2013
|
+
// Body Params
|
|
2014
|
+
const contentType = ObjectSerializer.getPreferredMediaType([
|
|
2015
|
+
"application/json"
|
|
2016
|
+
]);
|
|
2017
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
2018
|
+
const serializedBody = ObjectSerializer.stringify(
|
|
2019
|
+
ObjectSerializer.serialize(updateUserRequest, "UpdateUserRequest", ""),
|
|
2020
|
+
contentType
|
|
2021
|
+
);
|
|
2022
|
+
requestContext.setBody(serializedBody);
|
|
2023
|
+
|
|
2024
|
+
let authMethod: SecurityAuthentication | undefined;
|
|
2025
|
+
// Apply auth methods
|
|
2026
|
+
authMethod = _config.authMethods["app_key"]
|
|
2027
|
+
if (authMethod?.applySecurityAuthentication) {
|
|
2028
|
+
await authMethod?.applySecurityAuthentication(requestContext);
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
const defaultAuth: SecurityAuthentication | undefined = _options?.authMethods?.default || this.configuration?.authMethods?.default
|
|
2032
|
+
if (defaultAuth?.applySecurityAuthentication) {
|
|
2033
|
+
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
return requestContext;
|
|
2037
|
+
}
|
|
2038
|
+
|
|
1220
2039
|
}
|
|
1221
2040
|
|
|
1222
2041
|
export class DefaultApiResponseProcessor {
|
|
@@ -1423,17 +2242,125 @@ export class DefaultApiResponseProcessor {
|
|
|
1423
2242
|
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
1424
2243
|
const body: CreateSegmentConflictResponse = ObjectSerializer.deserialize(
|
|
1425
2244
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
1426
|
-
"CreateSegmentConflictResponse", ""
|
|
1427
|
-
) as CreateSegmentConflictResponse;
|
|
1428
|
-
throw new ApiException<CreateSegmentConflictResponse>(409, "Conflict", body, response.headers);
|
|
2245
|
+
"CreateSegmentConflictResponse", ""
|
|
2246
|
+
) as CreateSegmentConflictResponse;
|
|
2247
|
+
throw new ApiException<CreateSegmentConflictResponse>(409, "Conflict", body, response.headers);
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2251
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
2252
|
+
const body: CreateSegmentSuccessResponse = ObjectSerializer.deserialize(
|
|
2253
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2254
|
+
"CreateSegmentSuccessResponse", ""
|
|
2255
|
+
) as CreateSegmentSuccessResponse;
|
|
2256
|
+
return body;
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
/**
|
|
2263
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2264
|
+
* to the expected objects
|
|
2265
|
+
*
|
|
2266
|
+
* @params response Response returned by the server for a request to createSubscription
|
|
2267
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2268
|
+
*/
|
|
2269
|
+
public async createSubscription(response: ResponseContext): Promise<InlineResponse201 > {
|
|
2270
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2271
|
+
if (isCodeInRange("201", response.httpStatusCode)) {
|
|
2272
|
+
const body: InlineResponse201 = ObjectSerializer.deserialize(
|
|
2273
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2274
|
+
"InlineResponse201", ""
|
|
2275
|
+
) as InlineResponse201;
|
|
2276
|
+
return body;
|
|
2277
|
+
}
|
|
2278
|
+
if (isCodeInRange("202", response.httpStatusCode)) {
|
|
2279
|
+
const body: InlineResponse201 = ObjectSerializer.deserialize(
|
|
2280
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2281
|
+
"InlineResponse201", ""
|
|
2282
|
+
) as InlineResponse201;
|
|
2283
|
+
return body;
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2287
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
2288
|
+
const body: InlineResponse201 = ObjectSerializer.deserialize(
|
|
2289
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2290
|
+
"InlineResponse201", ""
|
|
2291
|
+
) as InlineResponse201;
|
|
2292
|
+
return body;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
/**
|
|
2299
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2300
|
+
* to the expected objects
|
|
2301
|
+
*
|
|
2302
|
+
* @params response Response returned by the server for a request to createUser
|
|
2303
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2304
|
+
*/
|
|
2305
|
+
public async createUser(response: ResponseContext): Promise<User > {
|
|
2306
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2307
|
+
if (isCodeInRange("201", response.httpStatusCode)) {
|
|
2308
|
+
const body: User = ObjectSerializer.deserialize(
|
|
2309
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2310
|
+
"User", ""
|
|
2311
|
+
) as User;
|
|
2312
|
+
return body;
|
|
2313
|
+
}
|
|
2314
|
+
if (isCodeInRange("202", response.httpStatusCode)) {
|
|
2315
|
+
const body: User = ObjectSerializer.deserialize(
|
|
2316
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2317
|
+
"User", ""
|
|
2318
|
+
) as User;
|
|
2319
|
+
return body;
|
|
2320
|
+
}
|
|
2321
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2322
|
+
const body: CreateUserConflictResponse = ObjectSerializer.deserialize(
|
|
2323
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2324
|
+
"CreateUserConflictResponse", ""
|
|
2325
|
+
) as CreateUserConflictResponse;
|
|
2326
|
+
throw new ApiException<CreateUserConflictResponse>(409, "Multiple User Identity Conflict", body, response.headers);
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2330
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
2331
|
+
const body: User = ObjectSerializer.deserialize(
|
|
2332
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2333
|
+
"User", ""
|
|
2334
|
+
) as User;
|
|
2335
|
+
return body;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2339
|
+
}
|
|
2340
|
+
|
|
2341
|
+
/**
|
|
2342
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2343
|
+
* to the expected objects
|
|
2344
|
+
*
|
|
2345
|
+
* @params response Response returned by the server for a request to deleteAlias
|
|
2346
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2347
|
+
*/
|
|
2348
|
+
public async deleteAlias(response: ResponseContext): Promise<InlineResponse200 > {
|
|
2349
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2350
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2351
|
+
const body: InlineResponse200 = ObjectSerializer.deserialize(
|
|
2352
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2353
|
+
"InlineResponse200", ""
|
|
2354
|
+
) as InlineResponse200;
|
|
2355
|
+
return body;
|
|
1429
2356
|
}
|
|
1430
2357
|
|
|
1431
2358
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
1432
2359
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
1433
|
-
const body:
|
|
2360
|
+
const body: InlineResponse200 = ObjectSerializer.deserialize(
|
|
1434
2361
|
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
1435
|
-
"
|
|
1436
|
-
) as
|
|
2362
|
+
"InlineResponse200", ""
|
|
2363
|
+
) as InlineResponse200;
|
|
1437
2364
|
return body;
|
|
1438
2365
|
}
|
|
1439
2366
|
|
|
@@ -1526,6 +2453,56 @@ export class DefaultApiResponseProcessor {
|
|
|
1526
2453
|
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
1527
2454
|
}
|
|
1528
2455
|
|
|
2456
|
+
/**
|
|
2457
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2458
|
+
* to the expected objects
|
|
2459
|
+
*
|
|
2460
|
+
* @params response Response returned by the server for a request to deleteSubscription
|
|
2461
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2462
|
+
*/
|
|
2463
|
+
public async deleteSubscription(response: ResponseContext): Promise<void > {
|
|
2464
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2465
|
+
if (isCodeInRange("202", response.httpStatusCode)) {
|
|
2466
|
+
return;
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2470
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
2471
|
+
const body: void = ObjectSerializer.deserialize(
|
|
2472
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2473
|
+
"void", ""
|
|
2474
|
+
) as void;
|
|
2475
|
+
return body;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
/**
|
|
2482
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2483
|
+
* to the expected objects
|
|
2484
|
+
*
|
|
2485
|
+
* @params response Response returned by the server for a request to deleteUser
|
|
2486
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2487
|
+
*/
|
|
2488
|
+
public async deleteUser(response: ResponseContext): Promise<void > {
|
|
2489
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2490
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2491
|
+
return;
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2495
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
2496
|
+
const body: void = ObjectSerializer.deserialize(
|
|
2497
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2498
|
+
"void", ""
|
|
2499
|
+
) as void;
|
|
2500
|
+
return body;
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2504
|
+
}
|
|
2505
|
+
|
|
1529
2506
|
/**
|
|
1530
2507
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
1531
2508
|
* to the expected objects
|
|
@@ -1594,6 +2571,93 @@ export class DefaultApiResponseProcessor {
|
|
|
1594
2571
|
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
1595
2572
|
}
|
|
1596
2573
|
|
|
2574
|
+
/**
|
|
2575
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2576
|
+
* to the expected objects
|
|
2577
|
+
*
|
|
2578
|
+
* @params response Response returned by the server for a request to fetchAliases
|
|
2579
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2580
|
+
*/
|
|
2581
|
+
public async fetchAliases(response: ResponseContext): Promise<UserIdentityResponse > {
|
|
2582
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2583
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2584
|
+
const body: UserIdentityResponse = ObjectSerializer.deserialize(
|
|
2585
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2586
|
+
"UserIdentityResponse", ""
|
|
2587
|
+
) as UserIdentityResponse;
|
|
2588
|
+
return body;
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2592
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
2593
|
+
const body: UserIdentityResponse = ObjectSerializer.deserialize(
|
|
2594
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2595
|
+
"UserIdentityResponse", ""
|
|
2596
|
+
) as UserIdentityResponse;
|
|
2597
|
+
return body;
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2603
|
+
/**
|
|
2604
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2605
|
+
* to the expected objects
|
|
2606
|
+
*
|
|
2607
|
+
* @params response Response returned by the server for a request to fetchUser
|
|
2608
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2609
|
+
*/
|
|
2610
|
+
public async fetchUser(response: ResponseContext): Promise<User > {
|
|
2611
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2612
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2613
|
+
const body: User = ObjectSerializer.deserialize(
|
|
2614
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2615
|
+
"User", ""
|
|
2616
|
+
) as User;
|
|
2617
|
+
return body;
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2621
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
2622
|
+
const body: User = ObjectSerializer.deserialize(
|
|
2623
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2624
|
+
"User", ""
|
|
2625
|
+
) as User;
|
|
2626
|
+
return body;
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
/**
|
|
2633
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2634
|
+
* to the expected objects
|
|
2635
|
+
*
|
|
2636
|
+
* @params response Response returned by the server for a request to fetchUserIdentity
|
|
2637
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2638
|
+
*/
|
|
2639
|
+
public async fetchUserIdentity(response: ResponseContext): Promise<InlineResponse200 > {
|
|
2640
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2641
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2642
|
+
const body: InlineResponse200 = ObjectSerializer.deserialize(
|
|
2643
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2644
|
+
"InlineResponse200", ""
|
|
2645
|
+
) as InlineResponse200;
|
|
2646
|
+
return body;
|
|
2647
|
+
}
|
|
2648
|
+
|
|
2649
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2650
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
2651
|
+
const body: InlineResponse200 = ObjectSerializer.deserialize(
|
|
2652
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2653
|
+
"InlineResponse200", ""
|
|
2654
|
+
) as InlineResponse200;
|
|
2655
|
+
return body;
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2658
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2659
|
+
}
|
|
2660
|
+
|
|
1597
2661
|
/**
|
|
1598
2662
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
1599
2663
|
* to the expected objects
|
|
@@ -1666,6 +2730,35 @@ export class DefaultApiResponseProcessor {
|
|
|
1666
2730
|
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
1667
2731
|
}
|
|
1668
2732
|
|
|
2733
|
+
/**
|
|
2734
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2735
|
+
* to the expected objects
|
|
2736
|
+
*
|
|
2737
|
+
* @params response Response returned by the server for a request to getEligibleIams
|
|
2738
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2739
|
+
*/
|
|
2740
|
+
public async getEligibleIams(response: ResponseContext): Promise<InlineResponse2003 > {
|
|
2741
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2742
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2743
|
+
const body: InlineResponse2003 = ObjectSerializer.deserialize(
|
|
2744
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2745
|
+
"InlineResponse2003", ""
|
|
2746
|
+
) as InlineResponse2003;
|
|
2747
|
+
return body;
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2751
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
2752
|
+
const body: InlineResponse2003 = ObjectSerializer.deserialize(
|
|
2753
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2754
|
+
"InlineResponse2003", ""
|
|
2755
|
+
) as InlineResponse2003;
|
|
2756
|
+
return body;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2760
|
+
}
|
|
2761
|
+
|
|
1669
2762
|
/**
|
|
1670
2763
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
1671
2764
|
* to the expected objects
|
|
@@ -1882,6 +2975,107 @@ export class DefaultApiResponseProcessor {
|
|
|
1882
2975
|
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
1883
2976
|
}
|
|
1884
2977
|
|
|
2978
|
+
/**
|
|
2979
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
2980
|
+
* to the expected objects
|
|
2981
|
+
*
|
|
2982
|
+
* @params response Response returned by the server for a request to identifyUserByAlias
|
|
2983
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
2984
|
+
*/
|
|
2985
|
+
public async identifyUserByAlias(response: ResponseContext): Promise<InlineResponse200 > {
|
|
2986
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2987
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
2988
|
+
const body: InlineResponse200 = ObjectSerializer.deserialize(
|
|
2989
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2990
|
+
"InlineResponse200", ""
|
|
2991
|
+
) as InlineResponse200;
|
|
2992
|
+
return body;
|
|
2993
|
+
}
|
|
2994
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
2995
|
+
const body: IdentifyUserConflictResponse = ObjectSerializer.deserialize(
|
|
2996
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2997
|
+
"IdentifyUserConflictResponse", ""
|
|
2998
|
+
) as IdentifyUserConflictResponse;
|
|
2999
|
+
throw new ApiException<IdentifyUserConflictResponse>(409, "Conflict", body, response.headers);
|
|
3000
|
+
}
|
|
3001
|
+
|
|
3002
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3003
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
3004
|
+
const body: InlineResponse200 = ObjectSerializer.deserialize(
|
|
3005
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3006
|
+
"InlineResponse200", ""
|
|
3007
|
+
) as InlineResponse200;
|
|
3008
|
+
return body;
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
3012
|
+
}
|
|
3013
|
+
|
|
3014
|
+
/**
|
|
3015
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
3016
|
+
* to the expected objects
|
|
3017
|
+
*
|
|
3018
|
+
* @params response Response returned by the server for a request to identifyUserBySubscriptionId
|
|
3019
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
3020
|
+
*/
|
|
3021
|
+
public async identifyUserBySubscriptionId(response: ResponseContext): Promise<UserIdentityResponse > {
|
|
3022
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3023
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
3024
|
+
const body: UserIdentityResponse = ObjectSerializer.deserialize(
|
|
3025
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3026
|
+
"UserIdentityResponse", ""
|
|
3027
|
+
) as UserIdentityResponse;
|
|
3028
|
+
return body;
|
|
3029
|
+
}
|
|
3030
|
+
if (isCodeInRange("409", response.httpStatusCode)) {
|
|
3031
|
+
const body: IdentifyUserConflictResponse = ObjectSerializer.deserialize(
|
|
3032
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3033
|
+
"IdentifyUserConflictResponse", ""
|
|
3034
|
+
) as IdentifyUserConflictResponse;
|
|
3035
|
+
throw new ApiException<IdentifyUserConflictResponse>(409, "Conflict", body, response.headers);
|
|
3036
|
+
}
|
|
3037
|
+
|
|
3038
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3039
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
3040
|
+
const body: UserIdentityResponse = ObjectSerializer.deserialize(
|
|
3041
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3042
|
+
"UserIdentityResponse", ""
|
|
3043
|
+
) as UserIdentityResponse;
|
|
3044
|
+
return body;
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
3048
|
+
}
|
|
3049
|
+
|
|
3050
|
+
/**
|
|
3051
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
3052
|
+
* to the expected objects
|
|
3053
|
+
*
|
|
3054
|
+
* @params response Response returned by the server for a request to transferSubscription
|
|
3055
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
3056
|
+
*/
|
|
3057
|
+
public async transferSubscription(response: ResponseContext): Promise<UserIdentityResponse > {
|
|
3058
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3059
|
+
if (isCodeInRange("200", response.httpStatusCode)) {
|
|
3060
|
+
const body: UserIdentityResponse = ObjectSerializer.deserialize(
|
|
3061
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3062
|
+
"UserIdentityResponse", ""
|
|
3063
|
+
) as UserIdentityResponse;
|
|
3064
|
+
return body;
|
|
3065
|
+
}
|
|
3066
|
+
|
|
3067
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3068
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
3069
|
+
const body: UserIdentityResponse = ObjectSerializer.deserialize(
|
|
3070
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3071
|
+
"UserIdentityResponse", ""
|
|
3072
|
+
) as UserIdentityResponse;
|
|
3073
|
+
return body;
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
3077
|
+
}
|
|
3078
|
+
|
|
1885
3079
|
/**
|
|
1886
3080
|
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
1887
3081
|
* to the expected objects
|
|
@@ -2006,13 +3200,6 @@ export class DefaultApiResponseProcessor {
|
|
|
2006
3200
|
) as UpdatePlayerTagsSuccessResponse;
|
|
2007
3201
|
return body;
|
|
2008
3202
|
}
|
|
2009
|
-
if (isCodeInRange("400", response.httpStatusCode)) {
|
|
2010
|
-
const body: BadRequestError = ObjectSerializer.deserialize(
|
|
2011
|
-
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
2012
|
-
"BadRequestError", ""
|
|
2013
|
-
) as BadRequestError;
|
|
2014
|
-
throw new ApiException<BadRequestError>(400, "Bad Request", body, response.headers);
|
|
2015
|
-
}
|
|
2016
3203
|
|
|
2017
3204
|
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
2018
3205
|
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
@@ -2026,4 +3213,58 @@ export class DefaultApiResponseProcessor {
|
|
|
2026
3213
|
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
2027
3214
|
}
|
|
2028
3215
|
|
|
3216
|
+
/**
|
|
3217
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
3218
|
+
* to the expected objects
|
|
3219
|
+
*
|
|
3220
|
+
* @params response Response returned by the server for a request to updateSubscription
|
|
3221
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
3222
|
+
*/
|
|
3223
|
+
public async updateSubscription(response: ResponseContext): Promise<void > {
|
|
3224
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3225
|
+
if (isCodeInRange("202", response.httpStatusCode)) {
|
|
3226
|
+
return;
|
|
3227
|
+
}
|
|
3228
|
+
|
|
3229
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3230
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
3231
|
+
const body: void = ObjectSerializer.deserialize(
|
|
3232
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3233
|
+
"void", ""
|
|
3234
|
+
) as void;
|
|
3235
|
+
return body;
|
|
3236
|
+
}
|
|
3237
|
+
|
|
3238
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
3239
|
+
}
|
|
3240
|
+
|
|
3241
|
+
/**
|
|
3242
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
3243
|
+
* to the expected objects
|
|
3244
|
+
*
|
|
3245
|
+
* @params response Response returned by the server for a request to updateUser
|
|
3246
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
3247
|
+
*/
|
|
3248
|
+
public async updateUser(response: ResponseContext): Promise<InlineResponse202 > {
|
|
3249
|
+
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3250
|
+
if (isCodeInRange("202", response.httpStatusCode)) {
|
|
3251
|
+
const body: InlineResponse202 = ObjectSerializer.deserialize(
|
|
3252
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3253
|
+
"InlineResponse202", ""
|
|
3254
|
+
) as InlineResponse202;
|
|
3255
|
+
return body;
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3258
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
3259
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
3260
|
+
const body: InlineResponse202 = ObjectSerializer.deserialize(
|
|
3261
|
+
ObjectSerializer.parse(await response.body.text(), contentType),
|
|
3262
|
+
"InlineResponse202", ""
|
|
3263
|
+
) as InlineResponse202;
|
|
3264
|
+
return body;
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
throw new ApiException<string | Buffer | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
|
|
3268
|
+
}
|
|
3269
|
+
|
|
2029
3270
|
}
|