@wildix/stream-client 4.0.1 → 4.0.2

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.
Files changed (79) hide show
  1. package/dist-cjs/StreamService.js +4 -0
  2. package/dist-cjs/commands/SearchChannelsCommand.js +20 -0
  3. package/dist-cjs/commands/SearchMessagesCommand.js +20 -0
  4. package/dist-cjs/commands/index.js +2 -0
  5. package/dist-cjs/models/enums.js +12 -1
  6. package/dist-cjs/schemas/schemas_0.js +78 -15
  7. package/dist-es/StreamService.js +4 -0
  8. package/dist-es/commands/SearchChannelsCommand.js +16 -0
  9. package/dist-es/commands/SearchMessagesCommand.js +16 -0
  10. package/dist-es/commands/index.js +2 -0
  11. package/dist-es/models/enums.js +11 -0
  12. package/dist-es/schemas/schemas_0.js +75 -12
  13. package/dist-types/StreamService.d.ts +16 -0
  14. package/dist-types/StreamServiceClient.d.ts +4 -2
  15. package/dist-types/commands/AddChannelMemberCommand.d.ts +1 -3
  16. package/dist-types/commands/AddChannelMembersCommand.d.ts +1 -3
  17. package/dist-types/commands/AssignChannelCommand.d.ts +1 -3
  18. package/dist-types/commands/CreateGroupChannelCommand.d.ts +1 -3
  19. package/dist-types/commands/CreateKiteChannelCommand.d.ts +1 -3
  20. package/dist-types/commands/CreateSectionCommand.d.ts +1 -3
  21. package/dist-types/commands/DeleteChannelCommand.d.ts +1 -3
  22. package/dist-types/commands/DeleteChannelMemberCommand.d.ts +1 -3
  23. package/dist-types/commands/DeleteMessageCommand.d.ts +1 -3
  24. package/dist-types/commands/DeleteMessageReactionCommand.d.ts +1 -3
  25. package/dist-types/commands/DeleteSectionCommand.d.ts +1 -3
  26. package/dist-types/commands/GetChannelCommand.d.ts +1 -3
  27. package/dist-types/commands/GetChannelMemberCommand.d.ts +1 -3
  28. package/dist-types/commands/GetDirectChannelIdCommand.d.ts +1 -3
  29. package/dist-types/commands/GetFilePresignedDownloadUrlCommand.d.ts +1 -3
  30. package/dist-types/commands/GetInboxCommand.d.ts +1 -3
  31. package/dist-types/commands/GetMessageCommand.d.ts +1 -3
  32. package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +1 -3
  33. package/dist-types/commands/GetOrCreateSmsChannelCommand.d.ts +1 -3
  34. package/dist-types/commands/GetOrCreateTelephonyChannelCommand.d.ts +1 -3
  35. package/dist-types/commands/GetOrCreateWhatsAppChannelCommand.d.ts +1 -3
  36. package/dist-types/commands/GetSmsChannelIdCommand.d.ts +1 -3
  37. package/dist-types/commands/GetTelephonyChannelIdCommand.d.ts +1 -3
  38. package/dist-types/commands/GetTokenCommand.d.ts +1 -3
  39. package/dist-types/commands/GetUploadedFileInfoCommand.d.ts +1 -3
  40. package/dist-types/commands/GetWhatsAppChannelIdCommand.d.ts +1 -3
  41. package/dist-types/commands/HideChannelCommand.d.ts +1 -3
  42. package/dist-types/commands/JoinChannelCommand.d.ts +1 -3
  43. package/dist-types/commands/LeaveChannelCommand.d.ts +1 -3
  44. package/dist-types/commands/ListChannelMembersCommand.d.ts +1 -3
  45. package/dist-types/commands/ListChannelMembersReadStatusCommand.d.ts +1 -3
  46. package/dist-types/commands/ListChannelsCommand.d.ts +1 -3
  47. package/dist-types/commands/ListMentionsCommand.d.ts +1 -3
  48. package/dist-types/commands/ListMessagesCommand.d.ts +1 -3
  49. package/dist-types/commands/MarkReadCommand.d.ts +1 -3
  50. package/dist-types/commands/MarkUnreadCommand.d.ts +1 -3
  51. package/dist-types/commands/MoveChannelToSectionCommand.d.ts +1 -3
  52. package/dist-types/commands/MuteChannelCommand.d.ts +1 -3
  53. package/dist-types/commands/PartialUpdateChannelCommand.d.ts +1 -3
  54. package/dist-types/commands/PartialUpdateMessageCommand.d.ts +1 -3
  55. package/dist-types/commands/PinChannelCommand.d.ts +1 -3
  56. package/dist-types/commands/PinMessageCommand.d.ts +1 -3
  57. package/dist-types/commands/QueryChannelsCommand.d.ts +1 -3
  58. package/dist-types/commands/RemoveChannelFromSectionCommand.d.ts +1 -3
  59. package/dist-types/commands/RenameSectionCommand.d.ts +1 -3
  60. package/dist-types/commands/SearchChannelsCommand.d.ts +165 -0
  61. package/dist-types/commands/SearchMessagesCommand.d.ts +213 -0
  62. package/dist-types/commands/SendGiphyCommand.d.ts +1 -3
  63. package/dist-types/commands/SendMessageCommand.d.ts +1 -3
  64. package/dist-types/commands/SendMessageReactionCommand.d.ts +1 -3
  65. package/dist-types/commands/SendSystemMessageCommand.d.ts +1 -3
  66. package/dist-types/commands/SendTypingStartCommand.d.ts +1 -3
  67. package/dist-types/commands/SendTypingStopCommand.d.ts +1 -3
  68. package/dist-types/commands/ShowChannelCommand.d.ts +1 -3
  69. package/dist-types/commands/UnmuteChannelCommand.d.ts +1 -3
  70. package/dist-types/commands/UnpinChannelCommand.d.ts +1 -3
  71. package/dist-types/commands/UnpinMessageCommand.d.ts +1 -3
  72. package/dist-types/commands/UpdateChannelCommand.d.ts +1 -3
  73. package/dist-types/commands/UpdateMessageCommand.d.ts +1 -3
  74. package/dist-types/commands/UploadFileCommand.d.ts +1 -3
  75. package/dist-types/commands/index.d.ts +2 -0
  76. package/dist-types/models/enums.d.ts +27 -0
  77. package/dist-types/models/models_0.d.ts +163 -1
  78. package/dist-types/schemas/schemas_0.d.ts +8 -0
  79. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import type { AssignChannelVariant, ButtonVariant, ChannelAccess, ChannelContextEventAttendeeStatus, ChannelContextSource, ChannelMemberRole, ChannelsFilter, ChannelType, ChannelWhatsAppStatus, DownloadStrategy, FileCategory, GroupChannelCreationEventType, GroupChannelUnsetOptions, MentionsFilter, MessageSmsStatus, MessageType, MessageUnsetFields, MessageWhatsAppStatus, SectionType } from "./enums";
