@dcl/playground-assets 7.1.4 → 7.1.5

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcl/sdk",
3
3
  "description": "",
4
- "version": "7.1.4",
4
+ "version": "7.1.5",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
7
  "@dcl/ecs": "file:../ecs",
@@ -30,5 +30,5 @@
30
30
  },
31
31
  "types": "./index.d.ts",
32
32
  "typings": "./index.d.ts",
33
- "commit": "3f2952c5e02d012a18b91605485925bc3dd6f756"
33
+ "commit": "f6a337a9f93f7738174df9448d5a735ebc9468a1"
34
34
  }
@@ -2166,7 +2166,7 @@ export declare type JsonPrimitive = string | number | boolean | null;
2166
2166
  */
2167
2167
  export declare type JsonSchemaExtended = {
2168
2168
  type: 'object' | 'number' | 'integer' | 'string' | 'array' | 'boolean';
2169
- serializationType: 'boolean' | 'enum-int' | 'enum-string' | 'int8' | 'int16' | 'int32' | 'int64' | 'float32' | 'float64' | 'vector3' | 'color3' | 'quaternion' | 'color4' | 'map' | 'optional' | 'entity' | 'array' | 'utf8-string' | 'protocol-buffer' | 'transform' | 'unknown';
2169
+ serializationType: 'boolean' | 'enum-int' | 'enum-string' | 'int8' | 'int16' | 'int32' | 'int64' | 'float32' | 'float64' | 'vector3' | 'color3' | 'quaternion' | 'color4' | 'map' | 'optional' | 'entity' | 'array' | 'utf8-string' | 'protocol-buffer' | 'transform' | 'one-of' | 'unknown';
2170
2170
  } & JsonMap;
2171
2171
 
2172
2172
  /**
@@ -5113,6 +5113,11 @@ export declare namespace Schemas {
5113
5113
  const Map: <T extends Spec>(spec: T, defaultValue?: Partial<MapResult<T>> | undefined) => ISchema<MapResult<T>>;
5114
5114
  /** @public */
5115
5115
  const Optional: <T>(spec: ISchema<T>) => ISchema<T | undefined>;
