Socket
Socket
Sign inDemoInstall

@twurple/api

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twurple/api - npm Package Compare versions

Comparing version 7.0.3 to 7.0.4

6

lib/client/ApiClient.js

@@ -35,3 +35,3 @@ "use strict";

getPartitionKey: req => { var _a; return (_a = req.userId) !== null && _a !== void 0 ? _a : null; },
createChild: () => new HelixRateLimiter_1.HelixRateLimiter({ logger: rateLimitLoggerOptions })
createChild: () => new HelixRateLimiter_1.HelixRateLimiter({ logger: rateLimitLoggerOptions }),
})

@@ -42,4 +42,4 @@ : new rate_limiter_1.PartitionedTimeBasedRateLimiter({

timeFrame: 64000,
doRequest: async ({ options, clientId, accessToken, authorizationType, fetchOptions }) => await (0, api_call_1.callTwitchApiRaw)(options, clientId, accessToken, authorizationType, fetchOptions),
getPartitionKey: req => { var _a; return (_a = req.userId) !== null && _a !== void 0 ? _a : null; }
doRequest: async ({ options, clientId, accessToken, authorizationType, fetchOptions, }) => await (0, api_call_1.callTwitchApiRaw)(options, clientId, accessToken, authorizationType, fetchOptions),
getPartitionKey: req => { var _a; return (_a = req.userId) !== null && _a !== void 0 ? _a : null; },
}));

@@ -46,0 +46,0 @@ }

import { type Response } from '@d-fischer/cross-fetch';
import type { Logger } from '@d-fischer/logger';
import type { RateLimiter, RateLimiterStats } from '@d-fischer/rate-limiter';
import { type RateLimiter, type RateLimiterStats } from '@d-fischer/rate-limiter';
import { EventEmitter } from '@d-fischer/typed-event-emitter';
import type { AuthProvider } from '@twurple/auth';
import { TokenInfo } from '@twurple/auth';
import { type AuthProvider, TokenInfo } from '@twurple/auth';
import { type UserIdResolvable } from '@twurple/common';

@@ -8,0 +7,0 @@ import { HelixBitsApi } from '../endpoints/bits/HelixBitsApi';

@@ -310,3 +310,3 @@ "use strict";

const { authProvider } = this._config;
const authorizationType = authProvider.authorizationType;
const { authorizationType } = authProvider;
let response = await this._callApiInternal(options, authProvider.clientId, accessToken.accessToken, authorizationType);

@@ -320,7 +320,5 @@ if (response.status === 401 && !wasRefreshed) {

}
else {
if (authProvider.getAppAccessToken) {
const token = await authProvider.getAppAccessToken(true);
response = await this._callApiInternal(options, authProvider.clientId, token.accessToken, authorizationType);
}
else if (authProvider.getAppAccessToken) {
const token = await authProvider.getAppAccessToken(true);
response = await this._callApiInternal(options, authProvider.clientId, token.accessToken, authorizationType);
}

@@ -344,3 +342,3 @@ }

minTimeout: 500,
factor: 2
factor: 2,
});

@@ -356,3 +354,3 @@ const { promise, resolve, reject } = (0, shared_utils_1.promiseWithResolvers)();

authorizationType,
fetchOptions
fetchOptions,
})

@@ -359,0 +357,0 @@ : await (0, api_call_1.callTwitchApiRaw)(options, clientId, accessToken, authorizationType, fetchOptions);

@@ -1,2 +0,2 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixBitsLeaderboardQuery } from '../../interfaces/endpoints/bits.input';

@@ -3,0 +3,0 @@ import { BaseApi } from '../BaseApi';

@@ -40,3 +40,3 @@ "use strict";

scopes: ['bits:read'],
query: (0, bits_external_1.createBitsLeaderboardQuery)(params)
query: (0, bits_external_1.createBitsLeaderboardQuery)(params),
});

@@ -57,3 +57,3 @@ return new HelixBitsLeaderboard_1.HelixBitsLeaderboard(result, this._client);

userId: (0, shared_utils_1.mapOptional)(broadcaster, common_1.extractUserId),
query: (0, shared_utils_1.mapOptional)(broadcaster, api_call_1.createBroadcasterQuery)
query: (0, shared_utils_1.mapOptional)(broadcaster, api_call_1.createBroadcasterQuery),
});

@@ -60,0 +60,0 @@ return new HelixCheermoteList_1.HelixCheermoteList(result.data);

@@ -27,3 +27,3 @@ "use strict";

const { background, state, scale } = format;
const tiers = this[common_1.rawDataSymbol][name].tiers;
const { tiers } = this[common_1.rawDataSymbol][name];
const correctTier = tiers.sort((a, b) => b.min_bits - a.min_bits).find(tier => tier.min_bits <= bits);

@@ -35,3 +35,3 @@ if (!correctTier) {

url: correctTier.images[background][state][scale],
color: correctTier.color
color: correctTier.color,
};

@@ -38,0 +38,0 @@ }

@@ -1,2 +0,2 @@

import type { CommercialLength, UserIdResolvable } from '@twurple/common';
import { type CommercialLength, type UserIdResolvable } from '@twurple/common';
import { type HelixChannelFollowerData, type HelixFollowedChannelData } from '../../interfaces/endpoints/channel.external';

@@ -9,3 +9,3 @@ import { type HelixChannelUpdate } from '../../interfaces/endpoints/channel.input';

import { type HelixPaginatedResult, type HelixPaginatedResultWithTotal } from '../../utils/pagination/HelixPaginatedResult';
import type { HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { type HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -12,0 +12,0 @@ import { HelixChannel } from './HelixChannel';

@@ -40,3 +40,3 @@ "use strict";

this._getChannelByIdBatcher = new HelixRequestBatcher_1.HelixRequestBatcher({
url: 'channels'
url: 'channels',
}, 'broadcaster_id', 'broadcaster_id', this._client, (data) => new HelixChannel_1.HelixChannel(data, this._client));

@@ -55,3 +55,3 @@ }

userId,
query: (0, api_call_1.createBroadcasterQuery)(userId)
query: (0, api_call_1.createBroadcasterQuery)(userId),
});

@@ -78,3 +78,3 @@ return (0, shared_utils_1.mapNullable)(result.data[0], data => new HelixChannel_1.HelixChannel(data, this._client));

url: 'channels',
query: (0, generic_external_1.createSingleKeyQuery)('broadcaster_id', userIds)
query: (0, generic_external_1.createSingleKeyQuery)('broadcaster_id', userIds),
});

@@ -97,3 +97,3 @@ return result.data.map(data => new HelixChannel_1.HelixChannel(data, this._client));

query: (0, api_call_1.createBroadcasterQuery)(user),
jsonBody: (0, channel_external_1.createChannelUpdateBody)(data)
jsonBody: (0, channel_external_1.createChannelUpdateBody)(data),
});

@@ -114,3 +114,3 @@ }

scopes: ['channel:edit:commercial'],
jsonBody: (0, channel_external_1.createChannelCommercialBody)(broadcaster, length)
jsonBody: (0, channel_external_1.createChannelCommercialBody)(broadcaster, length),
});

@@ -129,3 +129,3 @@ }

scopes: ['channel:read:editors'],
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
});

@@ -150,4 +150,4 @@ return result.data.map(data => new HelixChannelEditor_1.HelixChannelEditor(data, this._client));

...(0, api_call_1.createBroadcasterQuery)(broadcaster),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -166,3 +166,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(response, HelixUserRelation_1.HelixUserRelation, this._client);

scopes: ['channel:read:vips', 'channel:manage:vips'],
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
}, this._client, data => new HelixUserRelation_1.HelixUserRelation(data, this._client));

@@ -182,3 +182,3 @@ }

scopes: ['channel:read:vips', 'channel:manage:vips'],
query: (0, generic_external_1.createChannelUsersCheckQuery)(broadcaster, users)
query: (0, generic_external_1.createChannelUsersCheckQuery)(broadcaster, users),
});

@@ -211,3 +211,3 @@ return response.data.map(data => new HelixUserRelation_1.HelixUserRelation(data, this._client));

scopes: ['channel:manage:vips'],
query: (0, channel_external_1.createChannelVipUpdateQuery)(broadcaster, user)
query: (0, channel_external_1.createChannelVipUpdateQuery)(broadcaster, user),
});

@@ -228,3 +228,3 @@ }

scopes: ['channel:manage:vips'],
query: (0, channel_external_1.createChannelVipUpdateQuery)(broadcaster, user)
query: (0, channel_external_1.createChannelVipUpdateQuery)(broadcaster, user),
});

@@ -245,4 +245,4 @@ }

...(0, channel_external_1.createChannelFollowerQuery)(broadcaster),
...(0, HelixPagination_1.createPaginationQuery)({ limit: 1 })
}
...(0, HelixPagination_1.createPaginationQuery)({ limit: 1 }),
},
});

@@ -277,4 +277,4 @@ return result.total;

...(0, channel_external_1.createChannelFollowerQuery)(broadcaster, user),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -301,3 +301,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResultWithTotal)(result, HelixChannelFollower_1.HelixChannelFollower, this._client);

scopes: ['moderator:read:followers'],
query: (0, channel_external_1.createChannelFollowerQuery)(broadcaster)
query: (0, channel_external_1.createChannelFollowerQuery)(broadcaster),
}, this._client, data => new HelixChannelFollower_1.HelixChannelFollower(data, this._client));

@@ -326,4 +326,4 @@ }

...(0, channel_external_1.createFollowedChannelQuery)(user, broadcaster),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -348,3 +348,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResultWithTotal)(result, HelixFollowedChannel_1.HelixFollowedChannel, this._client);

scopes: ['user:read:follows'],
query: (0, channel_external_1.createFollowedChannelQuery)(user, broadcaster)
query: (0, channel_external_1.createFollowedChannelQuery)(user, broadcaster),
}, this._client, data => new HelixFollowedChannel_1.HelixFollowedChannel(data, this._client));

@@ -351,0 +351,0 @@ }

@@ -1,6 +0,6 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixCustomRewardRedemptionData, type HelixCustomRewardRedemptionStatus, type HelixCustomRewardRedemptionTargetStatus } from '../../interfaces/endpoints/channelPoints.external';
import { type HelixCreateCustomRewardData, type HelixCustomRewardRedemptionFilter, type HelixPaginatedCustomRewardRedemptionFilter, type HelixUpdateCustomRewardData } from '../../interfaces/endpoints/channelPoints.input';
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { BaseApi } from '../BaseApi';

