@stapel/workspaces-react 0.9.0 → 0.11.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 (46) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/api/generated/schema.d.ts +283 -17
  3. package/dist/api/generated/schema.d.ts.map +1 -1
  4. package/dist/api/types.d.ts +23 -0
  5. package/dist/api/types.d.ts.map +1 -1
  6. package/dist/api/workspacesApi.d.ts +37 -1
  7. package/dist/api/workspacesApi.d.ts.map +1 -1
  8. package/dist/api/workspacesApi.js +4 -0
  9. package/dist/api/workspacesApi.js.map +1 -1
  10. package/dist/i18n/generated/errors.gen.d.ts +30 -0
  11. package/dist/i18n/generated/errors.gen.d.ts.map +1 -1
  12. package/dist/i18n/generated/errors.gen.js +15 -0
  13. package/dist/i18n/generated/errors.gen.js.map +1 -1
  14. package/dist/i18n/generated/errors.ru.gen.d.ts.map +1 -1
  15. package/dist/i18n/generated/errors.ru.gen.js +5 -0
  16. package/dist/i18n/generated/errors.ru.gen.js.map +1 -1
  17. package/dist/index.d.ts +5 -3
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +3 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/model/mutations.d.ts +98 -1
  22. package/dist/model/mutations.d.ts.map +1 -1
  23. package/dist/model/mutations.js +132 -0
  24. package/dist/model/mutations.js.map +1 -1
  25. package/dist/model/queryKeys.d.ts +1 -0
  26. package/dist/model/queryKeys.d.ts.map +1 -1
  27. package/dist/model/queryKeys.js +7 -0
  28. package/dist/model/queryKeys.js.map +1 -1
  29. package/dist/model/selection.d.ts +146 -0
  30. package/dist/model/selection.d.ts.map +1 -0
  31. package/dist/model/selection.js +217 -0
  32. package/dist/model/selection.js.map +1 -0
  33. package/llms.txt +11 -3
  34. package/manifest.json +117 -2
  35. package/package.json +2 -2
  36. package/src/analytics/generated/events.json +1 -1
  37. package/src/api/generated/schema.ts +283 -17
  38. package/src/api/types.ts +23 -0
  39. package/src/api/workspacesApi.ts +74 -0
  40. package/src/i18n/generated/errors.gen.ts +15 -0
  41. package/src/i18n/generated/errors.json +35 -0
  42. package/src/i18n/generated/errors.ru.gen.ts +5 -0
  43. package/src/index.ts +22 -0
  44. package/src/model/mutations.ts +186 -0
  45. package/src/model/queryKeys.ts +8 -0
  46. package/src/model/selection.tsx +382 -0
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
- # @stapel/workspaces-react 0.9.0
1
+ # @stapel/workspaces-react 0.11.0
2
2
 
3
- Headless React flow pair for stapel-workspaces (contract >=0.18 <0.19) — business + state, zero visual opinion.
3
+ Headless React flow pair for stapel-workspaces (contract >=0.20 <0.21) — business + state, zero visual opinion.
4
4
  Built on @stapel/core: typed client + StapelApiError envelope, auth token refresh,
5
5
  verification-403 interception, i18n engine, analytics facade, TanStack Query layer.
6
6
 
@@ -33,12 +33,16 @@ Paths are relative to `/workspaces/api/v1/`.
33
33
  - workspaces_api_v1_invitations_claim_create: POST /invitations/{token}/claim
34
34
  - workspaces_api_v1_invitations_decline_create: POST /invitations/{token}/decline
35
35
  - workspaces_api_v1_invitations_list: GET /{workspace_id}/invitations
36
+ - workspaces_api_v1_invitations_name_partial_update: PATCH /{workspace_id}/invitations/{invitation_id}/name
36
37
  - workspaces_api_v1_invitations_resend_create: POST /{workspace_id}/invitations/{invitation_id}/resend
37
38
  - workspaces_api_v1_invitations_retrieve: GET /invitations/{token}
38
39
  - workspaces_api_v1_invitations_revoke_create: POST /{workspace_id}/invitations/{invitation_id}/revoke
40
+ - workspaces_api_v1_me_preferred_workspace_destroy: DELETE /me/preferred-workspace
41
+ - workspaces_api_v1_me_preferred_workspace_update: PUT /me/preferred-workspace
39
42
  - workspaces_api_v1_members_destroy: DELETE /{workspace_id}/members/{user_id}
40
43
  - workspaces_api_v1_members_invite_create: POST /{workspace_id}/members/invite
41
44
  - workspaces_api_v1_members_list: GET /{workspace_id}/members
45
+ - workspaces_api_v1_members_name_partial_update: PATCH /{workspace_id}/members/{user_id}/name
42
46
  - workspaces_api_v1_members_partial_update: PATCH /{workspace_id}/members/{user_id}
