@dcl/schemas 5.13.1 → 5.14.0

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/schemas.d.ts CHANGED
@@ -71,36 +71,6 @@ export declare enum AnalyticsDayDataSortBy {
71
71
  MOST_SALES = "most_sales"
72
72
  }
73
73
 
74
- /** @alpha */
75
- declare type AssetJson = {
76
- id: string;
77
- assetType: string;
78
- name: string;
79
- description: string;
80
- thumbnail: string;
81
- model: string;
82
- category: WearableCategory;
83
- rarity: Rarity;
84
- bodyShape: AssetWearableGender;
85
- };
86
-
87
- /** @alpha */
88
- declare namespace AssetJson {
89
- const schema: JSONSchema<AssetJson>;
90
- const validate: ValidateFunction<AssetJson>;
91
- }
92
-
93
- declare enum AssetWearableGender {
94
- MALE = "male",
95
- FEMALE = "female",
96
- BOTH = "both"
97
- }
98
-
99
- declare namespace AssetWearableGender {
100
- const schema: JSONSchema<AssetWearableGender>;
101
- const validate: ValidateFunction<AssetWearableGender>;
102
- }
103
-
104
74
  /**
105
75
  * AuthChain is an array of elements used to create and verify signatures
106
76
  * and ephemeral keys.
@@ -1638,7 +1608,7 @@ declare namespace sdk {
1638
1608
  UPDATE,
1639
1609
  Update,
1640
1610
  ProjectType,
1641
- AssetJson
1611
+ WearableJson
1642
1612
  }
1643
1613
  }
1644
1614
  export { sdk }
@@ -1858,6 +1828,21 @@ export declare namespace WearableGender {
1858
1828
  */
1859
1829
  export declare type WearableId = string;
1860
1830
 
1831
+ /**
1832
+ * @alpha
1833
+ */
1834
+ declare type WearableJson = Pick<Wearable, 'data' | 'name' | 'description'> & {
1835
+ rarity: Rarity;
1836
+ };
1837
+
1838
+ /**
1839
+ * @alpha
1840
+ */
1841
+ declare namespace WearableJson {
1842
+ const schema: JSONSchema<WearableJson>;
1843
+ const validate: ValidateFunction<WearableJson>;
1844
+ }
1845
+
1861
1846
  /** @alpha */