@@ -7,0 +7,0 @@ import { HelixCustomReward } from './HelixCustomReward';

@@ -42,3 +42,3 @@ "use strict";

scopes: ['channel:read:redemptions', 'channel:manage:redemptions'],
query: (0, channelPoints_external_1.createCustomRewardsQuery)(broadcaster, onlyManageable)
query: (0, channelPoints_external_1.createCustomRewardsQuery)(broadcaster, onlyManageable),
});

@@ -62,3 +62,3 @@ return result.data.map(data => new HelixCustomReward_1.HelixCustomReward(data, this._client));

scopes: ['channel:read:redemptions', 'channel:manage:redemptions'],
query: (0, generic_external_1.createGetByIdsQuery)(broadcaster, rewardIds)
query: (0, generic_external_1.createGetByIdsQuery)(broadcaster, rewardIds),
});

@@ -93,3 +93,3 @@ return result.data.map(data => new HelixCustomReward_1.HelixCustomReward(data, this._client));

query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
jsonBody: (0, channelPoints_external_1.createCustomRewardBody)(data)
jsonBody: (0, channelPoints_external_1.createCustomRewardBody)(data),
});

@@ -113,3 +113,3 @@ return new HelixCustomReward_1.HelixCustomReward(result.data[0], this._client);

query: (0, channelPoints_external_1.createCustomRewardChangeQuery)(broadcaster, rewardId),
jsonBody: (0, channelPoints_external_1.createCustomRewardBody)(data)
jsonBody: (0, channelPoints_external_1.createCustomRewardBody)(data),
});

@@ -131,3 +131,3 @@ return new HelixCustomReward_1.HelixCustomReward(result.data[0], this._client);

scopes: ['channel:manage:redemptions'],
query: (0, channelPoints_external_1.createCustomRewardChangeQuery)(broadcaster, rewardId)
query: (0, channelPoints_external_1.createCustomRewardChangeQuery)(broadcaster, rewardId),
});

@@ -151,3 +151,3 @@ }

scopes: ['channel:read:redemptions', 'channel:manage:redemptions'],
query: (0, channelPoints_external_1.createRewardRedemptionsByIdsQuery)(broadcaster, rewardId, redemptionIds)
query: (0, channelPoints_external_1.createRewardRedemptionsByIdsQuery)(broadcaster, rewardId, redemptionIds),
});

@@ -185,4 +185,4 @@ return result.data.map(data => new HelixCustomRewardRedemption_1.HelixCustomRewardRedemption(data, this._client));

...(0, channelPoints_external_1.createRedemptionsForBroadcasterQuery)(broadcaster, rewardId, status, filter),
...(0, HelixPagination_1.createPaginationQuery)(filter)
}
...(0, HelixPagination_1.createPaginationQuery)(filter),
},
});

@@ -206,3 +206,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixCustomRewardRedemption_1.HelixCustomRewardRedemption, this._client);

scopes: ['channel:read:redemptions', 'channel:manage:redemptions'],
query: (0, channelPoints_external_1.createRedemptionsForBroadcasterQuery)(broadcaster, rewardId, status, filter)
query: (0, channelPoints_external_1.createRedemptionsForBroadcasterQuery)(broadcaster, rewardId, status, filter),
}, this._client, data => new HelixCustomRewardRedemption_1.HelixCustomRewardRedemption(data, this._client), 50);

@@ -230,4 +230,4 @@ }

jsonBody: {
status
}
status,
},
});

@@ -234,0 +234,0 @@ return result.data.map(data => new HelixCustomRewardRedemption_1.HelixCustomRewardRedemption(data, this._client));

@@ -1,4 +0,4 @@

import type { UserIdResolvable } from '@twurple/common';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import type { HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -5,0 +5,0 @@ import { HelixCharityCampaign } from './HelixCharityCampaign';

@@ -40,3 +40,3 @@ "use strict";

scopes: ['channel:read:charity'],
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
});

@@ -61,4 +61,4 @@ return new HelixCharityCampaign_1.HelixCharityCampaign(response.data[0], this._client);

...(0, api_call_1.createBroadcasterQuery)(broadcaster),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -65,0 +65,0 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(response, HelixCharityCampaignDonation_1.HelixCharityCampaignDonation, this._client);

@@ -1,2 +0,2 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixChatChatterData, type HelixChatUserColor } from '../../interfaces/endpoints/chat.external';

@@ -3,0 +3,0 @@ import { type HelixSendChatAnnouncementParams, type HelixUpdateChatSettingsParams } from '../../interfaces/endpoints/chat.input';

@@ -57,4 +57,4 @@ "use strict";

...this._createModeratorActionQuery(broadcasterId),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -81,3 +81,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResultWithTotal)(result, HelixChatChatter_1.HelixChatChatter, this._client);

scopes: ['moderator:read:chatters'],
query: this._createModeratorActionQuery(broadcasterId)
query: this._createModeratorActionQuery(broadcasterId),
}, this._client, data => new HelixChatChatter_1.HelixChatChatter(data, this._client));

@@ -91,3 +91,3 @@ }

type: 'helix',
url: 'chat/badges/global'
url: 'chat/badges/global',
});

@@ -106,3 +106,3 @@ return result.data.map(data => new HelixChatBadgeSet_1.HelixChatBadgeSet(data));

userId: (0, common_1.extractUserId)(broadcaster),
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
});

@@ -117,3 +117,3 @@ return result.data.map(data => new HelixChatBadgeSet_1.HelixChatBadgeSet(data));

type: 'helix',
url: 'chat/emotes/global'
url: 'chat/emotes/global',
});

@@ -132,3 +132,3 @@ return result.data.map(data => new HelixEmote_1.HelixEmote(data));

userId: (0, common_1.extractUserId)(broadcaster),
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
});

@@ -146,3 +146,3 @@ return result.data.map(data => new HelixChannelEmote_1.HelixChannelEmote(data, this._client));

url: 'chat/emotes/set',
query: (0, generic_external_1.createSingleKeyQuery)('emote_set_id', setIds)
query: (0, generic_external_1.createSingleKeyQuery)('emote_set_id', setIds),
});

@@ -161,3 +161,3 @@ return result.data.map(data => new HelixEmoteFromSet_1.HelixEmoteFromSet(data, this._client));

userId: (0, common_1.extractUserId)(broadcaster),
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
});

@@ -183,3 +183,3 @@ return new HelixChatSettings_1.HelixChatSettings(result.data[0]);

scopes: ['moderator:read:chat_settings'],
query: this._createModeratorActionQuery(broadcasterId)
query: this._createModeratorActionQuery(broadcasterId),
});

@@ -210,3 +210,3 @@ return new HelixPrivilegedChatSettings_1.HelixPrivilegedChatSettings(result.data[0]);

query: this._createModeratorActionQuery(broadcasterId),
jsonBody: (0, chat_external_1.createChatSettingsUpdateBody)(settings)
jsonBody: (0, chat_external_1.createChatSettingsUpdateBody)(settings),
});

@@ -237,4 +237,4 @@ return new HelixPrivilegedChatSettings_1.HelixPrivilegedChatSettings(result.data[0]);

message: announcement.message,
color: announcement.color
}
color: announcement.color,
},
});

@@ -255,3 +255,3 @@ }

url: 'chat/color',
query: (0, generic_external_1.createSingleKeyQuery)('user_id', users.map(common_1.extractUserId))
query: (0, generic_external_1.createSingleKeyQuery)('user_id', users.map(common_1.extractUserId)),
});

@@ -272,3 +272,3 @@ return new Map(response.data.map(data => [data.user_id, data.color || null]));

userId: (0, common_1.extractUserId)(user),
query: (0, generic_external_1.createSingleKeyQuery)('user_id', (0, common_1.extractUserId)(user))
query: (0, generic_external_1.createSingleKeyQuery)('user_id', (0, common_1.extractUserId)(user)),
});

@@ -295,3 +295,3 @@ if (!response.data.length) {

scopes: ['user:manage:chat_color'],
query: (0, chat_external_1.createChatColorUpdateQuery)(user, color)
query: (0, chat_external_1.createChatColorUpdateQuery)(user, color),
});

@@ -319,3 +319,3 @@ }

scopes: ['moderator:manage:shoutouts'],
query: (0, chat_external_1.createShoutoutQuery)(from, to, this._getUserContextIdWithDefault(fromId))
query: (0, chat_external_1.createShoutoutQuery)(from, to, this._getUserContextIdWithDefault(fromId)),
});

@@ -322,0 +322,0 @@ }

@@ -1,6 +0,6 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixClipData } from '../../interfaces/endpoints/clip.external';
import { type HelixClipCreateParams, type HelixClipFilter, type HelixPaginatedClipFilter } from '../../interfaces/endpoints/clip.input';
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { BaseApi } from '../BaseApi';

@@ -7,0 +7,0 @@ import { HelixClip } from './HelixClip';

@@ -33,3 +33,3 @@ "use strict";

this._getClipByIdBatcher = new HelixRequestBatcher_1.HelixRequestBatcher({
url: 'clips'
url: 'clips',
}, 'id', 'id', this._client, (data) => new HelixClip_1.HelixClip(data, this._client));

@@ -50,3 +50,3 @@ }

ids: (0, common_1.extractUserId)(broadcaster),
userId: (0, common_1.extractUserId)(broadcaster)
userId: (0, common_1.extractUserId)(broadcaster),
});

@@ -67,3 +67,3 @@ }

ids: (0, common_1.extractUserId)(broadcaster),
userId: (0, common_1.extractUserId)(broadcaster)
userId: (0, common_1.extractUserId)(broadcaster),
});

@@ -83,3 +83,3 @@ }

filterType: 'game_id',
ids: gameId
ids: gameId,
});

@@ -99,3 +99,3 @@ }

filterType: 'game_id',
ids: gameId
ids: gameId,
});

@@ -111,3 +111,3 @@ }

filterType: 'id',
ids
ids,
});

@@ -150,3 +150,3 @@ return result.data;

canOverrideScopedUserContext: true,
query: (0, clip_external_1.createClipCreateQuery)(channel, createAfterDelay)
query: (0, clip_external_1.createClipCreateQuery)(channel, createAfterDelay),
});

@@ -165,4 +165,4 @@ return result.data[0].id;

...(0, clip_external_1.createClipQuery)(params),
...(0, HelixPagination_1.createPaginationQuery)(params)
}
...(0, HelixPagination_1.createPaginationQuery)(params),
},
});

@@ -175,3 +175,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixClip_1.HelixClip, this._client);

