connected-spaces-platform.web 5.15.0 → 5.17.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.
@@ -229,7 +229,7 @@ export declare namespace Multiplayer {
229
229
  * Add means the component is newly added, clients should ensure that this triggers appropriate instantiation of wrapping objects.
230
230
  * All properties for the component should be included.
231
231
  * Delete means the component has been marked for deletion. It is likely that some other clients will not have the component at the point this is
232
- * recieved. Any wrapping data objects should be deleted when this is recieved, and clients should cease updating this component as any call would
232
+ * received. Any wrapping data objects should be deleted when this is received, and clients should cease updating this component as any call would
233
233
  * fail. The CSP representation of the component has been removed at this point.
234
234
  */
235
235
  enum ComponentUpdateType {
@@ -1250,235 +1250,6 @@ export declare namespace Web {
1250
1250
  ResponseNetworkAuthenticationRequired = 511
1251
1251
  }
1252
1252
  }
1253
- export declare namespace Multiplayer {
1254
- /**
1255
- * @description The serialiser is responsible for converting a SpaceEntity instance into a data structure that both SignalR
1256
- * and our servers can understand and use.
1257
- * /// To use the serialiser, Start with BeginEntity(), then use the write(bool, int, etc) functions to write data at the
1258
- * Entity level. Use BeginComponents() to start writing as the Server component data, with each BeginComponent and
1259
- * EndComponent brace dictating information written into a server component. Within a component, use WriteProperty()
1260
- * to write the individual data. Ensure you finish by closing out the relevant sections with the 'End' functions.
1261
- */
1262
- interface IEntitySerialiser {
1263
- /**
1264
- * @description Start the serialisiation.
1265
- */
1266
- beginEntity: () => void;
1267
- /**
1268
- * @description End the serialisiation.
1269
- */
1270
- endEntity: () => void;
1271
- /**
1272
- * @description Write a boolean field of the entity.
1273
- * @param value - The value to write.
1274
- */
1275
- writeBool: (value: boolean) => void;
1276
- /**
1277
- * @description Write a byte field of the entity.
1278
- * @param value - The value to write.
1279
- */
1280
- writeByte: (value: number) => void;
1281
- /**
1282
- * @description Write a double field of the entity.
1283
- * @param value - The value to write.
1284
- */
1285
- writeDouble: (value: number) => void;
1286
- /**
1287
- * @description Write an int64_t field of the entity.
1288
- * @param value - The value to write.
1289
- */
1290
- writeInt64: (value: bigint) => void;
1291
- /**
1292
- * @description Write a uint64_t field of the entity.
1293
- * @param value - The value to write.
1294
- */
1295
- writeUInt64: (value: bigint) => void;
1296
- /**
1297
- * @description Write a string field of the entity.
1298
- * @param value - The value to write.
1299
- */
1300
- writeString: (value: string) => void;
1301
- /**
1302
- * @description Write a null field of the entity.
1303
- */
1304
- writeNull: () => void;
1305
- /**
1306
- * @description Start an array section.
1307
- */
1308
- beginArray: () => void;
1309
- /**
1310
- * @description Finish an array section.
1311
- */
1312
- endArray: () => void;
1313
- /**
1314
- * @description Start the components section.
1315
- */
1316
- beginComponents: () => void;
1317
- /**
1318
- * @description Finish the components section
1319
- */
1320
- endComponents: () => void;
1321
- /**
1322
- * @description Begin writing component with the given ID and type.
1323
- * @param id - The ID of the component.
1324
- */
1325
- beginComponent: (id: number, type: bigint) => void;
1326
- /**
1327
- * @description Finish a component section.
1328
- */
1329
- endComponent: () => void;
1330
- /**
1331
- * @description Write the given component property.
1332
- * @param id - ID of the component property.
1333
- * @param value - The value to be written.
1334
- */
1335
- writeProperty: (id: bigint, value: Multiplayer.ReplicatedValue) => void;
1336
- /**
1337
- * @description Specific handler for writing view components.
1338
- * /// View Components are data that is stored in specific keys on the server, it allows us to discretely update these
1339
- * singular data pieces, rather than replicating larger chunks of data, and also allows us to always know where
1340
- * in a data structure this data will be.
1341
- * /// @param Id uint16_t : The ID of the component
1342
- * @param value - The value of the component data to add
1343
- */
1344
- addViewComponent: (id: number, value: Multiplayer.ReplicatedValue) => void;
1345
- }
1346
- }
1347
- export declare namespace Multiplayer {
1348
- /**
1349
- * @description The deserialiser is used to take recieved signalr message data and turn it into values you can use to populate a SpaceEntity.
1350
- * /// This works similarly to the serialiser and you can refer to the serialiser for more details.
1351
- * It is expected that you will be using the data as you read it to populate either a newly created or currently existing SpaceEntity.
1352
- */
1353
- interface IEntityDeserialiser {
1354
- /**
1355
- * @description Starts the deserialisation.
1356
- */
1357
- enterEntity: () => void;
1358
- /**
1359
- * @description Ends the deserialisation.
1360
- */
1361
- leaveEntity: () => void;
1362
- /**
1363
- * @description Reads a boolean from the deserialiser.
1364
- * @return The deserialised boolean.
1365
- */
1366
- readBool: () => boolean;
1367
- /**
1368
- * @description Reads a byte from the deserialiser.
1369
- * @return The deserialised byte.
1370
- */
1371
- readByte: () => number;
1372
- /**
1373
- * @description Reads a double from the deserialiser.
1374
- * @return The deserialised double.
1375
- */
1376
- readDouble: () => number;
1377
- /**
1378
- * @description Reads an int64_t from the deserialiser.
1379
- * @return The deserialised boolean.
1380
- */
1381
- readInt64: () => bigint;
1382
- /**
1383
- * @description Reads a uint64_t from the deserialiser.
1384
- * @return The deserialised uint64_t.
1385
- */
1386
- readUInt64: () => bigint;
1387
- /**
1388
- * @description Reads a string from the deserialiser.
1389
- * @return The deserialised string.
1390
- */
1391
- readString: () => string;
1392
- /**
1393
- * @description Reads a vector2 from the deserialiser.
1394
- * @return The deserialised vector2.
1395
- */
1396
- readVector2: () => Common.Vector2;
1397
- /**
1398
- * @description Reads a vector3 from the deserialiser.
1399
- * @return The deserialised vector3.
1400
- */
1401
- readVector3: () => Common.Vector3;
1402
- /**
1403
- * @description Reads a vector4 from the deserialiser.
1404
- * @return The deserialised vector4.
1405
- */
1406
- readVector4: () => Common.Vector4;
1407
- /**
1408
- * @description Checks if the next value is null.
1409
- * @return True if the next value is null, false otherwise.
1410
- */
1411
- nextValueIsNull: () => boolean;
1412
- /**
1413
- * @description Checks if the next value is an array.
1414
- * @return True if the next value is null, false otherwise.
1415
- */
1416
- nextValueIsArray: () => boolean;
1417
- /**
1418
- * @description Puts the deserialiser into array processing mode to begin reading from an array.
1419
- * @param outLength - A reference to variable to store the length of the array.
1420
- */
1421
- enterArray: (outLength: NativeRef) => void;
1422
- /**
1423
- * @description Completes reading from and array and leaves the array processing mode.
1424
- */
1425
- leaveArray: () => void;
1426
- /**
1427
- * @description Puts the deserialiser into component processing mode to begin reading from the components section of the serialised entity.
1428
- */
1429
- enterComponents: () => void;
1430
- /**
1431
- * @description Completes reading the components and exits that mode.
1432
- */
1433
- leaveComponents: () => void;
1434
- /**
1435
- * @description Gets the total number of components, including view components.
1436
- * /// If iterating components by this count, subtract number of view components.
1437
- * /// @return The number of components.
1438
- */
1439
- getNumComponents: () => bigint;
1440
- /**
1441
- * @description Gets the number of components that are not view components.
1442
- * @return The number of non-view components.
1443
- */
1444
- getNumRealComponents: () => bigint;
1445
- /**
1446
- * @description Begins the processes of deserialising a single component that is not a view component.
1447
- */
1448
- enterComponent: (outId: NativeRef, outType: NativeRef) => void;
1449
- /**
1450
- * @description Completes the deserialisation of a single component.
1451
- */
1452
- leaveComponent: () => void;
1453
- /**
1454
- * @description Gets the number of properties in the component that is currently being deserialised.
1455
- * @return The number of properties in the component.
1456
- */
1457
- getNumProperties: () => bigint;
1458
- /**
1459
- * @description Reads a property from the deserialiser, returning it as a ReplicatedValue.
1460
- * @param outId - A reference to a variable to store the ID of the property.
1461
- * @return The property value.
1462
- */
1463
- readProperty: (outId: NativeRef) => Multiplayer.ReplicatedValue;
1464
- /**
1465
- * @description Reads a view component from the deserialiser, returning it as a ReplicatedValue.
1466
- * /// Since view components are handled differently in the serialiser, they are similarly deserialised in their own way.
1467
- * /// @return The view component value.
1468
- */
1469
- getViewComponent: (id: number) => Multiplayer.ReplicatedValue;
1470
- /**
1471
- * @description Gets whether there is a view component with the given ID.
1472
- * @param id - The ID of the component.
1473
- * @return True if there is a view component, false otherwise.
1474
- */
1475
- hasViewComponent: (id: number) => boolean;
1476
- /**
1477
- * @description Skips a field when deserialising the SpaceEntity fields.
1478
- */
1479
- skip: () => void;
1480
- }
1481
- }
1482
1253
  export declare namespace Multiplayer {
1483
1254
  /**
1484
1255
  * @description Controls whether a component is enabled or disabled.
@@ -3780,7 +3551,7 @@ export declare namespace Multiplayer {
3780
3551
  @ingroup Multiplayer
3781
3552
  * @description Handling of all network events.
3782
3553
  */
3783
- class EventBus extends NativeClassWrapper {
3554
+ class EventBus extends NativeClassWrapper implements INativeResource {
3784
3555
  /** @internal */
3785
3556
  constructor(pointer: NativePointer);
3786
3557
  /**
@@ -3814,6 +3585,7 @@ export declare namespace Multiplayer {
3814
3585
  * @description Instructs the event bus to start listening to messages
3815
3586
  */
3816
3587
  startEventMessageListening(): void;
3588
+ delete(): void;
3817
3589
  }
3818
3590
  }
3819
3591
  export declare namespace Multiplayer {
@@ -3920,7 +3692,7 @@ export declare namespace Multiplayer {
3920
3692
  @ingroup Multiplayer
3921
3693
  * @description Handling of all multiplayer connection functionality, such as connect, disconnect, entity replication and network events.
3922
3694
  */
3923
- class MultiplayerConnection extends NativeClassWrapper {
3695
+ class MultiplayerConnection extends NativeClassWrapper implements INativeResource {
3924
3696
  /** @internal */
3925
3697
  constructor(pointer: NativePointer);
3926
3698
  /**
@@ -3951,7 +3723,7 @@ export declare namespace Multiplayer {
3951
3723
  getConnectionState(): Multiplayer.ConnectionState;
3952
3724
  /**
3953
3725
  * @description Sets the Self Messaging flag for this client.
3954
- * This allows a client to declare that it wishes to recieve every patch and object message it sends.
3726
+ * This allows a client to declare that it wishes to receive every patch and object message it sends.
3955
3727
  @warning Don't use this function if you aren't sure of the consequences, it's very unlikely that a client would want to use this!
3956
3728
  * @param allowSelfMessaging - True to allow and false to disallow.
3957
3729
  * @param callback - A callback with failure state.
@@ -3962,6 +3734,7 @@ export declare namespace Multiplayer {
3962
3734
  * @return True if self messaging is allowed, false otherwise.
3963
3735
  */
3964
3736
  getAllowSelfMessagingFlag(): boolean;
3737
+ delete(): void;
3965
3738
  }
3966
3739
  }
3967
3740
  export declare namespace Multiplayer {
@@ -4245,8 +4018,8 @@ export declare namespace Multiplayer {
4245
4018
  */
4246
4019
  setScale(value: Common.Vector3): void;
4247
4020
  /**
4248
- * @description Get whether the space is transient or persistant.
4249
- * @return Returns true if the space is transient and false if it is marked as persistant.
4021
+ * @description Get whether the space is transient or persistent.
4022
+ * @return Returns true if the space is transient and false if it is marked as persistent.
4250
4023
  */
4251
4024
  getIsTransient(): boolean;
4252
4025
  /**
@@ -4325,7 +4098,7 @@ export declare namespace Multiplayer {
4325
4098
  * @description Set a callback to be executed when a patch message is received for this Entity. Only one callback can be set.
4326
4099
  * @param callback - Contains the SpaceEntity that updated, a set of flags to tell which parts updated
4327
4100
  * and an array of information to tell which components updated.
4328
- * When this callback is recieved, the flags and arrays should be used to determine which properties have updated data.
4101
+ * When this callback is received, the flags and arrays should be used to determine which properties have updated data.
4329
4102
  */
4330
4103
  setUpdateCallback(callback: (arg1: Multiplayer.SpaceEntity, arg2: Multiplayer.SpaceEntityUpdateFlags, arg3: Common.Array<Multiplayer.ComponentUpdateInfo>) => void): void;
4331
4104
  /**
@@ -4363,27 +4136,6 @@ export declare namespace Multiplayer {
4363
4136
  * /// @param Key uint16_t : The component ID of the component to remove.
4364
4137
  */
4365
4138
  removeComponent(key: number): void;
4366
- /**
4367
- * @description Serialise local changes into patch message format into the given serialiser. Does not send a patch.
4368
- * @param serialiser - The serialiser to use.
4369
- */
4370
- serialisePatch(serialiser: Multiplayer.IEntitySerialiser): void;
4371
- /**
4372
- * @description Serialise the entire SpaceEntity into object message format into the given serialiser. Does not send a message.
4373
- * @param serialiser - The serialiser to use.
4374
- */
4375
- serialise(serialiser: Multiplayer.IEntitySerialiser): void;
4376
- /**
4377
- * @description Serialises a given component into a consistent format for the given serialiser.
4378
- * @param serialiser - The serialiser to use.
4379
- * @param component - The component to be serialised.
4380
- */
4381
- serialiseComponent(serialiser: Multiplayer.IEntitySerialiser, component: Multiplayer.ComponentBase): void;
4382
- /**
4383
- * @description Using the given deserialiser, populate the SpaceEntity with the data in the deserialiser.
4384
- * @param deserialiser - The deserialiser to use.
4385
- */
4386
- deserialise(deserialiser: Multiplayer.IEntityDeserialiser): void;
4387
4139
  /**
4388
4140
  * @description Gets the script associated with the space entity.
4389
4141
  * @return The EntityScript instance set on the entity.
@@ -4449,7 +4201,7 @@ export declare namespace Multiplayer {
4449
4201
  * can be registered for certain events that occur within the entity system so clients can
4450
4202
  * react appropriately.
4451
4203
  */
4452
- class SpaceEntitySystem extends NativeClassWrapper {
4204
+ class SpaceEntitySystem extends NativeClassWrapper implements INativeResource {
4453
4205
  /** @internal */
4454
4206
  constructor(pointer: NativePointer);
4455
4207
  /**
@@ -4658,15 +4410,16 @@ export declare namespace Multiplayer {
4658
4410
  * \rst
4659
4411
  * .. note::
4660
4412
  * If disabling this feature, more requests will be made to Magnopus Connected Services,
4661
- * and consequntly more patch merges may occur on the server as a result.
4413
+ * and consequently more patch merges may occur on the server as a result.
4662
4414
  * \endrst
4663
4415
  */
4664
4416
  setEntityPatchRateLimitEnabled(enabled: boolean): void;
4665
4417
  /**
4666
- * @description Retrieves all entites that exist at the root level (do not have a parent entity).
4418
+ * @description Retrieves all entities that exist at the root level (do not have a parent entity).
4667
4419
  * @return A list of root entities.
4668
4420
  */
4669
4421
  getRootHierarchyEntities(): Common.List<Multiplayer.SpaceEntity>;
4422
+ delete(): void;
4670
4423
  }
4671
4424
  }
4672
4425
  export declare namespace Multiplayer {
@@ -4779,57 +4532,17 @@ export declare namespace Multiplayer {
4779
4532
  static create(): AnnotationData;
4780
4533
  static create_annotationId_annotationThumbnailId_verticalFov_authorCameraPosition_authorCameraRotation(annotationId: string, annotationThumbnailId: string, verticalFov: number, authorCameraPosition: Common.Vector3, authorCameraRotation: Common.Vector4): AnnotationData;
4781
4534
  static create_annotationData(annotationData: Multiplayer.AnnotationData): AnnotationData;
4782
- /**
4783
- * @description Get the annotation id
4784
- * @return Csp::common::string
4785
- */
4786
- getAnnotationId(): string;
4787
- /**
4788
- * @description Get the annotation collection id
4789
- * @return Csp::common::string
4790
- */
4791
- getAnnotationThumbnailId(): string;
4792
- /**
4793
- * @description Get the vertical FOV
4794
- * @return A uint16_t representing the vertical fov
4795
- */
4796
- getVerticalFov(): number;
4797
- /**
4798
- * @description Get the AuthorCameraPosition
4799
- * @return A vector3 representing the authorcameraposition
4800
- */
4801
- getAuthorCameraPosition(): Common.Vector3;
4802
- /**
4803
- * @description Get the AuthorCameraRotation
4804
- * @return A vector4 representing the authorcamerarotation
4805
- */
4806
- getAuthorCameraRotation(): Common.Vector4;
4807
- /**
4808
- * @description Set the annotation id
4809
- * @param id - Const csp::common::string& id
4810
- */
4811
- setAnnotationId(id: string): void;
4812
- /**
4813
- * @description Set the annotation collection id
4814
- * @param id - Const csp::common::string& id
4815
- */
4816
- setAnnotationThumbnailId(id: string): void;
4817
- /**
4818
- * @description Set the VerticalFov
4819
- * @param inVerticalFo - InVerticalFov
4820
- */
4821
- setVerticalFov(verticalFov: number): void;
4822
- /**
4823
- * @description Set the AuthorCameraPosition
4824
- * @param inAuthorCameraPositio - InAuthorCameraPosition
4825
- */
4826
- setAuthorCameraPosition(authorCameraPosition: Common.Vector3): void;
4827
- /**
4828
- * @description Set the AuthorCameraRotation
4829
- * @param inAuthorCameraRotatio - InAuthorCameraRotation
4830
- */
4831
- setAuthorCameraRotation(authorCameraRotation: Common.Vector4): void;
4832
4535
  delete(): void;
4536
+ get annotationId(): string;
4537
+ set annotationId(value: string);
4538
+ get annotationThumbnailId(): string;
4539
+ set annotationThumbnailId(value: string);
4540
+ get verticalFov(): number;
4541
+ set verticalFov(value: number);
4542
+ get authorCameraPosition(): Common.Vector3;
4543
+ set authorCameraPosition(value: Common.Vector3);
4544
+ get authorCameraRotation(): Common.Vector4;
4545
+ set authorCameraRotation(value: Common.Vector4);
4833
4546
  }
4834
4547
  }
4835
4548
  export declare namespace Multiplayer {
@@ -4865,6 +4578,11 @@ export declare namespace Multiplayer {
4865
4578
  * @return True if there was an error, false otherwise.
4866
4579
  */
4867
4580
  hasError(): boolean;
4581
+ /**
4582
+ * @description Checks if the entity has a script component.
4583
+ * @return True if component exist, false otherwise.
4584
+ */
4585
+ hasEntityScriptComponent(): boolean;
4868
4586
  /**
4869
4587
  * @description Gets the text of the last error if it is known or otherwise returns a default unknown error string.
4870
4588
  * @return Text of the last error.
@@ -7526,7 +7244,7 @@ export declare namespace Multiplayer {
7526
7244
  @pre This component must contain a valid conversation id (component must have a conversation id that isn't an empty string).
7527
7245
  * A CSP error will be sent to the LogSystem if this condition is not met, with a EResultCode::Failed response.
7528
7246
  */
7529
- getAnnotationThumbnailsForConversation(callback: (result: Multiplayer.AnnotationThumbnailCollectionResult) => void): void;
7247
+ getAnnotationThumbnailsForConversation(): Promise<Multiplayer.AnnotationThumbnailCollectionResult>;
7530
7248
  /**
7531
7249
  * @description Sets a callback for when the conversation is updated by another client.
7532
7250
  * @param callback - Callback to receive data for the conversation that has been changed.
@@ -9796,6 +9514,7 @@ export declare namespace Systems {
9796
9514
  * @return Const ref of asset collection class
9797
9515
  */
9798
9516
  getAssetCollection(): Systems.AssetCollection;
9517
+ static create(): AssetCollectionResult;
9799
9518
  delete(): void;
9800
9519
  }
9801
9520
  }
@@ -11328,6 +11047,7 @@ export declare namespace Systems {
11328
11047
  * @return The space code
11329
11048
  */
11330
11049
  getSpaceCode(): string;
11050
+ static create(): SpaceResult;
11331
11051
  delete(): void;
11332
11052
  }
11333
11053
  }
@@ -11541,7 +11261,7 @@ export declare namespace Systems {
11541
11261
  */
11542
11262
  updateSpace(spaceId: string, name: string | null, description: string | null, type: Systems.SpaceAttributes | null, tags: Common.Array<string> | null): Promise<Systems.BasicSpaceResult>;
11543
11263
  /**
11544
- * @description Deletes a given space and the corresponding UserService group.
11264
+ * @description Deletes a given space and the associated objects that belong to it. Including UserService group, Metadata, and Thumbnail.
11545
11265
  * @param space - Space to delete
11546
11266
  * @param callback - Callback when asynchronous task finishes
11547
11267
  */