1862
1847
  export declare type WearableRepresentation = {
1863
1848
  bodyShapes: BodyShape[];
@@ -1,3 +1,3 @@
1
1
  export * from './type';
2
- export * from './asset-json';
2
+ export * from './wearable-json';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/project/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/project/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,iBAAiB,CAAA"}
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./type"), exports);
18
- __exportStar(require("./asset-json"), exports);
18
+ __exportStar(require("./wearable-json"), exports);
19
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sdk/project/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,+CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sdk/project/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,kDAA+B"}
@@ -0,0 +1,17 @@
1
+ import { Rarity } from '../../dapps/rarity';
2
+ import { Wearable } from '../../platform/item/wearable/wearable';
3
+ import { JSONSchema, ValidateFunction } from '../../validation';
4
+ /**
5
+ * @alpha
6
+ */
7
+ export declare type WearableJson = Pick<Wearable, 'data' | 'name' | 'description'> & {
8
+ rarity: Rarity;
9
+ };
10
+ /**
11
+ * @alpha
12
+ */
13
+ export declare namespace WearableJson {
14
+ const schema: JSONSchema<WearableJson>;
15
+ const validate: ValidateFunction<WearableJson>;
16
+ }
17
+ //# sourceMappingURL=wearable-json.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wearable-json.d.ts","sourceRoot":"","sources":["../../../src/sdk/project/wearable-json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAA;AAChE,OAAO,EAEL,UAAU,EACV,gBAAgB,EACjB,MAAM,kBAAkB,CAAA;AAEzB;;GAEG;AACH,oBAAY,YAAY,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,GAAG;IAC3E,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;GAEG;AACH,yBAAiB,YAAY,CAAC;IACrB,MAAM,MAAM,EAAE,UAAU,CAAC,YAAY,CA2C3C,CAAA;IAEM,MAAM,QAAQ,EAAE,gBAAgB,CAAC,YAAY,CACrB,CAAA;CAChC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WearableJson = void 0;
4
+ const rarity_1 = require("../../dapps/rarity");
5
+ const wearable_category_1 = require("../../dapps/wearable-category");
6
+ const representation_1 = require("../../platform/item/wearable/representation");
7
+ const validation_1 = require("../../validation");
8
+ /**
9
+ * @alpha
10
+ */
11
+ var WearableJson;
12
+ (function (WearableJson) {
13
+ WearableJson.schema = {
14
+ type: 'object',
15
+ properties: {
16
+ description: {
17
+ type: 'string'
18
+ },
19
+ rarity: Object.assign(Object.assign({}, rarity_1.Rarity.schema), { nullable: true }),
20
+ name: {
21
+ type: 'string'
22
+ },
23
+ data: {
24
+ type: 'object',
25
+ properties: {
26
+ replaces: {
27
+ type: 'array',
28
+ items: wearable_category_1.WearableCategory.schema
29
+ },
30
+ hides: {
31
+ type: 'array',
32
+ items: wearable_category_1.WearableCategory.schema
33
+ },
34
+ tags: {
35
+ type: 'array',
36
+ items: {
37
+ type: 'string',
38
+ minLength: 1
39
+ }
40
+ },
41
+ representations: {
42
+ type: 'array',
43
+ items: representation_1.WearableRepresentation.schema,
44
+ minItems: 1
45
+ },
46
+ category: wearable_category_1.WearableCategory.schema
47
+ },
48
+ required: ['replaces', 'hides', 'tags', 'representations', 'category']
49
+ }
50
+ },
51
+ additionalProperties: true,
52
+ required: ['description', 'name', 'data']
53
+ };
54
+ WearableJson.validate = (0, validation_1.generateLazyValidator)(WearableJson.schema);
55
+ })(WearableJson = exports.WearableJson || (exports.WearableJson = {}));
56
+ //# sourceMappingURL=wearable-json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wearable-json.js","sourceRoot":"","sources":["../../../src/sdk/project/wearable-json.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAC3C,qEAAgE;AAChE,gFAAoF;AAEpF,iDAIyB;AASzB;;GAEG;AACH,IAAiB,YAAY,CAgD5B;AAhDD,WAAiB,YAAY;IACd,mBAAM,GAA6B;QAC9C,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;YACD,MAAM,kCACD,eAAM,CAAC,MAAM,KAChB,QAAQ,EAAE,IAAI,GACf;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;aACf;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,QAAQ,EAAE;wBACR,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,oCAAgB,CAAC,MAAM;qBAC/B;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,oCAAgB,CAAC,MAAM;qBAC/B;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;4BACd,SAAS,EAAE,CAAC;yBACb;qBACF;oBACD,eAAe,EAAE;wBACf,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,uCAAsB,CAAC,MAAM;wBACpC,QAAQ,EAAE,CAAC;qBACZ;oBACD,QAAQ,EAAE,oCAAgB,CAAC,MAAM;iBAClC;gBACD,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,CAAC;aACvE;SACF;QACD,oBAAoB,EAAE,IAAI;QAC1B,QAAQ,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC;KAC1C,CAAA;IAEY,qBAAQ,GACnB,IAAA,kCAAqB,EAAC,aAAA,MAAM,CAAC,CAAA;AACjC,CAAC,EAhDgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAgD5B"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.13.1",
2
+ "version": "5.14.0",
3
3
  "name": "@dcl/schemas",
4
4
  "main": "./dist/index.js",
5
5
  "typings": "./dist/index.d.ts",
@@ -32,5 +32,5 @@
32
32
  "files": [
33
33
  "dist"
34
34
  ],
35
- "commit": "04406a6a240f03a6e78909769056b39d154dfda6"
35
+ "commit": "a539bbf2aee8a89f5de75997c090c171df066a71"
36
36
  }
