@minecraft/server-net 1.0.0-beta.1.26.30-preview.27 → 1.0.0-beta.1.26.30-preview.30

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.
Files changed (2) hide show
  1. package/index.d.ts +16 -2
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -563,7 +563,7 @@ export class HttpRequest {
563
563
  * This property can be edited in early-execution mode.
564
564
  *
565
565
  */
566
- body: string;
566
+ body: minecraftserver.ISerializable | string;
567
567
  /**
568
568
  * @remarks
569
569
  * A collection of HTTP headers to add to the outbound request.
@@ -615,7 +615,7 @@ export class HttpRequest {
615
615
  * This function can be called in early-execution mode.
616
616
  *
617
617
  */
618
- setBody(body: string): HttpRequest;
618
+ setBody(body: minecraftserver.ISerializable | string): HttpRequest;
619
619
  /**
620
620
  * @remarks
621
621
  * Replaces and applies a set of HTTP Headers for the request.
@@ -679,6 +679,15 @@ export class HttpResponse {
679
679
  *
680
680
  */
681
681
  readonly status: number;
682
+ /**
683
+ * @remarks
684
+ * This function can't be called in restricted-execution mode.
685
+ *
686
+ * @throws This function can throw errors.
687
+ *
688
+ * {@link SerializableParseError}
689
+ */
690
+ deserialize(identifier: string): minecraftserver.ISerializable;
682
691
  }
683
692
 
684
693
  export class MessageAfterEventSignal {
@@ -1043,6 +1052,11 @@ export class RequestBodyTooLargeError extends Error {
1043
1052
  readonly providedBytes: number;
1044
1053
  }
1045
1054
 
1055
+ // @ts-ignore Class inheritance allowed for native defined classes
1056
+ export class SerializableParseError extends Error {
1057
+ private constructor();
1058
+ }
1059
+
1046
1060
  /**
1047
1061
  * An error thrown when secure URI scheme is required but a
1048
1062
  * non-secure URI was provided.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-net",
3
- "version": "1.0.0-beta.1.26.30-preview.27",
3
+ "version": "1.0.0-beta.1.26.30-preview.30",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -15,7 +15,7 @@
15
15
  "peerDependencies": {
16
16
  "@minecraft/common": "^1.0.0",
17
17
  "@minecraft/server": "^1.17.0 || ^2.0.0",
18
- "@minecraft/server-admin": "^1.0.0-beta.1.26.30-preview.27"
18
+ "@minecraft/server-admin": "^1.0.0-beta.1.26.30-preview.30"
19
19
  },
20
20
  "license": "MIT"
21
21
  }