Files
twitter-api-client/info/endpoints/endpoints.LoggedOutNotifications.eef9014a.js
Trevor Hobenshield 7ecd1f8fee update endpoints
2023-04-06 15:39:49 -07:00

757 lines
26 KiB
JavaScript

(self.webpackChunk_twitter_responsive_web =
self.webpackChunk_twitter_responsive_web || []).push([
["endpoints.LoggedOutNotifications", "endpoints.Graphql"],
{
29848: (e) => {
e.exports = {
queryId: "G_SoES_bCGKA0vBP9wqbBA",
operationName: "BlockedAccountsAll",
operationType: "query",
metadata: {
featureSwitches: [
"blue_business_profile_image_shape_enabled",
"responsive_web_graphql_exclude_directive_enabled",
"verified_phone_label_enabled",
"responsive_web_graphql_timeline_navigation_enabled",
"responsive_web_graphql_skip_user_profile_image_extensions_enabled",
"tweetypie_unmention_optimization_enabled",
"vibe_api_enabled",
"responsive_web_edit_tweet_api_enabled",
"graphql_is_translatable_rweb_tweet_is_translatable_enabled",
"view_counts_everywhere_api_enabled",
"longform_notetweets_consumption_enabled",
"tweet_awards_web_tipping_enabled",
"freedom_of_speech_not_reach_fetch_enabled",
"standardized_nudges_misinfo",
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled",
"interactive_text_enabled",
"responsive_web_text_conversations_enabled",
"longform_notetweets_richtext_consumption_enabled",
"responsive_web_enhance_cards_enabled",
],
},
};
},
57274: (e) => {
e.exports = {
queryId: "NzkFGAxj1ta7VoS_GTvrVA",
operationName: "BlockedAccountsAutoBlock",
operationType: "query",
metadata: {
featureSwitches: [
"blue_business_profile_image_shape_enabled",
"responsive_web_graphql_exclude_directive_enabled",
"verified_phone_label_enabled",
"responsive_web_graphql_timeline_navigation_enabled",
"responsive_web_graphql_skip_user_profile_image_extensions_enabled",
"tweetypie_unmention_optimization_enabled",
"vibe_api_enabled",
"responsive_web_edit_tweet_api_enabled",
"graphql_is_translatable_rweb_tweet_is_translatable_enabled",
"view_counts_everywhere_api_enabled",
"longform_notetweets_consumption_enabled",
"tweet_awards_web_tipping_enabled",
"freedom_of_speech_not_reach_fetch_enabled",
"standardized_nudges_misinfo",
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled",
"interactive_text_enabled",
"responsive_web_text_conversations_enabled",
"longform_notetweets_richtext_consumption_enabled",
"responsive_web_enhance_cards_enabled",
],
},
};
},
2216: (e) => {
e.exports = {
queryId: "HIeW1copXiJKbmgJA5bqlw",
operationName: "BlockedAccountsImported",
operationType: "query",
metadata: {
featureSwitches: [
"blue_business_profile_image_shape_enabled",
"responsive_web_graphql_exclude_directive_enabled",
"verified_phone_label_enabled",
"responsive_web_graphql_timeline_navigation_enabled",
"responsive_web_graphql_skip_user_profile_image_extensions_enabled",
"tweetypie_unmention_optimization_enabled",
"vibe_api_enabled",
"responsive_web_edit_tweet_api_enabled",
"graphql_is_translatable_rweb_tweet_is_translatable_enabled",
"view_counts_everywhere_api_enabled",
"longform_notetweets_consumption_enabled",
"tweet_awards_web_tipping_enabled",
"freedom_of_speech_not_reach_fetch_enabled",
"standardized_nudges_misinfo",
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled",
"interactive_text_enabled",
"responsive_web_text_conversations_enabled",
"longform_notetweets_richtext_consumption_enabled",
"responsive_web_enhance_cards_enabled",
],
},
};
},
33823: (e) => {
e.exports = {
queryId: "BqIHKmwZKtiUBPi07jKctg",
operationName: "EnableLoggedOutWebNotifications",
operationType: "mutation",
metadata: { featureSwitches: [] },
};
},
41839: (e) => {
e.exports = {
queryId: "xjJ7_nvN1nSB_z0VsPTG0Q",
operationName: "Followers",
operationType: "query",
metadata: {
featureSwitches: [
"blue_business_profile_image_shape_enabled",
"responsive_web_graphql_exclude_directive_enabled",
"verified_phone_label_enabled",
"responsive_web_graphql_timeline_navigation_enabled",
"responsive_web_graphql_skip_user_profile_image_extensions_enabled",
"tweetypie_unmention_optimization_enabled",
"vibe_api_enabled",
"responsive_web_edit_tweet_api_enabled",
"graphql_is_translatable_rweb_tweet_is_translatable_enabled",
"view_counts_everywhere_api_enabled",
"longform_notetweets_consumption_enabled",
"tweet_awards_web_tipping_enabled",
"freedom_of_speech_not_reach_fetch_enabled",
"standardized_nudges_misinfo",
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled",
"interactive_text_enabled",
"responsive_web_text_conversations_enabled",
"longform_notetweets_richtext_consumption_enabled",
"responsive_web_enhance_cards_enabled",
],
},
};
},
97621: (e) => {
e.exports = {
queryId: "_k8HIrgtw_4dPtpby5UlpQ",
operationName: "FollowersYouKnow",
operationType: "query",
metadata: {
featureSwitches: [
"blue_business_profile_image_shape_enabled",
"responsive_web_graphql_exclude_directive_enabled",
"verified_phone_label_enabled",
"responsive_web_graphql_timeline_navigation_enabled",
"responsive_web_graphql_skip_user_profile_image_extensions_enabled",
"tweetypie_unmention_optimization_enabled",
"vibe_api_enabled",
"responsive_web_edit_tweet_api_enabled",
"graphql_is_translatable_rweb_tweet_is_translatable_enabled",
"view_counts_everywhere_api_enabled",
"longform_notetweets_consumption_enabled",
"tweet_awards_web_tipping_enabled",
"freedom_of_speech_not_reach_fetch_enabled",
"standardized_nudges_misinfo",
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled",
"interactive_text_enabled",
"responsive_web_text_conversations_enabled",
"longform_notetweets_richtext_consumption_enabled",
"responsive_web_enhance_cards_enabled",
],
},
};
},
87669: (e) => {
e.exports = {
queryId: "0C6NEkU0H0sw5Eyr6DBDfg",
operationName: "Following",
operationType: "query",
metadata: {
featureSwitches: [
"blue_business_profile_image_shape_enabled",
"responsive_web_graphql_exclude_directive_enabled",
"verified_phone_label_enabled",
"responsive_web_graphql_timeline_navigation_enabled",
"responsive_web_graphql_skip_user_profile_image_extensions_enabled",
"tweetypie_unmention_optimization_enabled",
"vibe_api_enabled",
"responsive_web_edit_tweet_api_enabled",
"graphql_is_translatable_rweb_tweet_is_translatable_enabled",
"view_counts_everywhere_api_enabled",
"longform_notetweets_consumption_enabled",
"tweet_awards_web_tipping_enabled",
"freedom_of_speech_not_reach_fetch_enabled",
"standardized_nudges_misinfo",
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled",
"interactive_text_enabled",
"responsive_web_text_conversations_enabled",
"longform_notetweets_richtext_consumption_enabled",
"responsive_web_enhance_cards_enabled",
],
},
};
},
75840: (e) => {
e.exports = {
queryId: "p_N1X293N-Yc4AaZxodghg",
operationName: "GenericTimelineById",
operationType: "query",
metadata: {
featureSwitches: [
"blue_business_profile_image_shape_enabled",
"responsive_web_graphql_exclude_directive_enabled",
"verified_phone_label_enabled",
"responsive_web_graphql_timeline_navigation_enabled",
"responsive_web_graphql_skip_user_profile_image_extensions_enabled",
"tweetypie_unmention_optimization_enabled",
"vibe_api_enabled",
"responsive_web_edit_tweet_api_enabled",
"graphql_is_translatable_rweb_tweet_is_translatable_enabled",
"view_counts_everywhere_api_enabled",
"longform_notetweets_consumption_enabled",
"tweet_awards_web_tipping_enabled",
"freedom_of_speech_not_reach_fetch_enabled",
"standardized_nudges_misinfo",
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled",
"interactive_text_enabled",
"responsive_web_text_conversations_enabled",
"longform_notetweets_richtext_consumption_enabled",
"responsive_web_enhance_cards_enabled",
],
},
};
},
50931: (e) => {
e.exports = {
queryId: "e4SHzfKKTiTlbIan4UmkVQ",
operationName: "ModeratedTimeline",
operationType: "query",
metadata: {
featureSwitches: [
"blue_business_profile_image_shape_enabled",
"responsive_web_graphql_exclude_directive_enabled",
"verified_phone_label_enabled",
"responsive_web_graphql_timeline_navigation_enabled",
"responsive_web_graphql_skip_user_profile_image_extensions_enabled",
"tweetypie_unmention_optimization_enabled",
"vibe_api_enabled",
"responsive_web_edit_tweet_api_enabled",
"graphql_is_translatable_rweb_tweet_is_translatable_enabled",
"view_counts_everywhere_api_enabled",
"longform_notetweets_consumption_enabled",
"tweet_awards_web_tipping_enabled",
"freedom_of_speech_not_reach_fetch_enabled",
"standardized_nudges_misinfo",
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled",
"interactive_text_enabled",
"responsive_web_text_conversations_enabled",
"longform_notetweets_richtext_consumption_enabled",
"responsive_web_enhance_cards_enabled",
],
},
};
},
59113: (e) => {
e.exports = {
queryId: "9PDaL6jFcBxn6BZ2ZgLVAw",
operationName: "MutedAccounts",
operationType: "query",
metadata: {
featureSwitches: [
"blue_business_profile_image_shape_enabled",
"responsive_web_graphql_exclude_directive_enabled",
"verified_phone_label_enabled",
"responsive_web_graphql_timeline_navigation_enabled",
"responsive_web_graphql_skip_user_profile_image_extensions_enabled",
"tweetypie_unmention_optimization_enabled",
"vibe_api_enabled",
"responsive_web_edit_tweet_api_enabled",
"graphql_is_translatable_rweb_tweet_is_translatable_enabled",
"view_counts_everywhere_api_enabled",
"longform_notetweets_consumption_enabled",
"tweet_awards_web_tipping_enabled",
"freedom_of_speech_not_reach_fetch_enabled",
"standardized_nudges_misinfo",
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled",
"interactive_text_enabled",
"responsive_web_text_conversations_enabled",
"longform_notetweets_richtext_consumption_enabled",
"responsive_web_enhance_cards_enabled",
],
},
};
},
26491: (e) => {
e.exports = {
queryId: "t4U1Z1Jg1b7NXfqTJWdj_Q",
operationName: "SuperFollowers",
operationType: "query",
metadata: {
featureSwitches: [
"blue_business_profile_image_shape_enabled",
"responsive_web_graphql_exclude_directive_enabled",
"verified_phone_label_enabled",
"responsive_web_graphql_timeline_navigation_enabled",
"responsive_web_graphql_skip_user_profile_image_extensions_enabled",
"tweetypie_unmention_optimization_enabled",
"vibe_api_enabled",
"responsive_web_edit_tweet_api_enabled",
"graphql_is_translatable_rweb_tweet_is_translatable_enabled",
"view_counts_everywhere_api_enabled",
"longform_notetweets_consumption_enabled",
"tweet_awards_web_tipping_enabled",
"freedom_of_speech_not_reach_fetch_enabled",
"standardized_nudges_misinfo",
"tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled",
"interactive_text_enabled",
"responsive_web_text_conversations_enabled",
"longform_notetweets_richtext_consumption_enabled",
"responsive_web_enhance_cards_enabled",
],
},
};
},
16221: (e) => {
e.exports = {
queryId: "za_brGx6mpNBSDSLaMPPqw",
operationName: "ViewerTeams",
operationType: "query",
metadata: {
featureSwitches: [
"blue_business_profile_image_shape_enabled",
"responsive_web_graphql_exclude_directive_enabled",
"verified_phone_label_enabled",
"responsive_web_graphql_skip_user_profile_image_extensions_enabled",
"responsive_web_graphql_timeline_navigation_enabled",
],
},
};
},
97534: (e, _, t) => {
"use strict";
t.r(_),
t.d(_, {
default: () => M,
errorBreadcrumb: () => Q,
isFatalGenericTimelineError: () => K,
isFatalModeratedTimelineError: () => H,
isFatalTeamsResponseError: () => U,
isFatalUserScopedFollowTimelineError: () => E,
isFatalViewerScopedFollowTimelineError: () => C,
parseUserScopedTimeline: () => z,
parseViewerScopedTimeline: () => Z,
});
var n = t(58955),
i = t(79363),
a = t(72599),
r = t(32091),
o = t(17360),
l = t(83175),
s = t(6899),
d = t(49890);
const p = (e = []) => {
const _ = e.map(({ user_results: e, ..._ }) => {
var t;
let n;
if (
"User" ===
(null == e || null == (t = e.result) ? void 0 : t.__typename)
) {
const { __typename: _, ...t } = e.result;
n = t;
}
return { user: n, ..._ };
});
return (0, s.Fv)(_, d.Z);
};
var b = t(29848),
c = t.n(b),
u = t(57274),
w = t.n(u),
m = t(2216),
v = t.n(m),
h = t(41839),
g = t.n(h),
f = t(97621),
y = t.n(f),
q = t(87669),
x = t.n(q),
k = t(75840),
T = t.n(k),
A = t(50931),
B = t.n(A),
I = t(59113),
S = t.n(I),
F = t(26491),
G = t.n(F),
L = t(16221),
N = t.n(L),
P = t(82249);
const z = (e) => {
var _;
let t = P.cY;
var n;
null != e &&
null != (_ = e.user) &&
_.result &&
"User" === e.user.result.__typename &&
(t =
(null == (n = e.user.result.timeline) ? void 0 : n.timeline) ||
P.cY);
return t;
},
Q = (e) => {
var _;
return { code: null == (_ = e[0]) ? void 0 : _.code };
},
Z = (e) => {
let _ = P.cY;
var t;
null != e &&
e.viewer &&
(_ =
(null == (t = e.viewer.timeline) ? void 0 : t.timeline) || P.cY);
return _;
},
U = (e) =>
Array.isArray(e) &&
!(0, i.Z)(
e,
(e) =>
Array.isArray(e.path) &&
/^viewer.teams.act_as.\d+(.|$)/.test(e.path.join("."))
),
E = (e, _) => {
var t, n;
const i =
"User" ===
(null == _ || null == (t = _.user) || null == (n = t.result)
? void 0
: n.__typename) && _.user.result.timeline;
return (
i ||
(0, a.ZP)("GQL URT: Failed to render Follow timeline", {
extra: Q(e),
}),
!i && (0, o.jB)(e)
);
},
C = (e, _) => {
var t;
const n = null == _ || null == (t = _.viewer) ? void 0 : t.timeline;
return (
n ||
(0, a.ZP)("GQL URT: Failed to render Subscriptions timeline", {
extra: Q(e),
}),
!n && (0, o.jB)(e)
);
},
j = (e, _) => {
var t, n;
const i =
null == _ ||
null == (t = _.viewer) ||
null == (n = t.muting_timeline)
? void 0
: n.timeline;
return (
i ||
(0, a.ZP)("GQL URT: Failed to render Muting timeline", {
extra: Q(e),
}),
!i && (0, o.jB)(e)
);
},
H = (e, _) => {
var t, n;
const i =
"Tweet" ===
(null == _ || null == (t = _.tweet.result)
? void 0
: t.__typename) &&
(null == (n = _.tweet.result.timeline_response)
? void 0
: n.timeline);
return (
i ||
(0, a.ZP)(
"GQL URT: Failed to render ModeratedTimeline timeline",
{ extra: Q(e) }
),
!i && (0, o.jB)(e)
);
},
K = (e, _) => {
var t;
const n = null == _ || null == (t = _.timeline) ? void 0 : t.timeline;
return (
n ||
(0, a.ZP)("GQL URT: Failed to render GenericTimelineById", {
extra: Q(e),
}),
!n && (0, o.jB)(e)
);
};
function Y(e, _, t) {
let n;
function i(e) {
return (
e &&
e.viewer &&
e.viewer &&
e.viewer.timeline &&
e.viewer.timeline.timeline
);
}
return (
(n = e === r.kH.Imported ? v() : e === r.kH.AutoBlock ? w() : c()),
({ count: r, cursor: s }) =>
_.graphQL(
n,
{
count: r,
cursor: s,
includePromotedContent: !1,
...(0, l.d)(t),
withSafetyModeUserFields: t.isTrue(
"rito_safety_mode_features_enabled"
),
},
(_, t) => {
const n = i(t);
return (
n ||
(0, a.ZP)(
`GQL URT: Failed to query for Blocked Accounts [${e}]`,
{ extra: Q(_) }
),
!n && (0, o.jB)(_)
);
}
).then((e) => i(e) || P.cY)
);
}
const M = ({ apiClient: e, featureSwitches: _ }) => ({
fetchBlockedAccountsImportedGraphql: Y(r.kH.Imported, e, _),
fetchBlockedAccountsAllGraphql: Y(r.kH.All, e, _),
fetchBlockedAccountsAutoBlockGraphql: Y(r.kH.AutoBlock, e, _),
fetchFollowers: ({ count: t, cursor: n, userId: i }) =>
e
.graphQL(
g(),
{
userId: i,
count: t,
cursor: n,
includePromotedContent: !1,
...(0, l.d)(_),
},
E
)
.then(z),
fetchFollowersYouKnow: ({ count: t, cursor: n, userId: i }) =>
e
.graphQL(
y(),
{
userId: i,
count: t,
cursor: n,
includePromotedContent: !1,
...(0, l.d)(_),
},
E
)
.then(z),
fetchFollowing: ({ count: t, cursor: n, userId: i }) =>
e
.graphQL(
x(),
{
userId: i,
count: t,
cursor: n,
includePromotedContent: !1,
...(0, l.d)(_),
},
E
)
.then(z),
fetchSuperFollowers: ({ count: t, cursor: n }) =>
e
.graphQL(
G(),
{
count: t,
cursor: n,
includePromotedContent: !1,
...(0, l.d)(_),
},
C
)
.then(Z),
fetchViewerTeams: () =>
e
.graphQLFullResponse(N(), { ...(0, l.S)(_) }, U)
.then(({ data: e, errors: _ }) => {
const { viewer: t } = e,
i = (t && t.teams && t.teams.act_as) || [];
if (!_ || !_.length) return i;
const a = (0, n.Z)(_.map((e) => e.path && e.path[3]));
return i.filter((e, _) => !a.has(_));
})
.then(p),
fetchModeratedTimeline: ({ count: t, cursor: n, rootTweetId: i }) =>
e
.graphQL(
B(),
{
rootTweetId: i,
count: t,
cursor: n,
includePromotedContent: !1,
...(0, l.d)(_),
},
H
)
.then((e) => {
var _;
if (
"Tweet" ===
(null == (_ = e.tweet.result) ? void 0 : _.__typename)
) {
var t, n;
return (
(null == (t = e.tweet.result) ||
null == (n = t.timeline_response)
? void 0
: n.timeline) || P.cY
);
}
return P.cY;
}),
fetchMutedAccounts: ({ count: t, cursor: n }) =>
e
.graphQL(
S(),
{
count: t,
cursor: n,
includePromotedContent: !1,
...(0, l.d)(_),
},
j
)
.then((e) => {
var _, t;
return (
(null == (_ = e.viewer) || null == (t = _.muting_timeline)
? void 0
: t.timeline) || P.cY
);
}),
fetchGenericTimelineById: ({ count: t, cursor: n, timelineId: i }) =>
e
.graphQL(
T(),
{
timelineId: i,
count: t,
cursor: n,
withQuickPromoteEligibilityTweetFields: !0,
...(0, l.d)(_),
},
K
)
.then((e) => {
var _;
return (null == (_ = e.timeline) ? void 0 : _.timeline) || P.cY;
}),
});
},
54874: (e, _, t) => {
"use strict";
t.r(_),
t.d(_, {
default: () => s,
isEnableLoggedOutWebUsersNotificationsFail: () => l,
});
var n = t(72599),
i = t(17360),
a = t(33823),
r = t.n(a),
o = t(97534);
const l = (e, _) => (
(null == _ ? void 0 : _.enable_logged_out_web_notifications) ||
(0, n.ZP)(
"GQL LoggedOutNotifications: Failed to execute EnableLoggedOutWebNotifications",
{ extra: (0, o.errorBreadcrumb)(e) }
),
(0, i.jB)(e)
),
s = ({ apiClient: e, featureSwitches: _ }) => ({
enableLoggedOutWebNotifications: (_) => e.graphQL(r(), _, l),
});
},
49890: (e, _, t) => {
"use strict";
t.d(_, { B: () => r, Z: () => o });
var n = t(6899),
i = t(46395),
a = t(90650);
const r = new n.fK.Entity(
"teams",
{ user: a.Z },
{
idAttribute: ({ user: e }) => e[a.Z.idAttribute] || e,
processStrategy: i.Z,
}
),
o = new n.fK.Array(r);
},
32091: (e, _, t) => {
"use strict";
t.d(_, { Gm: () => l, ZH: () => s, kH: () => o });
var n = t(78772),
i = t(52612),
a = t(57659),
r = t(62104);
const o = { All: "any", AutoBlock: "autoblock", Imported: "imported" },
l = (e) =>
(0, r.Z)({
timelineId: `blockedAccountsGraphQL-${e}`,
network: {
getEndpoint: (_) =>
e === o.Imported
? _.Graphql.fetchBlockedAccountsImportedGraphql
: e === o.AutoBlock
? _.Graphql.fetchBlockedAccountsAutoBlockGraphql
: _.Graphql.fetchBlockedAccountsAllGraphql,
getEndpointParams: ({ count: e, cursor: _ }) => ({
count: e,
cursor: "string" == typeof _ ? _ : void 0,
}),
},
context: "FETCH_BLOCKED_ACCOUNTS",
perfKey: "blockedAccountsGraphQL",
formatResponse: n.Z,
}),
s = (e) => (_, t) => {
const n = t();
_(
e
.selectEntries(n)
.filter((e) => {
if (!e.content || e.type !== i.ZP.User) return !1;
const _ = e.content.id,
t = a.ZP.select(n, _);
return t && !t.blocking;
})
.map((_) => e.removeEntry(_.entryId))
);
};
},
},
]);
//# sourceMappingURL=https://ton.local.twitter.com/responsive-web-internal/sourcemaps/client-web/endpoints.LoggedOutNotifications.eef9014a.js.map