
Security News
Feross on Risky Business Weekly Podcast: npm’s Ongoing Supply Chain Attacks
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
@timetac/js-core
Advanced tools
Core library for sharing state (Redux) and business logic in general between our (React) frontend projects.
Core library for sharing state (Redux) and business logic in general between our (React) frontend projects.
In the project directory, you can run:
yarn install
Installs all dependencies.
yarn dev
Run the compiler in watch mode. Watch input files and trigger recompilation on changes. The implementation of watching files and directories can be configured using environment variable. See configuring watch for more details.
yarn test
Launches the test runner in the interactive watch mode.
import { Core } from '@timetac/js-core
;
Core.slices.login.actions.requestServerCommunication(
PayloadAction<{ account: string }>
)
Core.slices.login.actions.requestUsernamePasswordLogin(PayloadAction<{
username: string;
password: string;
clientId: string;
clientSecret: string;}>)
Core.slices.login.actions.requestUsersMe()
Core.slices.login.actions.resetAccountName()
Core.slices.user.actions.requestSync()
Core.slices.timeTrackings.actions.requestRead(PayloadAction<RequestParams<TimeTracking>>)
Core.slices.timeTrackings.actions.requestReadPayloadAction<TimeTrackingCreate>
interface TimeTracking {
id: number;
user_id: number;
task_id: number;
start_time?: string; // dateTimeString ??
end_time?: string; // dateTimeString ??
/**
* Timezone, eg. Europe/Vienna, that is mandatory if action is CREATE
*/
start_time_timezone?: string;
/**
* Timezone id for start_time
*/
start_time_timezone_id?: number;
/**
* Timezone needs to be set if end_time field value is set
*/
end_time_timezone?: string;
/**
* Timezone id for end_time
*/
end_time_timezone_id?: number;
/**
* The department id to which the timetrackings user (pm_time_tracking.user_id)
* was assigned at the time start_date of the timeTracking.
*/
department_id?: number;
/**
* The department role id to which the timetrackings user (pm_time_tracking.user_id)
* was assigned at the time start_date of the timeTracking.
*/
department_role_id?: number;
start_time_offset?: number;
end_time_offset?: number;
timezone?: string;
/**
* Whether the start of the timer was booked live or not
*/
is_start_live?: boolean;
/**
* Whether the end of the timer was booked live or not
*/
is_end_live?: boolean;
time?: string;
duration?: number;
status?: number;
start_ip?: string;
end_ip?: string;
is_statistic_countable?: boolean;
max_hours_alert?: boolean;
input_type?: number;
t_iv_1?: string;
/**
* if 1, admin has approved time tracking entry (no change possible)
*/
approved_by_admin?: boolean;
geo_start_lat?: number;
geo_start_long?: number;
geo_start_accuracy?: number;
geo_end_lat?: number;
geo_end_long?: number;
geo_end_accuracy?: number;
geo_lat?: number;
geo_long?: number;
geo_accuracy?: number;
updated?: string;
/**
* Id of latest time tracking change request
*/
last_change_time_tracking_request_id?: number;
/**
* Special unique case: If a to-be-inserted value is not null and exists already,
* the create action should successfully return the existing row instead of creating
* (and no unique error)
*/
client_unique_id?: string;
/**
* 0 = post-dated, 1 = live, 2 = nfc
*/
start_type_id?: number;
/**
* 0 = post-dated, 1 = live, 2 = nfc
*/
end_type_id?: number;
notes?: string;
is_billable?: boolean;
is_nonworking?: boolean;
}
interface TimeTrackingCreate extends Omit<TimeTracking, 'id'> {}
Structure of js-core
redux state:
error: {
timestamp?: number;
host?: string;
Error?: number;
ErrorMessage?: string;
ErrorExtended?: Record<string, unknown>;
}[];
login: {
account?: string;
serverCommunication?: {
host: string;
authenticationType: 'AUTHORIZATION_CODE_GRANT' | 'PASSWORD_GRANT';
};
user?: User;
state?: number | string;
codeVerifier?: string;
tokens?: {
accessToken?: string;
refreshToken?: string;
};
rehydrated: boolean;
};
initialLoad: {
completed: boolean;
startedAt: string | null;
completedAt: string | null;
blockingResourcesCompleted: {
absenceTypes: boolean;
generalSettings: boolean;
projects: boolean;
tasks: boolean;
users: boolean;
};
};
entities: {
absenceDays: {
ids: [],
entities: {}
};
absences: {
ids: [],
entities: {}
};
absenceTypes: {
ids: [],
entities: {}
};
favouriteTasks: {
ids: [],
entities: {}
};
generalSettings: {
ids: [],
entities: {}
};
projects: {
ids: [],
entities: {}
};
recentTasks: {
ids: [],
entities: {}
};
tasks: {
ids: [],
entities: {}
};
timesheetAccountings: {
ids: [],
entities: {}
};
todoTasks: {
ids: [],
entities: {}
};
users: {
ids: [],
entities: {}
};
userStatusOverviews: {
ids: [],
entities: {}
};
}
}```
FAQs
Core library for sharing state (Redux) and business logic in general between our (React) frontend projects.
We found that @timetac/js-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.