decord/source/actions/SubscriptionPlanActionCreators.tsx

73 lines
2.9 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 6244
2026-07-27 11:26:19 +00:00
// Function ID: 56267
2026-07-20 16:05:17 +00:00
// Name: fetchSubscriptionPlansForSKU
2026-07-25 08:10:48 +00:00
// Dependencies: [5, 3779, 653, 1852, 686, 4452, 507, 3792, 3800, 2]
2026-07-20 16:05:17 +00:00
// Exports: fetchPremiumSubscriptionPlans, fetchSubscriptionPlansBySKUs, resetSubscriptionPlanData
2026-07-25 08:10:48 +00:00
// Module 6244 (fetchSubscriptionPlansForSKU)
2026-07-23 10:11:24 +00:00
import _deletePaymentSource from "_deletePaymentSource";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import { Endpoints } from "ME";
import GuildFeatures from "GuildFeatures";
let closure_6;
let closure_7;
const require = arg1;
function fetchSubscriptionPlansForSKU(id, closure_1, arg2, soft_deleted) {
2026-07-20 16:05:17 +00:00
return _fetchSubscriptionPlansForSKU(...arguments);
}
2026-07-23 10:11:24 +00:00
async function _fetchSubscriptionPlansForSKU(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
let obj = outer2_1(outer2_2[4]);
obj = { type: "SUBSCRIPTION_PLANS_FETCH", skuId: arg0 };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
2026-07-23 10:11:24 +00:00
obj = { url: outer2_5.STORE_PUBLISHED_LISTINGS_SUBSCRIPTION_PLANS(arg0), oldFormErrors: true, rejectWithError: true, retries: 10 };
2026-07-20 16:05:17 +00:00
const obj1 = {};
2026-07-23 10:11:24 +00:00
if (null != arg1) {
obj1.country_code = arg1;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if (null != arg2) {
obj1.payment_source_id = arg2;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if (null != arg3) {
obj1.include_unpublished = arg3;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if (null != arg4) {
obj1.revenue_surface = arg4;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if (null != arg5) {
obj1.payment_gateway = arg5;
2026-07-20 16:05:17 +00:00
}
obj.query = obj1;
2026-07-23 10:11:24 +00:00
if (outer2_4.ipCountryCodeLoaded) {
const HTTP = outer2_0(outer2_2[6]).HTTP;
2026-07-20 16:05:17 +00:00
const tmp12 = yield HTTP.get(obj);
const obj2 = { type: "SUBSCRIPTION_PLANS_FETCH_SUCCESS", skuId: tmp, subscriptionPlans: tmp12.body };
2026-07-23 10:11:24 +00:00
outer2_1(outer2_2[4]).dispatch(obj2);
2026-07-20 16:05:17 +00:00
return tmp12.body;
} else {
2026-07-23 10:11:24 +00:00
return yield outer2_0(outer2_2[5]).fetchIpCountryCode();
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
tmp = arg0;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
({ ACTIVE_PREMIUM_SKUS: closure_6, PremiumSubscriptionSKUs: closure_7 } = GuildFeatures);
const result = require("ME").fileFinishedImporting("actions/SubscriptionPlanActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export { fetchSubscriptionPlansForSKU };
export const fetchSubscriptionPlansBySKUs = function fetchSubscriptionPlansBySKUs(fetchedSKUIDs, country, APPLE_ADVANCED_COMMERCE) {
2026-07-23 10:11:24 +00:00
let closure_0 = country;
let closure_1 = APPLE_ADVANCED_COMMERCE;
const found = fetchedSKUIDs.filter((arg0) => arg0 !== outer1_7.NONE);
return Promise.all(found.map((arg0) => outer1_8(arg0, closure_0, undefined, undefined, undefined, closure_1)));
2026-07-20 16:05:17 +00:00
};
export const fetchPremiumSubscriptionPlans = function fetchPremiumSubscriptionPlans(country, arg1, arg2, APPLE_ADVANCED_COMMERCE) {
2026-07-23 10:11:24 +00:00
let closure_0 = country;
let closure_1 = arg1;
let closure_2 = arg2;
let _deletePaymentSource = APPLE_ADVANCED_COMMERCE;
const found = closure_6.filter((arg0) => arg0 !== outer1_7.NONE);
return Promise.all(found.map((arg0) => outer1_8(arg0, closure_0, closure_1, undefined, closure_2, _deletePaymentSource)));
2026-07-20 16:05:17 +00:00
};
export const resetSubscriptionPlanData = function resetSubscriptionPlanData() {
2026-07-23 10:11:24 +00:00
importDefault(686).dispatch({ type: "SUBSCRIPTION_PLANS_RESET" });
2026-07-20 16:05:17 +00:00
};