@minecraft/server-net 1.0.0-beta.1.26.10-preview.25 → 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 -101
- 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
|
|
@@ -115,10 +107,9 @@ export enum PacketId {
|
|
|
115
107
|
ChangeDimensionPacket = 'ChangeDimensionPacket',
|
|
116
108
|
ChangeMobPropertyPacket = 'ChangeMobPropertyPacket',
|
|
117
109
|
ChunkRadiusUpdatedPacket = 'ChunkRadiusUpdatedPacket',
|
|
118
|
-
ClientboundAttributeLayerSyncPacket = 'ClientboundAttributeLayerSyncPacket',
|
|
119
110
|
ClientboundCloseFormPacket = 'ClientboundCloseFormPacket',
|
|
120
111
|
ClientboundControlSchemeSetPacket = 'ClientboundControlSchemeSetPacket',
|
|
121
|
-
|
|
112
|
+
ClientboundDataDrivenUICloseAllScreensPacket = 'ClientboundDataDrivenUICloseAllScreensPacket',
|
|
122
113
|
ClientboundDataDrivenUIReloadPacket = 'ClientboundDataDrivenUIReloadPacket',
|
|
123
114
|
ClientboundDataDrivenUIShowScreenPacket = 'ClientboundDataDrivenUIShowScreenPacket',
|
|
124
115
|
ClientboundDataStorePacket = 'ClientboundDataStorePacket',
|
|
@@ -179,7 +170,6 @@ export enum PacketId {
|
|
|
179
170
|
LevelEventGenericPacket = 'LevelEventGenericPacket',
|
|
180
171
|
LevelEventPacket = 'LevelEventPacket',
|
|
181
172
|
LevelSoundEventPacket = 'LevelSoundEventPacket',
|
|
182
|
-
LocatorBarPacket = 'LocatorBarPacket',
|
|
183
173
|
LoginPacket = 'LoginPacket',
|
|
184
174
|
MapCreateLockedCopyPacket = 'MapCreateLockedCopyPacket',
|
|
185
175
|
MapInfoRequestPacket = 'MapInfoRequestPacket',
|
|
@@ -202,7 +192,6 @@ export enum PacketId {
|
|
|
202
192
|
OnScreenTextureAnimationPacket = 'OnScreenTextureAnimationPacket',
|
|
203
193
|
OpenSignPacket = 'OpenSignPacket',
|
|
204
194
|
PacketViolationWarningPacket = 'PacketViolationWarningPacket',
|
|
205
|
-
PartyChangedPacket = 'PartyChangedPacket',
|
|
206
195
|
PhotoTransferPacket = 'PhotoTransferPacket',
|
|
207
196
|
PlayerActionPacket = 'PlayerActionPacket',
|
|
208
197
|
PlayerArmorDamagePacket = 'PlayerArmorDamagePacket',
|
|
@@ -234,11 +223,9 @@ export enum PacketId {
|
|
|
234
223
|
ResourcePackClientResponsePacket = 'ResourcePackClientResponsePacket',
|
|
235
224
|
ResourcePackDataInfoPacket = 'ResourcePackDataInfoPacket',
|
|
236
225
|
ResourcePacksInfoPacket = 'ResourcePacksInfoPacket',
|
|
237
|
-
ResourcePacksReadyForValidationPacket = 'ResourcePacksReadyForValidationPacket',
|
|
238
226
|
ResourcePackStackPacket = 'ResourcePackStackPacket',
|
|
239
227
|
RespawnPacket = 'RespawnPacket',
|
|
240
228
|
ScriptMessagePacket = 'ScriptMessagePacket',
|
|
241
|
-
ServerboundDataDrivenScreenClosedPacket = 'ServerboundDataDrivenScreenClosedPacket',
|
|
242
229
|
ServerboundDataStorePacket = 'ServerboundDataStorePacket',
|
|
243
230
|
ServerboundDiagnosticsPacket = 'ServerboundDiagnosticsPacket',
|
|
244
231
|
ServerboundLoadingScreenPacket = 'ServerboundLoadingScreenPacket',
|
|
@@ -283,7 +270,6 @@ export enum PacketId {
|
|
|
283
270
|
SubChunkRequestPacket = 'SubChunkRequestPacket',
|
|
284
271
|
SubClientLoginPacket = 'SubClientLoginPacket',
|
|
285
272
|
SyncActorPropertyPacket = 'SyncActorPropertyPacket',
|
|
286
|
-
SyncWorldClocksPacket = 'SyncWorldClocksPacket',
|
|
287
273
|
TakeItemActorPacket = 'TakeItemActorPacket',
|
|
288
274
|
TextPacket = 'TextPacket',
|
|
289
275
|
TickingAreasLoadStatusPacket = 'TickingAreasLoadStatusPacket',
|
|
@@ -717,90 +703,6 @@ export interface PacketEventOptions {
|
|
|
717
703
|
monitoredPacketIds?: PacketId[];
|
|
718
704
|
}
|
|
719
705
|
|
|
720
|
-
/**
|
|
721
|
-
* An error thrown when an HTTP request body exceeds the
|
|
722
|
-
* configured size limit.
|
|
723
|
-
*/
|
|
724
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
725
|
-
export class HttpRequestBodyTooLargeError extends Error {
|
|
726
|
-
private constructor();
|
|
727
|
-
/**
|
|
728
|
-
* @remarks
|
|
729
|
-
* Configured maximum body size in bytes.
|
|
730
|
-
*
|
|
731
|
-
* This property can be read in early-execution mode.
|
|
732
|
-
*
|
|
733
|
-
*/
|
|
734
|
-
readonly maxBytes: number;
|
|
735
|
-
/**
|
|
736
|
-
* @remarks
|
|
737
|
-
* Request body size in bytes.
|
|
738
|
-
*
|
|
739
|
-
* This property can be read in early-execution mode.
|
|
740
|
-
*
|
|
741
|
-
*/
|
|
742
|
-
readonly providedBytes: number;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
/**
|
|
746
|
-
* An error thrown when the maximum number of concurrent HTTP
|
|
747
|
-
* requests has been reached.
|
|
748
|
-
*/
|
|
749
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
750
|
-
export class HttpRequestLimitExceededError extends Error {
|
|
751
|
-
private constructor();
|
|
752
|
-
/**
|
|
753
|
-
* @remarks
|
|
754
|
-
* Number of requests already in flight when rejected.
|
|
755
|
-
*
|
|
756
|
-
* This property can be read in early-execution mode.
|
|
757
|
-
*
|
|
758
|
-
*/
|
|
759
|
-
readonly inFlightRequests: number;
|
|
760
|
-
/**
|
|
761
|
-
* @remarks
|
|
762
|
-
* Configured maximum concurrent HTTP requests.
|
|
763
|
-
*
|
|
764
|
-
* This property can be read in early-execution mode.
|
|
765
|
-
*
|
|
766
|
-
*/
|
|
767
|
-
readonly maxConcurrentRequests: number;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* An error thrown when an HTTP request targets a URI that is
|
|
772
|
-
* not in the configured allow list.
|
|
773
|
-
*/
|
|
774
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
775
|
-
export class HttpRequestNotAllowedError extends Error {
|
|
776
|
-
private constructor();
|
|
777
|
-
/**
|
|
778
|
-
* @remarks
|
|
779
|
-
* URI that was rejected because it is not allowed.
|
|
780
|
-
*
|
|
781
|
-
* This property can be read in early-execution mode.
|
|
782
|
-
*
|
|
783
|
-
*/
|
|
784
|
-
readonly uri: string;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
/**
|
|
788
|
-
* An error thrown when HTTPS is required but a non-HTTPS URI
|
|
789
|
-
* was provided.
|
|
790
|
-
*/
|
|
791
|
-
// @ts-ignore Class inheritance allowed for native defined classes
|
|
792
|
-
export class HttpsOnlyError extends Error {
|
|
793
|
-
private constructor();
|
|
794
|
-
/**
|
|
795
|
-
* @remarks
|
|
796
|
-
* URI that was rejected for not using HTTPS.
|
|
797
|
-
*
|
|
798
|
-
* This property can be read in early-execution mode.
|
|
799
|
-
*
|
|
800
|
-
*/
|
|
801
|
-
readonly uri: string;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
706
|
/**
|
|
805
707
|
* An error thrown when a platform-level HTTP error occurs.
|
|
806
708
|
* Information provided in this class may be useful for
|
|
@@ -817,7 +719,7 @@ export class InternalHttpRequestError extends Error {
|
|
|
817
719
|
* This property can be read in early-execution mode.
|
|
818
720
|
*
|
|
819
721
|
*/
|
|
820
|
-
|
|
722
|
+
code: number;
|
|
821
723
|
/**
|
|
822
724
|
* @remarks
|
|
823
725
|
* The platform-provided message for the error.
|
|
@@ -825,7 +727,7 @@ export class InternalHttpRequestError extends Error {
|
|
|
825
727
|
* This property can be read in early-execution mode.
|
|
826
728
|
*
|
|
827
729
|
*/
|
|
828
|
-
|
|
730
|
+
message: string;
|
|
829
731
|
}
|
|
830
732
|
|
|
831
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
|
}
|