@fabriktor/client 0.0.34 → 0.0.36
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 +1 -25
- package/dist/src/billable/billable.js +0 -36
- package/dist/src/calls/calls.d.ts +1 -3
- package/dist/src/calls/calls.js +0 -3
- package/dist/src/chat/chat.d.ts +6 -23
- package/dist/src/chat/chat.js +2 -34
- package/dist/src/core/crud.d.ts +3 -11
- package/dist/src/core/crud.js +1 -15
- package/dist/src/core/type.d.ts +7 -0
- package/dist/src/core/type.js +6 -0
- package/dist/src/feed/feed.d.ts +1 -7
- package/dist/src/feed/feed.js +0 -9
- package/dist/src/fulfillments/fulfillments.d.ts +1 -3
- package/dist/src/fulfillments/fulfillments.js +0 -3
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/jobs/jobs.d.ts +1 -7
- package/dist/src/jobs/jobs.js +0 -9
- package/dist/src/marketplace/marketplace.d.ts +1 -5
- package/dist/src/marketplace/marketplace.js +0 -6
- package/dist/src/memos/memos.d.ts +1 -5
- package/dist/src/memos/memos.js +0 -6
- package/dist/src/payments/payments.d.ts +1 -17
- package/dist/src/payments/payments.js +0 -24
- package/dist/src/payrolls/payrolls.d.ts +1 -21
- package/dist/src/payrolls/payrolls.js +0 -30
- package/dist/src/preferences/preferences.d.ts +1 -19
- package/dist/src/preferences/preferences.js +0 -27
- package/dist/src/privacy/privacy.d.ts +1 -5
- package/dist/src/privacy/privacy.js +0 -6
- package/dist/src/routes/routes.d.ts +1 -11
- package/dist/src/routes/routes.js +0 -15
- package/dist/src/storage/storage.d.ts +1 -23
- package/dist/src/storage/storage.js +0 -33
- package/dist/src/timesheets/timesheets.d.ts +1 -5
- package/dist/src/timesheets/timesheets.js +0 -6
- package/package.json +1 -1
|
@@ -71,9 +71,6 @@ export class RoutesClient {
|
|
|
71
71
|
async deleteOneRoute(opts) {
|
|
72
72
|
return await this.routes.deleteOne(opts);
|
|
73
73
|
}
|
|
74
|
-
async deleteManyRoutes(opts) {
|
|
75
|
-
return await this.routes.deleteMany(opts);
|
|
76
|
-
}
|
|
77
74
|
async queryTags(opts) {
|
|
78
75
|
return await this.tags.query(opts);
|
|
79
76
|
}
|
|
@@ -89,9 +86,6 @@ export class RoutesClient {
|
|
|
89
86
|
async deleteOneTag(opts) {
|
|
90
87
|
return await this.tags.deleteOne(opts);
|
|
91
88
|
}
|
|
92
|
-
async deleteManyTags(opts) {
|
|
93
|
-
return await this.tags.deleteMany(opts);
|
|
94
|
-
}
|
|
95
89
|
async searchManyTags(opts) {
|
|
96
90
|
return await this.tags.searchMany(opts);
|
|
97
91
|
}
|
|
@@ -110,9 +104,6 @@ export class RoutesClient {
|
|
|
110
104
|
async deleteOneClientAvailability(opts) {
|
|
111
105
|
return await this.client_availabilities.deleteOne(opts);
|
|
112
106
|
}
|
|
113
|
-
async deleteManyClientAvailabilities(opts) {
|
|
114
|
-
return await this.client_availabilities.deleteMany(opts);
|
|
115
|
-
}
|
|
116
107
|
async queryTracking(opts) {
|
|
117
108
|
return await this.tracking.query(opts);
|
|
118
109
|
}
|
|
@@ -128,9 +119,6 @@ export class RoutesClient {
|
|
|
128
119
|
async deleteOneTracking(opts) {
|
|
129
120
|
return await this.tracking.deleteOne(opts);
|
|
130
121
|
}
|
|
131
|
-
async deleteManyTracking(opts) {
|
|
132
|
-
return await this.tracking.deleteMany(opts);
|
|
133
|
-
}
|
|
134
122
|
async queryRouteTeams(opts) {
|
|
135
123
|
return await this.route_teams.query(opts);
|
|
136
124
|
}
|
|
@@ -146,9 +134,6 @@ export class RoutesClient {
|
|
|
146
134
|
async deleteOneRouteTeam(opts) {
|
|
147
135
|
return await this.route_teams.deleteOne(opts);
|
|
148
136
|
}
|
|
149
|
-
async deleteManyRouteTeams(opts) {
|
|
150
|
-
return await this.route_teams.deleteMany(opts);
|
|
151
|
-
}
|
|
152
137
|
async searchManyRouteTeams(opts) {
|
|
153
138
|
return await this.route_teams.searchMany(opts);
|
|
154
139
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Object as StorageObject, type OperationResult, type PLStorageDownload, type RPStorageUpload } from "@fabriktor/schema";
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { DeleteOneOptionsCRUD, OperationResultOf } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
5
|
import { type MultipartDoer } from "../core/multipart.js";
|
|
6
6
|
export declare const storageCollections: readonly ["calls", "chat", "contacts", "jobs", "locations", "memos", "qr", "reports", "tickets", "users"];
|
|
@@ -26,47 +26,36 @@ export interface StorageOperator {
|
|
|
26
26
|
upload(col: StorageCollection, opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
27
27
|
download(col: StorageCollection, opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
28
28
|
deleteOne(col: StorageCollection, opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
29
|
-
deleteMany(col: StorageCollection, opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
30
29
|
uploadCalls(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
31
30
|
downloadCalls(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
32
31
|
deleteOneCallObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
33
|
-
deleteManyCallObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
34
32
|
uploadChat(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
35
33
|
downloadChat(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
36
34
|
deleteOneChatObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
37
|
-
deleteManyChatObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
38
35
|
uploadContacts(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
39
36
|
downloadContacts(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
40
37
|
deleteOneContactObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
41
|
-
deleteManyContactObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
42
38
|
uploadJobs(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
43
39
|
downloadJobs(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
44
40
|
deleteOneJobObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
45
|
-
deleteManyJobObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
46
41
|
uploadLocations(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
47
42
|
downloadLocations(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
48
43
|
deleteOneLocationObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
49
|
-
deleteManyLocationObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
50
44
|
uploadMemos(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
51
45
|
downloadMemos(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
52
46
|
deleteOneMemoObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
53
|
-
deleteManyMemoObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
54
47
|
uploadQR(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
55
48
|
downloadQR(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
56
49
|
deleteOneQRObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
57
|
-
deleteManyQRObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
58
50
|
uploadReports(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
59
51
|
downloadReports(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
60
52
|
deleteOneReportObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
61
|
-
deleteManyReportObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
62
53
|
uploadTickets(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
63
54
|
downloadTickets(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
64
55
|
deleteOneTicketObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
65
|
-
deleteManyTicketObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
66
56
|
uploadUsers(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
67
57
|
downloadUsers(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
68
58
|
deleteOneUserObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
69
|
-
deleteManyUserObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
70
59
|
}
|
|
71
60
|
export declare class StorageClient implements StorageOperator {
|
|
72
61
|
private objects;
|
|
@@ -78,47 +67,36 @@ export declare class StorageClient implements StorageOperator {
|
|
|
78
67
|
upload(col: StorageCollection, opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
79
68
|
download(col: StorageCollection, opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
80
69
|
deleteOne(col: StorageCollection, opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
81
|
-
deleteMany(col: StorageCollection, opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
82
70
|
uploadCalls(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
83
71
|
downloadCalls(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
84
72
|
deleteOneCallObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
85
|
-
deleteManyCallObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
86
73
|
uploadChat(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
87
74
|
downloadChat(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
88
75
|
deleteOneChatObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
89
|
-
deleteManyChatObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
90
76
|
uploadContacts(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
91
77
|
downloadContacts(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
92
78
|
deleteOneContactObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
93
|
-
deleteManyContactObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
94
79
|
uploadJobs(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
95
80
|
downloadJobs(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
96
81
|
deleteOneJobObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
97
|
-
deleteManyJobObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
98
82
|
uploadLocations(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
99
83
|
downloadLocations(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
100
84
|
deleteOneLocationObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
101
|
-
deleteManyLocationObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
102
85
|
uploadMemos(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
103
86
|
downloadMemos(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
104
87
|
deleteOneMemoObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
105
|
-
deleteManyMemoObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
106
88
|
uploadQR(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
107
89
|
downloadQR(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
108
90
|
deleteOneQRObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
109
|
-
deleteManyQRObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
110
91
|
uploadReports(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
111
92
|
downloadReports(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
112
93
|
deleteOneReportObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
113
|
-
deleteManyReportObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
114
94
|
uploadTickets(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
115
95
|
downloadTickets(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
116
96
|
deleteOneTicketObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
117
|
-
deleteManyTicketObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
118
97
|
uploadUsers(opts: UploadStorageOptions): Promise<OperationResultOf<RPStorageUpload>>;
|
|
119
98
|
downloadUsers(opts: DownloadStorageOptions): Promise<OperationResultOf<StorageObject[]>>;
|
|
120
99
|
deleteOneUserObject(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
121
|
-
deleteManyUserObjects(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
122
100
|
private object;
|
|
123
101
|
}
|
|
124
102
|
export declare function newStorageClient(opts: StorageClientOptions): StorageClient;
|
|
@@ -73,9 +73,6 @@ export class StorageClient {
|
|
|
73
73
|
async deleteOne(col, opts) {
|
|
74
74
|
return await this.object(col).deleteOne(opts);
|
|
75
75
|
}
|
|
76
|
-
async deleteMany(col, opts) {
|
|
77
|
-
return await this.object(col).deleteMany(opts);
|
|
78
|
-
}
|
|
79
76
|
async uploadCalls(opts) {
|
|
80
77
|
return await this.upload(ColStorageCalls, opts);
|
|
81
78
|
}
|
|
@@ -85,9 +82,6 @@ export class StorageClient {
|
|
|
85
82
|
async deleteOneCallObject(opts) {
|
|
86
83
|
return await this.deleteOne(ColStorageCalls, opts);
|
|
87
84
|
}
|
|
88
|
-
async deleteManyCallObjects(opts) {
|
|
89
|
-
return await this.deleteMany(ColStorageCalls, opts);
|
|
90
|
-
}
|
|
91
85
|
async uploadChat(opts) {
|
|
92
86
|
return await this.upload(ColStorageChat, opts);
|
|
93
87
|
}
|
|
@@ -97,9 +91,6 @@ export class StorageClient {
|
|
|
97
91
|
async deleteOneChatObject(opts) {
|
|
98
92
|
return await this.deleteOne(ColStorageChat, opts);
|
|
99
93
|
}
|
|
100
|
-
async deleteManyChatObjects(opts) {
|
|
101
|
-
return await this.deleteMany(ColStorageChat, opts);
|
|
102
|
-
}
|
|
103
94
|
async uploadContacts(opts) {
|
|
104
95
|
return await this.upload(ColStorageContacts, opts);
|
|
105
96
|
}
|
|
@@ -109,9 +100,6 @@ export class StorageClient {
|
|
|
109
100
|
async deleteOneContactObject(opts) {
|
|
110
101
|
return await this.deleteOne(ColStorageContacts, opts);
|
|
111
102
|
}
|
|
112
|
-
async deleteManyContactObjects(opts) {
|
|
113
|
-
return await this.deleteMany(ColStorageContacts, opts);
|
|
114
|
-
}
|
|
115
103
|
async uploadJobs(opts) {
|
|
116
104
|
return await this.upload(ColStorageJobs, opts);
|
|
117
105
|
}
|
|
@@ -121,9 +109,6 @@ export class StorageClient {
|
|
|
121
109
|
async deleteOneJobObject(opts) {
|
|
122
110
|
return await this.deleteOne(ColStorageJobs, opts);
|
|
123
111
|
}
|
|
124
|
-
async deleteManyJobObjects(opts) {
|
|
125
|
-
return await this.deleteMany(ColStorageJobs, opts);
|
|
126
|
-
}
|
|
127
112
|
async uploadLocations(opts) {
|
|
128
113
|
return await this.upload(ColStorageLocations, opts);
|
|
129
114
|
}
|
|
@@ -133,9 +118,6 @@ export class StorageClient {
|
|
|
133
118
|
async deleteOneLocationObject(opts) {
|
|
134
119
|
return await this.deleteOne(ColStorageLocations, opts);
|
|
135
120
|
}
|
|
136
|
-
async deleteManyLocationObjects(opts) {
|
|
137
|
-
return await this.deleteMany(ColStorageLocations, opts);
|
|
138
|
-
}
|
|
139
121
|
async uploadMemos(opts) {
|
|
140
122
|
return await this.upload(ColStorageMemos, opts);
|
|
141
123
|
}
|
|
@@ -145,9 +127,6 @@ export class StorageClient {
|
|
|
145
127
|
async deleteOneMemoObject(opts) {
|
|
146
128
|
return await this.deleteOne(ColStorageMemos, opts);
|
|
147
129
|
}
|
|
148
|
-
async deleteManyMemoObjects(opts) {
|
|
149
|
-
return await this.deleteMany(ColStorageMemos, opts);
|
|
150
|
-
}
|
|
151
130
|
async uploadQR(opts) {
|
|
152
131
|
return await this.upload(ColStorageQR, opts);
|
|
153
132
|
}
|
|
@@ -157,9 +136,6 @@ export class StorageClient {
|
|
|
157
136
|
async deleteOneQRObject(opts) {
|
|
158
137
|
return await this.deleteOne(ColStorageQR, opts);
|
|
159
138
|
}
|
|
160
|
-
async deleteManyQRObjects(opts) {
|
|
161
|
-
return await this.deleteMany(ColStorageQR, opts);
|
|
162
|
-
}
|
|
163
139
|
async uploadReports(opts) {
|
|
164
140
|
return await this.upload(ColStorageReports, opts);
|
|
165
141
|
}
|
|
@@ -169,9 +145,6 @@ export class StorageClient {
|
|
|
169
145
|
async deleteOneReportObject(opts) {
|
|
170
146
|
return await this.deleteOne(ColStorageReports, opts);
|
|
171
147
|
}
|
|
172
|
-
async deleteManyReportObjects(opts) {
|
|
173
|
-
return await this.deleteMany(ColStorageReports, opts);
|
|
174
|
-
}
|
|
175
148
|
async uploadTickets(opts) {
|
|
176
149
|
return await this.upload(ColStorageTickets, opts);
|
|
177
150
|
}
|
|
@@ -181,9 +154,6 @@ export class StorageClient {
|
|
|
181
154
|
async deleteOneTicketObject(opts) {
|
|
182
155
|
return await this.deleteOne(ColStorageTickets, opts);
|
|
183
156
|
}
|
|
184
|
-
async deleteManyTicketObjects(opts) {
|
|
185
|
-
return await this.deleteMany(ColStorageTickets, opts);
|
|
186
|
-
}
|
|
187
157
|
async uploadUsers(opts) {
|
|
188
158
|
return await this.upload(ColStorageUsers, opts);
|
|
189
159
|
}
|
|
@@ -193,9 +163,6 @@ export class StorageClient {
|
|
|
193
163
|
async deleteOneUserObject(opts) {
|
|
194
164
|
return await this.deleteOne(ColStorageUsers, opts);
|
|
195
165
|
}
|
|
196
|
-
async deleteManyUserObjects(opts) {
|
|
197
|
-
return await this.deleteMany(ColStorageUsers, opts);
|
|
198
|
-
}
|
|
199
166
|
object(col) {
|
|
200
167
|
const c = this.objects.get(col);
|
|
201
168
|
if (c === undefined) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InSummary, type InWeekSheet, type OperationResult, type PLTimesheetsApprove, type PLTimesheetsSync, type Punch, type Summary, type WeekSheet } from "@fabriktor/schema";
|
|
2
2
|
import type { TokenProvider } from "../core/auth.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { DeleteOneOptionsCRUD, FindOneOptionsCRUD, OperationResultOf, QueryOptionsCRUD, ReplaceOneOptionsCRUD } from "../core/crud.js";
|
|
4
4
|
import type { HTTPDoer } from "../core/http.js";
|
|
5
5
|
export type ApproveTimesheetsOptions = PLTimesheetsApprove;
|
|
6
6
|
export type SyncTimesheetsOptions = PLTimesheetsSync;
|
|
@@ -15,12 +15,10 @@ export interface TimesheetsOperator {
|
|
|
15
15
|
findOneWeekSheet(opts: FindOneOptionsCRUD): Promise<OperationResultOf<WeekSheet>>;
|
|
16
16
|
replaceOneWeekSheet(opts: ReplaceOneOptionsCRUD<InWeekSheet>): Promise<OperationResult>;
|
|
17
17
|
deleteOneWeekSheet(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
18
|
-
deleteManyWeekSheets(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
19
18
|
querySummaries(opts?: QueryOptionsCRUD): Promise<OperationResultOf<Summary[]>>;
|
|
20
19
|
findOneSummary(opts: FindOneOptionsCRUD): Promise<OperationResultOf<Summary>>;
|
|
21
20
|
replaceOneSummary(opts: ReplaceOneOptionsCRUD<InSummary>): Promise<OperationResult>;
|
|
22
21
|
deleteOneSummary(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
23
|
-
deleteManySummaries(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
24
22
|
approve(opts: ApproveTimesheetsOptions): Promise<void>;
|
|
25
23
|
sync(opts: SyncTimesheetsOptions): Promise<void>;
|
|
26
24
|
punch(opts: PunchTimesheetOptions): Promise<OperationResult>;
|
|
@@ -36,12 +34,10 @@ export declare class TimesheetsClient implements TimesheetsOperator {
|
|
|
36
34
|
findOneWeekSheet(opts: FindOneOptionsCRUD): Promise<OperationResultOf<WeekSheet>>;
|
|
37
35
|
replaceOneWeekSheet(opts: ReplaceOneOptionsCRUD<InWeekSheet>): Promise<OperationResult>;
|
|
38
36
|
deleteOneWeekSheet(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
39
|
-
deleteManyWeekSheets(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
40
37
|
querySummaries(opts?: QueryOptionsCRUD): Promise<OperationResultOf<Summary[]>>;
|
|
41
38
|
findOneSummary(opts: FindOneOptionsCRUD): Promise<OperationResultOf<Summary>>;
|
|
42
39
|
replaceOneSummary(opts: ReplaceOneOptionsCRUD<InSummary>): Promise<OperationResult>;
|
|
43
40
|
deleteOneSummary(opts: DeleteOneOptionsCRUD): Promise<OperationResult>;
|
|
44
|
-
deleteManySummaries(opts?: DeleteManyOptionsCRUD): Promise<OperationResultOf<number>>;
|
|
45
41
|
approve(opts: ApproveTimesheetsOptions): Promise<void>;
|
|
46
42
|
sync(opts: SyncTimesheetsOptions): Promise<void>;
|
|
47
43
|
punch(opts: PunchTimesheetOptions): Promise<OperationResult>;
|
|
@@ -44,9 +44,6 @@ export class TimesheetsClient {
|
|
|
44
44
|
async deleteOneWeekSheet(opts) {
|
|
45
45
|
return await this.weeksheets.deleteOne(opts);
|
|
46
46
|
}
|
|
47
|
-
async deleteManyWeekSheets(opts) {
|
|
48
|
-
return await this.weeksheets.deleteMany(opts);
|
|
49
|
-
}
|
|
50
47
|
async querySummaries(opts) {
|
|
51
48
|
return await this.summaries.query(opts);
|
|
52
49
|
}
|
|
@@ -59,9 +56,6 @@ export class TimesheetsClient {
|
|
|
59
56
|
async deleteOneSummary(opts) {
|
|
60
57
|
return await this.summaries.deleteOne(opts);
|
|
61
58
|
}
|
|
62
|
-
async deleteManySummaries(opts) {
|
|
63
|
-
return await this.summaries.deleteMany(opts);
|
|
64
|
-
}
|
|
65
59
|
async approve(opts) {
|
|
66
60
|
const token = await requiredToken(this.get_token);
|
|
67
61
|
return await this.http.do({
|