@techzunction/sdk 0.3.0 → 0.3.1
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/index.cjs +79 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +192 -1
- package/dist/index.d.ts +192 -1
- package/dist/index.js +79 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -609,6 +609,77 @@ interface MealSubscription {
|
|
|
609
609
|
status: string;
|
|
610
610
|
createdAt: string;
|
|
611
611
|
}
|
|
612
|
+
interface Ingredient {
|
|
613
|
+
id: string;
|
|
614
|
+
name: string;
|
|
615
|
+
unit: string;
|
|
616
|
+
currentStock: number;
|
|
617
|
+
minStock: number;
|
|
618
|
+
costPerUnit: number;
|
|
619
|
+
supplierId: string | null;
|
|
620
|
+
supplier: {
|
|
621
|
+
name: string;
|
|
622
|
+
} | null;
|
|
623
|
+
updatedAt: string;
|
|
624
|
+
createdAt: string;
|
|
625
|
+
}
|
|
626
|
+
interface StockAlert {
|
|
627
|
+
id: string;
|
|
628
|
+
ingredientId: string;
|
|
629
|
+
ingredientName: string;
|
|
630
|
+
type: string;
|
|
631
|
+
message: string;
|
|
632
|
+
isResolved: boolean;
|
|
633
|
+
createdAt: string;
|
|
634
|
+
}
|
|
635
|
+
interface WasteLog {
|
|
636
|
+
id: string;
|
|
637
|
+
ingredientId: string;
|
|
638
|
+
ingredientName: string;
|
|
639
|
+
quantity: number;
|
|
640
|
+
reason: string;
|
|
641
|
+
costImpact: number;
|
|
642
|
+
createdAt: string;
|
|
643
|
+
}
|
|
644
|
+
interface Supplier {
|
|
645
|
+
id: string;
|
|
646
|
+
name: string;
|
|
647
|
+
contactName: string;
|
|
648
|
+
phone: string;
|
|
649
|
+
email: string | null;
|
|
650
|
+
leadTimeDays: number;
|
|
651
|
+
isActive: boolean;
|
|
652
|
+
createdAt: string;
|
|
653
|
+
}
|
|
654
|
+
interface PurchaseOrder {
|
|
655
|
+
id: string;
|
|
656
|
+
poNumber: string;
|
|
657
|
+
supplierId: string;
|
|
658
|
+
supplierName: string;
|
|
659
|
+
status: string;
|
|
660
|
+
totalAmount: number;
|
|
661
|
+
items: PurchaseOrderItem[];
|
|
662
|
+
createdAt: string;
|
|
663
|
+
}
|
|
664
|
+
interface PurchaseOrderItem {
|
|
665
|
+
id: string;
|
|
666
|
+
ingredientId: string;
|
|
667
|
+
ingredientName: string;
|
|
668
|
+
quantity: number;
|
|
669
|
+
unitPrice: number;
|
|
670
|
+
total: number;
|
|
671
|
+
}
|
|
672
|
+
interface AdminMealSubscription {
|
|
673
|
+
id: string;
|
|
674
|
+
userName: string | null;
|
|
675
|
+
userPhone: string | null;
|
|
676
|
+
mealPlanName: string;
|
|
677
|
+
status: string;
|
|
678
|
+
startDate: string;
|
|
679
|
+
endDate: string;
|
|
680
|
+
deliveryTime: string | null;
|
|
681
|
+
createdAt: string;
|
|
682
|
+
}
|
|
612
683
|
interface HelpArticle {
|
|
613
684
|
id: string;
|
|
614
685
|
slug: string;
|
|
@@ -1298,6 +1369,60 @@ interface UpdateMealPlanDto {
|
|
|
1298
1369
|
items?: Record<string, unknown>;
|
|
1299
1370
|
isActive?: boolean;
|
|
1300
1371
|
}
|
|
1372
|
+
interface CreateIngredientDto {
|
|
1373
|
+
name: string;
|
|
1374
|
+
unit: string;
|
|
1375
|
+
currentStock?: number;
|
|
1376
|
+
minStock?: number;
|
|
1377
|
+
costPerUnit?: number;
|
|
1378
|
+
supplierId?: string;
|
|
1379
|
+
}
|
|
1380
|
+
interface UpdateIngredientDto {
|
|
1381
|
+
name?: string;
|
|
1382
|
+
unit?: string;
|
|
1383
|
+
currentStock?: number;
|
|
1384
|
+
minStock?: number;
|
|
1385
|
+
costPerUnit?: number;
|
|
1386
|
+
supplierId?: string;
|
|
1387
|
+
}
|
|
1388
|
+
interface CreateWasteLogDto {
|
|
1389
|
+
ingredientId: string;
|
|
1390
|
+
quantity: number;
|
|
1391
|
+
reason: string;
|
|
1392
|
+
}
|
|
1393
|
+
interface CreateSupplierDto {
|
|
1394
|
+
name: string;
|
|
1395
|
+
contactName: string;
|
|
1396
|
+
phone: string;
|
|
1397
|
+
email?: string;
|
|
1398
|
+
leadTimeDays?: number;
|
|
1399
|
+
isActive?: boolean;
|
|
1400
|
+
}
|
|
1401
|
+
interface UpdateSupplierDto {
|
|
1402
|
+
name?: string;
|
|
1403
|
+
contactName?: string;
|
|
1404
|
+
phone?: string;
|
|
1405
|
+
email?: string;
|
|
1406
|
+
leadTimeDays?: number;
|
|
1407
|
+
isActive?: boolean;
|
|
1408
|
+
}
|
|
1409
|
+
interface CreatePurchaseOrderDto {
|
|
1410
|
+
supplierId: string;
|
|
1411
|
+
items: Array<{
|
|
1412
|
+
ingredientId: string;
|
|
1413
|
+
quantity: number;
|
|
1414
|
+
unitPrice: number;
|
|
1415
|
+
}>;
|
|
1416
|
+
}
|
|
1417
|
+
interface UpdatePurchaseOrderDto {
|
|
1418
|
+
status: string;
|
|
1419
|
+
}
|
|
1420
|
+
interface QueryPurchaseOrdersParams extends PaginatedQuery {
|
|
1421
|
+
status?: string;
|
|
1422
|
+
}
|
|
1423
|
+
interface QueryMealSubscriptionsParams extends PaginatedQuery {
|
|
1424
|
+
status?: string;
|
|
1425
|
+
}
|
|
1301
1426
|
interface CreateHelpArticleDto {
|
|
1302
1427
|
title: string;
|
|
1303
1428
|
slug?: string;
|
|
@@ -2032,6 +2157,39 @@ declare const TZ: {
|
|
|
2032
2157
|
update(id: string, data: UpdateInstitutionDto): TZQuery<Institution>;
|
|
2033
2158
|
remove(id: string): TZQuery<void>;
|
|
2034
2159
|
};
|
|
2160
|
+
inventory: {
|
|
2161
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<Ingredient>;
|
|
2162
|
+
get(id: string): TZQuery<Ingredient>;
|
|
2163
|
+
create(data: CreateIngredientDto): TZQuery<Ingredient>;
|
|
2164
|
+
update(id: string, data: UpdateIngredientDto): TZQuery<Ingredient>;
|
|
2165
|
+
remove(id: string): TZQuery<void>;
|
|
2166
|
+
alerts: {
|
|
2167
|
+
list(): TZQuery<StockAlert[]>;
|
|
2168
|
+
resolve(id: string): TZQuery<StockAlert>;
|
|
2169
|
+
};
|
|
2170
|
+
waste: {
|
|
2171
|
+
list(): TZQuery<WasteLog[]>;
|
|
2172
|
+
create(data: CreateWasteLogDto): TZQuery<WasteLog>;
|
|
2173
|
+
};
|
|
2174
|
+
};
|
|
2175
|
+
suppliers: {
|
|
2176
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<Supplier>;
|
|
2177
|
+
get(id: string): TZQuery<Supplier>;
|
|
2178
|
+
create(data: CreateSupplierDto): TZQuery<Supplier>;
|
|
2179
|
+
update(id: string, data: UpdateSupplierDto): TZQuery<Supplier>;
|
|
2180
|
+
remove(id: string): TZQuery<void>;
|
|
2181
|
+
};
|
|
2182
|
+
purchaseOrders: {
|
|
2183
|
+
list(params?: QueryPurchaseOrdersParams): TZPaginatedQuery<PurchaseOrder>;
|
|
2184
|
+
get(id: string): TZQuery<PurchaseOrder>;
|
|
2185
|
+
create(data: CreatePurchaseOrderDto): TZQuery<PurchaseOrder>;
|
|
2186
|
+
update(id: string, data: UpdatePurchaseOrderDto): TZQuery<PurchaseOrder>;
|
|
2187
|
+
remove(id: string): TZQuery<void>;
|
|
2188
|
+
};
|
|
2189
|
+
mealSubscriptions: {
|
|
2190
|
+
list(params?: QueryMealSubscriptionsParams): TZPaginatedQuery<AdminMealSubscription>;
|
|
2191
|
+
get(id: string): TZQuery<AdminMealSubscription>;
|
|
2192
|
+
};
|
|
2035
2193
|
mealPlans: {
|
|
2036
2194
|
list(params?: PaginatedQuery): TZPaginatedQuery<MealPlan>;
|
|
2037
2195
|
get(id: string): TZQuery<MealPlan>;
|
|
@@ -2715,6 +2873,39 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
2715
2873
|
update(id: string, data: UpdateInstitutionDto): TZQuery<Institution>;
|
|
2716
2874
|
remove(id: string): TZQuery<void>;
|
|
2717
2875
|
};
|
|
2876
|
+
inventory: {
|
|
2877
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<Ingredient>;
|
|
2878
|
+
get(id: string): TZQuery<Ingredient>;
|
|
2879
|
+
create(data: CreateIngredientDto): TZQuery<Ingredient>;
|
|
2880
|
+
update(id: string, data: UpdateIngredientDto): TZQuery<Ingredient>;
|
|
2881
|
+
remove(id: string): TZQuery<void>;
|
|
2882
|
+
alerts: {
|
|
2883
|
+
list(): TZQuery<StockAlert[]>;
|
|
2884
|
+
resolve(id: string): TZQuery<StockAlert>;
|
|
2885
|
+
};
|
|
2886
|
+
waste: {
|
|
2887
|
+
list(): TZQuery<WasteLog[]>;
|
|
2888
|
+
create(data: CreateWasteLogDto): TZQuery<WasteLog>;
|
|
2889
|
+
};
|
|
2890
|
+
};
|
|
2891
|
+
suppliers: {
|
|
2892
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<Supplier>;
|
|
2893
|
+
get(id: string): TZQuery<Supplier>;
|
|
2894
|
+
create(data: CreateSupplierDto): TZQuery<Supplier>;
|
|
2895
|
+
update(id: string, data: UpdateSupplierDto): TZQuery<Supplier>;
|
|
2896
|
+
remove(id: string): TZQuery<void>;
|
|
2897
|
+
};
|
|
2898
|
+
purchaseOrders: {
|
|
2899
|
+
list(params?: QueryPurchaseOrdersParams): TZPaginatedQuery<PurchaseOrder>;
|
|
2900
|
+
get(id: string): TZQuery<PurchaseOrder>;
|
|
2901
|
+
create(data: CreatePurchaseOrderDto): TZQuery<PurchaseOrder>;
|
|
2902
|
+
update(id: string, data: UpdatePurchaseOrderDto): TZQuery<PurchaseOrder>;
|
|
2903
|
+
remove(id: string): TZQuery<void>;
|
|
2904
|
+
};
|
|
2905
|
+
mealSubscriptions: {
|
|
2906
|
+
list(params?: QueryMealSubscriptionsParams): TZPaginatedQuery<AdminMealSubscription>;
|
|
2907
|
+
get(id: string): TZQuery<AdminMealSubscription>;
|
|
2908
|
+
};
|
|
2718
2909
|
mealPlans: {
|
|
2719
2910
|
list(params?: PaginatedQuery): TZPaginatedQuery<MealPlan>;
|
|
2720
2911
|
get(id: string): TZQuery<MealPlan>;
|
|
@@ -2798,4 +2989,4 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
2798
2989
|
}>;
|
|
2799
2990
|
};
|
|
2800
2991
|
|
|
2801
|
-
export { type AddCartItemDto, type AddSegmentMembersDto, type Address, type AdjustLoyaltyPointsDto, type AdminCancelBookingDto, type AdminListOrdersQuery, type AdminOrganization, type ApiError, type ApiKey, type ApplyStudentPassDto, type AssignPropertyUnitsDto, type AssignStaffRolesDto, type AuditLog, type AuthResponse, type AuthScope, type AuthTokens, type BulkReviewStudentPassesDto, type BulkUpdateSettingsDto, type BulkUpsertEndUsersDto, type CalculateDeliveryDto, type CancelPropertyBookingDto, type Cart, type CartItemOption, type CartLineItem, type CatalogCategory, type CatalogItem, type CatalogItemVariant, type CatalogOption, type CatalogOptionGroup, type ChangeEndUserPasswordDto, type CheckPropertyAvailabilityQuery, type CheckReservationAvailabilityQuery, type CompleteSignupDto, type ContactMessage, type ContentPost, type CouponValidation, type CreateAddressDto, type CreateApiKeyDto, type CreateCatalogCategoryDto, type CreateCatalogOptionDto, type CreateCatalogOptionGroupDto, type CreateCatalogVariantDto, type CreateHelpArticleDto, type CreateInstitutionDto, type CreateMealPlanDto, type CreateOrderDto, type CreatePaymentOrderDto, type CreatePropertyAmenityDto, type CreatePropertyBookingDto, type CreatePropertyPaymentOrderDto, type CreateReservationDto, type CreateReviewDto, type CreateRoleDto, type CreateStudentDiscountDto, type CreateSuperAdminDto, type CreateSupportTicketDto, type DeliveryCalculation, type DeliveryTracking, type DiscountPreview, type EndUser, type EndUserProfile, type EndUserRequestResetDto, type EndUserResetPasswordDto, type EndUserSendOtpDto, type EndUserTagsDto, type EndUserVerifyOtpDto, type GetCatalogItemsQuery, type GiftCard, type HelpArticle, type Institution, type InviteStaffUserDto, type ListCatalogItemsQuery, type ListContentQuery, type ListEndUsersQuery, type ListMoviesQuery, type ListOrdersQuery, type ListOrganizationsQuery, type ListReviewsQuery, type ListStaffUsersQuery, type ListStudentPassesQuery, type ListSuperAdminsQuery, type LocationHours, type LoginEndUserDto, type LoyaltyAccount, type LoyaltyRedemption, type LoyaltyReward, type LoyaltyTransaction, type MealPlan, type MealSubscription, type Movie, type MovieDetail, type Notification, type Order, type OrderItem, type OrderStatus, type OrderType, type PaginatedQuery, type PaginatedResponse, type PaginationParams, type PaymentMethod, type PaymentOrder, type PaymentVerification, type PlatformPlan, type PreviewStudentDiscountDto, type PreviewTemplateDto, type Promotion, type PropertyAvailability, type PropertyBooking, type PropertyPriceResolution, type PropertyType, type PurchaseGiftCardDto, type RawResponse, type RedeemGiftCardDto, type RedeemLoyaltyRewardDto, type ReferralInfo, type ReferralValidation, type RegisterEndUserDto, type ReorderDto, type ReplySupportTicketDto, type ReportOrderIssueDto, type RequestMagicLinkDto, type Reservation, type ReservationSlot, type ResolvePropertyPriceDto, type Review, type ReviewStudentPassDto, type Role, type ScheduleCampaignDto, ScopedClient, type SearchQuery, type SearchStatusQuery, type SetLocationHoursDto, type SetPropertyTypeAmenitiesDto, type SetSettingDto, type StaffAuthResponse, type StaffChangePasswordDto, type StaffLoginDto, type StaffRegisterDto, type StaffRequestPasswordResetDto, type StaffResetPasswordDto, type StaffSendOtpDto, type StaffUser, type StaffVerifyOtpDto, type StartSignupDto, type StartWatchSessionDto, type StatusQuery, type StoreLocation, type StorefrontConfig, type StudentDiscount, type StudentPassStatus, type SubmitContactDto, type SubscribeBillingPlanDto, type SubscribeMealPlanDto, type SubscribeNewsletterDto, type SuperAdminLoginDto, type SuperAdminStats, type SuperAdmin as SuperAdminUser, type SupportReply, type SupportTicket, TZ, TZClient, type TZConfig, type TZInitOptions, TZPaginatedQuery, TZQuery, type TmdbMovie, type TmdbMovieDetail, type TokenStore, type TopUpWalletDto, type UpdateAddressDto, type UpdateApiKeyDto, type UpdateCartItemDto, type UpdateCatalogCategoryDto, type UpdateCatalogOptionDto, type UpdateCatalogOptionGroupDto, type UpdateCatalogVariantDto, type UpdateEndUserProfileDto, type UpdateHelpArticleDto, type UpdateHousekeepingDto, type UpdateInstitutionDto, type UpdateMealPlanDto, type UpdateMovieProgressDto, type UpdateOrderStatusDto, type UpdateOrgDto, type UpdateReservationStatusDto, type UpdateReviewStatusDto, type UpdateRoleDto, type UpdateStaffUserDto, type UpdateStudentDiscountDto, type UpdateSupportTicketDto, type UploadResult, type ValidateCouponDto, type ValidateReferralDto, type VerifyMagicLinkQuery, type VerifyPaymentDto, type VerifySignupOtpDto, type WalletBalance, type WalletPack, type WalletTransaction, type WatchSessionResponse, type WatchSessionStatus, type WatchSessionStatusType, type WatchSessionSummary, createTZ };
|
|
2992
|
+
export { type AddCartItemDto, type AddSegmentMembersDto, type Address, type AdjustLoyaltyPointsDto, type AdminCancelBookingDto, type AdminListOrdersQuery, type AdminMealSubscription, type AdminOrganization, type ApiError, type ApiKey, type ApplyStudentPassDto, type AssignPropertyUnitsDto, type AssignStaffRolesDto, type AuditLog, type AuthResponse, type AuthScope, type AuthTokens, type BulkReviewStudentPassesDto, type BulkUpdateSettingsDto, type BulkUpsertEndUsersDto, type CalculateDeliveryDto, type CancelPropertyBookingDto, type Cart, type CartItemOption, type CartLineItem, type CatalogCategory, type CatalogItem, type CatalogItemVariant, type CatalogOption, type CatalogOptionGroup, type ChangeEndUserPasswordDto, type CheckPropertyAvailabilityQuery, type CheckReservationAvailabilityQuery, type CompleteSignupDto, type ContactMessage, type ContentPost, type CouponValidation, type CreateAddressDto, type CreateApiKeyDto, type CreateCatalogCategoryDto, type CreateCatalogOptionDto, type CreateCatalogOptionGroupDto, type CreateCatalogVariantDto, type CreateHelpArticleDto, type CreateIngredientDto, type CreateInstitutionDto, type CreateMealPlanDto, type CreateOrderDto, type CreatePaymentOrderDto, type CreatePropertyAmenityDto, type CreatePropertyBookingDto, type CreatePropertyPaymentOrderDto, type CreatePurchaseOrderDto, type CreateReservationDto, type CreateReviewDto, type CreateRoleDto, type CreateStudentDiscountDto, type CreateSuperAdminDto, type CreateSupplierDto, type CreateSupportTicketDto, type CreateWasteLogDto, type DeliveryCalculation, type DeliveryTracking, type DiscountPreview, type EndUser, type EndUserProfile, type EndUserRequestResetDto, type EndUserResetPasswordDto, type EndUserSendOtpDto, type EndUserTagsDto, type EndUserVerifyOtpDto, type GetCatalogItemsQuery, type GiftCard, type HelpArticle, type Ingredient, type Institution, type InviteStaffUserDto, type ListCatalogItemsQuery, type ListContentQuery, type ListEndUsersQuery, type ListMoviesQuery, type ListOrdersQuery, type ListOrganizationsQuery, type ListReviewsQuery, type ListStaffUsersQuery, type ListStudentPassesQuery, type ListSuperAdminsQuery, type LocationHours, type LoginEndUserDto, type LoyaltyAccount, type LoyaltyRedemption, type LoyaltyReward, type LoyaltyTransaction, type MealPlan, type MealSubscription, type Movie, type MovieDetail, type Notification, type Order, type OrderItem, type OrderStatus, type OrderType, type PaginatedQuery, type PaginatedResponse, type PaginationParams, type PaymentMethod, type PaymentOrder, type PaymentVerification, type PlatformPlan, type PreviewStudentDiscountDto, type PreviewTemplateDto, type Promotion, type PropertyAvailability, type PropertyBooking, type PropertyPriceResolution, type PropertyType, type PurchaseGiftCardDto, type PurchaseOrder, type PurchaseOrderItem, type QueryMealSubscriptionsParams, type QueryPurchaseOrdersParams, type RawResponse, type RedeemGiftCardDto, type RedeemLoyaltyRewardDto, type ReferralInfo, type ReferralValidation, type RegisterEndUserDto, type ReorderDto, type ReplySupportTicketDto, type ReportOrderIssueDto, type RequestMagicLinkDto, type Reservation, type ReservationSlot, type ResolvePropertyPriceDto, type Review, type ReviewStudentPassDto, type Role, type ScheduleCampaignDto, ScopedClient, type SearchQuery, type SearchStatusQuery, type SetLocationHoursDto, type SetPropertyTypeAmenitiesDto, type SetSettingDto, type StaffAuthResponse, type StaffChangePasswordDto, type StaffLoginDto, type StaffRegisterDto, type StaffRequestPasswordResetDto, type StaffResetPasswordDto, type StaffSendOtpDto, type StaffUser, type StaffVerifyOtpDto, type StartSignupDto, type StartWatchSessionDto, type StatusQuery, type StockAlert, type StoreLocation, type StorefrontConfig, type StudentDiscount, type StudentPassStatus, type SubmitContactDto, type SubscribeBillingPlanDto, type SubscribeMealPlanDto, type SubscribeNewsletterDto, type SuperAdminLoginDto, type SuperAdminStats, type SuperAdmin as SuperAdminUser, type Supplier, type SupportReply, type SupportTicket, TZ, TZClient, type TZConfig, type TZInitOptions, TZPaginatedQuery, TZQuery, type TmdbMovie, type TmdbMovieDetail, type TokenStore, type TopUpWalletDto, type UpdateAddressDto, type UpdateApiKeyDto, type UpdateCartItemDto, type UpdateCatalogCategoryDto, type UpdateCatalogOptionDto, type UpdateCatalogOptionGroupDto, type UpdateCatalogVariantDto, type UpdateEndUserProfileDto, type UpdateHelpArticleDto, type UpdateHousekeepingDto, type UpdateIngredientDto, type UpdateInstitutionDto, type UpdateMealPlanDto, type UpdateMovieProgressDto, type UpdateOrderStatusDto, type UpdateOrgDto, type UpdatePurchaseOrderDto, type UpdateReservationStatusDto, type UpdateReviewStatusDto, type UpdateRoleDto, type UpdateStaffUserDto, type UpdateStudentDiscountDto, type UpdateSupplierDto, type UpdateSupportTicketDto, type UploadResult, type ValidateCouponDto, type ValidateReferralDto, type VerifyMagicLinkQuery, type VerifyPaymentDto, type VerifySignupOtpDto, type WalletBalance, type WalletPack, type WalletTransaction, type WasteLog, type WatchSessionResponse, type WatchSessionStatus, type WatchSessionStatusType, type WatchSessionSummary, createTZ };
|
package/dist/index.d.ts
CHANGED
|
@@ -609,6 +609,77 @@ interface MealSubscription {
|
|
|
609
609
|
status: string;
|
|
610
610
|
createdAt: string;
|
|
611
611
|
}
|
|
612
|
+
interface Ingredient {
|
|
613
|
+
id: string;
|
|
614
|
+
name: string;
|
|
615
|
+
unit: string;
|
|
616
|
+
currentStock: number;
|
|
617
|
+
minStock: number;
|
|
618
|
+
costPerUnit: number;
|
|
619
|
+
supplierId: string | null;
|
|
620
|
+
supplier: {
|
|
621
|
+
name: string;
|
|
622
|
+
} | null;
|
|
623
|
+
updatedAt: string;
|
|
624
|
+
createdAt: string;
|
|
625
|
+
}
|
|
626
|
+
interface StockAlert {
|
|
627
|
+
id: string;
|
|
628
|
+
ingredientId: string;
|
|
629
|
+
ingredientName: string;
|
|
630
|
+
type: string;
|
|
631
|
+
message: string;
|
|
632
|
+
isResolved: boolean;
|
|
633
|
+
createdAt: string;
|
|
634
|
+
}
|
|
635
|
+
interface WasteLog {
|
|
636
|
+
id: string;
|
|
637
|
+
ingredientId: string;
|
|
638
|
+
ingredientName: string;
|
|
639
|
+
quantity: number;
|
|
640
|
+
reason: string;
|
|
641
|
+
costImpact: number;
|
|
642
|
+
createdAt: string;
|
|
643
|
+
}
|
|
644
|
+
interface Supplier {
|
|
645
|
+
id: string;
|
|
646
|
+
name: string;
|
|
647
|
+
contactName: string;
|
|
648
|
+
phone: string;
|
|
649
|
+
email: string | null;
|
|
650
|
+
leadTimeDays: number;
|
|
651
|
+
isActive: boolean;
|
|
652
|
+
createdAt: string;
|
|
653
|
+
}
|
|
654
|
+
interface PurchaseOrder {
|
|
655
|
+
id: string;
|
|
656
|
+
poNumber: string;
|
|
657
|
+
supplierId: string;
|
|
658
|
+
supplierName: string;
|
|
659
|
+
status: string;
|
|
660
|
+
totalAmount: number;
|
|
661
|
+
items: PurchaseOrderItem[];
|
|
662
|
+
createdAt: string;
|
|
663
|
+
}
|
|
664
|
+
interface PurchaseOrderItem {
|
|
665
|
+
id: string;
|
|
666
|
+
ingredientId: string;
|
|
667
|
+
ingredientName: string;
|
|
668
|
+
quantity: number;
|
|
669
|
+
unitPrice: number;
|
|
670
|
+
total: number;
|
|
671
|
+
}
|
|
672
|
+
interface AdminMealSubscription {
|
|
673
|
+
id: string;
|
|
674
|
+
userName: string | null;
|
|
675
|
+
userPhone: string | null;
|
|
676
|
+
mealPlanName: string;
|
|
677
|
+
status: string;
|
|
678
|
+
startDate: string;
|
|
679
|
+
endDate: string;
|
|
680
|
+
deliveryTime: string | null;
|
|
681
|
+
createdAt: string;
|
|
682
|
+
}
|
|
612
683
|
interface HelpArticle {
|
|
613
684
|
id: string;
|
|
614
685
|
slug: string;
|
|
@@ -1298,6 +1369,60 @@ interface UpdateMealPlanDto {
|
|
|
1298
1369
|
items?: Record<string, unknown>;
|
|
1299
1370
|
isActive?: boolean;
|
|
1300
1371
|
}
|
|
1372
|
+
interface CreateIngredientDto {
|
|
1373
|
+
name: string;
|
|
1374
|
+
unit: string;
|
|
1375
|
+
currentStock?: number;
|
|
1376
|
+
minStock?: number;
|
|
1377
|
+
costPerUnit?: number;
|
|
1378
|
+
supplierId?: string;
|
|
1379
|
+
}
|
|
1380
|
+
interface UpdateIngredientDto {
|
|
1381
|
+
name?: string;
|
|
1382
|
+
unit?: string;
|
|
1383
|
+
currentStock?: number;
|
|
1384
|
+
minStock?: number;
|
|
1385
|
+
costPerUnit?: number;
|
|
1386
|
+
supplierId?: string;
|
|
1387
|
+
}
|
|
1388
|
+
interface CreateWasteLogDto {
|
|
1389
|
+
ingredientId: string;
|
|
1390
|
+
quantity: number;
|
|
1391
|
+
reason: string;
|
|
1392
|
+
}
|
|
1393
|
+
interface CreateSupplierDto {
|
|
1394
|
+
name: string;
|
|
1395
|
+
contactName: string;
|
|
1396
|
+
phone: string;
|
|
1397
|
+
email?: string;
|
|
1398
|
+
leadTimeDays?: number;
|
|
1399
|
+
isActive?: boolean;
|
|
1400
|
+
}
|
|
1401
|
+
interface UpdateSupplierDto {
|
|
1402
|
+
name?: string;
|
|
1403
|
+
contactName?: string;
|
|
1404
|
+
phone?: string;
|
|
1405
|
+
email?: string;
|
|
1406
|
+
leadTimeDays?: number;
|
|
1407
|
+
isActive?: boolean;
|
|
1408
|
+
}
|
|
1409
|
+
interface CreatePurchaseOrderDto {
|
|
1410
|
+
supplierId: string;
|
|
1411
|
+
items: Array<{
|
|
1412
|
+
ingredientId: string;
|
|
1413
|
+
quantity: number;
|
|
1414
|
+
unitPrice: number;
|
|
1415
|
+
}>;
|
|
1416
|
+
}
|
|
1417
|
+
interface UpdatePurchaseOrderDto {
|
|
1418
|
+
status: string;
|
|
1419
|
+
}
|
|
1420
|
+
interface QueryPurchaseOrdersParams extends PaginatedQuery {
|
|
1421
|
+
status?: string;
|
|
1422
|
+
}
|
|
1423
|
+
interface QueryMealSubscriptionsParams extends PaginatedQuery {
|
|
1424
|
+
status?: string;
|
|
1425
|
+
}
|
|
1301
1426
|
interface CreateHelpArticleDto {
|
|
1302
1427
|
title: string;
|
|
1303
1428
|
slug?: string;
|
|
@@ -2032,6 +2157,39 @@ declare const TZ: {
|
|
|
2032
2157
|
update(id: string, data: UpdateInstitutionDto): TZQuery<Institution>;
|
|
2033
2158
|
remove(id: string): TZQuery<void>;
|
|
2034
2159
|
};
|
|
2160
|
+
inventory: {
|
|
2161
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<Ingredient>;
|
|
2162
|
+
get(id: string): TZQuery<Ingredient>;
|
|
2163
|
+
create(data: CreateIngredientDto): TZQuery<Ingredient>;
|
|
2164
|
+
update(id: string, data: UpdateIngredientDto): TZQuery<Ingredient>;
|
|
2165
|
+
remove(id: string): TZQuery<void>;
|
|
2166
|
+
alerts: {
|
|
2167
|
+
list(): TZQuery<StockAlert[]>;
|
|
2168
|
+
resolve(id: string): TZQuery<StockAlert>;
|
|
2169
|
+
};
|
|
2170
|
+
waste: {
|
|
2171
|
+
list(): TZQuery<WasteLog[]>;
|
|
2172
|
+
create(data: CreateWasteLogDto): TZQuery<WasteLog>;
|
|
2173
|
+
};
|
|
2174
|
+
};
|
|
2175
|
+
suppliers: {
|
|
2176
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<Supplier>;
|
|
2177
|
+
get(id: string): TZQuery<Supplier>;
|
|
2178
|
+
create(data: CreateSupplierDto): TZQuery<Supplier>;
|
|
2179
|
+
update(id: string, data: UpdateSupplierDto): TZQuery<Supplier>;
|
|
2180
|
+
remove(id: string): TZQuery<void>;
|
|
2181
|
+
};
|
|
2182
|
+
purchaseOrders: {
|
|
2183
|
+
list(params?: QueryPurchaseOrdersParams): TZPaginatedQuery<PurchaseOrder>;
|
|
2184
|
+
get(id: string): TZQuery<PurchaseOrder>;
|
|
2185
|
+
create(data: CreatePurchaseOrderDto): TZQuery<PurchaseOrder>;
|
|
2186
|
+
update(id: string, data: UpdatePurchaseOrderDto): TZQuery<PurchaseOrder>;
|
|
2187
|
+
remove(id: string): TZQuery<void>;
|
|
2188
|
+
};
|
|
2189
|
+
mealSubscriptions: {
|
|
2190
|
+
list(params?: QueryMealSubscriptionsParams): TZPaginatedQuery<AdminMealSubscription>;
|
|
2191
|
+
get(id: string): TZQuery<AdminMealSubscription>;
|
|
2192
|
+
};
|
|
2035
2193
|
mealPlans: {
|
|
2036
2194
|
list(params?: PaginatedQuery): TZPaginatedQuery<MealPlan>;
|
|
2037
2195
|
get(id: string): TZQuery<MealPlan>;
|
|
@@ -2715,6 +2873,39 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
2715
2873
|
update(id: string, data: UpdateInstitutionDto): TZQuery<Institution>;
|
|
2716
2874
|
remove(id: string): TZQuery<void>;
|
|
2717
2875
|
};
|
|
2876
|
+
inventory: {
|
|
2877
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<Ingredient>;
|
|
2878
|
+
get(id: string): TZQuery<Ingredient>;
|
|
2879
|
+
create(data: CreateIngredientDto): TZQuery<Ingredient>;
|
|
2880
|
+
update(id: string, data: UpdateIngredientDto): TZQuery<Ingredient>;
|
|
2881
|
+
remove(id: string): TZQuery<void>;
|
|
2882
|
+
alerts: {
|
|
2883
|
+
list(): TZQuery<StockAlert[]>;
|
|
2884
|
+
resolve(id: string): TZQuery<StockAlert>;
|
|
2885
|
+
};
|
|
2886
|
+
waste: {
|
|
2887
|
+
list(): TZQuery<WasteLog[]>;
|
|
2888
|
+
create(data: CreateWasteLogDto): TZQuery<WasteLog>;
|
|
2889
|
+
};
|
|
2890
|
+
};
|
|
2891
|
+
suppliers: {
|
|
2892
|
+
list(params?: PaginatedQuery): TZPaginatedQuery<Supplier>;
|
|
2893
|
+
get(id: string): TZQuery<Supplier>;
|
|
2894
|
+
create(data: CreateSupplierDto): TZQuery<Supplier>;
|
|
2895
|
+
update(id: string, data: UpdateSupplierDto): TZQuery<Supplier>;
|
|
2896
|
+
remove(id: string): TZQuery<void>;
|
|
2897
|
+
};
|
|
2898
|
+
purchaseOrders: {
|
|
2899
|
+
list(params?: QueryPurchaseOrdersParams): TZPaginatedQuery<PurchaseOrder>;
|
|
2900
|
+
get(id: string): TZQuery<PurchaseOrder>;
|
|
2901
|
+
create(data: CreatePurchaseOrderDto): TZQuery<PurchaseOrder>;
|
|
2902
|
+
update(id: string, data: UpdatePurchaseOrderDto): TZQuery<PurchaseOrder>;
|
|
2903
|
+
remove(id: string): TZQuery<void>;
|
|
2904
|
+
};
|
|
2905
|
+
mealSubscriptions: {
|
|
2906
|
+
list(params?: QueryMealSubscriptionsParams): TZPaginatedQuery<AdminMealSubscription>;
|
|
2907
|
+
get(id: string): TZQuery<AdminMealSubscription>;
|
|
2908
|
+
};
|
|
2718
2909
|
mealPlans: {
|
|
2719
2910
|
list(params?: PaginatedQuery): TZPaginatedQuery<MealPlan>;
|
|
2720
2911
|
get(id: string): TZQuery<MealPlan>;
|
|
@@ -2798,4 +2989,4 @@ declare function createTZ(options?: TZInitOptions): {
|
|
|
2798
2989
|
}>;
|
|
2799
2990
|
};
|
|
2800
2991
|
|
|
2801
|
-
export { type AddCartItemDto, type AddSegmentMembersDto, type Address, type AdjustLoyaltyPointsDto, type AdminCancelBookingDto, type AdminListOrdersQuery, type AdminOrganization, type ApiError, type ApiKey, type ApplyStudentPassDto, type AssignPropertyUnitsDto, type AssignStaffRolesDto, type AuditLog, type AuthResponse, type AuthScope, type AuthTokens, type BulkReviewStudentPassesDto, type BulkUpdateSettingsDto, type BulkUpsertEndUsersDto, type CalculateDeliveryDto, type CancelPropertyBookingDto, type Cart, type CartItemOption, type CartLineItem, type CatalogCategory, type CatalogItem, type CatalogItemVariant, type CatalogOption, type CatalogOptionGroup, type ChangeEndUserPasswordDto, type CheckPropertyAvailabilityQuery, type CheckReservationAvailabilityQuery, type CompleteSignupDto, type ContactMessage, type ContentPost, type CouponValidation, type CreateAddressDto, type CreateApiKeyDto, type CreateCatalogCategoryDto, type CreateCatalogOptionDto, type CreateCatalogOptionGroupDto, type CreateCatalogVariantDto, type CreateHelpArticleDto, type CreateInstitutionDto, type CreateMealPlanDto, type CreateOrderDto, type CreatePaymentOrderDto, type CreatePropertyAmenityDto, type CreatePropertyBookingDto, type CreatePropertyPaymentOrderDto, type CreateReservationDto, type CreateReviewDto, type CreateRoleDto, type CreateStudentDiscountDto, type CreateSuperAdminDto, type CreateSupportTicketDto, type DeliveryCalculation, type DeliveryTracking, type DiscountPreview, type EndUser, type EndUserProfile, type EndUserRequestResetDto, type EndUserResetPasswordDto, type EndUserSendOtpDto, type EndUserTagsDto, type EndUserVerifyOtpDto, type GetCatalogItemsQuery, type GiftCard, type HelpArticle, type Institution, type InviteStaffUserDto, type ListCatalogItemsQuery, type ListContentQuery, type ListEndUsersQuery, type ListMoviesQuery, type ListOrdersQuery, type ListOrganizationsQuery, type ListReviewsQuery, type ListStaffUsersQuery, type ListStudentPassesQuery, type ListSuperAdminsQuery, type LocationHours, type LoginEndUserDto, type LoyaltyAccount, type LoyaltyRedemption, type LoyaltyReward, type LoyaltyTransaction, type MealPlan, type MealSubscription, type Movie, type MovieDetail, type Notification, type Order, type OrderItem, type OrderStatus, type OrderType, type PaginatedQuery, type PaginatedResponse, type PaginationParams, type PaymentMethod, type PaymentOrder, type PaymentVerification, type PlatformPlan, type PreviewStudentDiscountDto, type PreviewTemplateDto, type Promotion, type PropertyAvailability, type PropertyBooking, type PropertyPriceResolution, type PropertyType, type PurchaseGiftCardDto, type RawResponse, type RedeemGiftCardDto, type RedeemLoyaltyRewardDto, type ReferralInfo, type ReferralValidation, type RegisterEndUserDto, type ReorderDto, type ReplySupportTicketDto, type ReportOrderIssueDto, type RequestMagicLinkDto, type Reservation, type ReservationSlot, type ResolvePropertyPriceDto, type Review, type ReviewStudentPassDto, type Role, type ScheduleCampaignDto, ScopedClient, type SearchQuery, type SearchStatusQuery, type SetLocationHoursDto, type SetPropertyTypeAmenitiesDto, type SetSettingDto, type StaffAuthResponse, type StaffChangePasswordDto, type StaffLoginDto, type StaffRegisterDto, type StaffRequestPasswordResetDto, type StaffResetPasswordDto, type StaffSendOtpDto, type StaffUser, type StaffVerifyOtpDto, type StartSignupDto, type StartWatchSessionDto, type StatusQuery, type StoreLocation, type StorefrontConfig, type StudentDiscount, type StudentPassStatus, type SubmitContactDto, type SubscribeBillingPlanDto, type SubscribeMealPlanDto, type SubscribeNewsletterDto, type SuperAdminLoginDto, type SuperAdminStats, type SuperAdmin as SuperAdminUser, type SupportReply, type SupportTicket, TZ, TZClient, type TZConfig, type TZInitOptions, TZPaginatedQuery, TZQuery, type TmdbMovie, type TmdbMovieDetail, type TokenStore, type TopUpWalletDto, type UpdateAddressDto, type UpdateApiKeyDto, type UpdateCartItemDto, type UpdateCatalogCategoryDto, type UpdateCatalogOptionDto, type UpdateCatalogOptionGroupDto, type UpdateCatalogVariantDto, type UpdateEndUserProfileDto, type UpdateHelpArticleDto, type UpdateHousekeepingDto, type UpdateInstitutionDto, type UpdateMealPlanDto, type UpdateMovieProgressDto, type UpdateOrderStatusDto, type UpdateOrgDto, type UpdateReservationStatusDto, type UpdateReviewStatusDto, type UpdateRoleDto, type UpdateStaffUserDto, type UpdateStudentDiscountDto, type UpdateSupportTicketDto, type UploadResult, type ValidateCouponDto, type ValidateReferralDto, type VerifyMagicLinkQuery, type VerifyPaymentDto, type VerifySignupOtpDto, type WalletBalance, type WalletPack, type WalletTransaction, type WatchSessionResponse, type WatchSessionStatus, type WatchSessionStatusType, type WatchSessionSummary, createTZ };
|
|
2992
|
+
export { type AddCartItemDto, type AddSegmentMembersDto, type Address, type AdjustLoyaltyPointsDto, type AdminCancelBookingDto, type AdminListOrdersQuery, type AdminMealSubscription, type AdminOrganization, type ApiError, type ApiKey, type ApplyStudentPassDto, type AssignPropertyUnitsDto, type AssignStaffRolesDto, type AuditLog, type AuthResponse, type AuthScope, type AuthTokens, type BulkReviewStudentPassesDto, type BulkUpdateSettingsDto, type BulkUpsertEndUsersDto, type CalculateDeliveryDto, type CancelPropertyBookingDto, type Cart, type CartItemOption, type CartLineItem, type CatalogCategory, type CatalogItem, type CatalogItemVariant, type CatalogOption, type CatalogOptionGroup, type ChangeEndUserPasswordDto, type CheckPropertyAvailabilityQuery, type CheckReservationAvailabilityQuery, type CompleteSignupDto, type ContactMessage, type ContentPost, type CouponValidation, type CreateAddressDto, type CreateApiKeyDto, type CreateCatalogCategoryDto, type CreateCatalogOptionDto, type CreateCatalogOptionGroupDto, type CreateCatalogVariantDto, type CreateHelpArticleDto, type CreateIngredientDto, type CreateInstitutionDto, type CreateMealPlanDto, type CreateOrderDto, type CreatePaymentOrderDto, type CreatePropertyAmenityDto, type CreatePropertyBookingDto, type CreatePropertyPaymentOrderDto, type CreatePurchaseOrderDto, type CreateReservationDto, type CreateReviewDto, type CreateRoleDto, type CreateStudentDiscountDto, type CreateSuperAdminDto, type CreateSupplierDto, type CreateSupportTicketDto, type CreateWasteLogDto, type DeliveryCalculation, type DeliveryTracking, type DiscountPreview, type EndUser, type EndUserProfile, type EndUserRequestResetDto, type EndUserResetPasswordDto, type EndUserSendOtpDto, type EndUserTagsDto, type EndUserVerifyOtpDto, type GetCatalogItemsQuery, type GiftCard, type HelpArticle, type Ingredient, type Institution, type InviteStaffUserDto, type ListCatalogItemsQuery, type ListContentQuery, type ListEndUsersQuery, type ListMoviesQuery, type ListOrdersQuery, type ListOrganizationsQuery, type ListReviewsQuery, type ListStaffUsersQuery, type ListStudentPassesQuery, type ListSuperAdminsQuery, type LocationHours, type LoginEndUserDto, type LoyaltyAccount, type LoyaltyRedemption, type LoyaltyReward, type LoyaltyTransaction, type MealPlan, type MealSubscription, type Movie, type MovieDetail, type Notification, type Order, type OrderItem, type OrderStatus, type OrderType, type PaginatedQuery, type PaginatedResponse, type PaginationParams, type PaymentMethod, type PaymentOrder, type PaymentVerification, type PlatformPlan, type PreviewStudentDiscountDto, type PreviewTemplateDto, type Promotion, type PropertyAvailability, type PropertyBooking, type PropertyPriceResolution, type PropertyType, type PurchaseGiftCardDto, type PurchaseOrder, type PurchaseOrderItem, type QueryMealSubscriptionsParams, type QueryPurchaseOrdersParams, type RawResponse, type RedeemGiftCardDto, type RedeemLoyaltyRewardDto, type ReferralInfo, type ReferralValidation, type RegisterEndUserDto, type ReorderDto, type ReplySupportTicketDto, type ReportOrderIssueDto, type RequestMagicLinkDto, type Reservation, type ReservationSlot, type ResolvePropertyPriceDto, type Review, type ReviewStudentPassDto, type Role, type ScheduleCampaignDto, ScopedClient, type SearchQuery, type SearchStatusQuery, type SetLocationHoursDto, type SetPropertyTypeAmenitiesDto, type SetSettingDto, type StaffAuthResponse, type StaffChangePasswordDto, type StaffLoginDto, type StaffRegisterDto, type StaffRequestPasswordResetDto, type StaffResetPasswordDto, type StaffSendOtpDto, type StaffUser, type StaffVerifyOtpDto, type StartSignupDto, type StartWatchSessionDto, type StatusQuery, type StockAlert, type StoreLocation, type StorefrontConfig, type StudentDiscount, type StudentPassStatus, type SubmitContactDto, type SubscribeBillingPlanDto, type SubscribeMealPlanDto, type SubscribeNewsletterDto, type SuperAdminLoginDto, type SuperAdminStats, type SuperAdmin as SuperAdminUser, type Supplier, type SupportReply, type SupportTicket, TZ, TZClient, type TZConfig, type TZInitOptions, TZPaginatedQuery, TZQuery, type TmdbMovie, type TmdbMovieDetail, type TokenStore, type TopUpWalletDto, type UpdateAddressDto, type UpdateApiKeyDto, type UpdateCartItemDto, type UpdateCatalogCategoryDto, type UpdateCatalogOptionDto, type UpdateCatalogOptionGroupDto, type UpdateCatalogVariantDto, type UpdateEndUserProfileDto, type UpdateHelpArticleDto, type UpdateHousekeepingDto, type UpdateIngredientDto, type UpdateInstitutionDto, type UpdateMealPlanDto, type UpdateMovieProgressDto, type UpdateOrderStatusDto, type UpdateOrgDto, type UpdatePurchaseOrderDto, type UpdateReservationStatusDto, type UpdateReviewStatusDto, type UpdateRoleDto, type UpdateStaffUserDto, type UpdateStudentDiscountDto, type UpdateSupplierDto, type UpdateSupportTicketDto, type UploadResult, type ValidateCouponDto, type ValidateReferralDto, type VerifyMagicLinkQuery, type VerifyPaymentDto, type VerifySignupOtpDto, type WalletBalance, type WalletPack, type WalletTransaction, type WasteLog, type WatchSessionResponse, type WatchSessionStatus, type WatchSessionStatusType, type WatchSessionSummary, createTZ };
|
package/dist/index.js
CHANGED
|
@@ -1900,6 +1900,85 @@ function createAdmin(root, c) {
|
|
|
1900
1900
|
return c.del(`/institutions/${id}`);
|
|
1901
1901
|
}
|
|
1902
1902
|
},
|
|
1903
|
+
// ─── Inventory (Admin) ───────────────────────────────────────────
|
|
1904
|
+
inventory: {
|
|
1905
|
+
list(params) {
|
|
1906
|
+
return c.paginated("/inventory", params);
|
|
1907
|
+
},
|
|
1908
|
+
get(id) {
|
|
1909
|
+
return c.get(`/inventory/${id}`);
|
|
1910
|
+
},
|
|
1911
|
+
create(data) {
|
|
1912
|
+
return c.post("/inventory", data);
|
|
1913
|
+
},
|
|
1914
|
+
update(id, data) {
|
|
1915
|
+
return c.patch(`/inventory/${id}`, data);
|
|
1916
|
+
},
|
|
1917
|
+
remove(id) {
|
|
1918
|
+
return c.del(`/inventory/${id}`);
|
|
1919
|
+
},
|
|
1920
|
+
alerts: {
|
|
1921
|
+
list() {
|
|
1922
|
+
return c.get("/inventory/alerts");
|
|
1923
|
+
},
|
|
1924
|
+
resolve(id) {
|
|
1925
|
+
return c.patch(`/inventory/alerts/${id}`, { isResolved: true });
|
|
1926
|
+
}
|
|
1927
|
+
},
|
|
1928
|
+
waste: {
|
|
1929
|
+
list() {
|
|
1930
|
+
return c.get("/inventory/waste");
|
|
1931
|
+
},
|
|
1932
|
+
create(data) {
|
|
1933
|
+
return c.post("/inventory/waste", data);
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
},
|
|
1937
|
+
// ─── Suppliers (Admin) ────────────────────────────────────────────
|
|
1938
|
+
suppliers: {
|
|
1939
|
+
list(params) {
|
|
1940
|
+
return c.paginated("/suppliers", params);
|
|
1941
|
+
},
|
|
1942
|
+
get(id) {
|
|
1943
|
+
return c.get(`/suppliers/${id}`);
|
|
1944
|
+
},
|
|
1945
|
+
create(data) {
|
|
1946
|
+
return c.post("/suppliers", data);
|
|
1947
|
+
},
|
|
1948
|
+
update(id, data) {
|
|
1949
|
+
return c.patch(`/suppliers/${id}`, data);
|
|
1950
|
+
},
|
|
1951
|
+
remove(id) {
|
|
1952
|
+
return c.del(`/suppliers/${id}`);
|
|
1953
|
+
}
|
|
1954
|
+
},
|
|
1955
|
+
// ─── Purchase Orders (Admin) ──────────────────────────────────────
|
|
1956
|
+
purchaseOrders: {
|
|
1957
|
+
list(params) {
|
|
1958
|
+
return c.paginated("/purchase-orders", params);
|
|
1959
|
+
},
|
|
1960
|
+
get(id) {
|
|
1961
|
+
return c.get(`/purchase-orders/${id}`);
|
|
1962
|
+
},
|
|
1963
|
+
create(data) {
|
|
1964
|
+
return c.post("/purchase-orders", data);
|
|
1965
|
+
},
|
|
1966
|
+
update(id, data) {
|
|
1967
|
+
return c.patch(`/purchase-orders/${id}`, data);
|
|
1968
|
+
},
|
|
1969
|
+
remove(id) {
|
|
1970
|
+
return c.del(`/purchase-orders/${id}`);
|
|
1971
|
+
}
|
|
1972
|
+
},
|
|
1973
|
+
// ─── Meal Subscriptions (Admin) ───────────────────────────────────
|
|
1974
|
+
mealSubscriptions: {
|
|
1975
|
+
list(params) {
|
|
1976
|
+
return c.paginated("/subscriptions", params);
|
|
1977
|
+
},
|
|
1978
|
+
get(id) {
|
|
1979
|
+
return c.get(`/subscriptions/${id}`);
|
|
1980
|
+
}
|
|
1981
|
+
},
|
|
1903
1982
|
// ─── Meal Plans (Admin) ──────────────────────────────────────────
|
|
1904
1983
|
mealPlans: {
|
|
1905
1984
|
list(params) {
|