@dork-labs/cloud-api 0.81.0 → 0.82.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.
Files changed (53) hide show
  1. package/README.md +51 -1
  2. package/dist/billing.d.ts +26 -2
  3. package/dist/billing.d.ts.map +1 -1
  4. package/dist/billing.js +37 -0
  5. package/dist/billing.js.map +1 -1
  6. package/dist/communities.d.ts +706 -0
  7. package/dist/communities.d.ts.map +1 -0
  8. package/dist/communities.js +578 -0
  9. package/dist/communities.js.map +1 -0
  10. package/dist/connections.d.ts +3 -3
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/primitives.d.ts +49 -0
  16. package/dist/primitives.d.ts.map +1 -1
  17. package/dist/primitives.js +63 -0
  18. package/dist/primitives.js.map +1 -1
  19. package/dist/problem.d.ts +15 -0
  20. package/dist/problem.d.ts.map +1 -1
  21. package/dist/problem.js +22 -1
  22. package/dist/problem.js.map +1 -1
  23. package/dist/remote.d.ts +2 -2
  24. package/dist/routes.d.ts +43 -0
  25. package/dist/routes.d.ts.map +1 -1
  26. package/dist/routes.js +65 -0
  27. package/dist/routes.js.map +1 -1
  28. package/dist/seats.d.ts +5 -5
  29. package/fixtures/v1/billing/entitlements-communities.json +40 -0
  30. package/fixtures/v1/communities/claim-link.json +5 -0
  31. package/fixtures/v1/communities/keep-request.json +3 -0
  32. package/fixtures/v1/communities/keep.json +34 -0
  33. package/fixtures/v1/communities/list.json +161 -0
  34. package/fixtures/v1/communities/move-cancelled.json +11 -0
  35. package/fixtures/v1/communities/move-claimed.json +19 -0
  36. package/fixtures/v1/communities/move-failed.json +11 -0
  37. package/fixtures/v1/communities/move-importing.json +19 -0
  38. package/fixtures/v1/communities/move-ready.json +19 -0
  39. package/fixtures/v1/communities/move-start-request.json +7 -0
  40. package/fixtures/v1/communities/move-start.json +20 -0
  41. package/fixtures/v1/communities/moves.json +35 -0
  42. package/fixtures/v1/communities/name-check-free.json +5 -0
  43. package/fixtures/v1/communities/name-check-taken.json +5 -0
  44. package/fixtures/v1/communities/restore.json +31 -0
  45. package/fixtures/v1/communities/start-replay.json +31 -0
  46. package/fixtures/v1/communities/start-request.json +5 -0
  47. package/fixtures/v1/communities/start.json +35 -0
  48. package/fixtures/v1/index.json +24 -1
  49. package/fixtures/v1/problem/community-name-reserved.json +5 -0
  50. package/fixtures/v1/problem/community-name-taken.json +5 -0
  51. package/fixtures/v1/problem/entitlement-required-action.json +8 -0
  52. package/fixtures/v1/problem/import-too-large.json +6 -0
  53. package/package.json +3 -3