userId: params.userId,
query: (0, clip_external_1.createClipQuery)(params)
query: (0, clip_external_1.createClipQuery)(params),
}, this._client, data => new HelixClip_1.HelixClip(data, this._client));

@@ -178,0 +178,0 @@ }

@@ -32,4 +32,4 @@ "use strict";

query: {
locale
}
locale,
},
});

@@ -36,0 +36,0 @@ return result.data.map(data => new HelixContentClassificationLabel_1.HelixContentClassificationLabel(data));

@@ -32,3 +32,3 @@ "use strict";

/** @internal */ this._getDropsEntitlementByIdBatcher = new HelixRequestBatcher_1.HelixRequestBatcher({
url: 'entitlements/drops'
url: 'entitlements/drops',
}, 'id', 'id', this._client, (data) => new HelixDropsEntitlement_1.HelixDropsEntitlement(data, this._client));

@@ -52,4 +52,4 @@ }

...(0, entitlement_external_1.createDropsEntitlementQuery)(filter, alwaysApp),
...(0, HelixPagination_1.createPaginationQuery)(filter)
}
...(0, HelixPagination_1.createPaginationQuery)(filter),
},
});

@@ -71,3 +71,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(response, HelixDropsEntitlement_1.HelixDropsEntitlement, this._client);

forceType: filter.user && alwaysApp ? 'app' : undefined,
query: (0, entitlement_external_1.createDropsEntitlementQuery)(filter, alwaysApp)
query: (0, entitlement_external_1.createDropsEntitlementQuery)(filter, alwaysApp),
}, this._client, data => new HelixDropsEntitlement_1.HelixDropsEntitlement(data, this._client));

@@ -85,4 +85,4 @@ }

query: {
id: ids
}
id: ids,
},
});

@@ -122,3 +122,3 @@ return response.data.map(data => new HelixDropsEntitlement_1.HelixDropsEntitlement(data, this._client));

method: 'PATCH',
jsonBody: (0, entitlement_external_1.createDropsEntitlementUpdateBody)(ids, fulfillmentStatus)
jsonBody: (0, entitlement_external_1.createDropsEntitlementUpdateBody)(ids, fulfillmentStatus),
});

@@ -125,0 +125,0 @@ return new Map(response.data.flatMap(entry => entry.ids.map(id => [id, entry.status])));

@@ -1,5 +0,5 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixEventSubSubscriptionStatus } from '../../interfaces/endpoints/eventSub.external';
import { type HelixEventSubDropEntitlementGrantFilter, type HelixEventSubTransportOptions, type HelixPaginatedEventSubSubscriptionsResult } from '../../interfaces/endpoints/eventSub.input';
import type { HelixPagination } from '../../utils/pagination/HelixPagination';
import { type HelixPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -6,0 +6,0 @@ import { HelixEventSubSubscription } from './HelixEventSubSubscription';

@@ -47,3 +47,3 @@ "use strict";

url: 'eventsub/subscriptions',
query: (0, HelixPagination_1.createPaginationQuery)(pagination)
query: (0, HelixPagination_1.createPaginationQuery)(pagination),
});

@@ -53,3 +53,3 @@ return {

totalCost: result.total_cost,
maxTotalCost: result.max_total_cost
maxTotalCost: result.max_total_cost,
};

@@ -77,4 +77,4 @@ }

...(0, HelixPagination_1.createPaginationQuery)(pagination),
status
}
status,
},
});

@@ -84,3 +84,3 @@ return {

totalCost: result.total_cost,
maxTotalCost: result.max_total_cost
maxTotalCost: result.max_total_cost,
};

@@ -110,4 +110,4 @@ }

...(0, HelixPagination_1.createPaginationQuery)(pagination),
type
}
type,
},
});

@@ -117,3 +117,3 @@ return {

totalCost: result.total_cost,
maxTotalCost: result.max_total_cost
maxTotalCost: result.max_total_cost,
};

@@ -144,4 +144,4 @@ }

...(0, generic_external_1.createSingleKeyQuery)('user_id', (0, common_1.extractUserId)(user)),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -151,3 +151,3 @@ return {

totalCost: result.total_cost,
maxTotalCost: result.max_total_cost
maxTotalCost: result.max_total_cost,
};

@@ -189,3 +189,3 @@ }

condition,
transport
transport,
};

@@ -202,3 +202,3 @@ if (isBatched) {

forceType: usesAppAuth ? 'app' : 'user',
jsonBody
jsonBody,
});

@@ -218,4 +218,4 @@ return new HelixEventSubSubscription_1.HelixEventSubSubscription(result.data[0], this._client);

query: {
id
}
id,
},
});

@@ -222,0 +222,0 @@ }

@@ -20,3 +20,3 @@ "use strict";

userId,
query
query,
}, client, data => new HelixEventSubSubscription_1.HelixEventSubSubscription(data, client));

@@ -23,0 +23,0 @@ }

@@ -6,4 +6,4 @@ import { HelixExtension } from '@twurple/common';

import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import type { HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -10,0 +10,0 @@ import { HelixChannelReference } from '../channel/HelixChannelReference';

@@ -40,3 +40,3 @@ "use strict";

url: 'extensions/released',
query: (0, extensions_external_1.createReleasedExtensionFilter)(extensionId, version)
query: (0, extensions_external_1.createReleasedExtensionFilter)(extensionId, version),
});

@@ -59,4 +59,4 @@ return new common_1.HelixExtension(result.data[0]);

...(0, generic_external_1.createSingleKeyQuery)('extension_id', extensionId),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -73,3 +73,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixChannelReference_1.HelixChannelReference, this._client);

url: 'extensions/live',
query: (0, generic_external_1.createSingleKeyQuery)('extension_id', extensionId)
query: (0, generic_external_1.createSingleKeyQuery)('extension_id', extensionId),
}, this._client, data => new HelixChannelReference_1.HelixChannelReference(data, this._client));

@@ -90,3 +90,3 @@ }

forceType: 'app',
query: (0, generic_external_1.createSingleKeyQuery)('should_include_all', includeDisabled === null || includeDisabled === void 0 ? void 0 : includeDisabled.toString())
query: (0, generic_external_1.createSingleKeyQuery)('should_include_all', includeDisabled === null || includeDisabled === void 0 ? void 0 : includeDisabled.toString()),
});

@@ -111,3 +111,3 @@ return result.data.map(data => new HelixExtensionBitsProduct_1.HelixExtensionBitsProduct(data));

forceType: 'app',
jsonBody: (0, extensions_external_1.createExtensionProductBody)(data)
jsonBody: (0, extensions_external_1.createExtensionProductBody)(data),
});

@@ -129,4 +129,4 @@ return new HelixExtensionBitsProduct_1.HelixExtensionBitsProduct(result.data[0]);

...(0, extensions_external_1.createExtensionTransactionQuery)(extensionId, filter),
...(0, HelixPagination_1.createPaginationQuery)(filter)
}
...(0, HelixPagination_1.createPaginationQuery)(filter),
},
});

@@ -145,3 +145,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixExtensionTransaction_1.HelixExtensionTransaction, this._client);

forceType: 'app',
query: (0, extensions_external_1.createExtensionTransactionQuery)(extensionId, filter)
query: (0, extensions_external_1.createExtensionTransactionQuery)(extensionId, filter),
}, this._client, data => new HelixExtensionTransaction_1.HelixExtensionTransaction(data, this._client));

@@ -148,0 +148,0 @@ }

import { type HelixGameData } from '../../interfaces/endpoints/game.external';
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import type { HelixPagination } from '../../utils/pagination/HelixPagination';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -6,0 +6,0 @@ import { HelixGame } from './HelixGame';

@@ -32,11 +32,11 @@ "use strict";

this._getGameByIdBatcher = new HelixRequestBatcher_1.HelixRequestBatcher({
url: 'games'
url: 'games',
}, 'id', 'id', this._client, (data) => new HelixGame_1.HelixGame(data, this._client));
/** @internal */
this._getGameByNameBatcher = new HelixRequestBatcher_1.HelixRequestBatcher({
url: 'games'
url: 'games',
}, 'name', 'name', this._client, (data) => new HelixGame_1.HelixGame(data, this._client));
/** @internal */
this._getGameByIgdbIdBatcher = new HelixRequestBatcher_1.HelixRequestBatcher({
url: 'games'
url: 'games',
}, 'igdb_id', 'igdb_id', this._client, (data) => new HelixGame_1.HelixGame(data, this._client));

@@ -133,3 +133,3 @@ }

url: 'games/top',
query: (0, HelixPagination_1.createPaginationQuery)(pagination)
query: (0, HelixPagination_1.createPaginationQuery)(pagination),
});

@@ -143,3 +143,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixGame_1.HelixGame, this._client);

return new HelixPaginatedRequest_1.HelixPaginatedRequest({
url: 'games/top'
url: 'games/top',
}, this._client, data => new HelixGame_1.HelixGame(data, this._client));

@@ -156,4 +156,4 @@ }

query: {
[filterType]: filterValues
}
[filterType]: filterValues,
},
});

@@ -160,0 +160,0 @@ return result.data.map(entry => new HelixGame_1.HelixGame(entry, this._client));

@@ -1,2 +0,2 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { BaseApi } from '../BaseApi';

@@ -3,0 +3,0 @@ import { HelixGoal } from './HelixGoal';

@@ -29,3 +29,3 @@ "use strict";

scopes: ['channel:read:goals'],
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
});

@@ -32,0 +32,0 @@ return result.data.map(data => new HelixGoal_1.HelixGoal(data, this._client));

@@ -1,7 +0,7 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixEventData } from '../../interfaces/endpoints/generic.external';
import { type HelixHypeTrainEventData, type HelixHypeTrainEventType } from '../../interfaces/endpoints/hypeTrain.external';
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import type { HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -8,0 +8,0 @@ import { HelixHypeTrainEvent } from './HelixHypeTrainEvent';

@@ -42,4 +42,4 @@ "use strict";

...(0, api_call_1.createBroadcasterQuery)(broadcaster),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -58,3 +58,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixHypeTrainEvent_1.HelixHypeTrainEvent, this._client);

scopes: ['channel:read:hype_train'],
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
}, this._client, (data) => new HelixHypeTrainEvent_1.HelixHypeTrainEvent(data, this._client));

@@ -61,0 +61,0 @@ }

