@pisell/pisellos 0.10.71 → 0.10.72
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/modules/Order/index.d.ts +13 -4
- package/dist/modules/Order/index.js +1401 -764
- package/dist/modules/Order/types.d.ts +24 -1
- package/dist/modules/Order/types.js +4 -0
- package/dist/server/index.js +5 -2
- package/dist/solution/BaseSales/index.d.ts +2 -2
- package/dist/solution/BaseSales/index.js +8 -8
- package/dist/solution/UnifiedBookingSales/index.d.ts +15 -0
- package/dist/solution/UnifiedBookingSales/index.js +1082 -596
- package/dist/solution/UnifiedBookingSales/types.d.ts +17 -1
- package/lib/modules/Order/index.d.ts +13 -4
- package/lib/modules/Order/index.js +284 -24
- package/lib/modules/Order/types.d.ts +24 -1
- package/lib/modules/Order/types.js +2 -0
- package/lib/server/index.js +5 -1
- package/lib/solution/BaseSales/index.d.ts +2 -2
- package/lib/solution/BaseSales/index.js +2 -2
- package/lib/solution/UnifiedBookingSales/index.d.ts +15 -0
- package/lib/solution/UnifiedBookingSales/index.js +343 -44
- package/lib/solution/UnifiedBookingSales/types.d.ts +17 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { OrderModule } from '../../modules/Order';
|
|
|
6
6
|
import { type PickupTimingBookingInput } from '../../modules/Order/pickupTiming';
|
|
7
7
|
import type { PickupTimingAvailability, PickupTimingSelection, PickupTimingValidationResult } from '../../modules/FulfillmentTiming';
|
|
8
8
|
import { type ContactInfoConfig } from '../../modules/OpenData/contactInfo';
|
|
9
|
-
import type { AddProductBookingInput, AddProductToOrderOptions, LoadSalesDetailParams, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, OrderPaymentSource, SendCustomerPayLinkParams, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, UpdateTempOrderCustomerInput, UpdateOrderBookingParams, UpdateOrderProductParams, OrderTempOrder, OrderSummary, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions, RemoveProductsFromOrderOptions, ReplaceTempOrderOptions, SalesNote, SalesNotesMutationSnapshot, SetSalesNoteInput, PickupReferenceMode, ShopServiceData, ShopServiceType } from '../../modules/Order/types';
|
|
9
|
+
import type { AddProductBookingInput, AddProductToOrderOptions, LoadSalesDetailParams, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, OrderPaymentSource, SendCustomerPayLinkParams, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, UpdateTempOrderCustomerInput, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductsOptions, OrderTempOrder, OrderSummary, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions, RemoveProductsFromOrderOptions, ReplaceTempOrderOptions, SalesNote, SalesNotesMutationSnapshot, SetSalesNoteInput, PickupReferenceMode, ShopServiceData, ShopServiceType } from '../../modules/Order/types';
|
|
10
10
|
import type { SubmitPayloadEnhancer } from '../../modules/Order/utils';
|
|
11
11
|
import type { Discount, VirtualCurrencyAsset } from '../../modules/Discount/types';
|
|
12
12
|
import { RequestPlugin, WindowPlugin } from '../../plugins';
|
|
@@ -535,7 +535,7 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
535
535
|
validateProductVoucherSelection(): void;
|
|
536
536
|
addProductToOrder(product: Partial<BaseSalesOrderProduct> & BaseSalesOrderProductIdentity, booking?: AddProductBookingInput, options?: AddProductToOrderOptions): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
537
537
|
updateOrderProduct(params: UpdateOrderProductParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
538
|
-
updateOrderProducts(paramsList: UpdateOrderProductParams[]): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
538
|
+
updateOrderProducts(paramsList: UpdateOrderProductParams[], options?: UpdateOrderProductsOptions): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
539
539
|
updateOrderProductQuantity(params: BaseSalesUpdateOrderProductQuantityParams): Promise<import("../../modules/Order/types").OrderProduct[]>;
|
|
540
540
|
updateOrderBooking(params: UpdateOrderBookingParams): any[];
|
|
541
541
|
/**
|
|
@@ -4181,10 +4181,10 @@ class BaseSalesImpl extends _BaseModule.BaseModule {
|
|
|
4181
4181
|
throw error;
|
|
4182
4182
|
}
|
|
4183
4183
|
}
|
|
4184
|
-
async updateOrderProducts(paramsList) {
|
|
4184
|
+
async updateOrderProducts(paramsList, options) {
|
|
4185
4185
|
try {
|
|
4186
4186
|
if (!this.store.order) throw new Error('order 模块未初始化');
|
|
4187
|
-
const products = await this.store.order.updateOrderProducts(paramsList);
|
|
4187
|
+
const products = await this.store.order.updateOrderProducts(paramsList, options);
|
|
4188
4188
|
return products;
|
|
4189
4189
|
} catch (error) {
|
|
4190
4190
|
throw error;
|
|
@@ -174,6 +174,7 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
174
174
|
getSalesSettings(): Promise<ResolvedSalesSettings>;
|
|
175
175
|
private getLoadedSalesSettings;
|
|
176
176
|
private getProductBookingsForScheduling;
|
|
177
|
+
private shouldApplyMultipleBookingScheduling;
|
|
177
178
|
private resolveLoadedDefaultBookingStart;
|
|
178
179
|
/** Used by the SKU flow after Holder changes, without changing an explicit user-selected time. */
|
|
179
180
|
resolveDefaultBookingStart(params: {
|
|
@@ -212,6 +213,18 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
212
213
|
callback?: (result: any) => void;
|
|
213
214
|
subscriberId?: string;
|
|
214
215
|
}): Promise<ProductData[]>;
|
|
216
|
+
/**
|
|
217
|
+
* Queries one explicitly configured menu scope without publishing the sales catalog.
|
|
218
|
+
* The returned graph is detached from ProductList's shared ID cache. Callers own its
|
|
219
|
+
* membership and must requery/reprice with the service datetime after a context change.
|
|
220
|
+
* Missing/invalid menu configuration fails closed instead of querying every product.
|
|
221
|
+
*/
|
|
222
|
+
queryCatalogSnapshot(params: ProductListLoadProductsParams): Promise<ProductData[]>;
|
|
223
|
+
/** Full SKU/bundle detail, after verifying membership in the explicit day/menu scope. */
|
|
224
|
+
queryCatalogProductDetail(params: ProductListLoadProductsParams & {
|
|
225
|
+
product_id: number;
|
|
226
|
+
}): Promise<ProductData | undefined>;
|
|
227
|
+
private loadCatalogProducts;
|
|
215
228
|
queryProducts(params?: ProductListStoreQueryParams): Promise<ProductData[]>;
|
|
216
229
|
/** Date-first entry point. It delegates protocol details and cache ownership to ScheduleModule. */
|
|
217
230
|
loadScheduleAvailableDate(params: LoadScheduleAvailableDateParams): Promise<import("../../modules/Date/types").ITime[]>;
|
|
@@ -289,6 +302,8 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
|
|
|
289
302
|
getProductTimeRanges(contextId: string, request?: GetProductTimeRangesRequest): Promise<ContextualProductTimeRangeGroup[]>;
|
|
290
303
|
/** Thin facade: auto-refresh on cart drift, then delegate to the pure projection query. */
|
|
291
304
|
queryBookingAvailability(contextId: string, request: ContextualAvailabilityQuery): Promise<ContextualAvailabilityQueryResult>;
|
|
305
|
+
/** Reads detached resource metadata from the current context; never refreshes or performs I/O. */
|
|
306
|
+
getAvailabilityResources(contextId: string, expectedVersion?: number): AvailabilityResource[];
|
|
292
307
|
releaseAvailabilityContext(contextId: string): void;
|
|
293
308
|
private assertAvailabilityCommitWriteCAS;
|
|
294
309
|
private findProductLineByUid;
|