Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
var
www
podio-api-client
lib
modules
api
File Content:
Application.js
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Api_1 = __importDefault(require("./Api")); class Application extends Api_1.default { /** * @constructor */ constructor(props) { super(props); } /** * Activates a deactivated app. This puts the app back in the app navigator and allows insertion of new items. * @see https://developers.podio.com/doc/applications/activate-app-43822 * @param {number} app_id * @returns {Promise<HttpResponse<string>>} */ activate(app_id) { const requestObj = { method: 'post', url: `/app/${app_id}/activate`, }; return this._httpRequest(requestObj); } /** * Create new application * @see https://developers.podio.com/doc/applications/add-new-app-22351 * @param {number} attributes * @param {boolean} silent * @param {boolean} hook * @returns {Promise<HttpResponse<CreateApplicationType>>} */ create(attributes, silent = false, hook = true) { const requestObj = { method: 'post', url: `/app/?silent=${silent}&hook=${hook}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Adds a new field to an app * @see https://developers.podio.com/doc/applications/add-new-app-field-22354 * @param {number} app_id * @param {any} attributes * @returns {Promise<HttpResponse<AppFieldType>>} */ createField(app_id, attributes = {}) { const requestObj = { method: 'post', url: `/app/${app_id}/field/`, data: attributes, }; return this._httpRequest(requestObj); } /** * Deactivates the app with the given id. This removes the app from the app navigator, and disables insertion of new items. * @see https://developers.podio.com/doc/applications/deactivate-app-43821 * @param {number} app_id * @returns */ deactivate(app_id) { const requestObj = { method: 'post', url: `/app/${app_id}/deactivate`, }; return this._httpRequest(requestObj); } /** * Delete application * @see https://developers.podio.com/doc/applications/delete-app-43693 * @param {number} app_id * @param {boolean} silent * @returns */ delete(app_id, silent = false) { const requestObj = { method: 'delete', url: `/item/${app_id}/?silent=${silent}`, }; return this._httpRequest(requestObj); } /** * Deletes a field on an app. * @see https://developers.podio.com/doc/applications/delete-app-field-22355 * @param {number} app_id * @param {number | string} field_id * @param {any} attributes * @returns */ deleteField(app_id, field_id, attributes = {}) { const requestObj = { method: 'delete', url: `/app/${app_id}/field/${field_id}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Returns all the apps for the active user. * @see https://developers.podio.com/doc/applications/get-all-apps-5902728 * @param {any} attributes * @returns {Promise<HttpResponse<AppType[]>>} */ getAll(attributes = {}) { const requestObj = { method: 'get', url: `/app/`, params: attributes, }; return this._httpRequest(requestObj); } /** * Get Podio application * @param {number} app_id - Podio app id * @returns */ get(app_id) { const requestObj = { method: 'get', url: `/app/${app_id}`, }; return this._httpRequest(requestObj); } /** * Returns app based on the provided org_label, space_label and app_label. * @param {string} org_label * @param {string} space_label * @param {string} app_label * @returns */ getByLabels(org_label, space_label, app_label) { const requestObj = { method: 'get', url: `/app/org/${org_label}/space/${space_label}/${app_label}`, }; return this._httpRequest(requestObj); } /** * Returns the apps that the given app depends on. * @param {number} app_id * @returns {Promise<HttpResponse<AppDependencyType>> } */ dependencies(app_id) { const requestObj = { method: 'get', url: `/app/${app_id}/dependencies/`, }; return this._httpRequest(requestObj); } /** * Returns the app on the given space with the given URL label * @param {number} space_id * @param {number} url_label * @param {number} attributes * @returns {Promise<HttpResponse<ApplicationType>>} */ getForUrl(space_id, url_label, attributes = {}) { const requestObj = { method: 'get', url: `/app/space/${space_id}/${url_label}`, params: attributes, }; return this._httpRequest(requestObj); } /** * Returns all the apps on the space that are visible. * @param {number} space_id * @param {any} attributes * @returns {Promise<HttpResponse<AppType[]>>} */ getForSpace(space_id, attributes = {}) { const requestObj = { method: 'get', url: `/app/space/${space_id}/`, params: attributes, }; return this._httpRequest(requestObj); } /** * Returns the features that the given apps and optionally space includes. * @param {any} attributes * @returns {Promise<HttpResponse<string[]>>} */ features(attributes = {}) { const requestObj = { method: 'get', url: `/app/features/`, params: attributes, }; return this._httpRequest(requestObj); } /** * Search for icons * @param {string} search * @returns */ search(search) { const requestObj = { method: 'get', url: `/app/icon/search?query=${search}`, }; return this._httpRequest(requestObj); } /** * Returns all the active apps on the space along with their dependencies. The dependencies are only one level deep. * @param {number} space_id * @returns */ dependenciesSpace(space_id) { const requestObj = { method: 'get', url: `/space/${space_id}/dependencies/`, }; return this._httpRequest(requestObj); } /** * Returns the top apps for the active user. This is the apps that the user have interacted with the most. * @param {any} attributes * @returns */ getTop(attributes = {}) { const requestObj = { method: 'get', url: `/app/top/`, params: attributes, }; return this._httpRequest(requestObj); } /** * Returns the top apps for the user inside the given organization * @param {number} org_id * @param {any} attributes * @returns {Promise<HttpResponse<AppType[]>>} */ getTopForOrg(org_id, attributes = {}) { const requestObj = { method: 'get', url: `/app/org/${org_id}/top/`, params: attributes, }; return this._httpRequest(requestObj); } /** * Installs the app with the given id on the space. * @param {number} app_id * @param {any} attributes * @returns {Promise<HttpResponse<CreateApplicationType>>} */ install(app_id, attributes = {}) { const requestObj = { method: 'post', url: `/app/${app_id}/install`, data: attributes, }; return this._httpRequest(requestObj); } /** * Updates the configuration of an app field. The type of the field cannot be updated, only the configuration. * @param {number} app_id * @param {number} field_id * @param {any} attributes * @returns {Promise<HttpResponse<AppFieldUpdateType>>} */ updateField(app_id, field_id, attributes = {}) { const requestObj = { method: 'put', url: `/app/${app_id}/field/${field_id}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Update application * @param {number} app_id * @param {any} attributes * @returns {Promise<HttpResponse<ApplicationType>>} */ update(app_id, attributes, silent = false, hook = true) { const requestObj = { method: 'put', url: `/app/${app_id}/v2/?silent=${silent}&hook=${hook}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Updates the app with a new description * @param {number} app_id * @param {any} attributes * @param {boolean} silent * @param {boolean} hook * @returns */ updateDescription(app_id, attributes, silent = false, hook = true) { const requestObj = { method: 'put', url: `/app/${app_id}/description?silent=${silent}&hook=${hook}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Updates the order of the apps on the space. It should post all the apps from the space in the order required. * @param {number} space_id * @returns {Promise<HttpResponse<string>>} */ updateOrder(space_id, attributes) { const requestObj = { method: 'put', url: `/app/space/${space_id}/order`, data: attributes, }; return this._httpRequest(requestObj); } /** * Updates the usage instructions for the app * @param {number} app_id * @param {any} attributes * @param {boolean} silent * @param{boolean} hook * @returns */ updateUsage(app_id, attributes, silent = false, hook = true) { const requestObj = { method: 'put', url: `/app/${app_id}/usage?silent=${silent}&hook=${hook}`, data: attributes, }; return this._httpRequest(requestObj); } } exports.default = Application;
Edit
Download
Unzip
Chmod
Delete