@trusted-solutions/sdit.models 0.60.0-alpha.2 → 0.60.0-alpha.4

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.
@@ -1,18 +1,25 @@
1
- import { Override, OverrideEntityType, OverrideProduct, OverrideProductAttribute, Product, ProductAttribute, ProductAttributeCategory, ProductCategory } from '../models';
1
+ import { BaseOverride, Override, OverrideContextType, OverrideEntityType, OverrideProductAttribute, Product, ProductAttribute, ProductAttributeCategory, ProductCategory } from '../models';
2
2
  import { MultipleItems, SingleItem } from './response';
3
3
  export interface PutMenuOverrideRequest {
4
- menuId: string;
4
+ contextType: OverrideContextType;
5
+ contextValue: string;
6
+ /** @deprecated 改用 contextType='menu', contextValue=${menuId} */
7
+ menuId?: string;
5
8
  entityType: OverrideEntityType;
6
9
  entityValue: string;
7
10
  entityContent: Partial<Product> | Partial<ProductAttribute> | Partial<ProductAttributeCategory> | Partial<ProductCategory>;
8
11
  }
9
12
  export declare type PutMenuOverrideResponse = SingleItem<Override>;
10
- export interface ListMenuProductOverridesRequest {
11
- menuId: string;
13
+ export interface ListContextOverridesRequest {
14
+ contextType: OverrideContextType;
15
+ contextValue: string;
16
+ /** @deprecated 改用 contextType='menu', contextValue=${menuId} */
17
+ menuId?: string;
18
+ entityType: OverrideEntityType;
12
19
  }
13
- export interface ListMenuProductOverridesResponse extends MultipleItems<OverrideProduct> {
20
+ export interface ListContextOverridesResponse<T extends BaseOverride> extends MultipleItems<T> {
14
21
  }
15
- export declare type ListMenuProductAttributeOverridesRequest = ListMenuProductOverridesRequest;
22
+ export declare type ListMenuProductAttributeOverridesRequest = ListContextOverridesRequest;
16
23
  export interface ListMenuProductAttributeOverridesResponse extends MultipleItems<OverrideProductAttribute> {
17
24
  }
18
25
  /** 刪除和menu有關的所有override,包含OverrideProduct, OverrideProductAttribute */
@@ -1,6 +1,7 @@
1
1
  import { Product, ProductAttribute } from './menu';
2
2
  export declare enum OverrideContextType {
3
- menu = "menu"
3
+ menu = "menu",
4
+ menuPath = "menuPath"
4
5
  }
5
6
  export declare enum OverrideEntityType {
6
7
  product = "product",
@@ -4,6 +4,7 @@ exports.OverrideEntityType = exports.OverrideContextType = void 0;
4
4
  var OverrideContextType;
5
5
  (function (OverrideContextType) {
6
6
  OverrideContextType["menu"] = "menu";
7
+ OverrideContextType["menuPath"] = "menuPath";
7
8
  })(OverrideContextType = exports.OverrideContextType || (exports.OverrideContextType = {}));
8
9
  var OverrideEntityType;
9
10
  (function (OverrideEntityType) {
@@ -1 +1 @@
1
- {"version":3,"file":"override.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/override.ts"],"names":[],"mappings":";;;AAEA,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;AACf,CAAC,EAFW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAE9B;AAED,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,2DAAqC,CAAA;IACrC,2EAAqD,CAAA;IACrD,yDAAmC,CAAA;AACrC,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B"}
1
+ {"version":3,"file":"override.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/override.ts"],"names":[],"mappings":";;;AAEA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,4CAAqB,CAAA;AACvB,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B;AAED,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,2DAAqC,CAAA;IACrC,2EAAqD,CAAA;IACrD,yDAAmC,CAAA;AACrC,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusted-solutions/sdit.models",
3
- "version": "0.60.0-alpha.2",
3
+ "version": "0.60.0-alpha.4",
4
4
  "description": "TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.",
5
5
  "main": "index.js",
6
6
  "scripts": {