@@ -1,7 +0,7 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixBanData, type HelixModeratorData } from '../../interfaces/endpoints/moderation.external';
import { type HelixAutoModSettingsUpdate, type HelixBanFilter, type HelixBanUserRequest, type HelixCheckAutoModStatusData, type HelixModeratorFilter } from '../../interfaces/endpoints/moderation.input';
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import type { HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -8,0 +8,0 @@ import { HelixAutoModSettings } from './HelixAutoModSettings';

@@ -51,4 +51,4 @@ "use strict";

...(0, moderation_external_1.createModerationUserListQuery)(channel, filter),
...(0, HelixPagination_1.createPaginationQuery)(filter)
}
...(0, HelixPagination_1.createPaginationQuery)(filter),
},
});

@@ -67,5 +67,4 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixBan_1.HelixBan, this._client);

scopes: ['moderation:read'],
query: (0, api_call_1.createBroadcasterQuery)(channel)
}, this._client, data => new HelixBan_1.HelixBan(data, this._client), 50 // possibly a relatively consistent workaround for twitchdev/issues#18
);
query: (0, api_call_1.createBroadcasterQuery)(channel),
}, this._client, data => new HelixBan_1.HelixBan(data, this._client), 50);
}

@@ -99,4 +98,4 @@ /**

...(0, moderation_external_1.createModerationUserListQuery)(channel, filter),
...(0, HelixPagination_1.createPaginationQuery)(filter)
}
...(0, HelixPagination_1.createPaginationQuery)(filter),
},
});

@@ -115,3 +114,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixModerator_1.HelixModerator, this._client);

scopes: ['moderation:read', 'channel:manage:moderators'],
query: (0, api_call_1.createBroadcasterQuery)(channel)
query: (0, api_call_1.createBroadcasterQuery)(channel),
}, this._client, data => new HelixModerator_1.HelixModerator(data, this._client));

@@ -143,3 +142,3 @@ }

scopes: ['channel:manage:moderators'],
query: (0, moderation_external_1.createModeratorModifyQuery)(broadcaster, user)
query: (0, moderation_external_1.createModeratorModifyQuery)(broadcaster, user),
});

@@ -160,3 +159,3 @@ }

scopes: ['channel:manage:moderators'],
query: (0, moderation_external_1.createModeratorModifyQuery)(broadcaster, user)
query: (0, moderation_external_1.createModeratorModifyQuery)(broadcaster, user),
});

@@ -179,4 +178,4 @@ }

jsonBody: {
data
}
data,
},
});

@@ -199,3 +198,3 @@ return result.data.map(statusData => new HelixAutoModStatus_1.HelixAutoModStatus(statusData));

scopes: ['moderator:manage:automod'],
jsonBody: (0, moderation_external_1.createAutoModProcessBody)(user, msgId, allow)
jsonBody: (0, moderation_external_1.createAutoModProcessBody)(user, msgId, allow),
});

@@ -220,3 +219,3 @@ }

canOverrideScopedUserContext: true,
query: this._createModeratorActionQuery(broadcasterId)
query: this._createModeratorActionQuery(broadcasterId),
});

@@ -245,3 +244,3 @@ return result.data.map(data => new HelixAutoModSettings_1.HelixAutoModSettings(data));

query: this._createModeratorActionQuery(broadcasterId),
jsonBody: (0, moderation_external_1.createAutoModSettingsBody)(data)
jsonBody: (0, moderation_external_1.createAutoModSettingsBody)(data),
});

@@ -274,3 +273,3 @@ return result.data.map(settingsData => new HelixAutoModSettings_1.HelixAutoModSettings(settingsData));

query: this._createModeratorActionQuery(broadcasterId),
jsonBody: (0, moderation_external_1.createBanUserBody)(data)
jsonBody: (0, moderation_external_1.createBanUserBody)(data),
});

@@ -300,4 +299,4 @@ return result.data.map(banData => new HelixBanUser_1.HelixBanUser(banData, banData.end_time, this._client));

...this._createModeratorActionQuery(broadcasterId),
...(0, generic_external_1.createSingleKeyQuery)('user_id', (0, common_1.extractUserId)(user))
}
...(0, generic_external_1.createSingleKeyQuery)('user_id', (0, common_1.extractUserId)(user)),
},
});

@@ -329,4 +328,4 @@ }

...this._createModeratorActionQuery(broadcasterId),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -358,4 +357,4 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixBlockedTerm_1.HelixBlockedTerm, this._client);

jsonBody: {
text
}
text,
},
});

@@ -383,4 +382,4 @@ return result.data.map(blockedTermData => new HelixBlockedTerm_1.HelixBlockedTerm(blockedTermData));

...this._createModeratorActionQuery(broadcasterId),
id
}
id,
},
});

@@ -409,4 +408,4 @@ }

...this._createModeratorActionQuery(broadcasterId),
...(0, generic_external_1.createSingleKeyQuery)('message_id', messageId)
}
...(0, generic_external_1.createSingleKeyQuery)('message_id', messageId),
},
});

@@ -428,3 +427,3 @@ }

canOverrideScopedUserContext: true,
query: this._createModeratorActionQuery(broadcasterId)
query: this._createModeratorActionQuery(broadcasterId),
});

@@ -453,3 +452,3 @@ return new HelixShieldModeStatus_1.HelixShieldModeStatus(result.data[0], this._client);

query: this._createModeratorActionQuery(broadcasterId),
jsonBody: (0, moderation_external_1.createUpdateShieldModeStatusBody)(activate)
jsonBody: (0, moderation_external_1.createUpdateShieldModeStatusBody)(activate),
});

@@ -456,0 +455,0 @@ return new HelixShieldModeStatus_1.HelixShieldModeStatus(result.data[0], this._client);

@@ -1,7 +0,7 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixPollData } from '../../interfaces/endpoints/poll.external';
import { type HelixCreatePollData } from '../../interfaces/endpoints/poll.input';
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import type { HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -8,0 +8,0 @@ import { HelixPoll } from './HelixPoll';

@@ -45,4 +45,4 @@ "use strict";

...(0, api_call_1.createBroadcasterQuery)(broadcaster),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -61,3 +61,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixPoll_1.HelixPoll, this._client);

scopes: ['channel:read:polls'],
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
}, this._client, data => new HelixPoll_1.HelixPoll(data, this._client), 20);

@@ -80,3 +80,3 @@ }

scopes: ['channel:read:polls'],
query: (0, generic_external_1.createGetByIdsQuery)(broadcaster, ids)
query: (0, generic_external_1.createGetByIdsQuery)(broadcaster, ids),
});

@@ -110,3 +110,3 @@ return result.data.map(data => new HelixPoll_1.HelixPoll(data, this._client));

scopes: ['channel:manage:polls'],
jsonBody: (0, poll_external_1.createPollBody)(broadcaster, data)
jsonBody: (0, poll_external_1.createPollBody)(broadcaster, data),
});

@@ -129,3 +129,3 @@ return new HelixPoll_1.HelixPoll(result.data[0], this._client);

scopes: ['channel:manage:polls'],
jsonBody: (0, poll_external_1.createPollEndBody)(broadcaster, id, showResult)
jsonBody: (0, poll_external_1.createPollEndBody)(broadcaster, id, showResult),
});

@@ -132,0 +132,0 @@ return new HelixPoll_1.HelixPoll(result.data[0], this._client);

@@ -1,7 +0,7 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixPredictionData } from '../../interfaces/endpoints/prediction.external';
import { type HelixCreatePredictionData } from '../../interfaces/endpoints/prediction.input';
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import type { HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -8,0 +8,0 @@ import { HelixPrediction } from './HelixPrediction';

@@ -45,4 +45,4 @@ "use strict";

...(0, api_call_1.createBroadcasterQuery)(broadcaster),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -61,3 +61,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixPrediction_1.HelixPrediction, this._client);

scopes: ['channel:read:predictions'],
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
}, this._client, data => new HelixPrediction_1.HelixPrediction(data, this._client), 20);

@@ -80,3 +80,3 @@ }

scopes: ['channel:read:predictions'],
query: (0, generic_external_1.createGetByIdsQuery)(broadcaster, ids)
query: (0, generic_external_1.createGetByIdsQuery)(broadcaster, ids),
});

@@ -110,3 +110,3 @@ return result.data.map(data => new HelixPrediction_1.HelixPrediction(data, this._client));

scopes: ['channel:manage:predictions'],
jsonBody: (0, prediction_external_1.createPredictionBody)(broadcaster, data)
jsonBody: (0, prediction_external_1.createPredictionBody)(broadcaster, data),
});

@@ -150,3 +150,3 @@ return new HelixPrediction_1.HelixPrediction(result.data[0], this._client);

scopes: ['channel:manage:predictions'],
jsonBody: (0, prediction_external_1.createEndPredictionBody)(broadcaster, id, status, outcomeId)
jsonBody: (0, prediction_external_1.createEndPredictionBody)(broadcaster, id, status, outcomeId),
});

@@ -153,0 +153,0 @@ return new HelixPrediction_1.HelixPrediction(result.data[0], this._client);

@@ -1,2 +0,2 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { BaseApi } from '../BaseApi';

@@ -3,0 +3,0 @@ import { HelixRaid } from './HelixRaid';

@@ -38,3 +38,3 @@ "use strict";

scopes: ['channel:manage:raids'],
query: (0, raid_external_1.createRaidStartQuery)(from, to)
query: (0, raid_external_1.createRaidStartQuery)(from, to),
});

@@ -55,3 +55,3 @@ return new HelixRaid_1.HelixRaid(result.data[0]);

scopes: ['channel:manage:raids'],
query: (0, api_call_1.createBroadcasterQuery)(from)
query: (0, api_call_1.createBroadcasterQuery)(from),
});

@@ -58,0 +58,0 @@ }

@@ -17,3 +17,3 @@ "use strict";

url: 'schedule',
query: (0, schedule_external_1.createScheduleQuery)(broadcaster, filter)
query: (0, schedule_external_1.createScheduleQuery)(broadcaster, filter),
}, client, data => new HelixScheduleSegment_1.HelixScheduleSegment(data, client), 25);

@@ -29,3 +29,3 @@ }

data: (_a = origData.data.segments) !== null && _a !== void 0 ? _a : [],
pagination: origData.pagination
pagination: origData.pagination,
};

@@ -32,0 +32,0 @@ }

@@ -1,2 +0,2 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixCreateScheduleSegmentData, type HelixPaginatedScheduleFilter, type HelixPaginatedScheduleResult, type HelixScheduleFilter, type HelixScheduleSettingsUpdate, type HelixUpdateScheduleSegmentData } from '../../interfaces/endpoints/schedule.input';

@@ -3,0 +3,0 @@ import { BaseApi } from '../BaseApi';

@@ -43,8 +43,8 @@ "use strict";

...(0, schedule_external_1.createScheduleQuery)(broadcaster, filter),
...(0, HelixPagination_1.createPaginationQuery)(filter)
}
...(0, HelixPagination_1.createPaginationQuery)(filter),
},
});
return {
data: new HelixSchedule_1.HelixSchedule(result.data, this._client),
cursor: result.pagination.cursor
cursor: result.pagination.cursor,
};

@@ -75,3 +75,3 @@ }

userId: (0, common_1.extractUserId)(broadcaster),
query: (0, generic_external_1.createGetByIdsQuery)(broadcaster, ids)
query: (0, generic_external_1.createGetByIdsQuery)(broadcaster, ids),
});

@@ -99,3 +99,3 @@ return (_b = (_a = result.data.segments) === null || _a === void 0 ? void 0 : _a.map(data => new HelixScheduleSegment_1.HelixScheduleSegment(data, this._client))) !== null && _b !== void 0 ? _b : [];

url: 'schedule/icalendar',
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
});

@@ -118,3 +118,3 @@ }

scopes: ['channel:manage:schedule'],
query: (0, schedule_external_1.createScheduleSettingsUpdateQuery)(broadcaster, settings)
query: (0, schedule_external_1.createScheduleSettingsUpdateQuery)(broadcaster, settings),
});

@@ -138,3 +138,3 @@ }

query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
jsonBody: (0, schedule_external_1.createScheduleSegmentBody)(data)
jsonBody: (0, schedule_external_1.createScheduleSegmentBody)(data),
});

@@ -160,3 +160,3 @@ return new HelixScheduleSegment_1.HelixScheduleSegment(result.data.segments[0], this._client);

query: (0, schedule_external_1.createScheduleSegmentModifyQuery)(broadcaster, segmentId),
jsonBody: (0, schedule_external_1.createScheduleSegmentUpdateBody)(data)
jsonBody: (0, schedule_external_1.createScheduleSegmentUpdateBody)(data),
});

@@ -178,3 +178,3 @@ return new HelixScheduleSegment_1.HelixScheduleSegment(result.data.segments[0], this._client);

scopes: ['channel:manage:schedule'],
query: (0, schedule_external_1.createScheduleSegmentModifyQuery)(broadcaster, segmentId)
query: (0, schedule_external_1.createScheduleSegmentModifyQuery)(broadcaster, segmentId),
});

@@ -181,0 +181,0 @@ }

@@ -5,4 +5,4 @@ import { type HelixGameData } from '../../interfaces/endpoints/game.external';

import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import type { HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -9,0 +9,0 @@ import { HelixGame } from '../game/HelixGame';

@@ -42,4 +42,4 @@ "use strict";

query,
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -57,4 +57,4 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixGame_1.HelixGame, this._client);

query: {
query
}
query,
},
}, this._client, data => new HelixGame_1.HelixGame(data, this._client));

@@ -76,4 +76,4 @@ }

...(0, search_external_1.createSearchChannelsQuery)(query, filter),
...(0, HelixPagination_1.createPaginationQuery)(filter)
}
...(0, HelixPagination_1.createPaginationQuery)(filter),
},
});

@@ -93,3 +93,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixChannelSearchResult_1.HelixChannelSearchResult, this._client);

url: 'search/channels',
query: (0, search_external_1.createSearchChannelsQuery)(query, filter)
query: (0, search_external_1.createSearchChannelsQuery)(query, filter),
}, this._client, data => new HelixChannelSearchResult_1.HelixChannelSearchResult(data, this._client));

@@ -96,0 +96,0 @@ }

@@ -1,7 +0,7 @@

import type { UserIdResolvable, UserNameResolvable } from '@twurple/common';
import { type UserIdResolvable, type UserNameResolvable } from '@twurple/common';
import { type HelixStreamData, type HelixStreamGetMarkersResponse } from '../../interfaces/endpoints/stream.external';
import { type HelixPaginatedStreamFilter, type HelixStreamFilter } from '../../interfaces/endpoints/stream.input';
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import type { HelixForwardPagination, HelixPagination } from '../../utils/pagination/HelixPagination';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixForwardPagination, type HelixPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -8,0 +8,0 @@ import { HelixStream } from './HelixStream';

@@ -39,7 +39,7 @@ "use strict";

this._getStreamByUserIdBatcher = new HelixRequestBatcher_1.HelixRequestBatcher({
url: 'streams'
url: 'streams',
}, 'user_id', 'user_id', this._client, (data) => new HelixStream_1.HelixStream(data, this._client));
/** @internal */
this._getStreamByUserNameBatcher = new HelixRequestBatcher_1.HelixRequestBatcher({
url: 'streams'
url: 'streams',
}, 'user_login', 'user_login', this._client, (data) => new HelixStream_1.HelixStream(data, this._client));