@@ -1,22 +0,0 @@
1
- import { WearableCategory } from './../../dapps/wearable-category';
2
- import { JSONSchema, ValidateFunction } from '../../validation';
3
- import { Rarity } from './../../dapps/rarity';
4
- import { AssetWearableGender } from './asset-wearable-gender';
5
- /** @alpha */
6
- export declare type AssetJson = {
7
- id: string;
8
- assetType: string;
9
- name: string;
10
- description: string;
11
- thumbnail: string;
12
- model: string;
13
- category: WearableCategory;
14
- rarity: Rarity;
15
- bodyShape: AssetWearableGender;
16
- };
17
- /** @alpha */
18
- export declare namespace AssetJson {
19
- const schema: JSONSchema<AssetJson>;
20
- const validate: ValidateFunction<AssetJson>;
21
- }
22
- //# sourceMappingURL=asset-json.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asset-json.d.ts","sourceRoot":"","sources":["../../../src/sdk/project/asset-json.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAEL,UAAU,EACV,gBAAgB,EACjB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAE7D,aAAa;AACb,oBAAY,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IAEjB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IAEnB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IAEb,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,mBAAmB,CAAA;CAC/B,CAAA;AAED,aAAa;AACb,yBAAiB,SAAS,CAAC;IAClB,MAAM,MAAM,EAAE,UAAU,CAAC,SAAS,CA+BxC,CAAA;IAEM,MAAM,QAAQ,EAAE,gBAAgB,CAAC,SAAS,CAClB,CAAA;CAChC"}
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AssetJson = void 0;
4
- const type_1 = require("./../project/type");
5
- const wearable_category_1 = require("./../../dapps/wearable-category");
6
- const validation_1 = require("../../validation");
7
- const rarity_1 = require("./../../dapps/rarity");
8
- const asset_wearable_gender_1 = require("./asset-wearable-gender");
9
- /** @alpha */
10
- var AssetJson;
11
- (function (AssetJson) {
12
- AssetJson.schema = {
13
- type: 'object',
14
- properties: {
15
- id: {
16
- description: 'The ID that you will replace in your collection. Also this ID is used for develop purpose, to identify in the kernel.',
17
- type: 'string'
18
- },
19
- assetType: type_1.ProjectType.schema,
20
- name: {
21
- description: '',
22
- type: 'string'
23
- },
24
- description: {
25
- description: 'A short text that describes the wearable.`',
26
- type: 'string'
27
- },
28
- thumbnail: {
29
- description: 'A preview image of your item.',
30
- type: 'string'
31
- },
32
- model: {
33
- description: 'The main file that should be loaded as wearable.',
34
- type: 'string'
35
- },
36
- category: wearable_category_1.WearableCategory.schema,
37
- rarity: rarity_1.Rarity.schema,
38
- bodyShape: asset_wearable_gender_1.AssetWearableGender.schema
39
- },
40
- additionalProperties: false,
41
- required: ['category', 'rarity', 'bodyShape', 'thumbnail', 'model']
42
- };
43
- AssetJson.validate = (0, validation_1.generateLazyValidator)(AssetJson.schema);
44
- })(AssetJson = exports.AssetJson || (exports.AssetJson = {}));
45
- //# sourceMappingURL=asset-json.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asset-json.js","sourceRoot":"","sources":["../../../src/sdk/project/asset-json.ts"],"names":[],"mappings":";;;AAAA,4CAA+C;AAC/C,uEAAkE;AAClE,iDAIyB;AACzB,iDAA6C;AAC7C,mEAA6D;AAkB7D,aAAa;AACb,IAAiB,SAAS,CAoCzB;AApCD,WAAiB,SAAS;IACX,gBAAM,GAA0B;QAC3C,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,WAAW,EACT,uHAAuH;gBACzH,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE,kBAAW,CAAC,MAAM;YAC7B,IAAI,EAAE;gBACJ,WAAW,EAAE,EAAE;gBACf,IAAI,EAAE,QAAQ;aACf;YACD,WAAW,EAAE;gBACX,WAAW,EAAE,4CAA4C;gBACzD,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,WAAW,EAAE,+BAA+B;gBAC5C,IAAI,EAAE,QAAQ;aACf;YACD,KAAK,EAAE;gBACL,WAAW,EAAE,kDAAkD;gBAC/D,IAAI,EAAE,QAAQ;aACf;YACD,QAAQ,EAAE,oCAAgB,CAAC,MAAM;YACjC,MAAM,EAAE,eAAM,CAAC,MAAM;YACrB,SAAS,EAAE,2CAAmB,CAAC,MAAM;SACtC;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC;KACpE,CAAA;IAEY,kBAAQ,GACnB,IAAA,kCAAqB,EAAC,UAAA,MAAM,CAAC,CAAA;AACjC,CAAC,EApCgB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAoCzB"}
@@ -1,11 +0,0 @@
1
- import { JSONSchema, ValidateFunction } from '../../validation';
2
- export declare enum AssetWearableGender {
3
- MALE = "male",
4
- FEMALE = "female",
5
- BOTH = "both"
6
- }
7
- export declare namespace AssetWearableGender {
8
- const schema: JSONSchema<AssetWearableGender>;
9
- const validate: ValidateFunction<AssetWearableGender>;
10
- }
11
- //# sourceMappingURL=asset-wearable-gender.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asset-wearable-gender.d.ts","sourceRoot":"","sources":["../../../src/sdk/project/asset-wearable-gender.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,gBAAgB,EACjB,MAAM,kBAAkB,CAAA;AAEzB,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,yBAAiB,mBAAmB,CAAC;IAC5B,MAAM,MAAM,EAAE,UAAU,CAAC,mBAAmB,CAGlD,CAAA;IAEM,MAAM,QAAQ,EAAE,gBAAgB,CAAC,mBAAmB,CAC5B,CAAA;CAChC"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AssetWearableGender = void 0;
4
- const validation_1 = require("../../validation");
5
- var AssetWearableGender;
6
- (function (AssetWearableGender) {
7
- AssetWearableGender["MALE"] = "male";
8
- AssetWearableGender["FEMALE"] = "female";
9
- AssetWearableGender["BOTH"] = "both";
10
- })(AssetWearableGender = exports.AssetWearableGender || (exports.AssetWearableGender = {}));
11
- (function (AssetWearableGender) {
12
- AssetWearableGender.schema = {
13
- type: 'string',
14
- enum: Object.values(AssetWearableGender)
15
- };
16
- AssetWearableGender.validate = (0, validation_1.generateLazyValidator)(AssetWearableGender.schema);
17
- })(AssetWearableGender = exports.AssetWearableGender || (exports.AssetWearableGender = {}));
18
- //# sourceMappingURL=asset-wearable-gender.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asset-wearable-gender.js","sourceRoot":"","sources":["../../../src/sdk/project/asset-wearable-gender.ts"],"names":[],"mappings":";;;AAAA,iDAIyB;AAEzB,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,wCAAiB,CAAA;IACjB,oCAAa,CAAA;AACf,CAAC,EAJW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAI9B;AAED,WAAiB,mBAAmB;IACrB,0BAAM,GAAoC;QACrD,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC;KACzC,CAAA;IAEY,4BAAQ,GACnB,IAAA,kCAAqB,EAAC,oBAAA,MAAM,CAAC,CAAA;AACjC,CAAC,EARgB,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAQnC"}