@pylonsync/client 0.3.385 → 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/dist/lib/api.d.ts +1 -0
- package/package.json +3 -3
- package/src/components/InviteMembers.tsx +1 -1
- package/src/lib/api.ts +2 -2
package/dist/lib/api.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export interface OrgMember {
|
|
|
77
77
|
export declare function listOrgMembers(orgId: string): Promise<OrgMember[]>;
|
|
78
78
|
export declare function updateMemberRole(orgId: string, userId: string, role: string): Promise<{
|
|
79
79
|
updated: boolean;
|
|
80
|
+
role: string;
|
|
80
81
|
}>;
|
|
81
82
|
export declare function removeMember(orgId: string, userId: string): Promise<{
|
|
82
83
|
removed: boolean;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.4.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "src/index.ts",
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"prepack": "bun run build"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@pylonsync/react": "0.
|
|
24
|
-
"@pylonsync/sync": "0.
|
|
23
|
+
"@pylonsync/react": "0.4.1",
|
|
24
|
+
"@pylonsync/sync": "0.4.1",
|
|
25
25
|
"clsx": "^2.1.1"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
@@ -542,7 +542,7 @@ function messageFromError(err: unknown): string {
|
|
|
542
542
|
case "INVALID_EMAIL":
|
|
543
543
|
return "Enter a valid email address.";
|
|
544
544
|
case "BAD_ROLE":
|
|
545
|
-
return
|
|
545
|
+
return err.message;
|
|
546
546
|
case "LAST_OWNER":
|
|
547
547
|
return "Can't demote or remove the last owner. Promote someone else first.";
|
|
548
548
|
case "FORBIDDEN":
|
package/src/lib/api.ts
CHANGED
|
@@ -210,8 +210,8 @@ export async function updateMemberRole(
|
|
|
210
210
|
orgId: string,
|
|
211
211
|
userId: string,
|
|
212
212
|
role: string,
|
|
213
|
-
): Promise<{ updated: boolean }> {
|
|
214
|
-
return req<{ updated: boolean }>(
|
|
213
|
+
): Promise<{ updated: boolean; role: string }> {
|
|
214
|
+
return req<{ updated: boolean; role: string }>(
|
|
215
215
|
"PUT",
|
|
216
216
|
`/api/auth/orgs/${orgId}/members/${userId}`,
|
|
217
217
|
{ role },
|