@stapel/workspaces-react 0.7.0 → 0.8.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/CHANGELOG.md +42 -0
- package/dist/api/generated/schema.d.ts +390 -3
- package/dist/api/generated/schema.d.ts.map +1 -1
- package/dist/api/types.d.ts +84 -2
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/workspacesApi.d.ts +33 -1
- package/dist/api/workspacesApi.d.ts.map +1 -1
- package/dist/api/workspacesApi.js +19 -0
- package/dist/api/workspacesApi.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/model/mutations.d.ts +85 -1
- package/dist/model/mutations.d.ts.map +1 -1
- package/dist/model/mutations.js +151 -0
- package/dist/model/mutations.js.map +1 -1
- package/dist/model/queries.d.ts +72 -2
- package/dist/model/queries.d.ts.map +1 -1
- package/dist/model/queries.js +90 -1
- package/dist/model/queries.js.map +1 -1
- package/dist/model/queryKeys.d.ts +10 -1
- package/dist/model/queryKeys.d.ts.map +1 -1
- package/dist/model/queryKeys.js +19 -0
- package/dist/model/queryKeys.js.map +1 -1
- package/dist/model/stepUp.d.ts +25 -0
- package/dist/model/stepUp.d.ts.map +1 -0
- package/dist/model/stepUp.js +79 -0
- package/dist/model/stepUp.js.map +1 -0
- package/llms.txt +11 -2
- package/manifest.json +123 -2
- package/package.json +4 -4
- package/src/analytics/generated/events.json +1 -1
- package/src/api/generated/schema.ts +390 -3
- package/src/api/types.ts +93 -2
- package/src/api/workspacesApi.ts +87 -0
- package/src/index.ts +29 -2
- package/src/model/mutations.ts +192 -0
- package/src/model/queries.ts +132 -2
- package/src/model/queryKeys.ts +35 -1
- package/src/model/stepUp.ts +96 -0
package/dist/api/types.d.ts
CHANGED
|
@@ -9,9 +9,12 @@
|
|
|
9
9
|
* openapi-typescript under-describe the runtime, apply a small documented
|
|
10
10
|
* correction (see auth-react `api/types.ts` for the three canonical patterns).
|
|
11
11
|
*/
|
|
12
|
-
import type { components } from "./generated/schema.js";
|
|
12
|
+
import type { components, operations } from "./generated/schema.js";
|
|
13
13
|
/** The generated schema table — the one source of truth for wire shapes. */
|
|
14
14
|
export type Schemas = components["schemas"];
|
|
15
|
+
/** The generated operation table — the source of truth for QUERY parameters
|
|
16
|
+
* (drf-spectacular declares them per-operation, not as a component schema). */
|
|
17
|
+
export type Operations = operations;
|
|
15
18
|
/** One workspace — identity, storage, my role, member count (GET/POST/PATCH). */
|
|
16
19
|
export type Workspace = Schemas["WorkspaceResponse"];
|
|
17
20
|
/** GET / 200 body — the caller's workspaces (memberships). */
|
|
@@ -30,8 +33,21 @@ export type MemberInvite = Schemas["MemberInviteRequest"];
|
|
|
30
33
|
export type MemberInviteResult = Schemas["MemberInviteResponse"];
|
|
31
34
|
/** PATCH /{id}/members/{userId} request body — the new role. */
|
|
32
35
|
export type MemberRoleUpdate = Schemas["PatchedMemberUpdateRequest"];
|
|
33
|
-
/** One pending/accepted invitation (a row of {@link MemberInviteResult}
|
|
36
|
+
/** One pending/accepted invitation (a row of {@link MemberInviteResult}, and
|
|
37
|
+
* a row of the admin's invitation table — GET /{id}/invitations). The invite
|
|
38
|
+
* TOKEN is deliberately absent from this shape: it is a bearer credential
|
|
39
|
+
* that only ever leaves the backend inside the invitation email. */
|
|
34
40
|
export type Invitation = Schemas["InvitationResponse"];
|
|
41
|
+
/** GET /{id}/invitations 200 body — an anchor-paginated page of {@link Invitation}s. */
|
|
42
|
+
export type InvitationPage = Schemas["PaginatedInvitationResponseList"];
|
|
43
|
+
/** POST /{id}/members/{userId}/password/reset request body — an optional
|
|
44
|
+
* admin-chosen password, the first-login demands to raise, and an audit note. */
|
|
45
|
+
export type MemberPasswordReset = Schemas["MemberPasswordResetRequest"];
|
|
46
|
+
/** POST /{id}/members/{userId}/password/reset 200 body. `generated_password`
|
|
47
|
+
* is a ONE-SHOT credential (present only when the request omitted `password`)
|
|
48
|
+
* — see {@link "../model/mutations.js".useResetMemberPassword}, which keeps it
|
|
49
|
+
* out of the query cache. */
|
|
50
|
+
export type MemberPasswordResetResult = Schemas["MemberPasswordResetResponse"];
|
|
35
51
|
/** POST /invitations/accept request body — the token from the email link. */
|
|
36
52
|
export type InvitationAccept = Schemas["InvitationAcceptRequest"];
|
|
37
53
|
/** GET /invitations/{token} 200 body — the public (AllowAny) preview the
|
|
@@ -79,4 +95,70 @@ export interface MembersParams {
|
|
|
79
95
|
/** Case-insensitive substring filter matched against a member's email or display name. */
|
|
80
96
|
readonly search?: string;
|
|
81
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Which invitations GET /{id}/invitations returns. Taken VERBATIM from the
|
|
100
|
+
* generated operation table (not re-typed by hand): `pending` (the backend
|
|
101
|
+
* default) — live, seat-reserving invitations, i.e. who has not accepted yet;
|
|
102
|
+
* `never_accepted` — those plus declined / revoked / expired; `all` — the full
|
|
103
|
+
* history, accepted rows included.
|
|
104
|
+
*/
|
|
105
|
+
export type InvitationStatusFilter = NonNullable<NonNullable<Operations["workspaces_api_v1_invitations_list"]["parameters"]["query"]>["status"]>;
|
|
106
|
+
/**
|
|
107
|
+
* Anchor-pagination query for GET /{id}/invitations (core `AnchorPagination`,
|
|
108
|
+
* the same shape as {@link MembersParams} plus the `status` filter). All
|
|
109
|
+
* optional: no params fetches the newest page of PENDING invitations
|
|
110
|
+
* (default limit 100, max 500).
|
|
111
|
+
*
|
|
112
|
+
* ANCHOR, not page numbers: a page is addressed by the opaque `next_anchor`
|
|
113
|
+
* of the page before it. There is no "page 3" to jump to and no offset to
|
|
114
|
+
* skew when an invitation is revoked mid-scroll.
|
|
115
|
+
*/
|
|
116
|
+
export interface InvitationsParams {
|
|
117
|
+
/** Anchor value to paginate from (exclusive) — a page's `next_anchor`. */
|
|
118
|
+
readonly anchor?: string;
|
|
119
|
+
/** Pagination direction relative to `anchor`. */
|
|
120
|
+
readonly direction?: "next" | "prev" | "center";
|
|
121
|
+
/** Page size (default 100, max 500). */
|
|
122
|
+
readonly limit?: number;
|
|
123
|
+
/** Case-insensitive substring filter on the invited email address. */
|
|
124
|
+
readonly search?: string;
|
|
125
|
+
/** Which invitations to return (default `pending`). */
|
|
126
|
+
readonly status?: InvitationStatusFilter;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* One first-login demand an organization may raise on an account it admits
|
|
130
|
+
* (`settings.security.provisioned_user_policies`, backend dto
|
|
131
|
+
* `PROVISIONED_USER_POLICIES`). INDEPENDENT checkboxes, not alternatives — an
|
|
132
|
+
* org may demand both. NOT GENERATED: the security block lives inside the
|
|
133
|
+
* free-form `Workspace.settings` JSON, so drf-spectacular types it as an
|
|
134
|
+
* untyped object; the backend serializer validates exactly these two values.
|
|
135
|
+
*/
|
|
136
|
+
export type ProvisionedUserPolicy = "password_change" | "mfa_enroll";
|
|
137
|
+
/**
|
|
138
|
+
* Typed shape of `Workspace.settings.security` (backend dto
|
|
139
|
+
* `WorkspaceSecuritySettings`, org-program §C3). A documented correction for
|
|
140
|
+
* the same reason as {@link WorkspaceRole}: the block is stored inside the
|
|
141
|
+
* free-form settings JSON (no schema migration on the backend), so the
|
|
142
|
+
* generated types say `object` and this is the canon of the known keys.
|
|
143
|
+
* Unknown keys are preserved verbatim by the backend — hence the index
|
|
144
|
+
* signature, and hence why the update hook MERGES rather than replaces.
|
|
145
|
+
*/
|
|
146
|
+
export interface WorkspaceSecuritySettings {
|
|
147
|
+
/** Whether membership requires a strong second factor. Turning it on
|
|
148
|
+
* sweeps current members and suspends those without one (reason `no_mfa`). */
|
|
149
|
+
readonly require_mfa?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* First-login steps demanded of accounts the org admits — a LIST since
|
|
152
|
+
* stapel-workspaces 0.13.0 (#90). The pre-0.13 singular
|
|
153
|
+
* `provisioned_user_policy` string is still read by the backend for old
|
|
154
|
+
* rows, but this pair only ever WRITES the list: a client that keeps
|
|
155
|
+
* writing the singular spelling silently caps the org at one demand.
|
|
156
|
+
*/
|
|
157
|
+
readonly provisioned_user_policies?: readonly ProvisionedUserPolicy[];
|
|
158
|
+
/** Derived, read-only: whether the org actually set the policies (as
|
|
159
|
+
* opposed to inheriting the `password_change` default). Never sent. */
|
|
160
|
+
readonly policies_configured?: boolean;
|
|
161
|
+
/** Extra keys pass through the backend verbatim (client extension). */
|
|
162
|
+
readonly [extra: string]: unknown;
|
|
163
|
+
}
|
|
82
164
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/api/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEpE,4EAA4E;AAC5E,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;AAE5C;+EAC+E;AAC/E,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC;AAIpC,iFAAiF;AACjF,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AACrD,8DAA8D;AAC9D,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAC7D,mFAAmF;AACnF,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAChE,0EAA0E;AAC1E,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;AACvE,0EAA0E;AAC1E,MAAM,MAAM,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC/C,8FAA8F;AAC9F,MAAM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M,GAAG,OAAO,CAAC;CACnC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StapelClient } from "@stapel/core";
|
|
2
|
-
import type { Member, MemberInvite, MemberInviteResult, MemberPage, MemberRoleUpdate, MembersParams, InvitationAccept, InvitationClaim, InvitationPreview, RoleList, Workspace, WorkspaceCreate, WorkspaceList, WorkspaceUpdate } from "./types.js";
|
|
2
|
+
import type { Invitation, InvitationPage, InvitationsParams, Member, MemberInvite, MemberInviteResult, MemberPage, MemberPasswordReset, MemberPasswordResetResult, MemberRoleUpdate, MembersParams, InvitationAccept, InvitationClaim, InvitationPreview, RoleList, Workspace, WorkspaceCreate, WorkspaceList, WorkspaceUpdate } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* The pair's typed operation surface — one method per stapel-workspaces endpoint
|
|
5
5
|
* a signed-in browser client may call, bound to the injected {@link StapelClient}
|
|
@@ -36,6 +36,38 @@ export interface WorkspacesApi {
|
|
|
36
36
|
updateMemberRole(workspaceId: string, userId: string, patch: MemberRoleUpdate): Promise<Member>;
|
|
37
37
|
/** Remove a member from a workspace (admin+; the last owner is protected). */
|
|
38
38
|
removeMember(workspaceId: string, userId: string): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Reset a member's password on the organization's order (stapel-workspaces
|
|
41
|
+
* ≥0.14.0, #110). Capability `members.password.reset`, declared **high** —
|
|
42
|
+
* the backend wraps it in `requires_verification(scope="sensitive")`, so an
|
|
43
|
+
* ambient cookie is not enough and a step-up (or factor ENROLLMENT) 403 is
|
|
44
|
+
* the normal first answer. A missing/wrong target answers one
|
|
45
|
+
* byte-identical 404 (never an existence oracle).
|
|
46
|
+
*
|
|
47
|
+
* `generated_password` in the reply is a ONE-SHOT credential: present only
|
|
48
|
+
* when the request omitted `password`, never re-fetchable, never logged.
|
|
49
|
+
*/
|
|
50
|
+
resetMemberPassword(workspaceId: string, userId: string, body?: MemberPasswordReset): Promise<MemberPasswordResetResult>;
|
|
51
|
+
/**
|
|
52
|
+
* The workspace's invitations — the admin's "who has not accepted yet"
|
|
53
|
+
* table (capability `members.invite`). An ANCHOR-paginated page, filtered
|
|
54
|
+
* by `status` (default `pending`) and `search` (invited email). The invite
|
|
55
|
+
* token is never in the response.
|
|
56
|
+
*/
|
|
57
|
+
listInvitations(workspaceId: string, params?: InvitationsParams): Promise<InvitationPage>;
|
|
58
|
+
/**
|
|
59
|
+
* Withdraw a live invitation — the workspace's terminal "no", the mirror of
|
|
60
|
+
* the invitee's decline (the two stay distinguishable in `status` forever).
|
|
61
|
+
* Only a `pending` one is revocable; the reply is the updated row.
|
|
62
|
+
*/
|
|
63
|
+
revokeInvitation(workspaceId: string, invitationId: string): Promise<Invitation>;
|
|
64
|
+
/**
|
|
65
|
+
* Send the invitation email again. Accepts an EXPIRED invitation on purpose
|
|
66
|
+
* (a dead TTL is the commonest reason to resend) and refuses the three
|
|
67
|
+
* terminal states. Rotates the token and restarts the TTL — every earlier
|
|
68
|
+
* link stops working — so the reply is the updated row, not the old one.
|
|
69
|
+
*/
|
|
70
|
+
resendInvitation(workspaceId: string, invitationId: string): Promise<Invitation>;
|
|
39
71
|
/** Accept an invitation by its token — returns the caller's new membership. */
|
|
40
72
|
acceptInvitation(body: InvitationAccept): Promise<Member>;
|
|
41
73
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspacesApi.d.ts","sourceRoot":"","sources":["../../src/api/workspacesApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAwB,MAAM,cAAc,CAAC;AACvE,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,eAAe,EACf,aAAa,EACb,eAAe,EAChB,MAAM,YAAY,CAAC;AAqBpB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,aAAa;IAC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AAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAIhD;6EACyE;IACzE,SAAS,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;CAChC;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,aAAa,CAgHvE"}
|
|
@@ -38,6 +38,25 @@ export function createWorkspacesApi(client) {
|
|
|
38
38
|
inviteMembers: (workspaceId, body) => client.post(`/${encodeURIComponent(workspaceId)}/members/invite`, body, mutating()),
|
|
39
39
|
updateMemberRole: (workspaceId, userId, patch) => client.patch(`/${encodeURIComponent(workspaceId)}/members/${encodeURIComponent(userId)}`, patch, mutating()),
|
|
40
40
|
removeMember: (workspaceId, userId) => client.delete(`/${encodeURIComponent(workspaceId)}/members/${encodeURIComponent(userId)}`, mutating()),
|
|
41
|
+
resetMemberPassword: (workspaceId, userId, body) => client.post(`/${encodeURIComponent(workspaceId)}/members/${encodeURIComponent(userId)}/password/reset`, (body ?? {}), mutating()),
|
|
42
|
+
listInvitations: (workspaceId, params) => {
|
|
43
|
+
const query = {};
|
|
44
|
+
if (params?.anchor !== undefined)
|
|
45
|
+
query.anchor = params.anchor;
|
|
46
|
+
if (params?.direction !== undefined)
|
|
47
|
+
query.direction = params.direction;
|
|
48
|
+
if (params?.limit !== undefined)
|
|
49
|
+
query.limit = params.limit;
|
|
50
|
+
if (params?.search !== undefined)
|
|
51
|
+
query.search = params.search;
|
|
52
|
+
if (params?.status !== undefined)
|
|
53
|
+
query.status = params.status;
|
|
54
|
+
return client.get(`/${encodeURIComponent(workspaceId)}/invitations`, {
|
|
55
|
+
query,
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
revokeInvitation: (workspaceId, invitationId) => client.post(`/${encodeURIComponent(workspaceId)}/invitations/${encodeURIComponent(invitationId)}/revoke`, undefined, mutating()),
|
|
59
|
+
resendInvitation: (workspaceId, invitationId) => client.post(`/${encodeURIComponent(workspaceId)}/invitations/${encodeURIComponent(invitationId)}/resend`, undefined, mutating()),
|
|
41
60
|
acceptInvitation: (body) => client.post("/invitations/accept", body, mutating()),
|
|
42
61
|
getInvitationPreview: (token) => client.get(`/invitations/${encodeURIComponent(token)}`),
|
|
43
62
|
claimInvitation: (token) => client.post(`/invitations/${encodeURIComponent(token)}/claim`, undefined, mutating()),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspacesApi.js","sourceRoot":"","sources":["../../src/api/workspacesApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspacesApi.js","sourceRoot":"","sources":["../../src/api/workspacesApi.ts"],"names":[],"mappings":"AAuBA;;;;;GAKG;AACH,MAAM,YAAY,GAA2B;IAC3C,kBAAkB,EAAE,gBAAgB;CACrC,CAAC;AAEF,SAAS,QAAQ,CACf,OAAuD;IAEvD,OAAO;QACL,GAAG,OAAO;QACV,OAAO,EAAE,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;KAClD,CAAC;AACJ,CAAC;AAuID,MAAM,UAAU,mBAAmB,CAAC,MAAoB;IACtD,OAAO;QACL,MAAM;QAEN,cAAc,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;QAErC,eAAe,EAAE,CAAC,IAAI,EAAE,EAAE,CACxB,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAA8B,EAAE,QAAQ,EAAE,CAAC;QAE9D,YAAY,EAAE,CAAC,WAAW,EAAE,EAAE,CAC5B,MAAM,CAAC,GAAG,CAAC,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;QAEnD,eAAe,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,CACtC,MAAM,CAAC,KAAK,CACV,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,EACrC,KAA+B,EAC/B,QAAQ,EAAE,CACX;QAEH,eAAe,EAAE,CAAC,WAAW,EAAE,EAAE,CAC/B,MAAM,CAAC,MA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,CAAC,WAAW,CAAC,gBAAgB,kBAAkB,CAAC,YAAY,CAAC,SAAS,EAC5F,SAAS,EACT,QAAQ,EAAE,CACX;QAEH,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CACzB,MAAM,CAAC,IAAI,CACT,qBAAqB,EACrB,IAA+B,EAC/B,QAAQ,EAAE,CACX;QAEH,oBAAoB,EAAE,CAAC,KAAK,EAAE,EAAE,CAC9B,MAAM,CAAC,GAAG,CAAC,gBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC;QAEzD,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CACzB,MAAM,CAAC,IAAI,CACT,gBAAgB,kBAAkB,CAAC,KAAK,CAAC,QAAQ,EACjD,SAAS,EACT,QAAQ,EAAE,CACX;QAEH,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAC3B,MAAM,CAAC,IAAI,CACT,gBAAgB,kBAAkB,CAAC,KAAK,CAAC,UAAU,EACnD,SAAS,EACT,QAAQ,EAAE,CACX;QAEH,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;KACtC,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -22,13 +22,15 @@ export { createWorkspacesRuntime } from "./model/runtime.js";
|
|
|
22
22
|
export type { WorkspacesRuntime, CreateWorkspacesRuntimeOptions, } from "./model/runtime.js";
|
|
23
23
|
export { WorkspacesRuntimeContext, useWorkspacesRuntime, useWorkspacesApi, useWorkspacesAnalytics, } from "./model/context.js";
|
|
24
24
|
export { workspacesQueryKeys } from "./model/queryKeys.js";
|
|
25
|
-
export { useWorkspaces, useWorkspace, useMembers, useRoles, useInvitationPreview, useCapabilities, } from "./model/queries.js";
|
|
26
|
-
export type { CapabilitiesResult } from "./model/queries.js";
|
|
25
|
+
export { useWorkspaces, useWorkspace, useMembers, useInvitations, useInfiniteInvitations, useRoles, useInvitationPreview, useCapabilities, useCapabilityGate, } from "./model/queries.js";
|
|
26
|
+
export type { CapabilitiesResult, CapabilityGate } from "./model/queries.js";
|
|
27
27
|
export { capabilityMatches, hasCapability } from "./model/capabilities.js";
|
|
28
|
+
export { BUILTIN_CAPABILITY_LEVELS, SENSITIVE_SCOPE, capabilityLevel, readVerificationEnrollment, } from "./model/stepUp.js";
|
|
29
|
+
export type { CapabilityLevel, VerificationEnrollment, } from "./model/stepUp.js";
|
|
28
30
|
export { maskEmail, emailMatchesMask } from "./model/emailMask.js";
|
|
29
|
-
export { useCreateWorkspace, useUpdateWorkspace, useDeleteWorkspace, useInviteMembers, useUpdateMemberRole, useRemoveMember, useAcceptInvitation, useClaimInvitation, useDeclineInvitation, } from "./model/mutations.js";
|
|
30
|
-
export type { MemberRoleChange } from "./model/mutations.js";
|
|
31
|
-
export type { Workspace as WorkspaceData, WorkspaceList as WorkspaceListData, WorkspaceCreate, WorkspaceUpdate, Member as MemberData, MemberPage as MemberListData, MembersParams, MemberInvite, MemberInviteResult, MemberRoleUpdate, Invitation, InvitationAccept, InvitationPreview, InvitationClaim, RoleInfo, RoleList, WorkspaceRole, WorkspaceKind, } from "./api/types.js";
|
|
31
|
+
export { useCreateWorkspace, useUpdateWorkspace, useDeleteWorkspace, useInviteMembers, useUpdateMemberRole, useRemoveMember, useAcceptInvitation, useClaimInvitation, useDeclineInvitation, useRevokeInvitation, useResendInvitation, useResetMemberPassword, useUpdateSecuritySettings, } from "./model/mutations.js";
|
|
32
|
+
export type { MemberRoleChange, MemberPasswordResetVars, } from "./model/mutations.js";
|
|
33
|
+
export type { Workspace as WorkspaceData, WorkspaceList as WorkspaceListData, WorkspaceCreate, WorkspaceUpdate, Member as MemberData, MemberPage as MemberListData, MembersParams, MemberInvite, MemberInviteResult, MemberRoleUpdate, Invitation, InvitationPage as InvitationListData, InvitationsParams, InvitationStatusFilter, InvitationAccept, InvitationPreview, InvitationClaim, MemberPasswordReset, MemberPasswordResetResult, ProvisionedUserPolicy, WorkspaceSecuritySettings, RoleInfo, RoleList, WorkspaceRole, WorkspaceKind, } from "./api/types.js";
|
|
32
34
|
export { WorkspacesProvider } from "./headless/WorkspacesProvider.js";
|
|
33
35
|
export { WorkspaceList } from "./headless/WorkspaceList.js";
|
|
34
36
|
export type { WorkspaceListBag } from "./headless/WorkspaceList.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAK9C,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACvE,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,YAAY,EACV,gBAAgB,IAAI,0BAA0B,EAC9C,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACtE,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,GACb,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,YAAY,EACV,iBAAiB,EACjB,8BAA8B,GAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE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AE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAG1E,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGxD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,GACZ,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,12 +22,13 @@ export { createWorkspacesRuntime } from "./model/runtime.js";
|
|
|
22
22
|
export { WorkspacesRuntimeContext, useWorkspacesRuntime, useWorkspacesApi, useWorkspacesAnalytics, } from "./model/context.js";
|
|
23
23
|
export { workspacesQueryKeys } from "./model/queryKeys.js";
|
|
24
24
|
// ── model (read hooks) ───────────────────────────────────────────────────────
|
|
25
|
-
export { useWorkspaces, useWorkspace, useMembers, useRoles, useInvitationPreview, useCapabilities, } from "./model/queries.js";
|
|
25
|
+
export { useWorkspaces, useWorkspace, useMembers, useInvitations, useInfiniteInvitations, useRoles, useInvitationPreview, useCapabilities, useCapabilityGate, } from "./model/queries.js";
|
|
26
26
|
// ── model (capability matcher + email-mask ports — backend-synced utils) ─────
|
|
27
27
|
export { capabilityMatches, hasCapability } from "./model/capabilities.js";
|
|
28
|
+
export { BUILTIN_CAPABILITY_LEVELS, SENSITIVE_SCOPE, capabilityLevel, readVerificationEnrollment, } from "./model/stepUp.js";
|
|
28
29
|
export { maskEmail, emailMatchesMask } from "./model/emailMask.js";
|
|
29
30
|
// ── model (write hooks) ──────────────────────────────────────────────────────
|
|
30
|
-
export { useCreateWorkspace, useUpdateWorkspace, useDeleteWorkspace, useInviteMembers, useUpdateMemberRole, useRemoveMember, useAcceptInvitation, useClaimInvitation, useDeclineInvitation, } from "./model/mutations.js";
|
|
31
|
+
export { useCreateWorkspace, useUpdateWorkspace, useDeleteWorkspace, useInviteMembers, useUpdateMemberRole, useRemoveMember, useAcceptInvitation, useClaimInvitation, useDeclineInvitation, useRevokeInvitation, useResendInvitation, useResetMemberPassword, useUpdateSecuritySettings, } from "./model/mutations.js";
|
|
31
32
|
// ── headless (renderless components) ─────────────────────────────────────────
|
|
32
33
|
export { WorkspacesProvider } from "./headless/WorkspacesProvider.js";
|
|
33
34
|
export { WorkspaceList } from "./headless/WorkspaceList.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAI7D,gFAAgF;AAChF,4EAA4E;AAC5E,4EAA4E;AAC5E,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAOvE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,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AAgF;AAChF,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,eAAe,EACf,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,gFAAgF;AAChF,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAmC9B,gFAAgF;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGlE,gFAAgF;AAChF,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAGxB,gFAAgF;AAChF,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UseMutationResult } from "@tanstack/react-query";
|
|
2
2
|
import type { StapelApiError } from "@stapel/core";
|
|
3
|
-
import type { Member, MemberInvite, MemberInviteResult, InvitationAccept, InvitationClaim, Workspace, WorkspaceCreate, WorkspaceUpdate } from "../api/types.js";
|
|
3
|
+
import type { Invitation, Member, MemberInvite, MemberInviteResult, MemberPasswordReset, MemberPasswordResetResult, InvitationAccept, InvitationClaim, Workspace, WorkspaceCreate, WorkspaceSecuritySettings, WorkspaceUpdate } from "../api/types.js";
|
|
4
4
|
/**
|
|
5
5
|
* Write hooks (frontend-standard §2 — "мутации с инвалидацией"). Each mutation
|
|
6
6
|
* invalidates exactly the server state it can move. Membership and ownership are
|
|
@@ -49,6 +49,90 @@ export declare function useUpdateMemberRole(workspaceId: string): UseMutationRes
|
|
|
49
49
|
* variable is the member's `userId`. Refreshes the member list.
|
|
50
50
|
*/
|
|
51
51
|
export declare function useRemoveMember(workspaceId: string): UseMutationResult<void, StapelApiError, string>;
|
|
52
|
+
/**
|
|
53
|
+
* Withdraw a live invitation (POST /{id}/invitations/{invitationId}/revoke,
|
|
54
|
+
* #109). The variable is the invitation id; the reply is the UPDATED row, so
|
|
55
|
+
* it is written straight into the page cache the table reads — a revoke is
|
|
56
|
+
* the mirror of the invitee's decline and both must stay distinguishable in
|
|
57
|
+
* `status`, which a blind refetch-and-hope would blur. Only a `pending`
|
|
58
|
+
* invitation is revocable: the backend answers
|
|
59
|
+
* `error.400.invitation_already_used` / `_revoked` / `_expired` otherwise
|
|
60
|
+
* (each its own key, not a shrug). Also refreshes the member list — the seat
|
|
61
|
+
* the invitation reserved is freed on commit.
|
|
62
|
+
*/
|
|
63
|
+
export declare function useRevokeInvitation(workspaceId: string): UseMutationResult<Invitation, StapelApiError, string>;
|
|
64
|
+
/**
|
|
65
|
+
* Send the invitation email again (POST /{id}/invitations/{invitationId}/resend,
|
|
66
|
+
* #109). The variable is the invitation id.
|
|
67
|
+
*
|
|
68
|
+
* This is NOT an idempotent "poke": the backend rotates the token and
|
|
69
|
+
* restarts the TTL, so every earlier link — including the one already in the
|
|
70
|
+
* invitee's inbox — stops working, and the row's `expires_at` moves. Hence
|
|
71
|
+
* the invalidation: a table still showing the old expiry would be lying about
|
|
72
|
+
* a live credential. An EXPIRED invitation is accepted on purpose (a dead TTL
|
|
73
|
+
* is the commonest reason to resend); reviving it re-reserves a seat, so a
|
|
74
|
+
* plan ceiling can answer 402 here.
|
|
75
|
+
*/
|
|
76
|
+
export declare function useResendInvitation(workspaceId: string): UseMutationResult<Invitation, StapelApiError, string>;
|
|
77
|
+
/** The variable for {@link useResetMemberPassword}: whose password, and the
|
|
78
|
+
* (optional) body — omit `password` to have the server generate one. */
|
|
79
|
+
export interface MemberPasswordResetVars {
|
|
80
|
+
readonly userId: string;
|
|
81
|
+
readonly body?: MemberPasswordReset;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Reset a member's password on the organization's order
|
|
85
|
+
* (POST /{id}/members/{userId}/password/reset, #110).
|
|
86
|
+
*
|
|
87
|
+
* **Step-up before the button.** Capability `members.password.reset` is
|
|
88
|
+
* declared `high`, so the backend wraps the endpoint in
|
|
89
|
+
* `requires_verification(scope="sensitive")`. Ask
|
|
90
|
+
* {@link "./queries.js".useCapabilityGate}(workspaceId,
|
|
91
|
+
* "members.password.reset") BEFORE offering the affordance: it answers both
|
|
92
|
+
* "may this caller" and "will a step-up be demanded". A step-up CHALLENGE is
|
|
93
|
+
* then driven by core's client and replayed transparently; the one case that
|
|
94
|
+
* is not transparent is the ENROLLMENT demand (the caller holds no factor to
|
|
95
|
+
* challenge) — read it off `error` with
|
|
96
|
+
* {@link "./stepUp.js".readVerificationEnrollment} and route to enrollment.
|
|
97
|
+
*
|
|
98
|
+
* **The one-shot credential.** `generated_password` comes back exactly once,
|
|
99
|
+
* only when the request omitted `password`, and can never be re-fetched. It
|
|
100
|
+
* is therefore deliberately kept OUT of the query cache: nothing here writes
|
|
101
|
+
* the response with `setQueryData`, and `gcTime: 0` drops the mutation result
|
|
102
|
+
* the moment the screen showing it unmounts. Writing it to a query would
|
|
103
|
+
* mean writing a live credential into every devtools panel AND into
|
|
104
|
+
* `localStorage`, because core's query runtime persists the whole per-user
|
|
105
|
+
* query cache (`createStapelQueryClient`). Hand it to the member out of band.
|
|
106
|
+
*
|
|
107
|
+
* Refreshes the member list (the reset moves the member's first-login state);
|
|
108
|
+
* a target that is not a resettable member of THIS workspace answers one
|
|
109
|
+
* byte-identical 404, never an existence oracle.
|
|
110
|
+
*/
|
|
111
|
+
export declare function useResetMemberPassword(workspaceId: string): UseMutationResult<MemberPasswordResetResult, StapelApiError, MemberPasswordResetVars>;
|
|
112
|
+
/**
|
|
113
|
+
* Update a workspace's SECURITY settings (the `security` block of
|
|
114
|
+
* `PATCH /{id}`, org-program §C3) — `require_mfa` and the first-login
|
|
115
|
+
* `provisioned_user_policies`.
|
|
116
|
+
*
|
|
117
|
+
* Separate from {@link useUpdateWorkspace} because the backend treats this
|
|
118
|
+
* block as a different endpoint in all but the URL: an extra capability
|
|
119
|
+
* (`workspace.security.manage`, declared `high`) plus a step-up on the same
|
|
120
|
+
* `sensitive` scope as the password reset, and turning `require_mfa` on
|
|
121
|
+
* sweeps the current members. See {@link useResetMemberPassword} for how to
|
|
122
|
+
* wire that in front of the control.
|
|
123
|
+
*
|
|
124
|
+
* `provisioned_user_policies` is a LIST since stapel-workspaces 0.13.0 (#90)
|
|
125
|
+
* — independent checkboxes, not alternatives. An explicit `[]` is a
|
|
126
|
+
* deliberate, auditable choice ("demand nothing"), so it is sent as such and
|
|
127
|
+
* never dropped as "empty means unset".
|
|
128
|
+
*
|
|
129
|
+
* MERGES, because the backend does not: `PATCH` assigns `settings` wholesale
|
|
130
|
+
* (`ws.settings = data.settings`), so sending a bare `{security: …}` would
|
|
131
|
+
* silently drop every other key the workspace holds. The merge reads the
|
|
132
|
+
* workspace fresh rather than trusting the detail cache — a stale snapshot
|
|
133
|
+
* here would resurrect settings somebody else has since removed.
|
|
134
|
+
*/
|
|
135
|
+
export declare function useUpdateSecuritySettings(workspaceId: string): UseMutationResult<Workspace, StapelApiError, WorkspaceSecuritySettings>;
|
|
52
136
|
/**
|
|
53
137
|
* Accept an invitation by its token — the caller joins the workspace. A dead
|
|
54
138
|
* token surfaces a localizable `StapelApiError` (`error.400.invitation_expired`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/model/mutations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,eAAe,EACf,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAIzB;;;;;;;;;;;GAWG;AAEH,wEAAwE;AACxE,wBAAgB,kBAAkB,IAAI,iBAAiB,CACrD,SAAS,EACT,cAAc,EACd,eAAe,CAChB,CAaA;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,GAClB,iBAAiB,CAAC,SAAS,EAAE,cAAc,EAAE,eAAe,CAAC,CAiB/D;AAED,0FAA0F;AAC1F,wBAAgB,kBAAkB,IAAI,iBAAiB,CACrD,IAAI,EACJ,cAAc,EACd,MAAM,CACP,CAeA;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,GAClB,iBAAiB,CAAC,kBAAkB,EAAE,cAAc,EAAE,YAAY,CAAC,CAgBrE;AAED;;;;gDAIgD;AAChD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,GAClB,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAa7D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,GAClB,iBAAiB,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,CAYjD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,iBAAiB,CACtD,MAAM,EACN,cAAc,EACd,gBAAgB,CACjB,CAgBA;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,iBAAiB,CACrD,eAAe,EACf,cAAc,EACd,MAAM,CACP,CAMA;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CACvD,IAAI,EACJ,cAAc,EACd,MAAM,CACP,CAYA"}
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/model/mutations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EACV,UAAU,EACV,MAAM,EACN,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,eAAe,EACf,yBAAyB,EACzB,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAIzB;;;;;;;;;;;GAWG;AAEH,wEAAwE;AACxE,wBAAgB,kBAAkB,IAAI,iBAAiB,CACrD,SAAS,EACT,cAAc,EACd,eAAe,CAChB,CAaA;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,WAAW,EAAE,MAAM,GAClB,iBAAiB,CAAC,SAAS,EAAE,cAAc,EAAE,eAAe,CAAC,CAiB/D;AAED,0FAA0F;AAC1F,wBAAgB,kBAAkB,IAAI,iBAAiB,CACrD,IAAI,EACJ,cAAc,EACd,MAAM,CACP,CAeA;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,GAClB,iBAAiB,CAAC,kBAAkB,EAAE,cAAc,EAAE,YAAY,CAAC,CAgBrE;AAED;;;;gDAIgD;AAChD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rD,eAAe,EACf,cAAc,EACd,MAAM,CACP,CAMA;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CACvD,IAAI,EACJ,cAAc,EACd,MAAM,CACP,CAYA"}
|
package/dist/model/mutations.js
CHANGED
|
@@ -116,6 +116,157 @@ export function useRemoveMember(workspaceId) {
|
|
|
116
116
|
};
|
|
117
117
|
return useMutation(options);
|
|
118
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Withdraw a live invitation (POST /{id}/invitations/{invitationId}/revoke,
|
|
121
|
+
* #109). The variable is the invitation id; the reply is the UPDATED row, so
|
|
122
|
+
* it is written straight into the page cache the table reads — a revoke is
|
|
123
|
+
* the mirror of the invitee's decline and both must stay distinguishable in
|
|
124
|
+
* `status`, which a blind refetch-and-hope would blur. Only a `pending`
|
|
125
|
+
* invitation is revocable: the backend answers
|
|
126
|
+
* `error.400.invitation_already_used` / `_revoked` / `_expired` otherwise
|
|
127
|
+
* (each its own key, not a shrug). Also refreshes the member list — the seat
|
|
128
|
+
* the invitation reserved is freed on commit.
|
|
129
|
+
*/
|
|
130
|
+
export function useRevokeInvitation(workspaceId) {
|
|
131
|
+
const api = useWorkspacesApi();
|
|
132
|
+
const queryClient = useQueryClient();
|
|
133
|
+
const options = {
|
|
134
|
+
mutationFn: (invitationId) => api.revokeInvitation(workspaceId, invitationId),
|
|
135
|
+
onSuccess: () => {
|
|
136
|
+
void queryClient.invalidateQueries({
|
|
137
|
+
queryKey: workspacesQueryKeys.invitations(workspaceId),
|
|
138
|
+
});
|
|
139
|
+
void queryClient.invalidateQueries({
|
|
140
|
+
queryKey: workspacesQueryKeys.members(workspaceId),
|
|
141
|
+
});
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
return useMutation(options);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Send the invitation email again (POST /{id}/invitations/{invitationId}/resend,
|
|
148
|
+
* #109). The variable is the invitation id.
|
|
149
|
+
*
|
|
150
|
+
* This is NOT an idempotent "poke": the backend rotates the token and
|
|
151
|
+
* restarts the TTL, so every earlier link — including the one already in the
|
|
152
|
+
* invitee's inbox — stops working, and the row's `expires_at` moves. Hence
|
|
153
|
+
* the invalidation: a table still showing the old expiry would be lying about
|
|
154
|
+
* a live credential. An EXPIRED invitation is accepted on purpose (a dead TTL
|
|
155
|
+
* is the commonest reason to resend); reviving it re-reserves a seat, so a
|
|
156
|
+
* plan ceiling can answer 402 here.
|
|
157
|
+
*/
|
|
158
|
+
export function useResendInvitation(workspaceId) {
|
|
159
|
+
const api = useWorkspacesApi();
|
|
160
|
+
const queryClient = useQueryClient();
|
|
161
|
+
const options = {
|
|
162
|
+
mutationFn: (invitationId) => api.resendInvitation(workspaceId, invitationId),
|
|
163
|
+
onSuccess: () => {
|
|
164
|
+
void queryClient.invalidateQueries({
|
|
165
|
+
queryKey: workspacesQueryKeys.invitations(workspaceId),
|
|
166
|
+
});
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
return useMutation(options);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Reset a member's password on the organization's order
|
|
173
|
+
* (POST /{id}/members/{userId}/password/reset, #110).
|
|
174
|
+
*
|
|
175
|
+
* **Step-up before the button.** Capability `members.password.reset` is
|
|
176
|
+
* declared `high`, so the backend wraps the endpoint in
|
|
177
|
+
* `requires_verification(scope="sensitive")`. Ask
|
|
178
|
+
* {@link "./queries.js".useCapabilityGate}(workspaceId,
|
|
179
|
+
* "members.password.reset") BEFORE offering the affordance: it answers both
|
|
180
|
+
* "may this caller" and "will a step-up be demanded". A step-up CHALLENGE is
|
|
181
|
+
* then driven by core's client and replayed transparently; the one case that
|
|
182
|
+
* is not transparent is the ENROLLMENT demand (the caller holds no factor to
|
|
183
|
+
* challenge) — read it off `error` with
|
|
184
|
+
* {@link "./stepUp.js".readVerificationEnrollment} and route to enrollment.
|
|
185
|
+
*
|
|
186
|
+
* **The one-shot credential.** `generated_password` comes back exactly once,
|
|
187
|
+
* only when the request omitted `password`, and can never be re-fetched. It
|
|
188
|
+
* is therefore deliberately kept OUT of the query cache: nothing here writes
|
|
189
|
+
* the response with `setQueryData`, and `gcTime: 0` drops the mutation result
|
|
190
|
+
* the moment the screen showing it unmounts. Writing it to a query would
|
|
191
|
+
* mean writing a live credential into every devtools panel AND into
|
|
192
|
+
* `localStorage`, because core's query runtime persists the whole per-user
|
|
193
|
+
* query cache (`createStapelQueryClient`). Hand it to the member out of band.
|
|
194
|
+
*
|
|
195
|
+
* Refreshes the member list (the reset moves the member's first-login state);
|
|
196
|
+
* a target that is not a resettable member of THIS workspace answers one
|
|
197
|
+
* byte-identical 404, never an existence oracle.
|
|
198
|
+
*/
|
|
199
|
+
export function useResetMemberPassword(workspaceId) {
|
|
200
|
+
const api = useWorkspacesApi();
|
|
201
|
+
const queryClient = useQueryClient();
|
|
202
|
+
const options = {
|
|
203
|
+
mutationFn: ({ userId, body }) => api.resetMemberPassword(workspaceId, userId, body),
|
|
204
|
+
// The result carries a live credential: never retained past the screen
|
|
205
|
+
// that displays it, and never persisted.
|
|
206
|
+
gcTime: 0,
|
|
207
|
+
onSuccess: () => {
|
|
208
|
+
void queryClient.invalidateQueries({
|
|
209
|
+
queryKey: workspacesQueryKeys.members(workspaceId),
|
|
210
|
+
});
|
|
211
|
+
},
|
|
212
|
+
};
|
|
213
|
+
return useMutation(options);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Update a workspace's SECURITY settings (the `security` block of
|
|
217
|
+
* `PATCH /{id}`, org-program §C3) — `require_mfa` and the first-login
|
|
218
|
+
* `provisioned_user_policies`.
|
|
219
|
+
*
|
|
220
|
+
* Separate from {@link useUpdateWorkspace} because the backend treats this
|
|
221
|
+
* block as a different endpoint in all but the URL: an extra capability
|
|
222
|
+
* (`workspace.security.manage`, declared `high`) plus a step-up on the same
|
|
223
|
+
* `sensitive` scope as the password reset, and turning `require_mfa` on
|
|
224
|
+
* sweeps the current members. See {@link useResetMemberPassword} for how to
|
|
225
|
+
* wire that in front of the control.
|
|
226
|
+
*
|
|
227
|
+
* `provisioned_user_policies` is a LIST since stapel-workspaces 0.13.0 (#90)
|
|
228
|
+
* — independent checkboxes, not alternatives. An explicit `[]` is a
|
|
229
|
+
* deliberate, auditable choice ("demand nothing"), so it is sent as such and
|
|
230
|
+
* never dropped as "empty means unset".
|
|
231
|
+
*
|
|
232
|
+
* MERGES, because the backend does not: `PATCH` assigns `settings` wholesale
|
|
233
|
+
* (`ws.settings = data.settings`), so sending a bare `{security: …}` would
|
|
234
|
+
* silently drop every other key the workspace holds. The merge reads the
|
|
235
|
+
* workspace fresh rather than trusting the detail cache — a stale snapshot
|
|
236
|
+
* here would resurrect settings somebody else has since removed.
|
|
237
|
+
*/
|
|
238
|
+
export function useUpdateSecuritySettings(workspaceId) {
|
|
239
|
+
const api = useWorkspacesApi();
|
|
240
|
+
const queryClient = useQueryClient();
|
|
241
|
+
const options = {
|
|
242
|
+
mutationFn: async (patch) => {
|
|
243
|
+
const current = await api.getWorkspace(workspaceId);
|
|
244
|
+
const settings = (current.settings ?? {});
|
|
245
|
+
const security = (settings["security"] ?? {});
|
|
246
|
+
// `policies_configured` is derived and read-only on the wire — never
|
|
247
|
+
// sent back, whatever a caller spread into the patch.
|
|
248
|
+
const { policies_configured: _derived, ...writable } = {
|
|
249
|
+
...security,
|
|
250
|
+
...patch,
|
|
251
|
+
};
|
|
252
|
+
return api.updateWorkspace(workspaceId, {
|
|
253
|
+
settings: { ...settings, security: writable },
|
|
254
|
+
});
|
|
255
|
+
},
|
|
256
|
+
onSuccess: (updated) => {
|
|
257
|
+
queryClient.setQueryData(workspacesQueryKeys.detail(workspaceId), updated);
|
|
258
|
+
void queryClient.invalidateQueries({
|
|
259
|
+
queryKey: workspacesQueryKeys.list(),
|
|
260
|
+
});
|
|
261
|
+
// require_mfa ON suspends members without a strong factor; OFF lifts
|
|
262
|
+
// those suspensions. Either way the roster just moved.
|
|
263
|
+
void queryClient.invalidateQueries({
|
|
264
|
+
queryKey: workspacesQueryKeys.members(workspaceId),
|
|
265
|
+
});
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
return useMutation(options);
|
|
269
|
+
}
|
|
119
270
|
/**
|
|
120
271
|
* Accept an invitation by its token — the caller joins the workspace. A dead
|
|
121
272
|
* token surfaces a localizable `StapelApiError` (`error.400.invitation_expired`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../src/model/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"mutations.js","sourceRoot":"","sources":["../../src/model/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAoBpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;;;;;;;;GAWG;AAEH,wEAAwE;AACxE,MAAM,UAAU,kBAAkB;IAKhC,MAAM,GAAG,GAAG,gBAAgB,EAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,OAAO,GACX;QACE,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC;QAC/C,SAAS,EAAE,GAAG,EAAE;YACd,KAAK,WAAW,CAAC,iBAAiB,CAAC;gBACjC,QAAQ,EAAE,mBAAmB,CAAC,IAAI,EAAE;aACrC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;IACJ,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,WAAmB;IAEnB,MAAM,GAAG,GAAG,gBAAgB,EAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,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