interface ItineraryInventoryItemsRepository {
    modelName: string;
    bulkUpdateInventoryItemsCostSchedule(
        inventoryItems: ItineraryInventoryItem[],
    ): Promise<void>;
    countAvailableInventoryItemsByItinerary(
        itineraryId: string,
        enabledPackages: PackageLevel[],
        minStartDate: Date,
    ): Promise<number>;
    countDocuments(
        query?: FilterQuery<ItineraryInventoryItem>,
    ): Promise<number>;
    create(
        entity: ItineraryInventoryItem,
    ): Promise<Saved<ItineraryInventoryItem>>;
    createMany(
        entity: ItineraryInventoryItem[],
        options?: CreateManyOptions,
    ): Promise<string[]>;
    deleteById(id: string): Promise<null | Saved<ItineraryInventoryItem>>;
    destroyById(id: string): Promise<null | Saved<ItineraryInventoryItem>>;
    findById(
        id: string,
        fields?: SelectQuery<ItineraryInventoryItem>[],
        ListQueryOptions?: ListQueryOptions<ItineraryInventoryItem>,
    ): Promise<null | Saved<ItineraryInventoryItem>>;
    findOne(
        query?: FilterQuery<ItineraryInventoryItem>,
        fields?: SelectQuery<ItineraryInventoryItem>[],
        ListQueryOptions?: ListQueryOptions<ItineraryInventoryItem>,
    ): Promise<null | Saved<ItineraryInventoryItem>>;
    getInventoryItemsWithTrips(
        itineraryId: string,
    ): Promise<SavedItineraryInventoryItemWithTrips[]>;
    list(
        query?: FilterQuery<ItineraryInventoryItem>,
        fields?: SelectQuery<ItineraryInventoryItem>[],
        ListQueryOptions?: ListQueryOptions<ItineraryInventoryItem>,
    ): Promise<Saved<ItineraryInventoryItem>[]>;
    paginate(
        options?: PaginateQueryOptions<ItineraryInventoryItem>,
    ): Promise<PaginationResponse<Saved<ItineraryInventoryItem>>>;
    updateById(
        id: string,
        entity: PartialQuery<ItineraryInventoryItem>,
        options?: UpdateOptions,
    ): Promise<null | Saved<ItineraryInventoryItem>>;
    updateMany(
        filter: FilterQuery<ItineraryInventoryItem>,
        update: PartialQuery<ItineraryInventoryItem>,
    ): Promise<number>;
    updateOne(
        filter: FilterQuery<ItineraryInventoryItem>,
        update: PartialQuery<ItineraryInventoryItem>,
        options?: UpdateOneOptions,
    ): Promise<null | Saved<ItineraryInventoryItem>>;
    upsertOne(
        filter: FilterQuery<ItineraryInventoryItem>,
        entity: PartialQuery<ItineraryInventoryItem>,
    ): Promise<null | string>;
}

Hierarchy (View Summary)

  • BaseRepo<ItineraryInventoryItem>
    • ItineraryInventoryItemsRepository

Properties

modelName: string

The name of the model.

Methods