43
47
  - workspaces_api_v1_members_password_reset_create: POST /{workspace_id}/members/{user_id}/password/reset
44
48
  - workspaces_api_v1_members_provision_create: POST /{workspace_id}/members/provision
@@ -50,6 +54,7 @@ Paths are relative to `/workspaces/api/v1/`.
50
54
  ## Query hooks (server state; keys come only from the key factory)
51
55
  - useAcceptInvitation (mutation) → acceptInvitation
52
56
  - useClaimInvitation (mutation) → claimInvitation
57
+ - useClearPreferredWorkspace (mutation) → clearPreferredWorkspace
53
58
  - useCreateWorkspace (mutation) → createWorkspace
54
59
  - useDeclineInvitation (mutation) → declineInvitation
55
60
  - useDeleteWorkspace (mutation) → deleteWorkspace
@@ -59,10 +64,13 @@ Paths are relative to `/workspaces/api/v1/`.
59
64
  - useInviteMembers (mutation) → inviteMembers
60
65
  - useMembers (query) → listMembers
61
66
  - useRemoveMember (mutation) → removeMember
67
+ - useRenameInvitation (mutation) → renameInvitation
68
+ - useRenameMember (mutation) → renameMember
62
69
  - useResendInvitation (mutation) → resendInvitation
63
70
  - useResetMemberPassword (mutation) → resetMemberPassword
64
71
  - useRevokeInvitation (mutation) → revokeInvitation
65
72
  - useRoles (query) → listRoles
73
+ - useSetPreferredWorkspace (mutation) → setPreferredWorkspace
66
74
  - useUpdateMemberRole (mutation) → updateMemberRole
67
75
  - useUpdateSecuritySettings (mutation) → getWorkspace+updateWorkspace
68
76
  - useUpdateWorkspace (mutation) → updateWorkspace
@@ -70,7 +78,7 @@ Paths are relative to `/workspaces/api/v1/`.
70
78
  - useWorkspaces (query) → listWorkspaces
71
79
 
72
80
  ## Errors (render t(code, params); UX from remediation)
73
- 61 keys (full catalog: manifest.json §errors). By remediation: fix_input 29 · retry 12 · contact_support 7 · wait_and_retry 6 · verify 5 · reauthenticate 2.
81
+ 66 keys (full catalog: manifest.json §errors). By remediation: fix_input 33 · retry 12 · contact_support 7 · wait_and_retry 7 · verify 5 · reauthenticate 2.
74
82
  Param-bearing keys (interpolation slots matter):
75
83
  - error.400.field.blank [400] → fix_input {field}
76
84
  - error.400.field.does_not_exist [400] → fix_input {field}
package/manifest.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "$generated": "by scripts/gen-manifest.mjs — do not edit; drift-gated (pnpm gen:manifest:check)",
3
3
  "package": "@stapel/workspaces-react",
4
- "version": "0.9.0",
4
+ "version": "0.11.0",
5
5
  "backend": {
6
6
  "module": "stapel-workspaces",
7
- "contract": ">=0.18 <0.19"
7
+ "contract": ">=0.20 <0.21"
8
8
  },
9
9
  "layers": [
10
10
  "api",
@@ -81,6 +81,13 @@
81
81
  "request": null,
82
82
  "response": "PaginatedInvitationResponseList"
83
83
  },
84
+ "workspaces_api_v1_invitations_name_partial_update": {
85
+ "method": "PATCH",
86
+ "path": "/workspaces/api/v1/{workspace_id}/invitations/{invitation_id}/name",
87
+ "tag": "Members",
88
+ "request": "PatchedDisplayNameUpdateRequest",
89
+ "response": "DisplayNameResponse"
90
+ },
84
91
  "workspaces_api_v1_invitations_resend_create": {
85
92
  "method": "POST",
86
93
  "path": "/workspaces/api/v1/{workspace_id}/invitations/{invitation_id}/resend",
@@ -102,6 +109,20 @@
102
109
  "request": null,
103
110
  "response": "InvitationResponse"
104
111
  },
112
+ "workspaces_api_v1_me_preferred_workspace_destroy": {
113
+ "method": "DELETE",
114
+ "path": "/workspaces/api/v1/me/preferred-workspace",
115
+ "tag": "Workspaces",
116
+ "request": null,
117
+ "response": "PreferredWorkspaceResponse"
118
+ },
119
+ "workspaces_api_v1_me_preferred_workspace_update": {
120
+ "method": "PUT",
121
+ "path": "/workspaces/api/v1/me/preferred-workspace",
122
+ "tag": "Workspaces",
123
+ "request": "PreferredWorkspaceRequest",
124
+ "response": "PreferredWorkspaceResponse"
125
+ },
105
126
  "workspaces_api_v1_members_destroy": {
106
127
  "method": "DELETE",
107
128
  "path": "/workspaces/api/v1/{workspace_id}/members/{user_id}",
@@ -123,6 +144,13 @@
123
144
  "request": null,
124
145
  "response": "PaginatedMemberResponseList"
125
146
  },