@@ -0,0 +1,161 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "communityId": "4f1c2b7e-8a3d-4e5f-9b6a-1c2d3e4f5a6b",
5
+ "orgId": "org_0001",
6
+ "name": "Acme builders",
7
+ "shortName": "acme",
8
+ "communityUrl": "https://community.example.invalid/c/4f1c2b7e-8a3d-4e5f-9b6a-1c2d3e4f5a6b",
9
+ "state": "active",
10
+ "hold": null,
11
+ "deletionAt": null,
12
+ "notice": null,
13
+ "kept": true,
14
+ "moveId": null,
15
+ "limits": {
16
+ "maxActiveMembers": 200,
17
+ "maxStorageBytes": 2000000000
18
+ },
19
+ "usage": {
20
+ "activeMembers": 12,
21
+ "storageBytes": 48213504,
22
+ "measuredAt": "2026-09-23T12:00:00.000Z"
23
+ },
24
+ "actions": {
25
+ "claimLink": false,
26
+ "keep": {
27
+ "allowed": false,
28
+ "wouldHold": []
29
+ },
30
+ "restore": false
31
+ },
32
+ "createdAt": "2026-09-01T09:00:00.000Z"
33
+ },
34
+ {
35
+ "communityId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
36
+ "orgId": "org_0001",
37
+ "name": "Night shift",
38
+ "shortName": null,
39
+ "communityUrl": "https://community.example.invalid/c/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
40
+ "state": "pending_owner",
41
+ "hold": null,
42
+ "deletionAt": null,
43
+ "notice": null,
44
+ "kept": false,
45
+ "moveId": null,
46
+ "limits": {
47
+ "maxActiveMembers": null,
48
+ "maxStorageBytes": null
49
+ },
50
+ "usage": null,
51
+ "actions": {
52
+ "claimLink": true,
53
+ "keep": {
54
+ "allowed": false,
55
+ "wouldHold": []
56
+ },
57
+ "restore": false
58
+ },
59
+ "createdAt": "2026-09-23T11:00:00.000Z"
60
+ },
61
+ {
62
+ "communityId": "2b3c4d5e-6f70-4812-9a3b-4c5d6e7f8091",
63
+ "orgId": "org_0001",
64
+ "name": "Reading group",
65
+ "shortName": "reading-group",
66
+ "communityUrl": "https://community.example.invalid/c/2b3c4d5e-6f70-4812-9a3b-4c5d6e7f8091",
67
+ "state": "held",
68
+ "hold": {
69
+ "reason": "inactive",
70
+ "since": "2026-08-01T00:00:00.000Z",
71
+ "deletionNoticeAt": null
72
+ },
73
+ "deletionAt": null,
74
+ "notice": null,
75
+ "kept": false,
76
+ "moveId": null,
77
+ "limits": {
78
+ "maxActiveMembers": 200,
79
+ "maxStorageBytes": 2000000000
80
+ },
81
+ "usage": {
82
+ "activeMembers": 4,
83
+ "storageBytes": 1048576,
84
+ "measuredAt": "2026-09-23T12:00:00.000Z"
85
+ },
86
+ "actions": {
87
+ "claimLink": false,
88
+ "keep": {
89
+ "allowed": true,
90
+ "wouldHold": ["4f1c2b7e-8a3d-4e5f-9b6a-1c2d3e4f5a6b"]
91
+ },
92
+ "restore": true
93
+ },
94
+ "createdAt": "2025-06-01T09:00:00.000Z"
95
+ },
96
+ {
97
+ "communityId": "7e8f9a0b-1c2d-4e3f-8a4b-5c6d7e8f9a0b",
98
+ "orgId": "org_0001",
99
+ "name": "Old project",
100
+ "shortName": null,
101
+ "communityUrl": "https://community.example.invalid/c/7e8f9a0b-1c2d-4e3f-8a4b-5c6d7e8f9a0b",
102
+ "state": "deletion_pending",
103
+ "hold": null,
104
+ "deletionAt": "2026-09-30T00:00:00.000Z",
105
+ "notice": {
106
+ "title": "This community will be deleted.",
107
+ "detail": "Its owner asked for it to be deleted. The owner can cancel from the community's settings until the date shown.",
108
+ "actionUrl": "https://community.example.invalid/c/7e8f9a0b-1c2d-4e3f-8a4b-5c6d7e8f9a0b/settings",
109
+ "actionLabel": "Open settings"
110
+ },
111
+ "kept": false,
112
+ "moveId": null,
113
+ "limits": {
114
+ "maxActiveMembers": 200,
115
+ "maxStorageBytes": 2000000000
116
+ },
117
+ "usage": {
118
+ "activeMembers": 12,
119
+ "storageBytes": 48213504,
120
+ "measuredAt": "2026-09-23T12:00:00.000Z"
121
+ },
122
+ "actions": {
123
+ "claimLink": false,
124
+ "keep": {
125
+ "allowed": false,
126
+ "wouldHold": []
127
+ },
128
+ "restore": false
129
+ },
130
+ "createdAt": "2025-01-10T09:00:00.000Z"
131
+ },
132
+ {
133
+ "communityId": "5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
134
+ "orgId": "org_0001",
135
+ "name": "Old garden",
136
+ "shortName": "old-garden",
137
+ "communityUrl": "https://community.example.invalid/c/5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
138
+ "state": "pending_owner",
139
+ "hold": null,
140
+ "deletionAt": null,
141
+ "notice": null,
142
+ "kept": false,
143
+ "moveId": "move_0001",
144
+ "limits": {
145
+ "maxActiveMembers": 200,
146
+ "maxStorageBytes": 2000000000
147
+ },
148
+ "usage": null,
149
+ "actions": {
150
+ "claimLink": false,
151
+ "keep": {
152
+ "allowed": false,
153
+ "wouldHold": []
154
+ },
155
+ "restore": false
156
+ },
157
+ "createdAt": "2026-09-23T11:30:00.000Z"
158
+ }
159
+ ],
160
+ "nextCursor": null
161
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "moveId": "move_0001",
3
+ "communityId": "5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
4
+ "communityUrl": "https://community.example.invalid/c/5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
5
+ "name": "Old garden",
6
+ "state": "cancelled",
7
+ "failureCode": null,
8
+ "report": null,
9
+ "pollAfterMs": null,
10
+ "updatedAt": "2026-09-23T11:35:00.000Z"
11
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "moveId": "move_0001",
3
+ "communityId": "5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
4
+ "communityUrl": "https://community.example.invalid/c/5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
5
+ "name": "Old garden",
6
+ "state": "claimed",
7
+ "failureCode": null,
8
+ "report": {
9
+ "channels": 12,
10
+ "entries": 3400,
11
+ "attachments": 210,
12
+ "historicalMembers": 18,
13
+ "historicalAgents": 5,
14
+ "attachmentBytes": 70254592,
15
+ "countedBytes": 70254592
16
+ },
17
+ "pollAfterMs": null,
18
+ "updatedAt": "2026-09-23T12:10:00.000Z"
19
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "moveId": "move_0001",
3
+ "communityId": "5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
4
+ "communityUrl": "https://community.example.invalid/c/5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
5
+ "name": "Old garden",
6
+ "state": "failed",
7
+ "failureCode": "not_owner_export",
8
+ "report": null,
9
+ "pollAfterMs": null,
10
+ "updatedAt": "2026-09-23T11:33:00.000Z"
11
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "moveId": "move_0001",
3
+ "communityId": "5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
4
+ "communityUrl": "https://community.example.invalid/c/5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
5
+ "name": "Old garden",
6
+ "state": "importing",
7
+ "failureCode": null,
8
+ "report": {
9
+ "channels": 12,
10
+ "entries": 3400,
11
+ "attachments": 210,
12
+ "historicalMembers": 18,
13
+ "historicalAgents": 5,
14
+ "attachmentBytes": 70254592,
15
+ "countedBytes": 70254592
16
+ },
17
+ "pollAfterMs": 5000,
18
+ "updatedAt": "2026-09-23T11:34:00.000Z"
19
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "moveId": "move_0001",
3
+ "communityId": "5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
4
+ "communityUrl": "https://community.example.invalid/c/5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
5
+ "name": "Old garden",
6
+ "state": "ready",
7
+ "failureCode": null,
8
+ "report": {
9
+ "channels": 12,
10
+ "entries": 3400,
11
+ "attachments": 210,
12
+ "historicalMembers": 18,
13
+ "historicalAgents": 5,
14
+ "attachmentBytes": 70254592,
15
+ "countedBytes": 70254592
16
+ },
17
+ "pollAfterMs": null,
18
+ "updatedAt": "2026-09-23T11:40:00.000Z"
19
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "idempotencyKey": "move_2c9e41",
3
+ "name": "Old garden",
4
+ "shortName": "old-garden",
5
+ "archiveBytes": 73400320,
6
+ "archiveSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
7
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "move": {
3
+ "moveId": "move_0001",
4
+ "communityId": "5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
5
+ "communityUrl": "https://community.example.invalid/c/5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
6
+ "name": "Old garden",
7
+ "state": "awaiting_upload",
8
+ "failureCode": null,
9
+ "report": null,
10
+ "pollAfterMs": 5000,
11
+ "updatedAt": "2026-09-23T11:30:00.000Z"
12
+ },
13
+ "upload": {
14
+ "url": "https://community.example.invalid/api/v1/imports/imp_0001/archive",
15
+ "token": "upl_opaque_0001",
16
+ "expiresAt": "2026-09-24T11:30:00.000Z",
17
+ "maxBytes": 1073741824
18
+ },
19
+ "replayed": false
20
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "moveId": "move_0001",
5
+ "communityId": "5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
6
+ "communityUrl": "https://community.example.invalid/c/5d6e7f80-9102-4a3b-8c4d-5e6f70819203",
7
+ "name": "Old garden",
8
+ "state": "importing",
9
+ "failureCode": null,
10
+ "report": {
11
+ "channels": 12,
12
+ "entries": 3400,
13
+ "attachments": 210,
14
+ "historicalMembers": 18,
15
+ "historicalAgents": 5,
16
+ "attachmentBytes": 70254592,
17
+ "countedBytes": 70254592
18
+ },
19
+ "pollAfterMs": 5000,
20
+ "updatedAt": "2026-09-23T11:34:00.000Z"
21
+ },
22
+ {
23
+ "moveId": "move_0000",
24
+ "communityId": "3c4d5e6f-7081-4923-8a4b-5c6d7e8f9012",
25
+ "communityUrl": "https://community.example.invalid/c/3c4d5e6f-7081-4923-8a4b-5c6d7e8f9012",
26
+ "name": "Book club",
27
+ "state": "failed",
28
+ "failureCode": "checksum_mismatch",
29
+ "report": null,
30
+ "pollAfterMs": null,
31
+ "updatedAt": "2026-09-20T08:00:00.000Z"
32
+ }
33
+ ],
34
+ "nextCursor": null
35
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "night-shift",
3
+ "available": true,
4
+ "reason": null
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "acme",
3
+ "available": false,
4
+ "reason": "taken"
5
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "communityId": "2b3c4d5e-6f70-4812-9a3b-4c5d6e7f8091",
3
+ "orgId": "org_0001",
4
+ "name": "Reading group",
5
+ "shortName": "reading-group",
6
+ "communityUrl": "https://community.example.invalid/c/2b3c4d5e-6f70-4812-9a3b-4c5d6e7f8091",
7
+ "state": "active",
8
+ "hold": null,
9
+ "deletionAt": null,
10
+ "notice": null,
11
+ "kept": false,
12
+ "moveId": null,
13
+ "limits": {
14
+ "maxActiveMembers": 200,
15
+ "maxStorageBytes": 2000000000
16
+ },
17
+ "usage": {
18
+ "activeMembers": 12,
19
+ "storageBytes": 48213504,
20
+ "measuredAt": "2026-09-23T12:00:00.000Z"
21
+ },
22
+ "actions": {
23
+ "claimLink": false,
24
+ "keep": {
25
+ "allowed": false,
26
+ "wouldHold": []
27
+ },
28
+ "restore": false
29
+ },
30
+ "createdAt": "2025-06-01T09:00:00.000Z"
31
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "community": {
3
+ "communityId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
4
+ "orgId": "org_0001",
5
+ "name": "Night shift",
6
+ "shortName": "night-shift",
7
+ "communityUrl": "https://community.example.invalid/c/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
8
+ "state": "pending_owner",
9
+ "hold": null,
10
+ "deletionAt": null,
11
+ "notice": null,
12
+ "kept": false,
13
+ "moveId": null,
14
+ "limits": {
15
+ "maxActiveMembers": null,
16
+ "maxStorageBytes": null
17
+ },
18
+ "usage": null,
19
+ "actions": {
20
+ "claimLink": true,
21
+ "keep": {
22
+ "allowed": false,
23
+ "wouldHold": []
24
+ },
25
+ "restore": false
26
+ },
27
+ "createdAt": "2026-09-23T11:00:00.000Z"
28
+ },
29
+ "claim": null,
30
+ "replayed": true
31
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "idempotencyKey": "start_7f3a9c",
3
+ "name": "Night shift",
4
+ "shortName": "night-shift"
5
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "community": {
3
+ "communityId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
4
+ "orgId": "org_0001",
5
+ "name": "Night shift",
6
+ "shortName": "night-shift",
7
+ "communityUrl": "https://community.example.invalid/c/9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
8
+ "state": "pending_owner",
9
+ "hold": null,
10
+ "deletionAt": null,
11
+ "notice": null,
12
+ "kept": false,
13
+ "moveId": null,
14
+ "limits": {
15
+ "maxActiveMembers": null,
16
+ "maxStorageBytes": null
17
+ },
18
+ "usage": null,
19
+ "actions": {
20
+ "claimLink": true,
21
+ "keep": {
22
+ "allowed": false,
23
+ "wouldHold": []
24
+ },
25
+ "restore": false
26
+ },
27
+ "createdAt": "2026-09-23T11:00:00.000Z"
28
+ },
29
+ "claim": {
30
+ "communityId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
31
+ "claimUrl": "https://community.example.invalid/claim/ct_opaque_0001",
32
+ "expiresAt": "2026-09-30T11:00:00.000Z"
33
+ },
34
+ "replayed": false
35
+ }
@@ -61,6 +61,29 @@
61
61
  "remote/command-keepalive-reconnect.json": "RemoteCommandSchema",
