@fabriktor/fx 0.0.39 → 0.0.40
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 +164 -1
- package/dist/src/billable/billable.js +436 -0
- package/dist/src/calls/calls.d.ts +11 -0
- package/dist/src/calls/calls.js +26 -0
- package/dist/src/chat/chat.d.ts +22 -1
- package/dist/src/chat/chat.js +33 -25
- package/dist/src/contacts/contacts.d.ts +12 -2
- package/dist/src/contacts/contacts.js +33 -7
- package/dist/src/core/id.d.ts +3 -0
- package/dist/src/core/id.js +24 -0
- package/dist/src/feed/feed.d.ts +39 -3
- package/dist/src/feed/feed.js +85 -7
- package/dist/src/fulfillments/fulfillments.d.ts +32 -0
- package/dist/src/fulfillments/fulfillments.js +54 -0
- package/dist/src/fx.d.ts +5 -1
- package/dist/src/fx.js +11 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/jobs/jobs.d.ts +52 -4
- package/dist/src/jobs/jobs.js +120 -9
- package/dist/src/marketplace/marketplace.d.ts +29 -1
- package/dist/src/marketplace/marketplace.js +64 -1
- package/dist/src/memos/memos.js +4 -28
- package/dist/src/payments/payments.d.ts +112 -1
- package/dist/src/payments/payments.js +291 -15
- package/dist/src/payrolls/payrolls.d.ts +134 -1
- package/dist/src/payrolls/payrolls.js +364 -0
- package/dist/src/preferences/preferences.d.ts +83 -1
- package/dist/src/preferences/preferences.js +227 -0
- package/dist/src/privacy/privacy.d.ts +21 -2
- package/dist/src/privacy/privacy.js +56 -5
- package/dist/src/routes/routes.d.ts +63 -3
- package/dist/src/routes/routes.js +151 -1
- package/dist/src/timesheets/timesheets.d.ts +11 -1
- package/dist/src/timesheets/timesheets.js +39 -1
- package/package.json +2 -2
|
@@ -3,11 +3,245 @@
|
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
4
4
|
// not use this file except in compliance with the License. You may obtain
|
|
5
5
|
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
import { OwnerIDKey, } from "@fabriktor/schema";
|
|
7
|
+
import { errResolveFailed } from "../core/err.js";
|
|
8
|
+
import { requiredOperationID } from "../core/id.js";
|
|
9
|
+
import { runSearch } from "../core/search.js";
|
|
10
|
+
const resourcePayable = "payable";
|
|
11
|
+
const msgCreatedPayableIDMissing = "Created payable response did not contain an ID.";
|
|
12
|
+
const msgPayableMissing = "Payable could not be resolved after the mutation.";
|
|
13
|
+
const resourcePayroll = "payroll";
|
|
14
|
+
const msgCreatedPayrollIDMissing = "Created payroll response did not contain an ID.";
|
|
15
|
+
const msgPayrollMissing = "Payroll could not be resolved after the mutation.";
|
|
16
|
+
const resourcePayConfig = "pay_config";
|
|
17
|
+
const msgCreatedPayConfigIDMissing = "Created pay config response did not contain an ID.";
|
|
18
|
+
const msgPayConfigMissing = "Pay config could not be resolved after the mutation.";
|
|
19
|
+
const resourceHourBank = "hour_bank";
|
|
20
|
+
const msgCreatedHourBankIDMissing = "Created hour bank response did not contain an ID.";
|
|
21
|
+
const msgHourBankMissing = "Hour bank could not be resolved after the mutation.";
|
|
22
|
+
const resourceAdjustment = "adjustment";
|
|
23
|
+
const msgCreatedAdjustmentIDMissing = "Created adjustment response did not contain an ID.";
|
|
24
|
+
const msgAdjustmentMissing = "Adjustment could not be resolved after the mutation.";
|
|
25
|
+
const resourceAdjustmentFolder = "adjustment_folder";
|
|
26
|
+
const msgCreatedAdjustmentFolderIDMissing = "Created adjustment folder response did not contain an ID.";
|
|
27
|
+
const msgAdjustmentFolderMissing = "Adjustment folder could not be resolved after the mutation.";
|
|
28
|
+
const resourceAdjustmentRecord = "adjustment_record";
|
|
29
|
+
const msgCreatedAdjustmentRecordIDMissing = "Created adjustment record response did not contain an ID.";
|
|
30
|
+
const msgAdjustmentRecordMissing = "Adjustment record could not be resolved after the mutation.";
|
|
31
|
+
const resourceAdjustmentAggregate = "adjustment_aggregate";
|
|
32
|
+
const msgCreatedAdjustmentAggregateIDMissing = "Created adjustment aggregate response did not contain an ID.";
|
|
33
|
+
const msgAdjustmentAggregateMissing = "Adjustment aggregate could not be resolved after the mutation.";
|
|
34
|
+
const resourceEmployeePayConfig = "employee_pay_config";
|
|
35
|
+
const msgCreatedEmployeePayConfigIDMissing = "Created employee pay config response did not contain an ID.";
|
|
36
|
+
const msgEmployeePayConfigMissing = "Employee pay config could not be resolved after the mutation.";
|
|
37
|
+
const resourcePayrollProgram = "payroll_program";
|
|
38
|
+
const msgCreatedPayrollProgramIDMissing = "Created payroll program response did not contain an ID.";
|
|
39
|
+
const msgPayrollProgramMissing = "Payroll program could not be resolved after the mutation.";
|
|
6
40
|
export class PayrollsFX {
|
|
7
41
|
payrolls;
|
|
8
42
|
constructor(opts) {
|
|
9
43
|
this.payrolls = opts.payrolls;
|
|
10
44
|
}
|
|
45
|
+
async createPayable(opts) {
|
|
46
|
+
const out = await this.payrolls.insertOnePayable(opts);
|
|
47
|
+
const id = requiredOperationID(out, msgCreatedPayableIDMissing);
|
|
48
|
+
return await this.findPayable(id);
|
|
49
|
+
}
|
|
50
|
+
async replacePayable(opts) {
|
|
51
|
+
await this.payrolls.replaceOnePayable(opts);
|
|
52
|
+
return await this.findPayable(opts.id);
|
|
53
|
+
}
|
|
54
|
+
async searchPayables(opts) {
|
|
55
|
+
return await runSearch({
|
|
56
|
+
search: (searchOpts) => this.payrolls.searchManyPayables(searchOpts),
|
|
57
|
+
query: {
|
|
58
|
+
[OwnerIDKey]: opts.owner_id,
|
|
59
|
+
},
|
|
60
|
+
q: opts.q,
|
|
61
|
+
page: opts.page,
|
|
62
|
+
per_page: opts.per_page,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
async createPayroll(opts) {
|
|
66
|
+
const out = await this.payrolls.insertOnePayroll(opts);
|
|
67
|
+
const id = requiredOperationID(out, msgCreatedPayrollIDMissing);
|
|
68
|
+
return await this.findPayroll(id);
|
|
69
|
+
}
|
|
70
|
+
async replacePayroll(opts) {
|
|
71
|
+
await this.payrolls.replaceOnePayroll(opts);
|
|
72
|
+
return await this.findPayroll(opts.id);
|
|
73
|
+
}
|
|
74
|
+
async searchPayrolls(opts) {
|
|
75
|
+
return await runSearch({
|
|
76
|
+
search: (searchOpts) => this.payrolls.searchManyPayrolls(searchOpts),
|
|
77
|
+
query: {
|
|
78
|
+
[OwnerIDKey]: opts.owner_id,
|
|
79
|
+
},
|
|
80
|
+
q: opts.q,
|
|
81
|
+
page: opts.page,
|
|
82
|
+
per_page: opts.per_page,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async createPayConfig(opts) {
|
|
86
|
+
const out = await this.payrolls.insertOnePayConfig(opts);
|
|
87
|
+
const id = requiredOperationID(out, msgCreatedPayConfigIDMissing);
|
|
88
|
+
return await this.findPayConfig(id);
|
|
89
|
+
}
|
|
90
|
+
async replacePayConfig(opts) {
|
|
91
|
+
await this.payrolls.replaceOnePayConfig(opts);
|
|
92
|
+
return await this.findPayConfig(opts.id);
|
|
93
|
+
}
|
|
94
|
+
async searchPayConfigs(opts) {
|
|
95
|
+
return await runSearch({
|
|
96
|
+
search: (searchOpts) => this.payrolls.searchManyPayConfigs(searchOpts),
|
|
97
|
+
query: {
|
|
98
|
+
[OwnerIDKey]: opts.owner_id,
|
|
99
|
+
},
|
|
100
|
+
q: opts.q,
|
|
101
|
+
page: opts.page,
|
|
102
|
+
per_page: opts.per_page,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
async createHourBank(opts) {
|
|
106
|
+
const out = await this.payrolls.insertOneHourBank(opts);
|
|
107
|
+
const id = requiredOperationID(out, msgCreatedHourBankIDMissing);
|
|
108
|
+
return await this.findHourBank(id);
|
|
109
|
+
}
|
|
110
|
+
async replaceHourBank(opts) {
|
|
111
|
+
await this.payrolls.replaceOneHourBank(opts);
|
|
112
|
+
return await this.findHourBank(opts.id);
|
|
113
|
+
}
|
|
114
|
+
async searchHourBanks(opts) {
|
|
115
|
+
return await runSearch({
|
|
116
|
+
search: (searchOpts) => this.payrolls.searchManyHourBanks(searchOpts),
|
|
117
|
+
query: {
|
|
118
|
+
[OwnerIDKey]: opts.owner_id,
|
|
119
|
+
},
|
|
120
|
+
q: opts.q,
|
|
121
|
+
page: opts.page,
|
|
122
|
+
per_page: opts.per_page,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
async createAdjustment(opts) {
|
|
126
|
+
const out = await this.payrolls.insertOneAdjustment(opts);
|
|
127
|
+
const id = requiredOperationID(out, msgCreatedAdjustmentIDMissing);
|
|
128
|
+
return await this.findAdjustment(id);
|
|
129
|
+
}
|
|
130
|
+
async replaceAdjustment(opts) {
|
|
131
|
+
await this.payrolls.replaceOneAdjustment(opts);
|
|
132
|
+
return await this.findAdjustment(opts.id);
|
|
133
|
+
}
|
|
134
|
+
async searchAdjustments(opts) {
|
|
135
|
+
return await runSearch({
|
|
136
|
+
search: (searchOpts) => this.payrolls.searchManyAdjustments(searchOpts),
|
|
137
|
+
query: {
|
|
138
|
+
[OwnerIDKey]: opts.owner_id,
|
|
139
|
+
},
|
|
140
|
+
q: opts.q,
|
|
141
|
+
page: opts.page,
|
|
142
|
+
per_page: opts.per_page,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
async createAdjustmentFolder(opts) {
|
|
146
|
+
const out = await this.payrolls.insertOneAdjustmentFolder(opts);
|
|
147
|
+
const id = requiredOperationID(out, msgCreatedAdjustmentFolderIDMissing);
|
|
148
|
+
return await this.findAdjustmentFolder(id);
|
|
149
|
+
}
|
|
150
|
+
async replaceAdjustmentFolder(opts) {
|
|
151
|
+
await this.payrolls.replaceOneAdjustmentFolder(opts);
|
|
152
|
+
return await this.findAdjustmentFolder(opts.id);
|
|
153
|
+
}
|
|
154
|
+
async searchAdjustmentFolders(opts) {
|
|
155
|
+
return await runSearch({
|
|
156
|
+
search: (searchOpts) => this.payrolls.searchManyAdjustmentFolders(searchOpts),
|
|
157
|
+
query: {
|
|
158
|
+
[OwnerIDKey]: opts.owner_id,
|
|
159
|
+
},
|
|
160
|
+
q: opts.q,
|
|
161
|
+
page: opts.page,
|
|
162
|
+
per_page: opts.per_page,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
async createAdjustmentRecord(opts) {
|
|
166
|
+
const out = await this.payrolls.insertOneAdjustmentRecord(opts);
|
|
167
|
+
const id = requiredOperationID(out, msgCreatedAdjustmentRecordIDMissing);
|
|
168
|
+
return await this.findAdjustmentRecord(id);
|
|
169
|
+
}
|
|
170
|
+
async replaceAdjustmentRecord(opts) {
|
|
171
|
+
await this.payrolls.replaceOneAdjustmentRecord(opts);
|
|
172
|
+
return await this.findAdjustmentRecord(opts.id);
|
|
173
|
+
}
|
|
174
|
+
async searchAdjustmentRecords(opts) {
|
|
175
|
+
return await runSearch({
|
|
176
|
+
search: (searchOpts) => this.payrolls.searchManyAdjustmentRecords(searchOpts),
|
|
177
|
+
query: {
|
|
178
|
+
[OwnerIDKey]: opts.owner_id,
|
|
179
|
+
},
|
|
180
|
+
q: opts.q,
|
|
181
|
+
page: opts.page,
|
|
182
|
+
per_page: opts.per_page,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
async createAdjustmentAggregate(opts) {
|
|
186
|
+
const out = await this.payrolls.insertOneAdjustmentAggregate(opts);
|
|
187
|
+
const id = requiredOperationID(out, msgCreatedAdjustmentAggregateIDMissing);
|
|
188
|
+
return await this.findAdjustmentAggregate(id);
|
|
189
|
+
}
|
|
190
|
+
async replaceAdjustmentAggregate(opts) {
|
|
191
|
+
await this.payrolls.replaceOneAdjustmentAggregate(opts);
|
|
192
|
+
return await this.findAdjustmentAggregate(opts.id);
|
|
193
|
+
}
|
|
194
|
+
async searchAdjustmentAggregates(opts) {
|
|
195
|
+
return await runSearch({
|
|
196
|
+
search: (searchOpts) => this.payrolls.searchManyAdjustmentAggregates(searchOpts),
|
|
197
|
+
query: {
|
|
198
|
+
[OwnerIDKey]: opts.owner_id,
|
|
199
|
+
},
|
|
200
|
+
q: opts.q,
|
|
201
|
+
page: opts.page,
|
|
202
|
+
per_page: opts.per_page,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
async createEmployeePayConfig(opts) {
|
|
206
|
+
const out = await this.payrolls.insertOneEmployeePayConfig(opts);
|
|
207
|
+
const id = requiredOperationID(out, msgCreatedEmployeePayConfigIDMissing);
|
|
208
|
+
return await this.findEmployeePayConfig(id);
|
|
209
|
+
}
|
|
210
|
+
async replaceEmployeePayConfig(opts) {
|
|
211
|
+
await this.payrolls.replaceOneEmployeePayConfig(opts);
|
|
212
|
+
return await this.findEmployeePayConfig(opts.id);
|
|
213
|
+
}
|
|
214
|
+
async searchEmployeePayConfigs(opts) {
|
|
215
|
+
return await runSearch({
|
|
216
|
+
search: (searchOpts) => this.payrolls.searchManyEmployeePayConfigs(searchOpts),
|
|
217
|
+
query: {
|
|
218
|
+
[OwnerIDKey]: opts.owner_id,
|
|
219
|
+
},
|
|
220
|
+
q: opts.q,
|
|
221
|
+
page: opts.page,
|
|
222
|
+
per_page: opts.per_page,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
async createPayrollProgram(opts) {
|
|
226
|
+
const out = await this.payrolls.insertOnePayrollProgram(opts);
|
|
227
|
+
const id = requiredOperationID(out, msgCreatedPayrollProgramIDMissing);
|
|
228
|
+
return await this.findPayrollProgram(id);
|
|
229
|
+
}
|
|
230
|
+
async replacePayrollProgram(opts) {
|
|
231
|
+
await this.payrolls.replaceOnePayrollProgram(opts);
|
|
232
|
+
return await this.findPayrollProgram(opts.id);
|
|
233
|
+
}
|
|
234
|
+
async searchPayrollPrograms(opts) {
|
|
235
|
+
return await runSearch({
|
|
236
|
+
search: (searchOpts) => this.payrolls.searchManyPayrollPrograms(searchOpts),
|
|
237
|
+
query: {
|
|
238
|
+
[OwnerIDKey]: opts.owner_id,
|
|
239
|
+
},
|
|
240
|
+
q: opts.q,
|
|
241
|
+
page: opts.page,
|
|
242
|
+
per_page: opts.per_page,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
11
245
|
async setAdjustmentArchived(opts) {
|
|
12
246
|
return await this.payrolls.replaceOneAdjustment({
|
|
13
247
|
id: opts.id,
|
|
@@ -48,6 +282,136 @@ export class PayrollsFX {
|
|
|
48
282
|
},
|
|
49
283
|
});
|
|
50
284
|
}
|
|
285
|
+
async findPayable(id) {
|
|
286
|
+
const out = await this.payrolls.findOnePayable({
|
|
287
|
+
id,
|
|
288
|
+
});
|
|
289
|
+
const payable = out.value;
|
|
290
|
+
if (payable === undefined) {
|
|
291
|
+
throw errResolveFailed({
|
|
292
|
+
resource: resourcePayable,
|
|
293
|
+
msg: msgPayableMissing,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
return payable;
|
|
297
|
+
}
|
|
298
|
+
async findPayroll(id) {
|
|
299
|
+
const out = await this.payrolls.findOnePayroll({
|
|
300
|
+
id,
|
|
301
|
+
});
|
|
302
|
+
const payroll = out.value;
|
|
303
|
+
if (payroll === undefined) {
|
|
304
|
+
throw errResolveFailed({
|
|
305
|
+
resource: resourcePayroll,
|
|
306
|
+
msg: msgPayrollMissing,
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
return payroll;
|
|
310
|
+
}
|
|
311
|
+
async findPayConfig(id) {
|
|
312
|
+
const out = await this.payrolls.findOnePayConfig({
|
|
313
|
+
id,
|
|
314
|
+
});
|
|
315
|
+
const pay_config = out.value;
|
|
316
|
+
if (pay_config === undefined) {
|
|
317
|
+
throw errResolveFailed({
|
|
318
|
+
resource: resourcePayConfig,
|
|
319
|
+
msg: msgPayConfigMissing,
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
return pay_config;
|
|
323
|
+
}
|
|
324
|
+
async findHourBank(id) {
|
|
325
|
+
const out = await this.payrolls.findOneHourBank({
|
|
326
|
+
id,
|
|
327
|
+
});
|
|
328
|
+
const hour_bank = out.value;
|
|
329
|
+
if (hour_bank === undefined) {
|
|
330
|
+
throw errResolveFailed({
|
|
331
|
+
resource: resourceHourBank,
|
|
332
|
+
msg: msgHourBankMissing,
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
return hour_bank;
|
|
336
|
+
}
|
|
337
|
+
async findAdjustment(id) {
|
|
338
|
+
const out = await this.payrolls.findOneAdjustment({
|
|
339
|
+
id,
|
|
340
|
+
});
|
|
341
|
+
const adjustment = out.value;
|
|
342
|
+
if (adjustment === undefined) {
|
|
343
|
+
throw errResolveFailed({
|
|
344
|
+
resource: resourceAdjustment,
|
|
345
|
+
msg: msgAdjustmentMissing,
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
return adjustment;
|
|
349
|
+
}
|
|
350
|
+
async findAdjustmentFolder(id) {
|
|
351
|
+
const out = await this.payrolls.findOneAdjustmentFolder({
|
|
352
|
+
id,
|
|
353
|
+
});
|
|
354
|
+
const adjustment_folder = out.value;
|
|
355
|
+
if (adjustment_folder === undefined) {
|
|
356
|
+
throw errResolveFailed({
|
|
357
|
+
resource: resourceAdjustmentFolder,
|
|
358
|
+
msg: msgAdjustmentFolderMissing,
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
return adjustment_folder;
|
|
362
|
+
}
|
|
363
|
+
async findAdjustmentRecord(id) {
|
|
364
|
+
const out = await this.payrolls.findOneAdjustmentRecord({
|
|
365
|
+
id,
|
|
366
|
+
});
|
|
367
|
+
const adjustment_record = out.value;
|
|
368
|
+
if (adjustment_record === undefined) {
|
|
369
|
+
throw errResolveFailed({
|
|
370
|
+
resource: resourceAdjustmentRecord,
|
|
371
|
+
msg: msgAdjustmentRecordMissing,
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
return adjustment_record;
|
|
375
|
+
}
|
|
376
|
+
async findAdjustmentAggregate(id) {
|
|
377
|
+
const out = await this.payrolls.findOneAdjustmentAggregate({
|
|
378
|
+
id,
|
|
379
|
+
});
|
|
380
|
+
const adjustment_aggregate = out.value;
|
|
381
|
+
if (adjustment_aggregate === undefined) {
|
|
382
|
+
throw errResolveFailed({
|
|
383
|
+
resource: resourceAdjustmentAggregate,
|
|
384
|
+
msg: msgAdjustmentAggregateMissing,
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
return adjustment_aggregate;
|
|
388
|
+
}
|
|
389
|
+
async findEmployeePayConfig(id) {
|
|
390
|
+
const out = await this.payrolls.findOneEmployeePayConfig({
|
|
391
|
+
id,
|
|
392
|
+
});
|
|
393
|
+
const employee_pay_config = out.value;
|
|
394
|
+
if (employee_pay_config === undefined) {
|
|
395
|
+
throw errResolveFailed({
|
|
396
|
+
resource: resourceEmployeePayConfig,
|
|
397
|
+
msg: msgEmployeePayConfigMissing,
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
return employee_pay_config;
|
|
401
|
+
}
|
|
402
|
+
async findPayrollProgram(id) {
|
|
403
|
+
const out = await this.payrolls.findOnePayrollProgram({
|
|
404
|
+
id,
|
|
405
|
+
});
|
|
406
|
+
const payroll_program = out.value;
|
|
407
|
+
if (payroll_program === undefined) {
|
|
408
|
+
throw errResolveFailed({
|
|
409
|
+
resource: resourcePayrollProgram,
|
|
410
|
+
msg: msgPayrollProgramMissing,
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
return payroll_program;
|
|
414
|
+
}
|
|
51
415
|
}
|
|
52
416
|
export function newPayrollsFX(opts) {
|
|
53
417
|
return new PayrollsFX(opts);
|
|
@@ -1,5 +1,41 @@
|
|
|
1
|
-
import type { OperationResult } from "@fabriktor/schema";
|
|
2
1
|
import type { PreferencesOperator } from "@fabriktor/client";
|
|
2
|
+
import { type OperationResult, type PrefPayment, type PrefClient, type PrefEmployee, type PrefCompany, type PrefVisibility, type PrefLanguage, type PrefNotif, type PrefEmail, type PrefTutorial } from "@fabriktor/schema";
|
|
3
|
+
type PrefPaymentInsertOptions = Parameters<PreferencesOperator["insertOnePrefPayment"]>[0];
|
|
4
|
+
type PrefPaymentReplaceOptions = Parameters<PreferencesOperator["replaceOnePrefPayment"]>[0];
|
|
5
|
+
type PrefClientInsertOptions = Parameters<PreferencesOperator["insertOnePrefClient"]>[0];
|
|
6
|
+
type PrefClientReplaceOptions = Parameters<PreferencesOperator["replaceOnePrefClient"]>[0];
|
|
7
|
+
type PrefEmployeeInsertOptions = Parameters<PreferencesOperator["insertOnePrefEmployee"]>[0];
|
|
8
|
+
type PrefEmployeeReplaceOptions = Parameters<PreferencesOperator["replaceOnePrefEmployee"]>[0];
|
|
9
|
+
type PrefCompanyInsertOptions = Parameters<PreferencesOperator["insertOnePrefCompany"]>[0];
|
|
10
|
+
type PrefCompanyReplaceOptions = Parameters<PreferencesOperator["replaceOnePrefCompany"]>[0];
|
|
11
|
+
type PrefVisibilityInsertOptions = Parameters<PreferencesOperator["insertOnePrefVisibility"]>[0];
|
|
12
|
+
type PrefVisibilityReplaceOptions = Parameters<PreferencesOperator["replaceOnePrefVisibility"]>[0];
|
|
13
|
+
type PrefLanguageInsertOptions = Parameters<PreferencesOperator["insertOnePrefLanguage"]>[0];
|
|
14
|
+
type PrefLanguageReplaceOptions = Parameters<PreferencesOperator["replaceOnePrefLanguage"]>[0];
|
|
15
|
+
type PrefNotifInsertOptions = Parameters<PreferencesOperator["insertOnePrefNotif"]>[0];
|
|
16
|
+
type PrefNotifReplaceOptions = Parameters<PreferencesOperator["replaceOnePrefNotif"]>[0];
|
|
17
|
+
type PrefEmailInsertOptions = Parameters<PreferencesOperator["insertOnePrefEmail"]>[0];
|
|
18
|
+
type PrefEmailReplaceOptions = Parameters<PreferencesOperator["replaceOnePrefEmail"]>[0];
|
|
19
|
+
type PrefTutorialInsertOptions = Parameters<PreferencesOperator["insertOnePrefTutorial"]>[0];
|
|
20
|
+
type PrefTutorialReplaceOptions = Parameters<PreferencesOperator["replaceOnePrefTutorial"]>[0];
|
|
21
|
+
export type CreatePrefPaymentOptions = PrefPaymentInsertOptions;
|
|
22
|
+
export type ReplacePrefPaymentOptions = PrefPaymentReplaceOptions;
|
|
23
|
+
export type CreatePrefClientOptions = PrefClientInsertOptions;
|
|
24
|
+
export type ReplacePrefClientOptions = PrefClientReplaceOptions;
|
|
25
|
+
export type CreatePrefEmployeeOptions = PrefEmployeeInsertOptions;
|
|
26
|
+
export type ReplacePrefEmployeeOptions = PrefEmployeeReplaceOptions;
|
|
27
|
+
export type CreatePrefCompanyOptions = PrefCompanyInsertOptions;
|
|
28
|
+
export type ReplacePrefCompanyOptions = PrefCompanyReplaceOptions;
|
|
29
|
+
export type CreatePrefVisibilityOptions = PrefVisibilityInsertOptions;
|
|
30
|
+
export type ReplacePrefVisibilityOptions = PrefVisibilityReplaceOptions;
|
|
31
|
+
export type CreatePrefLanguageOptions = PrefLanguageInsertOptions;
|
|
32
|
+
export type ReplacePrefLanguageOptions = PrefLanguageReplaceOptions;
|
|
33
|
+
export type CreatePrefNotifOptions = PrefNotifInsertOptions;
|
|
34
|
+
export type ReplacePrefNotifOptions = PrefNotifReplaceOptions;
|
|
35
|
+
export type CreatePrefEmailOptions = PrefEmailInsertOptions;
|
|
36
|
+
export type ReplacePrefEmailOptions = PrefEmailReplaceOptions;
|
|
37
|
+
export type CreatePrefTutorialOptions = PrefTutorialInsertOptions;
|
|
38
|
+
export type ReplacePrefTutorialOptions = PrefTutorialReplaceOptions;
|
|
3
39
|
export type EnsurePrefLanguageOptions = {
|
|
4
40
|
owner_id: string;
|
|
5
41
|
language: string;
|
|
@@ -7,6 +43,24 @@ export type EnsurePrefLanguageOptions = {
|
|
|
7
43
|
speech_to_text_source_language?: string;
|
|
8
44
|
};
|
|
9
45
|
export interface PreferencesFXOperator {
|
|
46
|
+
createPrefPayment(opts: CreatePrefPaymentOptions): Promise<PrefPayment>;
|
|
47
|
+
replacePrefPayment(opts: ReplacePrefPaymentOptions): Promise<PrefPayment>;
|
|
48
|
+
createPrefClient(opts: CreatePrefClientOptions): Promise<PrefClient>;
|
|
49
|
+
replacePrefClient(opts: ReplacePrefClientOptions): Promise<PrefClient>;
|
|
50
|
+
createPrefEmployee(opts: CreatePrefEmployeeOptions): Promise<PrefEmployee>;
|
|
51
|
+
replacePrefEmployee(opts: ReplacePrefEmployeeOptions): Promise<PrefEmployee>;
|
|
52
|
+
createPrefCompany(opts: CreatePrefCompanyOptions): Promise<PrefCompany>;
|
|
53
|
+
replacePrefCompany(opts: ReplacePrefCompanyOptions): Promise<PrefCompany>;
|
|
54
|
+
createPrefVisibility(opts: CreatePrefVisibilityOptions): Promise<PrefVisibility>;
|
|
55
|
+
replacePrefVisibility(opts: ReplacePrefVisibilityOptions): Promise<PrefVisibility>;
|
|
56
|
+
createPrefLanguage(opts: CreatePrefLanguageOptions): Promise<PrefLanguage>;
|
|
57
|
+
replacePrefLanguage(opts: ReplacePrefLanguageOptions): Promise<PrefLanguage>;
|
|
58
|
+
createPrefNotif(opts: CreatePrefNotifOptions): Promise<PrefNotif>;
|
|
59
|
+
replacePrefNotif(opts: ReplacePrefNotifOptions): Promise<PrefNotif>;
|
|
60
|
+
createPrefEmail(opts: CreatePrefEmailOptions): Promise<PrefEmail>;
|
|
61
|
+
replacePrefEmail(opts: ReplacePrefEmailOptions): Promise<PrefEmail>;
|
|
62
|
+
createPrefTutorial(opts: CreatePrefTutorialOptions): Promise<PrefTutorial>;
|
|
63
|
+
replacePrefTutorial(opts: ReplacePrefTutorialOptions): Promise<PrefTutorial>;
|
|
10
64
|
ensurePrefLanguage(opts: EnsurePrefLanguageOptions): Promise<OperationResult>;
|
|
11
65
|
}
|
|
12
66
|
export type PreferencesFXOptions = {
|
|
@@ -15,6 +69,34 @@ export type PreferencesFXOptions = {
|
|
|
15
69
|
export declare class PreferencesFX implements PreferencesFXOperator {
|
|
16
70
|
private preferences;
|
|
17
71
|
constructor(opts: PreferencesFXOptions);
|
|
72
|
+
createPrefPayment(opts: CreatePrefPaymentOptions): Promise<PrefPayment>;
|
|
73
|
+
replacePrefPayment(opts: ReplacePrefPaymentOptions): Promise<PrefPayment>;
|
|
74
|
+
createPrefClient(opts: CreatePrefClientOptions): Promise<PrefClient>;
|
|
75
|
+
replacePrefClient(opts: ReplacePrefClientOptions): Promise<PrefClient>;
|
|
76
|
+
createPrefEmployee(opts: CreatePrefEmployeeOptions): Promise<PrefEmployee>;
|
|
77
|
+
replacePrefEmployee(opts: ReplacePrefEmployeeOptions): Promise<PrefEmployee>;
|
|
78
|
+
createPrefCompany(opts: CreatePrefCompanyOptions): Promise<PrefCompany>;
|
|
79
|
+
replacePrefCompany(opts: ReplacePrefCompanyOptions): Promise<PrefCompany>;
|
|
80
|
+
createPrefVisibility(opts: CreatePrefVisibilityOptions): Promise<PrefVisibility>;
|
|
81
|
+
replacePrefVisibility(opts: ReplacePrefVisibilityOptions): Promise<PrefVisibility>;
|
|
82
|
+
createPrefLanguage(opts: CreatePrefLanguageOptions): Promise<PrefLanguage>;
|
|
83
|
+
replacePrefLanguage(opts: ReplacePrefLanguageOptions): Promise<PrefLanguage>;
|
|
84
|
+
createPrefNotif(opts: CreatePrefNotifOptions): Promise<PrefNotif>;
|
|
85
|
+
replacePrefNotif(opts: ReplacePrefNotifOptions): Promise<PrefNotif>;
|
|
86
|
+
createPrefEmail(opts: CreatePrefEmailOptions): Promise<PrefEmail>;
|
|
87
|
+
replacePrefEmail(opts: ReplacePrefEmailOptions): Promise<PrefEmail>;
|
|
88
|
+
createPrefTutorial(opts: CreatePrefTutorialOptions): Promise<PrefTutorial>;
|
|
89
|
+
replacePrefTutorial(opts: ReplacePrefTutorialOptions): Promise<PrefTutorial>;
|
|
18
90
|
ensurePrefLanguage(opts: EnsurePrefLanguageOptions): Promise<OperationResult>;
|
|
91
|
+
private findPrefPayment;
|
|
92
|
+
private findPrefClient;
|
|
93
|
+
private findPrefEmployee;
|
|
94
|
+
private findPrefCompany;
|
|
95
|
+
private findPrefVisibility;
|
|
96
|
+
private findPrefLanguage;
|
|
97
|
+
private findPrefNotif;
|
|
98
|
+
private findPrefEmail;
|
|
99
|
+
private findPrefTutorial;
|
|
19
100
|
}
|
|
20
101
|
export declare function newPreferencesFX(opts: PreferencesFXOptions): PreferencesFX;
|
|
102
|
+
export {};
|