feeef 0.7.2 → 0.7.3
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.
|
@@ -520,6 +520,46 @@ export interface PaymentIntegration {
|
|
|
520
520
|
defaultMethod?: string;
|
|
521
521
|
metadata?: Record<string, any>;
|
|
522
522
|
}
|
|
523
|
+
/**
|
|
524
|
+
* Orders dispatch strategy for assigning orders to confirmers.
|
|
525
|
+
* Discriminated union by `type` (freezed convention with unionKey: 'type').
|
|
526
|
+
* Values match Dart constructor names.
|
|
527
|
+
*/
|
|
528
|
+
export type OrdersDispatchStrategy = {
|
|
529
|
+
type: 'firstUpdate';
|
|
530
|
+
} | {
|
|
531
|
+
type: 'random';
|
|
532
|
+
} | {
|
|
533
|
+
type: 'weightedRandom';
|
|
534
|
+
weights?: Record<string, number>;
|
|
535
|
+
} | {
|
|
536
|
+
type: 'roundRobin';
|
|
537
|
+
lastAssignedConfirmerId?: string;
|
|
538
|
+
sortBy?: string;
|
|
539
|
+
} | {
|
|
540
|
+
type: 'manualOnly';
|
|
541
|
+
} | {
|
|
542
|
+
type: 'priority';
|
|
543
|
+
confirmerIds: string[];
|
|
544
|
+
};
|
|
545
|
+
/**
|
|
546
|
+
* Dispatcher integration configuration.
|
|
547
|
+
* Controls how new orders are assigned to confirmers.
|
|
548
|
+
*/
|
|
549
|
+
export interface DispatcherIntegration {
|
|
550
|
+
active: boolean;
|
|
551
|
+
strategy?: OrdersDispatchStrategy | null;
|
|
552
|
+
metadata?: Record<string, any>;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Confirmer-specific permissions (in StoreMember.metadata).
|
|
556
|
+
*/
|
|
557
|
+
export interface ConfermerPermissions {
|
|
558
|
+
canSeeAllOrders?: boolean;
|
|
559
|
+
canAssignOrder?: boolean;
|
|
560
|
+
canReAssignOrder?: boolean;
|
|
561
|
+
metadata?: Record<string, any>;
|
|
562
|
+
}
|
|
523
563
|
export interface StoreIntegrations {
|
|
524
564
|
[key: string]: any;
|
|
525
565
|
metadata?: Record<string, any>;
|
|
@@ -544,6 +584,7 @@ export interface StoreIntegrations {
|
|
|
544
584
|
zimou?: ZimouIntegration;
|
|
545
585
|
zrexpress?: ZrexpressIntegration;
|
|
546
586
|
security?: SecurityIntegration;
|
|
587
|
+
dispatcher?: DispatcherIntegration;
|
|
547
588
|
}
|
|
548
589
|
export declare enum StoreSubscriptionStatus {
|
|
549
590
|
active = "active",
|
|
@@ -206,6 +206,7 @@ export declare class CartService extends NotifiableService {
|
|
|
206
206
|
* @param shippingType - The shipping type enum.
|
|
207
207
|
* @returns The corresponding shipping price type.
|
|
208
208
|
*/
|
|
209
|
+
/** Maps order ShippingType to shipping price key. store = pickup (from store), pickup = desk (from relay/desk). */
|
|
209
210
|
private mapShippingTypeToPriceType;
|
|
210
211
|
/**
|
|
211
212
|
* Resolves shipping price using the priority chain.
|
|
@@ -232,8 +233,9 @@ export declare class CartService extends NotifiableService {
|
|
|
232
233
|
*
|
|
233
234
|
* Note: Shipping prices must be loaded and set via setShippingPrice() for the new system to work.
|
|
234
235
|
* If shipping prices are not loaded, the method falls back to the legacy system.
|
|
236
|
+
* In the new system: price key "desk" → ShippingType.pickup, price key "pickup" → ShippingType.store.
|
|
235
237
|
*
|
|
236
|
-
* @returns An array of available shipping types.
|
|
238
|
+
* @returns An array of available shipping types. With prices e.g. { desk: 550, home: 800, pickup: null }, returns [home, pickup].
|
|
237
239
|
*/
|
|
238
240
|
getAvailableShippingTypes(): ShippingType[];
|
|
239
241
|
/**
|