Skip to content

Commit 1999336

Browse files
authored
Merge pull request #345 from ably/objects-features-idl
Add IDL of Objects features
2 parents b7d046b + 5e4acf9 commit 1999336

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

src/objects-features.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ the latest state.
2323

2424
### RealtimeObjects
2525

26-
- `(RTO1)` `Objects#getRoot` function:
26+
- `(RTO1)` `RealtimeObjects#getRoot` function:
2727
- `(RTO1a)` Requires the `OBJECT_SUBSCRIBE` channel mode to be granted
2828
per [RTO2](#RTO2)
2929
- `(RTO1b)` If the channel is in the `DETACHED` or `FAILED` state, the
@@ -572,3 +572,30 @@ the latest state.
572572
[RTLM8](#RTLM8), passing in the current key as `ObjectsMapOp`, and
573573
`ObjectsMapEntry.timeserial` as `serial`
574574
- `(RTLM17b)` Set the private flag `createOperationIsMerged` to `true`
575+
576+
## Interface Definition
577+
578+
Describes types for RealtimeObjects.\
579+
Types and their properties/methods are public and exposed to users by
580+
default. An `internal` label may be used to indicate that a type or its
581+
property/method must not be exposed to users and is intended for
582+
internal SDK use only.
583+
584+
class RealtimeObjects: // RTO*
585+
getRoot() => io LiveMap // RTO1
586+
587+
class LiveObject: // RTLO*
588+
objectId: String // RTLO3a, internal
589+
siteTimeserials: Dict<String, String> // RTLO3b, internal
590+
createOperationIsMerged: Boolean // RTLO3c, internal
591+
canApplyOperation(ObjectMessage) -> Boolean // RTLO4a, internal
592+
593+
class LiveCounter extends LiveObject: // RTLC*, RTLC1
594+
value() -> Number // RTLC5
595+
596+
class LiveMap extends LiveObject: // RTLM*, RTLM1
597+
get(key: String) -> (Boolean | Binary | Number | String | JsonArray | JsonObject | LiveCounter | LiveMap)? // RTLM5
598+
size() -> Number // RTLM10
599+
entries() -> [String, (Boolean | Binary | Number | String | JsonArray | JsonObject | LiveCounter | LiveMap)?][] // RTLM11
600+
keys() -> String[] // RTLM12
601+
values() -> (Boolean | Binary | Number | String | JsonArray | JsonObject | LiveCounter | LiveMap)?[] // RTLM13

0 commit comments

Comments
 (0)