@onylab/common-api 2.1.30 → 2.1.32
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/common-api.d.ts
CHANGED
|
@@ -317,8 +317,8 @@ declare module "api/hubrise/model/order/HubriseOrderDiscountContract" {
|
|
|
317
317
|
}
|
|
318
318
|
declare module "api/hubrise/model/order/HubriseOrderDealContract" {
|
|
319
319
|
export interface HubriseOrderDealContract {
|
|
320
|
-
name: string;
|
|
321
320
|
ref?: string;
|
|
321
|
+
name: string;
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
declare module "api/hubrise/model/order/HubriseServiceType" {
|
|
@@ -384,26 +384,25 @@ declare module "api/hubrise/model/menu/HubriseMenuCategoryContract" {
|
|
|
384
384
|
}
|
|
385
385
|
declare module "api/hubrise/model/menu/HubriseMenuRestrictionsContract" {
|
|
386
386
|
export interface HubriseMenuRestrictionsContract {
|
|
387
|
+
variant_refs?: string[];
|
|
387
388
|
dow?: string;
|
|
388
389
|
start_time?: string;
|
|
389
390
|
end_time?: string;
|
|
390
391
|
start_date?: string;
|
|
391
392
|
end_date?: string;
|
|
392
|
-
service_types?: string[];
|
|
393
393
|
min_order_amount?: string;
|
|
394
394
|
max_per_order?: string;
|
|
395
395
|
max_per_customer?: string;
|
|
396
|
+
enabled?: boolean;
|
|
396
397
|
}
|
|
397
398
|
}
|
|
398
399
|
declare module "api/hubrise/model/menu/HubriseMenuPriceOverrideContract" {
|
|
399
|
-
import {
|
|
400
|
-
export interface HubriseMenuPriceOverrideContract {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
end_date?: string;
|
|
406
|
-
service_types?: HubriseServiceType[];
|
|
400
|
+
import { HubriseMenuRestrictionsContract } from "api/hubrise/model/menu/HubriseMenuRestrictionsContract";
|
|
401
|
+
export interface HubriseMenuPriceOverrideContract extends HubriseMenuRestrictionsContract {
|
|
402
|
+
min_order_amount: never;
|
|
403
|
+
max_per_order: never;
|
|
404
|
+
max_per_customer: never;
|
|
405
|
+
enabled: never;
|
|
407
406
|
price: string;
|
|
408
407
|
}
|
|
409
408
|
}
|
|
@@ -441,10 +440,12 @@ declare module "api/hubrise/model/menu/HubriseMenuProductContract" {
|
|
|
441
440
|
}
|
|
442
441
|
declare module "api/hubrise/model/menu/HubriseMenuProductOptionContract" {
|
|
443
442
|
import { HubriseMenuPriceOverrideContract } from "api/hubrise/model/menu/HubriseMenuPriceOverrideContract";
|
|
443
|
+
import { HubriseMenuRestrictionsContract } from "api/hubrise/model/menu/HubriseMenuRestrictionsContract";
|
|
444
444
|
export interface HubriseMenuProductOptionContract {
|
|
445
445
|
id: string;
|
|
446
446
|
ref?: string;
|
|
447
447
|
name: string;
|
|
448
|
+
restrictions?: HubriseMenuRestrictionsContract;
|
|
448
449
|
price: string;
|
|
449
450
|
price_overrides: HubriseMenuPriceOverrideContract[];
|
|
450
451
|
default?: boolean;
|
|
@@ -510,6 +511,12 @@ declare module "api/hubrise/model/menu/HubriseMenuChargeContract" {
|
|
|
510
511
|
price?: string;
|
|
511
512
|
}
|
|
512
513
|
}
|
|
514
|
+
declare module "api/hubrise/model/menu/HubriseMenuVariantContract" {
|
|
515
|
+
export interface HubriseMenuVariantContract {
|
|
516
|
+
ref: string;
|
|
517
|
+
name: string;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
513
520
|
declare module "api/hubrise/model/menu/HubriseMenuCatalogContract" {
|
|
514
521
|
import { HubriseMenuCategoryContract } from "api/hubrise/model/menu/HubriseMenuCategoryContract";
|
|
515
522
|
import { HubriseMenuProductContract } from "api/hubrise/model/menu/HubriseMenuProductContract";
|
|
@@ -517,12 +524,14 @@ declare module "api/hubrise/model/menu/HubriseMenuCatalogContract" {
|
|
|
517
524
|
import { HubriseMenuDealContract } from "api/hubrise/model/menu/HubriseMenuDealContract";
|
|
518
525
|
import { HubriseMenuDiscountContract } from "api/hubrise/model/menu/HubriseMenuDiscountContract";
|
|
519
526
|
import { HubriseMenuChargeContract } from "api/hubrise/model/menu/HubriseMenuChargeContract";
|
|
527
|
+
import { HubriseMenuVariantContract } from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
520
528
|
export interface HubriseMenuCatalogContract {
|
|
521
529
|
id: string;
|
|
522
530
|
location_id?: string;
|
|
523
531
|
name: string;
|
|
524
532
|
created_at?: string;
|
|
525
533
|
data: {
|
|
534
|
+
variants?: HubriseMenuVariantContract[];
|
|
526
535
|
categories?: HubriseMenuCategoryContract[];
|
|
527
536
|
products?: HubriseMenuProductContract[];
|
|
528
537
|
option_lists?: HubriseMenuProductOptionListContract[];
|
|
@@ -1526,12 +1535,13 @@ declare module "api/hubrise/service/HubriseCatalogConverterContract" {
|
|
|
1526
1535
|
import { HubriseMenuCatalogContract } from "api/hubrise/model/menu/HubriseMenuCatalogContract";
|
|
1527
1536
|
import { HubriseOrderEditableItemContract } from "api/hubrise/model/order/HubriseOrderEditableItemContract";
|
|
1528
1537
|
import { HubriseOrderEditableOptionContract } from "api/hubrise/model/order/HubriseOrderEditableOptionContract";
|
|
1538
|
+
import { HubriseMenuVariantContract } from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
1529
1539
|
export interface HubriseCatalogConverterContract {
|
|
1530
|
-
editableItems(catalog: HubriseMenuCatalogContract): {
|
|
1540
|
+
editableItems(catalog: HubriseMenuCatalogContract, variant?: HubriseMenuVariantContract): {
|
|
1531
1541
|
withRef: HubriseOrderEditableItemContract[];
|
|
1532
1542
|
withName: HubriseOrderEditableItemContract[];
|
|
1533
1543
|
};
|
|
1534
|
-
editableItemOptions(catalog: HubriseMenuCatalogContract): {
|
|
1544
|
+
editableItemOptions(catalog: HubriseMenuCatalogContract, variant?: HubriseMenuVariantContract): {
|
|
1535
1545
|
withRef: Record<string, HubriseOrderEditableOptionContract[]>;
|
|
1536
1546
|
withName: Record<string, HubriseOrderEditableOptionContract[]>;
|
|
1537
1547
|
};
|
|
@@ -1545,20 +1555,46 @@ declare module "util/ObjectUtil" {
|
|
|
1545
1555
|
static update(source: Record<string, unknown>, target: Record<string, unknown>): void;
|
|
1546
1556
|
}
|
|
1547
1557
|
}
|
|
1558
|
+
declare module "api/hubrise/service/HubriseRestrictionEnforcerContract" {
|
|
1559
|
+
import { HubriseMenuVariantContract } from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
1560
|
+
import { HubriseMenuSkuContract } from "api/hubrise/model/menu/HubriseMenuSkuContract";
|
|
1561
|
+
import { HubriseMenuProductOptionContract } from "api/hubrise/model/menu/HubriseMenuProductOptionContract";
|
|
1562
|
+
import { HubriseMenuDealContract } from "api/hubrise/model/menu/HubriseMenuDealContract";
|
|
1563
|
+
import { HubriseMenuDiscountContract } from "api/hubrise/model/menu/HubriseMenuDiscountContract";
|
|
1564
|
+
import { HubriseMenuPriceOverrideContract } from "api/hubrise/model/menu/HubriseMenuPriceOverrideContract";
|
|
1565
|
+
export type HubriseObjectRestrictionContract = HubriseMenuSkuContract | HubriseMenuProductOptionContract | HubriseMenuDealContract | HubriseMenuDiscountContract | {
|
|
1566
|
+
restrictions: HubriseMenuPriceOverrideContract;
|
|
1567
|
+
price: string;
|
|
1568
|
+
};
|
|
1569
|
+
export interface HubriseRestrictionEnforcerContract {
|
|
1570
|
+
filter<ObjectContract>(list: HubriseObjectRestrictionContract[], date: string, variant?: HubriseMenuVariantContract): ObjectContract[];
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
declare module "api/hubrise/service/HubriseRestrictionEnforcer" {
|
|
1574
|
+
import { HubriseObjectRestrictionContract, HubriseRestrictionEnforcerContract } from "api/hubrise/service/HubriseRestrictionEnforcerContract";
|
|
1575
|
+
import { HubriseMenuVariantContract } from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
1576
|
+
export class HubriseRestrictionEnforcer implements HubriseRestrictionEnforcerContract {
|
|
1577
|
+
filter<ObjectContract>(list: HubriseObjectRestrictionContract[], date: string, variant?: HubriseMenuVariantContract): ObjectContract[];
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1548
1580
|
declare module "api/hubrise/service/HubriseCatalogConverter" {
|
|
1549
1581
|
import { HubriseCatalogConverterContract } from "api/hubrise/service/HubriseCatalogConverterContract";
|
|
1550
1582
|
import { HubriseMenuCatalogContract } from "api/hubrise/model/menu/HubriseMenuCatalogContract";
|
|
1551
1583
|
import { HubriseOrderEditableItemContract } from "api/hubrise/model/order/HubriseOrderEditableItemContract";
|
|
1552
1584
|
import { HubriseOrderEditableOptionContract } from "api/hubrise/model/order/HubriseOrderEditableOptionContract";
|
|
1585
|
+
import { HubriseMenuVariantContract } from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
1553
1586
|
export class HubriseCatalogConverter implements HubriseCatalogConverterContract {
|
|
1554
|
-
|
|
1587
|
+
private readonly hubriseRestrictionEnforcer;
|
|
1588
|
+
constructor();
|
|
1589
|
+
editableItems(catalog: HubriseMenuCatalogContract, variant?: HubriseMenuVariantContract): {
|
|
1555
1590
|
withRef: HubriseOrderEditableItemContract[];
|
|
1556
1591
|
withName: HubriseOrderEditableItemContract[];
|
|
1557
1592
|
};
|
|
1558
|
-
editableItemOptions(catalog: HubriseMenuCatalogContract): {
|
|
1593
|
+
editableItemOptions(catalog: HubriseMenuCatalogContract, variant?: HubriseMenuVariantContract): {
|
|
1559
1594
|
withRef: Record<string, HubriseOrderEditableOptionContract[]>;
|
|
1560
1595
|
withName: Record<string, HubriseOrderEditableOptionContract[]>;
|
|
1561
1596
|
};
|
|
1597
|
+
private selectPrice;
|
|
1562
1598
|
}
|
|
1563
1599
|
}
|
|
1564
1600
|
declare module "api/hubrise/service/HubriseOrderConverterContract" {
|
|
@@ -1672,6 +1708,7 @@ declare module "api/web" {
|
|
|
1672
1708
|
export * from "api/hubrise/model/menu/HubriseMenuProductOptionListContract";
|
|
1673
1709
|
export * from "api/hubrise/model/menu/HubriseMenuRestrictionsContract";
|
|
1674
1710
|
export * from "api/hubrise/model/menu/HubriseMenuSkuContract";
|
|
1711
|
+
export * from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
1675
1712
|
export * from "api/hubrise/model/order/HubriseOrderChargeContract";
|
|
1676
1713
|
export * from "api/hubrise/model/order/HubriseOrderContract";
|
|
1677
1714
|
export * from "api/hubrise/model/order/HubriseOrderDealContract";
|
|
@@ -1691,6 +1728,8 @@ declare module "api/web" {
|
|
|
1691
1728
|
export * from "api/hubrise/service/HubriseCatalogConverterContract";
|
|
1692
1729
|
export * from "api/hubrise/service/HubriseOrderConverter";
|
|
1693
1730
|
export * from "api/hubrise/service/HubriseOrderConverterContract";
|
|
1731
|
+
export * from "api/hubrise/service/HubriseRestrictionEnforcer";
|
|
1732
|
+
export * from "api/hubrise/service/HubriseRestrictionEnforcerContract";
|
|
1694
1733
|
export * from "api/hubrise/service/TotalHubriseCalculator";
|
|
1695
1734
|
export * from "api/hubrise/service/TotalHubriseCalculatorContract";
|
|
1696
1735
|
export * from "api/hubrise/util/HubrisePriceUtil";
|