@amityco/ts-sdk 7.27.2-d978f145.0 → 7.27.2-fbc08952.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.
@@ -1 +1 @@
1
- {"version":3,"file":"flagCommentWithOptions.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/api/flagCommentWithOptions.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,cACtB,aAAa,CAAC,WAAW,CAAC,WAC5B,MAAM,kBAAkB,KAChC,QAAQ,OAAO,CAoBjB,CAAC"}
1
+ {"version":3,"file":"flagCommentWithOptions.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/api/flagCommentWithOptions.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,cACtB,aAAa,CAAC,WAAW,CAAC,WAC5B,MAAM,kBAAkB,KAChC,QAAQ,OAAO,CAkBjB,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -20384,11 +20384,9 @@ const toContentFlagBody = ({ reason, detail }) => detail === undefined ? { reaso
20384
20384
  * @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
20385
20385
  */
20386
20386
  const flagMessageWithOptions = async (messageId, options) => {
20387
- // Validate first: an input error must surface as INVALID_PARAMETERS regardless of
20388
- // whether a client is active, and validation needs nothing from the client.
20389
- const body = toContentFlagBody(validateContentFlagOptions('flagMessage', options));
20390
20387
  const client = getActiveClient();
20391
20388
  client.log('message/flag', messageId);
20389
+ const body = toContentFlagBody(validateContentFlagOptions('flagMessage', options));
20392
20390
  const { data: payload } = await client.http.post(`/api/v5/messages/${encodeURIComponent(messageId)}/flags`, body);
20393
20391
  if (client.cache) {
20394
20392
  const messagePayload = await prepareMessagePayload(payload);
@@ -27654,11 +27652,9 @@ const flagCommentWithReasonString = async (commentId, reason) => {
27654
27652
  * @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
27655
27653
  */
27656
27654
  const flagCommentWithOptions = async (commentId, options) => {
27657
- // Validate first: an input error must surface as INVALID_PARAMETERS regardless of
27658
- // whether a client is active, and validation needs nothing from the client.
27659
- const body = toContentFlagBody(validateContentFlagOptions('flagComment', options));
27660
27655
  const client = getActiveClient();
27661
27656
  client.log('comment/flagComment', commentId);
27657
+ const body = toContentFlagBody(validateContentFlagOptions('flagComment', options));
27662
27658
  const { data: payload } = await client.http.post(`/api/v3/comments/${encodeURIComponent(commentId)}/flag`, body);
27663
27659
  if (client.cache) {
27664
27660
  ingestInCache(payload);
@@ -30067,11 +30063,9 @@ const declinePost = async (postId) => {
30067
30063
  * @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
30068
30064
  */
30069
30065
  const flagPostWithOptions = async (postId, options) => {
30070
- // Validate first: an input error must surface as INVALID_PARAMETERS regardless of
30071
- // whether a client is active, and validation needs nothing from the client.
30072
- const body = toContentFlagBody(validateContentFlagOptions('flagPost', options));
30073
30066
  const client = getActiveClient();
30074
30067
  client.log('post/flagPost', postId);
30068
+ const body = toContentFlagBody(validateContentFlagOptions('flagPost', options));
30075
30069
  const { data: payload } = await client.http.post(`/api/v3/posts/${encodeURIComponent(postId)}/flag`, body);
30076
30070
  if (client.cache) {
30077
30071
  ingestInCache(prepareMembershipPayload(payload, 'communityUsers'));
package/dist/index.esm.js CHANGED
@@ -20384,11 +20384,9 @@ const toContentFlagBody = ({ reason, detail }) => detail === undefined ? { reaso
20384
20384
  * @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
20385
20385
  */
20386
20386
  const flagMessageWithOptions = async (messageId, options) => {
20387
- // Validate first: an input error must surface as INVALID_PARAMETERS regardless of
20388
- // whether a client is active, and validation needs nothing from the client.
20389
- const body = toContentFlagBody(validateContentFlagOptions('flagMessage', options));
20390
20387
  const client = getActiveClient();
20391
20388
  client.log('message/flag', messageId);
20389
+ const body = toContentFlagBody(validateContentFlagOptions('flagMessage', options));
20392
20390
  const { data: payload } = await client.http.post(`/api/v5/messages/${encodeURIComponent(messageId)}/flags`, body);
20393
20391
  if (client.cache) {
20394
20392
  const messagePayload = await prepareMessagePayload(payload);
@@ -27654,11 +27652,9 @@ const flagCommentWithReasonString = async (commentId, reason) => {
27654
27652
  * @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
27655
27653
  */
27656
27654
  const flagCommentWithOptions = async (commentId, options) => {
27657
- // Validate first: an input error must surface as INVALID_PARAMETERS regardless of
27658
- // whether a client is active, and validation needs nothing from the client.
27659
- const body = toContentFlagBody(validateContentFlagOptions('flagComment', options));
27660
27655
  const client = getActiveClient();
27661
27656
  client.log('comment/flagComment', commentId);
27657
+ const body = toContentFlagBody(validateContentFlagOptions('flagComment', options));
27662
27658
  const { data: payload } = await client.http.post(`/api/v3/comments/${encodeURIComponent(commentId)}/flag`, body);
27663
27659
  if (client.cache) {
27664
27660
  ingestInCache(payload);
@@ -30067,11 +30063,9 @@ const declinePost = async (postId) => {
30067
30063
  * @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when `options` is malformed, before any request is made
30068
30064
  */
30069
30065
  const flagPostWithOptions = async (postId, options) => {
30070
- // Validate first: an input error must surface as INVALID_PARAMETERS regardless of
30071
- // whether a client is active, and validation needs nothing from the client.
30072
- const body = toContentFlagBody(validateContentFlagOptions('flagPost', options));
30073
30066
  const client = getActiveClient();
30074
30067
  client.log('post/flagPost', postId);
30068
+ const body = toContentFlagBody(validateContentFlagOptions('flagPost', options));
30075
30069
  const { data: payload } = await client.http.post(`/api/v3/posts/${encodeURIComponent(postId)}/flag`, body);
30076
30070
  if (client.cache) {
30077
30071
  ingestInCache(prepareMembershipPayload(payload, 'communityUsers'));