RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

source

Controllers/Packhouse/Integrations/ExternalShiftManagementController.js

/**
 * File Auto-Generated by the RICADO Gen 4 PHP API Project
 * 
 * Do Not Edit this File Manually!
 */

import RequestHelper from '../../../RequestHelper';

/**
 * The External Shift Management Controller Class
 * 
 * @class
 */
class ExternalShiftManagementController
{
    /**
     * Update Teams Head Count [POST /integrations/packhouse/external-shift-management/update-teams-headcount]
     * 
     * Update the Current Shift Manning Head Count by Team for a given Packing Line
     * 
     * @static
     * @public
     * @param {ExternalShiftManagementController.PackingLineTeamsHeadCount} objectData The Object Properties
     * @return {Promise<boolean>}
     */
    static updateTeamsHeadCount(objectData)
    {
        return new Promise((resolve, reject) => {
            RequestHelper.postRequest(`/integrations/packhouse/external-shift-management/update-teams-headcount`, objectData)
            .then((result) => {
                resolve(result ?? true);
            })
            .catch(error => reject(error));
        });
    }
}

export default ExternalShiftManagementController;

/**
 * A **TeamHeadCount** Type
 * 
 * @typedef {Object} ExternalShiftManagementController.TeamHeadCount
 * @property {string} team Name of the Team
 * @property {number} count Number of People Present in the Team
 * @memberof Controllers.Packhouse.Integrations
 */

/**
 * A **PackingLineTeamsHeadCount** Type
 * 
 * @typedef {Object} ExternalShiftManagementController.PackingLineTeamsHeadCount
 * @property {number} siteId Numeric ID of the RICADO Site
 * @property {string} packingLineId UUID of the Packing Line
 * @property {Array<ExternalShiftManagementController.TeamHeadCount>} headCounts An Array of Head Counts by Team
 * @property {Date} validAfterTimestamp Timestamp of when this Head Count Data should be Applied
 * @memberof Controllers.Packhouse.Integrations
 */