@go-avro/avro-js 0.0.4-beta.3 → 0.0.4-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/AuthManager.d.ts +2 -2
- package/dist/client/QueryClient.d.ts +55 -2
- package/dist/client/QueryClient.js +29 -7
- package/dist/client/hooks/catalog_items.js +8 -1
- package/dist/client/hooks/jobs.js +7 -3
- package/dist/client/hooks/prepayments.js +60 -1
- package/dist/client/hooks/proposal.js +8 -1
- package/dist/client/hooks/routes.js +13 -8
- package/dist/client/hooks/users.js +15 -1
- package/dist/client/hooks/waivers.d.ts +1 -0
- package/dist/client/hooks/waivers.js +123 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/types/api/AdditionalCharge.d.ts +5 -0
- package/dist/types/api/AdditionalCharge.js +1 -0
- package/dist/types/api/Avro.d.ts +11 -0
- package/dist/types/api/Avro.js +1 -0
- package/dist/types/api/Bill.d.ts +27 -0
- package/dist/types/api/Bill.js +1 -0
- package/dist/types/api/BillPayment.d.ts +13 -0
- package/dist/types/api/BillPayment.js +1 -0
- package/dist/types/api/BillUser.d.ts +11 -0
- package/dist/types/api/BillUser.js +1 -0
- package/dist/types/api/Break.d.ts +7 -0
- package/dist/types/api/Break.js +1 -0
- package/dist/types/api/CatalogItem.d.ts +16 -0
- package/dist/types/api/CatalogItem.js +1 -0
- package/dist/types/api/Chat.d.ts +12 -0
- package/dist/types/api/Chat.js +1 -0
- package/dist/types/api/Company.d.ts +58 -0
- package/dist/types/api/Company.js +1 -0
- package/dist/types/api/CustomLineItem.d.ts +4 -0
- package/dist/types/api/CustomLineItem.js +1 -0
- package/dist/types/api/Email.d.ts +21 -0
- package/dist/types/api/Email.js +1 -0
- package/dist/types/api/Friendship.d.ts +2 -0
- package/dist/types/api/Friendship.js +1 -0
- package/dist/types/api/Group.d.ts +12 -0
- package/dist/types/api/Group.js +1 -0
- package/dist/types/api/Job.d.ts +36 -0
- package/dist/types/api/Job.js +22 -0
- package/dist/types/api/Label.d.ts +7 -0
- package/dist/types/api/Label.js +1 -0
- package/dist/types/api/LineItem.d.ts +41 -0
- package/dist/types/api/LineItem.js +30 -0
- package/dist/types/api/MemberState.d.ts +7 -0
- package/dist/types/api/MemberState.js +1 -0
- package/dist/types/api/Message.d.ts +13 -0
- package/dist/types/api/Message.js +1 -0
- package/dist/types/api/PaymentMethod.d.ts +51 -0
- package/dist/types/api/PaymentMethod.js +1 -0
- package/dist/types/api/PaymentOption.d.ts +9 -0
- package/dist/types/api/PaymentOption.js +1 -0
- package/dist/types/api/PaymentType.d.ts +5 -0
- package/dist/types/api/PaymentType.js +5 -0
- package/dist/types/api/Plan.d.ts +13 -0
- package/dist/types/api/Plan.js +1 -0
- package/dist/types/api/PlanPayment.d.ts +10 -0
- package/dist/types/api/PlanPayment.js +1 -0
- package/dist/types/api/Prepayment.d.ts +15 -0
- package/dist/types/api/Prepayment.js +7 -0
- package/dist/types/api/Reaction.d.ts +8 -0
- package/dist/types/api/Reaction.js +1 -0
- package/dist/types/api/Route.d.ts +37 -0
- package/dist/types/api/Route.js +82 -0
- package/dist/types/api/RouteJob.d.ts +15 -0
- package/dist/types/api/RouteJob.js +5 -0
- package/dist/types/api/ServiceMonth.d.ts +7 -0
- package/dist/types/api/ServiceMonth.js +1 -0
- package/dist/types/api/Session.d.ts +13 -0
- package/dist/types/api/Session.js +1 -0
- package/dist/types/api/Skill.d.ts +7 -0
- package/dist/types/api/Skill.js +1 -0
- package/dist/types/api/Subscription.d.ts +8 -0
- package/dist/types/api/Subscription.js +1 -0
- package/dist/types/api/Task.d.ts +57 -0
- package/dist/types/api/Task.js +74 -0
- package/dist/types/api/User.d.ts +23 -0
- package/dist/types/api/User.js +1 -0
- package/dist/types/api/UserCompanyAssociation.d.ts +71 -0
- package/dist/types/api/UserCompanyAssociation.js +53 -0
- package/dist/types/api/UserEvent.d.ts +13 -0
- package/dist/types/api/UserEvent.js +1 -0
- package/dist/types/api/Waiver.d.ts +9 -0
- package/dist/types/api/Waiver.js +1 -0
- package/dist/types/api/_Event.d.ts +19 -0
- package/dist/types/api/_Event.js +1 -0
- package/dist/types/api.d.ts +43 -587
- package/dist/types/api.js +37 -74
- package/dist/types/cache.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare module '../../types/api/RouteJob' {
|
|
2
|
+
interface RouteJob {
|
|
3
|
+
time_created: number;
|
|
4
|
+
route_id: string;
|
|
5
|
+
job_id: string;
|
|
6
|
+
id: string;
|
|
7
|
+
order: number;
|
|
8
|
+
estimated_arrival_time: number;
|
|
9
|
+
scheduled_arrival_time: number;
|
|
10
|
+
tasks: string[];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export declare class RouteJob {
|
|
14
|
+
constructor(init?: Partial<RouteJob>);
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Break } from "../../types/api/Break";
|
|
2
|
+
export interface Session {
|
|
3
|
+
id: string;
|
|
4
|
+
user_id: string;
|
|
5
|
+
company_id: string;
|
|
6
|
+
time_started: number;
|
|
7
|
+
time_ended: number;
|
|
8
|
+
break_id: string;
|
|
9
|
+
is_paused: boolean;
|
|
10
|
+
team_id: string;
|
|
11
|
+
route_id: string;
|
|
12
|
+
breaks: Break[];
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { UserCompanyAssociation } from "../../types/api/UserCompanyAssociation";
|
|
2
|
+
import { Prepayment } from "../../types/api/Prepayment";
|
|
3
|
+
import { PaymentOption } from "../../types/api/PaymentOption";
|
|
4
|
+
import { _Event } from "../../types/api/_Event";
|
|
5
|
+
export declare const TaskStatus: {
|
|
6
|
+
readonly PENDING_CUSTOMER: "PENDING_CUSTOMER";
|
|
7
|
+
readonly PENDING_COMPANY: "PENDING_COMPANY";
|
|
8
|
+
readonly ACTIVE: "ACTIVE";
|
|
9
|
+
readonly ARCHIVED: "ARCHIVED";
|
|
10
|
+
readonly DRAFT: "DRAFT";
|
|
11
|
+
readonly PENDING_PAYMENT: "PENDING_PAYMENT";
|
|
12
|
+
readonly PENDING_ACTIVATION: "PENDING_ACTIVATION";
|
|
13
|
+
};
|
|
14
|
+
export type TaskStatus = typeof TaskStatus[keyof typeof TaskStatus];
|
|
15
|
+
declare module '../../types/api/Task' {
|
|
16
|
+
interface Task {
|
|
17
|
+
enforce_proof_amount: boolean;
|
|
18
|
+
events: _Event[];
|
|
19
|
+
payment_options: PaymentOption[];
|
|
20
|
+
frequency: number;
|
|
21
|
+
id: string;
|
|
22
|
+
job_id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
internal_notes: string;
|
|
25
|
+
external_notes: string;
|
|
26
|
+
proof_amt: number;
|
|
27
|
+
images: string[];
|
|
28
|
+
time_created: number;
|
|
29
|
+
time_updated: number | null;
|
|
30
|
+
status: TaskStatus;
|
|
31
|
+
created_by: UserCompanyAssociation | null;
|
|
32
|
+
overdueness: number | null;
|
|
33
|
+
overdue_time: number;
|
|
34
|
+
last_completed_event: _Event | null;
|
|
35
|
+
current_event: _Event | null;
|
|
36
|
+
delay: number;
|
|
37
|
+
skills: string[];
|
|
38
|
+
service: number;
|
|
39
|
+
bill_mode: "MONTH" | "SERVICE" | "NONE";
|
|
40
|
+
price: number;
|
|
41
|
+
services_remaining: number;
|
|
42
|
+
activate_on: number | null;
|
|
43
|
+
expire_on: number | null;
|
|
44
|
+
catalog_item_id: string | null;
|
|
45
|
+
bill_day: number | null;
|
|
46
|
+
prepayments: Prepayment[];
|
|
47
|
+
priority: boolean;
|
|
48
|
+
route_ids: string[];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export declare class Task {
|
|
52
|
+
constructor(init?: Partial<Task>);
|
|
53
|
+
computeNextTaskState: (isCustomer: boolean, action: "accept" | "modify" | "reject") => TaskStatus;
|
|
54
|
+
getPrepaidEventsRemaining: () => number;
|
|
55
|
+
getPrepaidMonthsRemaining: () => number;
|
|
56
|
+
isDone: (fallback?: Date | null) => boolean | 1;
|
|
57
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Prepayment } from "../../types/api/Prepayment";
|
|
2
|
+
export const TaskStatus = {
|
|
3
|
+
PENDING_CUSTOMER: "PENDING_CUSTOMER",
|
|
4
|
+
PENDING_COMPANY: "PENDING_COMPANY",
|
|
5
|
+
ACTIVE: "ACTIVE",
|
|
6
|
+
ARCHIVED: "ARCHIVED",
|
|
7
|
+
DRAFT: "DRAFT",
|
|
8
|
+
PENDING_PAYMENT: "PENDING_PAYMENT",
|
|
9
|
+
PENDING_ACTIVATION: "PENDING_ACTIVATION"
|
|
10
|
+
};
|
|
11
|
+
export class Task {
|
|
12
|
+
constructor(init) {
|
|
13
|
+
this.computeNextTaskState = (isCustomer, action) => {
|
|
14
|
+
if (action === "accept") {
|
|
15
|
+
if (this.status === TaskStatus.PENDING_CUSTOMER || this.status === TaskStatus.PENDING_COMPANY) {
|
|
16
|
+
if (this.prepayments.filter(p => !p.isPaid()).length > 0) {
|
|
17
|
+
return TaskStatus.PENDING_PAYMENT;
|
|
18
|
+
}
|
|
19
|
+
if (this.activate_on && this.activate_on * 1000 > Date.now()) {
|
|
20
|
+
return TaskStatus.PENDING_ACTIVATION;
|
|
21
|
+
}
|
|
22
|
+
return TaskStatus.ACTIVE;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
else if (action === "reject") {
|
|
26
|
+
return TaskStatus.ARCHIVED;
|
|
27
|
+
}
|
|
28
|
+
else if (action === "modify") {
|
|
29
|
+
if (this.status === TaskStatus.PENDING_CUSTOMER && isCustomer) {
|
|
30
|
+
return TaskStatus.PENDING_COMPANY;
|
|
31
|
+
}
|
|
32
|
+
else if (this.status === TaskStatus.PENDING_COMPANY && !isCustomer) {
|
|
33
|
+
return TaskStatus.PENDING_CUSTOMER;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return this.status;
|
|
37
|
+
};
|
|
38
|
+
this.getPrepaidEventsRemaining = () => {
|
|
39
|
+
return this.prepayments.reduce((acc, prepayment) => {
|
|
40
|
+
if (prepayment.isPaid()) {
|
|
41
|
+
return acc + prepayment.amount - prepayment.num_events;
|
|
42
|
+
}
|
|
43
|
+
return acc;
|
|
44
|
+
}, 0);
|
|
45
|
+
};
|
|
46
|
+
this.getPrepaidMonthsRemaining = () => {
|
|
47
|
+
return this.prepayments.reduce((acc, prepayment) => {
|
|
48
|
+
if (prepayment.isPaid()) {
|
|
49
|
+
return acc + prepayment.amount - prepayment.num_service_months;
|
|
50
|
+
}
|
|
51
|
+
return acc;
|
|
52
|
+
}, 0);
|
|
53
|
+
};
|
|
54
|
+
this.isDone = (fallback) => {
|
|
55
|
+
if (!this.status || this.status !== TaskStatus.ACTIVE) {
|
|
56
|
+
return 1;
|
|
57
|
+
}
|
|
58
|
+
if (this.frequency > 0) {
|
|
59
|
+
return this.overdue_time <= 0;
|
|
60
|
+
}
|
|
61
|
+
else if (fallback) {
|
|
62
|
+
// If frequency is 0, use fallback
|
|
63
|
+
return new Date((this.last_completed_event?.time_ended ?? 0) * 1000) > (fallback);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
return this.last_completed_event?.time_ended ? true : false;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
Object.assign(this, init);
|
|
70
|
+
if (init?.prepayments) {
|
|
71
|
+
this.prepayments = init.prepayments.map(p => new Prepayment(p));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BillUser } from "../../types/api/BillUser";
|
|
2
|
+
import { Chat } from "../../types/api/Chat";
|
|
3
|
+
import { PaymentMethod } from "../../types/api/PaymentMethod";
|
|
4
|
+
import { PaymentType } from "../../types/api/PaymentType";
|
|
5
|
+
export interface User {
|
|
6
|
+
id: string;
|
|
7
|
+
username: string;
|
|
8
|
+
first_name: string;
|
|
9
|
+
last_name: string;
|
|
10
|
+
verified: boolean;
|
|
11
|
+
email: string | null;
|
|
12
|
+
phone_number: string | null;
|
|
13
|
+
time_created: number;
|
|
14
|
+
time_updated: number | null;
|
|
15
|
+
share_location: boolean;
|
|
16
|
+
can_send_emails: boolean | null;
|
|
17
|
+
payment_methods: PaymentMethod[];
|
|
18
|
+
autopay_payment_types: PaymentType[];
|
|
19
|
+
autopay: boolean | null;
|
|
20
|
+
chats: Chat[];
|
|
21
|
+
bills: BillUser[];
|
|
22
|
+
is_root: boolean;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { User } from "../../types/api/User";
|
|
2
|
+
import { Location } from "../../types/api";
|
|
3
|
+
export declare const Permission: {
|
|
4
|
+
readonly CAN_WRITE_COMPANY: "can_write_company";
|
|
5
|
+
readonly CAN_READ_GROUPS: "can_read_groups";
|
|
6
|
+
readonly CAN_WRITE_PROPOSALS: "can_write_proposals";
|
|
7
|
+
readonly CAN_READ_PROPOSALS: "can_read_proposals";
|
|
8
|
+
readonly CAN_WRITE_GROUPS: "can_write_groups";
|
|
9
|
+
readonly CAN_WRITE_ROUTES: "can_write_routes";
|
|
10
|
+
readonly CAN_WRITE_SUBSCRIPTIONS: "can_write_subscriptions";
|
|
11
|
+
readonly CAN_READ_SUBSCRIPTIONS: "can_read_subscriptions";
|
|
12
|
+
readonly CAN_WRITE_TEAMS: "can_write_teams";
|
|
13
|
+
readonly CAN_WRITE_JOBS: "can_write_jobs";
|
|
14
|
+
readonly CAN_WRITE_TASKS: "can_write_tasks";
|
|
15
|
+
readonly CAN_WRITE_ITEMS: "can_write_items";
|
|
16
|
+
readonly CAN_WRITE_SKILLS: "can_write_skills";
|
|
17
|
+
readonly CAN_WRITE_EMAILS: "can_write_emails";
|
|
18
|
+
readonly CAN_WRITE_OTHERS_SESSIONS: "can_write_others_sessions";
|
|
19
|
+
readonly CAN_READ_OTHERS_SESSIONS: "can_read_others_sessions";
|
|
20
|
+
readonly CAN_READ_SESSIONS: "can_read_sessions";
|
|
21
|
+
readonly CAN_WRITE_LABELS: "can_write_labels";
|
|
22
|
+
readonly CAN_READ_LABELS: "can_read_labels";
|
|
23
|
+
readonly CAN_READ_ROUTES: "can_read_routes";
|
|
24
|
+
readonly CAN_READ_TEAMS: "can_read_teams";
|
|
25
|
+
readonly CAN_READ_JOBS: "can_read_jobs";
|
|
26
|
+
readonly CAN_WRITE_EVENTS: "can_write_events";
|
|
27
|
+
readonly CAN_READ_TASKS: "can_read_tasks";
|
|
28
|
+
readonly CAN_READ_ITEMS: "can_read_items";
|
|
29
|
+
readonly CAN_READ_SKILLS: "can_read_skills";
|
|
30
|
+
readonly CAN_WRITE_SESSIONS: "can_write_sessions";
|
|
31
|
+
readonly CAN_READ_EMAILS: "can_read_emails";
|
|
32
|
+
readonly CAN_WRITE_SMS: "can_write_sms";
|
|
33
|
+
readonly CAN_READ_SMS: "can_read_sms";
|
|
34
|
+
readonly CAN_WRITE_NOTIFICATIONS: "can_write_notifications";
|
|
35
|
+
readonly CAN_READ_EVENTS: "can_read_events";
|
|
36
|
+
readonly CAN_READ_MONTHS: "can_read_months";
|
|
37
|
+
readonly CAN_WRITE_MONTHS: "can_write_months";
|
|
38
|
+
readonly CAN_WRITE_BILLS: "can_write_bills";
|
|
39
|
+
readonly CAN_READ_BILLS: "can_read_bills";
|
|
40
|
+
readonly CAN_OPTIMIZE: "can_optimize";
|
|
41
|
+
readonly CAN_READ_COMPANY: "can_read_company";
|
|
42
|
+
readonly CAN_WRITE_OTHERS_TIMECARDS: "can_write_others_timecards";
|
|
43
|
+
readonly CAN_READ_OTHERS_TIMECARDS: "can_read_others_timecards";
|
|
44
|
+
readonly CAN_WRITE_TIMECARDS: "can_write_timecards";
|
|
45
|
+
readonly CAN_READ_TIMECARDS: "can_read_timecards";
|
|
46
|
+
readonly CAN_APPROVE_TIME_OFF: "can_approve_time_off";
|
|
47
|
+
readonly IS_ROOT: "is_root";
|
|
48
|
+
readonly IS_CUSTOMER: "is_customer";
|
|
49
|
+
};
|
|
50
|
+
export type Permission = typeof Permission[keyof typeof Permission];
|
|
51
|
+
export declare const NotificationLevel: {
|
|
52
|
+
readonly IN_APP: 0;
|
|
53
|
+
readonly EMAIL: 1;
|
|
54
|
+
readonly SMS: 2;
|
|
55
|
+
readonly PUSH: 3;
|
|
56
|
+
};
|
|
57
|
+
export type NotificationLevel = typeof NotificationLevel[keyof typeof NotificationLevel];
|
|
58
|
+
export interface UserCompanyAssociation {
|
|
59
|
+
id: string;
|
|
60
|
+
user: User;
|
|
61
|
+
company: string;
|
|
62
|
+
permissions: Permission[];
|
|
63
|
+
effective_permissions: Permission[];
|
|
64
|
+
time_created: number | null;
|
|
65
|
+
time_updated: number | null;
|
|
66
|
+
notification_setting: NotificationLevel[];
|
|
67
|
+
share_email_company_wide: boolean;
|
|
68
|
+
notifications: Notification[];
|
|
69
|
+
groups: string[];
|
|
70
|
+
last_location: Location | null;
|
|
71
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export const Permission = {
|
|
2
|
+
CAN_WRITE_COMPANY: "can_write_company",
|
|
3
|
+
CAN_READ_GROUPS: "can_read_groups",
|
|
4
|
+
CAN_WRITE_PROPOSALS: "can_write_proposals",
|
|
5
|
+
CAN_READ_PROPOSALS: "can_read_proposals",
|
|
6
|
+
CAN_WRITE_GROUPS: "can_write_groups",
|
|
7
|
+
CAN_WRITE_ROUTES: "can_write_routes",
|
|
8
|
+
CAN_WRITE_SUBSCRIPTIONS: "can_write_subscriptions",
|
|
9
|
+
CAN_READ_SUBSCRIPTIONS: "can_read_subscriptions",
|
|
10
|
+
CAN_WRITE_TEAMS: "can_write_teams",
|
|
11
|
+
CAN_WRITE_JOBS: "can_write_jobs",
|
|
12
|
+
CAN_WRITE_TASKS: "can_write_tasks",
|
|
13
|
+
CAN_WRITE_ITEMS: "can_write_items",
|
|
14
|
+
CAN_WRITE_SKILLS: "can_write_skills",
|
|
15
|
+
CAN_WRITE_EMAILS: "can_write_emails",
|
|
16
|
+
CAN_WRITE_OTHERS_SESSIONS: "can_write_others_sessions",
|
|
17
|
+
CAN_READ_OTHERS_SESSIONS: "can_read_others_sessions",
|
|
18
|
+
CAN_READ_SESSIONS: "can_read_sessions",
|
|
19
|
+
CAN_WRITE_LABELS: "can_write_labels",
|
|
20
|
+
CAN_READ_LABELS: "can_read_labels",
|
|
21
|
+
CAN_READ_ROUTES: "can_read_routes",
|
|
22
|
+
CAN_READ_TEAMS: "can_read_teams",
|
|
23
|
+
CAN_READ_JOBS: "can_read_jobs",
|
|
24
|
+
CAN_WRITE_EVENTS: "can_write_events",
|
|
25
|
+
CAN_READ_TASKS: "can_read_tasks",
|
|
26
|
+
CAN_READ_ITEMS: "can_read_items",
|
|
27
|
+
CAN_READ_SKILLS: "can_read_skills",
|
|
28
|
+
CAN_WRITE_SESSIONS: "can_write_sessions",
|
|
29
|
+
CAN_READ_EMAILS: "can_read_emails",
|
|
30
|
+
CAN_WRITE_SMS: "can_write_sms",
|
|
31
|
+
CAN_READ_SMS: "can_read_sms",
|
|
32
|
+
CAN_WRITE_NOTIFICATIONS: "can_write_notifications",
|
|
33
|
+
CAN_READ_EVENTS: "can_read_events",
|
|
34
|
+
CAN_READ_MONTHS: "can_read_months",
|
|
35
|
+
CAN_WRITE_MONTHS: "can_write_months",
|
|
36
|
+
CAN_WRITE_BILLS: "can_write_bills",
|
|
37
|
+
CAN_READ_BILLS: "can_read_bills",
|
|
38
|
+
CAN_OPTIMIZE: "can_optimize",
|
|
39
|
+
CAN_READ_COMPANY: "can_read_company",
|
|
40
|
+
CAN_WRITE_OTHERS_TIMECARDS: "can_write_others_timecards",
|
|
41
|
+
CAN_READ_OTHERS_TIMECARDS: "can_read_others_timecards",
|
|
42
|
+
CAN_WRITE_TIMECARDS: "can_write_timecards",
|
|
43
|
+
CAN_READ_TIMECARDS: "can_read_timecards",
|
|
44
|
+
CAN_APPROVE_TIME_OFF: "can_approve_time_off",
|
|
45
|
+
IS_ROOT: "is_root",
|
|
46
|
+
IS_CUSTOMER: "is_customer",
|
|
47
|
+
};
|
|
48
|
+
export const NotificationLevel = {
|
|
49
|
+
IN_APP: 0,
|
|
50
|
+
EMAIL: 1,
|
|
51
|
+
SMS: 2,
|
|
52
|
+
PUSH: 3
|
|
53
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface UserEvent {
|
|
2
|
+
id: string;
|
|
3
|
+
session_id: string;
|
|
4
|
+
event_id: string;
|
|
5
|
+
user_id: string | null;
|
|
6
|
+
team_id: string | null;
|
|
7
|
+
user_name: string | null;
|
|
8
|
+
team_name: string | null;
|
|
9
|
+
time_started: number | null;
|
|
10
|
+
time_ended: number | null;
|
|
11
|
+
time_created: number | null;
|
|
12
|
+
time_updated: number | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LineItem } from "../../types/api/LineItem";
|
|
2
|
+
import { AdditionalCharge } from "../../types/api/AdditionalCharge";
|
|
3
|
+
import { UserEvent } from "../../types/api/UserEvent";
|
|
4
|
+
export interface _Event extends LineItem {
|
|
5
|
+
breaks: string[];
|
|
6
|
+
line_item_type: "EVENT";
|
|
7
|
+
internal_notes: string;
|
|
8
|
+
external_notes: string;
|
|
9
|
+
proofs: string[];
|
|
10
|
+
tasks: string[];
|
|
11
|
+
time_ended: number | null;
|
|
12
|
+
time_started: number;
|
|
13
|
+
time_updated: number | null;
|
|
14
|
+
bill_id: string;
|
|
15
|
+
billed_amount: number;
|
|
16
|
+
additional_charges: AdditionalCharge[];
|
|
17
|
+
users: UserEvent[];
|
|
18
|
+
autostart: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|