37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
// Metro module 8952 (f8953).
|
|
import { Endpoints } from "../../Constants";
|
|
import { HTTP, rejectWithMigratedError } from "../../_bundle/sendRequest";
|
|
import { ApplicationDisclosureType } from "../../_bundle/Module8953";
|
|
import { intl, t } from "../../intl/index.native";
|
|
export const ApplicationDisclosure = ApplicationDisclosureType;
|
|
export async function getDisclosures(c26326_0) {
|
|
let c30008_0 = await HTTP.get({
|
|
url: Endpoints.APPLICATION_DISCLOSURES(c26326_0),
|
|
retries: 3,
|
|
rejectWithError: rejectWithMigratedError()
|
|
});
|
|
return {
|
|
disclosures: c30008_0.body.disclosures,
|
|
ackedDisclosures: c30008_0.body.acked_disclosures,
|
|
allAcked: c30008_0.body.all_acked
|
|
};
|
|
}
|
|
export async function ackDisclosures(c26327_0, disclosures) {
|
|
await HTTP.post({
|
|
url: Endpoints.APPLICATION_DISCLOSURES(c26327_0),
|
|
body: {
|
|
disclosures
|
|
},
|
|
rejectWithError: rejectWithMigratedError()
|
|
});
|
|
}
|
|
export function getTextForDisclosure(a0) {
|
|
if (ApplicationDisclosureType.IP_LOCATION === a0) {
|
|
return intl.string(t["6wPmjo"]);
|
|
}
|
|
if (ApplicationDisclosureType.DISPLAYS_ADVERTISEMENTS === a0) {
|
|
return intl.string(t["/uOMKZ"]);
|
|
}
|
|
return null;
|
|
}
|