147
+ "workspaces_api_v1_members_name_partial_update": {
148
+ "method": "PATCH",
149
+ "path": "/workspaces/api/v1/{workspace_id}/members/{user_id}/name",
150
+ "tag": "Members",
151
+ "request": "PatchedDisplayNameUpdateRequest",
152
+ "response": "DisplayNameResponse"
153
+ },
126
154
  "workspaces_api_v1_members_partial_update": {
127
155
  "method": "PATCH",
128
156
  "path": "/workspaces/api/v1/{workspace_id}/members/{user_id}",
@@ -193,6 +221,16 @@
193
221
  "kind": "mutation",
194
222
  "operation": "claimInvitation"
195
223
  },
224
+ "useClearPreferredWorkspace": {
225
+ "kind": "mutation",
226
+ "operation": "clearPreferredWorkspace",
227
+ "invalidates": [
228
+ [
229
+ "workspaces",
230
+ "list"
231
+ ]
232
+ ]
233
+ },
196
234
  "useCreateWorkspace": {
197
235
  "kind": "mutation",
198
236
  "operation": "createWorkspace",
@@ -288,6 +326,27 @@
288
326
  ]
289
327
  ]
290
328
  },
329
+ "useRenameInvitation": {
330
+ "kind": "mutation",
331
+ "operation": "renameInvitation",
332
+ "invalidates": [
333
+ [
334
+ "workspaces",
335
+ "invitations",
336
+ "{workspaceId}"
337
+ ]
338
+ ]
339
+ },
340
+ "useRenameMember": {
341
+ "kind": "mutation",
342
+ "operation": "renameMember",
343
+ "invalidates": [
344
+ [
345
+ "workspaces",
346
+ "members"
347
+ ]
348
+ ]
349
+ },
291
350
  "useResendInvitation": {
292
351
  "kind": "mutation",
293
352
  "operation": "resendInvitation",
@@ -334,6 +393,16 @@
334
393
  "roles"
335
394
  ]
336
395
  },
396
+ "useSetPreferredWorkspace": {
397
+ "kind": "mutation",
398
+ "operation": "setPreferredWorkspace",
399
+ "invalidates": [
400
+ [
401
+ "workspaces",
402
+ "list"
403
+ ]
404
+ ]
405
+ },
337
406
  "useUpdateMemberRole": {
338
407
  "kind": "mutation",
339
408
  "operation": "updateMemberRole",
@@ -422,6 +491,26 @@
422
491
  "params": [],
423
492
  "remediation": "retry"
424
493
  },
494
+ "error.400.display_name_emoji": {
495
+ "status": 400,
496
+ "params": [],
497
+ "remediation": "fix_input"
498
+ },
499
+ "error.400.display_name_forbidden_chars": {
500
+ "status": 400,
501
+ "params": [],
502
+ "remediation": "fix_input"
503
+ },
504
+ "error.400.display_name_invisible_chars": {
505
+ "status": 400,
506
+ "params": [],
507
+ "remediation": "fix_input"
508
+ },
509
+ "error.400.display_name_too_short": {
510
+ "status": 400,
511
+ "params": [],
512
+ "remediation": "fix_input"
513
+ },
425
514
  "error.400.expected_list": {
426
515
  "status": 400,
427
516
  "params": [],
@@ -742,6 +831,11 @@
742
831
  "status": 503,
743
832
  "params": [],
744
833
  "remediation": "wait_and_retry"
834
+ },
835
+ "error.503.profiles_unavailable": {
836
+ "status": 503,
837
+ "params": [],
838
+ "remediation": "wait_and_retry"
745
839
  }
746
840
  },