5116
+ /** @public */
5117
+ const OneOf: <T extends Spec>(specs: T) => ISchema<{ [K in keyof T]: {
5118
+ readonly $case: K;
5119
+ readonly value: ReturnType<T[K]["deserialize"]>;
5120
+ }; }[keyof T]>;
5116
5121
  /**
5117
5122
  * @public Create an ISchema object from the json-schema
5118
5123
  * @param jsonSchema
@@ -18755,7 +18755,7 @@
18755
18755
  },
18756
18756
  {
18757
18757
  "kind": "Content",
18758
- "text": "{\n type: 'object' | 'number' | 'integer' | 'string' | 'array' | 'boolean';\n serializationType: 'boolean' | 'enum-int' | 'enum-string' | 'int8' | 'int16' | 'int32' | 'int64' | 'float32' | 'float64' | 'vector3' | 'color3' | 'quaternion' | 'color4' | 'map' | 'optional' | 'entity' | 'array' | 'utf8-string' | 'protocol-buffer' | 'transform' | 'unknown';\n} & "
18758
+ "text": "{\n type: 'object' | 'number' | 'integer' | 'string' | 'array' | 'boolean';\n serializationType: 'boolean' | 'enum-int' | 'enum-string' | 'int8' | 'int16' | 'int32' | 'int64' | 'float32' | 'float64' | 'vector3' | 'color3' | 'quaternion' | 'color4' | 'map' | 'optional' | 'entity' | 'array' | 'utf8-string' | 'protocol-buffer' | 'transform' | 'one-of' | 'unknown';\n} & "
18759
18759
  },
18760
18760
  {
18761
18761
  "kind": "Reference",
@@ -44939,6 +44939,55 @@
44939
44939
  "endIndex": 3
44940
44940
  }
44941
44941
  },
44942
+ {
44943
+ "kind": "Variable",
44944
+ "canonicalReference": "@dcl/playground-assets!Schemas.OneOf:var",
44945
+ "docComment": "/**\n * @public\n */\n",
44946
+ "excerptTokens": [
44947
+ {
44948
+ "kind": "Content",
44949
+ "text": "OneOf: "
44950
+ },
44951
+ {
44952
+ "kind": "Content",
44953
+ "text": "<T extends import(\"./Map\")."
44954
+ },
44955
+ {
44956
+ "kind": "Reference",
44957
+ "text": "Spec",
44958
+ "canonicalReference": "@dcl/playground-assets!Spec:interface"
44959
+ },
44960
+ {
44961
+ "kind": "Content",
44962
+ "text": ">(specs: T) => "
44963
+ },
44964
+ {
44965
+ "kind": "Reference",
44966
+ "text": "ISchema",
44967
+ "canonicalReference": "@dcl/playground-assets!ISchema:interface"
44968
+ },
44969
+ {
44970
+ "kind": "Content",
44971
+ "text": "<{ [K in keyof T]: {\n readonly $case: K;\n readonly value: "
44972
+ },
44973
+ {
44974
+ "kind": "Reference",
44975
+ "text": "ReturnType",
44976
+ "canonicalReference": "!ReturnType:type"
44977
+ },
44978
+ {
44979
+ "kind": "Content",
44980
+ "text": "<T[K][\"deserialize\"]>;\n }; }[keyof T]>"
44981
+ }
44982
+ ],
44983
+ "isReadonly": true,
44984
+ "releaseTag": "Public",
44985
+ "name": "OneOf",
44986
+ "variableTypeTokenRange": {
44987
+ "startIndex": 1,
44988
+ "endIndex": 8
44989
+ }
44990
+ },
44942
44991
  {
44943
44992
  "kind": "Variable",
44944
44993
  "canonicalReference": "@dcl/playground-assets!Schemas.Optional:var",
@@ -1238,7 +1238,7 @@ export type JsonPrimitive = string | number | boolean | null;
1238
1238
  // @public
1239
1239
  export type JsonSchemaExtended = {
1240
1240
  type: 'object' | 'number' | 'integer' | 'string' | 'array' | 'boolean';
1241
- serializationType: 'boolean' | 'enum-int' | 'enum-string' | 'int8' | 'int16' | 'int32' | 'int64' | 'float32' | 'float64' | 'vector3' | 'color3' | 'quaternion' | 'color4' | 'map' | 'optional' | 'entity' | 'array' | 'utf8-string' | 'protocol-buffer' | 'transform' | 'unknown';
1241
+ serializationType: 'boolean' | 'enum-int' | 'enum-string' | 'int8' | 'int16' | 'int32' | 'int64' | 'float32' | 'float64' | 'vector3' | 'color3' | 'quaternion' | 'color4' | 'map' | 'optional' | 'entity' | 'array' | 'utf8-string' | 'protocol-buffer' | 'transform' | 'one-of' | 'unknown';
1242
1242
  } & JsonMap;
1243
1243
 
1244
1244
  // Warning: (tsdoc-undefined-tag) The TSDoc tag "@hidden" is not defined in this configuration
@@ -2606,6 +2606,11 @@ export namespace Schemas {
2606
2606
  Map: <T extends Spec>(spec: T, defaultValue?: Partial<MapResult<T>> | undefined) => ISchema<MapResult<T>>;
2607
2607
  const // (undocumented)
2608
2608
  Optional: <T>(spec: ISchema<T>) => ISchema<T | undefined>;
2609
+ const // (undocumented)
2610
+ OneOf: <T extends Spec>(specs: T) => ISchema<{ [K in keyof T]: {
2611
+ readonly $case: K;
2612
+ readonly value: ReturnType<T[K]["deserialize"]>;
2613
+ }; }[keyof T]>;
2609
2614
  const // Warning: (tsdoc-param-tag-missing-hyphen) The @param block should be followed by a parameter name and then a hyphen
2610
2615
  fromJson: (json: JsonSchemaExtended) => ISchema<unknown>;
2611
2616
  const mutateNestedValues: (jsonSchema: JsonSchemaExtended, value: unknown, mutateFn: (value: unknown, valueType: JsonSchemaExtended) => {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dcl/playground-assets",
3
3
  "description": "",
4
- "version": "7.1.4",
4
+ "version": "7.1.5",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
- "@dcl/js-runtime": "7.1.4",
8
- "@dcl/sdk": "7.1.4"
7
+ "@dcl/js-runtime": "7.1.5",
8
+ "@dcl/sdk": "7.1.5"
9
9
  },
10
10
  "devDependencies": {
11
11
  "@microsoft/api-extractor": "^7.33.8"
@@ -28,5 +28,5 @@
28
28
  },
29
29
  "types": "./dist/index.d.ts",
30
30
  "typings": "./dist/index.d.ts",
31
- "commit": "3f2952c5e02d012a18b91605485925bc3dd6f756"
31
+ "commit": "f6a337a9f93f7738174df9448d5a735ebc9468a1"
32
32
  }