@stapel/workspaces-react 0.1.0 → 0.4.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/CHANGELOG.md +90 -0
- package/README.md +45 -3
- package/dist/api/generated/schema.d.ts +759 -0
- package/dist/api/generated/schema.d.ts.map +1 -0
- package/dist/api/generated/schema.js +2 -0
- package/dist/api/generated/schema.js.map +1 -0
- package/dist/api/types.d.ts +22 -6
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/workspacesApi.d.ts +3 -3
- package/dist/api/workspacesApi.d.ts.map +1 -1
- package/dist/api/workspacesApi.js +14 -1
- package/dist/api/workspacesApi.js.map +1 -1
- package/dist/flows/registry.d.ts +22 -0
- package/dist/flows/registry.d.ts.map +1 -0
- package/dist/flows/registry.js +20 -0
- package/dist/flows/registry.js.map +1 -0
- package/dist/headless/Members.d.ts +6 -1
- package/dist/headless/Members.d.ts.map +1 -1
- package/dist/headless/Members.js +1 -1
- package/dist/headless/Members.js.map +1 -1
- package/dist/headless/WorkspacesProvider.d.ts +5 -4
- package/dist/headless/WorkspacesProvider.d.ts.map +1 -1
- package/dist/headless/WorkspacesProvider.js +5 -7
- package/dist/headless/WorkspacesProvider.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/model/context.d.ts +6 -9
- package/dist/model/context.d.ts.map +1 -1
- package/dist/model/context.js +11 -16
- package/dist/model/context.js.map +1 -1
- package/dist/model/queries.d.ts +6 -4
- package/dist/model/queries.d.ts.map +1 -1
- package/dist/model/queries.js +8 -5
- package/dist/model/queries.js.map +1 -1
- package/dist/model/queryKeys.d.ts +2 -0
- package/dist/model/queryKeys.d.ts.map +1 -1
- package/dist/model/queryKeys.js +3 -0
- package/dist/model/queryKeys.js.map +1 -1
- package/dist/model/runtime.d.ts +12 -21
- package/dist/model/runtime.d.ts.map +1 -1
- package/dist/model/runtime.js +2 -14
- package/dist/model/runtime.js.map +1 -1
- package/llms.txt +14 -14
- package/manifest.json +34 -32
- package/package.json +5 -4
- package/src/analytics/generated/events.json +1 -1
- package/src/api/generated/schema.ts +761 -0
- package/src/api/types.ts +23 -6
- package/src/api/workspacesApi.ts +17 -5
- package/src/flows/registry.ts +32 -0
- package/src/headless/Members.tsx +7 -2
- package/src/headless/WorkspacesProvider.tsx +6 -11
- package/src/index.ts +4 -3
- package/src/model/context.tsx +16 -17
- package/src/model/queries.ts +16 -7
- package/src/model/queryKeys.ts +9 -0
- package/src/model/runtime.ts +14 -35
- package/dist/flows/generated/flows.gen.d.ts +0 -19
- package/dist/flows/generated/flows.gen.d.ts.map +0 -1
- package/dist/flows/generated/flows.gen.js +0 -23
- package/dist/flows/generated/flows.gen.js.map +0 -1
- package/src/flows/generated/flows.gen.ts +0 -38
- package/src/flows/generated/flows.json +0 -1
package/dist/model/runtime.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createModuleRuntime } from "@stapel/core";
|
|
2
2
|
import { createWorkspacesApi } from "../api/workspacesApi.js";
|
|
3
3
|
export function createWorkspacesRuntime(options) {
|
|
4
|
-
|
|
5
|
-
const client = createStapelClient({
|
|
6
|
-
baseUrl: options.baseUrl,
|
|
7
|
-
...(options.fetch !== undefined ? { fetch: options.fetch } : {}),
|
|
8
|
-
...(options.credentials !== undefined
|
|
9
|
-
? { credentials: options.credentials }
|
|
10
|
-
: {}),
|
|
11
|
-
...(options.defaultHeaders !== undefined
|
|
12
|
-
? { defaultHeaders: options.defaultHeaders }
|
|
13
|
-
: {}),
|
|
14
|
-
});
|
|
15
|
-
const api = createWorkspacesApi(client);
|
|
16
|
-
return { client, api, analytics };
|
|
4
|
+
return createModuleRuntime(createWorkspacesApi, options);
|
|
17
5
|
}
|
|
18
6
|
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/model/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/model/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAkB9D,MAAM,UAAU,uBAAuB,CACrC,OAAuC;IAEvC,OAAO,mBAAmB,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;AAC3D,CAAC"}
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# @stapel/workspaces-react 0.1
|
|
1
|
+
# @stapel/workspaces-react 0.4.1
|
|
2
2
|
|
|
3
|
-
Headless React flow pair for stapel-workspaces (contract >=0.
|
|
3
|
+
Headless React flow pair for stapel-workspaces (contract >=0.4 <0.5) — 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
|
|
|
@@ -20,18 +20,18 @@ api (typed client) · model (hooks, session) · flows (machines) · headless ·
|
|
|
20
20
|
|
|
21
21
|
## Operations (typed; use the named op, never a path string)
|
|
22
22
|
Request/response schema names are in manifest.json + the generated types.
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
23
|
+
- workspaces_api_v1_create: POST /workspaces/api/v1/
|
|
24
|
+
- workspaces_api_v1_destroy: DELETE /workspaces/api/v1/{workspace_id}
|
|
25
|
+
- workspaces_api_v1_internal_members_retrieve: GET /workspaces/api/v1/internal/{workspace_id}/members/{user_id}
|
|
26
|
+
- workspaces_api_v1_internal_users_personal_create: POST /workspaces/api/v1/internal/users/{user_id}/personal
|
|
27
|
+
- workspaces_api_v1_invitations_accept_create: POST /workspaces/api/v1/invitations/accept
|
|
28
|
+
- workspaces_api_v1_members_destroy: DELETE /workspaces/api/v1/{workspace_id}/members/{user_id}
|
|
29
|
+
- workspaces_api_v1_members_invite_create: POST /workspaces/api/v1/{workspace_id}/members/invite
|
|
30
|
+
- workspaces_api_v1_members_list: GET /workspaces/api/v1/{workspace_id}/members
|
|
31
|
+
- workspaces_api_v1_members_partial_update: PATCH /workspaces/api/v1/{workspace_id}/members/{user_id}
|
|
32
|
+
- workspaces_api_v1_partial_update: PATCH /workspaces/api/v1/{workspace_id}
|
|
33
|
+
- workspaces_api_v1_retrieve: GET /workspaces/api/v1/
|
|
34
|
+
- workspaces_api_v1_retrieve_2: GET /workspaces/api/v1/{workspace_id}
|
|
35
35
|
|
|
36
36
|
## Query hooks (server state; keys come only from the key factory)
|
|
37
37
|
- useAcceptInvitation (mutation) → acceptInvitation
|
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.1
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"backend": {
|
|
6
6
|
"module": "stapel-workspaces",
|
|
7
|
-
"contract": ">=0.
|
|
7
|
+
"contract": ">=0.4 <0.5"
|
|
8
8
|
},
|
|
9
9
|
"layers": [
|
|
10
10
|
"api",
|
|
@@ -16,86 +16,86 @@
|
|
|
16
16
|
"flows": {},
|
|
17
17
|
"machines": [],
|
|
18
18
|
"operations": {
|
|
19
|
-
"
|
|
19
|
+
"workspaces_api_v1_create": {
|
|
20
20
|
"method": "POST",
|
|
21
|
-
"path": "/workspaces/api/",
|
|
21
|
+
"path": "/workspaces/api/v1/",
|
|
22
22
|
"tag": "Workspaces",
|
|
23
23
|
"request": "WorkspaceCreateRequest",
|
|
24
24
|
"response": "WorkspaceResponse"
|
|
25
25
|
},
|
|
26
|
-
"
|
|
26
|
+
"workspaces_api_v1_destroy": {
|
|
27
27
|
"method": "DELETE",
|
|
28
|
-
"path": "/workspaces/api/{workspace_id}",
|
|
28
|
+
"path": "/workspaces/api/v1/{workspace_id}",
|
|
29
29
|
"tag": "Workspaces",
|
|
30
30
|
"request": null,
|
|
31
31
|
"response": null
|
|
32
32
|
},
|
|
33
|
-
"
|
|
33
|
+
"workspaces_api_v1_internal_members_retrieve": {
|
|
34
34
|
"method": "GET",
|
|
35
|
-
"path": "/workspaces/api/internal/{workspace_id}/members/{user_id}",
|
|
35
|
+
"path": "/workspaces/api/v1/internal/{workspace_id}/members/{user_id}",
|
|
36
36
|
"tag": "Internal",
|
|
37
37
|
"request": null,
|
|
38
38
|
"response": "MemberResponse"
|
|
39
39
|
},
|
|
40
|
-
"
|
|
40
|
+
"workspaces_api_v1_internal_users_personal_create": {
|
|
41
41
|
"method": "POST",
|
|
42
|
-
"path": "/workspaces/api/internal/users/{user_id}/personal",
|
|
42
|
+
"path": "/workspaces/api/v1/internal/users/{user_id}/personal",
|
|
43
43
|
"tag": "Internal",
|
|
44
44
|
"request": null,
|
|
45
45
|
"response": "InternalPersonalWorkspaceResponse"
|
|
46
46
|
},
|
|
47
|
-
"
|
|
47
|
+
"workspaces_api_v1_invitations_accept_create": {
|
|
48
48
|
"method": "POST",
|
|
49
|
-
"path": "/workspaces/api/invitations/accept",
|
|
49
|
+
"path": "/workspaces/api/v1/invitations/accept",
|
|
50
50
|
"tag": "Members",
|
|
51
51
|
"request": "InvitationAcceptRequest",
|
|
52
52
|
"response": "MemberResponse"
|
|
53
53
|
},
|
|
54
|
-
"
|
|
54
|
+
"workspaces_api_v1_members_destroy": {
|
|
55
55
|
"method": "DELETE",
|
|
56
|
-
"path": "/workspaces/api/{workspace_id}/members/{user_id}",
|
|
56
|
+
"path": "/workspaces/api/v1/{workspace_id}/members/{user_id}",
|
|
57
57
|
"tag": "Members",
|
|
58
58
|
"request": null,
|
|
59
59
|
"response": null
|
|
60
60
|
},
|
|
61
|
-
"
|
|
61
|
+
"workspaces_api_v1_members_invite_create": {
|
|
62
62
|
"method": "POST",
|
|
63
|
-
"path": "/workspaces/api/{workspace_id}/members/invite",
|
|
63
|
+
"path": "/workspaces/api/v1/{workspace_id}/members/invite",
|
|
64
64
|
"tag": "Members",
|
|
65
65
|
"request": "MemberInviteRequest",
|
|
66
66
|
"response": "MemberInviteResponse"
|
|
67
67
|
},
|
|
68
|
-
"
|
|
68
|
+
"workspaces_api_v1_members_list": {
|
|
69
|
+
"method": "GET",
|
|
70
|
+
"path": "/workspaces/api/v1/{workspace_id}/members",
|
|
71
|
+
"tag": "Members",
|
|
72
|
+
"request": null,
|
|
73
|
+
"response": "PaginatedMemberResponseList"
|
|
74
|
+
},
|
|
75
|
+
"workspaces_api_v1_members_partial_update": {
|
|
69
76
|
"method": "PATCH",
|
|
70
|
-
"path": "/workspaces/api/{workspace_id}/members/{user_id}",
|
|
77
|
+
"path": "/workspaces/api/v1/{workspace_id}/members/{user_id}",
|
|
71
78
|
"tag": "Members",
|
|
72
79
|
"request": "PatchedMemberUpdateRequest",
|
|
73
80
|
"response": "MemberResponse"
|
|
74
81
|
},
|
|
75
|
-
"
|
|
76
|
-
"method": "GET",
|
|
77
|
-
"path": "/workspaces/api/{workspace_id}/members",
|
|
78
|
-
"tag": "Members",
|
|
79
|
-
"request": null,
|
|
80
|
-
"response": "MemberListResponse"
|
|
81
|
-
},
|
|
82
|
-
"workspaces_api_partial_update": {
|
|
82
|
+
"workspaces_api_v1_partial_update": {
|
|
83
83
|
"method": "PATCH",
|
|
84
|
-
"path": "/workspaces/api/{workspace_id}",
|
|
84
|
+
"path": "/workspaces/api/v1/{workspace_id}",
|
|
85
85
|
"tag": "Workspaces",
|
|
86
86
|
"request": "PatchedWorkspaceUpdateRequest",
|
|
87
87
|
"response": "WorkspaceResponse"
|
|
88
88
|
},
|
|
89
|
-
"
|
|
89
|
+
"workspaces_api_v1_retrieve": {
|
|
90
90
|
"method": "GET",
|
|
91
|
-
"path": "/workspaces/api/",
|
|
91
|
+
"path": "/workspaces/api/v1/",
|
|
92
92
|
"tag": "Workspaces",
|
|
93
93
|
"request": null,
|
|
94
94
|
"response": "WorkspaceListResponse"
|
|
95
95
|
},
|
|
96
|
-
"
|
|
96
|
+
"workspaces_api_v1_retrieve_2": {
|
|
97
97
|
"method": "GET",
|
|
98
|
-
"path": "/workspaces/api/{workspace_id}",
|
|
98
|
+
"path": "/workspaces/api/v1/{workspace_id}",
|
|
99
99
|
"tag": "Workspaces",
|
|
100
100
|
"request": null,
|
|
101
101
|
"response": "WorkspaceResponse"
|
|
@@ -154,7 +154,8 @@
|
|
|
154
154
|
"queryKey": [
|
|
155
155
|
"workspaces",
|
|
156
156
|
"members",
|
|
157
|
-
"{workspaceId}"
|
|
157
|
+
"{workspaceId}",
|
|
158
|
+
"{params}"
|
|
158
159
|
]
|
|
159
160
|
},
|
|
160
161
|
"useRemoveMember": {
|
|
@@ -684,6 +685,7 @@
|
|
|
684
685
|
"MemberRoleChange",
|
|
685
686
|
"MemberRoleUpdate",
|
|
686
687
|
"MembersBag",
|
|
688
|
+
"MembersParams",
|
|
687
689
|
"Remediation",
|
|
688
690
|
"Schemas",
|
|
689
691
|
"WorkspaceCreate",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stapel/workspaces-react",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.4.1",
|
|
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": {
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"size-limit": "^11.2.0",
|
|
67
67
|
"typescript": "^5.8.3",
|
|
68
68
|
"vitest": "^3.2.4",
|
|
69
|
+
"@stapel/core": "^0.4.0",
|
|
69
70
|
"@stapel/showcase": "^0.2.0",
|
|
70
|
-
"@stapel/tokens": "^0.
|
|
71
|
-
"@stapel/core": "^0.3.0"
|
|
71
|
+
"@stapel/tokens": "^0.4.0"
|
|
72
72
|
},
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": ">=22"
|
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|
|
80
80
|
"build": "tsc -p tsconfig.json",
|
|
81
|
-
"test": "tsc -p tsconfig.demo.json && vitest run",
|
|
81
|
+
"test": "tsc -p tsconfig.demo.json && vitest run --exclude test/prodBundlePurity.test.ts",
|
|
82
|
+
"test:pack": "vitest run test/prodBundlePurity.test.ts",
|
|
82
83
|
"lint": "eslint .",
|
|
83
84
|
"size": "size-limit"
|
|
84
85
|
}
|