@crowdedkingdoms/crowdyjs 18.33.0 → 18.34.0-test.1
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 +8 -4
- package/README.md +19 -15
- package/dist/default-origin.d.ts +6 -6
- package/dist/default-origin.js +6 -6
- package/dist/domains/portal.d.ts +4 -1
- package/dist/domains/portal.d.ts.map +1 -1
- package/dist/errors.d.ts +21 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +22 -0
- package/dist/generated/graphql-schema.d.ts +136 -11
- package/dist/generated/graphql-schema.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/MIGRATION.md
CHANGED
|
@@ -1757,10 +1757,14 @@ be before:
|
|
|
1757
1757
|
2. **Not a data allowance.** The monthly fee buys capacity, not volume, and is
|
|
1758
1758
|
charged *in addition to* metered usage. Reserving 5 MB/s does not make the
|
|
1759
1759
|
first 5 MB/s free.
|
|
1760
|
-
3. **Not the way to lift the free-tier cap.**
|
|
1761
|
-
roughly 1 MB/s
|
|
1762
|
-
reserving
|
|
1763
|
-
rate-limit bypass, which is why the old
|
|
1760
|
+
3. **Not the way to lift the free-tier cap.** When this release shipped,
|
|
1761
|
+
unfunded free apps were shaped at roughly 1 MB/s; funding the org wallet or
|
|
1762
|
+
enabling auto-billing lifted that, and reserving did not. Until 2026-09-01 a
|
|
1763
|
+
reservation did double duty as a rate-limit bypass, which is why the old
|
|
1764
|
+
schema descriptions said so. Since 2026-11-09 CK shapes no app. Instead, it
|
|
1765
|
+
denies an unfunded app that uses more of a meter than its organization's free
|
|
1766
|
+
allowance has left (`insufficient_funds`), within about a minute; see
|
|
1767
|
+
[What "access denied" means](https://docs.crowdedkingdoms.com/management-api/shared-environment#what-access-denied-means).
|
|
1764
1768
|
|
|
1765
1769
|
## Also
|
|
1766
1770
|
|
package/README.md
CHANGED
|
@@ -12,19 +12,23 @@ gameplay, minted per app through `client.portal`.
|
|
|
12
12
|
|
|
13
13
|
Start here:
|
|
14
14
|
|
|
15
|
-
- [SDK guide](https://docs.crowdedkingdoms.com/crowdyjs/readme) — the canonical
|
|
15
|
+
- [SDK guide](https://docs.dev.crowdedkingdoms.com/crowdyjs/readme) — the canonical
|
|
16
16
|
walkthrough of everything in this README.
|
|
17
|
-
- [Build a game](https://docs.crowdedkingdoms.com/build-a-game/intro) — a
|
|
17
|
+
- [Build a game](https://docs.dev.crowdedkingdoms.com/build-a-game/intro) — a
|
|
18
18
|
hands-on tutorial from sign-in to a playable voxel game.
|
|
19
|
-
- [Platform overview](https://docs.crowdedkingdoms.com/overview/client-workflow)
|
|
19
|
+
- [Platform overview](https://docs.dev.crowdedkingdoms.com/overview/client-workflow)
|
|
20
20
|
— how a client session flows through the platform.
|
|
21
21
|
|
|
22
22
|
## Install
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
npm install @crowdedkingdoms/crowdyjs
|
|
25
|
+
npm install @crowdedkingdoms/crowdyjs@dev
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
This README is the `dev` branch's: it documents the release on the `dev` dist-tag
|
|
29
|
+
(`npm view @crowdedkingdoms/crowdyjs dist-tags`), and its links go to the dev docs site. A
|
|
30
|
+
plain `npm install` resolves `latest`, the production release, which has no `client.exec`.
|
|
31
|
+
|
|
28
32
|
**Server compatibility.** A release selects fields the Game API it was built against has,
|
|
29
33
|
so it needs that Game API or newer; promote the Game API before the SDK on each tier.
|
|
30
34
|
|
|
@@ -229,8 +233,8 @@ Notes:
|
|
|
229
233
|
- Use `client.auth.setToken(token)` to seed a token externally (e.g. when
|
|
230
234
|
restoring auth from a non-default storage).
|
|
231
235
|
|
|
232
|
-
Deeper reading: [Portals & app-scoped tokens](https://docs.crowdedkingdoms.com/management-api/portals-and-app-tokens)
|
|
233
|
-
and [Sign in](https://docs.crowdedkingdoms.com/management-api/authentication).
|
|
236
|
+
Deeper reading: [Portals & app-scoped tokens](https://docs.dev.crowdedkingdoms.com/management-api/portals-and-app-tokens)
|
|
237
|
+
and [Sign in](https://docs.dev.crowdedkingdoms.com/management-api/authentication).
|
|
234
238
|
|
|
235
239
|
### Org-managed players
|
|
236
240
|
|
|
@@ -522,7 +526,7 @@ query AppForRouting($appId: BigInt!) {
|
|
|
522
526
|
`CrowdyClient` with `httpUrl: gameApiUrl` (and the matching `wsUrl`) holding
|
|
523
527
|
that app's app-scoped token, then drive gameplay through that client. Apps
|
|
524
528
|
with no `gameApiUrl` keep working against the default `httpUrl` you
|
|
525
|
-
configured. See [Loading an app's Game API](https://docs.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
|
|
529
|
+
configured. See [Loading an app's Game API](https://docs.dev.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
|
|
526
530
|
|
|
527
531
|
## Realtime notifications
|
|
528
532
|
|
|
@@ -975,7 +979,7 @@ reach your bundle. Reads are synchronous snapshots and writes happen on
|
|
|
975
979
|
WebSocket events (not `requestAnimationFrame`), so render loops read freely
|
|
976
980
|
and a backgrounded tab keeps ingesting updates; pass `workerTicker()` to also
|
|
977
981
|
keep timer-driven sends at full rate while hidden. See the
|
|
978
|
-
[World Stores guide](https://docs.crowdedkingdoms.com/crowdyjs/stores).
|
|
982
|
+
[World Stores guide](https://docs.dev.crowdedkingdoms.com/crowdyjs/stores).
|
|
979
983
|
|
|
980
984
|
## Game Kit
|
|
981
985
|
|
|
@@ -1053,7 +1057,7 @@ The protocol is held to ck-exec's golden record of the starters
|
|
|
1053
1057
|
(`test/unit/fixtures/kit-protocol.json`): every module call and topic in it is replayed in
|
|
1054
1058
|
`test/unit/game-kit.test.mjs`. The blueprints, `kit.deploy`, the engines and the model-backed
|
|
1055
1059
|
helpers went with the game model in 18.0.0; the hub modules replace them. See the
|
|
1056
|
-
[Game Kit docs](https://docs.crowdedkingdoms.com/game-kit/intro) and
|
|
1060
|
+
[Game Kit docs](https://docs.dev.crowdedkingdoms.com/game-kit/intro) and
|
|
1057
1061
|
[MIGRATION.md](MIGRATION.md).
|
|
1058
1062
|
|
|
1059
1063
|
## ck-exec
|
|
@@ -1117,7 +1121,7 @@ Integers above 2^53 decode as `number` and lose precision unless you pass
|
|
|
1117
1121
|
`{ decode: { useBigInt64: true } }`. A call's whole numbers outside 32 bits (a timestamp in
|
|
1118
1122
|
milliseconds, a player id) go out as 64-bit integers (18.11.0; before, as floats, which a
|
|
1119
1123
|
hub's integer fields refuse). The wire format is in the
|
|
1120
|
-
[ck-exec docs](https://docs.crowdedkingdoms.com/exec/intro).
|
|
1124
|
+
[ck-exec docs](https://docs.dev.crowdedkingdoms.com/exec/intro).
|
|
1121
1125
|
|
|
1122
1126
|
### A mod's CLIENT half
|
|
1123
1127
|
|
|
@@ -1188,7 +1192,7 @@ counts what was dropped); `invoke` sends at most 256 KiB each way and is refused
|
|
|
1188
1192
|
module is not running. `NOT_FOUND` holds a CLIENT half back 15 s and `RATE_LIMITED` 60 s. The
|
|
1189
1193
|
grid's owner is asked about their own CLIENT halves like anyone; answer yes in `confirm` when
|
|
1190
1194
|
`prompt.authorId` is the player. See
|
|
1191
|
-
[CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves).
|
|
1195
|
+
[CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves).
|
|
1192
1196
|
|
|
1193
1197
|
## Hosting your game
|
|
1194
1198
|
|
|
@@ -1201,7 +1205,7 @@ set response headers. Then, in Studio, open the app's
|
|
|
1201
1205
|
origin as the app's **Launch URL**. The redirect URI is what admits the origin to CORS
|
|
1202
1206
|
and to the hosted sign-in return, so `portal.signIn` works there as in the
|
|
1203
1207
|
[Quick start](#quick-start).
|
|
1204
|
-
[Host your game](https://docs.crowdedkingdoms.com/build-a-game/host-your-game)
|
|
1208
|
+
[Host your game](https://docs.dev.crowdedkingdoms.com/build-a-game/host-your-game)
|
|
1205
1209
|
has the requirements and recipes.
|
|
1206
1210
|
|
|
1207
1211
|
`client.hosting`, `uploadPublishFiles`, `publishDirectory` and `manifestForDirectory`
|
|
@@ -1297,8 +1301,8 @@ CLIENT project needs ck-api `v2.25.1` or later. A CLIENT crate still on the lega
|
|
|
1297
1301
|
`mountCrowdyStudio` and the controller take `mods: client.exec`. Crowdy Studio runs nothing
|
|
1298
1302
|
on legacy player compute since 18.0.0.
|
|
1299
1303
|
|
|
1300
|
-
See [CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.crowdedkingdoms.com/exec/mods)
|
|
1301
|
-
and [Embed Crowdy Studio in your game](https://docs.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
|
|
1304
|
+
See [CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.dev.crowdedkingdoms.com/exec/mods)
|
|
1305
|
+
and [Embed Crowdy Studio in your game](https://docs.dev.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
|
|
1302
1306
|
|
|
1303
1307
|
### The Studio agent (DeepSeek Harness in the browser)
|
|
1304
1308
|
|
|
@@ -1554,7 +1558,7 @@ no other repositories and no network access required:
|
|
|
1554
1558
|
`src/generated/graphql-schema.ts`, the generated schema types.
|
|
1555
1559
|
|
|
1556
1560
|
Schema refresh is explicit, from the published
|
|
1557
|
-
[SDL](https://docs.crowdedkingdoms.com/schema/game-api.graphql):
|
|
1561
|
+
[SDL](https://docs.dev.crowdedkingdoms.com/schema/game-api.graphql):
|
|
1558
1562
|
|
|
1559
1563
|
```bash
|
|
1560
1564
|
npm run schema:sync:prod
|
package/dist/default-origin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
3
|
+
* `sync-client-origins.mjs --write --tier test` writes this file, and
|
|
4
4
|
* `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
|
|
5
5
|
* host that declaration does not carry. Regenerate; never hand-edit.
|
|
6
6
|
*
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
* than no default at all. Every fallback this SDK ever removed named a host that
|
|
11
11
|
* was already dead. A generated file plus a gate is what makes this one different.
|
|
12
12
|
*
|
|
13
|
-
* Source: the operator's per-tier public CK API origin declaration, tier '
|
|
13
|
+
* Source: the operator's per-tier public CK API origin declaration, tier 'test'
|
|
14
14
|
*/
|
|
15
15
|
/** The tier this build of the SDK is published for. */
|
|
16
|
-
export declare const CROWDY_DEFAULT_TIER = "
|
|
16
|
+
export declare const CROWDY_DEFAULT_TIER = "test";
|
|
17
17
|
/** The public CK API origin for that tier. */
|
|
18
|
-
export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.
|
|
18
|
+
export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.test.crowdedkingdoms.com";
|
|
19
19
|
/** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
|
|
20
|
-
export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.
|
|
20
|
+
export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.test.crowdedkingdoms.com";
|
|
21
21
|
/** The bare hostname, for callers that need to compare rather than dial. */
|
|
22
|
-
export declare const CROWDY_DEFAULT_HOST = "ck.
|
|
22
|
+
export declare const CROWDY_DEFAULT_HOST = "ck.test.crowdedkingdoms.com";
|
|
23
23
|
//# sourceMappingURL=default-origin.d.ts.map
|
package/dist/default-origin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
3
|
+
* `sync-client-origins.mjs --write --tier test` writes this file, and
|
|
4
4
|
* `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
|
|
5
5
|
* host that declaration does not carry. Regenerate; never hand-edit.
|
|
6
6
|
*
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
* than no default at all. Every fallback this SDK ever removed named a host that
|
|
11
11
|
* was already dead. A generated file plus a gate is what makes this one different.
|
|
12
12
|
*
|
|
13
|
-
* Source: the operator's per-tier public CK API origin declaration, tier '
|
|
13
|
+
* Source: the operator's per-tier public CK API origin declaration, tier 'test'
|
|
14
14
|
*/
|
|
15
15
|
/** The tier this build of the SDK is published for. */
|
|
16
|
-
export const CROWDY_DEFAULT_TIER = '
|
|
16
|
+
export const CROWDY_DEFAULT_TIER = 'test';
|
|
17
17
|
/** The public CK API origin for that tier. */
|
|
18
|
-
export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.
|
|
18
|
+
export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.test.crowdedkingdoms.com';
|
|
19
19
|
/** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
|
|
20
|
-
export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.
|
|
20
|
+
export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.test.crowdedkingdoms.com';
|
|
21
21
|
/** The bare hostname, for callers that need to compare rather than dial. */
|
|
22
|
-
export const CROWDY_DEFAULT_HOST = 'ck.
|
|
22
|
+
export const CROWDY_DEFAULT_HOST = 'ck.test.crowdedkingdoms.com';
|
package/dist/domains/portal.d.ts
CHANGED
|
@@ -49,7 +49,10 @@ import type { AppPauseReason } from '../errors.js';
|
|
|
49
49
|
*/
|
|
50
50
|
export interface AppRuntimeGate {
|
|
51
51
|
status: 'ACTIVE' | 'GRACE' | 'DENIED' | 'SUSPENDED' | (string & {});
|
|
52
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* `insufficient_funds`, `spend_cap`, `subscription_lapsed` or `payment_method_required` (an
|
|
54
|
+
* open set); null while ACTIVE.
|
|
55
|
+
*/
|
|
53
56
|
reason: AppPauseReason | null;
|
|
54
57
|
}
|
|
55
58
|
export interface AppTokenResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../src/domains/portal.ts"],"names":[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AAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,qBAAqB,CAAC;IAOjC,gFAAgF;IAC1E,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAO7D,+DAA+D;IACzD,gBAAgB,IAAI,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAK1D,8EAA8E;IACxE,oBAAoB,CAAC,KAAK,EAAE;QAChC,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QACxB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAS/B;;;;;;;;;;;;;;;;;OAiBG;IACG,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IA8BnD;;;;;;OAMG;IACG,oBAAoB,CACxB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAQnC;;;;OAIG;IACG,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IAa3D;;;;;;OAMG;IACG,sBAAsB,CAC1B,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GACtD,OAAO,CAAC,MAAM,CAAC;IAoClB;;;;;OAKG;IACG,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;CAmBvE"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -267,6 +267,11 @@ export declare const ACCOUNT_BLOCKED_CODE = "ACCOUNT_BLOCKED";
|
|
|
267
267
|
* request, an add or an invite; see {@link groupMemberBannedOf}.
|
|
268
268
|
*/
|
|
269
269
|
export declare const GROUP_MEMBER_BANNED_CODE = "GROUP_MEMBER_BANNED";
|
|
270
|
+
/**
|
|
271
|
+
* `extensions.code` for "a channel or team cap refuses this" (HTTP 409), on a join, an add or a
|
|
272
|
+
* creation (ck-api v2.77.0); see {@link groupLimitReachedOf}.
|
|
273
|
+
*/
|
|
274
|
+
export declare const GROUP_LIMIT_REACHED_CODE = "GROUP_LIMIT_REACHED";
|
|
270
275
|
/**
|
|
271
276
|
* `extensions.code` for "an org-managed player cannot do this" (HTTP 403): it has no wallet,
|
|
272
277
|
* and its mods are refused where its organization has not switched them on for the app; see
|
|
@@ -358,9 +363,12 @@ export interface MissingLegalDocument {
|
|
|
358
363
|
}
|
|
359
364
|
/**
|
|
360
365
|
* Why an app is paused, as `extensions.reason` on `APP_PAUSED` and
|
|
361
|
-
* `AppRuntimeGate.reason` carry it.
|
|
366
|
+
* `AppRuntimeGate.reason` carry it. `payment_method_required` (ck-api v2.76.0): the
|
|
367
|
+
* environment asks an organization for a saved card before its apps run, and the app's
|
|
368
|
+
* organization has none and no exemption (from v2.77.0 wallet funds do not count). Open union:
|
|
369
|
+
* the server may add one.
|
|
362
370
|
*/
|
|
363
|
-
export type AppPauseReason = 'insufficient_funds' | 'spend_cap' | 'subscription_lapsed' | (string & {});
|
|
371
|
+
export type AppPauseReason = 'insufficient_funds' | 'spend_cap' | 'subscription_lapsed' | 'payment_method_required' | (string & {});
|
|
364
372
|
/**
|
|
365
373
|
* An `ACTOR_EXISTS` refusal (creating an actor whose uuid is taken), or `null`.
|
|
366
374
|
* `ownedByCaller` is `extensions.ownedByCaller`: `true` means the actor is
|
|
@@ -393,6 +401,17 @@ export declare function accountBlockedOf(value: unknown): {
|
|
|
393
401
|
} | null;
|
|
394
402
|
/** Whether an error is a `GROUP_MEMBER_BANNED` refusal (HTTP 403); only an unban lifts it. */
|
|
395
403
|
export declare function groupMemberBannedOf(value: unknown): boolean;
|
|
404
|
+
/**
|
|
405
|
+
* A `GROUP_LIMIT_REACHED` refusal (HTTP 409), or `null`: the app's policy for the group type
|
|
406
|
+
* (`channelPolicy` / `teamPolicy`) caps it. `limit` is `maxMembers` (the group is full) or
|
|
407
|
+
* `maxGroupsPerUser` (the user is in as many groups of the type as the app allows), and `max`
|
|
408
|
+
* the cap; either is `null` when the server did not say. Not fixed by retrying: wait for a member
|
|
409
|
+
* to leave, leave a group, or raise the cap.
|
|
410
|
+
*/
|
|
411
|
+
export declare function groupLimitReachedOf(value: unknown): {
|
|
412
|
+
limit: 'maxMembers' | 'maxGroupsPerUser' | (string & {}) | null;
|
|
413
|
+
max: number | null;
|
|
414
|
+
} | null;
|
|
396
415
|
/**
|
|
397
416
|
* Whether an error is a `MANAGED_PLAYER_NOT_ALLOWED` refusal (HTTP 403): an org-managed
|
|
398
417
|
* player asked for a wallet, or for a mod, a Crowdy Studio write or the Studio agent in an app
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,iFAAiF;AACjF,MAAM,WAAW,yBAAyB;IACxC,mFAAmF;IACnF,OAAO,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,SAAS,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC/B,2EAA2E;IAC3E,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACpC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,oEAAoE;AACpE,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,yDAAyD;IACzD,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;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,GACb;IAAE,MAAM,EAAE,4BAA4B,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,CAKxD;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE1E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,CAKpF;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAET;AAED;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;gBACrC,KAAK,EAAE,OAAO;CAG3B;AAED;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;gBACrC,SAAS,EAAE,MAAM;CAG9B;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,8DAA8D;IAC9D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;gBAEjB,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO;CAKnG;AAED;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;CAAG"}
|
package/dist/errors.js
CHANGED
|
@@ -263,6 +263,11 @@ export const ACCOUNT_BLOCKED_CODE = 'ACCOUNT_BLOCKED';
|
|
|
263
263
|
* request, an add or an invite; see {@link groupMemberBannedOf}.
|
|
264
264
|
*/
|
|
265
265
|
export const GROUP_MEMBER_BANNED_CODE = 'GROUP_MEMBER_BANNED';
|
|
266
|
+
/**
|
|
267
|
+
* `extensions.code` for "a channel or team cap refuses this" (HTTP 409), on a join, an add or a
|
|
268
|
+
* creation (ck-api v2.77.0); see {@link groupLimitReachedOf}.
|
|
269
|
+
*/
|
|
270
|
+
export const GROUP_LIMIT_REACHED_CODE = 'GROUP_LIMIT_REACHED';
|
|
266
271
|
/**
|
|
267
272
|
* `extensions.code` for "an org-managed player cannot do this" (HTTP 403): it has no wallet,
|
|
268
273
|
* and its mods are refused where its organization has not switched them on for the app; see
|
|
@@ -392,6 +397,23 @@ export function accountBlockedOf(value) {
|
|
|
392
397
|
export function groupMemberBannedOf(value) {
|
|
393
398
|
return errorWithCode(value, GROUP_MEMBER_BANNED_CODE) !== null;
|
|
394
399
|
}
|
|
400
|
+
/**
|
|
401
|
+
* A `GROUP_LIMIT_REACHED` refusal (HTTP 409), or `null`: the app's policy for the group type
|
|
402
|
+
* (`channelPolicy` / `teamPolicy`) caps it. `limit` is `maxMembers` (the group is full) or
|
|
403
|
+
* `maxGroupsPerUser` (the user is in as many groups of the type as the app allows), and `max`
|
|
404
|
+
* the cap; either is `null` when the server did not say. Not fixed by retrying: wait for a member
|
|
405
|
+
* to leave, leave a group, or raise the cap.
|
|
406
|
+
*/
|
|
407
|
+
export function groupLimitReachedOf(value) {
|
|
408
|
+
const entry = errorWithCode(value, GROUP_LIMIT_REACHED_CODE);
|
|
409
|
+
if (!entry)
|
|
410
|
+
return null;
|
|
411
|
+
const { limit, max } = entry.extensions ?? {};
|
|
412
|
+
return {
|
|
413
|
+
limit: typeof limit === 'string' && limit.length > 0 ? limit : null,
|
|
414
|
+
max: typeof max === 'number' && Number.isFinite(max) ? max : null,
|
|
415
|
+
};
|
|
416
|
+
}
|
|
395
417
|
/**
|
|
396
418
|
* Whether an error is a `MANAGED_PLAYER_NOT_ALLOWED` refusal (HTTP 403): an org-managed
|
|
397
419
|
* player asked for a wallet, or for a mod, a Crowdy Studio write or the Studio agent in an app
|