@go-avro/avro-js 0.0.4-beta.4 → 0.0.4-beta.6
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/client/QueryClient.d.ts +3 -0
- package/dist/client/QueryClient.js +9 -6
- package/dist/client/hooks/users.js +4 -1
- 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 +29 -0
- package/dist/types/api/Job.js +1 -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 +40 -0
- package/dist/types/api/LineItem.js +29 -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 +10 -0
- package/dist/types/api/Prepayment.js +1 -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 +19 -0
- package/dist/types/api/Route.js +1 -0
- package/dist/types/api/RouteJob.d.ts +10 -0
- package/dist/types/api/RouteJob.js +1 -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 +51 -0
- package/dist/types/api/Task.js +38 -0
- package/dist/types/api/User.d.ts +22 -0
- package/dist/types/api/User.js +1 -0
- package/dist/types/api/UserCompanyAssociation.d.ts +70 -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/_Event.d.ts +19 -0
- package/dist/types/api/_Event.js +1 -0
- package/dist/types/api.d.ts +36 -583
- package/dist/types/api.js +36 -74
- package/package.json +1 -1
|
@@ -213,6 +213,8 @@ declare module '../client/QueryClient' {
|
|
|
213
213
|
useCreateSelf(): ReturnType<typeof useMutation<{
|
|
214
214
|
msg: string;
|
|
215
215
|
id?: string;
|
|
216
|
+
access_token?: string;
|
|
217
|
+
refresh_token?: string;
|
|
216
218
|
}, StandardError, Partial<User> & {
|
|
217
219
|
code?: string;
|
|
218
220
|
invite_token?: string;
|
|
@@ -419,6 +421,7 @@ export declare class AvroQueryClient {
|
|
|
419
421
|
post<T>(path: string, data: any, cancelToken?: CancelToken, headers?: Record<string, string>, progressUpdateCallback?: (loaded: number, total: number) => void): Promise<T>;
|
|
420
422
|
put<T>(path: string, data: any, cancelToken?: CancelToken, headers?: Record<string, string>, progressUpdateCallback?: (loaded: number, total: number) => void): Promise<T>;
|
|
421
423
|
delete<T>(path: string, cancelToken?: CancelToken, headers?: Record<string, string>, progressUpdateCallback?: (loaded: number, total: number) => void): Promise<T>;
|
|
424
|
+
loginSuccess(tokens: Tokens): Promise<void>;
|
|
422
425
|
useLogin(): ReturnType<typeof useMutation<LoginResponse, StandardError, {
|
|
423
426
|
username: string;
|
|
424
427
|
password?: string;
|
|
@@ -82,6 +82,14 @@ export class AvroQueryClient {
|
|
|
82
82
|
delete(path, cancelToken, headers = {}, progressUpdateCallback) {
|
|
83
83
|
return this._xhr('DELETE', path, null, cancelToken, headers, false, this.config.maxRetries, progressUpdateCallback);
|
|
84
84
|
}
|
|
85
|
+
loginSuccess(tokens) {
|
|
86
|
+
this.setAuthState(AuthState.AUTHENTICATED);
|
|
87
|
+
this.socket.auth = { token: tokens.access_token };
|
|
88
|
+
if (!this.socket.connected) {
|
|
89
|
+
this.socket.connect();
|
|
90
|
+
}
|
|
91
|
+
return this.config.authManager.setTokens(tokens);
|
|
92
|
+
}
|
|
85
93
|
useLogin() {
|
|
86
94
|
const queryClient = this.getQueryClient();
|
|
87
95
|
return useMutation({
|
|
@@ -93,12 +101,7 @@ export class AvroQueryClient {
|
|
|
93
101
|
}
|
|
94
102
|
throw new StandardError(401, 'Invalid login response');
|
|
95
103
|
}
|
|
96
|
-
this.
|
|
97
|
-
this.socket.auth = { token: resp.access_token };
|
|
98
|
-
if (!this.socket.connected) {
|
|
99
|
-
this.socket.connect();
|
|
100
|
-
}
|
|
101
|
-
await this.config.authManager.setTokens({ access_token: resp.access_token, refresh_token: resp.refresh_token });
|
|
104
|
+
await this.loginSuccess({ access_token: resp.access_token, refresh_token: resp.refresh_token });
|
|
102
105
|
return LoginResponse.SUCCESS;
|
|
103
106
|
},
|
|
104
107
|
onSettled: () => {
|
|
@@ -32,8 +32,11 @@ AvroQueryClient.prototype.useCreateSelf = function () {
|
|
|
32
32
|
mutationFn: async (data) => {
|
|
33
33
|
return this.post('/user', JSON.stringify(data), undefined, { "Content-Type": "application/json" });
|
|
34
34
|
},
|
|
35
|
-
onSettled: () => {
|
|
35
|
+
onSettled: (data) => {
|
|
36
36
|
queryClient.invalidateQueries({ queryKey: ['user'] });
|
|
37
|
+
if (data?.access_token && data?.refresh_token) {
|
|
38
|
+
return this.loginSuccess({ access_token: data.access_token, refresh_token: data.refresh_token });
|
|
39
|
+
}
|
|
37
40
|
},
|
|
38
41
|
});
|
|
39
42
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BillPayment } from "../../types/api/BillPayment";
|
|
2
|
+
import { BillUser } from "../../types/api/BillUser";
|
|
3
|
+
import { CustomLineItem } from "../../types/api/CustomLineItem";
|
|
4
|
+
import { PaymentType } from "../../types/api/PaymentType";
|
|
5
|
+
export interface Bill {
|
|
6
|
+
id: string;
|
|
7
|
+
invoice_id: number;
|
|
8
|
+
intuit_id: string | null;
|
|
9
|
+
name: string;
|
|
10
|
+
amount: number;
|
|
11
|
+
billed_by: string;
|
|
12
|
+
customer_email: string | null;
|
|
13
|
+
manual_emails: string[][];
|
|
14
|
+
users: BillUser[];
|
|
15
|
+
status: "SENT" | "PAID" | "PARTIALLY_PAID" | "MANUALLY_PAID";
|
|
16
|
+
enabled_payment_methods: PaymentType[];
|
|
17
|
+
time_created: number;
|
|
18
|
+
time_updated: number;
|
|
19
|
+
events: string[];
|
|
20
|
+
intent_created_at: number;
|
|
21
|
+
intent_last_created_at: number;
|
|
22
|
+
payments: BillPayment[];
|
|
23
|
+
line_items: CustomLineItem[];
|
|
24
|
+
prepayments: string[];
|
|
25
|
+
months: string[];
|
|
26
|
+
due_date: number;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface BillPayment {
|
|
2
|
+
id: string;
|
|
3
|
+
amount: number;
|
|
4
|
+
avro_fees: number;
|
|
5
|
+
stripe_fees: number;
|
|
6
|
+
stripe_pi_id: string;
|
|
7
|
+
bill_user_id: string;
|
|
8
|
+
status: "created" | "processing" | "succeeded" | "failed" | "canceled" | "requires_action";
|
|
9
|
+
type: "us_bank_account" | "card";
|
|
10
|
+
action_required_at: number;
|
|
11
|
+
time_created: number;
|
|
12
|
+
time_updated: number | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BillPayment } from "../../types/api/BillPayment";
|
|
2
|
+
export interface BillUser {
|
|
3
|
+
id: string;
|
|
4
|
+
user_id: string;
|
|
5
|
+
bill_id: string;
|
|
6
|
+
invoice_id: string;
|
|
7
|
+
payment_attempts: BillPayment[];
|
|
8
|
+
time_created: number;
|
|
9
|
+
time_updated: number | null;
|
|
10
|
+
amount: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PaymentOption } from "../../types/api/PaymentOption";
|
|
2
|
+
export interface CatalogItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
company_id: string;
|
|
6
|
+
description: string;
|
|
7
|
+
industry: string;
|
|
8
|
+
price_format: string;
|
|
9
|
+
payment_options: PaymentOption[];
|
|
10
|
+
recommended_frequency?: number | null;
|
|
11
|
+
recommended_activate_on?: number | null;
|
|
12
|
+
recommended_expire_on?: number | null;
|
|
13
|
+
time_created: number;
|
|
14
|
+
time_updated: number | null;
|
|
15
|
+
skills: string[];
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Message } from "../../types/api/Message";
|
|
2
|
+
import { MemberState } from "../../types/api/MemberState";
|
|
3
|
+
export interface Chat {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
company_id: string;
|
|
7
|
+
time_created: number;
|
|
8
|
+
time_updated: number;
|
|
9
|
+
last_message: Message;
|
|
10
|
+
user_state: MemberState[];
|
|
11
|
+
messages: Message[];
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Bill } from "../../types/api/Bill";
|
|
2
|
+
import { Email } from "../../types/api/Email";
|
|
3
|
+
import { Group } from "../../types/api/Group";
|
|
4
|
+
import { Label } from "../../types/api/Label";
|
|
5
|
+
import { PaymentMethod } from "../../types/api/PaymentMethod";
|
|
6
|
+
import { PaymentType } from "../../types/api/PaymentType";
|
|
7
|
+
import { Plan } from "../../types/api/Plan";
|
|
8
|
+
import { PlanPayment } from "../../types/api/PlanPayment";
|
|
9
|
+
import { Session } from "../../types/api/Session";
|
|
10
|
+
import { Skill } from "../../types/api/Skill";
|
|
11
|
+
import { UserCompanyAssociation } from "../../types/api/UserCompanyAssociation";
|
|
12
|
+
import { CatalogItem } from "../../types/api/CatalogItem";
|
|
13
|
+
export interface Company {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
email: string;
|
|
17
|
+
emails: Email[];
|
|
18
|
+
skills: Skill[];
|
|
19
|
+
catalog_items: CatalogItem[];
|
|
20
|
+
time_created: number;
|
|
21
|
+
time_updated: number | null;
|
|
22
|
+
users: UserCompanyAssociation[];
|
|
23
|
+
use_client_side_customer_start_billing: boolean;
|
|
24
|
+
use_client_side_customer_stop_billing: boolean;
|
|
25
|
+
use_client_side_employee_start_billing: boolean;
|
|
26
|
+
use_client_side_employee_stop_billing: boolean;
|
|
27
|
+
logo_url: string;
|
|
28
|
+
delay_scalar: number;
|
|
29
|
+
payments: PlanPayment[];
|
|
30
|
+
overdue_threshold: number;
|
|
31
|
+
stripe_account_id: string;
|
|
32
|
+
is_restricted: boolean;
|
|
33
|
+
disabled_reason: string;
|
|
34
|
+
completed_onboarding: boolean;
|
|
35
|
+
restricted_soon: boolean;
|
|
36
|
+
service_email_id: string;
|
|
37
|
+
billing_email_id: string;
|
|
38
|
+
num_events: number;
|
|
39
|
+
num_jobs: number;
|
|
40
|
+
num_routes: number;
|
|
41
|
+
num_teams: number;
|
|
42
|
+
num_skills: number;
|
|
43
|
+
bills: Bill[];
|
|
44
|
+
enabled_payment_methods: PaymentType[];
|
|
45
|
+
sessions: Session[];
|
|
46
|
+
num_sessions: number;
|
|
47
|
+
labels: Label[];
|
|
48
|
+
groups: Group[];
|
|
49
|
+
indicator_lifetime: number;
|
|
50
|
+
available_plans: Plan[];
|
|
51
|
+
last_payment: number;
|
|
52
|
+
last_charged: number;
|
|
53
|
+
balance: number;
|
|
54
|
+
plan_id: string;
|
|
55
|
+
payment_methods: PaymentMethod[];
|
|
56
|
+
intuit_connected: boolean;
|
|
57
|
+
next_payment_due: number | null;
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { User } from "../../types/api/User";
|
|
2
|
+
export interface Email {
|
|
3
|
+
id: string;
|
|
4
|
+
company_id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
mail_server: string;
|
|
7
|
+
mail_port: number;
|
|
8
|
+
mail_username: string;
|
|
9
|
+
mail_password: string | null;
|
|
10
|
+
mail_default_sender: string;
|
|
11
|
+
mail_use_tls: boolean;
|
|
12
|
+
mail_use_ssl: boolean;
|
|
13
|
+
mail_api_key: string;
|
|
14
|
+
is_company_wide: boolean;
|
|
15
|
+
users: User[];
|
|
16
|
+
type: "OUTLOOK" | "SMTP" | "GMAIL";
|
|
17
|
+
access_token?: string;
|
|
18
|
+
access_token_expiry?: number;
|
|
19
|
+
refresh_token?: string;
|
|
20
|
+
refresh_token_expiry?: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Permission } from "../../types/api/UserCompanyAssociation";
|
|
2
|
+
export interface Group {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
is_active: boolean;
|
|
6
|
+
is_user_type: boolean;
|
|
7
|
+
users: string[];
|
|
8
|
+
permissions: Permission[];
|
|
9
|
+
company_id: string;
|
|
10
|
+
time_created: number;
|
|
11
|
+
time_updated: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Task } from "../../types/api/Task";
|
|
2
|
+
import { _Event } from "../../types/api/_Event";
|
|
3
|
+
import { RouteJob } from "../../types/api/RouteJob";
|
|
4
|
+
import { Subscription } from "../../types/api/Subscription";
|
|
5
|
+
export interface Job {
|
|
6
|
+
address: string;
|
|
7
|
+
company: string;
|
|
8
|
+
description: string;
|
|
9
|
+
id: string;
|
|
10
|
+
is_one_time: boolean;
|
|
11
|
+
autostart_radius: number;
|
|
12
|
+
latitude: number;
|
|
13
|
+
longitude: number;
|
|
14
|
+
name: string;
|
|
15
|
+
internal_notes: string;
|
|
16
|
+
external_notes: string;
|
|
17
|
+
priority: number;
|
|
18
|
+
tasks: Partial<Task>[];
|
|
19
|
+
time_created: number;
|
|
20
|
+
time_updated: number | null;
|
|
21
|
+
routes: RouteJob[];
|
|
22
|
+
subscribers: Subscription[];
|
|
23
|
+
manual_emails: string[][];
|
|
24
|
+
overdue_time: number;
|
|
25
|
+
last_completed_event: _Event | null;
|
|
26
|
+
current_event: _Event | null;
|
|
27
|
+
labels: string[];
|
|
28
|
+
owner: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const LineItemStatus: {
|
|
2
|
+
readonly CREATED: "CREATED";
|
|
3
|
+
readonly EXTERNALLY_BILLED: "EXTERNALLY_BILLED";
|
|
4
|
+
readonly BILLED: "BILLED";
|
|
5
|
+
readonly PROCESSING: "PROCESSING";
|
|
6
|
+
readonly EXTERNALLY_PAID: "EXTERNALLY_PAID";
|
|
7
|
+
readonly PREPAID: "PREPAID";
|
|
8
|
+
readonly PAID: "PAID";
|
|
9
|
+
};
|
|
10
|
+
export type LineItemStatus = typeof LineItemStatus[keyof typeof LineItemStatus];
|
|
11
|
+
export declare const LineItemType: {
|
|
12
|
+
readonly CUSTOM: "CUSTOM";
|
|
13
|
+
readonly ADDITIONAL_CHARGE: "ADDITIONAL_CHARGE";
|
|
14
|
+
readonly EVENT: "EVENT";
|
|
15
|
+
readonly SERVICE_MONTH: "SERVICE_MONTH";
|
|
16
|
+
readonly PREPAYMENT: "PREPAYMENT";
|
|
17
|
+
};
|
|
18
|
+
export type LineItemType = typeof LineItemType[keyof typeof LineItemType];
|
|
19
|
+
declare module '../../types/api/LineItem' {
|
|
20
|
+
interface LineItem {
|
|
21
|
+
id: string;
|
|
22
|
+
line_item_type: LineItemType;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
cost: number;
|
|
26
|
+
amount: number;
|
|
27
|
+
status: LineItemStatus;
|
|
28
|
+
job_id: string;
|
|
29
|
+
job_name: string;
|
|
30
|
+
job_address: string;
|
|
31
|
+
job_labels: string[];
|
|
32
|
+
company_id: string;
|
|
33
|
+
time_created: number;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export declare class LineItem {
|
|
37
|
+
isPaid: () => boolean;
|
|
38
|
+
isBilled: () => boolean;
|
|
39
|
+
isUnbilled: () => boolean;
|
|
40
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const LineItemStatus = {
|
|
2
|
+
CREATED: "CREATED",
|
|
3
|
+
EXTERNALLY_BILLED: "EXTERNALLY_BILLED",
|
|
4
|
+
BILLED: "BILLED",
|
|
5
|
+
PROCESSING: "PROCESSING",
|
|
6
|
+
EXTERNALLY_PAID: "EXTERNALLY_PAID",
|
|
7
|
+
PREPAID: "PREPAID",
|
|
8
|
+
PAID: "PAID",
|
|
9
|
+
};
|
|
10
|
+
export const LineItemType = {
|
|
11
|
+
CUSTOM: "CUSTOM",
|
|
12
|
+
ADDITIONAL_CHARGE: "ADDITIONAL_CHARGE",
|
|
13
|
+
EVENT: "EVENT",
|
|
14
|
+
SERVICE_MONTH: "SERVICE_MONTH",
|
|
15
|
+
PREPAYMENT: "PREPAYMENT",
|
|
16
|
+
};
|
|
17
|
+
export class LineItem {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.isPaid = () => {
|
|
20
|
+
return this.status === LineItemStatus.PAID || this.status === LineItemStatus.PREPAID || this.status === LineItemStatus.EXTERNALLY_PAID;
|
|
21
|
+
};
|
|
22
|
+
this.isBilled = () => {
|
|
23
|
+
return this.status === LineItemStatus.BILLED || this.status === LineItemStatus.EXTERNALLY_BILLED;
|
|
24
|
+
};
|
|
25
|
+
this.isUnbilled = () => {
|
|
26
|
+
return !this.isBilled() && !this.isPaid();
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Reaction } from "../../types/api/Reaction";
|
|
2
|
+
export interface Message {
|
|
3
|
+
id: string;
|
|
4
|
+
chat_id: string;
|
|
5
|
+
sender_id: string;
|
|
6
|
+
reply_to_id: string;
|
|
7
|
+
content: string;
|
|
8
|
+
reactions: Reaction[];
|
|
9
|
+
time_created: number;
|
|
10
|
+
time_updated: number;
|
|
11
|
+
time_sent: number;
|
|
12
|
+
message: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { PaymentType } from "../../types/api/PaymentType";
|
|
2
|
+
export interface PaymentMethod {
|
|
3
|
+
allow_redisplay: string;
|
|
4
|
+
autopay: boolean;
|
|
5
|
+
billing_details: {
|
|
6
|
+
email: string;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
created: number;
|
|
10
|
+
customer: string;
|
|
11
|
+
id: string;
|
|
12
|
+
type: PaymentType;
|
|
13
|
+
us_bank_account: {
|
|
14
|
+
account_holder_type: string;
|
|
15
|
+
account_type: string;
|
|
16
|
+
bank_name: string;
|
|
17
|
+
financial_connections_account: string;
|
|
18
|
+
fingerprint: string;
|
|
19
|
+
last4: string;
|
|
20
|
+
networks: {
|
|
21
|
+
preferred: string;
|
|
22
|
+
supported: string[];
|
|
23
|
+
};
|
|
24
|
+
routing_number: string;
|
|
25
|
+
status_details: object;
|
|
26
|
+
} | null;
|
|
27
|
+
card: {
|
|
28
|
+
brand: string;
|
|
29
|
+
checks: {
|
|
30
|
+
address_line1_check: string;
|
|
31
|
+
address_postal_code_check: string;
|
|
32
|
+
cvc_check: string;
|
|
33
|
+
};
|
|
34
|
+
country: string;
|
|
35
|
+
exp_month: number;
|
|
36
|
+
exp_year: number;
|
|
37
|
+
fingerprint: string;
|
|
38
|
+
funding: string;
|
|
39
|
+
last4: string;
|
|
40
|
+
networks: {
|
|
41
|
+
preferred: string;
|
|
42
|
+
supported: string[];
|
|
43
|
+
};
|
|
44
|
+
three_d_secure_usage: {
|
|
45
|
+
supported: boolean;
|
|
46
|
+
};
|
|
47
|
+
wallet: {
|
|
48
|
+
type: string;
|
|
49
|
+
} | null;
|
|
50
|
+
} | null;
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface Plan {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
base_rate: number;
|
|
5
|
+
price_per_job: number;
|
|
6
|
+
description: string;
|
|
7
|
+
referral_codes: string[];
|
|
8
|
+
trial_period_days: number;
|
|
9
|
+
time_created: number;
|
|
10
|
+
time_updated: number;
|
|
11
|
+
available_to_new_companies?: boolean;
|
|
12
|
+
available_to?: string[];
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LineItem } from "../../types/api/LineItem";
|
|
2
|
+
export interface Prepayment extends LineItem {
|
|
3
|
+
id: string;
|
|
4
|
+
task_id: string | null;
|
|
5
|
+
line_item_type: "PREPAYMENT";
|
|
6
|
+
type: "SERVICE" | "MONTH";
|
|
7
|
+
time_updated: number | null;
|
|
8
|
+
num_events: number;
|
|
9
|
+
num_service_months: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RouteJob } from "../../types/api/RouteJob";
|
|
2
|
+
export interface Route {
|
|
3
|
+
company: string;
|
|
4
|
+
id: string;
|
|
5
|
+
is_internal: boolean;
|
|
6
|
+
jobs: RouteJob[];
|
|
7
|
+
name: string;
|
|
8
|
+
time_created: number;
|
|
9
|
+
time_updated: number | null;
|
|
10
|
+
teams: string[];
|
|
11
|
+
polyline: string;
|
|
12
|
+
is_optimized: boolean;
|
|
13
|
+
start_time: number;
|
|
14
|
+
end_time: number;
|
|
15
|
+
start_latitude: number;
|
|
16
|
+
start_longitude: number;
|
|
17
|
+
end_latitude: number;
|
|
18
|
+
end_longitude: number;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|