@helpio/common 1.0.6 → 1.0.8
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/build/events/publishers/worker-profile-updated-publisher.d.ts +2 -0
- package/build/events/publishers/worker-profile-updated-publisher.js +17 -0
- package/build/events/types/index.d.ts +3 -0
- package/build/events/types/index.js +1 -0
- package/build/events/types/worker-profile-events.d.ts +50 -0
- package/build/events/types/worker-profile-events.js +2 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.publishWorkerProfileUpdated = void 0;
|
|
13
|
+
const producer_1 = require("../producer");
|
|
14
|
+
const publishWorkerProfileUpdated = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
yield (0, producer_1.publishEvent)("worker.profile.updated", data);
|
|
16
|
+
});
|
|
17
|
+
exports.publishWorkerProfileUpdated = publishWorkerProfileUpdated;
|
|
@@ -2,6 +2,7 @@ import { UserCreatedEvent, UserUpdatedEvent } from "./user-events";
|
|
|
2
2
|
import { CountryCreatedEvent, CountryStatusChangedEvent, CountryUpdatedEvent } from "./country-events";
|
|
3
3
|
import { CityCreatedEvent, CityStatusChangedEvent, CityUpdatedEvent } from "./city-events";
|
|
4
4
|
import { KycDocumentDeletedEvent, KycDocumentRejectedEvent, KycDocumentUploadedEvent, KycDocumentVerifiedEvent } from "./kyc-document-events";
|
|
5
|
+
import { WorkerProfileUpdatedEvent } from "./worker-profile-events";
|
|
5
6
|
export interface EventMap {
|
|
6
7
|
"user.created": UserCreatedEvent;
|
|
7
8
|
"user.updated": UserUpdatedEvent;
|
|
@@ -15,8 +16,10 @@ export interface EventMap {
|
|
|
15
16
|
"kyc.document.verified": KycDocumentVerifiedEvent;
|
|
16
17
|
"kyc.document.rejected": KycDocumentRejectedEvent;
|
|
17
18
|
"kyc.document.deleted": KycDocumentDeletedEvent;
|
|
19
|
+
"worker.profile.updated": WorkerProfileUpdatedEvent;
|
|
18
20
|
}
|
|
19
21
|
export * from "./user-events";
|
|
20
22
|
export * from "./country-events";
|
|
21
23
|
export * from "./city-events";
|
|
22
24
|
export * from "./kyc-document-events";
|
|
25
|
+
export * from "./worker-profile-events";
|
|
@@ -15,3 +15,4 @@ __exportStar(require("./user-events"), exports);
|
|
|
15
15
|
__exportStar(require("./country-events"), exports);
|
|
16
16
|
__exportStar(require("./city-events"), exports);
|
|
17
17
|
__exportStar(require("./kyc-document-events"), exports);
|
|
18
|
+
__exportStar(require("./worker-profile-events"), exports);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare type WorkerProfileUpdatedEvent = {
|
|
2
|
+
workerId: string;
|
|
3
|
+
firstName?: string;
|
|
4
|
+
lastName?: string;
|
|
5
|
+
bio?: string;
|
|
6
|
+
avatarUrl?: string;
|
|
7
|
+
photoUrls?: string[];
|
|
8
|
+
countryCode?: string;
|
|
9
|
+
city?: string;
|
|
10
|
+
area?: string;
|
|
11
|
+
geo?: {
|
|
12
|
+
lat: number;
|
|
13
|
+
lng: number;
|
|
14
|
+
};
|
|
15
|
+
languages?: string[];
|
|
16
|
+
preferredCities?: string[];
|
|
17
|
+
preferredCityIds?: string[];
|
|
18
|
+
workerCategories?: string[];
|
|
19
|
+
servicesOffered?: string[];
|
|
20
|
+
skillsByCategory?: Record<string, string[]>;
|
|
21
|
+
workArrangementPreference?: string;
|
|
22
|
+
yearsExperience?: number;
|
|
23
|
+
minimumRate?: number;
|
|
24
|
+
currency?: string;
|
|
25
|
+
isAvailable?: boolean;
|
|
26
|
+
isProfileComplete?: boolean;
|
|
27
|
+
experienceSummary?: string;
|
|
28
|
+
references?: {
|
|
29
|
+
name?: string;
|
|
30
|
+
phoneNumber?: string;
|
|
31
|
+
relationship?: string;
|
|
32
|
+
note?: string;
|
|
33
|
+
}[];
|
|
34
|
+
salaryExpectationMin?: number;
|
|
35
|
+
salaryExpectationMax?: number;
|
|
36
|
+
salaryExpectationPeriod?: "hour" | "day" | "week" | "month";
|
|
37
|
+
educationLevel?: "none" | "primary" | "secondary" | "certificate" | "diploma" | "degree" | "postgraduate";
|
|
38
|
+
educationNotes?: string;
|
|
39
|
+
selfieUrl?: string;
|
|
40
|
+
kycStatus?: string;
|
|
41
|
+
verificationLevel?: string;
|
|
42
|
+
trustScore?: number;
|
|
43
|
+
kycPendingCount?: number;
|
|
44
|
+
kycVerifiedCount?: number;
|
|
45
|
+
kycRejectedCount?: number;
|
|
46
|
+
rating?: number;
|
|
47
|
+
ratingCount?: number;
|
|
48
|
+
rankScore?: number;
|
|
49
|
+
updatedAt?: string | Date;
|
|
50
|
+
};
|
package/build/index.d.ts
CHANGED
|
@@ -22,3 +22,4 @@ export * from "./events/publishers/user-updated-publisher";
|
|
|
22
22
|
export * from "./events/publishers/country-created-publisher";
|
|
23
23
|
export * from "./events/publishers/country-updated-publisher";
|
|
24
24
|
export * from "./events/publishers/country-status-changed-publisher";
|
|
25
|
+
export * from "./events/publishers/worker-profile-updated-publisher";
|
package/build/index.js
CHANGED
|
@@ -37,3 +37,5 @@ __exportStar(require("./events/publishers/user-updated-publisher"), exports);
|
|
|
37
37
|
__exportStar(require("./events/publishers/country-created-publisher"), exports);
|
|
38
38
|
__exportStar(require("./events/publishers/country-updated-publisher"), exports);
|
|
39
39
|
__exportStar(require("./events/publishers/country-status-changed-publisher"), exports);
|
|
40
|
+
// Profile event publishers
|
|
41
|
+
__exportStar(require("./events/publishers/worker-profile-updated-publisher"), exports);
|