1
+ import type { AssignChannelVariant, AttachmentType, ButtonVariant, ChannelAccess, ChannelContextEventAttendeeStatus, ChannelContextSource, ChannelMemberRole, ChannelsFilter, ChannelType, ChannelWhatsAppStatus, DownloadStrategy, FileCategory, GroupChannelCreationEventType, GroupChannelUnsetOptions, MentionsFilter, MessageSmsStatus, MessageType, MessageUnsetFields, MessageWhatsAppStatus, SearchSort, SectionType } from "./enums";
2
2
  /**
3
3
  * @public
4
4
  */
@@ -2883,6 +2883,168 @@ export interface RenameSectionOutput {
2883
2883
  */
2884
2884
  section: Section;
2885
2885
  }
2886
+ /**
2887
+ * @public
2888
+ */
2889
+ export interface SearchChannelHit {
2890
+ channel: Channel;
2891
+ /**
2892
+ * Highlighted fragments from the matched channel subject or description.
2893
+ * @public
2894
+ */
2895
+ highlights?: string[] | undefined;
2896
+ }
2897
+ /**
2898
+ * @public
2899
+ */
2900
+ export interface SearchChannelsInput {
2901
+ /**
2902
+ * The unique identifier of the tenant when a service token is used.
2903
+ * @public
2904
+ */
2905
+ companyId?: string | undefined;
2906
+ /**
2907
+ * The unique identifier of the user when a service or PBX token is used.
2908
+ * @public
2909
+ */
2910
+ userId?: string | undefined;
2911
+ /**
2912
+ * Search text. Optional when `memberId` is provided (then lists shared channels).
2913
+ * @public
2914
+ */
2915
+ q?: string | undefined;
2916
+ /**
2917
+ * Restrict to channels that also contain this member. Combined with the caller, returns channels both users belong to.
2918
+ * @public
2919
+ */
2920
+ memberId?: string | undefined;
2921
+ /**
2922
+ * Restrict results to this channel type.
2923
+ * @public
2924
+ */
2925
+ channelType?: ChannelType | undefined;
2926
+ /**
2927
+ * Page size. Default 20, max 50.
2928
+ * @public
2929
+ */
2930
+ size?: number | undefined;
2931
+ /**
2932
+ * Opaque continuation token from the previous response.
2933
+ * @public
2934
+ */
2935
+ cursor?: string | undefined;
2936
+ /**
2937
+ * Result ordering. `relevance` (default with `q`) or `recency` (newest activity first, default without `q`).
2938
+ * @public
2939
+ */
2940
+ sort?: SearchSort | undefined;
2941
+ }
2942
+ /**
2943
+ * @public
2944
+ */
2945
+ export interface SearchChannelsOutput {
2946
+ /**
2947
+ * Matching channels ordered by relevance.
2948
+ * @public
2949
+ */
2950
+ results: SearchChannelHit[];
2951
+ /**
2952
+ * Cursor for the next page. Absent when there are no more pages.
2953
+ * @public
2954
+ */
2955
+ nextCursor?: string | undefined;
2956
+ }
2957
+ /**
2958
+ * @public
2959
+ */
2960
+ export interface SearchMessageHit {
2961
+ channelId: string;
2962
+ /**
2963
+ * Message row returned by listing and lookup endpoints. Deleted messages keep their position with `deletedAt` set and empty body.
2964
+ * @public
2965
+ */
2966
+ message: Message;
2967
+ /**
2968
+ * Highlighted fragments from the matched message text or attachment names.
2969
+ * @public
2970
+ */
2971
+ highlights?: string[] | undefined;
2972
+ }
2973
+ /**
2974
+ * @public
2975
+ */
2976
+ export interface SearchMessagesInput {
2977
+ /**
2978
+ * The unique identifier of the tenant when a service token is used.
2979
+ * @public
2980
+ */
2981
+ companyId?: string | undefined;
2982
+ /**
2983
+ * The unique identifier of the user when a service or PBX token is used.
2984
+ * @public
2985
+ */
2986
+ userId?: string | undefined;
2987
+ /**
2988
+ * Search text. Optional when an attachment filter (`hasAttachments`/`attachmentTypes`/`mimeTypes`) is provided.
2989
+ * @public
2990
+ */
2991
+ q?: string | undefined;
2992
+ /**
2993
+ * When set, restricts the search to this channel (in-channel search).
2994
+ * @public
2995
+ */
2996
+ channelId?: string | undefined;
2997
+ /**
2998
+ * When true, matches only messages that have at least one attachment.
2999
+ * @public
3000
+ */
3001
+ hasAttachments?: boolean | undefined;
3002
+ /**
3003
+ * Restrict to attachments of these coarse categories. `file` means any non-image/video/audio attachment.
3004
+ * @public
3005
+ */
3006
+ attachmentTypes?: AttachmentType[] | undefined;
3007
+ /**
3008
+ * Restrict to attachments whose MIME type is one of these exact values.
3009
+ * @public
3010
+ */
3011
+ mimeTypes?: string[] | undefined;
3012
+ /**
3013
+ * Page size. Default 20, max 50.
3014
+ * @public
3015
+ */
3016
+ size?: number | undefined;
3017
+ /**
3018
+ * Opaque continuation token from the previous response.
3019
+ * @public
3020
+ */
3021
+ cursor?: string | undefined;
3022
+ /**
3023
+ * Result ordering. `relevance` (default), `recency` (newest first), or `recency_asc` (oldest first).
3024
+ * @public
3025
+ */
3026
+ sort?: SearchSort | undefined;
3027
+ }
3028
+ /**
3029
+ * @public
3030
+ */
3031
+ export interface SearchMessagesOutput {
3032
+ /**
3033
+ * Matching messages, access-filtered and ordered by the requested sort.
3034
+ * @public
3035
+ */
3036
+ results: SearchMessageHit[];
3037
+ /**
3038
+ * Total OpenSearch hit count before the visibility post-filter; approximate.
3039
+ * @public
3040
+ */
3041
+ totalCount?: number | undefined;
3042
+ /**
3043
+ * Cursor for the next page. Absent when there are no more pages.
3044
+ * @public
3045
+ */
3046
+ nextCursor?: string | undefined;
3047
+ }
2886
3048
  /**
2887
3049
  * @public
2888
3050
  */