@@ -59,4 +59,4 @@ }

...(0, stream_external_1.createStreamQuery)(filter),
...(0, HelixPagination_1.createPaginationQuery)(filter)
}
...(0, HelixPagination_1.createPaginationQuery)(filter),
},
});

@@ -74,3 +74,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixStream_1.HelixStream, this._client);

url: 'streams',
query: (0, stream_external_1.createStreamQuery)(filter)
query: (0, stream_external_1.createStreamQuery)(filter),
}, this._client, data => new HelixStream_1.HelixStream(data, this._client));

@@ -125,3 +125,3 @@ }

userId,
query: (0, stream_external_1.createStreamQuery)({ userId })
query: (0, stream_external_1.createStreamQuery)({ userId }),
});

@@ -153,11 +153,11 @@ return (0, shared_utils_1.mapNullable)(result.data[0], data => new HelixStream_1.HelixStream(data, this._client));

...(0, generic_external_1.createUserQuery)(user),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
userId: (0, common_1.extractUserId)(user),
scopes: ['user:read:broadcast'],
canOverrideScopedUserContext: true
canOverrideScopedUserContext: true,
});
return {
data: (0, shared_utils_1.flatten)(result.data.map(data => HelixStreamApi_1._mapGetStreamMarkersResult(data, this._client))),
cursor: (_a = result.pagination) === null || _a === void 0 ? void 0 : _a.cursor
cursor: (_a = result.pagination) === null || _a === void 0 ? void 0 : _a.cursor,
};

@@ -176,3 +176,3 @@ }

scopes: ['user:read:broadcast'],
canOverrideScopedUserContext: true
canOverrideScopedUserContext: true,
}, this._client, data => HelixStreamApi_1._mapGetStreamMarkersResult(data, this._client));

@@ -196,11 +196,11 @@ }

...(0, stream_external_1.createVideoQuery)(videoId),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
userId: (0, common_1.extractUserId)(user),
scopes: ['user:read:broadcast'],
canOverrideScopedUserContext: true
canOverrideScopedUserContext: true,
});
return {
data: (0, shared_utils_1.flatten)(result.data.map(data => HelixStreamApi_1._mapGetStreamMarkersResult(data, this._client))),
cursor: (_a = result.pagination) === null || _a === void 0 ? void 0 : _a.cursor
cursor: (_a = result.pagination) === null || _a === void 0 ? void 0 : _a.cursor,
};

@@ -220,3 +220,3 @@ }

scopes: ['user:read:broadcast'],
canOverrideScopedUserContext: true
canOverrideScopedUserContext: true,
}, this._client, data => HelixStreamApi_1._mapGetStreamMarkersResult(data, this._client));

@@ -241,3 +241,3 @@ }

canOverrideScopedUserContext: true,
jsonBody: (0, stream_external_1.createStreamMarkerBody)(broadcaster, description)
jsonBody: (0, stream_external_1.createStreamMarkerBody)(broadcaster, description),
});

@@ -265,3 +265,3 @@ return new HelixStreamMarker_1.HelixStreamMarker(result.data[0], this._client);

scopes: ['channel:read:stream_key'],
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
});

@@ -287,4 +287,4 @@ return result.data[0].stream_key;

...(0, generic_external_1.createSingleKeyQuery)('user_id', userId),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -304,3 +304,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixStream_1.HelixStream, this._client);

scopes: ['user:read:follows'],
query: (0, generic_external_1.createSingleKeyQuery)('user_id', userId)
query: (0, generic_external_1.createSingleKeyQuery)('user_id', userId),
}, this._client, data => new HelixStream_1.HelixStream(data, this._client));

@@ -311,3 +311,3 @@ }

...result,
...video.markers.map(marker => new HelixStreamMarkerWithVideo_1.HelixStreamMarkerWithVideo(marker, video.video_id, client))
...video.markers.map(marker => new HelixStreamMarkerWithVideo_1.HelixStreamMarkerWithVideo(marker, video.video_id, client)),
], []);

@@ -314,0 +314,0 @@ }

@@ -22,3 +22,3 @@ "use strict";

userId: (0, common_1.extractUserId)(broadcaster),
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
}, client, data => new HelixSubscription_1.HelixSubscription(data, client));

@@ -25,0 +25,0 @@ }

@@ -1,4 +0,4 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixPaginatedSubscriptionsResult } from '../../interfaces/endpoints/subscription.input';
import type { HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { type HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -5,0 +5,0 @@ import { HelixPaginatedSubscriptionsRequest } from './HelixPaginatedSubscriptionsRequest';

@@ -46,8 +46,8 @@ "use strict";

...(0, api_call_1.createBroadcasterQuery)(broadcaster),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});
return {
...(0, HelixPaginatedResult_1.createPaginatedResultWithTotal)(result, HelixSubscription_1.HelixSubscription, this._client),
points: result.points
points: result.points,
};

@@ -75,3 +75,3 @@ }

scopes: ['channel:read:subscriptions'],
query: (0, generic_external_1.createChannelUsersCheckQuery)(broadcaster, users)
query: (0, generic_external_1.createChannelUsersCheckQuery)(broadcaster, users),
});

@@ -109,3 +109,3 @@ return result.data.map(data => new HelixSubscription_1.HelixSubscription(data, this._client));

scopes: ['user:read:subscriptions'],
query: (0, subscription_external_1.createSubscriptionCheckQuery)(broadcaster, user)
query: (0, subscription_external_1.createSubscriptionCheckQuery)(broadcaster, user),
});

@@ -112,0 +112,0 @@ return new HelixUserSubscription_1.HelixUserSubscription(result.data[0], this._client);

@@ -1,2 +0,2 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { BaseApi } from '../BaseApi';

@@ -3,0 +3,0 @@ import { HelixTeam } from './HelixTeam';

