hububb-saas-shared 1.2.25 → 1.2.27
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/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/task-estimate/index.d.ts +37 -0
- package/dist/schemas/task-estimate/index.js +17 -0
- package/dist/schemas/task-provider-pricing/index.d.ts +58 -0
- package/dist/schemas/task-provider-pricing/index.js +24 -0
- package/dist/schemas/task-quote/index.d.ts +27 -0
- package/dist/schemas/task-quote/index.js +9 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/service-provider/index.d.ts +2 -0
- package/dist/types/task/index.d.ts +4 -0
- package/dist/types/task-estimate/index.d.ts +6 -0
- package/dist/types/task-estimate/index.js +2 -0
- package/dist/types/task-provider-pricing/index.d.ts +8 -0
- package/dist/types/task-provider-pricing/index.js +2 -0
- package/package.json +1 -1
package/dist/schemas/index.d.ts
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -108,3 +108,5 @@ __exportStar(require("./task-quote"), exports);
|
|
|
108
108
|
__exportStar(require("./task-reporting-video"), exports);
|
|
109
109
|
__exportStar(require("./task-reporting-photo"), exports);
|
|
110
110
|
__exportStar(require("./task-pricing"), exports);
|
|
111
|
+
__exportStar(require("./task-estimate"), exports);
|
|
112
|
+
__exportStar(require("./task-provider-pricing"), exports);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const taskEstimateSchema: import("zod").ZodObject<{
|
|
2
|
+
id: import("zod").ZodNumber;
|
|
3
|
+
taskId: import("zod").ZodNumber;
|
|
4
|
+
minHourlyRate: import("zod").ZodNumber;
|
|
5
|
+
maxHourlyRate: import("zod").ZodNumber;
|
|
6
|
+
estimatedHours: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
7
|
+
isHistoricalAverage: import("zod").ZodBoolean;
|
|
8
|
+
minTotal: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
9
|
+
maxTotal: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
10
|
+
markupPercentage: import("zod").ZodNumber;
|
|
11
|
+
currency: import("zod").ZodString;
|
|
12
|
+
createdAt: import("zod").ZodDate;
|
|
13
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
14
|
+
currency: string;
|
|
15
|
+
id: number;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
markupPercentage: number;
|
|
18
|
+
taskId: number;
|
|
19
|
+
minHourlyRate: number;
|
|
20
|
+
maxHourlyRate: number;
|
|
21
|
+
isHistoricalAverage: boolean;
|
|
22
|
+
estimatedHours?: number | undefined;
|
|
23
|
+
minTotal?: number | undefined;
|
|
24
|
+
maxTotal?: number | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
currency: string;
|
|
27
|
+
id: number;
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
markupPercentage: number;
|
|
30
|
+
taskId: number;
|
|
31
|
+
minHourlyRate: number;
|
|
32
|
+
maxHourlyRate: number;
|
|
33
|
+
isHistoricalAverage: boolean;
|
|
34
|
+
estimatedHours?: number | undefined;
|
|
35
|
+
minTotal?: number | undefined;
|
|
36
|
+
maxTotal?: number | undefined;
|
|
37
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.taskEstimateSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.taskEstimateSchema = (0, zod_1.object)({
|
|
6
|
+
id: (0, zod_1.number)().int(),
|
|
7
|
+
taskId: (0, zod_1.number)().int(),
|
|
8
|
+
minHourlyRate: (0, zod_1.number)(),
|
|
9
|
+
maxHourlyRate: (0, zod_1.number)(),
|
|
10
|
+
estimatedHours: (0, zod_1.number)().optional(),
|
|
11
|
+
isHistoricalAverage: (0, zod_1.boolean)(),
|
|
12
|
+
minTotal: (0, zod_1.number)().optional(),
|
|
13
|
+
maxTotal: (0, zod_1.number)().optional(),
|
|
14
|
+
markupPercentage: (0, zod_1.number)(),
|
|
15
|
+
currency: (0, zod_1.string)(),
|
|
16
|
+
createdAt: (0, zod_1.date)(),
|
|
17
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export declare const taskProviderPricingSchema: import("zod").ZodObject<{
|
|
2
|
+
id: import("zod").ZodNumber;
|
|
3
|
+
taskId: import("zod").ZodNumber;
|
|
4
|
+
serviceProviderId: import("zod").ZodNumber;
|
|
5
|
+
providerHourlyRate: import("zod").ZodNumber;
|
|
6
|
+
markupPercentage: import("zod").ZodNumber;
|
|
7
|
+
commissionPercentage: import("zod").ZodNumber;
|
|
8
|
+
markupAmountPerHour: import("zod").ZodNumber;
|
|
9
|
+
commissionAmountPerHour: import("zod").ZodNumber;
|
|
10
|
+
hostHourlyRate: import("zod").ZodNumber;
|
|
11
|
+
providerHourlyEarnings: import("zod").ZodNumber;
|
|
12
|
+
hububbHourlyEarnings: import("zod").ZodNumber;
|
|
13
|
+
estimatedHours: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
14
|
+
estimatedHostTotal: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
15
|
+
estimatedProviderEarnings: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
16
|
+
estimatedHububbEarnings: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
17
|
+
currency: import("zod").ZodString;
|
|
18
|
+
createdAt: import("zod").ZodDate;
|
|
19
|
+
updatedAt: import("zod").ZodDate;
|
|
20
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
21
|
+
currency: string;
|
|
22
|
+
id: number;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
updatedAt: Date;
|
|
25
|
+
commissionPercentage: number;
|
|
26
|
+
markupPercentage: number;
|
|
27
|
+
taskId: number;
|
|
28
|
+
serviceProviderId: number;
|
|
29
|
+
providerHourlyRate: number;
|
|
30
|
+
markupAmountPerHour: number;
|
|
31
|
+
commissionAmountPerHour: number;
|
|
32
|
+
hostHourlyRate: number;
|
|
33
|
+
providerHourlyEarnings: number;
|
|
34
|
+
hububbHourlyEarnings: number;
|
|
35
|
+
estimatedHours?: number | undefined;
|
|
36
|
+
estimatedHostTotal?: number | undefined;
|
|
37
|
+
estimatedProviderEarnings?: number | undefined;
|
|
38
|
+
estimatedHububbEarnings?: number | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
currency: string;
|
|
41
|
+
id: number;
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
updatedAt: Date;
|
|
44
|
+
commissionPercentage: number;
|
|
45
|
+
markupPercentage: number;
|
|
46
|
+
taskId: number;
|
|
47
|
+
serviceProviderId: number;
|
|
48
|
+
providerHourlyRate: number;
|
|
49
|
+
markupAmountPerHour: number;
|
|
50
|
+
commissionAmountPerHour: number;
|
|
51
|
+
hostHourlyRate: number;
|
|
52
|
+
providerHourlyEarnings: number;
|
|
53
|
+
hububbHourlyEarnings: number;
|
|
54
|
+
estimatedHours?: number | undefined;
|
|
55
|
+
estimatedHostTotal?: number | undefined;
|
|
56
|
+
estimatedProviderEarnings?: number | undefined;
|
|
57
|
+
estimatedHububbEarnings?: number | undefined;
|
|
58
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.taskProviderPricingSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.taskProviderPricingSchema = (0, zod_1.object)({
|
|
6
|
+
id: (0, zod_1.number)().int(),
|
|
7
|
+
taskId: (0, zod_1.number)().int(),
|
|
8
|
+
serviceProviderId: (0, zod_1.number)().int(),
|
|
9
|
+
providerHourlyRate: (0, zod_1.number)(),
|
|
10
|
+
markupPercentage: (0, zod_1.number)(),
|
|
11
|
+
commissionPercentage: (0, zod_1.number)(),
|
|
12
|
+
markupAmountPerHour: (0, zod_1.number)(),
|
|
13
|
+
commissionAmountPerHour: (0, zod_1.number)(),
|
|
14
|
+
hostHourlyRate: (0, zod_1.number)(),
|
|
15
|
+
providerHourlyEarnings: (0, zod_1.number)(),
|
|
16
|
+
hububbHourlyEarnings: (0, zod_1.number)(),
|
|
17
|
+
estimatedHours: (0, zod_1.number)().optional(),
|
|
18
|
+
estimatedHostTotal: (0, zod_1.number)().optional(),
|
|
19
|
+
estimatedProviderEarnings: (0, zod_1.number)().optional(),
|
|
20
|
+
estimatedHububbEarnings: (0, zod_1.number)().optional(),
|
|
21
|
+
currency: (0, zod_1.string)(),
|
|
22
|
+
createdAt: (0, zod_1.date)(),
|
|
23
|
+
updatedAt: (0, zod_1.date)(),
|
|
24
|
+
});
|
|
@@ -4,6 +4,15 @@ export declare const taskQuoteSchema: import("zod").ZodObject<{
|
|
|
4
4
|
taskId: import("zod").ZodNumber;
|
|
5
5
|
amount: import("zod").ZodNumber;
|
|
6
6
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
|
+
basePrice: import("zod").ZodNumber;
|
|
8
|
+
commissionPercentage: import("zod").ZodNumber;
|
|
9
|
+
markupPercentage: import("zod").ZodNumber;
|
|
10
|
+
markupAmount: import("zod").ZodNumber;
|
|
11
|
+
hostTotal: import("zod").ZodNumber;
|
|
12
|
+
commissionAmount: import("zod").ZodNumber;
|
|
13
|
+
providerEarnings: import("zod").ZodNumber;
|
|
14
|
+
hububbEarnings: import("zod").ZodNumber;
|
|
15
|
+
currency: import("zod").ZodString;
|
|
7
16
|
status: import("zod").ZodNativeEnum<typeof TaskQuoteStatus>;
|
|
8
17
|
submittedByWorkerId: import("zod").ZodNumber;
|
|
9
18
|
submittedAt: import("zod").ZodDate;
|
|
@@ -13,12 +22,21 @@ export declare const taskQuoteSchema: import("zod").ZodObject<{
|
|
|
13
22
|
createdAt: import("zod").ZodDate;
|
|
14
23
|
updatedAt: import("zod").ZodDate;
|
|
15
24
|
}, "strip", import("zod").ZodTypeAny, {
|
|
25
|
+
currency: string;
|
|
16
26
|
id: number;
|
|
17
27
|
status: TaskQuoteStatus;
|
|
18
28
|
createdAt: Date;
|
|
19
29
|
updatedAt: Date;
|
|
30
|
+
basePrice: number;
|
|
31
|
+
commissionPercentage: number;
|
|
32
|
+
markupPercentage: number;
|
|
20
33
|
amount: number;
|
|
21
34
|
taskId: number;
|
|
35
|
+
markupAmount: number;
|
|
36
|
+
hostTotal: number;
|
|
37
|
+
commissionAmount: number;
|
|
38
|
+
providerEarnings: number;
|
|
39
|
+
hububbEarnings: number;
|
|
22
40
|
submittedByWorkerId: number;
|
|
23
41
|
submittedAt: Date;
|
|
24
42
|
description?: string | undefined;
|
|
@@ -26,12 +44,21 @@ export declare const taskQuoteSchema: import("zod").ZodObject<{
|
|
|
26
44
|
respondedAt?: Date | undefined;
|
|
27
45
|
rejectionReason?: string | undefined;
|
|
28
46
|
}, {
|
|
47
|
+
currency: string;
|
|
29
48
|
id: number;
|
|
30
49
|
status: TaskQuoteStatus;
|
|
31
50
|
createdAt: Date;
|
|
32
51
|
updatedAt: Date;
|
|
52
|
+
basePrice: number;
|
|
53
|
+
commissionPercentage: number;
|
|
54
|
+
markupPercentage: number;
|
|
33
55
|
amount: number;
|
|
34
56
|
taskId: number;
|
|
57
|
+
markupAmount: number;
|
|
58
|
+
hostTotal: number;
|
|
59
|
+
commissionAmount: number;
|
|
60
|
+
providerEarnings: number;
|
|
61
|
+
hububbEarnings: number;
|
|
35
62
|
submittedByWorkerId: number;
|
|
36
63
|
submittedAt: Date;
|
|
37
64
|
description?: string | undefined;
|
|
@@ -8,6 +8,15 @@ exports.taskQuoteSchema = (0, zod_1.object)({
|
|
|
8
8
|
taskId: (0, zod_1.number)().int(),
|
|
9
9
|
amount: (0, zod_1.number)(),
|
|
10
10
|
description: (0, zod_1.string)().optional(),
|
|
11
|
+
basePrice: (0, zod_1.number)(),
|
|
12
|
+
commissionPercentage: (0, zod_1.number)(),
|
|
13
|
+
markupPercentage: (0, zod_1.number)(),
|
|
14
|
+
markupAmount: (0, zod_1.number)(),
|
|
15
|
+
hostTotal: (0, zod_1.number)(),
|
|
16
|
+
commissionAmount: (0, zod_1.number)(),
|
|
17
|
+
providerEarnings: (0, zod_1.number)(),
|
|
18
|
+
hububbEarnings: (0, zod_1.number)(),
|
|
19
|
+
currency: (0, zod_1.string)(),
|
|
11
20
|
status: (0, zod_1.nativeEnum)(enums_1.TaskQuoteStatus),
|
|
12
21
|
submittedByWorkerId: (0, zod_1.number)().int(),
|
|
13
22
|
submittedAt: (0, zod_1.date)(),
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -109,3 +109,5 @@ __exportStar(require("./task-quote"), exports);
|
|
|
109
109
|
__exportStar(require("./task-reporting-video"), exports);
|
|
110
110
|
__exportStar(require("./task-reporting-photo"), exports);
|
|
111
111
|
__exportStar(require("./task-pricing"), exports);
|
|
112
|
+
__exportStar(require("./task-estimate"), exports);
|
|
113
|
+
__exportStar(require("./task-provider-pricing"), exports);
|
|
@@ -3,6 +3,7 @@ import { ServiceProviderAreaSchema, ServiceProviderBankInfoSchema, ServiceProvid
|
|
|
3
3
|
import { User } from "../user";
|
|
4
4
|
import { ServiceWorker as ServiceWorkerType } from "../service-worker";
|
|
5
5
|
import { ServiceProviderService } from "../service-provider-service";
|
|
6
|
+
import { TaskProviderPricing } from "../task-provider-pricing";
|
|
6
7
|
export interface ServiceProviderArea extends infer<typeof ServiceProviderAreaSchema> {
|
|
7
8
|
serviceProvider?: ServiceProvider;
|
|
8
9
|
}
|
|
@@ -19,4 +20,5 @@ export interface ServiceProvider extends infer<typeof ServiceProviderSchema> {
|
|
|
19
20
|
documents?: ServiceProviderDocument[];
|
|
20
21
|
bankInfo?: ServiceProviderBankInfo;
|
|
21
22
|
owner?: User;
|
|
23
|
+
taskProviderPricings?: TaskProviderPricing[];
|
|
22
24
|
}
|
|
@@ -28,6 +28,8 @@ import { TaskQuote } from "../task-quote";
|
|
|
28
28
|
import { TaskReportingVideo } from "../task-reporting-video";
|
|
29
29
|
import { TaskReportingPhoto } from "../task-reporting-photo";
|
|
30
30
|
import { TaskPricing } from "../task-pricing";
|
|
31
|
+
import { TaskEstimate } from "../task-estimate";
|
|
32
|
+
import { TaskProviderPricing } from "../task-provider-pricing";
|
|
31
33
|
export interface Task extends infer<typeof taskSchema> {
|
|
32
34
|
property?: Property;
|
|
33
35
|
department?: TaskDepartment;
|
|
@@ -60,6 +62,8 @@ export interface Task extends infer<typeof taskSchema> {
|
|
|
60
62
|
reportingVideos?: TaskReportingVideo[];
|
|
61
63
|
reportingPhotos?: TaskReportingPhoto[];
|
|
62
64
|
pricing?: TaskPricing;
|
|
65
|
+
estimate?: TaskEstimate;
|
|
66
|
+
providerPricing?: TaskProviderPricing;
|
|
63
67
|
parentTask?: Task;
|
|
64
68
|
followUpTasks?: Task[];
|
|
65
69
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { infer } from "zod";
|
|
2
|
+
import { taskProviderPricingSchema } from "../../schemas/task-provider-pricing";
|
|
3
|
+
import { Task } from "../task";
|
|
4
|
+
import { ServiceProvider } from "../service-provider";
|
|
5
|
+
export interface TaskProviderPricing extends infer<typeof taskProviderPricingSchema> {
|
|
6
|
+
task?: Task;
|
|
7
|
+
serviceProvider?: ServiceProvider;
|
|
8
|
+
}
|