62
62
  "remote/commands-ack-request.json": "RemoteCommandAckRequestSchema",
63
63
  "remote/commands-ack.json": "RemoteCommandAckResponseSchema",
64
- "remote/events.json": "RemoteEventBatchResponseSchema"
64
+ "remote/events.json": "RemoteEventBatchResponseSchema",
65
+ "problem/community-name-taken.json": "ProblemSchema",
66
+ "problem/import-too-large.json": "ProblemSchema",
67
+ "problem/entitlement-required-action.json": "ProblemSchema",
68
+ "billing/entitlements-communities.json": "EntitlementsSchema",
69
+ "communities/list.json": "HostedCommunityListResponseSchema",
70
+ "communities/start-request.json": "CommunityStartRequestSchema",
71
+ "communities/start.json": "CommunityStartResponseSchema",
72
+ "communities/start-replay.json": "CommunityStartResponseSchema",
73
+ "communities/name-check-free.json": "CommunityNameCheckResponseSchema",
74
+ "communities/name-check-taken.json": "CommunityNameCheckResponseSchema",
75
+ "communities/claim-link.json": "CommunityClaimLinkSchema",
76
+ "communities/keep.json": "CommunityKeepResponseSchema",
77
+ "communities/move-start-request.json": "CommunityMoveStartRequestSchema",
78
+ "communities/move-start.json": "CommunityMoveStartResponseSchema",
79
+ "communities/move-importing.json": "CommunityMoveSchema",
80
+ "communities/move-ready.json": "CommunityMoveSchema",
81
+ "communities/move-failed.json": "CommunityMoveSchema",
82
+ "communities/keep-request.json": "CommunityKeepRequestSchema",
83
+ "communities/restore.json": "HostedCommunitySchema",
84
+ "communities/move-cancelled.json": "CommunityMoveSchema",
85
+ "communities/move-claimed.json": "CommunityMoveSchema",
86
+ "communities/moves.json": "CommunityMoveListResponseSchema",
87
+ "problem/community-name-reserved.json": "ProblemSchema"
65
88
  }
