@amityco/ts-sdk 7.29.0 → 7.29.1-0cb2e19.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/channel.d.ts +13 -1
- package/dist/@types/domains/channel.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/channelRepository/observers/getChannels/ChannelLiveCollectionController.d.ts.map +1 -1
- package/dist/channelRepository/observers/searchChannels/SearchChannelLiveCollectionController.d.ts.map +1 -1
- package/dist/channelRepository/observers/tests/integrations/getChannelsSortByLastMessage.integration.test.d.ts +2 -0
- package/dist/channelRepository/observers/tests/integrations/getChannelsSortByLastMessage.integration.test.d.ts.map +1 -0
- package/dist/channelRepository/utils/channelActivityOnLoginHandler.d.ts +16 -0
- package/dist/channelRepository/utils/channelActivityOnLoginHandler.d.ts.map +1 -0
- package/dist/channelRepository/utils/tests/integrations/channelActivity.integration.test.d.ts +2 -0
- package/dist/channelRepository/utils/tests/integrations/channelActivity.integration.test.d.ts.map +1 -0
- package/dist/channelRepository/utils/tests/updateChannelActivityTimestamps.test.d.ts +2 -0
- package/dist/channelRepository/utils/tests/updateChannelActivityTimestamps.test.d.ts.map +1 -0
- package/dist/channelRepository/utils/updateChannelActivityTimestamps.d.ts +42 -0
- package/dist/channelRepository/utils/updateChannelActivityTimestamps.d.ts.map +1 -0
- package/dist/client/api/resumeSession.d.ts.map +1 -1
- package/dist/client/api/setupLoginSubscriptions.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/microtasks.d.ts.map +1 -1
- package/dist/core/query/sorting.d.ts +10 -0
- package/dist/core/query/sorting.d.ts.map +1 -1
- package/dist/core/query/tests/sorting.test.d.ts +2 -0
- package/dist/core/query/tests/sorting.test.d.ts.map +1 -0
- package/dist/core/tests/microtasks.test.d.ts +2 -0
- package/dist/core/tests/microtasks.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 +630 -68
- package/dist/index.esm.js +630 -69
- package/dist/index.umd.js +2 -2
- package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts +1 -0
- package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts.map +1 -1
- package/dist/messageRepository/api/createMessage.d.ts.map +1 -1
- 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/dist/utils/tests/dummy/channel.d.ts +4 -0
- package/dist/utils/tests/dummy/channel.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Request body shared by the post, comment and message flag endpoints. */
|
|
2
|
+
export declare type ContentFlagBody = {
|
|
3
|
+
reason: string;
|
|
4
|
+
detail?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* True when a public `flagX(id, input)` argument is the legacy shape (a reason string
|
|
8
|
+
* or nothing). Anything else is routed to the `Amity.ContentFlagOptions` path, whose
|
|
9
|
+
* validation rejects malformed values before any request is made.
|
|
10
|
+
*/
|
|
11
|
+
export declare const isLegacyContentFlagReason: (input: unknown) => input is Amity.ContentFlagReason | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Validates an `Amity.ContentFlagOptions` argument. Untyped (plain JS) callers can pass
|
|
14
|
+
* anything at runtime, so the checks do not trust the declared type: the value must be a
|
|
15
|
+
* plain object, `reason` must be one of the nine `ContentFlagReasonEnum` values and
|
|
16
|
+
* `detail`, when supplied, must be a string (`null` is not a valid supplied detail).
|
|
17
|
+
*
|
|
18
|
+
* @param apiName used in the error message, e.g. `flagPost`
|
|
19
|
+
* @throws {ASCInvalidParameterError} `INVALID_PARAMETERS` when the options are malformed
|
|
20
|
+
*/
|
|
21
|
+
export declare const validateContentFlagOptions: (apiName: string, options: unknown) => Amity.ContentFlagOptions;
|
|
22
|
+
/**
|
|
23
|
+
* Builds the request body for validated options. `detail` is forwarded unchanged (empty
|
|
24
|
+
* and whitespace-only strings included) and omitted from the body when `undefined`; the
|
|
25
|
+
* backend enforces the 300-character limit.
|
|
26
|
+
*/
|
|
27
|
+
export declare const toContentFlagBody: ({ reason, detail }: Amity.ContentFlagOptions) => ContentFlagBody;
|
|
28
|
+
//# sourceMappingURL=contentFlag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentFlag.d.ts","sourceRoot":"","sources":["../../src/utils/contentFlag.ts"],"names":[],"mappings":"AAGA,2EAA2E;AAC3E,oBAAY,eAAe,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAIlE;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,UAC7B,OAAO,iDACmF,CAAC;AAEpG;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,YAC5B,MAAM,WACN,OAAO,KACf,MAAM,kBAoBR,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,uBAAwB,MAAM,kBAAkB,KAAG,eACzB,CAAC"}
|
|
@@ -234,4 +234,8 @@ export declare const channelCreatedAt3: Amity.RawChannel<any>;
|
|
|
234
234
|
export declare const channelLastActivity1: Amity.RawChannel<any>;
|
|
235
235
|
export declare const channelLastActivity2: Amity.RawChannel<any>;
|
|
236
236
|
export declare const channelLastActivity3: Amity.RawChannel<any>;
|
|
237
|
+
export declare const channelLastMessageAt1: Amity.RawChannel<any>;
|
|
238
|
+
export declare const channelLastMessageAt2: Amity.RawChannel<any>;
|
|
239
|
+
export declare const channelLastMessageAt3: Amity.RawChannel<any>;
|
|
240
|
+
export declare const channelLastMessageAtNull: Amity.RawChannel<any>;
|
|
237
241
|
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/channel.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,qBAAqB,YAAa,MAAM,UAAU,KAAG,MAAM,eAGvE,CAAC;AAEF,eAAO,MAAM,wBAAwB,eACvB,MAAM,cAAc,KAC/B,MAAM,uBAKuC,CAAC;AAEjD,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/channel.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,qBAAqB,YAAa,MAAM,UAAU,KAAG,MAAM,eAGvE,CAAC;AAEF,eAAO,MAAM,wBAAwB,eACvB,MAAM,cAAc,KAC/B,MAAM,uBAKuC,CAAC;AAEjD,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,UAAU,CAoBvF;AAED,wBAAgB,sBAAsB,CACpC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,GAC/C,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAkBhC;AAED,eAAO,MAAM,yBAAyB,WAC5B,MAAM,aAAa,CAAC,SAAS,CAAC,QAChC,MAAM,YAAY,GAAG,SAAS,KACnC,MAAM,UAAU,CAAC,SAAS,CAG3B,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;;CAKpB,CAAC;AAEF,eAAO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