@twurple/api
Advanced tools
Comparing version 6.0.0-pre.4 to 6.0.0-pre.5
@@ -114,4 +114,5 @@ import type { UserIdResolvable } from '@twurple/common'; | ||
* @param requiredScopeSet The scope set required by the subscription. Will only be checked for applicable transports. | ||
* @param isBatched Whether to enable batching for the subscription. Is only supported for select topics. | ||
*/ | ||
createSubscription(type: string, version: string, condition: Record<string, unknown>, transport: HelixEventSubTransportOptions, user?: UserIdResolvable, requiredScopeSet?: string[]): Promise<HelixEventSubSubscription>; | ||
createSubscription(type: string, version: string, condition: Record<string, unknown>, transport: HelixEventSubTransportOptions, user?: UserIdResolvable, requiredScopeSet?: string[], isBatched?: boolean): Promise<HelixEventSubSubscription>; | ||
/** | ||
@@ -118,0 +119,0 @@ * Deletes a subscription. |
@@ -183,4 +183,5 @@ "use strict"; | ||
* @param requiredScopeSet The scope set required by the subscription. Will only be checked for applicable transports. | ||
* @param isBatched Whether to enable batching for the subscription. Is only supported for select topics. | ||
*/ | ||
async createSubscription(type, version, condition, transport, user, requiredScopeSet) { | ||
async createSubscription(type, version, condition, transport, user, requiredScopeSet, isBatched) { | ||
const usesAppAuth = transport.method === 'webhook'; | ||
@@ -191,2 +192,11 @@ const scopes = usesAppAuth ? undefined : requiredScopeSet; | ||
} | ||
const jsonBody = { | ||
type, | ||
version, | ||
condition, | ||
transport | ||
}; | ||
if (isBatched) { | ||
jsonBody.is_batching_enabled = true; | ||
} | ||
const result = await this._client.callApi({ | ||
@@ -199,8 +209,3 @@ type: 'helix', | ||
forceType: usesAppAuth ? 'app' : 'user', | ||
jsonBody: { | ||
type, | ||
version, | ||
condition, | ||
transport | ||
} | ||
jsonBody | ||
}); | ||
@@ -701,3 +706,3 @@ return new HelixEventSubSubscription_1.HelixEventSubSubscription(result.data[0], this._client); | ||
async subscribeToDropEntitlementGrantEvents(filter, transport) { | ||
return await this.createSubscription('drop.entitlement.grant', '1', (0, eventSub_external_1.createEventSubDropEntitlementGrantCondition)(filter), transport); | ||
return await this.createSubscription('drop.entitlement.grant', '1', (0, eventSub_external_1.createEventSubDropEntitlementGrantCondition)(filter), transport, undefined, undefined, true); | ||
} | ||
@@ -704,0 +709,0 @@ async _deleteSubscriptionsWithCondition(cond) { |
@@ -5,3 +5,2 @@ import { DataObject } from '@twurple/common'; | ||
import type { HelixGame } from '../game/HelixGame'; | ||
import type { HelixTag } from '../tag/HelixTag'; | ||
import type { HelixUser } from '../user/HelixUser'; | ||
@@ -52,14 +51,2 @@ /** | ||
/** | ||
* The IDs of the tags set on the channel. | ||
* | ||
* @deprecated | ||
*/ | ||
get tagIds(): string[]; | ||
/** | ||
* Retrieves the tags of the channel. | ||
* | ||
* @deprecated | ||
*/ | ||
getTags(): Promise<HelixTag[]>; | ||
/** | ||
* The tags applied to the channel. | ||
@@ -66,0 +53,0 @@ */ |
@@ -73,18 +73,2 @@ "use strict"; | ||
/** | ||
* The IDs of the tags set on the channel. | ||
* | ||
* @deprecated | ||
*/ | ||
get tagIds() { | ||
return this[common_1.rawDataSymbol].tag_ids; | ||
} | ||
/** | ||
* Retrieves the tags of the channel. | ||
* | ||
* @deprecated | ||
*/ | ||
async getTags() { | ||
return await this._client.tags.getStreamTagsByIds(this[common_1.rawDataSymbol].tag_ids); | ||
} | ||
/** | ||
* The tags applied to the channel. | ||
@@ -91,0 +75,0 @@ */ |
@@ -5,3 +5,2 @@ import { DataObject } from '@twurple/common'; | ||
import type { HelixGame } from '../game/HelixGame'; | ||
import type { HelixTag } from '../tag/HelixTag'; | ||
import type { HelixUser } from '../user/HelixUser'; | ||
@@ -81,14 +80,2 @@ /** | ||
/** | ||
* The IDs of the tags of the stream. | ||
* | ||
* @deprecated | ||
*/ | ||
get tagIds(): string[]; | ||
/** | ||
* Retrieves the tags of the stream. | ||
* | ||
* @deprecated | ||
*/ | ||
getTags(): Promise<HelixTag[]>; | ||
/** | ||
* The tags applied to the stream. | ||
@@ -95,0 +82,0 @@ */ |
@@ -116,20 +116,2 @@ "use strict"; | ||
/** | ||
* The IDs of the tags of the stream. | ||
* | ||
* @deprecated | ||
*/ | ||
get tagIds() { | ||
var _a; | ||
return (_a = this[common_1.rawDataSymbol].tag_ids) !== null && _a !== void 0 ? _a : []; | ||
} | ||
/** | ||
* Retrieves the tags of the stream. | ||
* | ||
* @deprecated | ||
*/ | ||
async getTags() { | ||
var _a; | ||
return await this._client.tags.getStreamTagsByIds((_a = this[common_1.rawDataSymbol].tag_ids) !== null && _a !== void 0 ? _a : []); | ||
} | ||
/** | ||
* The tags applied to the stream. | ||
@@ -136,0 +118,0 @@ */ |
@@ -8,3 +8,2 @@ import type { UserIdResolvable, UserNameResolvable } from '@twurple/common'; | ||
import type { HelixForwardPagination, HelixPagination } from '../HelixPagination'; | ||
import { HelixTag } from '../tag/HelixTag'; | ||
import { HelixStream } from './HelixStream'; | ||
@@ -108,19 +107,2 @@ import { HelixStreamMarker } from './HelixStreamMarker'; | ||
/** | ||
* Retrieves the tags of a stream. | ||
* | ||
* @param broadcaster The broadcaster of the stream. | ||
* | ||
* @deprecated | ||
*/ | ||
getStreamTags(broadcaster: UserIdResolvable): Promise<HelixTag[]>; | ||
/** | ||
* Replaces the tags of a stream. | ||
* | ||
* @param broadcaster The broadcaster of the stream. | ||
* @param tagIds The tags to set. If not given, removes all tags. | ||
* | ||
* @deprecated | ||
*/ | ||
replaceStreamTags(broadcaster: UserIdResolvable, tagIds?: string[]): Promise<void>; | ||
/** | ||
* Retrieves the stream key of a stream. | ||
@@ -127,0 +109,0 @@ * |
@@ -16,3 +16,2 @@ "use strict"; | ||
const HelixPagination_1 = require("../HelixPagination"); | ||
const HelixTag_1 = require("../tag/HelixTag"); | ||
const HelixStream_1 = require("./HelixStream"); | ||
@@ -213,35 +212,2 @@ const HelixStreamMarker_1 = require("./HelixStreamMarker"); | ||
/** | ||
* Retrieves the tags of a stream. | ||
* | ||
* @param broadcaster The broadcaster of the stream. | ||
* | ||
* @deprecated | ||
*/ | ||
async getStreamTags(broadcaster) { | ||
const result = await this._client.callApi({ | ||
type: 'helix', | ||
url: 'streams/tags', | ||
query: (0, api_call_1.createBroadcasterQuery)(broadcaster) | ||
}); | ||
return result.data.map(data => new HelixTag_1.HelixTag(data)); | ||
} | ||
/** | ||
* Replaces the tags of a stream. | ||
* | ||
* @param broadcaster The broadcaster of the stream. | ||
* @param tagIds The tags to set. If not given, removes all tags. | ||
* | ||
* @deprecated | ||
*/ | ||
async replaceStreamTags(broadcaster, tagIds) { | ||
await this._client.callApi({ | ||
type: 'helix', | ||
url: 'streams/tags', | ||
scopes: ['channel:manage:broadcast'], | ||
method: 'PUT', | ||
query: (0, api_call_1.createBroadcasterQuery)(broadcaster), | ||
jsonBody: (0, generic_external_1.createSingleKeyQuery)('tag_ids', tagIds) | ||
}); | ||
} | ||
/** | ||
* Retrieves the stream key of a stream. | ||
@@ -248,0 +214,0 @@ * |
@@ -26,3 +26,2 @@ import type { Logger } from '@d-fischer/logger'; | ||
import { HelixSubscriptionApi } from '../api/helix/subscriptions/HelixSubscriptionApi'; | ||
import { HelixTagApi } from '../api/helix/tag/HelixTagApi'; | ||
import { HelixTeamApi } from '../api/helix/team/HelixTeamApi'; | ||
@@ -139,8 +138,2 @@ import { HelixUserApi } from '../api/helix/user/HelixUserApi'; | ||
/** | ||
* The Helix tag API methods. | ||
* | ||
* @deprecated | ||
*/ | ||
get tags(): HelixTagApi; | ||
/** | ||
* The Helix team API methods. | ||
@@ -147,0 +140,0 @@ */ |
@@ -30,3 +30,2 @@ "use strict"; | ||
const HelixSubscriptionApi_1 = require("../api/helix/subscriptions/HelixSubscriptionApi"); | ||
const HelixTagApi_1 = require("../api/helix/tag/HelixTagApi"); | ||
const HelixTeamApi_1 = require("../api/helix/team/HelixTeamApi"); | ||
@@ -242,10 +241,2 @@ const HelixUserApi_1 = require("../api/helix/user/HelixUserApi"); | ||
/** | ||
* The Helix tag API methods. | ||
* | ||
* @deprecated | ||
*/ | ||
get tags() { | ||
return new HelixTagApi_1.HelixTagApi(this); | ||
} | ||
/** | ||
* The Helix team API methods. | ||
@@ -413,5 +404,2 @@ */ | ||
(0, cache_decorators_1.CachedGetter)() | ||
], BaseApiClient.prototype, "tags", null); | ||
tslib_1.__decorate([ | ||
(0, cache_decorators_1.CachedGetter)() | ||
], BaseApiClient.prototype, "teams", null); | ||
@@ -418,0 +406,0 @@ tslib_1.__decorate([ |
@@ -102,4 +102,2 @@ export { ApiClient } from './client/ApiClient'; | ||
export type { HelixPaginatedSubscriptionsResult } from './interfaces/helix/subscription.input'; | ||
export { HelixTagApi } from './api/helix/tag/HelixTagApi'; | ||
export { HelixTag } from './api/helix/tag/HelixTag'; | ||
export { HelixTeamApi } from './api/helix/team/HelixTeamApi'; | ||
@@ -106,0 +104,0 @@ export { HelixTeam } from './api/helix/team/HelixTeam'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.HelixShieldModeStatus = exports.HelixBlockedTerm = exports.HelixBanUser = exports.HelixModerator = exports.HelixBan = exports.HelixModerationApi = exports.HelixHypeTrainEvent = exports.HelixHypeTrainContribution = exports.HelixHypeTrainApi = exports.HelixGoal = exports.HelixGoalApi = exports.HelixGame = exports.HelixGameApi = exports.HelixExtensionTransaction = exports.HelixExtensionBitsProduct = exports.HelixExtensionsApi = exports.HelixPaginatedEventSubSubscriptionsRequest = exports.HelixEventSubSubscription = exports.HelixEventSubApi = exports.HelixDropsEntitlement = exports.HelixEntitlementApi = exports.HelixClip = exports.HelixClipApi = exports.HelixPrivilegedChatSettings = exports.HelixEmoteFromSet = exports.HelixChannelEmote = exports.HelixEmote = exports.HelixChatChatter = exports.HelixChatSettings = exports.HelixChatBadgeVersion = exports.HelixChatBadgeSet = exports.HelixChatApi = exports.HelixCharityCampaignAmount = exports.HelixCharityCampaignDonation = exports.HelixCharityCampaign = exports.HelixCharityApi = exports.HelixCustomRewardRedemption = exports.HelixCustomReward = exports.HelixChannelPointsApi = exports.HelixChannelReference = exports.HelixChannelEditor = exports.HelixChannel = exports.HelixChannelApi = exports.HelixCheermoteList = exports.HelixBitsLeaderboardEntry = exports.HelixBitsLeaderboard = exports.HelixBitsApi = exports.HelixPaginatedRequestWithTotal = exports.HelixPaginatedRequest = exports.ApiClient = void 0; | ||
exports.HellFreezesOverError = exports.HelixExtension = exports.extractUserName = exports.extractUserId = exports.ChatEmote = exports.StreamNotLiveError = exports.ConfigError = exports.HelixWhisperApi = exports.HelixVideo = exports.HelixVideoApi = exports.HelixUserExtension = exports.HelixInstalledExtensionList = exports.HelixInstalledExtension = exports.HelixBaseExtension = exports.HelixUser = exports.HelixPrivilegedUser = exports.HelixFollow = exports.HelixUserBlock = exports.HelixUserApi = exports.HelixTeamWithUsers = exports.HelixTeam = exports.HelixTeamApi = exports.HelixTag = exports.HelixTagApi = exports.HelixUserSubscription = exports.HelixSubscription = exports.HelixSubscriptionApi = exports.HelixStreamMarkerWithVideo = exports.HelixStreamMarker = exports.HelixStream = exports.HelixStreamApi = exports.HelixChannelSearchResult = exports.HelixSearchApi = exports.HelixPaginatedScheduleSegmentRequest = exports.HelixScheduleSegment = exports.HelixSchedule = exports.HelixScheduleApi = exports.HelixUserRelation = exports.HelixRaid = exports.HelixRaidApi = exports.HelixPredictor = exports.HelixPredictionOutcome = exports.HelixPrediction = exports.HelixPredictionApi = exports.HelixPollChoice = exports.HelixPoll = exports.HelixPollApi = void 0; | ||
exports.HellFreezesOverError = exports.HelixExtension = exports.extractUserName = exports.extractUserId = exports.ChatEmote = exports.StreamNotLiveError = exports.ConfigError = exports.HelixWhisperApi = exports.HelixVideo = exports.HelixVideoApi = exports.HelixUserExtension = exports.HelixInstalledExtensionList = exports.HelixInstalledExtension = exports.HelixBaseExtension = exports.HelixUser = exports.HelixPrivilegedUser = exports.HelixFollow = exports.HelixUserBlock = exports.HelixUserApi = exports.HelixTeamWithUsers = exports.HelixTeam = exports.HelixTeamApi = exports.HelixUserSubscription = exports.HelixSubscription = exports.HelixSubscriptionApi = exports.HelixStreamMarkerWithVideo = exports.HelixStreamMarker = exports.HelixStream = exports.HelixStreamApi = exports.HelixChannelSearchResult = exports.HelixSearchApi = exports.HelixPaginatedScheduleSegmentRequest = exports.HelixScheduleSegment = exports.HelixSchedule = exports.HelixScheduleApi = exports.HelixUserRelation = exports.HelixRaid = exports.HelixRaidApi = exports.HelixPredictor = exports.HelixPredictionOutcome = exports.HelixPrediction = exports.HelixPredictionApi = exports.HelixPollChoice = exports.HelixPoll = exports.HelixPollApi = void 0; | ||
var ApiClient_1 = require("./client/ApiClient"); | ||
@@ -151,6 +151,2 @@ Object.defineProperty(exports, "ApiClient", { enumerable: true, get: function () { return ApiClient_1.ApiClient; } }); | ||
Object.defineProperty(exports, "HelixUserSubscription", { enumerable: true, get: function () { return HelixUserSubscription_1.HelixUserSubscription; } }); | ||
var HelixTagApi_1 = require("./api/helix/tag/HelixTagApi"); | ||
Object.defineProperty(exports, "HelixTagApi", { enumerable: true, get: function () { return HelixTagApi_1.HelixTagApi; } }); | ||
var HelixTag_1 = require("./api/helix/tag/HelixTag"); | ||
Object.defineProperty(exports, "HelixTag", { enumerable: true, get: function () { return HelixTag_1.HelixTag; } }); | ||
var HelixTeamApi_1 = require("./api/helix/team/HelixTeamApi"); | ||
@@ -157,0 +153,0 @@ Object.defineProperty(exports, "HelixTeamApi", { enumerable: true, get: function () { return HelixTeamApi_1.HelixTeamApi; } }); |
@@ -11,3 +11,2 @@ import { type HelixChannelSearchFilter } from './search.input'; | ||
is_live: boolean; | ||
tag_ids: string[]; | ||
tags: string[]; | ||
@@ -14,0 +13,0 @@ thumbnail_url: string; |
@@ -23,3 +23,2 @@ import { type UserIdResolvable } from '@twurple/common'; | ||
thumbnail_url: string; | ||
tag_ids: string[] | null; | ||
is_mature: boolean; | ||
@@ -26,0 +25,0 @@ } |
{ | ||
"name": "@twurple/api", | ||
"version": "6.0.0-pre.4", | ||
"version": "6.0.0-pre.5", | ||
"publishConfig": { | ||
@@ -41,11 +41,11 @@ "access": "public" | ||
"@d-fischer/shared-utils": "^3.4.0", | ||
"@twurple/api-call": "6.0.0-pre.4", | ||
"@twurple/common": "6.0.0-pre.4", | ||
"@twurple/api-call": "6.0.0-pre.5", | ||
"@twurple/common": "6.0.0-pre.5", | ||
"tslib": "^2.0.3" | ||
}, | ||
"devDependencies": { | ||
"@twurple/auth": "6.0.0-pre.4" | ||
"@twurple/auth": "6.0.0-pre.5" | ||
}, | ||
"peerDependencies": { | ||
"@twurple/auth": "6.0.0-pre.4" | ||
"@twurple/auth": "6.0.0-pre.5" | ||
}, | ||
@@ -52,0 +52,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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1097212
30040
+ Added@twurple/api-call@6.0.0-pre.5(transitive)
+ Added@twurple/auth@6.0.0-pre.5(transitive)
+ Added@twurple/common@6.0.0-pre.5(transitive)
- Removed@twurple/api-call@6.0.0-pre.4(transitive)
- Removed@twurple/auth@6.0.0-pre.4(transitive)
- Removed@twurple/common@6.0.0-pre.4(transitive)
Updated@twurple/common@6.0.0-pre.5