@@ -36,3 +36,3 @@ "use strict";

userId: (0, common_1.extractUserId)(broadcaster),
query: (0, api_call_1.createBroadcasterQuery)(broadcaster)
query: (0, api_call_1.createBroadcasterQuery)(broadcaster),
});

@@ -54,4 +54,4 @@ return (_b = (_a = result.data) === null || _a === void 0 ? void 0 : _a.map(data => new HelixTeam_1.HelixTeam(data, this._client))) !== null && _b !== void 0 ? _b : [];

query: {
id
}
id,
},
});

@@ -81,4 +81,4 @@ return new HelixTeamWithUsers_1.HelixTeamWithUsers(result.data[0], this._client);

query: {
name
}
name,
},
});

@@ -85,0 +85,0 @@ return new HelixTeamWithUsers_1.HelixTeamWithUsers(result.data[0], this._client);

@@ -1,3 +0,2 @@

import type { HelixUserType, UserIdResolvable, UserIdResolvableType, UserNameResolveableType } from '@twurple/common';
import { DataObject } from '@twurple/common';
import { DataObject, type HelixUserType, type UserIdResolvable, type UserIdResolvableType, type UserNameResolveableType } from '@twurple/common';
import { type HelixBroadcasterType, type HelixUserData } from '../../interfaces/endpoints/user.external';

@@ -4,0 +3,0 @@ import type { HelixPaginatedResultWithTotal } from '../../utils/pagination/HelixPaginatedResult';

@@ -1,2 +0,2 @@

import type { UserIdResolvable, UserNameResolvable } from '@twurple/common';
import { type UserIdResolvable, type UserNameResolvable } from '@twurple/common';
import { type HelixUserBlockData } from '../../interfaces/endpoints/user.external';

@@ -6,4 +6,4 @@ import { type HelixUserBlockAdditionalInfo, type HelixUserUpdate } from '../../interfaces/endpoints/user.input';

import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import type { HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixForwardPagination } from '../../utils/pagination/HelixPagination';
import { BaseApi } from '../BaseApi';

@@ -10,0 +10,0 @@ import { HelixInstalledExtensionList } from './extensions/HelixInstalledExtensionList';

@@ -39,7 +39,7 @@ "use strict";

this._getUserByIdBatcher = new HelixRequestBatcher_1.HelixRequestBatcher({
url: 'users'
url: 'users',
}, 'id', 'id', this._client, (data) => new HelixUser_1.HelixUser(data, this._client));
/** @internal */
this._getUserByNameBatcher = new HelixRequestBatcher_1.HelixRequestBatcher({
url: 'users'
url: 'users',
}, 'login', 'login', this._client, (data) => new HelixUser_1.HelixUser(data, this._client));

@@ -75,4 +75,4 @@ }

query: {
id: userId
}
id: userId,
},
});

@@ -119,3 +119,3 @@ return (0, shared_utils_1.mapNullable)(result.data[0], data => new HelixUser_1.HelixUser(data, this._client));

userId: (0, common_1.extractUserId)(user),
scopes: withEmail ? ['user:read:email'] : undefined
scopes: withEmail ? ['user:read:email'] : undefined,
});

@@ -142,4 +142,4 @@ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition

query: {
description: data.description
}
description: data.description,
},
});

@@ -164,4 +164,4 @@ return new HelixPrivilegedUser_1.HelixPrivilegedUser(result.data[0], this._client);

...(0, api_call_1.createBroadcasterQuery)(user),
...(0, HelixPagination_1.createPaginationQuery)(pagination)
}
...(0, HelixPagination_1.createPaginationQuery)(pagination),
},
});

@@ -180,3 +180,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixUserBlock_1.HelixUserBlock, this._client);

scopes: ['user:read:blocked_users'],
query: (0, api_call_1.createBroadcasterQuery)(user)
query: (0, api_call_1.createBroadcasterQuery)(user),
}, this._client, data => new HelixUserBlock_1.HelixUserBlock(data, this._client));

@@ -200,3 +200,3 @@ }

scopes: ['user:manage:blocked_users'],
query: (0, user_external_1.createUserBlockCreateQuery)(target, additionalInfo)
query: (0, user_external_1.createUserBlockCreateQuery)(target, additionalInfo),
});

@@ -217,3 +217,3 @@ }

scopes: ['user:manage:blocked_users'],
query: (0, user_external_1.createUserBlockDeleteQuery)(target)
query: (0, user_external_1.createUserBlockDeleteQuery)(target),
});

@@ -232,3 +232,3 @@ }

userId: (0, common_1.extractUserId)(broadcaster),
scopes: withInactive ? ['user:edit:broadcast'] : ['user:read:broadcast', 'user:edit:broadcast']
scopes: withInactive ? ['user:edit:broadcast'] : ['user:read:broadcast', 'user:edit:broadcast'],
});

@@ -250,3 +250,3 @@ return result.data.map(data => new HelixUserExtension_1.HelixUserExtension(data));

scopes: withDev ? ['user:read:broadcast', 'user:edit:broadcast'] : undefined,
query: (0, generic_external_1.createSingleKeyQuery)('user_id', userId)
query: (0, generic_external_1.createSingleKeyQuery)('user_id', userId),
});

@@ -271,3 +271,3 @@ return new HelixInstalledExtensionList_1.HelixInstalledExtensionList(result.data);

scopes: ['user:edit:broadcast'],
jsonBody: { data }
jsonBody: { data },
});

@@ -284,3 +284,3 @@ return new HelixInstalledExtensionList_1.HelixInstalledExtensionList(result.data);

url: 'users',
query
query,
});

@@ -287,0 +287,0 @@ return result.data.map(userData => new HelixUser_1.HelixUser(userData, this._client));

@@ -1,6 +0,6 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { type HelixVideoData } from '../../interfaces/endpoints/video.external';
import { type HelixPaginatedVideoFilter, type HelixVideoFilter } from '../../interfaces/endpoints/video.input';
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest';
import type { HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult';
import { BaseApi } from '../BaseApi';

@@ -7,0 +7,0 @@ import { HelixVideo } from './HelixVideo';

@@ -33,3 +33,3 @@ "use strict";

this._getVideoByIdBatcher = new HelixRequestBatcher_1.HelixRequestBatcher({
url: 'videos'
url: 'videos',
}, 'id', 'id', this._client, (data) => new HelixVideo_1.HelixVideo(data, this._client));

@@ -123,4 +123,4 @@ }

query: {
id: ids
}
id: ids,
},
});

@@ -139,4 +139,4 @@ }

...HelixVideoApi_1._makeVideosQuery(filterType, filterValues, filter),
...(0, HelixPagination_1.createPaginationQuery)(filter)
}
...(0, HelixPagination_1.createPaginationQuery)(filter),
},
});

@@ -150,3 +150,3 @@ return (0, HelixPaginatedResult_1.createPaginatedResult)(result, HelixVideo_1.HelixVideo, this._client);

userId: filterType === 'user_id' ? filterValues[0] : undefined,
query: HelixVideoApi_1._makeVideosQuery(filterType, filterValues, filter)
query: HelixVideoApi_1._makeVideosQuery(filterType, filterValues, filter),
}, this._client, data => new HelixVideo_1.HelixVideo(data, this._client));

@@ -162,3 +162,3 @@ }

sort: orderBy,
type
type,
};

@@ -165,0 +165,0 @@ }

@@ -1,2 +0,2 @@

import type { UserIdResolvable } from '@twurple/common';
import { type UserIdResolvable } from '@twurple/common';
import { BaseApi } from '../BaseApi';