@@ -145,6 +145,12 @@ export declare var RemoveChannelFromSectionInput$: StaticStructureSchema;
145
145
  export declare var RemoveChannelFromSectionOutput$: StaticStructureSchema;
146
146
  export declare var RenameSectionInput$: StaticStructureSchema;
147
147
  export declare var RenameSectionOutput$: StaticStructureSchema;
148
+ export declare var SearchChannelHit$: StaticStructureSchema;
149
+ export declare var SearchChannelsInput$: StaticStructureSchema;
150
+ export declare var SearchChannelsOutput$: StaticStructureSchema;
151
+ export declare var SearchMessageHit$: StaticStructureSchema;
152
+ export declare var SearchMessagesInput$: StaticStructureSchema;
153
+ export declare var SearchMessagesOutput$: StaticStructureSchema;
148
154
  export declare var Section$: StaticStructureSchema;
149
155
  export declare var SendGiphyInput$: StaticStructureSchema;
150
156
  export declare var SendGiphyOutput$: StaticStructureSchema;
@@ -228,6 +234,8 @@ export declare var PinMessage$: StaticOperationSchema;
228
234
  export declare var QueryChannels$: StaticOperationSchema;
229
235
  export declare var RemoveChannelFromSection$: StaticOperationSchema;
230
236
  export declare var RenameSection$: StaticOperationSchema;
237
+ export declare var SearchChannels$: StaticOperationSchema;
238
+ export declare var SearchMessages$: StaticOperationSchema;
231
239
  export declare var SendGiphy$: StaticOperationSchema;
232
240
  export declare var SendMessage$: StaticOperationSchema;
233
241
  export declare var SendMessageReaction$: StaticOperationSchema;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/stream-client",
3
3
  "description": "@wildix/stream-client client",
4
- "version": "4.0.1",
4
+ "version": "4.0.2",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -54,4 +54,4 @@
54
54
  "react-native": {
55
55
  "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native"
56
56
  }
57
- }
57
+ }