@crowdedkingdomstudios/crowdyjs 5.1.0 → 5.2.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.
- package/MIGRATION.md +42 -0
- package/README.md +19 -0
- package/dist/domains/actors.d.ts +1 -1
- package/dist/domains/actors.d.ts.map +1 -1
- package/dist/domains/actors.js +2 -2
- package/dist/domains/teams.d.ts +2 -2
- package/dist/domains/teams.d.ts.map +1 -1
- package/dist/domains/teams.js +4 -4
- package/dist/generated/graphql.d.ts +1787 -110
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +75 -9
- package/package.json +1 -1
package/MIGRATION.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
# CrowdyJS v5.2 Notes
|
|
2
|
+
|
|
3
|
+
v5.2 is additive at the SDK API level (new optional parameters only) and
|
|
4
|
+
refreshes the bundled schema, but it **raises the minimum server version**.
|
|
5
|
+
|
|
6
|
+
## Added
|
|
7
|
+
|
|
8
|
+
- **Idempotency keys on destructive mutations.** The four destructive
|
|
9
|
+
game-client mutations now accept an optional idempotency key. Replaying the
|
|
10
|
+
same call with the same key returns the first result instead of re-applying
|
|
11
|
+
the side effect; the same key with different arguments returns an
|
|
12
|
+
`IDEMPOTENCY_CONFLICT` error. Keys expire server-side after 24h.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
const key = crypto.randomUUID();
|
|
16
|
+
await client.actors.delete(uuid, key); // first call deletes
|
|
17
|
+
await client.actors.delete(uuid, key); // retry replays the first result
|
|
18
|
+
await client.teams.remove(groupId, key);
|
|
19
|
+
await client.teams.leave(groupId, key);
|
|
20
|
+
await client.voxels.rollback({ ...input, idempotencyKey: key }); // input field
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
All four parameters are optional and trailing, so existing call sites are
|
|
24
|
+
unchanged.
|
|
25
|
+
|
|
26
|
+
- **Refreshed bundled schema.** Re-synced against `cks-management-api` and
|
|
27
|
+
`cks-game-api` so generated types now include the new Relay-style `*Connection`
|
|
28
|
+
queries (offset `limit`/`offset` args are now marked `@deprecated`), the
|
|
29
|
+
machine-readable `@requiresPermission` directive metadata, and the enumerated
|
|
30
|
+
error codes. `CrowdyGraphQLError` already surfaces these via `extensions.code`,
|
|
31
|
+
`extensions.remediation`, and `extensions.requiredPermission` — no new error
|
|
32
|
+
class is needed.
|
|
33
|
+
|
|
34
|
+
## Requires
|
|
35
|
+
|
|
36
|
+
- `cks-game-api >= v0.10.3` and `cks-management-api >= v0.1.70`. The destructive
|
|
37
|
+
mutation documents now send the `idempotencyKey` argument, so those four
|
|
38
|
+
operations require a server that defines it. Point the SDK at an environment
|
|
39
|
+
running release **v0.1.19** or later.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
1
43
|
# CrowdyJS v5.1 Notes
|
|
2
44
|
|
|
3
45
|
v5.1 is additive and non-breaking.
|
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ npm install @crowdedkingdomstudios/crowdyjs
|
|
|
10
10
|
|
|
11
11
|
CrowdyJS v4 targets browsers by default and uses native `fetch`, `WebSocket`, `crypto`, `btoa`, and `atob`. Node tools can still use the SDK, but must provide browser-compatible globals when opening realtime connections.
|
|
12
12
|
|
|
13
|
+
> **Server compatibility:** v5.2+ targets environments on release **v0.1.19 or later** (`cks-game-api >= v0.10.3`, `cks-management-api >= v0.1.70`). The destructive mutations send an `idempotencyKey` argument that older servers don't define.
|
|
14
|
+
|
|
13
15
|
## Quick start
|
|
14
16
|
|
|
15
17
|
```ts
|
|
@@ -207,6 +209,23 @@ Transport and protocol failures throw structured error classes:
|
|
|
207
209
|
- `CrowdyRealtimeError` — realtime subscription couldn't be established or was dropped.
|
|
208
210
|
- `CrowdyProtocolError` — server response failed schema validation.
|
|
209
211
|
|
|
212
|
+
GraphQL errors carry a stable `extensions.code` (e.g. `UNAUTHENTICATED`, `SCOPE_MISSING`, `FORBIDDEN`, `IDEMPOTENCY_CONFLICT`) plus, where applicable, `extensions.remediation` and `extensions.requiredPermission`. Branch on `error.extensions?.code` rather than parsing messages.
|
|
213
|
+
|
|
214
|
+
## Idempotent retries
|
|
215
|
+
|
|
216
|
+
Destructive game-client mutations accept an optional **idempotency key**. Pass a stable key (e.g. `crypto.randomUUID()`) and a network retry replays the first result instead of applying the side effect twice. Reusing a key with different arguments throws a `CrowdyGraphQLError` with `extensions.code === 'IDEMPOTENCY_CONFLICT'`. Keys expire server-side after 24h.
|
|
217
|
+
|
|
218
|
+
```ts
|
|
219
|
+
const key = crypto.randomUUID();
|
|
220
|
+
await client.actors.delete(uuid, key); // first call deletes
|
|
221
|
+
await client.actors.delete(uuid, key); // retry → replays the first result
|
|
222
|
+
await client.teams.remove(groupId, key); // deleteTeam
|
|
223
|
+
await client.teams.leave(groupId, key); // leaveTeam
|
|
224
|
+
await client.voxels.rollback({ ...input, idempotencyKey: key }); // input field
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
The key parameter is optional and trailing, so it's safe to omit. Requires a server on release v0.1.19+ (see Server compatibility above).
|
|
228
|
+
|
|
210
229
|
## Auth notes
|
|
211
230
|
|
|
212
231
|
- Use `client.auth.setToken(token)` if you need to seed a token externally (e.g. when restoring auth from a non-default storage).
|
package/dist/domains/actors.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare class ActorsAPI {
|
|
|
16
16
|
batchLookup(input: BatchLookupActorsQueryVariables['input']): Promise<BatchLookupActorsQuery['batchLookupActors']>;
|
|
17
17
|
create(input: CreateActorMutationVariables['input']): Promise<CreateActorMutation['createActor']>;
|
|
18
18
|
update(uuid: UpdateActorMutationVariables['uuid'], input: UpdateActorMutationVariables['input']): Promise<UpdateActorMutation['updateActor']>;
|
|
19
|
-
delete(uuid: DeleteActorMutationVariables['uuid']): Promise<DeleteActorMutation['deleteActor']>;
|
|
19
|
+
delete(uuid: DeleteActorMutationVariables['uuid'], idempotencyKey?: DeleteActorMutationVariables['idempotencyKey']): Promise<DeleteActorMutation['deleteActor']>;
|
|
20
20
|
updateState(uuid: UpdateActorStateMutationVariables['uuid'], input: UpdateActorStateMutationVariables['input']): Promise<UpdateActorStateMutation['updateActorState']>;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=actors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actors.d.ts","sourceRoot":"","sources":["../../src/domains/actors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,mBAAmB,EAExB,KAAK,WAAW,EAChB,KAAK,oBAAoB,EAEzB,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EAEpC,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EAEjC,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EAEjC,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EAEjC,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACvC,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;GAOG;AACH,qBAAa,SAAS;IACR,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAEhC,GAAG,CAAC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAKpE,IAAI,CAAC,MAAM,CAAC,EAAE,oBAAoB,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAK7E,WAAW,CACf,KAAK,EAAE,+BAA+B,CAAC,OAAO,CAAC,GAC9C,OAAO,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;IAKjD,MAAM,CACV,KAAK,EAAE,4BAA4B,CAAC,OAAO,CAAC,GAC3C,OAAO,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;IAKxC,MAAM,CACV,IAAI,EAAE,4BAA4B,CAAC,MAAM,CAAC,EAC1C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CAAC,GAC3C,OAAO,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;IAKxC,MAAM,CACV,IAAI,EAAE,4BAA4B,CAAC,MAAM,CAAC,EAC1C,cAAc,CAAC,EAAE,4BAA4B,CAAC,gBAAgB,CAAC,GAC9D,OAAO,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC;IAKxC,WAAW,CACf,IAAI,EAAE,iCAAiC,CAAC,MAAM,CAAC,EAC/C,KAAK,EAAE,iCAAiC,CAAC,OAAO,CAAC,GAChD,OAAO,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;CAIzD"}
|
package/dist/domains/actors.js
CHANGED
|
@@ -31,8 +31,8 @@ export class ActorsAPI {
|
|
|
31
31
|
const data = await this.gql.request(UpdateActorDocument, { uuid, input });
|
|
32
32
|
return data.updateActor;
|
|
33
33
|
}
|
|
34
|
-
async delete(uuid) {
|
|
35
|
-
const data = await this.gql.request(DeleteActorDocument, { uuid });
|
|
34
|
+
async delete(uuid, idempotencyKey) {
|
|
35
|
+
const data = await this.gql.request(DeleteActorDocument, { uuid, idempotencyKey });
|
|
36
36
|
return data.deleteActor;
|
|
37
37
|
}
|
|
38
38
|
async updateState(uuid, input) {
|
package/dist/domains/teams.d.ts
CHANGED
|
@@ -19,11 +19,11 @@ export declare class TeamsAPI {
|
|
|
19
19
|
policy(appId: TeamPolicyQueryVariables['appId']): Promise<TeamPolicyQuery['teamPolicy']>;
|
|
20
20
|
create(input: CreateTeamMutationVariables['input']): Promise<CreateTeamMutation['createTeam']>;
|
|
21
21
|
update(input: UpdateTeamMutationVariables['input']): Promise<UpdateTeamMutation['updateTeam']>;
|
|
22
|
-
remove(groupId: DeleteTeamMutationVariables['groupId']): Promise<boolean>;
|
|
22
|
+
remove(groupId: DeleteTeamMutationVariables['groupId'], idempotencyKey?: DeleteTeamMutationVariables['idempotencyKey']): Promise<boolean>;
|
|
23
23
|
setPolicy(input: SetTeamPolicyMutationVariables['input']): Promise<SetTeamPolicyMutation['setTeamPolicy']>;
|
|
24
24
|
join(groupId: JoinTeamMutationVariables['groupId']): Promise<JoinTeamMutation['joinTeam']>;
|
|
25
25
|
requestToJoin(groupId: RequestToJoinTeamMutationVariables['groupId']): Promise<RequestToJoinTeamMutation['requestToJoinTeam']>;
|
|
26
|
-
leave(groupId: LeaveTeamMutationVariables['groupId']): Promise<boolean>;
|
|
26
|
+
leave(groupId: LeaveTeamMutationVariables['groupId'], idempotencyKey?: LeaveTeamMutationVariables['idempotencyKey']): Promise<boolean>;
|
|
27
27
|
addMember(groupId: AddTeamMemberMutationVariables['groupId'], userId: AddTeamMemberMutationVariables['userId']): Promise<AddTeamMemberMutation['addTeamMember']>;
|
|
28
28
|
removeMember(groupId: RemoveTeamMemberMutationVariables['groupId'], userId: RemoveTeamMemberMutationVariables['userId']): Promise<boolean>;
|
|
29
29
|
setMemberRoles(input: SetTeamMemberRolesMutationVariables['input']): Promise<SetTeamMemberRolesMutation['setTeamMemberRoles']>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teams.d.ts","sourceRoot":"","sources":["../../src/domains/teams.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAE1B,KAAK,UAAU,EACf,KAAK,mBAAmB,EAExB,KAAK,SAAS,EACd,KAAK,kBAAkB,EAEvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAE9B,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAE5B,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAE7B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EAEnC,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAEhC,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAEhC,KAAK,2BAA2B,EAEhC,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAE9B,KAAK,yBAAyB,EAC9B,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CAAC,SAAS,CAAC,EAClD,MAAM,EAAE,8BAA8B,CAAC,QAAQ,CAAC,GAC/C,OAAO,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC;IAK5C,YAAY,CAChB,OAAO,EAAE,iCAAiC,CAAC,SAAS,CAAC,EACrD,MAAM,EAAE,iCAAiC,CAAC,QAAQ,CAAC,GAClD,OAAO,CAAC,OAAO,CAAC;IAKb,cAAc,CAClB,KAAK,EAAE,mCAAmC,CAAC,OAAO,CAAC,GAClD,OAAO,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,CAAC;IAOtD,UAAU,CACd,KAAK,EAAE,+BAA+B,CAAC,OAAO,CAAC,GAC9C,OAAO,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IAK9C,UAAU,CACd,KAAK,EAAE,+BAA+B,CAAC,OAAO,CAAC,GAC9C,OAAO,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IAK9C,UAAU,CACd,WAAW,EAAE,+BAA+B,CAAC,aAAa,CAAC,GAC1D,OAAO,CAAC,OAAO,CAAC;CAIpB"}
|
package/dist/domains/teams.js
CHANGED
|
@@ -45,8 +45,8 @@ export class TeamsAPI {
|
|
|
45
45
|
const data = await this.gql.request(UpdateTeamDocument, { input });
|
|
46
46
|
return data.updateTeam;
|
|
47
47
|
}
|
|
48
|
-
async remove(groupId) {
|
|
49
|
-
const data = await this.gql.request(DeleteTeamDocument, { groupId });
|
|
48
|
+
async remove(groupId, idempotencyKey) {
|
|
49
|
+
const data = await this.gql.request(DeleteTeamDocument, { groupId, idempotencyKey });
|
|
50
50
|
return data.deleteTeam;
|
|
51
51
|
}
|
|
52
52
|
async setPolicy(input) {
|
|
@@ -62,8 +62,8 @@ export class TeamsAPI {
|
|
|
62
62
|
const data = await this.gql.request(RequestToJoinTeamDocument, { groupId });
|
|
63
63
|
return data.requestToJoinTeam;
|
|
64
64
|
}
|
|
65
|
-
async leave(groupId) {
|
|
66
|
-
const data = await this.gql.request(LeaveTeamDocument, { groupId });
|
|
65
|
+
async leave(groupId, idempotencyKey) {
|
|
66
|
+
const data = await this.gql.request(LeaveTeamDocument, { groupId, idempotencyKey });
|
|
67
67
|
return data.leaveTeam;
|
|
68
68
|
}
|
|
69
69
|
async addMember(groupId, userId) {
|