@@ -3,0 +3,0 @@ /**

@@ -48,4 +48,4 @@ "use strict";

jsonBody: {
message
}
message,
},
});

@@ -52,0 +52,0 @@ }

@@ -19,4 +19,4 @@ export { ApiClient } from './client/ApiClient';

export { HelixCustomRewardRedemption } from './endpoints/channelPoints/HelixCustomRewardRedemption';
export type { HelixCustomRewardRedemptionStatus, HelixCustomRewardRedemptionTargetStatus } from './interfaces/endpoints/channelPoints.external';
export type { HelixPaginatedCustomRewardRedemptionFilter, HelixCustomRewardRedemptionFilter, HelixUpdateCustomRewardData, HelixCreateCustomRewardData } from './interfaces/endpoints/channelPoints.input';
export type { HelixCustomRewardRedemptionStatus, HelixCustomRewardRedemptionTargetStatus, } from './interfaces/endpoints/channelPoints.external';
export type { HelixPaginatedCustomRewardRedemptionFilter, HelixCustomRewardRedemptionFilter, HelixUpdateCustomRewardData, HelixCreateCustomRewardData, } from './interfaces/endpoints/channelPoints.input';
export { HelixCharityApi } from './endpoints/charity/HelixCharityApi';

@@ -35,7 +35,7 @@ export { HelixCharityCampaign } from './endpoints/charity/HelixCharityCampaign';

export { HelixPrivilegedChatSettings } from './endpoints/chat/HelixPrivilegedChatSettings';
export type { HelixChannelEmoteSubscriptionTier, HelixEmoteImageScale, HelixEmoteScale, HelixEmoteFormat, HelixEmoteThemeMode, HelixChatUserColor, HelixChatAnnouncementColor } from './interfaces/endpoints/chat.external';
export type { HelixUpdateChatSettingsParams, HelixSendChatAnnouncementParams, HelixChatBadgeScale } from './interfaces/endpoints/chat.input';
export type { HelixChannelEmoteSubscriptionTier, HelixEmoteImageScale, HelixEmoteScale, HelixEmoteFormat, HelixEmoteThemeMode, HelixChatUserColor, HelixChatAnnouncementColor, } from './interfaces/endpoints/chat.external';
export type { HelixUpdateChatSettingsParams, HelixSendChatAnnouncementParams, HelixChatBadgeScale, } from './interfaces/endpoints/chat.input';
export { HelixClipApi } from './endpoints/clip/HelixClipApi';
export { HelixClip } from './endpoints/clip/HelixClip';
export type { HelixPaginatedClipFilter, HelixClipFilter, HelixClipCreateParams } from './interfaces/endpoints/clip.input';
export type { HelixPaginatedClipFilter, HelixClipFilter, HelixClipCreateParams, } from './interfaces/endpoints/clip.input';
export { HelixContentClassificationLabelApi } from './endpoints/contentClassificationLabels/HelixContentClassificationLabelApi';

@@ -45,13 +45,13 @@ export { HelixContentClassificationLabel } from './endpoints/contentClassificationLabels/HelixContentClassificationLabel';

export { HelixDropsEntitlement } from './endpoints/entitlements/HelixDropsEntitlement';
export type { HelixDropsEntitlementFulfillmentStatus, HelixDropsEntitlementUpdateStatus } from './interfaces/endpoints/entitlement.external';
export type { HelixDropsEntitlementFilter, HelixDropsEntitlementPaginatedFilter } from './interfaces/endpoints/entitlement.input';
export type { HelixDropsEntitlementFulfillmentStatus, HelixDropsEntitlementUpdateStatus, } from './interfaces/endpoints/entitlement.external';
export type { HelixDropsEntitlementFilter, HelixDropsEntitlementPaginatedFilter, } from './interfaces/endpoints/entitlement.input';
export { HelixEventSubApi } from './endpoints/eventSub/HelixEventSubApi';
export { HelixEventSubSubscription } from './endpoints/eventSub/HelixEventSubSubscription';
export { HelixPaginatedEventSubSubscriptionsRequest } from './endpoints/eventSub/HelixPaginatedEventSubSubscriptionsRequest';
export type { HelixEventSubTransportData, HelixEventSubSubscriptionStatus } from './interfaces/endpoints/eventSub.external';
export type { HelixEventSubTransportOptions, HelixEventSubWebSocketTransportOptions, HelixEventSubWebHookTransportOptions, HelixPaginatedEventSubSubscriptionsResult, HelixEventSubDropEntitlementGrantFilter } from './interfaces/endpoints/eventSub.input';
export type { HelixEventSubTransportData, HelixEventSubSubscriptionStatus, } from './interfaces/endpoints/eventSub.external';
export type { HelixEventSubTransportOptions, HelixEventSubWebSocketTransportOptions, HelixEventSubWebHookTransportOptions, HelixPaginatedEventSubSubscriptionsResult, HelixEventSubDropEntitlementGrantFilter, } from './interfaces/endpoints/eventSub.input';
export { HelixExtensionsApi } from './endpoints/extensions/HelixExtensionsApi';
export { HelixExtensionBitsProduct } from './endpoints/extensions/HelixExtensionBitsProduct';
export { HelixExtensionTransaction } from './endpoints/extensions/HelixExtensionTransaction';
export type { HelixExtensionBitsProductUpdatePayload, HelixExtensionTransactionsPaginatedFilter, HelixExtensionTransactionsFilter } from './interfaces/endpoints/extensions.input';
export type { HelixExtensionBitsProductUpdatePayload, HelixExtensionTransactionsPaginatedFilter, HelixExtensionTransactionsFilter, } from './interfaces/endpoints/extensions.input';
export { HelixGameApi } from './endpoints/game/HelixGameApi';

@@ -65,3 +65,3 @@ export { HelixGame } from './endpoints/game/HelixGame';

export { HelixHypeTrainEvent } from './endpoints/hypeTrain/HelixHypeTrainEvent';
export type { HelixHypeTrainContributionType, HelixHypeTrainEventType } from './interfaces/endpoints/hypeTrain.external';
export type { HelixHypeTrainContributionType, HelixHypeTrainEventType, } from './interfaces/endpoints/hypeTrain.external';
export { HelixModerationApi } from './endpoints/moderation/HelixModerationApi';

@@ -73,3 +73,3 @@ export { HelixBan } from './endpoints/moderation/HelixBan';

export { HelixShieldModeStatus } from './endpoints/moderation/HelixShieldModeStatus';
export type { HelixBanFilter, HelixBanUserRequest, HelixModeratorFilter } from './interfaces/endpoints/moderation.input';
export type { HelixBanFilter, HelixBanUserRequest, HelixModeratorFilter, } from './interfaces/endpoints/moderation.input';
export { HelixPollApi } from './endpoints/poll/HelixPollApi';

@@ -93,3 +93,3 @@ export { HelixPoll } from './endpoints/poll/HelixPoll';

export { HelixPaginatedScheduleSegmentRequest } from './endpoints/schedule/HelixPaginatedScheduleSegmentRequest';
export type { HelixUpdateScheduleSegmentData, HelixCreateScheduleSegmentData, HelixScheduleSettingsUpdate, HelixPaginatedScheduleFilter, HelixScheduleFilter } from './interfaces/endpoints/schedule.input';
export type { HelixUpdateScheduleSegmentData, HelixCreateScheduleSegmentData, HelixScheduleSettingsUpdate, HelixPaginatedScheduleFilter, HelixScheduleFilter, } from './interfaces/endpoints/schedule.input';
export { HelixSearchApi } from './endpoints/search/HelixSearchApi';

@@ -124,3 +124,3 @@ export { HelixChannelSearchResult } from './endpoints/search/HelixChannelSearchResult';

export type { HelixExtensionSlotType } from './interfaces/endpoints/userExtension.external';
export type { HelixUserExtensionUpdatePayload, HelixUserExtensionUpdatePayloadSlot, HelixUserExtensionUpdatePayloadActiveSlot, HelixUserExtensionUpdatePayloadInactiveSlot } from './interfaces/endpoints/userExtension.input';
export type { HelixUserExtensionUpdatePayload, HelixUserExtensionUpdatePayloadSlot, HelixUserExtensionUpdatePayloadActiveSlot, HelixUserExtensionUpdatePayloadInactiveSlot, } from './interfaces/endpoints/userExtension.input';
export { HelixVideoApi } from './endpoints/video/HelixVideoApi';

@@ -140,3 +140,3 @@ export { HelixVideo } from './endpoints/video/HelixVideo';

export { extractUserId, extractUserName, HelixExtension, HellFreezesOverError } from '@twurple/common';
export type { CommercialLength, HelixExtensionSubscriptionsSupportLevel, HelixExtensionState, HelixExtensionIconSize, HelixExtensionConfigurationLocation, HelixUserType, UserIdResolvable, UserNameResolvable } from '@twurple/common';
export type { CommercialLength, HelixExtensionSubscriptionsSupportLevel, HelixExtensionState, HelixExtensionIconSize, HelixExtensionConfigurationLocation, HelixUserType, UserIdResolvable, UserNameResolvable, } from '@twurple/common';
//# sourceMappingURL=index.d.ts.map

@@ -11,5 +11,5 @@ "use strict";

started_at: startDate === null || startDate === void 0 ? void 0 : startDate.toISOString(),
user_id: contextUserId
user_id: contextUserId,
};
}
exports.createBitsLeaderboardQuery = createBitsLeaderboardQuery;

@@ -16,3 +16,3 @@ "use strict";

content_classification_labels: data.contentClassificationLabels,
is_branded_content: data.isBrandedContent
is_branded_content: data.isBrandedContent,
};

@@ -25,3 +25,3 @@ }

broadcaster_id: (0, common_1.extractUserId)(broadcaster),
length: length
length,
};

@@ -34,3 +34,3 @@ }

broadcaster_id: (0, common_1.extractUserId)(broadcaster),
user_id: (0, common_1.extractUserId)(user)
user_id: (0, common_1.extractUserId)(user),
};

@@ -43,3 +43,3 @@ }

broadcaster_id: (0, common_1.extractUserId)(broadcaster),
user_id: (0, shared_utils_1.mapOptional)(user, common_1.extractUserId)
user_id: (0, shared_utils_1.mapOptional)(user, common_1.extractUserId),
};

@@ -52,5 +52,5 @@ }

broadcaster_id: (0, shared_utils_1.mapOptional)(broadcaster, common_1.extractUserId),
user_id: (0, common_1.extractUserId)(user)
user_id: (0, common_1.extractUserId)(user),
};
}
exports.createFollowedChannelQuery = createFollowedChannelQuery;

@@ -9,3 +9,3 @@ "use strict";

broadcaster_id: (0, common_1.extractUserId)(broadcaster),
only_manageable_rewards: onlyManageable === null || onlyManageable === void 0 ? void 0 : onlyManageable.toString()
only_manageable_rewards: onlyManageable === null || onlyManageable === void 0 ? void 0 : onlyManageable.toString(),
};

@@ -18,3 +18,3 @@ }

broadcaster_id: (0, common_1.extractUserId)(broadcaster),
id: rewardId
id: rewardId,
};

@@ -33,3 +33,3 @@ }

is_user_input_required: data.userInputRequired,
should_redemptions_skip_request_queue: data.autoFulfill
should_redemptions_skip_request_queue: data.autoFulfill,
};

@@ -59,3 +59,3 @@ if (data.maxRedemptionsPerStream !== undefined) {

reward_id: rewardId,
id: redemptionIds
id: redemptionIds,
};

@@ -70,5 +70,5 @@ }

status,
sort: filter.newestFirst ? 'NEWEST' : 'OLDEST'
sort: filter.newestFirst ? 'NEWEST' : 'OLDEST',
};
}
exports.createRedemptionsForBroadcasterQuery = createRedemptionsForBroadcasterQuery;

@@ -16,3 +16,3 @@ "use strict";

non_moderator_chat_delay: settings.nonModeratorChatDelayEnabled,
non_moderator_chat_delay_duration: settings.nonModeratorChatDelay
non_moderator_chat_delay_duration: settings.nonModeratorChatDelay,
};

@@ -25,3 +25,3 @@ }

user_id: (0, common_1.extractUserId)(user),
color
color,
};

@@ -35,5 +35,5 @@ }

to_broadcaster_id: (0, common_1.extractUserId)(to),
moderator_id: moderatorId
moderator_id: moderatorId,
};
}
exports.createShoutoutQuery = createShoutoutQuery;

@@ -9,3 +9,3 @@ "use strict";

broadcaster_id: (0, common_1.extractUserId)(channel),
has_delay: createAfterDelay.toString()
has_delay: createAfterDelay.toString(),
};

@@ -21,5 +21,5 @@ }

ended_at: endDate,
is_featured: isFeatured === null || isFeatured === void 0 ? void 0 : isFeatured.toString()
is_featured: isFeatured === null || isFeatured === void 0 ? void 0 : isFeatured.toString(),
};
}
exports.createClipQuery = createClipQuery;

@@ -11,3 +11,3 @@ "use strict";

game_id: filters.gameId,
fulfillment_status: filters.fulfillmentStatus
fulfillment_status: filters.fulfillmentStatus,
};

@@ -20,5 +20,5 @@ }

fulfillment_status: fulfillmentStatus,
entitlement_ids: ids
entitlement_ids: ids,
};
}
exports.createDropsEntitlementUpdateBody = createDropsEntitlementUpdateBody;

@@ -8,3 +8,3 @@ "use strict";

return {
broadcaster_user_id: (0, common_1.extractUserId)(broadcaster)
broadcaster_user_id: (0, common_1.extractUserId)(broadcaster),
};

@@ -22,3 +22,3 @@ }

broadcaster_user_id: broadcasterId,
moderator_user_id: moderatorId
moderator_user_id: moderatorId,
};

@@ -32,5 +32,5 @@ }

category_id: filter.categoryId,
campaign_id: filter.campaignId
campaign_id: filter.campaignId,
};
}
exports.createEventSubDropEntitlementGrantCondition = createEventSubDropEntitlementGrantCondition;

@@ -8,3 +8,3 @@ "use strict";

extension_id: extensionId,
extension_version: version
extension_version: version,
};

@@ -19,3 +19,3 @@ }

amount: data.cost,
type: 'bits'
type: 'bits',
},

@@ -25,3 +25,3 @@ display_name: data.displayName,

expiration: data.expirationDate,
is_broadcast: data.broadcast
is_broadcast: data.broadcast,
};

@@ -34,5 +34,5 @@ }

extension_id: extensionId,
id: filter.transactionIds
id: filter.transactionIds,
};
}
exports.createExtensionTransactionQuery = createExtensionTransactionQuery;

@@ -13,3 +13,3 @@ "use strict";

return {
user_id: (0, common_1.extractUserId)(user)
user_id: (0, common_1.extractUserId)(user),
};

@@ -22,3 +22,3 @@ }

broadcaster_id: broadcaster,
moderator_id: moderatorId
moderator_id: moderatorId,
};

@@ -31,3 +31,3 @@ }

broadcaster_id: (0, common_1.extractUserId)(broadcaster),
id: rewardIds
id: rewardIds,
};

@@ -40,5 +40,5 @@ }

broadcaster_id: (0, common_1.extractUserId)(broadcaster),
user_id: users.map(common_1.extractUserId)
user_id: users.map(common_1.extractUserId),
};
}
exports.createChannelUsersCheckQuery = createChannelUsersCheckQuery;

@@ -9,3 +9,3 @@ "use strict";

broadcaster_id: (0, common_1.extractUserId)(channel),
user_id: filter === null || filter === void 0 ? void 0 : filter.userId
user_id: filter === null || filter === void 0 ? void 0 : filter.userId,
};

@@ -18,3 +18,3 @@ }

broadcaster_id: (0, common_1.extractUserId)(broadcaster),
user_id: (0, common_1.extractUserId)(user)
user_id: (0, common_1.extractUserId)(user),
};

@@ -28,3 +28,3 @@ }

msg_id: msgId,
action: allow ? 'ALLOW' : 'DENY'
action: allow ? 'ALLOW' : 'DENY',
};

@@ -44,3 +44,3 @@ }

sexuality_sex_or_gender: data.sexualitySexOrGender,
swearing: data.swearing
swearing: data.swearing,
};

@@ -55,4 +55,4 @@ }

reason: data.reason,
user_id: (0, common_1.extractUserId)(data.user)
}
user_id: (0, common_1.extractUserId)(data.user),
},
};

@@ -64,5 +64,5 @@ }

return {
is_active: activate
is_active: activate,
};
}
exports.createUpdateShieldModeStatusBody = createUpdateShieldModeStatusBody;

@@ -14,3 +14,3 @@ "use strict";

channel_points_voting_enabled: data.channelPointsPerVote != null,
channel_points_per_vote: (_a = data.channelPointsPerVote) !== null && _a !== void 0 ? _a : 0
channel_points_per_vote: (_a = data.channelPointsPerVote) !== null && _a !== void 0 ? _a : 0,
};

@@ -24,5 +24,5 @@ }

id,
status: showResult ? 'TERMINATED' : 'ARCHIVED'
status: showResult ? 'TERMINATED' : 'ARCHIVED',
};
}
exports.createPollEndBody = createPollEndBody;

@@ -11,3 +11,3 @@ "use strict";

outcomes: data.outcomes.map(title => ({ title })),
prediction_window: data.autoLockAfter
prediction_window: data.autoLockAfter,
};

@@ -22,5 +22,5 @@ }

status,
winning_outcome_id: outcomeId
winning_outcome_id: outcomeId,
};
}
exports.createEndPredictionBody = createEndPredictionBody;

@@ -9,5 +9,5 @@ "use strict";

from_broadcaster_id: (0, common_1.extractUserId)(from),
to_broadcaster_id: (0, common_1.extractUserId)(to)
to_broadcaster_id: (0, common_1.extractUserId)(to),
};
}
exports.createRaidStartQuery = createRaidStartQuery;

@@ -11,3 +11,3 @@ "use strict";

start_time: filter === null || filter === void 0 ? void 0 : filter.startDate,
utc_offset: (_a = filter === null || filter === void 0 ? void 0 : filter.utcOffset) === null || _a === void 0 ? void 0 : _a.toString()
utc_offset: (_a = filter === null || filter === void 0 ? void 0 : filter.utcOffset) === null || _a === void 0 ? void 0 : _a.toString(),
};

@@ -24,11 +24,9 @@ }

vacation_end_time: settings.vacation.endDate,
timezone: settings.vacation.timezone
timezone: settings.vacation.timezone,
};
}
else {
return {
broadcaster_id: (0, common_1.extractUserId)(broadcaster),
is_vacation_enabled: 'false'
};
}
return {
broadcaster_id: (0, common_1.extractUserId)(broadcaster),
is_vacation_enabled: 'false',
};
}

@@ -44,3 +42,3 @@ exports.createScheduleSettingsUpdateQuery = createScheduleSettingsUpdateQuery;

category_id: data.categoryId,
title: data.title
title: data.title,
};

@@ -53,3 +51,3 @@ }

broadcaster_id: (0, common_1.extractUserId)(broadcaster),
id: segmentId
id: segmentId,
};

@@ -66,5 +64,5 @@ }

category_id: data.categoryId,
title: data.title
title: data.title,
};
}
exports.createScheduleSegmentUpdateBody = createScheduleSegmentUpdateBody;

@@ -9,5 +9,5 @@ "use strict";

query,
live_only: (_a = filter.liveOnly) === null || _a === void 0 ? void 0 : _a.toString()
live_only: (_a = filter.liveOnly) === null || _a === void 0 ? void 0 : _a.toString(),
};
}
exports.createSearchChannelsQuery = createSearchChannelsQuery;

@@ -12,3 +12,3 @@ "use strict";

user_id: filter.userId,
user_login: filter.userName
user_login: filter.userName,
};

@@ -21,3 +21,3 @@ }

user_id: (0, common_1.extractUserId)(broadcaster),
description
description,
};

@@ -29,5 +29,5 @@ }

return {
video_id: id
video_id: id,
};
}
exports.createVideoQuery = createVideoQuery;

@@ -9,5 +9,5 @@ "use strict";

broadcaster_id: (0, common_1.extractUserId)(broadcaster),
user_id: (0, common_1.extractUserId)(user)
user_id: (0, common_1.extractUserId)(user),
};
}
exports.createSubscriptionCheckQuery = createSubscriptionCheckQuery;

@@ -10,3 +10,3 @@ "use strict";

source_context: additionalInfo.sourceContext,
reason: additionalInfo.reason
reason: additionalInfo.reason,
};

@@ -18,5 +18,5 @@ }

return {
target_user_id: (0, common_1.extractUserId)(target)
target_user_id: (0, common_1.extractUserId)(target),
};
}
exports.createUserBlockDeleteQuery = createUserBlockDeleteQuery;

@@ -9,5 +9,5 @@ "use strict";

from_user_id: (0, common_1.extractUserId)(from),
to_user_id: (0, common_1.extractUserId)(to)
to_user_id: (0, common_1.extractUserId)(to),
};
}
exports.createWhisperQuery = createWhisperQuery;

@@ -8,3 +8,3 @@ "use strict";

class HelixRateLimiter extends rate_limiter_1.ResponseBasedRateLimiter {
async doRequest({ options, clientId, accessToken, authorizationType, fetchOptions }) {
async doRequest({ options, clientId, accessToken, authorizationType, fetchOptions, }) {
return await (0, api_call_1.callTwitchApiRaw)(options, clientId, accessToken, authorizationType, fetchOptions);

@@ -20,7 +20,7 @@ }

getParametersFromResponse(res) {
const headers = res.headers;
const { headers } = res;
return {
limit: +headers.get('ratelimit-limit'),
remaining: +headers.get('ratelimit-remaining'),
resetsAt: +headers.get('ratelimit-reset') * 1000
resetsAt: +headers.get('ratelimit-reset') * 1000,
};

@@ -27,0 +27,0 @@ }

@@ -86,4 +86,4 @@ "use strict";

...this._callOptions.query,
[this._queryParamName]: ids
}
[this._queryParamName]: ids,
},
});

@@ -90,0 +90,0 @@ }

@@ -117,4 +117,4 @@ "use strict";

first: this._limitPerPage.toString(),
...additionalOptions.query
}
...additionalOptions.query,
},
});

@@ -121,0 +121,0 @@ }

@@ -12,3 +12,3 @@ "use strict";

},
cursor: (_a = response.pagination) === null || _a === void 0 ? void 0 : _a.cursor
cursor: (_a = response.pagination) === null || _a === void 0 ? void 0 : _a.cursor,
};

@@ -25,5 +25,5 @@ }

cursor: response.pagination.cursor,
total: response.total
total: response.total,
};
}
exports.createPaginatedResultWithTotal = createPaginatedResultWithTotal;

@@ -9,5 +9,5 @@ "use strict";

before,
first: limit === null || limit === void 0 ? void 0 : limit.toString()
first: limit === null || limit === void 0 ? void 0 : limit.toString(),
};
}
exports.createPaginationQuery = createPaginationQuery;
{
"name": "@twurple/api",
"version": "7.0.3",
"version": "7.0.4",
"publishConfig": {

@@ -43,4 +43,4 @@ "access": "public"

"@d-fischer/typed-event-emitter": "^3.3.1",
"@twurple/api-call": "7.0.3",
"@twurple/common": "7.0.3",
"@twurple/api-call": "7.0.4",
"@twurple/common": "7.0.4",
"retry": "^0.13.1",

@@ -50,7 +50,7 @@ "tslib": "^2.0.3"

"devDependencies": {
"@twurple/auth": "7.0.3",
"@twurple/auth": "7.0.4",
"@types/retry": "^0.12.2"
},
"peerDependencies": {
"@twurple/auth": "7.0.3"
"@twurple/auth": "7.0.4"
},

@@ -57,0 +57,0 @@ "files": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc