@things-factory/warehouse-base 6.0.69 → 6.0.70

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/warehouse-base",
3
- "version": "6.0.69",
3
+ "version": "6.0.70",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -23,12 +23,12 @@
23
23
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
24
24
  },
25
25
  "dependencies": {
26
- "@things-factory/biz-base": "^6.0.67",
27
- "@things-factory/id-rule-base": "^6.0.67",
28
- "@things-factory/integration-sellercraft": "^6.0.69",
29
- "@things-factory/marketplace-base": "^6.0.69",
30
- "@things-factory/product-base": "^6.0.67",
31
- "@things-factory/setting-base": "^6.0.67"
26
+ "@things-factory/biz-base": "^6.0.70",
27
+ "@things-factory/id-rule-base": "^6.0.70",
28
+ "@things-factory/integration-sellercraft": "^6.0.70",
29
+ "@things-factory/marketplace-base": "^6.0.70",
30
+ "@things-factory/product-base": "^6.0.70",
31
+ "@things-factory/setting-base": "^6.0.70"
32
32
  },
33
- "gitHead": "d0198bba193b275f29fffd8c3963f556db4dda92"
33
+ "gitHead": "b9c05eb9b7a0aed2bcf7b24bd5851eb047b54391"
34
34
  }
@@ -34,7 +34,7 @@ export class InventoryQuery {
34
34
  * @param exportItem
35
35
  * @returns
36
36
  */
37
- @Directive('@privilege(category: "inventory", privilege: "query")')
37
+ @Directive('@privilege(category: "inventory", privilege: "query", domainOwnerGranted: true)')
38
38
  @Directive('@transaction')
39
39
  @Query(returns => InventoryList)
40
40
  async inventories(
@@ -175,7 +175,7 @@ export class InventoryQuery {
175
175
  }
176
176
  }
177
177
 
178
- @Directive('@privilege(category: "inventory", privilege: "query")')
178
+ @Directive('@privilege(category: "inventory", privilege: "query", domainOwnerGranted: true)')
179
179
  @Query(returns => Inventory)
180
180
  async inventory(@Arg('palletId') palletId: string, @Ctx() context: ResolverContext): Promise<Inventory> {
181
181
  const { domain } = context.state
@@ -186,7 +186,7 @@ export class InventoryQuery {
186
186
  })
187
187
  }
188
188
 
189
- @Directive('@privilege(category: "inventory", privilege: "query")')
189
+ @Directive('@privilege(category: "inventory", privilege: "query", domainOwnerGranted: true)')
190
190
  @Query(returns => Inventory)
191
191
  async inventoryByPallet(@Arg('palletId') palletId: string, @Ctx() context: ResolverContext): Promise<Inventory> {
192
192
  const { domain } = context.state
@@ -197,7 +197,7 @@ export class InventoryQuery {
197
197
  })
198
198
  }
199
199
 
200
- @Directive('@privilege(category: "inventory", privilege: "query")')
200
+ @Directive('@privilege(category: "inventory", privilege: "query", domainOwnerGranted: true)')
201
201
  @Directive('@transaction')
202
202
  @Query(returns => InventoryList)
