@amityco/ts-sdk 7.30.0 → 7.30.1-81473b9.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/domains/content.d.ts +6 -0
- package/dist/@types/domains/content.d.ts.map +1 -1
- package/dist/index.cjs.js +66 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +64 -5
- package/dist/index.umd.js +2 -2
- package/dist/userRepository/api/flagUserBehavior.d.ts +1 -1
- package/dist/userRepository/utils/userReport.d.ts +1 -1
- package/dist/utils/contentFlag.d.ts +1 -1
- package/dist/utils/contentFlagReason.d.ts +32 -0
- package/dist/utils/contentFlagReason.d.ts.map +1 -0
- package/dist/utils/tests/contentFlagReason.test.d.ts +2 -0
- package/dist/utils/tests/contentFlagReason.test.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ export declare const ContentFeedType: Readonly<{
|
|
|
7
7
|
}>;
|
|
8
8
|
export declare enum ContentFlagReasonEnum {
|
|
9
9
|
CommunityGuidelines = "Against community guidelines",
|
|
10
|
+
ChildEndangerment = "Child endangerment",
|
|
10
11
|
HarassmentOrBullying = "Harassment or bullying",
|
|
11
12
|
SelfHarmOrSuicide = "Self-harm or suicide",
|
|
12
13
|
ViolenceOrThreateningContent = "Violence or threatening content",
|
|
@@ -16,6 +17,11 @@ export declare enum ContentFlagReasonEnum {
|
|
|
16
17
|
FalseInformation = "False information or misinformation",
|
|
17
18
|
Others = "Others"
|
|
18
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Cross-platform name of {@link ContentFlagReasonEnum}, matching `AmityContentFlagReasonType`
|
|
22
|
+
* on Android and iOS. The same enum object and type, not a copy, so either name can be used.
|
|
23
|
+
*/
|
|
24
|
+
export { ContentFlagReasonEnum as AmityContentFlagReasonType };
|
|
19
25
|
declare global {
|
|
20
26
|
namespace Amity {
|
|
21
27
|
type ContentFlagReason = Exclude<`${ContentFlagReasonEnum}`, `${ContentFlagReasonEnum.Others}`> | (string & {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAC;AAEH,oBAAY,qBAAqB;IAC/B,mBAAmB,iCAAiC;IACpD,oBAAoB,2BAA2B;IAC/C,iBAAiB,yBAAyB;IAC1C,4BAA4B,oCAAoC;IAChE,sBAAsB,2CAA2C;IACjE,qBAAqB,6BAA6B;IAClD,WAAW,kBAAkB;IAC7B,gBAAgB,wCAAwC;IACxD,MAAM,WAAW;CAClB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,iBAAiB,GAClB,OAAO,CAAC,GAAG,qBAAqB,EAAE,EAAE,GAAG,qBAAqB,CAAC,MAAM,EAAE,CAAC,GACtE,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;QAElB;;;;;;WAMG;QACH,KAAK,kBAAkB,GAAG;YACxB,MAAM,EAAE,qBAAqB,CAAC;YAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB,CAAC;QAEF,KAAK,WAAW,GACZ,MAAM,GACN,OAAO,GACP,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,YAAY,GACZ,MAAM,GACN,OAAO,GACP,MAAM,CAAC;QAEX,KAAK,eAAe,GAAG,OAAO,CAAC,OAAO,eAAe,CAAC,CAAC;QAEvD,KAAK,eAAe,GAAG;YACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YACtB,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QAEF,KAAK,eAAe,GAAG;YACrB,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;SACtC,CAAC;QAEF,KAAK,gBAAgB,GAAG;YACtB,MAAM,EAAE,KAAK,CAAC,IAA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GACf,CAAC,SAAS,OAAO,GACjB,gBAAgB,GAChB,CAAC,SAAS,MAAM,GAChB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvB,CAAC,SAAS,MAAM,GAChB,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,KAAK,CAAC;QAEV,KAAK,OAAO,CAAC,CAAC,SAAS,WAAW,IAAI;YAEpC,QAAQ,CAAC,EAAE,CAAC,CAAC;YACb,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC;YAChB,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;SACvB,CAAC;QAEF,KAAK,kBAAkB,GAAG;YACxB,WAAW,EAAE,MAAM,CAAC;YACpB,OAAO,EAAE,OAAO,CAAC;SAClB,CAAC;QAEF,KAAK,mBAAmB,GAAG;YACzB,WAAW,EAAE,OAAO,CAAC;YACrB,OAAO,EAAE,OAAO,CAAC;YACjB,kBAAkB,EAAE,MAAM,CAAC;YAC3B,eAAe,EAAE;gBACf,aAAa,EAAE,KAAK,CAAC,eAAe,CAAC;gBACrC,aAAa,EAAE,KAAK,CAAC,eAAe,CAAC;aACtC,CAAC;SACH,CAAC;QAEF,KAAK,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,MAAM,GAAG,OAAO,IAAI,CAAC,SAAS,MAAM,GAC5E,kBAAkB,GAClB,CAAC,SAAS,OAAO,GACjB,mBAAmB,GACnB,KAAK,CAAC;KACX;CACF"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -161,6 +161,7 @@ const ContentFeedType = Object.freeze({
|
|
|
161
161
|
exports.ContentFlagReasonEnum = void 0;
|
|
162
162
|
(function (ContentFlagReasonEnum) {
|
|
163
163
|
ContentFlagReasonEnum["CommunityGuidelines"] = "Against community guidelines";
|
|
164
|
+
ContentFlagReasonEnum["ChildEndangerment"] = "Child endangerment";
|
|
164
165
|
ContentFlagReasonEnum["HarassmentOrBullying"] = "Harassment or bullying";
|
|
165
166
|
ContentFlagReasonEnum["SelfHarmOrSuicide"] = "Self-harm or suicide";
|
|
166
167
|
ContentFlagReasonEnum["ViolenceOrThreateningContent"] = "Violence or threatening content";
|
|
@@ -14023,7 +14024,7 @@ const getWatchSessionStorage = () => {
|
|
|
14023
14024
|
return storageInstance;
|
|
14024
14025
|
};
|
|
14025
14026
|
|
|
14026
|
-
const privateKey = "
|
|
14027
|
+
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=";
|
|
14027
14028
|
/*
|
|
14028
14029
|
* The crypto algorithm used for importing key and signing string
|
|
14029
14030
|
*/
|
|
@@ -15931,7 +15932,7 @@ const toUserProfileReportBody = (options) => {
|
|
|
15931
15932
|
};
|
|
15932
15933
|
/**
|
|
15933
15934
|
* Validates `flagUserBehavior` options and builds its request body. `reason` must be one
|
|
15934
|
-
* of the
|
|
15935
|
+
* of the `ContentFlagReasonEnum` values and is sent as that canonical label;
|
|
15935
15936
|
* `reportType` is always `behavior`.
|
|
15936
15937
|
*
|
|
15937
15938
|
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when the options are malformed
|
|
@@ -16012,7 +16013,7 @@ const flagUserProfile = async (userId, options) => submitUserReport('flagUserPro
|
|
|
16012
16013
|
* })
|
|
16013
16014
|
* ```
|
|
16014
16015
|
*
|
|
16015
|
-
* Reports a user's behavior. `reason` is required and is one of the
|
|
16016
|
+
* Reports a user's behavior. `reason` is required and is one of the
|
|
16016
16017
|
* `ContentFlagReasonEnum` values, sent as its canonical label. Reporter text, including
|
|
16017
16018
|
* the explanation for `Others`, always travels in `comment`; the reason never carries text.
|
|
16018
16019
|
*
|
|
@@ -21008,7 +21009,7 @@ const isLegacyContentFlagReason = (input) => input === undefined || typeof input
|
|
|
21008
21009
|
/**
|
|
21009
21010
|
* Validates an `Amity.ContentFlagOptions` argument. Untyped (plain JS) callers can pass
|
|
21010
21011
|
* anything at runtime, so the checks do not trust the declared type: the value must be a
|
|
21011
|
-
* plain object, `reason` must be one of the
|
|
21012
|
+
* plain object, `reason` must be one of the `ContentFlagReasonEnum` values and
|
|
21012
21013
|
* `detail`, when supplied, must be a string (`null` is not a valid supplied detail).
|
|
21013
21014
|
*
|
|
21014
21015
|
* @param apiName used in the error message, e.g. `flagPost`
|
|
@@ -38187,9 +38188,68 @@ class AmityAttachmentProductTags {
|
|
|
38187
38188
|
}
|
|
38188
38189
|
}
|
|
38189
38190
|
|
|
38191
|
+
/**
|
|
38192
|
+
* Stable, cross-platform key per report category. Android and iOS expose the same
|
|
38193
|
+
* keys on `AmityContentFlagReasonType.key`. A UIKit builds its string key from it
|
|
38194
|
+
* (`amity_social_label_report_reason_<key>`), so a released key is never renamed.
|
|
38195
|
+
* The key is not derived from the enum member name on purpose: the existing UIKit
|
|
38196
|
+
* string keys do not follow it (`selling_restricted`, `violence_or_threatening`).
|
|
38197
|
+
*/
|
|
38198
|
+
const CONTENT_FLAG_REASON_KEYS = Object.freeze({
|
|
38199
|
+
[exports.ContentFlagReasonEnum.CommunityGuidelines]: 'community_guidelines',
|
|
38200
|
+
[exports.ContentFlagReasonEnum.ChildEndangerment]: 'child_endangerment',
|
|
38201
|
+
[exports.ContentFlagReasonEnum.HarassmentOrBullying]: 'harassment_or_bullying',
|
|
38202
|
+
[exports.ContentFlagReasonEnum.SelfHarmOrSuicide]: 'self_harm_or_suicide',
|
|
38203
|
+
[exports.ContentFlagReasonEnum.ViolenceOrThreateningContent]: 'violence_or_threatening',
|
|
38204
|
+
[exports.ContentFlagReasonEnum.SellingRestrictedItems]: 'selling_restricted',
|
|
38205
|
+
[exports.ContentFlagReasonEnum.SexualContentOrNudity]: 'sexual_content_or_nudity',
|
|
38206
|
+
[exports.ContentFlagReasonEnum.SpamOrScams]: 'spam_or_scams',
|
|
38207
|
+
[exports.ContentFlagReasonEnum.FalseInformation]: 'false_information',
|
|
38208
|
+
[exports.ContentFlagReasonEnum.Others]: 'others',
|
|
38209
|
+
});
|
|
38210
|
+
/* begin_public_function
|
|
38211
|
+
id: content_flag_reason.get_reasons
|
|
38212
|
+
*/
|
|
38213
|
+
/**
|
|
38214
|
+
* ```js
|
|
38215
|
+
* import { getContentFlagReasons, AmityContentFlagReasonType } from '@amityco/ts-sdk'
|
|
38216
|
+
* const reasons = getContentFlagReasons().filter(r => r !== AmityContentFlagReasonType.Others)
|
|
38217
|
+
* ```
|
|
38218
|
+
*
|
|
38219
|
+
* Returns every report category in display order, with `Others` last. Render a report
|
|
38220
|
+
* picker from this list rather than a copy, so a category added in a later SDK release
|
|
38221
|
+
* appears without a UI change. Each value is also its English default label.
|
|
38222
|
+
*
|
|
38223
|
+
* @returns a new array on every call; mutating it does not affect the SDK
|
|
38224
|
+
*
|
|
38225
|
+
* @category Content Flag
|
|
38226
|
+
*/
|
|
38227
|
+
const getContentFlagReasons = () => Object.values(exports.ContentFlagReasonEnum);
|
|
38228
|
+
/* end_public_function */
|
|
38229
|
+
/* begin_public_function
|
|
38230
|
+
id: content_flag_reason.get_key
|
|
38231
|
+
*/
|
|
38232
|
+
/**
|
|
38233
|
+
* ```js
|
|
38234
|
+
* import { getContentFlagReasonKey, AmityContentFlagReasonType } from '@amityco/ts-sdk'
|
|
38235
|
+
* getContentFlagReasonKey(AmityContentFlagReasonType.ChildEndangerment) // 'child_endangerment'
|
|
38236
|
+
* ```
|
|
38237
|
+
*
|
|
38238
|
+
* Returns the stable, cross-platform key of a report category, for building a
|
|
38239
|
+
* localisation key. Never send the key to the server: flag with the enum value.
|
|
38240
|
+
*
|
|
38241
|
+
* @param reason an `AmityContentFlagReasonType` (`ContentFlagReasonEnum`) value
|
|
38242
|
+
* @returns the category's snake_case key
|
|
38243
|
+
*
|
|
38244
|
+
* @category Content Flag
|
|
38245
|
+
*/
|
|
38246
|
+
const getContentFlagReasonKey = (reason) => CONTENT_FLAG_REASON_KEYS[reason];
|
|
38247
|
+
/* end_public_function */
|
|
38248
|
+
|
|
38190
38249
|
exports.API_REGIONS = API_REGIONS;
|
|
38191
38250
|
exports.AdRepository = index$6;
|
|
38192
38251
|
exports.AmityAttachmentProductTags = AmityAttachmentProductTags;
|
|
38252
|
+
exports.AmityContentFlagReasonType = exports.ContentFlagReasonEnum;
|
|
38193
38253
|
exports.AmityModuleNotEntitledError = AmityModuleNotEntitledError;
|
|
38194
38254
|
exports.CategoryRepository = index$g;
|
|
38195
38255
|
exports.ChannelRepository = index$k;
|
|
@@ -38253,6 +38313,8 @@ exports.getChannelTopic = getChannelTopic;
|
|
|
38253
38313
|
exports.getCommentTopic = getCommentTopic;
|
|
38254
38314
|
exports.getCommunityStoriesTopic = getCommunityStoriesTopic;
|
|
38255
38315
|
exports.getCommunityTopic = getCommunityTopic;
|
|
38316
|
+
exports.getContentFlagReasonKey = getContentFlagReasonKey;
|
|
38317
|
+
exports.getContentFlagReasons = getContentFlagReasons;
|
|
38256
38318
|
exports.getLiveReactionTopic = getLiveReactionTopic;
|
|
38257
38319
|
exports.getLiveStreamTopic = getLiveStreamTopic;
|
|
38258
38320
|
exports.getMarkedMessageTopic = getMarkedMessageTopic;
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export * as EventRepository from './eventRepository';
|
|
|
35
35
|
export * as ProductRepository from './productRepository';
|
|
36
36
|
export * as CuratedContentRepository from './curatedContentRepository';
|
|
37
37
|
export { AmityAttachmentProductTags } from './productRepository/helpers';
|
|
38
|
+
export { getContentFlagReasons, getContentFlagReasonKey } from './utils/contentFlagReason';
|
|
38
39
|
export { AmityModuleNotEntitledError } from './core/errors';
|
|
39
40
|
export { resolveModuleAvailability } from './client/utils/resolveModuleAvailability';
|
|
40
41
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AAEzB,cAAc,WAAW,CAAC;AAG1B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAE5B,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AAEnD,cAAc,YAAY,CAAC;AAG3B,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAE3D,cAAc,cAAc,CAAC;AAG7B,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,iBAAiB,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,oBAAoB,MAAM,wBAAwB,CAAC;AAE/D,cAAc,iBAAiB,CAAC;AAGhC,OAAO,KAAK,mBAAmB,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK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,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEzE,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAE3F,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -145,6 +145,7 @@ const ContentFeedType = Object.freeze({
|
|
|
145
145
|
var ContentFlagReasonEnum;
|
|
146
146
|
(function (ContentFlagReasonEnum) {
|
|
147
147
|
ContentFlagReasonEnum["CommunityGuidelines"] = "Against community guidelines";
|
|
148
|
+
ContentFlagReasonEnum["ChildEndangerment"] = "Child endangerment";
|
|
148
149
|
ContentFlagReasonEnum["HarassmentOrBullying"] = "Harassment or bullying";
|
|
149
150
|
ContentFlagReasonEnum["SelfHarmOrSuicide"] = "Self-harm or suicide";
|
|
150
151
|
ContentFlagReasonEnum["ViolenceOrThreateningContent"] = "Violence or threatening content";
|
|
@@ -14023,7 +14024,7 @@ const getWatchSessionStorage = () => {
|
|
|
14023
14024
|
return storageInstance;
|
|
14024
14025
|
};
|
|
14025
14026
|
|
|
14026
|
-
const privateKey = "
|
|
14027
|
+
const privateKey = "MIIEpQIBAAKCAQEAwAEc/oZgYIvKSUG/C3mONYLR4ZPgAjMEX4bJ+xqqakUDRtqlNO+eZs2blQ1Ko0DBkqPExyQezvjibH5W2UZBV5RaBTlTcNVKTToMBEGesAfaEcM3qUyQHxdbFYZv6P4sb14dcwxTQ8usmaV8ooiR1Fcaso5ZWYcZ8Hb46FbQ7OoVumsBtPWwfZ4f003o5VCl6AIM6lcLv9UDLlFVYhE+PeXpRHtfWlGqxMvqC9oinlwhL6nWv6VjQXW4nhcib72dPBzfHT7k/PMKto2SxALYdb68ENiAGuJLWi3AUHSyYCJK2w7wIlWfJUAI0v26ub10IpExr6D5QuW2577jjP93iwIDAQABAoIBAFWfqXhwIIatkFY+9Z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YKcpov5Ot7Vvzm/MnnW4N1ljVskocETBWMmPUvNSExVjPebi+rxd8fa5kY8BJScPTzMFbunZn/wjtGdcM10qdlVQ9doG61A/9P3ezFKCfS4AvF/H/59LcSx2Bh28fp3/efiVIOpVd4Y=";
|
|
14027
14028
|
/*
|
|
14028
14029
|
* The crypto algorithm used for importing key and signing string
|
|
14029
14030
|
*/
|
|
@@ -15931,7 +15932,7 @@ const toUserProfileReportBody = (options) => {
|
|
|
15931
15932
|
};
|
|
15932
15933
|
/**
|
|
15933
15934
|
* Validates `flagUserBehavior` options and builds its request body. `reason` must be one
|
|
15934
|
-
* of the
|
|
15935
|
+
* of the `ContentFlagReasonEnum` values and is sent as that canonical label;
|
|
15935
15936
|
* `reportType` is always `behavior`.
|
|
15936
15937
|
*
|
|
15937
15938
|
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when the options are malformed
|
|
@@ -16012,7 +16013,7 @@ const flagUserProfile = async (userId, options) => submitUserReport('flagUserPro
|
|
|
16012
16013
|
* })
|
|
16013
16014
|
* ```
|
|
16014
16015
|
*
|
|
16015
|
-
* Reports a user's behavior. `reason` is required and is one of the
|
|
16016
|
+
* Reports a user's behavior. `reason` is required and is one of the
|
|
16016
16017
|
* `ContentFlagReasonEnum` values, sent as its canonical label. Reporter text, including
|
|
16017
16018
|
* the explanation for `Others`, always travels in `comment`; the reason never carries text.
|
|
16018
16019
|
*
|
|
@@ -21008,7 +21009,7 @@ const isLegacyContentFlagReason = (input) => input === undefined || typeof input
|
|
|
21008
21009
|
/**
|
|
21009
21010
|
* Validates an `Amity.ContentFlagOptions` argument. Untyped (plain JS) callers can pass
|
|
21010
21011
|
* anything at runtime, so the checks do not trust the declared type: the value must be a
|
|
21011
|
-
* plain object, `reason` must be one of the
|
|
21012
|
+
* plain object, `reason` must be one of the `ContentFlagReasonEnum` values and
|
|
21012
21013
|
* `detail`, when supplied, must be a string (`null` is not a valid supplied detail).
|
|
21013
21014
|
*
|
|
21014
21015
|
* @param apiName used in the error message, e.g. `flagPost`
|
|
@@ -38187,4 +38188,62 @@ class AmityAttachmentProductTags {
|
|
|
38187
38188
|
}
|
|
38188
38189
|
}
|
|
38189
38190
|
|
|
38190
|
-
|
|
38191
|
+
/**
|
|
38192
|
+
* Stable, cross-platform key per report category. Android and iOS expose the same
|
|
38193
|
+
* keys on `AmityContentFlagReasonType.key`. A UIKit builds its string key from it
|
|
38194
|
+
* (`amity_social_label_report_reason_<key>`), so a released key is never renamed.
|
|
38195
|
+
* The key is not derived from the enum member name on purpose: the existing UIKit
|
|
38196
|
+
* string keys do not follow it (`selling_restricted`, `violence_or_threatening`).
|
|
38197
|
+
*/
|
|
38198
|
+
const CONTENT_FLAG_REASON_KEYS = Object.freeze({
|
|
38199
|
+
[ContentFlagReasonEnum.CommunityGuidelines]: 'community_guidelines',
|
|
38200
|
+
[ContentFlagReasonEnum.ChildEndangerment]: 'child_endangerment',
|
|
38201
|
+
[ContentFlagReasonEnum.HarassmentOrBullying]: 'harassment_or_bullying',
|
|
38202
|
+
[ContentFlagReasonEnum.SelfHarmOrSuicide]: 'self_harm_or_suicide',
|
|
38203
|
+
[ContentFlagReasonEnum.ViolenceOrThreateningContent]: 'violence_or_threatening',
|
|
38204
|
+
[ContentFlagReasonEnum.SellingRestrictedItems]: 'selling_restricted',
|
|
38205
|
+
[ContentFlagReasonEnum.SexualContentOrNudity]: 'sexual_content_or_nudity',
|
|
38206
|
+
[ContentFlagReasonEnum.SpamOrScams]: 'spam_or_scams',
|
|
38207
|
+
[ContentFlagReasonEnum.FalseInformation]: 'false_information',
|
|
38208
|
+
[ContentFlagReasonEnum.Others]: 'others',
|
|
38209
|
+
});
|
|
38210
|
+
/* begin_public_function
|
|
38211
|
+
id: content_flag_reason.get_reasons
|
|
38212
|
+
*/
|
|
38213
|
+
/**
|
|
38214
|
+
* ```js
|
|
38215
|
+
* import { getContentFlagReasons, AmityContentFlagReasonType } from '@amityco/ts-sdk'
|
|
38216
|
+
* const reasons = getContentFlagReasons().filter(r => r !== AmityContentFlagReasonType.Others)
|
|
38217
|
+
* ```
|
|
38218
|
+
*
|
|
38219
|
+
* Returns every report category in display order, with `Others` last. Render a report
|
|
38220
|
+
* picker from this list rather than a copy, so a category added in a later SDK release
|
|
38221
|
+
* appears without a UI change. Each value is also its English default label.
|
|
38222
|
+
*
|
|
38223
|
+
* @returns a new array on every call; mutating it does not affect the SDK
|
|
38224
|
+
*
|
|
38225
|
+
* @category Content Flag
|
|
38226
|
+
*/
|
|
38227
|
+
const getContentFlagReasons = () => Object.values(ContentFlagReasonEnum);
|
|
38228
|
+
/* end_public_function */
|
|
38229
|
+
/* begin_public_function
|
|
38230
|
+
id: content_flag_reason.get_key
|
|
38231
|
+
*/
|
|
38232
|
+
/**
|
|
38233
|
+
* ```js
|
|
38234
|
+
* import { getContentFlagReasonKey, AmityContentFlagReasonType } from '@amityco/ts-sdk'
|
|
38235
|
+
* getContentFlagReasonKey(AmityContentFlagReasonType.ChildEndangerment) // 'child_endangerment'
|
|
38236
|
+
* ```
|
|
38237
|
+
*
|
|
38238
|
+
* Returns the stable, cross-platform key of a report category, for building a
|
|
38239
|
+
* localisation key. Never send the key to the server: flag with the enum value.
|
|
38240
|
+
*
|
|
38241
|
+
* @param reason an `AmityContentFlagReasonType` (`ContentFlagReasonEnum`) value
|
|
38242
|
+
* @returns the category's snake_case key
|
|
38243
|
+
*
|
|
38244
|
+
* @category Content Flag
|
|
38245
|
+
*/
|
|
38246
|
+
const getContentFlagReasonKey = (reason) => CONTENT_FLAG_REASON_KEYS[reason];
|
|
38247
|
+
/* end_public_function */
|
|
38248
|
+
|
|
38249
|
+
export { API_REGIONS, index$6 as AdRepository, AmityAttachmentProductTags, AmityAutoSubscription, AmityChannelNotificationModeEnum, AmityCommunityType, ContentFlagReasonEnum as AmityContentFlagReasonType, AmityEventOrderOption, AmityEventOriginType, AmityEventResponseStatus, AmityEventSortOption, AmityEventStatus, AmityEventType, AmityLiveViewerCountMode, AmityModuleNotEntitledError, 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, UserReportTypeFilterEnum, 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, getContentFlagReasonKey, getContentFlagReasons, 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, resolveModuleAvailability, restoreCache, runQuery, sortByChannelSegment, sortByDisplayName, sortByFirstCreated, sortByFirstUpdated, sortByLastActivity, sortByLastCreated, sortByLastMessage, sortByLastUpdated, sortByLocalSortingDate, sortByName, sortBySegmentNumber, subscribeTopic, toPage, toPageRaw, toToken, upsertInCache, validateUntilAt, wipeCache };
|