@sublay/js 7.4.3 → 7.5.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/dist/index.d.mts +40 -2
- package/dist/index.js +21 -0
- package/dist/index.mjs +21 -0
- package/dist/interfaces/Entity.d.ts +2 -0
- package/dist/interfaces/OAuthIdentity.d.ts +1 -0
- package/dist/interfaces/Space.d.ts +2 -0
- package/dist/modules/auth/index.d.ts +1 -0
- package/dist/modules/auth/setPassword.d.ts +9 -0
- package/dist/modules/entities/createEntity.d.ts +1 -0
- package/dist/modules/entities/fetchManyEntities.d.ts +1 -0
- package/dist/modules/entities/updateEntity.d.ts +1 -0
- package/dist/modules/spaces/createSpace.d.ts +1 -0
- package/dist/modules/spaces/fetchManySpaces.d.ts +1 -0
- package/dist/modules/spaces/index.d.ts +1 -0
- package/dist/modules/spaces/setSpaceEntityNsfw.d.ts +16 -0
- package/dist/modules/spaces/updateSpace.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -241,6 +241,15 @@ interface ChangePasswordResponse {
|
|
|
241
241
|
}
|
|
242
242
|
declare function changePassword(client: SublayHttpClient, data: ChangePasswordProps): Promise<ChangePasswordResponse>;
|
|
243
243
|
|
|
244
|
+
interface SetPasswordProps {
|
|
245
|
+
newPassword: string;
|
|
246
|
+
}
|
|
247
|
+
interface SetPasswordResponse {
|
|
248
|
+
success: boolean;
|
|
249
|
+
message: string;
|
|
250
|
+
}
|
|
251
|
+
declare function setPassword(client: SublayHttpClient, data: SetPasswordProps): Promise<SetPasswordResponse>;
|
|
252
|
+
|
|
244
253
|
interface VerifyEmailProps {
|
|
245
254
|
token: string;
|
|
246
255
|
}
|
|
@@ -291,13 +300,14 @@ declare const Auth_requestNewAccessToken: typeof requestNewAccessToken;
|
|
|
291
300
|
declare const Auth_requestPasswordReset: typeof requestPasswordReset;
|
|
292
301
|
declare const Auth_resetPassword: typeof resetPassword;
|
|
293
302
|
declare const Auth_sendVerificationEmail: typeof sendVerificationEmail;
|
|
303
|
+
declare const Auth_setPassword: typeof setPassword;
|
|
294
304
|
declare const Auth_signIn: typeof signIn;
|
|
295
305
|
declare const Auth_signOut: typeof signOut;
|
|
296
306
|
declare const Auth_signUp: typeof signUp;
|
|
297
307
|
declare const Auth_verifyEmail: typeof verifyEmail;
|
|
298
308
|
declare const Auth_verifyExternalUser: typeof verifyExternalUser;
|
|
299
309
|
declare namespace Auth {
|
|
300
|
-
export { Auth_changePassword as changePassword, Auth_confirmAccountDeletion as confirmAccountDeletion, Auth_requestAccountDeletion as requestAccountDeletion, Auth_requestNewAccessToken as requestNewAccessToken, Auth_requestPasswordReset as requestPasswordReset, Auth_resetPassword as resetPassword, Auth_sendVerificationEmail as sendVerificationEmail, Auth_signIn as signIn, Auth_signOut as signOut, Auth_signUp as signUp, Auth_verifyEmail as verifyEmail, Auth_verifyExternalUser as verifyExternalUser };
|
|
310
|
+
export { Auth_changePassword as changePassword, Auth_confirmAccountDeletion as confirmAccountDeletion, Auth_requestAccountDeletion as requestAccountDeletion, Auth_requestNewAccessToken as requestNewAccessToken, Auth_requestPasswordReset as requestPasswordReset, Auth_resetPassword as resetPassword, Auth_sendVerificationEmail as sendVerificationEmail, Auth_setPassword as setPassword, Auth_signIn as signIn, Auth_signOut as signOut, Auth_signUp as signUp, Auth_verifyEmail as verifyEmail, Auth_verifyExternalUser as verifyExternalUser };
|
|
301
311
|
}
|
|
302
312
|
|
|
303
313
|
/**
|
|
@@ -798,6 +808,8 @@ interface Space {
|
|
|
798
808
|
postingPermission: PostingPermission;
|
|
799
809
|
visibility: SpaceVisibility;
|
|
800
810
|
requireJoinApproval: boolean;
|
|
811
|
+
nsfw: boolean;
|
|
812
|
+
nsfwEffective: boolean;
|
|
801
813
|
parentSpaceId: string | null;
|
|
802
814
|
depth: number;
|
|
803
815
|
metadata: Record<string, any>;
|
|
@@ -960,6 +972,8 @@ interface Entity {
|
|
|
960
972
|
coordinates: [number, number];
|
|
961
973
|
} | null;
|
|
962
974
|
metadata: Record<string, any>;
|
|
975
|
+
nsfw: boolean;
|
|
976
|
+
nsfwEffective: boolean;
|
|
963
977
|
topComment: TopComment | null;
|
|
964
978
|
isSaved?: boolean;
|
|
965
979
|
isDraft: boolean | null;
|
|
@@ -987,6 +1001,7 @@ interface CreateEntityProps {
|
|
|
987
1001
|
longitude: number;
|
|
988
1002
|
};
|
|
989
1003
|
metadata?: Record<string, any>;
|
|
1004
|
+
nsfw?: boolean;
|
|
990
1005
|
isDraft?: boolean;
|
|
991
1006
|
/** Create the entity without attributing it to the logged-in user (authorless). */
|
|
992
1007
|
excludeUserId?: boolean;
|
|
@@ -1069,6 +1084,7 @@ interface FetchManyEntitiesProps extends SpaceReputationContextParams {
|
|
|
1069
1084
|
};
|
|
1070
1085
|
attachmentsFilters?: AttachmentsFilters;
|
|
1071
1086
|
locationFilters?: LocationFilters;
|
|
1087
|
+
nsfwFilter?: "include-all" | "exclude" | "only";
|
|
1072
1088
|
}
|
|
1073
1089
|
declare function fetchManyEntities(client: SublayHttpClient, data: FetchManyEntitiesProps): Promise<PaginatedResponse<Entity>>;
|
|
1074
1090
|
|
|
@@ -1084,6 +1100,7 @@ interface UpdateEntityProps {
|
|
|
1084
1100
|
longitude: number;
|
|
1085
1101
|
};
|
|
1086
1102
|
metadata?: Record<string, any>;
|
|
1103
|
+
nsfw?: boolean;
|
|
1087
1104
|
}
|
|
1088
1105
|
declare function updateEntity(client: SublayHttpClient, data: UpdateEntityProps): Promise<Entity>;
|
|
1089
1106
|
|
|
@@ -1622,6 +1639,7 @@ interface CreateSpaceProps {
|
|
|
1622
1639
|
requireJoinApproval?: boolean;
|
|
1623
1640
|
parentSpaceId?: string;
|
|
1624
1641
|
metadata?: Record<string, any>;
|
|
1642
|
+
nsfw?: boolean;
|
|
1625
1643
|
/**
|
|
1626
1644
|
* Avatar image. When present the request is sent as `multipart/form-data` and
|
|
1627
1645
|
* the server processes the image per `options`.
|
|
@@ -1642,6 +1660,7 @@ interface FetchManySpacesProps {
|
|
|
1642
1660
|
searchAny?: string;
|
|
1643
1661
|
memberOf?: "true";
|
|
1644
1662
|
parentSpaceId?: string | "null";
|
|
1663
|
+
nsfwFilter?: "include-all" | "exclude" | "only";
|
|
1645
1664
|
include?: string;
|
|
1646
1665
|
}
|
|
1647
1666
|
declare function fetchManySpaces(client: SublayHttpClient, data: FetchManySpacesProps): Promise<PaginatedResponse<Space>>;
|
|
@@ -1697,6 +1716,7 @@ interface UpdateSpaceProps {
|
|
|
1697
1716
|
postingPermission?: PostingPermission;
|
|
1698
1717
|
visibility?: SpaceVisibility;
|
|
1699
1718
|
metadata?: Record<string, any>;
|
|
1719
|
+
nsfw?: boolean;
|
|
1700
1720
|
/**
|
|
1701
1721
|
* New avatar image. When present the request is sent as `multipart/form-data`
|
|
1702
1722
|
* and the server processes the image per `options`, replacing the old avatar.
|
|
@@ -1921,6 +1941,22 @@ interface ModerationResponse {
|
|
|
1921
1941
|
}
|
|
1922
1942
|
declare function moderateSpaceEntity(client: SublayHttpClient, data: ModerateSpaceEntityProps): Promise<ModerationResponse>;
|
|
1923
1943
|
|
|
1944
|
+
interface SetSpaceEntityNsfwProps {
|
|
1945
|
+
spaceId: string;
|
|
1946
|
+
entityId: string;
|
|
1947
|
+
nsfw: boolean;
|
|
1948
|
+
}
|
|
1949
|
+
interface SetSpaceEntityNsfwResponse {
|
|
1950
|
+
message: string;
|
|
1951
|
+
nsfw: boolean;
|
|
1952
|
+
}
|
|
1953
|
+
/**
|
|
1954
|
+
* Space-moderator endpoint to set the NSFW flag on an entity within their space
|
|
1955
|
+
* (including other users' entities). Near-copy of `moderateSpaceEntity`, but it
|
|
1956
|
+
* writes the entity's own `nsfw` (the NSFW axis), not `moderationStatus`.
|
|
1957
|
+
*/
|
|
1958
|
+
declare function setSpaceEntityNsfw(client: SublayHttpClient, data: SetSpaceEntityNsfwProps): Promise<SetSpaceEntityNsfwResponse>;
|
|
1959
|
+
|
|
1924
1960
|
interface ModerateSpaceCommentProps {
|
|
1925
1961
|
spaceId: string;
|
|
1926
1962
|
commentId: string;
|
|
@@ -2081,13 +2117,14 @@ declare const Spaces_moderateSpaceChatMessage: typeof moderateSpaceChatMessage;
|
|
|
2081
2117
|
declare const Spaces_moderateSpaceComment: typeof moderateSpaceComment;
|
|
2082
2118
|
declare const Spaces_moderateSpaceEntity: typeof moderateSpaceEntity;
|
|
2083
2119
|
declare const Spaces_reorderRules: typeof reorderRules;
|
|
2120
|
+
declare const Spaces_setSpaceEntityNsfw: typeof setSpaceEntityNsfw;
|
|
2084
2121
|
declare const Spaces_unbanMember: typeof unbanMember;
|
|
2085
2122
|
declare const Spaces_updateDigestConfig: typeof updateDigestConfig;
|
|
2086
2123
|
declare const Spaces_updateMemberRole: typeof updateMemberRole;
|
|
2087
2124
|
declare const Spaces_updateRule: typeof updateRule;
|
|
2088
2125
|
declare const Spaces_updateSpace: typeof updateSpace;
|
|
2089
2126
|
declare namespace Spaces {
|
|
2090
|
-
export { Spaces_approveMembership as approveMembership, Spaces_banMember as banMember, Spaces_checkMyMembership as checkMyMembership, Spaces_checkSlugAvailability as checkSlugAvailability, Spaces_createRule as createRule, Spaces_createSpace as createSpace, Spaces_declineMembership as declineMembership, Spaces_deleteRule as deleteRule, Spaces_deleteSpace as deleteSpace, Spaces_fetchChildSpaces as fetchChildSpaces, Spaces_fetchDigestConfig as fetchDigestConfig, Spaces_fetchManyRules as fetchManyRules, Spaces_fetchManySpaces as fetchManySpaces, Spaces_fetchMutualSpaces as fetchMutualSpaces, Spaces_fetchRule as fetchRule, Spaces_fetchSpace as fetchSpace, Spaces_fetchSpaceBreadcrumb as fetchSpaceBreadcrumb, Spaces_fetchSpaceByShortId as fetchSpaceByShortId, Spaces_fetchSpaceBySlug as fetchSpaceBySlug, Spaces_fetchSpaceMembers as fetchSpaceMembers, Spaces_fetchSpaceTeam as fetchSpaceTeam, Spaces_fetchUserSpaces as fetchUserSpaces, Spaces_getSpaceConversation as getSpaceConversation, Spaces_handleCommentReport as handleCommentReport, Spaces_handleEntityReport as handleEntityReport, Spaces_handleSpaceChatReport as handleSpaceChatReport, Spaces_joinSpace as joinSpace, Spaces_leaveSpace as leaveSpace, Spaces_moderateSpaceChatMessage as moderateSpaceChatMessage, Spaces_moderateSpaceComment as moderateSpaceComment, Spaces_moderateSpaceEntity as moderateSpaceEntity, Spaces_reorderRules as reorderRules, Spaces_unbanMember as unbanMember, Spaces_updateDigestConfig as updateDigestConfig, Spaces_updateMemberRole as updateMemberRole, Spaces_updateRule as updateRule, Spaces_updateSpace as updateSpace };
|
|
2127
|
+
export { Spaces_approveMembership as approveMembership, Spaces_banMember as banMember, Spaces_checkMyMembership as checkMyMembership, Spaces_checkSlugAvailability as checkSlugAvailability, Spaces_createRule as createRule, Spaces_createSpace as createSpace, Spaces_declineMembership as declineMembership, Spaces_deleteRule as deleteRule, Spaces_deleteSpace as deleteSpace, Spaces_fetchChildSpaces as fetchChildSpaces, Spaces_fetchDigestConfig as fetchDigestConfig, Spaces_fetchManyRules as fetchManyRules, Spaces_fetchManySpaces as fetchManySpaces, Spaces_fetchMutualSpaces as fetchMutualSpaces, Spaces_fetchRule as fetchRule, Spaces_fetchSpace as fetchSpace, Spaces_fetchSpaceBreadcrumb as fetchSpaceBreadcrumb, Spaces_fetchSpaceByShortId as fetchSpaceByShortId, Spaces_fetchSpaceBySlug as fetchSpaceBySlug, Spaces_fetchSpaceMembers as fetchSpaceMembers, Spaces_fetchSpaceTeam as fetchSpaceTeam, Spaces_fetchUserSpaces as fetchUserSpaces, Spaces_getSpaceConversation as getSpaceConversation, Spaces_handleCommentReport as handleCommentReport, Spaces_handleEntityReport as handleEntityReport, Spaces_handleSpaceChatReport as handleSpaceChatReport, Spaces_joinSpace as joinSpace, Spaces_leaveSpace as leaveSpace, Spaces_moderateSpaceChatMessage as moderateSpaceChatMessage, Spaces_moderateSpaceComment as moderateSpaceComment, Spaces_moderateSpaceEntity as moderateSpaceEntity, Spaces_reorderRules as reorderRules, Spaces_setSpaceEntityNsfw as setSpaceEntityNsfw, Spaces_unbanMember as unbanMember, Spaces_updateDigestConfig as updateDigestConfig, Spaces_updateMemberRole as updateMemberRole, Spaces_updateRule as updateRule, Spaces_updateSpace as updateSpace };
|
|
2091
2128
|
}
|
|
2092
2129
|
|
|
2093
2130
|
interface Collection {
|
|
@@ -2891,6 +2928,7 @@ interface OAuthIdentity {
|
|
|
2891
2928
|
}
|
|
2892
2929
|
interface ListIdentitiesResponse {
|
|
2893
2930
|
identities: OAuthIdentity[];
|
|
2931
|
+
hasPassword: boolean;
|
|
2894
2932
|
}
|
|
2895
2933
|
|
|
2896
2934
|
/** List the current user's linked OAuth identities (authenticated). */
|
package/dist/index.js
CHANGED
|
@@ -177,6 +177,7 @@ __export(auth_exports, {
|
|
|
177
177
|
requestPasswordReset: () => requestPasswordReset,
|
|
178
178
|
resetPassword: () => resetPassword,
|
|
179
179
|
sendVerificationEmail: () => sendVerificationEmail,
|
|
180
|
+
setPassword: () => setPassword,
|
|
180
181
|
signIn: () => signIn,
|
|
181
182
|
signOut: () => signOut,
|
|
182
183
|
signUp: () => signUp,
|
|
@@ -270,6 +271,15 @@ async function changePassword(client, data) {
|
|
|
270
271
|
return response.data;
|
|
271
272
|
}
|
|
272
273
|
|
|
274
|
+
// src/modules/auth/setPassword.ts
|
|
275
|
+
async function setPassword(client, data) {
|
|
276
|
+
const response = await client.projectInstance.post(
|
|
277
|
+
"/auth/set-password",
|
|
278
|
+
data
|
|
279
|
+
);
|
|
280
|
+
return response.data;
|
|
281
|
+
}
|
|
282
|
+
|
|
273
283
|
// src/modules/auth/verifyEmail.ts
|
|
274
284
|
async function verifyEmail(client, data) {
|
|
275
285
|
await client.projectInstance.post("/auth/verify-email", data);
|
|
@@ -1210,6 +1220,7 @@ __export(spaces_exports, {
|
|
|
1210
1220
|
moderateSpaceComment: () => moderateSpaceComment,
|
|
1211
1221
|
moderateSpaceEntity: () => moderateSpaceEntity,
|
|
1212
1222
|
reorderRules: () => reorderRules,
|
|
1223
|
+
setSpaceEntityNsfw: () => setSpaceEntityNsfw,
|
|
1213
1224
|
unbanMember: () => unbanMember,
|
|
1214
1225
|
updateDigestConfig: () => updateDigestConfig,
|
|
1215
1226
|
updateMemberRole: () => updateMemberRole,
|
|
@@ -1562,6 +1573,16 @@ async function moderateSpaceEntity(client, data) {
|
|
|
1562
1573
|
return response.data;
|
|
1563
1574
|
}
|
|
1564
1575
|
|
|
1576
|
+
// src/modules/spaces/setSpaceEntityNsfw.ts
|
|
1577
|
+
async function setSpaceEntityNsfw(client, data) {
|
|
1578
|
+
const { spaceId, entityId, ...body } = data;
|
|
1579
|
+
const response = await client.projectInstance.patch(
|
|
1580
|
+
`/spaces/${spaceId}/entities/${entityId}/nsfw`,
|
|
1581
|
+
body
|
|
1582
|
+
);
|
|
1583
|
+
return response.data;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1565
1586
|
// src/modules/spaces/moderateSpaceComment.ts
|
|
1566
1587
|
async function moderateSpaceComment(client, data) {
|
|
1567
1588
|
const { spaceId, commentId, ...body } = data;
|
package/dist/index.mjs
CHANGED
|
@@ -145,6 +145,7 @@ __export(auth_exports, {
|
|
|
145
145
|
requestPasswordReset: () => requestPasswordReset,
|
|
146
146
|
resetPassword: () => resetPassword,
|
|
147
147
|
sendVerificationEmail: () => sendVerificationEmail,
|
|
148
|
+
setPassword: () => setPassword,
|
|
148
149
|
signIn: () => signIn,
|
|
149
150
|
signOut: () => signOut,
|
|
150
151
|
signUp: () => signUp,
|
|
@@ -238,6 +239,15 @@ async function changePassword(client, data) {
|
|
|
238
239
|
return response.data;
|
|
239
240
|
}
|
|
240
241
|
|
|
242
|
+
// src/modules/auth/setPassword.ts
|
|
243
|
+
async function setPassword(client, data) {
|
|
244
|
+
const response = await client.projectInstance.post(
|
|
245
|
+
"/auth/set-password",
|
|
246
|
+
data
|
|
247
|
+
);
|
|
248
|
+
return response.data;
|
|
249
|
+
}
|
|
250
|
+
|
|
241
251
|
// src/modules/auth/verifyEmail.ts
|
|
242
252
|
async function verifyEmail(client, data) {
|
|
243
253
|
await client.projectInstance.post("/auth/verify-email", data);
|
|
@@ -1178,6 +1188,7 @@ __export(spaces_exports, {
|
|
|
1178
1188
|
moderateSpaceComment: () => moderateSpaceComment,
|
|
1179
1189
|
moderateSpaceEntity: () => moderateSpaceEntity,
|
|
1180
1190
|
reorderRules: () => reorderRules,
|
|
1191
|
+
setSpaceEntityNsfw: () => setSpaceEntityNsfw,
|
|
1181
1192
|
unbanMember: () => unbanMember,
|
|
1182
1193
|
updateDigestConfig: () => updateDigestConfig,
|
|
1183
1194
|
updateMemberRole: () => updateMemberRole,
|
|
@@ -1530,6 +1541,16 @@ async function moderateSpaceEntity(client, data) {
|
|
|
1530
1541
|
return response.data;
|
|
1531
1542
|
}
|
|
1532
1543
|
|
|
1544
|
+
// src/modules/spaces/setSpaceEntityNsfw.ts
|
|
1545
|
+
async function setSpaceEntityNsfw(client, data) {
|
|
1546
|
+
const { spaceId, entityId, ...body } = data;
|
|
1547
|
+
const response = await client.projectInstance.patch(
|
|
1548
|
+
`/spaces/${spaceId}/entities/${entityId}/nsfw`,
|
|
1549
|
+
body
|
|
1550
|
+
);
|
|
1551
|
+
return response.data;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1533
1554
|
// src/modules/spaces/moderateSpaceComment.ts
|
|
1534
1555
|
async function moderateSpaceComment(client, data) {
|
|
1535
1556
|
const { spaceId, commentId, ...body } = data;
|
|
@@ -40,6 +40,8 @@ export interface Space {
|
|
|
40
40
|
postingPermission: PostingPermission;
|
|
41
41
|
visibility: SpaceVisibility;
|
|
42
42
|
requireJoinApproval: boolean;
|
|
43
|
+
nsfw: boolean;
|
|
44
|
+
nsfwEffective: boolean;
|
|
43
45
|
parentSpaceId: string | null;
|
|
44
46
|
depth: number;
|
|
45
47
|
metadata: Record<string, any>;
|
|
@@ -6,6 +6,7 @@ export { verifyExternalUser } from "./verifyExternalUser";
|
|
|
6
6
|
export { requestPasswordReset } from "./requestPasswordReset";
|
|
7
7
|
export { resetPassword } from "./resetPassword";
|
|
8
8
|
export { changePassword } from "./changePassword";
|
|
9
|
+
export { setPassword } from "./setPassword";
|
|
9
10
|
export { verifyEmail } from "./verifyEmail";
|
|
10
11
|
export { sendVerificationEmail } from "./sendVerificationEmail";
|
|
11
12
|
export { requestAccountDeletion } from "./requestAccountDeletion";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SublayHttpClient } from "../../core/client";
|
|
2
|
+
export interface SetPasswordProps {
|
|
3
|
+
newPassword: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SetPasswordResponse {
|
|
6
|
+
success: boolean;
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function setPassword(client: SublayHttpClient, data: SetPasswordProps): Promise<SetPasswordResponse>;
|
|
@@ -59,5 +59,6 @@ export interface FetchManyEntitiesProps extends SpaceReputationContextParams {
|
|
|
59
59
|
};
|
|
60
60
|
attachmentsFilters?: AttachmentsFilters;
|
|
61
61
|
locationFilters?: LocationFilters;
|
|
62
|
+
nsfwFilter?: "include-all" | "exclude" | "only";
|
|
62
63
|
}
|
|
63
64
|
export declare function fetchManyEntities(client: SublayHttpClient, data: FetchManyEntitiesProps): Promise<PaginatedResponse<Entity>>;
|
|
@@ -17,6 +17,7 @@ export interface CreateSpaceProps {
|
|
|
17
17
|
requireJoinApproval?: boolean;
|
|
18
18
|
parentSpaceId?: string;
|
|
19
19
|
metadata?: Record<string, any>;
|
|
20
|
+
nsfw?: boolean;
|
|
20
21
|
/**
|
|
21
22
|
* Avatar image. When present the request is sent as `multipart/form-data` and
|
|
22
23
|
* the server processes the image per `options`.
|
|
@@ -11,6 +11,7 @@ export interface FetchManySpacesProps {
|
|
|
11
11
|
searchAny?: string;
|
|
12
12
|
memberOf?: "true";
|
|
13
13
|
parentSpaceId?: string | "null";
|
|
14
|
+
nsfwFilter?: "include-all" | "exclude" | "only";
|
|
14
15
|
include?: string;
|
|
15
16
|
}
|
|
16
17
|
export declare function fetchManySpaces(client: SublayHttpClient, data: FetchManySpacesProps): Promise<PaginatedResponse<Space>>;
|
|
@@ -29,6 +29,7 @@ export { reorderRules } from "./reorderRules";
|
|
|
29
29
|
export { handleEntityReport } from "./handleEntityReport";
|
|
30
30
|
export { handleCommentReport } from "./handleCommentReport";
|
|
31
31
|
export { moderateSpaceEntity } from "./moderateSpaceEntity";
|
|
32
|
+
export { setSpaceEntityNsfw } from "./setSpaceEntityNsfw";
|
|
32
33
|
export { moderateSpaceComment } from "./moderateSpaceComment";
|
|
33
34
|
export { fetchDigestConfig } from "./fetchDigestConfig";
|
|
34
35
|
export { updateDigestConfig } from "./updateDigestConfig";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SublayHttpClient } from "../../core/client";
|
|
2
|
+
export interface SetSpaceEntityNsfwProps {
|
|
3
|
+
spaceId: string;
|
|
4
|
+
entityId: string;
|
|
5
|
+
nsfw: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface SetSpaceEntityNsfwResponse {
|
|
8
|
+
message: string;
|
|
9
|
+
nsfw: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Space-moderator endpoint to set the NSFW flag on an entity within their space
|
|
13
|
+
* (including other users' entities). Near-copy of `moderateSpaceEntity`, but it
|
|
14
|
+
* writes the entity's own `nsfw` (the NSFW axis), not `moderationStatus`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function setSpaceEntityNsfw(client: SublayHttpClient, data: SetSpaceEntityNsfwProps): Promise<SetSpaceEntityNsfwResponse>;
|
|
@@ -10,6 +10,7 @@ export interface UpdateSpaceProps {
|
|
|
10
10
|
postingPermission?: PostingPermission;
|
|
11
11
|
visibility?: SpaceVisibility;
|
|
12
12
|
metadata?: Record<string, any>;
|
|
13
|
+
nsfw?: boolean;
|
|
13
14
|
/**
|
|
14
15
|
* New avatar image. When present the request is sent as `multipart/form-data`
|
|
15
16
|
* and the server processes the image per `options`, replacing the old avatar.
|