"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchActivityLogs = exports.createActivityLog = void 0;
const callControlPlaneApi_1 = require("../callContolPlane/callControlPlaneApi");
/**
 * Create a new activity log for an organization
 * @param token - Authentication token
 * @param params - Object containing orgId and activityData
 * @returns Promise with the created activity log response
 */
const createActivityLog = async (token, params) => {
    try {
        const response = await (0, callControlPlaneApi_1.callControlPlane)(`/organizations/${params.orgId}/activity-logs`, {
            method: 'POST',
            params: params.activityData,
        }, token);
        return response;
    }
    catch (error) {
        console.error('Error creating activity log:', error);
        throw error;
    }
};
exports.createActivityLog = createActivityLog;
/**
 * Fetch activity logs for an organization
 * @param token - Authentication token
 * @param params - Object containing orgId and optional queryParams
 * @returns Promise with the activity logs response
 */
const fetchActivityLogs = async (token, params) => {
    try {
        const response = await (0, callControlPlaneApi_1.callControlPlane)(`/organizations/${params.orgId}/activity-logs`, {
            method: 'GET',
            params: params.queryParams || {},
        }, token);
        return response;
    }
    catch (error) {
        console.error('Error fetching activity logs:', error);
        throw error;
    }
};
exports.fetchActivityLogs = fetchActivityLogs;
//# sourceMappingURL=index.js.map