66
89
  }
@@ -0,0 +1,5 @@
1
+ {
2
+ "code": "community_name_reserved",
3
+ "status": 409,
4
+ "title": "That web address can't be used."
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "code": "community_name_taken",
3
+ "status": 409,
4
+ "title": "That web address is taken."
5
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "code": "entitlement_required",
3
+ "status": 403,
4
+ "title": "Your account has no room for another community.",
5
+ "detail": "The text the service chose to explain the refusal.",
6
+ "actionUrl": "https://account.example.invalid/communities",
7
+ "actionLabel": "Open your account"
8
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "code": "import_too_large",
3
+ "status": 413,
4
+ "title": "That export is too large to move.",
5
+ "detail": "Remove some files from the old community, export it again, and try once more."
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dork-labs/cloud-api",
3
- "version": "0.81.0",
3
+ "version": "0.82.0",
4
4
  "description": "The public wire contract for DorkOS Cloud: Zod schemas for the /v1 surface, plus a thin fetch client.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -39,8 +39,8 @@
39
39
  "typescript": "^5.9.3",
40
40
  "vitest": "^4.1.11",
41
41
  "zod": "^4.6.2",
42
- "@dorkos/eslint-config": "0.0.0",
43
- "@dorkos/typescript-config": "0.0.0"
42
+ "@dorkos/typescript-config": "0.0.0",
43
+ "@dorkos/eslint-config": "0.0.0"
44
44
  },
45
45
  "keywords": [
46
46
  "dorkos",