747
841
  "events": {
@@ -852,6 +946,10 @@
852
946
  "error.400.bad_request",
853
947
  "error.400.captcha_invalid",
854
948
  "error.400.captcha_required",
949
+ "error.400.display_name_emoji",
950
+ "error.400.display_name_forbidden_chars",
951
+ "error.400.display_name_invisible_chars",
952
+ "error.400.display_name_too_short",
855
953
  "error.400.expected_list",
856
954
  "error.400.field.blank",
857
955
  "error.400.field.does_not_exist",
@@ -909,6 +1007,7 @@
909
1007
  "error.429.too_many_requests",
910
1008
  "error.500.internal",
911
1009
  "error.503.auth_unavailable",
1010
+ "error.503.profiles_unavailable",
912
1011
  "workspaces.accept.accept",
913
1012
  "workspaces.accept.accepted",
914
1013
  "workspaces.accept.accepting",
@@ -986,6 +1085,7 @@
986
1085
  "WORKSPACES_FLOWS",
987
1086
  "WORKSPACES_I18N_KEYS",
988
1087
  "WorkspaceList",
1088
+ "WorkspaceSelectionProvider",
989
1089
  "WorkspacesProvider",
990
1090
  "WorkspacesRuntimeContext",
991
1091
  "capabilityLevel",
@@ -1007,6 +1107,7 @@
1007
1107
  "useCapabilities",
1008
1108
  "useCapabilityGate",
1009
1109
  "useClaimInvitation",
1110
+ "useClearPreferredWorkspace",
1010
1111
  "useCreateWorkspace",
1011
1112
  "useDeclineInvitation",
1012
1113
  "useDeleteWorkspace",
@@ -1018,14 +1119,18 @@
1018
1119
  "useInviteMembers",
1019
1120
  "useMembers",
1020
1121
  "useRemoveMember",
1122
+ "useRenameInvitation",
1123
+ "useRenameMember",
1021
1124
  "useResendInvitation",
1022
1125
  "useResetMemberPassword",
1023
1126
  "useRevokeInvitation",
1024
1127
  "useRoles",
1128
+ "useSetPreferredWorkspace",
1025
1129
  "useUpdateMemberRole",
1026
1130
  "useUpdateSecuritySettings",
1027
1131
  "useUpdateWorkspace",
1028
1132
  "useWorkspace",
1133
+ "useWorkspaceSelection",
1029
1134
  "useWorkspaces",
1030
1135
  "useWorkspacesAnalytics",
1031
1136
  "useWorkspacesApi",
@@ -1041,6 +1146,8 @@
1041
1146
  "CapabilityGate",
1042
1147
  "CapabilityLevel",
1043
1148
  "CreateWorkspacesRuntimeOptions",
1149
+ "DisplayNameResult",
1150
+ "DisplayNameUpdate",
1044
1151
  "FlowEndpoint",
1045
1152
  "FlowError",
1046
1153
  "FlowMachine",
@@ -1051,6 +1158,7 @@
1051
1158
  "InvitationClaim",
1052
1159
  "InvitationListData",
1053
1160
  "InvitationPreview",
1161
+ "InvitationRename",
1054
1162
  "InvitationStatusFilter",
1055
1163
  "InvitationsParams",
1056
1164
  "InviteAcceptFlowBag",
@@ -1064,10 +1172,13 @@
1064
1172
  "MemberPasswordReset",
1065
1173
  "MemberPasswordResetResult",
1066
1174
  "MemberPasswordResetVars",
1175
+ "MemberRename",
1067
1176
  "MemberRoleChange",
1068
1177
  "MemberRoleUpdate",
1069
1178
  "MembersBag",
1070
1179
  "MembersParams",
1180
+ "PreferredWorkspace",
1181
+ "PreferredWorkspaceResult",
1071
1182
  "ProvisionedUserPolicy",
1072
1183
  "Remediation",
1073
1184
  "RoleInfo",
@@ -1082,6 +1193,10 @@
1082
1193
  "WorkspaceListData",
1083
1194
  "WorkspaceRole",
1084
1195
  "WorkspaceSecuritySettings",
1196
+ "WorkspaceSelection",
1197
+ "WorkspaceSelectionProviderProps",
1198
+ "WorkspaceSelectionSource",
1199
+ "WorkspaceSelectionUrlBinding",
1085
1200
  "WorkspaceUpdate",
1086
1201
  "WorkspacesApi",
1087
1202
  "WorkspacesErrorCode",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stapel/workspaces-react",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "Headless React flow pair for stapel-workspaces: typed API client, TanStack Query hooks, flow machines, headless components, and i18n keys. Zero visual opinion.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -82,8 +82,8 @@
82
82
  "size-limit": "^11.2.0",
83
83
  "typescript": "^5.8.3",
84
84
  "vitest": "^3.2.4",
85
- "@stapel/core": "^0.10.0",
86
85
  "@stapel/showcase": "^0.2.0",
86
+ "@stapel/core": "^0.10.0",
87
87
  "@stapel/tokens": "^0.5.0"
88
88
  },
89
89
  "engines": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$generated": "by scripts/gen-events.mjs — do not edit; drift-gated (pnpm gen:events:check)",
3
3
  "package": "@stapel/workspaces-react",
4
- "version": "0.9.0",
4
+ "version": "0.11.0",
5
5
  "defined": [],
6
6
  "flows": []
7
7
  }