MicProtocol / apps /api /dist /network /network.dto.js
Benaah's picture
Upload folder using huggingface_hub (part 2)
9f29339 verified
Raw History Blame Contribute Delete
19.6 kB
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TrackProfileViewDto = exports.CreateHostReviewDto = exports.UpdateNetworkBookmarkDto = exports.CreateNetworkBookmarkDto = exports.RespondToBookingRequestDto = exports.CreateNetworkBookingRequestDto = exports.GuestNetworkSearchDto = exports.UpdateGuestPublicProfileDto = exports.CreateGuestPublicProfileDto = exports.VisibilitySettingsDto = exports.AvailabilityWindowDto = exports.ExpertiseTagDto = void 0;
const class_validator_1 = require("class-validator");
const class_transformer_1 = require("class-transformer");
const swagger_1 = require("@nestjs/swagger");
const shared_types_1 = require("@micprotocol/shared-types");
class ExpertiseTagDto {
name;
category;
}
exports.ExpertiseTagDto = ExpertiseTagDto;
__decorate([
(0, swagger_1.ApiProperty)({ example: "Fintech" }),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MinLength)(1),
(0, class_validator_1.MaxLength)(100),
__metadata("design:type", String)
], ExpertiseTagDto.prototype, "name", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "Technology" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(100),
__metadata("design:type", String)
], ExpertiseTagDto.prototype, "category", void 0);
class AvailabilityWindowDto {
dayOfWeek;
startHour;
endHour;
timezone;
}
exports.AvailabilityWindowDto = AvailabilityWindowDto;
__decorate([
(0, swagger_1.ApiProperty)({ example: 1, description: "0=Sunday, 6=Saturday" }),
(0, class_validator_1.IsInt)(),
(0, class_validator_1.Min)(0),
(0, class_validator_1.Max)(6),
__metadata("design:type", Number)
], AvailabilityWindowDto.prototype, "dayOfWeek", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: 9 }),
(0, class_validator_1.IsInt)(),
(0, class_validator_1.Min)(0),
(0, class_validator_1.Max)(23),
__metadata("design:type", Number)
], AvailabilityWindowDto.prototype, "startHour", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: 17 }),
(0, class_validator_1.IsInt)(),
(0, class_validator_1.Min)(0),
(0, class_validator_1.Max)(23),
__metadata("design:type", Number)
], AvailabilityWindowDto.prototype, "endHour", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "Africa/Nairobi" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], AvailabilityWindowDto.prototype, "timezone", void 0);
class VisibilitySettingsDto {
showEmail;
showPhone;
showAppearances;
showReliabilityScore;
}
exports.VisibilitySettingsDto = VisibilitySettingsDto;
__decorate([
(0, swagger_1.ApiPropertyOptional)({ default: false }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsBoolean)(),
__metadata("design:type", Boolean)
], VisibilitySettingsDto.prototype, "showEmail", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ default: false }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsBoolean)(),
__metadata("design:type", Boolean)
], VisibilitySettingsDto.prototype, "showPhone", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ default: true }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsBoolean)(),
__metadata("design:type", Boolean)
], VisibilitySettingsDto.prototype, "showAppearances", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ default: true }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsBoolean)(),
__metadata("design:type", Boolean)
], VisibilitySettingsDto.prototype, "showReliabilityScore", void 0);
class CreateGuestPublicProfileDto {
headline;
fullBio;
country;
city;
languages;
timezone;
phoneNumber;
whatsappNumber;
avatarUrl;
isPublic;
visibilitySettings;
expertiseTags;
availabilityWindows;
}
exports.CreateGuestPublicProfileDto = CreateGuestPublicProfileDto;
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "Fintech Founder | Nairobi" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(255),
__metadata("design:type", String)
], CreateGuestPublicProfileDto.prototype, "headline", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "Building payment infrastructure for informal economies..." }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(5000),
__metadata("design:type", String)
], CreateGuestPublicProfileDto.prototype, "fullBio", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "Kenya" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(100),
__metadata("design:type", String)
], CreateGuestPublicProfileDto.prototype, "country", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "Nairobi" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(100),
__metadata("design:type", String)
], CreateGuestPublicProfileDto.prototype, "city", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: ["English", "Swahili"] }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.IsString)({ each: true }),
__metadata("design:type", Array)
], CreateGuestPublicProfileDto.prototype, "languages", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "Africa/Nairobi" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(100),
__metadata("design:type", String)
], CreateGuestPublicProfileDto.prototype, "timezone", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "+254700123456" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(20),
__metadata("design:type", String)
], CreateGuestPublicProfileDto.prototype, "phoneNumber", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "+254700123456" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(20),
__metadata("design:type", String)
], CreateGuestPublicProfileDto.prototype, "whatsappNumber", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)(),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsUrl)(),
__metadata("design:type", String)
], CreateGuestPublicProfileDto.prototype, "avatarUrl", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ default: true }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsBoolean)(),
__metadata("design:type", Boolean)
], CreateGuestPublicProfileDto.prototype, "isPublic", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ type: VisibilitySettingsDto }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.ValidateNested)(),
(0, class_transformer_1.Type)(() => VisibilitySettingsDto),
__metadata("design:type", VisibilitySettingsDto)
], CreateGuestPublicProfileDto.prototype, "visibilitySettings", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ type: [ExpertiseTagDto] }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.ValidateNested)({ each: true }),
(0, class_transformer_1.Type)(() => ExpertiseTagDto),
__metadata("design:type", Array)
], CreateGuestPublicProfileDto.prototype, "expertiseTags", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ type: [AvailabilityWindowDto] }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.ValidateNested)({ each: true }),
(0, class_transformer_1.Type)(() => AvailabilityWindowDto),
__metadata("design:type", Array)
], CreateGuestPublicProfileDto.prototype, "availabilityWindows", void 0);
class UpdateGuestPublicProfileDto extends CreateGuestPublicProfileDto {
}
exports.UpdateGuestPublicProfileDto = UpdateGuestPublicProfileDto;
class GuestNetworkSearchDto {
query;
country;
countries;
expertise;
languages;
minReliabilityScore;
minAppearances;
verificationStatus;
tier;
maxResponseTimeHours;
sortBy;
sortOrder;
page;
limit;
}
exports.GuestNetworkSearchDto = GuestNetworkSearchDto;
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "fintech climate" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(500),
__metadata("design:type", String)
], GuestNetworkSearchDto.prototype, "query", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "Kenya" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], GuestNetworkSearchDto.prototype, "country", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: ["Kenya", "Nigeria"] }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.IsString)({ each: true }),
__metadata("design:type", Array)
], GuestNetworkSearchDto.prototype, "countries", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: ["Fintech", "Climate"] }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.IsString)({ each: true }),
__metadata("design:type", Array)
], GuestNetworkSearchDto.prototype, "expertise", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: ["English", "Swahili"] }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.IsString)({ each: true }),
__metadata("design:type", Array)
], GuestNetworkSearchDto.prototype, "languages", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: 70 }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsNumber)(),
(0, class_validator_1.Min)(0),
(0, class_validator_1.Max)(100),
__metadata("design:type", Number)
], GuestNetworkSearchDto.prototype, "minReliabilityScore", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: 2 }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsInt)(),
(0, class_validator_1.Min)(0),
__metadata("design:type", Number)
], GuestNetworkSearchDto.prototype, "minAppearances", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ enum: shared_types_1.VerificationStatus }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsEnum)(shared_types_1.VerificationStatus),
__metadata("design:type", String)
], GuestNetworkSearchDto.prototype, "verificationStatus", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ enum: shared_types_1.ReputationTier }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsEnum)(shared_types_1.ReputationTier),
__metadata("design:type", String)
], GuestNetworkSearchDto.prototype, "tier", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: 24 }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsInt)(),
(0, class_validator_1.Min)(1),
__metadata("design:type", Number)
], GuestNetworkSearchDto.prototype, "maxResponseTimeHours", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ default: "relevance" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], GuestNetworkSearchDto.prototype, "sortBy", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ default: "desc" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
__metadata("design:type", String)
], GuestNetworkSearchDto.prototype, "sortOrder", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ default: 1 }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsInt)(),
(0, class_validator_1.Min)(1),
__metadata("design:type", Number)
], GuestNetworkSearchDto.prototype, "page", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ default: 20 }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsInt)(),
(0, class_validator_1.Min)(1),
(0, class_validator_1.Max)(50),
__metadata("design:type", Number)
], GuestNetworkSearchDto.prototype, "limit", void 0);
class CreateNetworkBookingRequestDto {
toProfileId;
fromPodcastId;
message;
proposedTopics;
proposedDates;
}
exports.CreateNetworkBookingRequestDto = CreateNetworkBookingRequestDto;
__decorate([
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsUUID)(),
__metadata("design:type", String)
], CreateNetworkBookingRequestDto.prototype, "toProfileId", void 0);
__decorate([
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsUUID)(),
__metadata("design:type", String)
], CreateNetworkBookingRequestDto.prototype, "fromPodcastId", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: "We'd love to have you on our podcast to discuss fintech in East Africa" }),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MinLength)(10),
(0, class_validator_1.MaxLength)(2000),
__metadata("design:type", String)
], CreateNetworkBookingRequestDto.prototype, "message", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: ["Mobile Money", "Payment Rails"] }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.IsString)({ each: true }),
__metadata("design:type", Array)
], CreateNetworkBookingRequestDto.prototype, "proposedTopics", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)(),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsArray)(),
(0, class_validator_1.IsDateString)({}, { each: true }),
__metadata("design:type", Array)
], CreateNetworkBookingRequestDto.prototype, "proposedDates", void 0);
class RespondToBookingRequestDto {
status;
}
exports.RespondToBookingRequestDto = RespondToBookingRequestDto;
__decorate([
(0, swagger_1.ApiProperty)({ enum: ["accepted", "declined"] }),
(0, class_validator_1.IsEnum)(shared_types_1.NetworkBookingRequestStatus),
__metadata("design:type", String)
], RespondToBookingRequestDto.prototype, "status", void 0);
class CreateNetworkBookmarkDto {
guestProfileId;
podcastId;
notes;
}
exports.CreateNetworkBookmarkDto = CreateNetworkBookmarkDto;
__decorate([
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsUUID)(),
__metadata("design:type", String)
], CreateNetworkBookmarkDto.prototype, "guestProfileId", void 0);
__decorate([
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsUUID)(),
__metadata("design:type", String)
], CreateNetworkBookmarkDto.prototype, "podcastId", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "Great fit for our fintech series" }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(1000),
__metadata("design:type", String)
], CreateNetworkBookmarkDto.prototype, "notes", void 0);
class UpdateNetworkBookmarkDto {
status;
notes;
}
exports.UpdateNetworkBookmarkDto = UpdateNetworkBookmarkDto;
__decorate([
(0, swagger_1.ApiPropertyOptional)({ enum: shared_types_1.BookmarkStatus }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsEnum)(shared_types_1.BookmarkStatus),
__metadata("design:type", String)
], UpdateNetworkBookmarkDto.prototype, "status", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)(),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(1000),
__metadata("design:type", String)
], UpdateNetworkBookmarkDto.prototype, "notes", void 0);
class CreateHostReviewDto {
bookingRequestId;
profileId;
contentRating;
prepQuality;
overallRating;
comment;
}
exports.CreateHostReviewDto = CreateHostReviewDto;
__decorate([
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsUUID)(),
__metadata("design:type", String)
], CreateHostReviewDto.prototype, "bookingRequestId", void 0);
__decorate([
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsUUID)(),
__metadata("design:type", String)
], CreateHostReviewDto.prototype, "profileId", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: 5, minimum: 1, maximum: 5 }),
(0, class_validator_1.IsInt)(),
(0, class_validator_1.Min)(1),
(0, class_validator_1.Max)(5),
__metadata("design:type", Number)
], CreateHostReviewDto.prototype, "contentRating", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: 5, minimum: 1, maximum: 5 }),
(0, class_validator_1.IsInt)(),
(0, class_validator_1.Min)(1),
(0, class_validator_1.Max)(5),
__metadata("design:type", Number)
], CreateHostReviewDto.prototype, "prepQuality", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: 5, minimum: 1, maximum: 5 }),
(0, class_validator_1.IsInt)(),
(0, class_validator_1.Min)(1),
(0, class_validator_1.Max)(5),
__metadata("design:type", Number)
], CreateHostReviewDto.prototype, "overallRating", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ example: "Excellent guest, very well prepared." }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsString)(),
(0, class_validator_1.MaxLength)(2000),
__metadata("design:type", String)
], CreateHostReviewDto.prototype, "comment", void 0);
class TrackProfileViewDto {
profileId;
viewerPodcastId;
source;
}
exports.TrackProfileViewDto = TrackProfileViewDto;
__decorate([
(0, swagger_1.ApiProperty)(),
(0, class_validator_1.IsUUID)(),
__metadata("design:type", String)
], TrackProfileViewDto.prototype, "profileId", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)(),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsUUID)(),
__metadata("design:type", String)
], TrackProfileViewDto.prototype, "viewerPodcastId", void 0);
__decorate([
(0, swagger_1.ApiPropertyOptional)({ enum: shared_types_1.ProfileViewSource }),
(0, class_validator_1.IsOptional)(),
(0, class_validator_1.IsEnum)(shared_types_1.ProfileViewSource),
__metadata("design:type", String)
], TrackProfileViewDto.prototype, "source", void 0);
//# sourceMappingURL=network.dto.js.map