203
203
  async inventoriesByProduct(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<InventoryList> {
@@ -609,7 +609,7 @@ export class InventoryQuery {
609
609
  return Boolean(ownerBizplace.id === foundBizplace.id)
610
610
  }
611
611
 
612
- @Directive('@privilege(category: "inventory", privilege: "query")')
612
+ @Directive('@privilege(category: "inventory", privilege: "query", domainOwnerGranted: true)')
613
613
  @Query(returns => InventoryBundleGroupDetail)
614
614
  async inventoriesByBundle(
615
615
  @Ctx() context: ResolverContext,
@@ -776,7 +776,7 @@ export class InventoryQuery {
776
776
  return { bundleGroup, bundleSetting }
777
777
  }
778
778
 
779
- @Directive('@privilege(category: "inventory", privilege: "query")')
779
+ @Directive('@privilege(category: "inventory", privilege: "query", domainOwnerGranted: true)')
780
780
  @Directive('@transaction')
781
781
  @Query(returns => InventoryList)
782
782
  async inventoriesGroupByProduct(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<InventoryList> {
@@ -11,7 +11,7 @@ import { LocationInventories, LocationList, LocationOccupancy } from './location
11
11
 
12
12
  @Resolver(Location)
13
13
  export class LocationQuery {
14
- @Directive('@privilege(category: "warehouse", privilege: "query")')
14
+ @Directive('@privilege(category: "warehouse", privilege: "query", domainOwnerGranted: true)')
15
15
  @Query(returns => LocationList)
16
16
  async locations(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<LocationList> {
17
17
  const queryBuilder = getQueryBuilderFromListParams({
@@ -32,7 +32,7 @@ export class LocationQuery {
32
32
  * @returns pure location data only. there will be no other table joined to avoid
33
33
  * ORM lagging issue (converting to object extremely withdraws the performance)
34
34
  * */
35
- @Directive('@privilege(category: "warehouse", privilege: "query")')
35
+ @Directive('@privilege(category: "warehouse", privilege: "query", domainOwnerGranted: true)')
36
36
  @Query(returns => LocationList)
37
37
  async pureLocations(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<LocationList> {
38
38
  const queryBuilder = getRepository(Location).createQueryBuilder('location')
@@ -43,7 +43,7 @@ export class LocationQuery {
43
43
  return { items: items.map(item => new Location(item)), total }
44
44
  }
45
45
 
46
- @Directive('@privilege(category: "warehouse", privilege: "query")')
46
+ @Directive('@privilege(category: "warehouse", privilege: "query", domainOwnerGranted: true)')
47
47
  @Query(returns => LocationOccupancy)
48
48
  async locationOccupancies(
49
49
  @Arg('warehouse') warehouse: string,
@@ -75,7 +75,7 @@ export class LocationQuery {
75
75
  return { total, occupied, empty, percentage }
76
76
  }
77
77
 
78
- @Directive('@privilege(category: "warehouse", privilege: "query")')
78
+ @Directive('@privilege(category: "warehouse", privilege: "query", domainOwnerGranted: true)')
79
79
  @Query(returns => Location)
80
80
  async location(@Arg('name') name: string, @Ctx() context: ResolverContext): Promise<Location> {
81
81
  const foundLocation: Location | null = await getRepository(Location).findOne({
@@ -87,7 +87,7 @@ export class LocationQuery {
87
87
  return foundLocation
88
88
  }
89
89
 
90
- @Directive('@privilege(category: "warehouse", privilege: "query")')
90
+ @Directive('@privilege(category: "warehouse", privilege: "query", domainOwnerGranted: true)')
91
91
  @Query(returns => Location)
92
92
  async locationByName(@Arg('name') name: string, @Ctx() context: ResolverContext): Promise<Location> {
93
93
  const { domain } = context.state
@@ -101,7 +101,7 @@ export class LocationQuery {
101
101
  })
102
102
  }
103
103
 
104
- @Directive('@privilege(category: "warehouse", privilege: "query")')
104
+ @Directive('@privilege(category: "warehouse", privilege: "query", domainOwnerGranted: true)')
105
105
  @Query(returns => LocationList)
106
106
  async locationsByGroup(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<LocationList> {
107
107
  const { domain } = context.state
@@ -127,7 +127,7 @@ export class LocationQuery {
127
127
  return { items, total }
128
128
  }
129
129
 
130
- @Directive('@privilege(category: "warehouse", privilege: "query")')
130
+ @Directive('@privilege(category: "warehouse", privilege: "query", domainOwnerGranted: true)')
131
131
  @Query(returns => LocationInventories)
132
132
  async locationWithInventories(
133
133
  @Args() params: ListParam,
@@ -11,7 +11,7 @@ import { MovementCount, MovementList } from './movement-types'
11
11
 
12
12
  @Resolver(Movement)
13
13
  export class MovementQuery {
14
- @Directive('@privilege(category: "movement", privilege: "query")')
14
+ @Directive('@privilege(category: "movement", privilege: "query", domainOwnerGranted: true)')
15
15
  @Query(returns => MovementList)
16
16
  async movements(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<MovementList> {
17
17
  const convertedParams = convertListParams(params)
@@ -24,7 +24,7 @@ export class MovementQuery {
24
24
  return { items, total }
25
25
  }
26
26
 
27
- @Directive('@privilege(category: "movement", privilege: "query")')
27
+ @Directive('@privilege(category: "movement", privilege: "query", domainOwnerGranted: true)')
28
28
  @Query(returns => Movement)
29
29
  async movement(@Arg('name') name: string, @Ctx() context: ResolverContext): Promise<Movement> {
30
30
  const { domain, user } = context.state