stream-chat 8.23.0 → 8.24.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/browser.es.js +46 -49
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +46 -49
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +46 -49
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +46 -49
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +9 -7
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/segment.d.ts +1 -1
- package/dist/types/segment.d.ts.map +1 -1
- package/dist/types/types.d.ts +7 -10
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +10 -11
- package/src/segment.ts +3 -4
- package/src/types.ts +7 -11
package/src/segment.ts
CHANGED
|
@@ -18,7 +18,7 @@ type SegmentUpdatableFields = {
|
|
|
18
18
|
|
|
19
19
|
export class Segment<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> {
|
|
20
20
|
type: SegmentType;
|
|
21
|
-
id
|
|
21
|
+
id: string | null;
|
|
22
22
|
client: StreamChat<StreamChatGenerics>;
|
|
23
23
|
data?: SegmentData | SegmentResponse;
|
|
24
24
|
|
|
@@ -31,15 +31,14 @@ export class Segment<StreamChatGenerics extends ExtendableGenerics = DefaultGene
|
|
|
31
31
|
|
|
32
32
|
async create() {
|
|
33
33
|
const body = {
|
|
34
|
-
id: this.id,
|
|
35
|
-
type: this.type,
|
|
36
34
|
name: this.data?.name,
|
|
37
35
|
filter: this.data?.filter,
|
|
38
36
|
description: this.data?.description,
|
|
37
|
+
all_sender_channels: this.data?.all_sender_channels,
|
|
39
38
|
all_users: this.data?.all_users,
|
|
40
39
|
};
|
|
41
40
|
|
|
42
|
-
return this.client.
|
|
41
|
+
return this.client.createSegment(this.type, this.id, body);
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
verifySegmentId() {
|
package/src/types.ts
CHANGED
|
@@ -506,7 +506,7 @@ export type ThreadResponse<StreamChatGenerics extends ExtendableGenerics = Defau
|
|
|
506
506
|
// TODO: Figure out a way to strongly type set and unset.
|
|
507
507
|
export type PartialThreadUpdate = {
|
|
508
508
|
set?: Partial<Record<string, unknown>>;
|
|
509
|
-
unset?:
|
|
509
|
+
unset?: Array<string>;
|
|
510
510
|
};
|
|
511
511
|
|
|
512
512
|
export type QueryThreadsOptions = {
|
|
@@ -962,9 +962,10 @@ export type MarkReadOptions<StreamChatGenerics extends ExtendableGenerics = Defa
|
|
|
962
962
|
};
|
|
963
963
|
|
|
964
964
|
export type MarkUnreadOptions<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> = {
|
|
965
|
-
message_id: string;
|
|
966
965
|
client_id?: string;
|
|
967
966
|
connection_id?: string;
|
|
967
|
+
message_id?: string;
|
|
968
|
+
thread_id?: string;
|
|
968
969
|
user?: UserResponse<StreamChatGenerics>;
|
|
969
970
|
user_id?: string;
|
|
970
971
|
};
|
|
@@ -2498,6 +2499,7 @@ export type DeleteUserOptions = {
|
|
|
2498
2499
|
export type SegmentType = 'channel' | 'user';
|
|
2499
2500
|
|
|
2500
2501
|
export type SegmentData = {
|
|
2502
|
+
all_sender_channels?: boolean;
|
|
2501
2503
|
all_users?: boolean;
|
|
2502
2504
|
description?: string;
|
|
2503
2505
|
filter?: {};
|
|
@@ -2546,18 +2548,12 @@ export type QuerySegmentTargetsFilter = {
|
|
|
2546
2548
|
$lte?: string;
|
|
2547
2549
|
};
|
|
2548
2550
|
};
|
|
2549
|
-
export type QuerySegmentTargetsSort = {};
|
|
2550
2551
|
export type QuerySegmentTargetsOptions = Pick<Pager, 'next' | 'limit'>;
|
|
2551
|
-
export type CampaignSortField = {
|
|
2552
|
-
field: string;
|
|
2553
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2554
|
-
value: any;
|
|
2555
|
-
};
|
|
2556
2552
|
|
|
2557
2553
|
export type CampaignSort = {
|
|
2558
|
-
|
|
2559
|
-
direction?:
|
|
2560
|
-
};
|
|
2554
|
+
field: string;
|
|
2555
|
+
direction?: number;
|
|
2556
|
+
}[];
|
|
2561
2557
|
|
|
2562
2558
|
export type CampaignQueryOptions = {
|
|
2563
2559
|
limit?: number;
|