@amityco/ts-sdk 7.32.0 → 7.32.1-28e31d56.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/comment.d.ts +2 -2
- package/dist/@types/domains/comment.d.ts.map +1 -1
- package/dist/@types/domains/content.d.ts +23 -3
- package/dist/@types/domains/content.d.ts.map +1 -1
- package/dist/@types/domains/feed.d.ts +4 -1
- package/dist/@types/domains/feed.d.ts.map +1 -1
- package/dist/@types/domains/post.d.ts +11 -0
- package/dist/@types/domains/post.d.ts.map +1 -1
- package/dist/commentRepository/api/createComment.d.ts +1 -1
- package/dist/commentRepository/api/createComment.d.ts.map +1 -1
- package/dist/commentRepository/api/tests/createComment.gif.test.d.ts +2 -0
- package/dist/commentRepository/api/tests/createComment.gif.test.d.ts.map +1 -0
- package/dist/commentRepository/api/tests/deleteComment.gif.test.d.ts +2 -0
- package/dist/commentRepository/api/tests/deleteComment.gif.test.d.ts.map +1 -0
- package/dist/commentRepository/api/tests/updateComment.gif.test.d.ts +2 -0
- package/dist/commentRepository/api/tests/updateComment.gif.test.d.ts.map +1 -0
- package/dist/commentRepository/api/updateComment.d.ts +9 -2
- package/dist/commentRepository/api/updateComment.d.ts.map +1 -1
- package/dist/commentRepository/observers/tests/getComments.gif.test.d.ts +2 -0
- package/dist/commentRepository/observers/tests/getComments.gif.test.d.ts.map +1 -0
- package/dist/commentRepository/utils/dataTypes.d.ts +2 -0
- package/dist/commentRepository/utils/dataTypes.d.ts.map +1 -0
- package/dist/index.cjs.js +84 -43
- package/dist/index.esm.js +84 -43
- package/dist/index.umd.js +2 -2
- package/dist/messagePreview/utils/getSubChannelMessagePreviewWithUser.d.ts +1 -1
- package/dist/postRepository/api/createMixedMediaPost.d.ts +6 -6
- package/dist/postRepository/api/createMixedMediaPost.d.ts.map +1 -1
- package/dist/postRepository/api/createPost.d.ts +1 -4
- package/dist/postRepository/api/createPost.d.ts.map +1 -1
- package/dist/postRepository/api/editPost.d.ts +4 -5
- package/dist/postRepository/api/editPost.d.ts.map +1 -1
- package/dist/postRepository/api/tests/gifPost.test.d.ts +2 -0
- package/dist/postRepository/api/tests/gifPost.test.d.ts.map +1 -0
- package/dist/postRepository/observers/getPosts.d.ts +4 -0
- package/dist/postRepository/observers/getPosts.d.ts.map +1 -1
- package/dist/postRepository/utils/attachments.d.ts +8 -0
- package/dist/postRepository/utils/attachments.d.ts.map +1 -0
- package/dist/utils/gifAttachment.d.ts +5 -0
- package/dist/utils/gifAttachment.d.ts.map +1 -0
- package/dist/utils/postTypePredicate.d.ts +1 -0
- package/dist/utils/postTypePredicate.d.ts.map +1 -1
- package/dist/utils/tests/dummy/comment.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -177,6 +177,7 @@ const PostContentType = Object.freeze({
|
|
|
177
177
|
AUDIO: 'audio',
|
|
178
178
|
ROOM: 'room',
|
|
179
179
|
EVENT: 'event',
|
|
180
|
+
GIF: 'gif',
|
|
180
181
|
});
|
|
181
182
|
const PostStructureType = Object.freeze({
|
|
182
183
|
TEXT: 'text',
|
|
@@ -186,6 +187,8 @@ const PostStructureType = Object.freeze({
|
|
|
186
187
|
AUDIO: 'audio',
|
|
187
188
|
MIXED: 'mixed',
|
|
188
189
|
EVENT: 'event',
|
|
190
|
+
/** A post that holds only GIFs. GIFs beside other media make the post `mixed`. */
|
|
191
|
+
GIF: 'gif',
|
|
189
192
|
});
|
|
190
193
|
|
|
191
194
|
var InvitationTypeEnum;
|
|
@@ -14026,7 +14029,7 @@ const getWatchSessionStorage = () => {
|
|
|
14026
14029
|
return storageInstance;
|
|
14027
14030
|
};
|
|
14028
14031
|
|
|
14029
|
-
const privateKey = "
|
|
14032
|
+
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=";
|
|
14030
14033
|
/*
|
|
14031
14034
|
* The crypto algorithm used for importing key and signing string
|
|
14032
14035
|
*/
|
|
@@ -27743,8 +27746,40 @@ getCommentByIds.locally = (commentIds) => {
|
|
|
27743
27746
|
};
|
|
27744
27747
|
};
|
|
27745
27748
|
|
|
27749
|
+
const GIF_OPTIONAL_KEYS = ['width', 'height'];
|
|
27750
|
+
/*
|
|
27751
|
+
* The server refuses a GIF attachment that carries `null` or any key it does not know, so the
|
|
27752
|
+
* request keeps `type`, `url` and only the optional fields that have a value. The SDK does not
|
|
27753
|
+
* check the values themselves: the server answers 400 for a bad one.
|
|
27754
|
+
*/
|
|
27755
|
+
const toGifAttachmentPayload = (gif) => {
|
|
27756
|
+
const payload = { type: 'gif', url: gif.url };
|
|
27757
|
+
GIF_OPTIONAL_KEYS.forEach(key => {
|
|
27758
|
+
const value = gif[key];
|
|
27759
|
+
if (value !== undefined && value !== null)
|
|
27760
|
+
Object.assign(payload, { [key]: value });
|
|
27761
|
+
});
|
|
27762
|
+
return payload;
|
|
27763
|
+
};
|
|
27764
|
+
/* Builds each GIF from its known keys; every other attachment is sent as the caller gave it. */
|
|
27765
|
+
const toAttachmentsPayload = (attachments) => attachments.map(attachment => attachment.type === 'gif'
|
|
27766
|
+
? toGifAttachmentPayload(attachment)
|
|
27767
|
+
: attachment);
|
|
27768
|
+
|
|
27769
|
+
/*
|
|
27770
|
+
* The data types the server lists for a comment, known before it answers: one per attachment
|
|
27771
|
+
* type, plus `text` when there is text. Sorted, as the server sorts them.
|
|
27772
|
+
*/
|
|
27773
|
+
const commentDataTypesOf = (text, attachments) => {
|
|
27774
|
+
const types = new Set((attachments !== null && attachments !== void 0 ? attachments : []).map(attachment => attachment.type));
|
|
27775
|
+
if (text)
|
|
27776
|
+
types.add('text');
|
|
27777
|
+
return [...types].sort();
|
|
27778
|
+
};
|
|
27779
|
+
|
|
27746
27780
|
const getLocalCommentId = () => uuid();
|
|
27747
27781
|
const createCommentOptimistic = (bundle) => {
|
|
27782
|
+
var _a;
|
|
27748
27783
|
const client = getActiveClient();
|
|
27749
27784
|
if (!client.cache)
|
|
27750
27785
|
return;
|
|
@@ -27779,6 +27814,7 @@ const createCommentOptimistic = (bundle) => {
|
|
|
27779
27814
|
targetId: '',
|
|
27780
27815
|
targetType: 'community',
|
|
27781
27816
|
dataType: 'text',
|
|
27817
|
+
dataTypes: commentDataTypesOf((_a = bundle.data) === null || _a === void 0 ? void 0 : _a.text, bundle.attachments),
|
|
27782
27818
|
syncState: "syncing" /* Amity.SyncState.Syncing */,
|
|
27783
27819
|
// In a gated community the optimistic object stays out of public collections until the
|
|
27784
27820
|
// response settles the status; the author's own view still updates through the local event
|
|
@@ -27825,12 +27861,15 @@ const createCommentOptimistic = (bundle) => {
|
|
|
27825
27861
|
const createComment = async (bundle, isOptimistic = true) => {
|
|
27826
27862
|
const client = getActiveClient();
|
|
27827
27863
|
client.log('comment/createComment', Object.assign(Object.assign({}, bundle), { isOptimistic }));
|
|
27864
|
+
// A GIF is sent with its known keys only; the server refuses `null` and unknown keys.
|
|
27865
|
+
const request = bundle.attachments
|
|
27866
|
+
? Object.assign(Object.assign({}, bundle), { attachments: toAttachmentsPayload(bundle.attachments) }) : bundle;
|
|
27828
27867
|
// Without a local comment the server assigns the id; with one, the same id travels through the
|
|
27829
27868
|
// optimistic object, the response and every realtime event so each step recognises it.
|
|
27830
|
-
const optimisticData = isOptimistic ? createCommentOptimistic(
|
|
27869
|
+
const optimisticData = isOptimistic ? createCommentOptimistic(request) : undefined;
|
|
27831
27870
|
const commentId = optimisticData === null || optimisticData === void 0 ? void 0 : optimisticData.commentId;
|
|
27832
27871
|
try {
|
|
27833
|
-
const { data: payload } = await client.http.post('/api/v3/comments', Object.assign(Object.assign({},
|
|
27872
|
+
const { data: payload } = await client.http.post('/api/v3/comments', Object.assign(Object.assign({}, request), { commentId }));
|
|
27834
27873
|
// BE always returns an array of comments If it got record 0 from BE it might have a problem on creation logic
|
|
27835
27874
|
if (payload.comments.length === 0)
|
|
27836
27875
|
throw new Error('Comment not created');
|
|
@@ -27923,9 +27962,16 @@ const createComment = async (bundle, isOptimistic = true) => {
|
|
|
27923
27962
|
* const updated = await CommentRepository.updateComment(commentId, {
|
|
27924
27963
|
* data: { text: 'hello world' }
|
|
27925
27964
|
* })
|
|
27965
|
+
*
|
|
27966
|
+
* // Replace the GIF, or remove it and keep the text
|
|
27967
|
+
* await CommentRepository.updateComment(commentId, {
|
|
27968
|
+
* attachments: [{ type: 'gif', url: 'https://media.giphy.com/media/l0MYt5jPR6QX5pnqM/giphy.gif' }],
|
|
27969
|
+
* })
|
|
27970
|
+
* await CommentRepository.updateComment(commentId, { attachments: [] })
|
|
27926
27971
|
* ```
|
|
27927
27972
|
*
|
|
27928
|
-
* Updates an {@link Amity.Comment}
|
|
27973
|
+
* Updates an {@link Amity.Comment}. `attachments` replaces the current ones, `[]` removes them,
|
|
27974
|
+
* and leaving `attachments` out keeps them as they are.
|
|
27929
27975
|
*
|
|
27930
27976
|
* @param commentId The ID of the {@link Amity.Comment} to edit
|
|
27931
27977
|
* @param patch The patch data to apply
|
|
@@ -27939,7 +27985,10 @@ const updateComment = async (commentId, patch) => {
|
|
|
27939
27985
|
const client = getActiveClient();
|
|
27940
27986
|
client.log('user/updateComment', patch);
|
|
27941
27987
|
const previous = (_a = pullFromCache(['comment', 'get', commentId])) === null || _a === void 0 ? void 0 : _a.data;
|
|
27942
|
-
|
|
27988
|
+
// A GIF is sent with its known keys only; the server refuses `null` and unknown keys.
|
|
27989
|
+
const body = patch.attachments
|
|
27990
|
+
? Object.assign(Object.assign({}, patch), { attachments: toAttachmentsPayload(patch.attachments) }) : patch;
|
|
27991
|
+
const { data: payload } = await client.http.put(`/api/v3/comments/${encodeURIComponent(commentId)}`, body);
|
|
27943
27992
|
const data = prepareCommentPayload(payload);
|
|
27944
27993
|
const updated = data.comments.find(comment => comment.commentId === commentId);
|
|
27945
27994
|
const cachedAt = client.cache && Date.now();
|
|
@@ -28070,13 +28119,13 @@ const deleteComment = async (commentId, permanent = false) => {
|
|
|
28070
28119
|
permanent,
|
|
28071
28120
|
},
|
|
28072
28121
|
});
|
|
28073
|
-
// to support hard deletion
|
|
28074
|
-
const deleted = Object.assign(Object.assign({}, comment.data), { isDeleted: true });
|
|
28122
|
+
// to support hard deletion; the server empties a deleted comment's attachments
|
|
28123
|
+
const deleted = Object.assign(Object.assign({}, comment.data), { isDeleted: true, attachments: [] });
|
|
28075
28124
|
if (permanent) {
|
|
28076
28125
|
scheduleTask(() => pushToTombstone('comment', commentId));
|
|
28077
28126
|
}
|
|
28078
28127
|
else {
|
|
28079
|
-
upsertInCache(['comment', 'get', commentId], { isDeleted: true });
|
|
28128
|
+
upsertInCache(['comment', 'get', commentId], { isDeleted: true, attachments: [] });
|
|
28080
28129
|
}
|
|
28081
28130
|
if (comment.data.referenceType === 'story') {
|
|
28082
28131
|
const story = await getStoryByStoryId$1(comment.data.referenceId);
|
|
@@ -30406,6 +30455,19 @@ getPostByIds.locally = (postIds) => {
|
|
|
30406
30455
|
};
|
|
30407
30456
|
};
|
|
30408
30457
|
|
|
30458
|
+
/*
|
|
30459
|
+
* The `attachments` a post create or edit sends. A GIF goes with its known keys only and never
|
|
30460
|
+
* with product tags (both a 400). A file takes its product tags from the map, as before.
|
|
30461
|
+
*/
|
|
30462
|
+
const preparePostAttachments = (attachments, attachmentProductTags) => attachments === null || attachments === void 0 ? void 0 : attachments.map(attachment => {
|
|
30463
|
+
if (attachment.type === 'gif') {
|
|
30464
|
+
return toGifAttachmentPayload(attachment);
|
|
30465
|
+
}
|
|
30466
|
+
if (!attachmentProductTags || !attachment.fileId)
|
|
30467
|
+
return attachment;
|
|
30468
|
+
return Object.assign(Object.assign({}, attachment), { productTags: attachmentProductTags.get(attachment.fileId) });
|
|
30469
|
+
});
|
|
30470
|
+
|
|
30409
30471
|
/* begin_public_function
|
|
30410
30472
|
id: post.create.text_post, post.create.image_post, post.create.file_post, post.create.video_post, post.create.poll_post, post.create.livestream_post, post.create.custom_post
|
|
30411
30473
|
*/
|
|
@@ -30435,17 +30497,7 @@ const createPost = async (bundle) => {
|
|
|
30435
30497
|
delete bundle.dataType;
|
|
30436
30498
|
}
|
|
30437
30499
|
const { attachments, attachmentProductTags } = bundle, rest = __rest(bundle, ["attachments", "attachmentProductTags"]);
|
|
30438
|
-
const processedAttachments = attachments
|
|
30439
|
-
? attachments.map(attachment => {
|
|
30440
|
-
var _a;
|
|
30441
|
-
/* c8 ignore next */
|
|
30442
|
-
const productTags = (_a = bundle.attachmentProductTags) === null || _a === void 0 ? void 0 : _a.get(attachment.fileId);
|
|
30443
|
-
if (productTags)
|
|
30444
|
-
return Object.assign(Object.assign({}, attachment), { productTags });
|
|
30445
|
-
/* c8 ignore next */
|
|
30446
|
-
return attachment;
|
|
30447
|
-
})
|
|
30448
|
-
: attachments;
|
|
30500
|
+
const processedAttachments = preparePostAttachments(attachments, attachmentProductTags);
|
|
30449
30501
|
const { data: payload } = await client.http.post('/api/v4/posts', Object.assign(Object.assign({}, rest), { attachments: processedAttachments }));
|
|
30450
30502
|
fireEvent('post.created', payload);
|
|
30451
30503
|
const data = preparePostPayload(payload);
|
|
@@ -30471,7 +30523,9 @@ const createPost = async (bundle) => {
|
|
|
30471
30523
|
* })
|
|
30472
30524
|
* ```
|
|
30473
30525
|
*
|
|
30474
|
-
* Updates an {@link Amity.Post}
|
|
30526
|
+
* Updates an {@link Amity.Post}. `attachments` is the full list to keep: a GIF is matched by its
|
|
30527
|
+
* `url`, so send each kept GIF back with its link and size as read from `childrenPosts`; an
|
|
30528
|
+
* attachment left out is deleted, `[]` removes them all, and leaving `attachments` out keeps them.
|
|
30475
30529
|
*
|
|
30476
30530
|
* @param postId The ID of the {@link Amity.Post} to edit
|
|
30477
30531
|
* @param patch The patch data to apply
|
|
@@ -30484,17 +30538,7 @@ const editPost = async (postId, patch) => {
|
|
|
30484
30538
|
const client = getActiveClient();
|
|
30485
30539
|
client.log('user/editPost', patch);
|
|
30486
30540
|
const { attachments } = patch;
|
|
30487
|
-
const processedAttachments = attachments
|
|
30488
|
-
? attachments.map(attachment => {
|
|
30489
|
-
var _a;
|
|
30490
|
-
/* c8 ignore next */
|
|
30491
|
-
const productTags = (_a = patch.attachmentProductTags) === null || _a === void 0 ? void 0 : _a.get(attachment.fileId);
|
|
30492
|
-
if (productTags)
|
|
30493
|
-
return Object.assign(Object.assign({}, attachment), { productTags });
|
|
30494
|
-
/* c8 ignore next */
|
|
30495
|
-
return attachment;
|
|
30496
|
-
})
|
|
30497
|
-
: attachments;
|
|
30541
|
+
const processedAttachments = preparePostAttachments(attachments, patch.attachmentProductTags);
|
|
30498
30542
|
const { data: payload } = await client.http.put(`/api/v4/posts/${encodeURIComponent(postId)}`, Object.assign(Object.assign({}, patch), { attachments: processedAttachments }));
|
|
30499
30543
|
const data = prepareMembershipPayload(payload, 'communityUsers');
|
|
30500
30544
|
const cachedAt = client.cache && Date.now();
|
|
@@ -30978,11 +31022,14 @@ const createAudioPost = async (bundle) => {
|
|
|
30978
31022
|
* { fileId: "file1", type: "image" },
|
|
30979
31023
|
* { fileId: "file2", type: "video" },
|
|
30980
31024
|
* { fileId: "file3", type: "audio" },
|
|
30981
|
-
* { fileId: "file4", type: "file" }
|
|
31025
|
+
* { fileId: "file4", type: "file" },
|
|
31026
|
+
* { type: "gif", url: "https://media.giphy.com/media/l0MYt5jPR6QX5pnqM/giphy.gif", width: 480, height: 270 }
|
|
30982
31027
|
* ],
|
|
30983
31028
|
* })
|
|
30984
31029
|
* ```
|
|
30985
31030
|
*
|
|
31031
|
+
* A post holds 1 to 10 attachments. A GIF is a link, not a file, and takes no product tags.
|
|
31032
|
+
*
|
|
30986
31033
|
* Creates an {@link Amity.Post}
|
|
30987
31034
|
*
|
|
30988
31035
|
* @param bundle The data necessary to create a new {@link Amity.Post}
|
|
@@ -30996,17 +31043,7 @@ const createMixedMediaPost = async (bundle) => {
|
|
|
30996
31043
|
const client = getActiveClient();
|
|
30997
31044
|
client.log('post/createMixedMediaPost', bundle);
|
|
30998
31045
|
const { attachments, attachmentProductTags } = bundle, rest = __rest(bundle, ["attachments", "attachmentProductTags"]);
|
|
30999
|
-
const processedAttachments = attachments
|
|
31000
|
-
? attachments.map(attachment => {
|
|
31001
|
-
var _a;
|
|
31002
|
-
/* c8 ignore next */
|
|
31003
|
-
const productTags = (_a = bundle.attachmentProductTags) === null || _a === void 0 ? void 0 : _a.get(attachment.fileId);
|
|
31004
|
-
if (productTags)
|
|
31005
|
-
return Object.assign(Object.assign({}, attachment), { productTags });
|
|
31006
|
-
/* c8 ignore next */
|
|
31007
|
-
return attachment;
|
|
31008
|
-
})
|
|
31009
|
-
: /* c8 ignore next */ attachments;
|
|
31046
|
+
const processedAttachments = preparePostAttachments(attachments, attachmentProductTags);
|
|
31010
31047
|
const { data: payload } = await client.http.post('/api/v4/posts', Object.assign(Object.assign({}, rest), { attachments: processedAttachments }));
|
|
31011
31048
|
fireEvent('post.created', payload);
|
|
31012
31049
|
const data = preparePostPayload(payload);
|
|
@@ -31523,6 +31560,10 @@ class PostLiveCollectionController extends LiveCollectionController {
|
|
|
31523
31560
|
*
|
|
31524
31561
|
* Observe all mutations on a list of {@link Amity.Post} for a given target object
|
|
31525
31562
|
*
|
|
31563
|
+
* GIF posts come back on every API version. This query is on v5, so `dataTypes: ['gif']` filters
|
|
31564
|
+
* them; a post with GIFs beside other media is `mixed` and is hidden unless
|
|
31565
|
+
* `includeMixedStructure` is `true`.
|
|
31566
|
+
*
|
|
31526
31567
|
* @param params.targetType the type of the target
|
|
31527
31568
|
* @param params.targetId the ID of the target
|
|
31528
31569
|
* @param callback the function to call when new data are available
|