@fabriktor/fx 0.0.32 → 0.0.33
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/src/billable/billable.d.ts +12 -10
- package/dist/src/billable/billable.js +1 -2
- package/dist/src/calls/calls.d.ts +5 -5
- package/dist/src/chat/chat.d.ts +3 -2
- package/dist/src/core/pull.d.ts +39 -0
- package/dist/src/core/pull.js +101 -0
- package/dist/src/feed/feed.d.ts +167 -0
- package/dist/src/feed/feed.js +642 -0
- package/dist/src/fx.d.ts +42 -1
- package/dist/src/fx.js +94 -2
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.js +10 -0
- package/dist/src/jobs/jobs.d.ts +74 -0
- package/dist/src/jobs/jobs.js +375 -0
- package/dist/src/marketplace/marketplace.d.ts +35 -0
- package/dist/src/marketplace/marketplace.js +159 -0
- package/dist/src/notifications/notifications.d.ts +20 -0
- package/dist/src/notifications/notifications.js +45 -0
- package/dist/src/payments/payments.d.ts +59 -0
- package/dist/src/payments/payments.js +266 -0
- package/dist/src/payrolls/payrolls.d.ts +52 -0
- package/dist/src/payrolls/payrolls.js +54 -0
- package/dist/src/privacy/privacy.d.ts +21 -0
- package/dist/src/privacy/privacy.js +78 -0
- package/dist/src/routes/routes.d.ts +22 -0
- package/dist/src/routes/routes.js +134 -0
- package/dist/src/session/session.d.ts +17 -11
- package/dist/src/session/session.js +6 -12
- package/dist/src/storage/storage.d.ts +22 -13
- package/dist/src/storage/storage.js +56 -41
- package/dist/src/timesheets/timesheets.d.ts +91 -0
- package/dist/src/timesheets/timesheets.js +407 -0
- package/dist/src/users/users.d.ts +15 -11
- package/dist/src/users/users.js +2 -2
- package/package.json +3 -3
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UpsertResult } from "@fabriktor/schema";
|
|
2
2
|
import type { BootstrapOptions, ConnectionsOperator, OperationResultOf, UsersOperator } from "@fabriktor/client";
|
|
3
3
|
import type { AuthEmailOptions, AuthOperator } from "../auth/auth.js";
|
|
4
4
|
import type { UsersFXOperator } from "../users/users.js";
|
|
5
|
+
type ConnectionInsert = Parameters<ConnectionsOperator["insertOneConnection"]>[0]["in"];
|
|
6
|
+
type BootstrapInput = BootstrapOptions["in"];
|
|
5
7
|
export declare const SignInMode: {
|
|
6
8
|
readonly Email: "email";
|
|
7
9
|
readonly Username: "username";
|
|
@@ -11,14 +13,17 @@ export type SignInOptions = {
|
|
|
11
13
|
mode: SignInMode;
|
|
12
14
|
identifier: string;
|
|
13
15
|
password: string;
|
|
14
|
-
connection:
|
|
16
|
+
connection: ConnectionInsert;
|
|
15
17
|
};
|
|
16
18
|
export type SignInWithEmailOptions = AuthEmailOptions & {
|
|
17
|
-
connection:
|
|
19
|
+
connection: ConnectionInsert;
|
|
18
20
|
};
|
|
19
21
|
export type SignUpAndBootstrapOptions = AuthEmailOptions & {
|
|
20
|
-
in:
|
|
22
|
+
in: BootstrapInput;
|
|
21
23
|
};
|
|
24
|
+
export type ForgotPasswordOptions = Parameters<UsersOperator["forgotPassword"]>[0];
|
|
25
|
+
export type SendSignInLinkOptions = Parameters<UsersOperator["sendSignInLink"]>[0];
|
|
26
|
+
export type SendEmailVerificationOptions = Parameters<UsersOperator["sendEmailVerification"]>[0];
|
|
22
27
|
export type SessionFXOptions = {
|
|
23
28
|
auth: AuthOperator;
|
|
24
29
|
connections: ConnectionsOperator;
|
|
@@ -32,16 +37,16 @@ export interface SessionFXOperator {
|
|
|
32
37
|
signIn(opts: SignInOptions): Promise<void>;
|
|
33
38
|
signInWithEmail(opts: SignInWithEmailOptions): Promise<void>;
|
|
34
39
|
signOut(): Promise<void>;
|
|
35
|
-
forgotPassword(opts:
|
|
36
|
-
sendSignInLink(opts:
|
|
37
|
-
sendEmailVerification(opts:
|
|
40
|
+
forgotPassword(opts: ForgotPasswordOptions): Promise<void>;
|
|
41
|
+
sendSignInLink(opts: SendSignInLinkOptions): Promise<void>;
|
|
42
|
+
sendEmailVerification(opts: SendEmailVerificationOptions): Promise<void>;
|
|
38
43
|
checkEmailVerification(): Promise<boolean>;
|
|
39
44
|
}
|
|
40
45
|
export declare class SessionFX implements SessionFXOperator {
|
|
41
46
|
private auth;
|
|
42
47
|
private connections;
|
|
43
48
|
private users;
|
|
44
|
-
private
|
|
49
|
+
private usersFX;
|
|
45
50
|
constructor(opts: SessionFXOptions);
|
|
46
51
|
startSignUp(opts: AuthEmailOptions): Promise<void>;
|
|
47
52
|
finishSignUp(opts: BootstrapOptions): Promise<OperationResultOf<UpsertResult>>;
|
|
@@ -49,9 +54,10 @@ export declare class SessionFX implements SessionFXOperator {
|
|
|
49
54
|
signIn(opts: SignInOptions): Promise<void>;
|
|
50
55
|
signInWithEmail(opts: SignInWithEmailOptions): Promise<void>;
|
|
51
56
|
signOut(): Promise<void>;
|
|
52
|
-
forgotPassword(opts:
|
|
53
|
-
sendSignInLink(opts:
|
|
54
|
-
sendEmailVerification(opts:
|
|
57
|
+
forgotPassword(opts: ForgotPasswordOptions): Promise<void>;
|
|
58
|
+
sendSignInLink(opts: SendSignInLinkOptions): Promise<void>;
|
|
59
|
+
sendEmailVerification(opts: SendEmailVerificationOptions): Promise<void>;
|
|
55
60
|
checkEmailVerification(): Promise<boolean>;
|
|
56
61
|
}
|
|
57
62
|
export declare function newSessionFX(opts: SessionFXOptions): SessionFX;
|
|
63
|
+
export {};
|
|
@@ -11,12 +11,12 @@ export class SessionFX {
|
|
|
11
11
|
auth;
|
|
12
12
|
connections;
|
|
13
13
|
users;
|
|
14
|
-
|
|
14
|
+
usersFX;
|
|
15
15
|
constructor(opts) {
|
|
16
16
|
this.auth = opts.auth;
|
|
17
17
|
this.connections = opts.connections;
|
|
18
18
|
this.users = opts.users;
|
|
19
|
-
this.
|
|
19
|
+
this.usersFX = opts.users_fx;
|
|
20
20
|
}
|
|
21
21
|
async startSignUp(opts) {
|
|
22
22
|
await this.auth.signUp({
|
|
@@ -41,7 +41,7 @@ export class SessionFX {
|
|
|
41
41
|
async signIn(opts) {
|
|
42
42
|
const email = opts.mode === SignInMode.Email
|
|
43
43
|
? opts.identifier
|
|
44
|
-
: await this.
|
|
44
|
+
: await this.usersFX.resolveUsername({
|
|
45
45
|
username: opts.identifier,
|
|
46
46
|
});
|
|
47
47
|
await this.signInWithEmail({
|
|
@@ -64,19 +64,13 @@ export class SessionFX {
|
|
|
64
64
|
await this.auth.signOut();
|
|
65
65
|
}
|
|
66
66
|
async forgotPassword(opts) {
|
|
67
|
-
await this.users.forgotPassword(
|
|
68
|
-
email: opts.email,
|
|
69
|
-
});
|
|
67
|
+
await this.users.forgotPassword(opts);
|
|
70
68
|
}
|
|
71
69
|
async sendSignInLink(opts) {
|
|
72
|
-
await this.users.sendSignInLink(
|
|
73
|
-
email: opts.email,
|
|
74
|
-
});
|
|
70
|
+
await this.users.sendSignInLink(opts);
|
|
75
71
|
}
|
|
76
72
|
async sendEmailVerification(opts) {
|
|
77
|
-
await this.users.sendEmailVerification(
|
|
78
|
-
language: opts.language,
|
|
79
|
-
});
|
|
73
|
+
await this.users.sendEmailVerification(opts);
|
|
80
74
|
}
|
|
81
75
|
async checkEmailVerification() {
|
|
82
76
|
await this.auth.reloadUser();
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
import { type Object as StorageObject, type
|
|
2
|
-
import type { OperationResultOf, StorageCollection, StorageOperator, StorageUploadFile, UploadStorageOptions
|
|
1
|
+
import { type Object as StorageObject, type RPStorageUpload } from "@fabriktor/schema";
|
|
2
|
+
import type { OperationResultOf, OptionalField, StorageCollection, StorageOperator, StorageUploadFile, UploadStorageOptions } from "@fabriktor/client";
|
|
3
|
+
type StorageDownloadOptions = Parameters<StorageOperator["download"]>[1];
|
|
3
4
|
export declare const StorageUploadModeration: {
|
|
4
5
|
readonly Clean: "clean";
|
|
5
6
|
readonly ContainsForbidden: "contains_forbidden";
|
|
6
7
|
readonly AllForbidden: "all_forbidden";
|
|
7
8
|
};
|
|
8
9
|
export type StorageUploadModeration = (typeof StorageUploadModeration)[keyof typeof StorageUploadModeration];
|
|
9
|
-
export declare const
|
|
10
|
-
readonly
|
|
10
|
+
export declare const StoragePersonalBoxUploadStatus: {
|
|
11
|
+
readonly PrimaryOnly: "primary_only";
|
|
11
12
|
readonly Complete: "complete";
|
|
12
13
|
readonly Partial: "partial";
|
|
13
14
|
};
|
|
14
|
-
export type
|
|
15
|
+
export type StoragePersonalBoxUploadStatus = (typeof StoragePersonalBoxUploadStatus)[keyof typeof StoragePersonalBoxUploadStatus];
|
|
15
16
|
export type StorageFXOptions = {
|
|
16
17
|
storage: StorageOperator;
|
|
17
18
|
};
|
|
18
19
|
export type UploadObjectsOptions = UploadStorageOptions & {
|
|
19
20
|
col: StorageCollection;
|
|
20
21
|
};
|
|
21
|
-
export type
|
|
22
|
+
export type UploadObjectsWithPersonalBoxOptions = UploadObjectsOptions & {
|
|
23
|
+
user_id?: string;
|
|
24
|
+
save_to_personal_box?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type DownloadObjectsOptions = OptionalField<StorageDownloadOptions, "mime_prefix"> & {
|
|
22
27
|
col: StorageCollection;
|
|
23
28
|
};
|
|
24
29
|
export type UploadUserObjectsOptions = {
|
|
@@ -41,20 +46,22 @@ export type StorageUploadResult = {
|
|
|
41
46
|
contains_forbidden: boolean;
|
|
42
47
|
all_forbidden: boolean;
|
|
43
48
|
};
|
|
44
|
-
export type
|
|
45
|
-
status: typeof
|
|
46
|
-
|
|
49
|
+
export type StoragePersonalBoxUploadResult = {
|
|
50
|
+
status: typeof StoragePersonalBoxUploadStatus.PrimaryOnly;
|
|
51
|
+
primary: StorageUploadResult;
|
|
47
52
|
} | {
|
|
48
|
-
status: typeof
|
|
49
|
-
|
|
53
|
+
status: typeof StoragePersonalBoxUploadStatus.Complete;
|
|
54
|
+
primary: StorageUploadResult;
|
|
50
55
|
personal_box: StorageUploadResult;
|
|
51
56
|
} | {
|
|
52
|
-
status: typeof
|
|
53
|
-
|
|
57
|
+
status: typeof StoragePersonalBoxUploadStatus.Partial;
|
|
58
|
+
primary: StorageUploadResult;
|
|
54
59
|
personal_box_error: unknown;
|
|
55
60
|
};
|
|
61
|
+
export type UploadChatObjectsResult = StoragePersonalBoxUploadResult;
|
|
56
62
|
export interface StorageFXOperator {
|
|
57
63
|
uploadObjects(opts: UploadObjectsOptions): Promise<StorageUploadResult>;
|
|
64
|
+
uploadObjectsWithPersonalBox(opts: UploadObjectsWithPersonalBoxOptions): Promise<StoragePersonalBoxUploadResult>;
|
|
58
65
|
downloadObjects(opts: DownloadObjectsOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
59
66
|
uploadUserObjects(opts: UploadUserObjectsOptions): Promise<StorageUploadResult>;
|
|
60
67
|
uploadChatObjects(opts: UploadChatObjectsOptions): Promise<UploadChatObjectsResult>;
|
|
@@ -63,8 +70,10 @@ export declare class StorageFX implements StorageFXOperator {
|
|
|
63
70
|
private storage;
|
|
64
71
|
constructor(opts: StorageFXOptions);
|
|
65
72
|
uploadObjects(opts: UploadObjectsOptions): Promise<StorageUploadResult>;
|
|
73
|
+
uploadObjectsWithPersonalBox(opts: UploadObjectsWithPersonalBoxOptions): Promise<StoragePersonalBoxUploadResult>;
|
|
66
74
|
downloadObjects(opts: DownloadObjectsOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
67
75
|
uploadUserObjects(opts: UploadUserObjectsOptions): Promise<StorageUploadResult>;
|
|
68
76
|
uploadChatObjects(opts: UploadChatObjectsOptions): Promise<UploadChatObjectsResult>;
|
|
69
77
|
}
|
|
70
78
|
export declare function newStorageFX(opts: StorageFXOptions): StorageFX;
|
|
79
|
+
export {};
|
|
@@ -26,8 +26,8 @@ export const StorageUploadModeration = {
|
|
|
26
26
|
ContainsForbidden: "contains_forbidden",
|
|
27
27
|
AllForbidden: "all_forbidden",
|
|
28
28
|
};
|
|
29
|
-
export const
|
|
30
|
-
|
|
29
|
+
export const StoragePersonalBoxUploadStatus = {
|
|
30
|
+
PrimaryOnly: "primary_only",
|
|
31
31
|
Complete: "complete",
|
|
32
32
|
Partial: "partial",
|
|
33
33
|
};
|
|
@@ -38,14 +38,51 @@ export class StorageFX {
|
|
|
38
38
|
}
|
|
39
39
|
async uploadObjects(opts) {
|
|
40
40
|
validateUpload(opts);
|
|
41
|
+
const owner_id = opts.owner_id.trim();
|
|
41
42
|
const out = await this.storage.upload(opts.col, {
|
|
42
|
-
owner_id
|
|
43
|
+
owner_id,
|
|
43
44
|
uploader_id: opts.uploader_id,
|
|
44
45
|
full_quality: opts.full_quality,
|
|
45
46
|
files: opts.files,
|
|
46
47
|
});
|
|
47
48
|
return uploadResult(out);
|
|
48
49
|
}
|
|
50
|
+
async uploadObjectsWithPersonalBox(opts) {
|
|
51
|
+
const personal_box_user_id = personalBoxUserID(opts);
|
|
52
|
+
const primary = await this.uploadObjects({
|
|
53
|
+
col: opts.col,
|
|
54
|
+
owner_id: opts.owner_id,
|
|
55
|
+
uploader_id: opts.uploader_id,
|
|
56
|
+
full_quality: opts.full_quality,
|
|
57
|
+
files: opts.files,
|
|
58
|
+
});
|
|
59
|
+
if (personal_box_user_id === undefined) {
|
|
60
|
+
return {
|
|
61
|
+
status: StoragePersonalBoxUploadStatus.PrimaryOnly,
|
|
62
|
+
primary,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
const personal_box = await this.uploadUserObjects({
|
|
67
|
+
user_id: personal_box_user_id,
|
|
68
|
+
uploader_id: opts.uploader_id,
|
|
69
|
+
full_quality: opts.full_quality,
|
|
70
|
+
files: opts.files,
|
|
71
|
+
});
|
|
72
|
+
return {
|
|
73
|
+
status: StoragePersonalBoxUploadStatus.Complete,
|
|
74
|
+
primary,
|
|
75
|
+
personal_box,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
return {
|
|
80
|
+
status: StoragePersonalBoxUploadStatus.Partial,
|
|
81
|
+
primary,
|
|
82
|
+
personal_box_error: err,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
49
86
|
async downloadObjects(opts) {
|
|
50
87
|
const owner_id = opts.owner_id.trim();
|
|
51
88
|
if (owner_id === "") {
|
|
@@ -85,55 +122,33 @@ export class StorageFX {
|
|
|
85
122
|
msg: msgChatIDRequired,
|
|
86
123
|
});
|
|
87
124
|
}
|
|
88
|
-
|
|
89
|
-
if (opts.save_to_personal_box) {
|
|
90
|
-
const user_id = opts.user_id?.trim() ?? "";
|
|
91
|
-
if (user_id === "") {
|
|
92
|
-
throw errRequired({
|
|
93
|
-
field: "user_id",
|
|
94
|
-
msg: msgUserIDRequired,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
personal_box_user_id = user_id;
|
|
98
|
-
}
|
|
99
|
-
const chat = await this.uploadObjects({
|
|
125
|
+
return await this.uploadObjectsWithPersonalBox({
|
|
100
126
|
col: ColStorageChat,
|
|
101
127
|
owner_id: chat_id,
|
|
128
|
+
user_id: opts.user_id,
|
|
102
129
|
uploader_id: opts.uploader_id,
|
|
103
130
|
full_quality: opts.full_quality,
|
|
104
131
|
files: opts.files,
|
|
132
|
+
save_to_personal_box: opts.save_to_personal_box,
|
|
105
133
|
});
|
|
106
|
-
if (personal_box_user_id === undefined) {
|
|
107
|
-
return {
|
|
108
|
-
status: StorageDualUploadStatus.ChatOnly,
|
|
109
|
-
chat,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
try {
|
|
113
|
-
const personal_box = await this.uploadUserObjects({
|
|
114
|
-
user_id: personal_box_user_id,
|
|
115
|
-
uploader_id: opts.uploader_id,
|
|
116
|
-
full_quality: opts.full_quality,
|
|
117
|
-
files: opts.files,
|
|
118
|
-
});
|
|
119
|
-
return {
|
|
120
|
-
status: StorageDualUploadStatus.Complete,
|
|
121
|
-
chat,
|
|
122
|
-
personal_box,
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
catch (err) {
|
|
126
|
-
return {
|
|
127
|
-
status: StorageDualUploadStatus.Partial,
|
|
128
|
-
chat,
|
|
129
|
-
personal_box_error: err,
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
export function newStorageFX(opts) {
|
|
135
137
|
return new StorageFX(opts);
|
|
136
138
|
}
|
|
139
|
+
function personalBoxUserID(opts) {
|
|
140
|
+
if (!opts.save_to_personal_box) {
|
|
141
|
+
return undefined;
|
|
142
|
+
}
|
|
143
|
+
const user_id = opts.user_id?.trim();
|
|
144
|
+
if (user_id === undefined || user_id === "") {
|
|
145
|
+
throw errRequired({
|
|
146
|
+
field: "user_id",
|
|
147
|
+
msg: msgUserIDRequired,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
return user_id;
|
|
151
|
+
}
|
|
137
152
|
function validateUpload(opts) {
|
|
138
153
|
if (opts.owner_id.trim() === "") {
|
|
139
154
|
throw errRequired({
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type Date as SchemaDate, type OperationResult, type WeekSheet } from "@fabriktor/schema";
|
|
2
|
+
import type { TimesheetsOperator } from "@fabriktor/client";
|
|
3
|
+
type PunchPayload = Parameters<TimesheetsOperator["punch"]>[0];
|
|
4
|
+
export type TimesheetsFXOptions = {
|
|
5
|
+
timesheets: TimesheetsOperator;
|
|
6
|
+
};
|
|
7
|
+
export type PunchContext = Pick<PunchPayload, "timezone" | "location_id" | "employer_id">;
|
|
8
|
+
export type PunchInOptions = PunchContext & {
|
|
9
|
+
explicit_date?: SchemaDate;
|
|
10
|
+
};
|
|
11
|
+
export type PunchOutOptions = PunchContext & {
|
|
12
|
+
total_pause_minutes: number;
|
|
13
|
+
total_meal_minutes: number;
|
|
14
|
+
explicit_date?: SchemaDate;
|
|
15
|
+
};
|
|
16
|
+
export type RideInOptions = PunchContext & {
|
|
17
|
+
explicit_date?: SchemaDate;
|
|
18
|
+
};
|
|
19
|
+
export type RideOutOptions = PunchContext & {
|
|
20
|
+
explicit_date?: SchemaDate;
|
|
21
|
+
};
|
|
22
|
+
export type ReplaceDayOptions = PunchContext & {
|
|
23
|
+
punch_in_date: SchemaDate;
|
|
24
|
+
punch_out_date: SchemaDate;
|
|
25
|
+
total_pause_minutes: number;
|
|
26
|
+
total_meal_minutes: number;
|
|
27
|
+
};
|
|
28
|
+
export type ReplaceDayResult = {
|
|
29
|
+
punch_in: OperationResult;
|
|
30
|
+
punch_out: OperationResult;
|
|
31
|
+
};
|
|
32
|
+
export type DeleteDayOptions = PunchContext & {
|
|
33
|
+
explicit_date?: SchemaDate;
|
|
34
|
+
};
|
|
35
|
+
export type CreateBlankWeekSheetOptions = PunchContext & {
|
|
36
|
+
explicit_date?: SchemaDate;
|
|
37
|
+
};
|
|
38
|
+
export type PunchControlsOptions = {
|
|
39
|
+
week_sheet?: WeekSheet;
|
|
40
|
+
week_day: number;
|
|
41
|
+
};
|
|
42
|
+
export type PunchControls = {
|
|
43
|
+
can_punch_in: boolean;
|
|
44
|
+
can_punch_out: boolean;
|
|
45
|
+
can_ride_in: boolean;
|
|
46
|
+
can_ride_out: boolean;
|
|
47
|
+
};
|
|
48
|
+
export type SyncWeekOptions = {
|
|
49
|
+
from: WeekSheet;
|
|
50
|
+
to: WeekSheet[];
|
|
51
|
+
};
|
|
52
|
+
export type SyncDaysOptions = SyncWeekOptions & {
|
|
53
|
+
days: number[];
|
|
54
|
+
};
|
|
55
|
+
export type ApproveWeekSheetsOptions = {
|
|
56
|
+
employer_id: string;
|
|
57
|
+
week_sheets: WeekSheet[];
|
|
58
|
+
};
|
|
59
|
+
export interface TimesheetsFXOperator {
|
|
60
|
+
punchControls(opts: PunchControlsOptions): PunchControls;
|
|
61
|
+
punchIn(opts: PunchInOptions): Promise<OperationResult>;
|
|
62
|
+
punchOut(opts: PunchOutOptions): Promise<OperationResult>;
|
|
63
|
+
rideIn(opts: RideInOptions): Promise<OperationResult>;
|
|
64
|
+
rideOut(opts: RideOutOptions): Promise<OperationResult>;
|
|
65
|
+
replaceDay(opts: ReplaceDayOptions): Promise<ReplaceDayResult>;
|
|
66
|
+
deleteDay(opts: DeleteDayOptions): Promise<OperationResult>;
|
|
67
|
+
createBlankWeekSheet(opts: CreateBlankWeekSheetOptions): Promise<OperationResult>;
|
|
68
|
+
syncWeek(opts: SyncWeekOptions): Promise<void>;
|
|
69
|
+
syncDays(opts: SyncDaysOptions): Promise<void>;
|
|
70
|
+
approveWeekSheets(opts: ApproveWeekSheetsOptions): Promise<void>;
|
|
71
|
+
}
|
|
72
|
+
export declare class TimesheetsFX implements TimesheetsFXOperator {
|
|
73
|
+
private timesheets;
|
|
74
|
+
private punch_in_progress;
|
|
75
|
+
constructor(opts: TimesheetsFXOptions);
|
|
76
|
+
punchControls(opts: PunchControlsOptions): PunchControls;
|
|
77
|
+
punchIn(opts: PunchInOptions): Promise<OperationResult>;
|
|
78
|
+
punchOut(opts: PunchOutOptions): Promise<OperationResult>;
|
|
79
|
+
rideIn(opts: RideInOptions): Promise<OperationResult>;
|
|
80
|
+
rideOut(opts: RideOutOptions): Promise<OperationResult>;
|
|
81
|
+
replaceDay(opts: ReplaceDayOptions): Promise<ReplaceDayResult>;
|
|
82
|
+
deleteDay(opts: DeleteDayOptions): Promise<OperationResult>;
|
|
83
|
+
createBlankWeekSheet(opts: CreateBlankWeekSheetOptions): Promise<OperationResult>;
|
|
84
|
+
syncWeek(opts: SyncWeekOptions): Promise<void>;
|
|
85
|
+
syncDays(opts: SyncDaysOptions): Promise<void>;
|
|
86
|
+
approveWeekSheets(opts: ApproveWeekSheetsOptions): Promise<void>;
|
|
87
|
+
private syncSheets;
|
|
88
|
+
private runPunch;
|
|
89
|
+
}
|
|
90
|
+
export declare function newTimesheetsFX(opts: TimesheetsFXOptions): TimesheetsFX;
|
|
91
|
+
export {};
|