hububb-saas-shared 1.1.1 → 1.1.2

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.
@@ -1,7 +1,6 @@
1
1
  export declare enum ServiceType {
2
- INTEGRATION = "INTEGRATION",
3
- ON_DEMAND = "ON_DEMAND",
4
- RECURRING = "RECURRING"
2
+ ON_DEMAND = "FULL",
3
+ SUBSCRIPTION = "PRORATED"
5
4
  }
6
5
  export declare enum TaskStatus {
7
6
  PENDING = "PENDING",
@@ -3,9 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SubscriptionStatus = exports.PurchaseStatus = exports.PriceType = exports.InvoiceStatus = exports.InvoiceType = exports.TaskPriority = exports.TaskStatus = exports.ServiceType = void 0;
4
4
  var ServiceType;
5
5
  (function (ServiceType) {
6
- ServiceType["INTEGRATION"] = "INTEGRATION";
7
- ServiceType["ON_DEMAND"] = "ON_DEMAND";
8
- ServiceType["RECURRING"] = "RECURRING";
6
+ ServiceType["ON_DEMAND"] = "FULL";
7
+ ServiceType["SUBSCRIPTION"] = "PRORATED";
9
8
  })(ServiceType || (exports.ServiceType = ServiceType = {}));
10
9
  var TaskStatus;
11
10
  (function (TaskStatus) {
@@ -15,7 +15,6 @@ export declare const serviceSchema: import("zod").ZodObject<{
15
15
  departmentId: import("zod").ZodOptional<import("zod").ZodNumber>;
16
16
  subdepartmentId: import("zod").ZodOptional<import("zod").ZodNumber>;
17
17
  display: import("zod").ZodOptional<import("zod").ZodBoolean>;
18
- serviceProviderId: import("zod").ZodOptional<import("zod").ZodNumber>;
19
18
  requirements: import("zod").ZodOptional<import("zod").ZodString>;
20
19
  estimatedDuration: import("zod").ZodOptional<import("zod").ZodNumber>;
21
20
  }, "strip", import("zod").ZodTypeAny, {
@@ -34,7 +33,6 @@ export declare const serviceSchema: import("zod").ZodObject<{
34
33
  stripePriceId?: string | undefined;
35
34
  departmentId?: number | undefined;
36
35
  subdepartmentId?: number | undefined;
37
- serviceProviderId?: number | undefined;
38
36
  requirements?: string | undefined;
39
37
  estimatedDuration?: number | undefined;
40
38
  }, {
@@ -53,7 +51,6 @@ export declare const serviceSchema: import("zod").ZodObject<{
53
51
  stripePriceId?: string | undefined;
54
52
  departmentId?: number | undefined;
55
53
  subdepartmentId?: number | undefined;
56
- serviceProviderId?: number | undefined;
57
54
  requirements?: string | undefined;
58
55
  estimatedDuration?: number | undefined;
59
56
  }>;
@@ -19,7 +19,6 @@ exports.serviceSchema = (0, zod_1.object)({
19
19
  departmentId: (0, zod_1.number)().int().optional(),
20
20
  subdepartmentId: (0, zod_1.number)().int().optional(),
21
21
  display: (0, zod_1.boolean)().optional(),
22
- serviceProviderId: (0, zod_1.number)().int().optional(),
23
22
  requirements: (0, zod_1.string)().optional(),
24
23
  estimatedDuration: (0, zod_1.number)().optional(),
25
24
  });
@@ -68,18 +68,18 @@ export declare const ServiceProviderAreaSchema: import("zod").ZodObject<{
68
68
  polygon: string | null;
69
69
  createdAt: Date;
70
70
  updatedAt: Date;
71
- serviceProviderId: number;
72
71
  city: string;
73
72
  zipcode: string;
73
+ serviceProviderId: number;
74
74
  }, {
75
75
  id: number;
76
76
  state: string;
77
77
  polygon: string | null;
78
78
  createdAt: Date;
79
79
  updatedAt: Date;
80
- serviceProviderId: number;
81
80
  city: string;
82
81
  zipcode: string;
82
+ serviceProviderId: number;
83
83
  }>;
84
84
  export declare const ServiceProviderDocumentSchema: import("zod").ZodObject<{
85
85
  id: import("zod").ZodNumber;
@@ -96,8 +96,8 @@ export declare const ServiceProviderDocumentSchema: import("zod").ZodObject<{
96
96
  url: string;
97
97
  createdAt: Date;
98
98
  updatedAt: Date;
99
- serviceProviderId: number;
100
99
  isVerified: boolean | null;
100
+ serviceProviderId: number;
101
101
  expiryDate: Date | null;
102
102
  }, {
103
103
  type: string;
@@ -105,8 +105,8 @@ export declare const ServiceProviderDocumentSchema: import("zod").ZodObject<{
105
105
  url: string;
106
106
  createdAt: Date;
107
107
  updatedAt: Date;
108
- serviceProviderId: number;
109
108
  isVerified: boolean | null;
109
+ serviceProviderId: number;
110
110
  expiryDate: Date | null;
111
111
  }>;
112
112
  export declare const ServiceProviderBankInfoSchema: import("zod").ZodObject<{
@@ -0,0 +1,28 @@
1
+ export declare const ServiceProviderServiceSchema: import("zod").ZodObject<{
2
+ id: import("zod").ZodNumber;
3
+ serviceId: import("zod").ZodNumber;
4
+ serviceProviderId: import("zod").ZodNumber;
5
+ isActive: import("zod").ZodBoolean;
6
+ customPrice: import("zod").ZodNullable<import("zod").ZodNumber>;
7
+ customDescription: import("zod").ZodNullable<import("zod").ZodString>;
8
+ createdAt: import("zod").ZodDate;
9
+ updatedAt: import("zod").ZodDate;
10
+ }, "strip", import("zod").ZodTypeAny, {
11
+ id: number;
12
+ createdAt: Date;
13
+ updatedAt: Date;
14
+ serviceId: number;
15
+ isActive: boolean;
16
+ serviceProviderId: number;
17
+ customPrice: number | null;
18
+ customDescription: string | null;
19
+ }, {
20
+ id: number;
21
+ createdAt: Date;
22
+ updatedAt: Date;
23
+ serviceId: number;
24
+ isActive: boolean;
25
+ serviceProviderId: number;
26
+ customPrice: number | null;
27
+ customDescription: string | null;
28
+ }>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ServiceProviderServiceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.ServiceProviderServiceSchema = (0, zod_1.object)({
6
+ id: (0, zod_1.number)(),
7
+ serviceId: (0, zod_1.number)(),
8
+ serviceProviderId: (0, zod_1.number)(),
9
+ isActive: (0, zod_1.boolean)(),
10
+ customPrice: (0, zod_1.number)().nullable(),
11
+ customDescription: (0, zod_1.string)().nullable(),
12
+ createdAt: (0, zod_1.date)(),
13
+ updatedAt: (0, zod_1.date)(),
14
+ });
@@ -25,8 +25,8 @@ export declare const ServiceWorkerSchema: import("zod").ZodObject<{
25
25
  phone: string;
26
26
  photoUrl: string | null;
27
27
  rating: number;
28
- serviceProviderId: number;
29
28
  userId: string;
29
+ serviceProviderId: number;
30
30
  isAvailable: boolean;
31
31
  deviceToken: string | null;
32
32
  lastActive: Date | null;
@@ -41,8 +41,8 @@ export declare const ServiceWorkerSchema: import("zod").ZodObject<{
41
41
  phone: string;
42
42
  photoUrl: string | null;
43
43
  rating: number;
44
- serviceProviderId: number;
45
44
  userId: string;
45
+ serviceProviderId: number;
46
46
  isAvailable: boolean;
47
47
  deviceToken: string | null;
48
48
  lastActive: Date | null;
@@ -3,10 +3,10 @@ import { serviceSchema } from "../../schemas/service";
3
3
  import { TierService } from "../tier-service";
4
4
  import { SubscriptionService } from "../subscription-service";
5
5
  import { Purchase } from "../purchase";
6
- import { ServiceProvider } from "../service-provider";
6
+ import { ServiceProviderService } from "../service-provider-service";
7
7
  export interface Service extends infer<typeof serviceSchema> {
8
8
  tierServices?: TierService[];
9
9
  subscriptionServices?: SubscriptionService[];
10
10
  purchases?: Purchase[];
11
- serviceProvider?: ServiceProvider;
11
+ serviceProviders?: ServiceProviderService[];
12
12
  }
@@ -0,0 +1,8 @@
1
+ import { infer } from "zod";
2
+ import { ServiceProvider } from "../service-provider";
3
+ import { Service } from "../service";
4
+ import { ServiceProviderServiceSchema } from "../../schemas/service-provider-service";
5
+ export interface ServiceProviderService extends infer<typeof ServiceProviderServiceSchema> {
6
+ serviceProvider?: ServiceProvider;
7
+ service?: Service;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "hububb-saas-shared",
4
- "version": "1.1.1",
4
+ "version": "1.1.2",
5
5
  "description": "This is a shared package for the hububb saas project",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",