@minecraft/server-net 1.0.0-beta.1.26.10-preview.24 → 1.0.0-beta.1.26.2-stable
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/README.md +8 -8
- package/index.d.ts +3 -100
- package/package.json +20 -20
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# `@minecraft/server-net`
|
|
2
|
-
|
|
3
|
-
The `@minecraft/server-net` module contains types for executing HTTP-based requests. This module can only be used on Bedrock Dedicated Server. These APIs do not function within the Minecraft game client or within Minecraft Realms.
|
|
4
|
-
|
|
5
|
-
## **NOTE: This version of this module is still in pre-release. It may change or it may be removed in future releases.**
|
|
6
|
-
|
|
7
|
-
See full documentation for this module here:
|
|
8
|
-
|
|
1
|
+
# `@minecraft/server-net`
|
|
2
|
+
|
|
3
|
+
The `@minecraft/server-net` module contains types for executing HTTP-based requests. This module can only be used on Bedrock Dedicated Server. These APIs do not function within the Minecraft game client or within Minecraft Realms.
|
|
4
|
+
|
|
5
|
+
## **NOTE: This version of this module is still in pre-release. It may change or it may be removed in future releases.**
|
|
6
|
+
|
|
7
|
+
See full documentation for this module here:
|
|
8
|
+
|
|
9
9
|
https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server-net/minecraft-server-net
|
package/index.d.ts
CHANGED
|
@@ -51,14 +51,6 @@ export enum HttpRequestMethod {
|
|
|
51
51
|
*
|
|
52
52
|
*/
|
|
53
53
|
Head = 'Head',
|
|
54
|
-
/**
|
|
55
|
-
* @remarks
|
|
56
|
-
* Represents the method for an HTTP PATCH request. PATCH
|
|
57
|
-
* requests are commonly used to apply partial modifications to
|
|
58
|
-
* a resource.
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
61
|
-
Patch = 'Patch',
|
|
62
54
|
/**
|
|
63
55
|
* @remarks
|
|
64
56
|
* Represents the method for an HTTP POST request. POST
|
|
@@ -117,7 +109,7 @@ export enum PacketId {
|
|
|
117
109
|
ChunkRadiusUpdatedPacket = 'ChunkRadiusUpdatedPacket',
|
|
118
110
|
ClientboundCloseFormPacket = 'ClientboundCloseFormPacket',
|
|
119
111
|
ClientboundControlSchemeSetPacket = 'ClientboundControlSchemeSetPacket',
|
|
120
|
-
|
|
112
|
+
ClientboundDataDrivenUICloseAllScreensPacket = 'ClientboundDataDrivenUICloseAllScreensPacket',
|
|
121
113
|
ClientboundDataDrivenUIReloadPacket = 'ClientboundDataDrivenUIReloadPacket',
|
|
122
114
|
ClientboundDataDrivenUIShowScreenPacket = 'ClientboundDataDrivenUIShowScreenPacket',
|
|
123
115
|
ClientboundDataStorePacket = 'ClientboundDataStorePacket',
|
|
@@ -178,7 +170,6 @@ export enum PacketId {
|
|
|
178
170
|
LevelEventGenericPacket = 'LevelEventGenericPacket',
|
|
179
171
|
LevelEventPacket = 'LevelEventPacket',
|
|
180
172
|
LevelSoundEventPacket = 'LevelSoundEventPacket',
|
|
181
|
-
LocatorBarPacket = 'LocatorBarPacket',
|
|
182
173
|
LoginPacket = 'LoginPacket',
|
|
183
174
|
MapCreateLockedCopyPacket = 'MapCreateLockedCopyPacket',
|
|
184
175
|
MapInfoRequestPacket = 'MapInfoRequestPacket',
|
|
@@ -201,7 +192,6 @@ export enum PacketId {
|
|
|
201
192
|
OnScreenTextureAnimationPacket = 'OnScreenTextureAnimationPacket',
|
|
202
193
|
OpenSignPacket = 'OpenSignPacket',
|
|
203
194
|
PacketViolationWarningPacket = 'PacketViolationWarningPacket',
|
|
204
|
-
PartyChangedPacket = 'PartyChangedPacket',
|
|
205
195
|
PhotoTransferPacket = 'PhotoTransferPacket',
|
|
206
196
|
PlayerActionPacket = 'PlayerActionPacket',
|
|
207
197
|
PlayerArmorDamagePacket = 'PlayerArmorDamagePacket',
|
|
@@ -233,11 +223,9 @@ export enum PacketId {
|
|
|
233
223
|
ResourcePackClientResponsePacket = 'ResourcePackClientResponsePacket',
|
|
234
224
|
ResourcePackDataInfoPacket = 'ResourcePackDataInfoPacket',
|
|
235
225
|
ResourcePacksInfoPacket = 'ResourcePacksInfoPacket',
|
|
236
|
-
ResourcePacksReadyForValidationPacket = 'ResourcePacksReadyForValidationPacket',
|
|
237
226
|
ResourcePackStackPacket = 'ResourcePackStackPacket',
|
|
238
227
|
RespawnPacket = 'RespawnPacket',
|
|
239
228
|
ScriptMessagePacket = 'ScriptMessagePacket',
|
|
240
|
-
ServerboundDataDrivenScreenClosedPacket = 'ServerboundDataDrivenScreenClosedPacket',
|
|
241
229
|
ServerboundDataStorePacket = 'ServerboundDataStorePacket',
|
|
242
230
|
ServerboundDiagnosticsPacket = 'ServerboundDiagnosticsPacket',
|
|
243
231
|
ServerboundLoadingScreenPacket = 'ServerboundLoadingScreenPacket',
|
|
@@ -282,7 +270,6 @@ export enum PacketId {
|
|
|
282
270
|
SubChunkRequestPacket = 'SubChunkRequestPacket',
|
|
283
271
|
SubClientLoginPacket = 'SubClientLoginPacket',
|
|
284
272
|
SyncActorPropertyPacket = 'SyncActorPropertyPacket',
|
|
285
|
-
SyncWorldClocksPacket = 'SyncWorldClocksPacket',
|
|
286
273
|
TakeItemActorPacket = 'TakeItemActorPacket',
|
|
287
274
|
TextPacket = 'TextPacket',
|
|
288
275
|
TickingAreasLoadStatusPacket = 'TickingAreasLoadStatusPacket',
|
|
@@ -716,90 +703,6 @@ export interface PacketEventOptions {
|
|
|
716
703
|
monitoredPacketIds?: PacketId[];
|
|
717
704
|
}
|
|
718
705
|
|
|
719
|
-
/**
|
|
720
|
-
* An error thrown when an HTTP request body exceeds the
|
|
721
|
-
* configured size limit.
|
|
722
|
-
*/
|
|
723
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
724
|
-
export class HttpRequestBodyTooLargeError extends Error {
|
|
725
|
-
private constructor();
|
|
726
|
-
/**
|
|
727
|
-
* @remarks
|
|
728
|
-
* Configured maximum body size in bytes.
|
|
729
|
-
*
|
|
730
|
-
* This property can be read in early-execution mode.
|
|
731
|
-
*
|
|
732
|
-
*/
|
|
733
|
-
readonly maxBytes: number;
|
|
734
|
-
/**
|
|
735
|
-
* @remarks
|
|
736
|
-
* Request body size in bytes.
|
|
737
|
-
*
|
|
738
|
-
* This property can be read in early-execution mode.
|
|
739
|
-
*
|
|
740
|
-
*/
|
|
741
|
-
readonly providedBytes: number;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
/**
|
|
745
|
-
* An error thrown when the maximum number of concurrent HTTP
|
|
746
|
-
* requests has been reached.
|
|
747
|
-
*/
|
|
748
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
749
|
-
export class HttpRequestLimitExceededError extends Error {
|
|
750
|
-
private constructor();
|
|
751
|
-
/**
|
|
752
|
-
* @remarks
|
|
753
|
-
* Number of requests already in flight when rejected.
|
|
754
|
-
*
|
|
755
|
-
* This property can be read in early-execution mode.
|
|
756
|
-
*
|
|
757
|
-
*/
|
|
758
|
-
readonly inFlightRequests: number;
|
|
759
|
-
/**
|
|
760
|
-
* @remarks
|
|
761
|
-
* Configured maximum concurrent HTTP requests.
|
|
762
|
-
*
|
|
763
|
-
* This property can be read in early-execution mode.
|
|
764
|
-
*
|
|
765
|
-
*/
|
|
766
|
-
readonly maxConcurrentRequests: number;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
/**
|
|
770
|
-
* An error thrown when an HTTP request targets a URI that is
|
|
771
|
-
* not in the configured allow list.
|
|
772
|
-
*/
|
|
773
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
774
|
-
export class HttpRequestNotAllowedError extends Error {
|
|
775
|
-
private constructor();
|
|
776
|
-
/**
|
|
777
|
-
* @remarks
|
|
778
|
-
* URI that was rejected because it is not allowed.
|
|
779
|
-
*
|
|
780
|
-
* This property can be read in early-execution mode.
|
|
781
|
-
*
|
|
782
|
-
*/
|
|
783
|
-
readonly uri: string;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
/**
|
|
787
|
-
* An error thrown when HTTPS is required but a non-HTTPS URI
|
|
788
|
-
* was provided.
|
|
789
|
-
*/
|
|
790
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
791
|
-
export class HttpsOnlyError extends Error {
|
|
792
|
-
private constructor();
|
|
793
|
-
/**
|
|
794
|
-
* @remarks
|
|
795
|
-
* URI that was rejected for not using HTTPS.
|
|
796
|
-
*
|
|
797
|
-
* This property can be read in early-execution mode.
|
|
798
|
-
*
|
|
799
|
-
*/
|
|
800
|
-
readonly uri: string;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
706
|
/**
|
|
804
707
|
* An error thrown when a platform-level HTTP error occurs.
|
|
805
708
|
* Information provided in this class may be useful for
|
|
@@ -816,7 +719,7 @@ export class InternalHttpRequestError extends Error {
|
|
|
816
719
|
* This property can be read in early-execution mode.
|
|
817
720
|
*
|
|
818
721
|
*/
|
|
819
|
-
|
|
722
|
+
code: number;
|
|
820
723
|
/**
|
|
821
724
|
* @remarks
|
|
822
725
|
* The platform-provided message for the error.
|
|
@@ -824,7 +727,7 @@ export class InternalHttpRequestError extends Error {
|
|
|
824
727
|
* This property can be read in early-execution mode.
|
|
825
728
|
*
|
|
826
729
|
*/
|
|
827
|
-
|
|
730
|
+
message: string;
|
|
828
731
|
}
|
|
829
732
|
|
|
830
733
|
/**
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@minecraft/server-net",
|
|
3
|
-
"version": "1.0.0-beta.1.26.
|
|
4
|
-
"description": "",
|
|
5
|
-
"contributors": [
|
|
6
|
-
{
|
|
7
|
-
"name": "Jake Shirley",
|
|
8
|
-
"email": "jake@xbox.com"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"name": "Mike Ammerlaan",
|
|
12
|
-
"email": "mikeam@microsoft.com"
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"peerDependencies": {
|
|
16
|
-
"@minecraft/common": "^1.0.0",
|
|
17
|
-
"@minecraft/server": "^1.17.0 || ^2.0.0",
|
|
18
|
-
"@minecraft/server-admin": "^1.0.0-beta.1.26.
|
|
19
|
-
},
|
|
20
|
-
"license": "MIT"
|
|
1
|
+
{
|
|
2
|
+
"name": "@minecraft/server-net",
|
|
3
|
+
"version": "1.0.0-beta.1.26.2-stable",
|
|
4
|
+
"description": "",
|
|
5
|
+
"contributors": [
|
|
6
|
+
{
|
|
7
|
+
"name": "Jake Shirley",
|
|
8
|
+
"email": "jake@xbox.com"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "Mike Ammerlaan",
|
|
12
|
+
"email": "mikeam@microsoft.com"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"@minecraft/common": "^1.0.0",
|
|
17
|
+
"@minecraft/server": "^1.17.0 || ^2.0.0",
|
|
18
|
+
"@minecraft/server-admin": "^1.0.0-beta.1.26.2-stable"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT"
|
|
21
21
|
}
|