Skip to content

Commit

Permalink
feat: update common schema hands (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
meelrossi committed Jul 5, 2023
1 parent ae58e99 commit 78249f4
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 27 deletions.
92 changes: 78 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@apollo/client": "^3.3.9",
"@dcl/crypto": "^3.0.1",
"@dcl/hashing": "^1.1.0",
"@dcl/schemas": "^5.18.1",
"@dcl/schemas": "^8.1.0",
"@ethersproject/solidity": "^5.7.0",
"@types/escape-html": "0.0.20",
"@types/express": "^4.17.11",
Expand All @@ -53,7 +53,7 @@
"dcl-catalyst-client": "^12.0.4",
"decentraland-commons": "^5.2.0",
"decentraland-server": "^3.1.0",
"decentraland-transactions": "^1.43.1",
"decentraland-transactions": "^1.46.1",
"escape-html": "^1.0.3",
"ethers": "^5.7.2",
"express": "^4.18.2",
Expand Down
5 changes: 3 additions & 2 deletions spec/mocks/peer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
Wearable,
WearableCategory,
WearableRepresentation,
HideableWearableCategory,
I18N,
} from '@dcl/schemas'
import { dbCollectionMock } from './collections'
Expand All @@ -25,8 +26,8 @@ export const wearableMock: Wearable = {
data: {
category: WearableCategory.HAT,
representations: [] as WearableRepresentation[],
replaces: [] as WearableCategory[],
hides: [] as WearableCategory[],
replaces: [] as HideableWearableCategory[],
hides: [] as HideableWearableCategory[],
tags: [],
},
}
Expand Down
18 changes: 9 additions & 9 deletions src/Item/wearable/types.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { WearableCategory, BodyShape } from '@dcl/schemas'
import { WearableCategory, BodyShape, HideableWearableCategory } from '@dcl/schemas'

export type WearableRepresentation = {
bodyShapes: BodyShape[]
mainFile: string
contents: string[]
overrideReplaces: WearableCategory[]
overrideHides: WearableCategory[]
overrideReplaces: HideableWearableCategory[]
overrideHides: HideableWearableCategory[]
}

export type WearableData = {
category: WearableCategory
representations: WearableRepresentation[]
replaces: WearableCategory[]
hides: WearableCategory[]
replaces: HideableWearableCategory[]
hides: HideableWearableCategory[]
tags: string[]
}

Expand All @@ -37,11 +37,11 @@ export const wearableSchema = Object.freeze({
},
overrideReplaces: {
type: 'array',
items: WearableCategory.schema,
items: HideableWearableCategory.schema,
},
overrideHides: {
type: 'array',
items: WearableCategory.schema,
items: HideableWearableCategory.schema,
},
},
additionalProperties: false,
Expand All @@ -57,11 +57,11 @@ export const wearableSchema = Object.freeze({
},
replaces: {
type: 'array',
items: WearableCategory.schema,
items: HideableWearableCategory.schema,
},
hides: {
type: 'array',
items: WearableCategory.schema,
items: HideableWearableCategory.schema,
},
tags: {
type: 'array',
Expand Down

0 comments on commit 78249f4

Please sign in to comment.