162 lines
8.7 KiB
TypeScript
162 lines
8.7 KiB
TypeScript
/* Metro module 9474; source: modules/premium_apps/ApplicationSubscriptionsHttpApi.tsx; dependencies: [5, 661, 507, 694, 4132, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as HTTPUtilsModule from '../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun73671(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:6, offset: 0x01d74837, size: 217 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const value = _fun73675();
|
|
const value2 = _fun73679();
|
|
const value3 = _fun73683();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium_apps/ApplicationSubscriptionsHttpApi.tsx');
|
|
exports.getApplicationSubscriptionGroupListingsForApplication = value;
|
|
exports.getEntitlementsForGuild = value2;
|
|
exports.getSubscriptionGroupForSubscriptionPlan = value3;
|
|
exports.fetchApplication = fetchApplication_73687;
|
|
exports.fetchEligibleApplicationSubscriptionGuilds = function() {
|
|
return _fetchEligibleApplicationSubscriptionGuilds.apply(this, arguments);
|
|
};
|
|
function _fetchEligibleApplicationSubscriptionGuilds() { // fn#73672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:736, offset: 0x01d74910, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun73674).apply(this, arguments);
|
|
function* _fun73674(a0, a1) { // fn#73674, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:845, offset: 0x01d7494d, size: 116 bytes, params: 3, frame: 14
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const HTTP = env2_0(env2_2[2]).HTTP;
|
|
const get = HTTP.get;
|
|
const ELIGIBLE_APPLICATION_SUBSCRIPTION_GUILDS = env2_4.ELIGIBLE_APPLICATION_SUBSCRIPTION_GUILDS;
|
|
yield Reflect.apply(get, HTTP, [{url: ELIGIBLE_APPLICATION_SUBSCRIPTION_GUILDS, query: {application_id: a0,
|
|
sku_id: a1}, rejectWithError: false}]);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value.body;
|
|
}
|
|
|
|
}
|
|
|
|
function _fun73675() { // fn#73675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:130, offset: 0x01d749c1, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = Module00005(_fun73677);
|
|
return _fun73678;
|
|
function* _fun73677(a0, a1) { // fn#73677, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:150, offset: 0x01d749f0, size: 105 bytes, params: 3, frame: 17
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const HTTP = env2_0(env2_2[2]).HTTP;
|
|
const get = HTTP.get;
|
|
const object = {};
|
|
object.url = env2_4.APPLICATION_SUBSCRIPTION_GROUP_LISTING(a0, a1);
|
|
object.rejectWithError = false;
|
|
yield Reflect.apply(get, HTTP, [object]);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value.body;
|
|
}
|
|
|
|
function _fun73678() { // fn#73678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:283, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun73679() { // fn#73679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:331, offset: 0x01d74a59, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = Module00005(_fun73681);
|
|
return _fun73682;
|
|
function* _fun73681(a0) { // fn#73681, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:351, offset: 0x01d74a88, size: 120 bytes, params: 2, frame: 15
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const HTTP = env2_0(env2_2[2]).HTTP;
|
|
const get = HTTP.get;
|
|
const object = {};
|
|
object.url = env2_4.GUILD_ENTITLEMENTS(a0);
|
|
object.query = {'with_sku': true, 'with_application': true};
|
|
object.rejectWithError = false;
|
|
yield Reflect.apply(get, HTTP, [object]);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value.body;
|
|
}
|
|
|
|
function _fun73682() { // fn#73682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:500, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun73683() { // fn#73683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:548, offset: 0x01d74b00, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = Module00005(_fun73685);
|
|
return _fun73686;
|
|
function* _fun73685(a0) { // fn#73685, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:568, offset: 0x01d74b2f, size: 101 bytes, params: 2, frame: 15
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const HTTP = env2_0(env2_2[2]).HTTP;
|
|
const get = HTTP.get;
|
|
const object = {};
|
|
object.url = env2_4.SUBSCRIPTION_PLAN_GROUP_LISTING(a0);
|
|
object.rejectWithError = false;
|
|
yield Reflect.apply(get, HTTP, [object]);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value.body;
|
|
}
|
|
|
|
function _fun73686() { // fn#73686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:690, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function fetchApplication_73687(a0, a1) { // fn#73687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:1268, offset: 0x01d74b94, size: 161 bytes, params: 3, frame: 17
|
|
const env0_0 = a0;
|
|
(Dispatcher).dispatch({type: 'APPLICATION_FETCH', applicationId: a0});
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
const get = HTTP.get;
|
|
object = {};
|
|
object.url = Endpoints.APPLICATION_PUBLIC(a0);
|
|
object.signal = a1;
|
|
object.rejectWithError = false;
|
|
let value = Reflect.apply(get, HTTP, [object]);
|
|
value = value.then(_fun73688);
|
|
return value.catch(_fun73689);
|
|
function _fun73688(a0) { // fn#73688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:1449, offset: 0x01d74c35, size: 70 bytes, params: 2, frame: 13
|
|
const value = environment.__proto__;
|
|
(Dispatcher).dispatch({'type': 'APPLICATION_FETCH_SUCCESS',
|
|
'application': null, 'isHydrated': true, application: a0.body});
|
|
return a0.body;
|
|
}
|
|
|
|
function _fun73689(a0) { // fn#73689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9660:1556, offset: 0x01d74c7b, size: 112 bytes, params: 2, frame: 15
|
|
let value = environment.__proto__;
|
|
(Dispatcher).dispatch({type: 'APPLICATION_FETCH_FAIL',
|
|
applicationId: env0_0});
|
|
const Promise = global.Promise;
|
|
const reject = Promise.reject;
|
|
value = importDefault(4132) /* metro dependency 4132: APIError */;
|
|
value = new value(a0);
|
|
return Reflect.apply(reject, Promise, [value]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun73671, 9474, [5, 661, 507, 694, 4132,
|
|
2]) /* metro module 9474, dependencies: [5, 661, 507, 694, 4132, 2] */;
|