-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from dayschedule/development
Development
- Loading branch information
Showing
23 changed files
with
1,132 additions
and
102 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import Api from "../api"; | ||
import { Activity } from "./types"; | ||
|
||
class Activities { | ||
private api: Api; | ||
|
||
constructor(api: Api) { | ||
this.api = api; | ||
} | ||
|
||
async list(contact_id: string, params: any): Promise<Activity[]> { | ||
return this.api.get(`/activities/${contact_id}`, params); | ||
} | ||
|
||
async get(activity_id: string): Promise<Activity> { | ||
return this.api.get(`/activities/${activity_id}`); | ||
} | ||
|
||
async create(data: Activity): Promise<any> { | ||
return this.api.post(`/activities`, data); | ||
} | ||
|
||
async update(activity_id: string, data: Activity): Promise<any> { | ||
return this.api.put(`/activities/${activity_id}`, data); | ||
} | ||
|
||
async delete(activity_id: string): Promise<any> { | ||
return this.api.delete(`/activities/${activity_id}`); | ||
} | ||
} | ||
|
||
export default Activities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
declare type File = { | ||
name: string; | ||
size: number; | ||
type: string; | ||
path?: string; | ||
url?: string; | ||
}; | ||
|
||
export declare type Activity = { | ||
activity_id?: string; | ||
org_id?: number; | ||
user?: Record<string, any>; | ||
contact_id: string; | ||
type: string; | ||
title?: string; | ||
description?: string; | ||
file?: File; | ||
date?: Date; | ||
status?: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { Invitee } from "../invitees/types"; | ||
|
||
declare type Resource = { | ||
resource_id: string; | ||
name?: string; | ||
type?: string; | ||
event_type?: string; | ||
slug?: string; | ||
description?: string; | ||
}; | ||
|
||
declare type Host = { | ||
user_id: number; | ||
name?: string; | ||
email?: string; | ||
avatar?: string; | ||
time_zone?: string; | ||
phone?: string; | ||
location?: Location; | ||
}; | ||
|
||
declare type Reschedule = { | ||
rescheduled_from?: Date; | ||
rescheduled_by?: string; | ||
reschedule_reason?: string; | ||
rescheduled_at?: Date; | ||
}; | ||
|
||
declare type Attendee = { | ||
name?: string; | ||
email: string; | ||
status?: string; | ||
organizer?: boolean; | ||
}; | ||
|
||
export declare type Booking = { | ||
booking_id?: string; | ||
org_id?: number; | ||
source?: string; | ||
resource: Resource; | ||
host: Host; | ||
subject?: string; | ||
description?: string; | ||
start_at: Date; | ||
end_at?: Date; | ||
duration?: any; | ||
time_zone?: string; | ||
status?: string; | ||
color?: string; | ||
internal_note?: string; | ||
location: any; | ||
canceled_at?: Date; | ||
cancel_reason?: string; | ||
reschedule?: Reschedule; | ||
attendes?: Attendee[]; | ||
busy?: string; | ||
recurrence?: Array<string>; | ||
invitees: Invitee[]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
declare type CustomField = { | ||
name?: string; | ||
value?: string; | ||
}; | ||
|
||
declare type Tags = { | ||
color?: string; | ||
background?: string; | ||
name?: string; | ||
}; | ||
|
||
export declare type Contact = { | ||
contact_id?: string; | ||
org_id: number; | ||
user_id?: number; | ||
name?: string; | ||
email?: string; | ||
phone?: string; | ||
avatar?: string; | ||
company?: string; | ||
followup?: Date; | ||
source?: string; | ||
notes?: string; | ||
hotness?: number; | ||
tags: Array<Tags>; | ||
custom_fields?: CustomField[]; | ||
do_not_contact?: boolean; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
declare type Question = { | ||
type: string; | ||
name: string; | ||
label: string; | ||
value: string; | ||
required?: boolean; | ||
placeholder?: string; | ||
pattern?: string; | ||
options?: any[]; | ||
} | ||
|
||
declare type ServiceOption = { | ||
category?: string; | ||
name?: string; | ||
description?: string; | ||
duration?: any; | ||
price?: any; | ||
} | ||
|
||
declare type Payment = { | ||
amount?: number; | ||
name?: string; | ||
currency?: string; | ||
gateway?: string; | ||
reference_id?: string; | ||
link?: string; | ||
data?: any; | ||
} | ||
|
||
export declare type Invitee = { | ||
invitee_id?: string; | ||
booking_id?: string; | ||
org_id?: number; | ||
name: string; | ||
email: string; | ||
phone?: string; | ||
guest?: Array<string>; | ||
status?: string; | ||
cancceled_at?: Date; | ||
reason?: string; | ||
time_zone?: string; | ||
token?: string; | ||
questions?: Question[]; | ||
payment?: Payment; | ||
services?: ServiceOption[]; | ||
check_in?: Record<string, any>; | ||
custom_fields?: Record<string, any>; | ||
tracking?: Record<string, any>; | ||
utm?: Record<string, any>; | ||
uuid?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export declare type Page = { | ||
page_id?: number; | ||
org_id?: number; | ||
user_id?: number; | ||
name: string; | ||
domain: string; | ||
is_default?: boolean; | ||
description?: string; | ||
logo?: string; | ||
color?: Record<string, string>; | ||
remove_branding?: boolean; | ||
seo?: Record<string, any>; | ||
integrations?: Record<string, any>; | ||
template?: Record<string, any>; | ||
is_default_template?: boolean; | ||
is_published?: boolean; | ||
is_public?: boolean; | ||
screenshots?: Array<string>; | ||
updated_at?: Date; | ||
created_at?: Date; | ||
}; |
Oops, something went wrong.