@onylab/common-api 2.1.30 → 2.1.31
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,20 +384,22 @@ 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
400
|
import { HubriseServiceType } from "api/hubrise/model/order/HubriseServiceType";
|
|
400
401
|
export interface HubriseMenuPriceOverrideContract {
|
|
402
|
+
variant_refs?: string[];
|
|
401
403
|
dow?: string;
|
|
402
404
|
start_time?: string;
|
|
403
405
|
end_time?: string;
|
|
@@ -441,10 +443,12 @@ declare module "api/hubrise/model/menu/HubriseMenuProductContract" {
|
|
|
441
443
|
}
|
|
442
444
|
declare module "api/hubrise/model/menu/HubriseMenuProductOptionContract" {
|
|
443
445
|
import { HubriseMenuPriceOverrideContract } from "api/hubrise/model/menu/HubriseMenuPriceOverrideContract";
|
|
446
|
+
import { HubriseMenuRestrictionsContract } from "api/hubrise/model/menu/HubriseMenuRestrictionsContract";
|
|
444
447
|
export interface HubriseMenuProductOptionContract {
|
|
445
448
|
id: string;
|
|
446
449
|
ref?: string;
|
|
447
450
|
name: string;
|
|
451
|
+
restrictions?: HubriseMenuRestrictionsContract;
|
|
448
452
|
price: string;
|
|
449
453
|
price_overrides: HubriseMenuPriceOverrideContract[];
|
|
450
454
|
default?: boolean;
|
|
@@ -510,6 +514,12 @@ declare module "api/hubrise/model/menu/HubriseMenuChargeContract" {
|
|
|
510
514
|
price?: string;
|
|
511
515
|
}
|
|
512
516
|
}
|
|
517
|
+
declare module "api/hubrise/model/menu/HubriseMenuVariantContract" {
|
|
518
|
+
export interface HubriseMenuVariantContract {
|
|
519
|
+
ref: string;
|
|
520
|
+
name: string;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
513
523
|
declare module "api/hubrise/model/menu/HubriseMenuCatalogContract" {
|
|
514
524
|
import { HubriseMenuCategoryContract } from "api/hubrise/model/menu/HubriseMenuCategoryContract";
|
|
515
525
|
import { HubriseMenuProductContract } from "api/hubrise/model/menu/HubriseMenuProductContract";
|
|
@@ -517,12 +527,14 @@ declare module "api/hubrise/model/menu/HubriseMenuCatalogContract" {
|
|
|
517
527
|
import { HubriseMenuDealContract } from "api/hubrise/model/menu/HubriseMenuDealContract";
|
|
518
528
|
import { HubriseMenuDiscountContract } from "api/hubrise/model/menu/HubriseMenuDiscountContract";
|
|
519
529
|
import { HubriseMenuChargeContract } from "api/hubrise/model/menu/HubriseMenuChargeContract";
|
|
530
|
+
import { HubriseMenuVariantContract } from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
520
531
|
export interface HubriseMenuCatalogContract {
|
|
521
532
|
id: string;
|
|
522
533
|
location_id?: string;
|
|
523
534
|
name: string;
|
|
524
535
|
created_at?: string;
|
|
525
536
|
data: {
|
|
537
|
+
variants?: HubriseMenuVariantContract[];
|
|
526
538
|
categories?: HubriseMenuCategoryContract[];
|
|
527
539
|
products?: HubriseMenuProductContract[];
|
|
528
540
|
option_lists?: HubriseMenuProductOptionListContract[];
|
|
@@ -1526,12 +1538,13 @@ declare module "api/hubrise/service/HubriseCatalogConverterContract" {
|
|
|
1526
1538
|
import { HubriseMenuCatalogContract } from "api/hubrise/model/menu/HubriseMenuCatalogContract";
|
|
1527
1539
|
import { HubriseOrderEditableItemContract } from "api/hubrise/model/order/HubriseOrderEditableItemContract";
|
|
1528
1540
|
import { HubriseOrderEditableOptionContract } from "api/hubrise/model/order/HubriseOrderEditableOptionContract";
|
|
1541
|
+
import { HubriseMenuVariantContract } from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
1529
1542
|
export interface HubriseCatalogConverterContract {
|
|
1530
|
-
editableItems(catalog: HubriseMenuCatalogContract): {
|
|
1543
|
+
editableItems(catalog: HubriseMenuCatalogContract, variant?: HubriseMenuVariantContract): {
|
|
1531
1544
|
withRef: HubriseOrderEditableItemContract[];
|
|
1532
1545
|
withName: HubriseOrderEditableItemContract[];
|
|
1533
1546
|
};
|
|
1534
|
-
editableItemOptions(catalog: HubriseMenuCatalogContract): {
|
|
1547
|
+
editableItemOptions(catalog: HubriseMenuCatalogContract, variant?: HubriseMenuVariantContract): {
|
|
1535
1548
|
withRef: Record<string, HubriseOrderEditableOptionContract[]>;
|
|
1536
1549
|
withName: Record<string, HubriseOrderEditableOptionContract[]>;
|
|
1537
1550
|
};
|
|
@@ -1545,17 +1558,38 @@ declare module "util/ObjectUtil" {
|
|
|
1545
1558
|
static update(source: Record<string, unknown>, target: Record<string, unknown>): void;
|
|
1546
1559
|
}
|
|
1547
1560
|
}
|
|
1561
|
+
declare module "api/hubrise/service/HubriseRestrictionEnforcerContract" {
|
|
1562
|
+
import { HubriseMenuVariantContract } from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
1563
|
+
import { HubriseMenuSkuContract } from "api/hubrise/model/menu/HubriseMenuSkuContract";
|
|
1564
|
+
import { HubriseMenuProductOptionContract } from "api/hubrise/model/menu/HubriseMenuProductOptionContract";
|
|
1565
|
+
import { HubriseMenuDealContract } from "api/hubrise/model/menu/HubriseMenuDealContract";
|
|
1566
|
+
import { HubriseMenuDiscountContract } from "api/hubrise/model/menu/HubriseMenuDiscountContract";
|
|
1567
|
+
export type HubriseObjectRestrictionContract = HubriseMenuSkuContract | HubriseMenuProductOptionContract | HubriseMenuDealContract | HubriseMenuDiscountContract;
|
|
1568
|
+
export interface HubriseRestrictionEnforcerContract {
|
|
1569
|
+
filter<ObjectContract>(list: HubriseObjectRestrictionContract[], date: string, variant?: HubriseMenuVariantContract): ObjectContract[];
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
declare module "api/hubrise/service/HubriseRestrictionEnforcer" {
|
|
1573
|
+
import { HubriseObjectRestrictionContract, HubriseRestrictionEnforcerContract } from "api/hubrise/service/HubriseRestrictionEnforcerContract";
|
|
1574
|
+
import { HubriseMenuVariantContract } from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
1575
|
+
export class HubriseRestrictionEnforcer implements HubriseRestrictionEnforcerContract {
|
|
1576
|
+
filter<ObjectContract>(list: HubriseObjectRestrictionContract[], date: string, variant?: HubriseMenuVariantContract): ObjectContract[];
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1548
1579
|
declare module "api/hubrise/service/HubriseCatalogConverter" {
|
|
1549
1580
|
import { HubriseCatalogConverterContract } from "api/hubrise/service/HubriseCatalogConverterContract";
|
|
1550
1581
|
import { HubriseMenuCatalogContract } from "api/hubrise/model/menu/HubriseMenuCatalogContract";
|
|
1551
1582
|
import { HubriseOrderEditableItemContract } from "api/hubrise/model/order/HubriseOrderEditableItemContract";
|
|
1552
1583
|
import { HubriseOrderEditableOptionContract } from "api/hubrise/model/order/HubriseOrderEditableOptionContract";
|
|
1584
|
+
import { HubriseMenuVariantContract } from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
1553
1585
|
export class HubriseCatalogConverter implements HubriseCatalogConverterContract {
|
|
1554
|
-
|
|
1586
|
+
private readonly hubriseRestrictionEnforcer;
|
|
1587
|
+
constructor();
|
|
1588
|
+
editableItems(catalog: HubriseMenuCatalogContract, variant?: HubriseMenuVariantContract): {
|
|
1555
1589
|
withRef: HubriseOrderEditableItemContract[];
|
|
1556
1590
|
withName: HubriseOrderEditableItemContract[];
|
|
1557
1591
|
};
|
|
1558
|
-
editableItemOptions(catalog: HubriseMenuCatalogContract): {
|
|
1592
|
+
editableItemOptions(catalog: HubriseMenuCatalogContract, variant?: HubriseMenuVariantContract): {
|
|
1559
1593
|
withRef: Record<string, HubriseOrderEditableOptionContract[]>;
|
|
1560
1594
|
withName: Record<string, HubriseOrderEditableOptionContract[]>;
|
|
1561
1595
|
};
|
|
@@ -1672,6 +1706,7 @@ declare module "api/web" {
|
|
|
1672
1706
|
export * from "api/hubrise/model/menu/HubriseMenuProductOptionListContract";
|
|
1673
1707
|
export * from "api/hubrise/model/menu/HubriseMenuRestrictionsContract";
|
|
1674
1708
|
export * from "api/hubrise/model/menu/HubriseMenuSkuContract";
|
|
1709
|
+
export * from "api/hubrise/model/menu/HubriseMenuVariantContract";
|
|
1675
1710
|
export * from "api/hubrise/model/order/HubriseOrderChargeContract";
|
|
1676
1711
|
export * from "api/hubrise/model/order/HubriseOrderContract";
|
|
1677
1712
|
export * from "api/hubrise/model/order/HubriseOrderDealContract";
|
|
@@ -1691,6 +1726,8 @@ declare module "api/web" {
|
|
|
1691
1726
|
export * from "api/hubrise/service/HubriseCatalogConverterContract";
|
|
1692
1727
|
export * from "api/hubrise/service/HubriseOrderConverter";
|
|
1693
1728
|
export * from "api/hubrise/service/HubriseOrderConverterContract";
|
|
1729
|
+
export * from "api/hubrise/service/HubriseRestrictionEnforcer";
|
|
1730
|
+
export * from "api/hubrise/service/HubriseRestrictionEnforcerContract";
|
|
1694
1731
|
export * from "api/hubrise/service/TotalHubriseCalculator";
|
|
1695
1732
|
export * from "api/hubrise/service/TotalHubriseCalculatorContract";
|
|
1696
1733
|
export * from "api/hubrise/util/HubrisePriceUtil";
|