shipthis
Version:
ShipThis manages building and uploading your Godot games to the App Store and Google Play.
49 lines (46 loc) • 1.46 kB
JavaScript
import axios from 'axios';
import { o as API_URL, p as getAuthedHeaders, F as castArrayObjectDates } from './baseCommand-CTn3KGH3.js';
import 'node:fs';
async function getUserCredentials(pageSize = 100) {
const headers = getAuthedHeaders();
const { data } = await axios({
headers,
method: "get",
url: `${API_URL}/credentials?pageSize=${pageSize}`
});
return castArrayObjectDates(data.data);
}
async function deleteUserCredential(options) {
const headers = getAuthedHeaders();
const { data } = await axios({
headers,
method: "delete",
url: `${API_URL}/credentials/${options.credentialId}`,
params: {
isImmediate: options.isImmediate
}
});
return data;
}
async function getProjectCredentials(projectId, pageSize = 100) {
const headers = getAuthedHeaders();
const { data } = await axios({
headers,
method: "get",
url: `${API_URL}/projects/${projectId}/credentials?pageSize=${pageSize}`
});
return castArrayObjectDates(data.data);
}
async function deleteProjectCredential(projectId, options) {
const headers = getAuthedHeaders();
const { data } = await axios({
headers,
method: "delete",
url: `${API_URL}/projects/${projectId}/credentials/${options.credentialId}`,
params: {
isImmediate: options.isImmediate
}
});
return data;
}
export { getProjectCredentials as a, deleteProjectCredential as b, deleteUserCredential as d, getUserCredentials as g };