@amityco/ts-sdk 7.28.0 → 7.28.1-8040a86.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/@types/core/errors.d.ts +2 -0
- package/dist/@types/core/errors.d.ts.map +1 -1
- package/dist/@types/domains/content.d.ts +11 -0
- package/dist/@types/domains/content.d.ts.map +1 -1
- package/dist/@types/domains/user.d.ts +31 -0
- package/dist/@types/domains/user.d.ts.map +1 -1
- package/dist/commentRepository/api/flagComment.d.ts +72 -5
- package/dist/commentRepository/api/flagComment.d.ts.map +1 -1
- package/dist/commentRepository/internalApi/flagCommentWithOptions.d.ts +13 -0
- package/dist/commentRepository/internalApi/flagCommentWithOptions.d.ts.map +1 -0
- package/dist/commentRepository/internalApi/flagCommentWithReasonString.d.ts +17 -0
- package/dist/commentRepository/internalApi/flagCommentWithReasonString.d.ts.map +1 -0
- package/dist/commentRepository/internalApi/index.d.ts +2 -0
- package/dist/commentRepository/internalApi/index.d.ts.map +1 -1
- package/dist/commentRepository/internalApi/tests/integration/flagCommentWithOptions.integration.test.d.ts +2 -0
- package/dist/commentRepository/internalApi/tests/integration/flagCommentWithOptions.integration.test.d.ts.map +1 -0
- package/dist/commentRepository/internalApi/tests/integration/flagCommentWithReasonString.integration.test.d.ts +2 -0
- package/dist/commentRepository/internalApi/tests/integration/flagCommentWithReasonString.integration.test.d.ts.map +1 -0
- package/dist/core/transports/tests/integration/serverErrorCodes.integration.test.d.ts +2 -0
- package/dist/core/transports/tests/integration/serverErrorCodes.integration.test.d.ts.map +1 -0
- package/dist/index.cjs.js +445 -51
- package/dist/index.esm.js +446 -52
- package/dist/index.umd.js +2 -2
- package/dist/messageRepository/api/flagMessage.d.ts +73 -6
- package/dist/messageRepository/api/flagMessage.d.ts.map +1 -1
- package/dist/messageRepository/api/tests/integration/flagMessage.overloads.integration.test.d.ts +2 -0
- package/dist/messageRepository/api/tests/integration/flagMessage.overloads.integration.test.d.ts.map +1 -0
- package/dist/messageRepository/internalApi/flagMessageWithOptions.d.ts +13 -0
- package/dist/messageRepository/internalApi/flagMessageWithOptions.d.ts.map +1 -0
- package/dist/messageRepository/internalApi/flagMessageWithReasonString.d.ts +18 -0
- package/dist/messageRepository/internalApi/flagMessageWithReasonString.d.ts.map +1 -0
- package/dist/messageRepository/internalApi/tests/integration/flagMessageWithOptions.integration.test.d.ts +2 -0
- package/dist/messageRepository/internalApi/tests/integration/flagMessageWithOptions.integration.test.d.ts.map +1 -0
- package/dist/messageRepository/internalApi/tests/integration/flagMessageWithReasonString.integration.test.d.ts +2 -0
- package/dist/messageRepository/internalApi/tests/integration/flagMessageWithReasonString.integration.test.d.ts.map +1 -0
- package/dist/postRepository/api/flagPost.d.ts +73 -6
- package/dist/postRepository/api/flagPost.d.ts.map +1 -1
- package/dist/postRepository/api/tests/integration/flagPost.overloads.integration.test.d.ts +2 -0
- package/dist/postRepository/api/tests/integration/flagPost.overloads.integration.test.d.ts.map +1 -0
- package/dist/postRepository/internalApi/flagPostWithOptions.d.ts +13 -0
- package/dist/postRepository/internalApi/flagPostWithOptions.d.ts.map +1 -0
- package/dist/postRepository/internalApi/flagPostWithReasonString.d.ts +17 -0
- package/dist/postRepository/internalApi/flagPostWithReasonString.d.ts.map +1 -0
- package/dist/postRepository/internalApi/index.d.ts +2 -0
- package/dist/postRepository/internalApi/index.d.ts.map +1 -1
- package/dist/postRepository/internalApi/tests/integration/flagPostWithOptions.integration.test.d.ts +2 -0
- package/dist/postRepository/internalApi/tests/integration/flagPostWithOptions.integration.test.d.ts.map +1 -0
- package/dist/postRepository/internalApi/tests/integration/flagPostWithReasonString.integration.test.d.ts +2 -0
- package/dist/postRepository/internalApi/tests/integration/flagPostWithReasonString.integration.test.d.ts.map +1 -0
- package/dist/userRepository/api/flagUser.d.ts +50 -9
- package/dist/userRepository/api/flagUser.d.ts.map +1 -1
- package/dist/userRepository/api/flagUserBehavior.d.ts +29 -0
- package/dist/userRepository/api/flagUserBehavior.d.ts.map +1 -0
- package/dist/userRepository/api/flagUserProfile.d.ts +29 -0
- package/dist/userRepository/api/flagUserProfile.d.ts.map +1 -0
- package/dist/userRepository/api/index.d.ts +2 -0
- package/dist/userRepository/api/index.d.ts.map +1 -1
- package/dist/userRepository/api/tests/integration/flagUser.overloads.integration.test.d.ts +2 -0
- package/dist/userRepository/api/tests/integration/flagUser.overloads.integration.test.d.ts.map +1 -0
- package/dist/userRepository/api/tests/integration/flagUserBehavior.integration.test.d.ts +2 -0
- package/dist/userRepository/api/tests/integration/flagUserBehavior.integration.test.d.ts.map +1 -0
- package/dist/userRepository/api/tests/integration/flagUserProfile.integration.test.d.ts +2 -0
- package/dist/userRepository/api/tests/integration/flagUserProfile.integration.test.d.ts.map +1 -0
- package/dist/userRepository/utils/submitUserReport.d.ts +10 -0
- package/dist/userRepository/utils/submitUserReport.d.ts.map +1 -0
- package/dist/userRepository/utils/userReport.d.ts +35 -0
- package/dist/userRepository/utils/userReport.d.ts.map +1 -0
- package/dist/utils/contentFlag.d.ts +28 -0
- package/dist/utils/contentFlag.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -42,6 +42,18 @@ var UserReportTypeEnum;
|
|
|
42
42
|
UserReportTypeEnum["AVATAR"] = "avatarFileId";
|
|
43
43
|
UserReportTypeEnum["BEHAVIOR"] = "behavior";
|
|
44
44
|
})(UserReportTypeEnum || (UserReportTypeEnum = {}));
|
|
45
|
+
/**
|
|
46
|
+
* The profile field a user is reported for in `UserRepository.flagUserProfile`.
|
|
47
|
+
* Each member is the backend `reportType` wire value. There is deliberately no
|
|
48
|
+
* behavior member: behavior reports need a reason and go through
|
|
49
|
+
* `UserRepository.flagUserBehavior`.
|
|
50
|
+
*/
|
|
51
|
+
var UserProfileFieldEnum;
|
|
52
|
+
(function (UserProfileFieldEnum) {
|
|
53
|
+
UserProfileFieldEnum["DISPLAY_NAME"] = "displayName";
|
|
54
|
+
UserProfileFieldEnum["DESCRIPTION"] = "description";
|
|
55
|
+
UserProfileFieldEnum["AVATAR"] = "avatarFileId";
|
|
56
|
+
})(UserProfileFieldEnum || (UserProfileFieldEnum = {}));
|
|
45
57
|
|
|
46
58
|
const FileType = Object.freeze({
|
|
47
59
|
FILE: 'file',
|
|
@@ -796,6 +808,18 @@ class ASCConnectionError extends ASCError {
|
|
|
796
808
|
this.event = event;
|
|
797
809
|
}
|
|
798
810
|
}
|
|
811
|
+
/**
|
|
812
|
+
* Input sanitization related error
|
|
813
|
+
* @category Errors
|
|
814
|
+
*/
|
|
815
|
+
class ASCInvalidParameterError extends ASCError {
|
|
816
|
+
/**
|
|
817
|
+
* @param message A custom error message
|
|
818
|
+
*/
|
|
819
|
+
constructor(message) {
|
|
820
|
+
super(message, 800110 /* Amity.ClientError.INVALID_PARAMETERS */, "error" /* Amity.ErrorLevel.ERROR */);
|
|
821
|
+
}
|
|
822
|
+
}
|
|
799
823
|
|
|
800
824
|
let activeClient = null;
|
|
801
825
|
/**
|
|
@@ -13226,7 +13250,7 @@ const getWatchSessionStorage = () => {
|
|
|
13226
13250
|
return storageInstance;
|
|
13227
13251
|
};
|
|
13228
13252
|
|
|
13229
|
-
const privateKey = "
|
|
13253
|
+
const privateKey = "MIIEpQIBAAKCAQEAwAEc/oZgYIvKSUG/C3mONYLR4ZPgAjMEX4bJ+xqqakUDRtqlNO+eZs2blQ1Ko0DBkqPExyQezvjibH5W2UZBV5RaBTlTcNVKTToMBEGesAfaEcM3qUyQHxdbFYZv6P4sb14dcwxTQ8usmaV8ooiR1Fcaso5ZWYcZ8Hb46FbQ7OoVumsBtPWwfZ4f003o5VCl6AIM6lcLv9UDLlFVYhE+PeXpRHtfWlGqxMvqC9oinlwhL6nWv6VjQXW4nhcib72dPBzfHT7k/PMKto2SxALYdb68ENiAGuJLWi3AUHSyYCJK2w7wIlWfJUAI0v26ub10IpExr6D5QuW2577jjP93iwIDAQABAoIBAFWfqXhwIIatkFY+9Z1+ZcbDQimgsmMIsUiQaX6Lk7e0cxOj6czDlxYtVtaPiNtow2pLkjNkjkCqiP7tEHnwdK9DvylZOTa2R15NJpK3WLcTqVIGhsn/FL5owfvFah6zSsmXZParZm5zY9NZE03ALZhOB9/cz0e3kf/EbpfeL2mW7MApyiUt5i09ycchroOpcWp73ipIxvgigtZyUGFmsQicWhUs28F0D7w4Qfk76yG3nqXeb+BAMhCaIaa/k/aAxhiZG/ygEQWQrcC8gfe+jyicMAQPDEVS9YuUMGsLjIjKuVLZzp2xirQnhc2i2zVNEIvG6soprPOBEMQugzrtX5ECgYEA3b7KAbBIbDl1e4ZSCWhHdHkiWVZHaopsR/LhqDDNhXjWjq3AesgV6k0j9EdziMn/HmmOso0bz99GTV3JZf4A9ztTLumJlkHbdVtlgOqSjrFLj12rH9KXTheyIhWSpUmm8+WB1xasFbqpvJaGo7F3pd2Fqj1XR4mp5BO7c/t7LJ0CgYEA3aouEzXQ9THRKYocdfY69EI1Il1t/d/RSqqd9BxEjxBgxkM13ZiYIn/R4WW/nCUrlmhxG44Aa2Gob4Ahfsui2xKTg/g/3Zk/rAxAEGkfOLGoenaJMD41fH4wUq3FRYwkvnaMb9Hd6f/TlBHslIRa2NN58bSBGJCyBP2b59+2+EcCgYEAixDVRXvV37GlYUOa/XVdosk5Zoe6oDGRuQm0xbNdoUBoZvDHDvme7ONWEiQha/8qtVsD+CyQ7awcPfb8kK9c0bBt+bTS6d4BkTcxkEkMgtrkBVR8Nqfu5jXsLH4VCv4G61zbMhZw8+ut+az5YX2yCN7Frj9sFlxapMRPQmzMEe0CgYEAumsAzM8ZqNv4mAK65Mnr0rhLj1cbxcKRdUYACOgtEFQpzxN/HZnTeFAe5nx3pI3uFlRHq3DFEYnT6dHMWaJQmAULYpVIwMi9L6gtyJ9fzoI6uqMtxRDMUqKdaSsTGOY/kJ6KhQ/unXi1K3XXjR+yd1+C0q+HUm1+CYxvrZYLfskCgYEArsEy+IQOiqniJ0NE2vVUF+UK/IRZaic9YKcpov5Ot7Vvzm/MnnW4N1ljVskocETBWMmPUvNSExVjPebi+rxd8fa5kY8BJScPTzMFbunZn/wjtGdcM10qdlVQ9doG61A/9P3ezFKCfS4AvF/H/59LcSx2Bh28fp3/efiVIOpVd4Y=";
|
|
13230
13254
|
/*
|
|
13231
13255
|
* The crypto algorithm used for importing key and signing string
|
|
13232
13256
|
*/
|
|
@@ -15025,18 +15049,18 @@ const buildFlagUserBody = (options) => {
|
|
|
15025
15049
|
/**
|
|
15026
15050
|
* ```js
|
|
15027
15051
|
* import { UserRepository } from '@amityco/ts-sdk'
|
|
15052
|
+
*
|
|
15053
|
+
* // Typeless report (supported).
|
|
15028
15054
|
* const flagged = await UserRepository.flagUser('userId')
|
|
15029
|
-
* const flaggedBehavior = await UserRepository.flagUser('userId', {
|
|
15030
|
-
* reportType: 'behavior',
|
|
15031
|
-
* reason: 'Harassment or bullying',
|
|
15032
|
-
* comment: 'optional free-text',
|
|
15033
|
-
* })
|
|
15034
15055
|
* ```
|
|
15035
15056
|
*
|
|
15057
|
+
* Flags a user. Two call shapes are accepted (see the overloads): id-only, which
|
|
15058
|
+
* sends no body and stays supported, and the deprecated structured options object,
|
|
15059
|
+
* whose request mapping is unchanged. New code reporting a profile field or behavior
|
|
15060
|
+
* should use `flagUserProfile` or `flagUserBehavior`.
|
|
15061
|
+
*
|
|
15036
15062
|
* @param userId The ID of the user to be flagged
|
|
15037
|
-
* @param options
|
|
15038
|
-
* body: `reportType`, `reason`, `comment`. Only non-null fields are included.
|
|
15039
|
-
* All validation is server-side; a bodyless call produces a typeless report.
|
|
15063
|
+
* @param options Deprecated report metadata; omit for a typeless report
|
|
15040
15064
|
* @returns the flagged {@link Amity.User}
|
|
15041
15065
|
*
|
|
15042
15066
|
* @category User API
|
|
@@ -15057,6 +15081,156 @@ const flagUser = async (userId, options) => {
|
|
|
15057
15081
|
};
|
|
15058
15082
|
/* end_public_function */
|
|
15059
15083
|
|
|
15084
|
+
/**
|
|
15085
|
+
* Sends a validated split user report (`flagUserProfile` / `flagUserBehavior`) to the
|
|
15086
|
+
* same endpoint as `flagUser`, then persists the returned user and fires `user.flagged`
|
|
15087
|
+
* exactly as `flagUser` does, so all three calls share return, cache and event behaviour.
|
|
15088
|
+
*
|
|
15089
|
+
* Not exported from the public API.
|
|
15090
|
+
*/
|
|
15091
|
+
const submitUserReport = async (apiName, userId, body) => {
|
|
15092
|
+
var _a;
|
|
15093
|
+
const client = getActiveClient();
|
|
15094
|
+
client.log(`user/${apiName}`, { userId, body });
|
|
15095
|
+
const { data } = await client.http.post(`/api/v4/me/flags/${encodeURIComponent(userId)}`, body);
|
|
15096
|
+
const payload = prepareUserPayload(data);
|
|
15097
|
+
if (client.cache) {
|
|
15098
|
+
ingestInCache(payload);
|
|
15099
|
+
}
|
|
15100
|
+
fireEvent('user.flagged', data);
|
|
15101
|
+
return (_a = payload.users.find(user => user.userId === userId)) !== null && _a !== void 0 ? _a : payload.users[0];
|
|
15102
|
+
};
|
|
15103
|
+
|
|
15104
|
+
/** Maximum `comment` length, in string length units, after trimming. */
|
|
15105
|
+
const USER_REPORT_COMMENT_MAX_LENGTH = 300;
|
|
15106
|
+
const PROFILE_FIELDS = Object.values(UserProfileFieldEnum);
|
|
15107
|
+
const BEHAVIOR_REASONS = Object.values(ContentFlagReasonEnum);
|
|
15108
|
+
const assertOptionsObject = (apiName, options, shape) => {
|
|
15109
|
+
if (typeof options !== 'object' || options === null || Array.isArray(options)) {
|
|
15110
|
+
throw new ASCInvalidParameterError(`${apiName}: expected an options object \`${shape}\``);
|
|
15111
|
+
}
|
|
15112
|
+
return options;
|
|
15113
|
+
};
|
|
15114
|
+
/**
|
|
15115
|
+
* Normalizes an optional reporter `comment`: it must be a string when supplied (`null`
|
|
15116
|
+
* is not a valid supplied comment); it is trimmed; a blank result is omitted (the
|
|
15117
|
+
* backend rejects `""`); a result longer than 300 characters is rejected before any
|
|
15118
|
+
* request. Otherwise the trimmed text is returned unchanged.
|
|
15119
|
+
*
|
|
15120
|
+
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` for a non-string or over-length comment
|
|
15121
|
+
*/
|
|
15122
|
+
const normalizeUserReportComment = (apiName, comment) => {
|
|
15123
|
+
if (comment === undefined)
|
|
15124
|
+
return undefined;
|
|
15125
|
+
if (typeof comment !== 'string') {
|
|
15126
|
+
throw new ASCInvalidParameterError(`${apiName}: \`comment\` must be a string when supplied`);
|
|
15127
|
+
}
|
|
15128
|
+
const trimmed = comment.trim();
|
|
15129
|
+
if (trimmed.length === 0)
|
|
15130
|
+
return undefined;
|
|
15131
|
+
if (trimmed.length > USER_REPORT_COMMENT_MAX_LENGTH) {
|
|
15132
|
+
throw new ASCInvalidParameterError(`${apiName}: \`comment\` must be at most ${USER_REPORT_COMMENT_MAX_LENGTH} characters after trimming`);
|
|
15133
|
+
}
|
|
15134
|
+
return trimmed;
|
|
15135
|
+
};
|
|
15136
|
+
const withComment = (body, comment) => comment === undefined ? body : Object.assign(Object.assign({}, body), { comment });
|
|
15137
|
+
/**
|
|
15138
|
+
* Validates `flagUserProfile` options and builds its request body. Untyped callers can
|
|
15139
|
+
* pass anything at runtime, so nothing is trusted from the declared type. Any `reason`
|
|
15140
|
+
* key is ignored and never sent.
|
|
15141
|
+
*
|
|
15142
|
+
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when the options are malformed
|
|
15143
|
+
*/
|
|
15144
|
+
const toUserProfileReportBody = (options) => {
|
|
15145
|
+
const apiName = 'flagUserProfile';
|
|
15146
|
+
const { field, comment } = assertOptionsObject(apiName, options, '{ field, comment? }');
|
|
15147
|
+
if (typeof field !== 'string' || !PROFILE_FIELDS.includes(field)) {
|
|
15148
|
+
throw new ASCInvalidParameterError(`${apiName}: \`field\` must be a \`UserProfileFieldEnum\` value`);
|
|
15149
|
+
}
|
|
15150
|
+
return withComment({ reportType: field }, normalizeUserReportComment(apiName, comment));
|
|
15151
|
+
};
|
|
15152
|
+
/**
|
|
15153
|
+
* Validates `flagUserBehavior` options and builds its request body. `reason` must be one
|
|
15154
|
+
* of the nine `ContentFlagReasonEnum` values and is sent as that canonical label;
|
|
15155
|
+
* `reportType` is always `behavior`.
|
|
15156
|
+
*
|
|
15157
|
+
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when the options are malformed
|
|
15158
|
+
*/
|
|
15159
|
+
const toUserBehaviorReportBody = (options) => {
|
|
15160
|
+
const apiName = 'flagUserBehavior';
|
|
15161
|
+
const { reason, comment } = assertOptionsObject(apiName, options, '{ reason, comment? }');
|
|
15162
|
+
if (typeof reason !== 'string' || !BEHAVIOR_REASONS.includes(reason)) {
|
|
15163
|
+
throw new ASCInvalidParameterError(`${apiName}: \`reason\` must be a \`ContentFlagReasonEnum\` value`);
|
|
15164
|
+
}
|
|
15165
|
+
return withComment({ reportType: 'behavior', reason }, normalizeUserReportComment(apiName, comment));
|
|
15166
|
+
};
|
|
15167
|
+
|
|
15168
|
+
/* begin_public_function
|
|
15169
|
+
id: user.flag_profile
|
|
15170
|
+
*/
|
|
15171
|
+
/**
|
|
15172
|
+
* ```js
|
|
15173
|
+
* import { UserRepository, UserProfileFieldEnum } from '@amityco/ts-sdk'
|
|
15174
|
+
* const flagged = await UserRepository.flagUserProfile('userId', {
|
|
15175
|
+
* field: UserProfileFieldEnum.AVATAR,
|
|
15176
|
+
* comment: 'Nudity in profile photo',
|
|
15177
|
+
* })
|
|
15178
|
+
* ```
|
|
15179
|
+
*
|
|
15180
|
+
* Reports one of a user's profile fields (display name, description or avatar). The
|
|
15181
|
+
* call has no reason: profile reports never carry one, so the backend's reason rules
|
|
15182
|
+
* cannot be violated from here. A `reason` key passed at runtime is ignored and never sent.
|
|
15183
|
+
*
|
|
15184
|
+
* `comment` is trimmed; a blank comment is omitted from the request; a comment longer
|
|
15185
|
+
* than 300 characters after trimming is rejected before any request. Otherwise the
|
|
15186
|
+
* trimmed text is sent unchanged.
|
|
15187
|
+
*
|
|
15188
|
+
* Sends `POST /api/v4/me/flags/:userId` with `{ reportType: <field>, comment? }`.
|
|
15189
|
+
*
|
|
15190
|
+
* @param userId The ID of the user to be reported
|
|
15191
|
+
* @param options `field` is a `UserProfileFieldEnum` value; `comment` is optional free text
|
|
15192
|
+
* @returns the flagged {@link Amity.User}
|
|
15193
|
+
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is missing or malformed, or `comment` is over 300 characters, before any request is made
|
|
15194
|
+
*
|
|
15195
|
+
* @category User API
|
|
15196
|
+
* @async
|
|
15197
|
+
* */
|
|
15198
|
+
const flagUserProfile = async (userId, options) => submitUserReport('flagUserProfile', userId, toUserProfileReportBody(options));
|
|
15199
|
+
/* end_public_function */
|
|
15200
|
+
|
|
15201
|
+
/* begin_public_function
|
|
15202
|
+
id: user.flag_behavior
|
|
15203
|
+
*/
|
|
15204
|
+
/**
|
|
15205
|
+
* ```js
|
|
15206
|
+
* import { UserRepository, ContentFlagReasonEnum } from '@amityco/ts-sdk'
|
|
15207
|
+
* const flagged = await UserRepository.flagUserBehavior('userId', {
|
|
15208
|
+
* reason: ContentFlagReasonEnum.Others,
|
|
15209
|
+
* comment: 'Impersonating our brand',
|
|
15210
|
+
* })
|
|
15211
|
+
* ```
|
|
15212
|
+
*
|
|
15213
|
+
* Reports a user's behavior. `reason` is required and is one of the nine
|
|
15214
|
+
* `ContentFlagReasonEnum` values, sent as its canonical label. Reporter text, including
|
|
15215
|
+
* the explanation for `Others`, always travels in `comment`; the reason never carries text.
|
|
15216
|
+
*
|
|
15217
|
+
* `comment` is trimmed; a blank comment is omitted from the request; a comment longer
|
|
15218
|
+
* than 300 characters after trimming is rejected before any request. Otherwise the
|
|
15219
|
+
* trimmed text is sent unchanged.
|
|
15220
|
+
*
|
|
15221
|
+
* Sends `POST /api/v4/me/flags/:userId` with `{ reportType: 'behavior', reason, comment? }`.
|
|
15222
|
+
*
|
|
15223
|
+
* @param userId The ID of the user to be reported
|
|
15224
|
+
* @param options `reason` is a `ContentFlagReasonEnum` value; `comment` is optional free text
|
|
15225
|
+
* @returns the flagged {@link Amity.User}
|
|
15226
|
+
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is missing or malformed, `reason` is missing or unknown, or `comment` is over 300 characters, before any request is made
|
|
15227
|
+
*
|
|
15228
|
+
* @category User API
|
|
15229
|
+
* @async
|
|
15230
|
+
* */
|
|
15231
|
+
const flagUserBehavior = async (userId, options) => submitUserReport('flagUserBehavior', userId, toUserBehaviorReportBody(options));
|
|
15232
|
+
/* end_public_function */
|
|
15233
|
+
|
|
15060
15234
|
/* begin_public_function
|
|
15061
15235
|
id: user.unflag
|
|
15062
15236
|
*/
|
|
@@ -16231,6 +16405,8 @@ var index$r = /*#__PURE__*/Object.freeze({
|
|
|
16231
16405
|
getUserByIds: getUserByIds,
|
|
16232
16406
|
updateUser: updateUser,
|
|
16233
16407
|
flagUser: flagUser,
|
|
16408
|
+
flagUserProfile: flagUserProfile,
|
|
16409
|
+
flagUserBehavior: flagUserBehavior,
|
|
16234
16410
|
unflagUser: unflagUser,
|
|
16235
16411
|
isUserFlaggedByMe: isUserFlaggedByMe,
|
|
16236
16412
|
getAllBlockedUsers: getAllBlockedUsers,
|
|
@@ -19935,23 +20111,85 @@ getDeliveredUsers.locally = (query) => {
|
|
|
19935
20111
|
return { data: users, cachedAt, prevPage, nextPage };
|
|
19936
20112
|
};
|
|
19937
20113
|
|
|
19938
|
-
|
|
19939
|
-
id: message.flag
|
|
19940
|
-
*/
|
|
20114
|
+
const CONTENT_FLAG_REASONS = Object.values(ContentFlagReasonEnum);
|
|
19941
20115
|
/**
|
|
19942
|
-
*
|
|
19943
|
-
*
|
|
19944
|
-
*
|
|
19945
|
-
|
|
20116
|
+
* True when a public `flagX(id, input)` argument is the legacy shape (a reason string
|
|
20117
|
+
* or nothing). Anything else is routed to the `Amity.ContentFlagOptions` path, whose
|
|
20118
|
+
* validation rejects malformed values before any request is made.
|
|
20119
|
+
*/
|
|
20120
|
+
const isLegacyContentFlagReason = (input) => input === undefined || typeof input === 'string';
|
|
20121
|
+
/**
|
|
20122
|
+
* Validates an `Amity.ContentFlagOptions` argument. Untyped (plain JS) callers can pass
|
|
20123
|
+
* anything at runtime, so the checks do not trust the declared type: the value must be a
|
|
20124
|
+
* plain object, `reason` must be one of the nine `ContentFlagReasonEnum` values and
|
|
20125
|
+
* `detail`, when supplied, must be a string (`null` is not a valid supplied detail).
|
|
19946
20126
|
*
|
|
19947
|
-
* @param
|
|
19948
|
-
* @
|
|
19949
|
-
|
|
20127
|
+
* @param apiName used in the error message, e.g. `flagPost`
|
|
20128
|
+
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when the options are malformed
|
|
20129
|
+
*/
|
|
20130
|
+
const validateContentFlagOptions = (apiName, options) => {
|
|
20131
|
+
if (typeof options !== 'object' || options === null || Array.isArray(options)) {
|
|
20132
|
+
throw new ASCInvalidParameterError(`${apiName}: expected an options object \`{ reason, detail? }\``);
|
|
20133
|
+
}
|
|
20134
|
+
const { reason, detail } = options;
|
|
20135
|
+
if (typeof reason !== 'string' || !CONTENT_FLAG_REASONS.includes(reason)) {
|
|
20136
|
+
throw new ASCInvalidParameterError(`${apiName}: \`reason\` must be a \`ContentFlagReasonEnum\` value`);
|
|
20137
|
+
}
|
|
20138
|
+
if (detail !== undefined && typeof detail !== 'string') {
|
|
20139
|
+
throw new ASCInvalidParameterError(`${apiName}: \`detail\` must be a string when supplied`);
|
|
20140
|
+
}
|
|
20141
|
+
return { reason: reason, detail };
|
|
20142
|
+
};
|
|
20143
|
+
/**
|
|
20144
|
+
* Builds the request body for validated options. `detail` is forwarded unchanged (empty
|
|
20145
|
+
* and whitespace-only strings included) and omitted from the body when `undefined`; the
|
|
20146
|
+
* backend enforces the 300-character limit.
|
|
20147
|
+
*/
|
|
20148
|
+
const toContentFlagBody = ({ reason, detail }) => detail === undefined ? { reason } : { reason, detail };
|
|
20149
|
+
|
|
20150
|
+
/**
|
|
20151
|
+
* New `flagMessage(messageId, { reason, detail? })` implementation. Any category,
|
|
20152
|
+
* including `Others`, may carry a `detail`. `detail` is forwarded unchanged (empty and
|
|
20153
|
+
* whitespace-only strings included) and omitted from the request body when `undefined`;
|
|
20154
|
+
* the backend enforces the 300-character limit.
|
|
19950
20155
|
*
|
|
19951
|
-
*
|
|
19952
|
-
*
|
|
19953
|
-
*
|
|
19954
|
-
|
|
20156
|
+
* Not exported from the public API. It is reached through the
|
|
20157
|
+
* `MessageRepository.flagMessage(messageId, options)` overload; see `api/flagMessage.ts`.
|
|
20158
|
+
*
|
|
20159
|
+
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
|
|
20160
|
+
*/
|
|
20161
|
+
const flagMessageWithOptions = async (messageId, options) => {
|
|
20162
|
+
// Validate first: an input error must surface as INVALID_PARAMETERS regardless of
|
|
20163
|
+
// whether a client is active, and validation needs nothing from the client.
|
|
20164
|
+
const body = toContentFlagBody(validateContentFlagOptions('flagMessage', options));
|
|
20165
|
+
const client = getActiveClient();
|
|
20166
|
+
client.log('message/flag', messageId);
|
|
20167
|
+
const { data: payload } = await client.http.post(`/api/v5/messages/${encodeURIComponent(messageId)}/flags`, body);
|
|
20168
|
+
if (client.cache) {
|
|
20169
|
+
const messagePayload = await prepareMessagePayload(payload);
|
|
20170
|
+
ingestInCache(messagePayload);
|
|
20171
|
+
}
|
|
20172
|
+
fireEvent('message.flagged', payload);
|
|
20173
|
+
return !!payload;
|
|
20174
|
+
};
|
|
20175
|
+
|
|
20176
|
+
/**
|
|
20177
|
+
* Legacy `flagMessage(messageId, reason?)` implementation, kept verbatim so existing
|
|
20178
|
+
* callers keep the exact request body they had before the options contract existed:
|
|
20179
|
+
*
|
|
20180
|
+
* - predefined `ContentFlagReasonEnum` value → `{ reason: <value>, detail: '' }`
|
|
20181
|
+
* - any other non-empty string (including the literal `'Others'`) → `{ reason: 'Others', detail: <string> }`
|
|
20182
|
+
* - `undefined` or `''` → `{ reason: 'Others', detail: '' }`
|
|
20183
|
+
* (for `undefined` the message body carries `detail: undefined`, which JSON serialization omits)
|
|
20184
|
+
*
|
|
20185
|
+
* Not exported from the public API. It is reached through the deprecated
|
|
20186
|
+
* `MessageRepository.flagMessage(messageId, reason)` overload; see `api/flagMessage.ts`.
|
|
20187
|
+
*
|
|
20188
|
+
* Not itself deprecated: it implements the deprecated legacy-string overload of the public
|
|
20189
|
+
* `flagMessage`, which carries the deprecation tag. New code should use `flagMessageWithOptions`
|
|
20190
|
+
* (the `{ reason, detail? }` contract). This path stays available throughout the current major version.
|
|
20191
|
+
*/
|
|
20192
|
+
const flagMessageWithReasonString = async (messageId, reason) => {
|
|
19955
20193
|
const client = getActiveClient();
|
|
19956
20194
|
client.log('message/flag', messageId);
|
|
19957
20195
|
const isPredefinedReason = reason &&
|
|
@@ -19968,6 +20206,42 @@ const flagMessage = async (messageId, reason) => {
|
|
|
19968
20206
|
fireEvent('message.flagged', payload);
|
|
19969
20207
|
return !!payload;
|
|
19970
20208
|
};
|
|
20209
|
+
|
|
20210
|
+
/* begin_public_function
|
|
20211
|
+
id: message.flag
|
|
20212
|
+
*/
|
|
20213
|
+
/**
|
|
20214
|
+
* ```js
|
|
20215
|
+
* import { MessageRepository, ContentFlagReasonEnum } from '@amityco/ts-sdk'
|
|
20216
|
+
*
|
|
20217
|
+
* // No reason.
|
|
20218
|
+
* await MessageRepository.flagMessage(messageId)
|
|
20219
|
+
*
|
|
20220
|
+
* // Category plus optional reporter context (any category, including Others).
|
|
20221
|
+
* await MessageRepository.flagMessage(messageId, {
|
|
20222
|
+
* reason: ContentFlagReasonEnum.SpamOrScams,
|
|
20223
|
+
* detail: 'Repeated promotional links',
|
|
20224
|
+
* })
|
|
20225
|
+
* ```
|
|
20226
|
+
*
|
|
20227
|
+
* Reports a message to moderation. Three call shapes are accepted (see the overloads):
|
|
20228
|
+
* id-only, an options object, and the deprecated legacy reason string. The public
|
|
20229
|
+
* name only dispatches on the input shape; the two implementations are kept separate
|
|
20230
|
+
* so the legacy path is untouched by the new contract:
|
|
20231
|
+
*
|
|
20232
|
+
* - `undefined` or a string → `flagMessageWithReasonString` (unchanged legacy mapping)
|
|
20233
|
+
* - anything else → `flagMessageWithOptions` (validated `{ reason, detail? }`)
|
|
20234
|
+
*
|
|
20235
|
+
* @param messageId The ID of the message to flag
|
|
20236
|
+
* @param input an options object `{ reason, detail? }`, a legacy reason string, or nothing
|
|
20237
|
+
* @returns `true` when the report was created
|
|
20238
|
+
*
|
|
20239
|
+
* @category Message API
|
|
20240
|
+
* @async
|
|
20241
|
+
* */
|
|
20242
|
+
const flagMessage = (messageId, input) => isLegacyContentFlagReason(input)
|
|
20243
|
+
? flagMessageWithReasonString(messageId, input)
|
|
20244
|
+
: flagMessageWithOptions(messageId, input);
|
|
19971
20245
|
/* end_public_function */
|
|
19972
20246
|
|
|
19973
20247
|
/* begin_public_function
|
|
@@ -27113,23 +27387,22 @@ const declineComment = async (commentId, reason) => {
|
|
|
27113
27387
|
};
|
|
27114
27388
|
/* end_public_function */
|
|
27115
27389
|
|
|
27116
|
-
/* begin_public_function
|
|
27117
|
-
id: comment.flag
|
|
27118
|
-
*/
|
|
27119
27390
|
/**
|
|
27120
|
-
*
|
|
27121
|
-
*
|
|
27122
|
-
* const flagged = await CommentRepository.flagComment(commentId, reason)
|
|
27123
|
-
* ```
|
|
27391
|
+
* Legacy `flagComment(commentId, reason?)` implementation, kept verbatim so existing
|
|
27392
|
+
* callers keep the exact request body they had before the options contract existed:
|
|
27124
27393
|
*
|
|
27125
|
-
*
|
|
27126
|
-
*
|
|
27127
|
-
*
|
|
27394
|
+
* - predefined `ContentFlagReasonEnum` value → `{ reason: <value>, detail: '' }`
|
|
27395
|
+
* - any other non-empty string (including the literal `'Others'`) → `{ reason: 'Others', detail: <string> }`
|
|
27396
|
+
* - `undefined` or `''` → `{ reason: 'Others', detail: '' }`
|
|
27128
27397
|
*
|
|
27129
|
-
*
|
|
27130
|
-
*
|
|
27131
|
-
*
|
|
27132
|
-
|
|
27398
|
+
* Not exported from the public API. It is reached through the deprecated
|
|
27399
|
+
* `CommentRepository.flagComment(commentId, reason)` overload; see `api/flagComment.ts`.
|
|
27400
|
+
*
|
|
27401
|
+
* Not itself deprecated: it implements the deprecated legacy-string overload of the public
|
|
27402
|
+
* `flagComment`, which carries the deprecation tag. New code should use `flagCommentWithOptions`
|
|
27403
|
+
* (the `{ reason, detail? }` contract). This path stays available throughout the current major version.
|
|
27404
|
+
*/
|
|
27405
|
+
const flagCommentWithReasonString = async (commentId, reason) => {
|
|
27133
27406
|
const client = getActiveClient();
|
|
27134
27407
|
client.log('comment/flagComment', commentId);
|
|
27135
27408
|
const isPredefinedReason = reason &&
|
|
@@ -27145,6 +27418,67 @@ const flagComment = async (commentId, reason) => {
|
|
|
27145
27418
|
fireEvent('comment.flagged', payload);
|
|
27146
27419
|
return !!payload;
|
|
27147
27420
|
};
|
|
27421
|
+
|
|
27422
|
+
/**
|
|
27423
|
+
* New `flagComment(commentId, { reason, detail? })` implementation. Any category,
|
|
27424
|
+
* including `Others`, may carry a `detail`. `detail` is forwarded unchanged (empty and
|
|
27425
|
+
* whitespace-only strings included) and omitted from the request body when `undefined`;
|
|
27426
|
+
* the backend enforces the 300-character limit.
|
|
27427
|
+
*
|
|
27428
|
+
* Not exported from the public API. It is reached through the
|
|
27429
|
+
* `CommentRepository.flagComment(commentId, options)` overload; see `api/flagComment.ts`.
|
|
27430
|
+
*
|
|
27431
|
+
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
|
|
27432
|
+
*/
|
|
27433
|
+
const flagCommentWithOptions = async (commentId, options) => {
|
|
27434
|
+
// Validate first: an input error must surface as INVALID_PARAMETERS regardless of
|
|
27435
|
+
// whether a client is active, and validation needs nothing from the client.
|
|
27436
|
+
const body = toContentFlagBody(validateContentFlagOptions('flagComment', options));
|
|
27437
|
+
const client = getActiveClient();
|
|
27438
|
+
client.log('comment/flagComment', commentId);
|
|
27439
|
+
const { data: payload } = await client.http.post(`/api/v3/comments/${encodeURIComponent(commentId)}/flag`, body);
|
|
27440
|
+
if (client.cache) {
|
|
27441
|
+
ingestInCache(payload);
|
|
27442
|
+
}
|
|
27443
|
+
fireEvent('comment.flagged', payload);
|
|
27444
|
+
return !!payload;
|
|
27445
|
+
};
|
|
27446
|
+
|
|
27447
|
+
/* begin_public_function
|
|
27448
|
+
id: comment.flag
|
|
27449
|
+
*/
|
|
27450
|
+
/**
|
|
27451
|
+
* ```js
|
|
27452
|
+
* import { CommentRepository, ContentFlagReasonEnum } from '@amityco/ts-sdk'
|
|
27453
|
+
*
|
|
27454
|
+
* // No reason: sent as Others with an empty detail.
|
|
27455
|
+
* await CommentRepository.flagComment(commentId)
|
|
27456
|
+
*
|
|
27457
|
+
* // Category plus optional reporter context (any category, including Others).
|
|
27458
|
+
* await CommentRepository.flagComment(commentId, {
|
|
27459
|
+
* reason: ContentFlagReasonEnum.SpamOrScams,
|
|
27460
|
+
* detail: 'Repeated promotional links',
|
|
27461
|
+
* })
|
|
27462
|
+
* ```
|
|
27463
|
+
*
|
|
27464
|
+
* Reports a comment to moderation. Three call shapes are accepted (see the overloads):
|
|
27465
|
+
* id-only, an options object, and the deprecated legacy reason string. The public
|
|
27466
|
+
* name only dispatches on the input shape; the two implementations are kept separate
|
|
27467
|
+
* so the legacy path is untouched by the new contract:
|
|
27468
|
+
*
|
|
27469
|
+
* - `undefined` or a string → `flagCommentWithReasonString` (unchanged legacy mapping)
|
|
27470
|
+
* - anything else → `flagCommentWithOptions` (validated `{ reason, detail? }`)
|
|
27471
|
+
*
|
|
27472
|
+
* @param commentId The ID of the comment to flag
|
|
27473
|
+
* @param input an options object `{ reason, detail? }`, a legacy reason string, or nothing
|
|
27474
|
+
* @returns `true` when the report was created
|
|
27475
|
+
*
|
|
27476
|
+
* @category Comment API
|
|
27477
|
+
* @async
|
|
27478
|
+
* */
|
|
27479
|
+
const flagComment = (commentId, input) => isLegacyContentFlagReason(input)
|
|
27480
|
+
? flagCommentWithReasonString(commentId, input)
|
|
27481
|
+
: flagCommentWithOptions(commentId, input);
|
|
27148
27482
|
/* end_public_function */
|
|
27149
27483
|
|
|
27150
27484
|
/* begin_public_function
|
|
@@ -29498,23 +29832,47 @@ const declinePost = async (postId) => {
|
|
|
29498
29832
|
};
|
|
29499
29833
|
/* end_public_function */
|
|
29500
29834
|
|
|
29501
|
-
/* begin_public_function
|
|
29502
|
-
id: post.flag
|
|
29503
|
-
*/
|
|
29504
29835
|
/**
|
|
29505
|
-
*
|
|
29506
|
-
*
|
|
29507
|
-
*
|
|
29508
|
-
*
|
|
29836
|
+
* New `flagPost(postId, { reason, detail? })` implementation. Any category, including
|
|
29837
|
+
* `Others`, may carry a `detail`. `detail` is forwarded unchanged (empty and
|
|
29838
|
+
* whitespace-only strings included) and omitted from the request body when `undefined`;
|
|
29839
|
+
* the backend enforces the 300-character limit.
|
|
29509
29840
|
*
|
|
29510
|
-
*
|
|
29511
|
-
*
|
|
29512
|
-
* @returns a boolean
|
|
29841
|
+
* Not exported from the public API. It is reached through the
|
|
29842
|
+
* `PostRepository.flagPost(postId, options)` overload; see `api/flagPost.ts`.
|
|
29513
29843
|
*
|
|
29514
|
-
* @
|
|
29515
|
-
|
|
29516
|
-
|
|
29517
|
-
|
|
29844
|
+
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
|
|
29845
|
+
*/
|
|
29846
|
+
const flagPostWithOptions = async (postId, options) => {
|
|
29847
|
+
// Validate first: an input error must surface as INVALID_PARAMETERS regardless of
|
|
29848
|
+
// whether a client is active, and validation needs nothing from the client.
|
|
29849
|
+
const body = toContentFlagBody(validateContentFlagOptions('flagPost', options));
|
|
29850
|
+
const client = getActiveClient();
|
|
29851
|
+
client.log('post/flagPost', postId);
|
|
29852
|
+
const { data: payload } = await client.http.post(`/api/v3/posts/${encodeURIComponent(postId)}/flag`, body);
|
|
29853
|
+
if (client.cache) {
|
|
29854
|
+
ingestInCache(prepareMembershipPayload(payload, 'communityUsers'));
|
|
29855
|
+
}
|
|
29856
|
+
fireEvent('post.flagged', payload);
|
|
29857
|
+
return !!payload;
|
|
29858
|
+
};
|
|
29859
|
+
|
|
29860
|
+
/**
|
|
29861
|
+
* Legacy `flagPost(postId, reason?)` implementation, kept verbatim so existing
|
|
29862
|
+
* callers keep the exact request body they had before the options contract existed:
|
|
29863
|
+
*
|
|
29864
|
+
* - predefined `ContentFlagReasonEnum` value → `{ reason: <value>, detail: '' }`
|
|
29865
|
+
* - any other non-empty string (including the literal `'Others'`) → `{ reason: 'Others', detail: <string> }`
|
|
29866
|
+
* - `undefined` or `''` → `{ reason: 'Others', detail: '' }`
|
|
29867
|
+
*
|
|
29868
|
+
* Not exported from the public API. It is reached through the deprecated
|
|
29869
|
+
* `PostRepository.flagPost(postId, reason)` overload; see `api/flagPost.ts`.
|
|
29870
|
+
*
|
|
29871
|
+
* Not itself deprecated: it implements the deprecated legacy-string overload of the public
|
|
29872
|
+
* `flagPost`, which carries the deprecation tag. New code should use `flagPostWithOptions`
|
|
29873
|
+
* (the `{ reason, detail? }` contract). This path stays available throughout the current major version.
|
|
29874
|
+
*/
|
|
29875
|
+
const flagPostWithReasonString = async (postId, reason) => {
|
|
29518
29876
|
const client = getActiveClient();
|
|
29519
29877
|
client.log('post/flagPost', postId);
|
|
29520
29878
|
const isPredefinedReason = reason &&
|
|
@@ -29530,6 +29888,42 @@ const flagPost = async (postId, reason) => {
|
|
|
29530
29888
|
fireEvent('post.flagged', payload);
|
|
29531
29889
|
return !!payload;
|
|
29532
29890
|
};
|
|
29891
|
+
|
|
29892
|
+
/* begin_public_function
|
|
29893
|
+
id: post.flag
|
|
29894
|
+
*/
|
|
29895
|
+
/**
|
|
29896
|
+
* ```js
|
|
29897
|
+
* import { PostRepository, ContentFlagReasonEnum } from '@amityco/ts-sdk'
|
|
29898
|
+
*
|
|
29899
|
+
* // No reason.
|
|
29900
|
+
* await PostRepository.flagPost(postId)
|
|
29901
|
+
*
|
|
29902
|
+
* // Category plus optional reporter context (any category, including Others).
|
|
29903
|
+
* await PostRepository.flagPost(postId, {
|
|
29904
|
+
* reason: ContentFlagReasonEnum.SpamOrScams,
|
|
29905
|
+
* detail: 'Repeated promotional links',
|
|
29906
|
+
* })
|
|
29907
|
+
* ```
|
|
29908
|
+
*
|
|
29909
|
+
* Reports a post to moderation. Three call shapes are accepted (see the overloads):
|
|
29910
|
+
* id-only, an options object, and the deprecated legacy reason string. The public
|
|
29911
|
+
* name only dispatches on the input shape; the two implementations are kept separate
|
|
29912
|
+
* so the legacy path is untouched by the new contract:
|
|
29913
|
+
*
|
|
29914
|
+
* - `undefined` or a string → `flagPostWithReasonString` (unchanged legacy mapping)
|
|
29915
|
+
* - anything else → `flagPostWithOptions` (validated `{ reason, detail? }`)
|
|
29916
|
+
*
|
|
29917
|
+
* @param postId The ID of the post to flag
|
|
29918
|
+
* @param input an options object `{ reason, detail? }`, a legacy reason string, or nothing
|
|
29919
|
+
* @returns `true` when the report was created
|
|
29920
|
+
*
|
|
29921
|
+
* @category Post API
|
|
29922
|
+
* @async
|
|
29923
|
+
* */
|
|
29924
|
+
const flagPost = (postId, input) => isLegacyContentFlagReason(input)
|
|
29925
|
+
? flagPostWithReasonString(postId, input)
|
|
29926
|
+
: flagPostWithOptions(postId, input);
|
|
29533
29927
|
/* end_public_function */
|
|
29534
29928
|
|
|
29535
29929
|
/* begin_public_function
|
|
@@ -36910,4 +37304,4 @@ class AmityAttachmentProductTags {
|
|
|
36910
37304
|
}
|
|
36911
37305
|
}
|
|
36912
37306
|
|
|
36913
|
-
export { API_REGIONS, index$6 as AdRepository, AmityAttachmentProductTags, AmityAutoSubscription, AmityChannelNotificationModeEnum, AmityCommunityType, AmityEventOrderOption, AmityEventOriginType, AmityEventResponseStatus, AmityEventSortOption, AmityEventStatus, AmityEventType, AmityLiveViewerCountMode, AmitySharableContentType, AnalyticsSourceTypeEnum, index$g as CategoryRepository, index$k as ChannelRepository, index$t as Client, index$f as CommentRepository, CommunityNotificationEventNameEnum, CommunityPostSettingMaps, CommunityPostSettings, index$h as CommunityRepository, ContentFeedType, ContentFlagReasonEnum, index as CuratedContentRepository, DefaultCommunityPostSetting, index$2 as EventRepository, FeedDataTypeEnum, index$e as FeedRepository, FeedSortByEnum, FeedSourceEnum, FeedTypeEnum, FileAccessTypeEnum, index$q as FileRepository, FileType, GET_WATCHER_URLS, index$4 as InvitationRepository, InvitationSortByEnum, InvitationStatusEnum, InvitationTargetTypeEnum, InvitationTypeEnum, JoinRequestStatusEnum, JoinResultStatusEnum, index$3 as LiveReactionRepository, index$8 as LiveStreamPlayer, MembershipAcceptanceTypeEnum, MessageContentType, index$o as MessageRepository, NotificationRolesFilterTypeEnum, NotificationSettingsLevelEnum, index$9 as PollRepository, PostContentType, index$c as PostRepository, PostStructureType, index$1 as ProductRepository, index$p as ReactionRepository, index$a as RoomPresenceRepository, index$d as RoomRepository, SearchUsersByEnum, index$7 as StoryRepository, index$b as StreamRepository, index$n as SubChannelRepository, SubscriptionLevels, UserNotificationModuleNameEnum, UserReportTypeEnum, index$r as UserRepository, UserTypeEnum, VERSION, VideoResolution, VideoSize, VideoTranscodingStatus, backupCache, createQuery, createReport, createUserToken, deleteReport, disableCache, dropFromCache, enableCache, exceedsUntilAtBoundary, filterByChannelMembership, filterByCommunityMembership, filterByFeedType, filterByPostDataTypes, filterByPropEquality, filterByPropInclusion, filterByPropIntersection, filterBySearchTerm, filterByStringComparePartially, filterByUntilAt, filterCommentsByBlockUsers, filterPostsByBlockUsers, getBlockUsersId, getChannelTopic, getCommentTopic, getCommunityStoriesTopic, getCommunityTopic, getLiveReactionTopic, getLiveStreamTopic, getMarkedMessageTopic, getMarkerUserFeedTopic, getMessageTopic, getMyFollowersTopic, getMyFollowingsTopic, getNetworkId, getNetworkTopic, getPostTopic, getRole, getRoomStreamerTopic, getRoomWatcherTopic, getSmartFeedChannelTopic, getSmartFeedMessageTopic, getSmartFeedSubChannelTopic, getStoryTopic, getSubChannelTopic, getUserTopic, isAfterBefore, isAfterBeforeRaw, isCachable, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkip, mergeInCache, index$5 as notificationTray, onChannelMarkerFetched, onFeedMarkerFetched, onFeedMarkerUpdated, onMessageMarked, onMessageMarkerFetched, onSubChannelMarkerFetched, onSubChannelMarkerUpdated, onUserMarkerFetched, onUserMarkerFetchedLegacy, pullFromCache, pushToCache, queryCache, queryOptions, queryRoles, restoreCache, runQuery, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByFirstUpdated, sortByLastActivity, sortByLastCreated, sortByLastUpdated, sortByLocalSortingDate, sortByName, sortBySegmentNumber, subscribeTopic, toPage, toPageRaw, toToken, upsertInCache, validateUntilAt, wipeCache };
|
|
37307
|
+
export { API_REGIONS, index$6 as AdRepository, AmityAttachmentProductTags, AmityAutoSubscription, AmityChannelNotificationModeEnum, AmityCommunityType, AmityEventOrderOption, AmityEventOriginType, AmityEventResponseStatus, AmityEventSortOption, AmityEventStatus, AmityEventType, AmityLiveViewerCountMode, AmitySharableContentType, AnalyticsSourceTypeEnum, index$g as CategoryRepository, index$k as ChannelRepository, index$t as Client, index$f as CommentRepository, CommunityNotificationEventNameEnum, CommunityPostSettingMaps, CommunityPostSettings, index$h as CommunityRepository, ContentFeedType, ContentFlagReasonEnum, index as CuratedContentRepository, DefaultCommunityPostSetting, index$2 as EventRepository, FeedDataTypeEnum, index$e as FeedRepository, FeedSortByEnum, FeedSourceEnum, FeedTypeEnum, FileAccessTypeEnum, index$q as FileRepository, FileType, GET_WATCHER_URLS, index$4 as InvitationRepository, InvitationSortByEnum, InvitationStatusEnum, InvitationTargetTypeEnum, InvitationTypeEnum, JoinRequestStatusEnum, JoinResultStatusEnum, index$3 as LiveReactionRepository, index$8 as LiveStreamPlayer, MembershipAcceptanceTypeEnum, MessageContentType, index$o as MessageRepository, NotificationRolesFilterTypeEnum, NotificationSettingsLevelEnum, index$9 as PollRepository, PostContentType, index$c as PostRepository, PostStructureType, index$1 as ProductRepository, index$p as ReactionRepository, index$a as RoomPresenceRepository, index$d as RoomRepository, SearchUsersByEnum, index$7 as StoryRepository, index$b as StreamRepository, index$n as SubChannelRepository, SubscriptionLevels, UserNotificationModuleNameEnum, UserProfileFieldEnum, UserReportTypeEnum, index$r as UserRepository, UserTypeEnum, VERSION, VideoResolution, VideoSize, VideoTranscodingStatus, backupCache, createQuery, createReport, createUserToken, deleteReport, disableCache, dropFromCache, enableCache, exceedsUntilAtBoundary, filterByChannelMembership, filterByCommunityMembership, filterByFeedType, filterByPostDataTypes, filterByPropEquality, filterByPropInclusion, filterByPropIntersection, filterBySearchTerm, filterByStringComparePartially, filterByUntilAt, filterCommentsByBlockUsers, filterPostsByBlockUsers, getBlockUsersId, getChannelTopic, getCommentTopic, getCommunityStoriesTopic, getCommunityTopic, getLiveReactionTopic, getLiveStreamTopic, getMarkedMessageTopic, getMarkerUserFeedTopic, getMessageTopic, getMyFollowersTopic, getMyFollowingsTopic, getNetworkId, getNetworkTopic, getPostTopic, getRole, getRoomStreamerTopic, getRoomWatcherTopic, getSmartFeedChannelTopic, getSmartFeedMessageTopic, getSmartFeedSubChannelTopic, getStoryTopic, getSubChannelTopic, getUserTopic, isAfterBefore, isAfterBeforeRaw, isCachable, isFetcher, isFresh, isLocal, isMutator, isOffline, isPaged, isReportedByMe, isSkip, mergeInCache, index$5 as notificationTray, onChannelMarkerFetched, onFeedMarkerFetched, onFeedMarkerUpdated, onMessageMarked, onMessageMarkerFetched, onSubChannelMarkerFetched, onSubChannelMarkerUpdated, onUserMarkerFetched, onUserMarkerFetchedLegacy, pullFromCache, pushToCache, queryCache, queryOptions, queryRoles, restoreCache, runQuery, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByFirstUpdated, sortByLastActivity, sortByLastCreated, sortByLastUpdated, sortByLocalSortingDate, sortByName, sortBySegmentNumber, subscribeTopic, toPage, toPageRaw, toToken, upsertInCache, validateUntilAt, wipeCache };
|