@stream-io/feeds-client 0.3.6 → 0.3.7
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/CHANGELOG.md +7 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-bindings.js +1 -1
- package/dist/es/index.mjs +2 -2
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/react-bindings.mjs +1 -1
- package/dist/{feeds-client-Cd2LsXp-.mjs → feeds-client-3aXF89xy.mjs} +83 -2
- package/dist/feeds-client-3aXF89xy.mjs.map +1 -0
- package/dist/{feeds-client-47vliZx_.js → feeds-client-DLiLkrA0.js} +83 -2
- package/dist/feeds-client-DLiLkrA0.js.map +1 -0
- package/dist/types/feed/event-handlers/activity-updater.d.ts +1 -0
- package/dist/types/feed/event-handlers/activity-updater.d.ts.map +1 -1
- package/dist/types/gen/feeds/FeedsApi.d.ts +9 -1
- package/dist/types/gen/feeds/FeedsApi.d.ts.map +1 -1
- package/dist/types/gen/models/index.d.ts +52 -0
- package/dist/types/gen/models/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/gen/feeds/FeedsApi.ts +86 -0
- package/src/gen/model-decoders/decoders.ts +41 -0
- package/src/gen/models/index.ts +84 -0
- package/dist/feeds-client-47vliZx_.js.map +0 -1
- package/dist/feeds-client-Cd2LsXp-.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import require$$0, { useCallback, useMemo, useState, useEffect, createContext, useContext, useRef } from "react";
|
|
2
2
|
import "@stream-io/state-store";
|
|
3
|
-
import { F as FeedsClient, g as isCommentResponse, c as checkHasAnotherPage } from "../feeds-client-
|
|
3
|
+
import { F as FeedsClient, g as isCommentResponse, c as checkHasAnotherPage } from "../feeds-client-3aXF89xy.mjs";
|
|
4
4
|
import "axios";
|
|
5
5
|
var shim = { exports: {} };
|
|
6
6
|
var useSyncExternalStoreShim_production = {};
|
|
@@ -136,6 +136,7 @@ decoders.ActivityResponse = (input) => {
|
|
|
136
136
|
mentioned_users: { type: "UserResponse", isSingle: false },
|
|
137
137
|
own_bookmarks: { type: "BookmarkResponse", isSingle: false },
|
|
138
138
|
own_reactions: { type: "FeedsReactionResponse", isSingle: false },
|
|
139
|
+
collections: { type: "EnrichedCollectionResponse", isSingle: false },
|
|
139
140
|
reaction_groups: { type: "ReactionGroupResponse", isSingle: false },
|
|
140
141
|
user: { type: "UserResponse", isSingle: true },
|
|
141
142
|
deleted_at: { type: "DatetimeType", isSingle: true },
|
|
@@ -430,6 +431,13 @@ decoders.ChannelResponse = (input) => {
|
|
|
430
431
|
};
|
|
431
432
|
return decode(typeMappings, input);
|
|
432
433
|
};
|
|
434
|
+
decoders.CollectionResponse = (input) => {
|
|
435
|
+
const typeMappings = {
|
|
436
|
+
created_at: { type: "DatetimeType", isSingle: true },
|
|
437
|
+
updated_at: { type: "DatetimeType", isSingle: true }
|
|
438
|
+
};
|
|
439
|
+
return decode(typeMappings, input);
|
|
440
|
+
};
|
|
433
441
|
decoders.Command = (input) => {
|
|
434
442
|
const typeMappings = {
|
|
435
443
|
created_at: { type: "DatetimeType", isSingle: true },
|
|
@@ -517,6 +525,12 @@ decoders.CreateBlockListResponse = (input) => {
|
|
|
517
525
|
};
|
|
518
526
|
return decode(typeMappings, input);
|
|
519
527
|
};
|
|
528
|
+
decoders.CreateCollectionsResponse = (input) => {
|
|
529
|
+
const typeMappings = {
|
|
530
|
+
collections: { type: "CollectionResponse", isSingle: false }
|
|
531
|
+
};
|
|
532
|
+
return decode(typeMappings, input);
|
|
533
|
+
};
|
|
520
534
|
decoders.CreateFeedsBatchResponse = (input) => {
|
|
521
535
|
const typeMappings = {
|
|
522
536
|
feeds: { type: "FeedResponse", isSingle: false }
|
|
@@ -590,6 +604,13 @@ decoders.EgressRTMPResponse = (input) => {
|
|
|
590
604
|
};
|
|
591
605
|
return decode(typeMappings, input);
|
|
592
606
|
};
|
|
607
|
+
decoders.EnrichedCollectionResponse = (input) => {
|
|
608
|
+
const typeMappings = {
|
|
609
|
+
created_at: { type: "DatetimeType", isSingle: true },
|
|
610
|
+
updated_at: { type: "DatetimeType", isSingle: true }
|
|
611
|
+
};
|
|
612
|
+
return decode(typeMappings, input);
|
|
613
|
+
};
|
|
593
614
|
decoders.EntityCreatorResponse = (input) => {
|
|
594
615
|
const typeMappings = {
|
|
595
616
|
created_at: { type: "DatetimeType", isSingle: true },
|
|
@@ -1195,6 +1216,12 @@ decoders.ReactionResponse = (input) => {
|
|
|
1195
1216
|
};
|
|
1196
1217
|
return decode(typeMappings, input);
|
|
1197
1218
|
};
|
|
1219
|
+
decoders.ReadCollectionsResponse = (input) => {
|
|
1220
|
+
const typeMappings = {
|
|
1221
|
+
collections: { type: "CollectionResponse", isSingle: false }
|
|
1222
|
+
};
|
|
1223
|
+
return decode(typeMappings, input);
|
|
1224
|
+
};
|
|
1198
1225
|
decoders.RejectFeedMemberInviteResponse = (input) => {
|
|
1199
1226
|
const typeMappings = {
|
|
1200
1227
|
member: { type: "FeedMemberResponse", isSingle: true }
|
|
@@ -1357,6 +1384,12 @@ decoders.UpdateBookmarkResponse = (input) => {
|
|
|
1357
1384
|
};
|
|
1358
1385
|
return decode(typeMappings, input);
|
|
1359
1386
|
};
|
|
1387
|
+
decoders.UpdateCollectionsResponse = (input) => {
|
|
1388
|
+
const typeMappings = {
|
|
1389
|
+
collections: { type: "CollectionResponse", isSingle: false }
|
|
1390
|
+
};
|
|
1391
|
+
return decode(typeMappings, input);
|
|
1392
|
+
};
|
|
1360
1393
|
decoders.UpdateCommentResponse = (input) => {
|
|
1361
1394
|
const typeMappings = {
|
|
1362
1395
|
comment: { type: "CommentResponse", isSingle: true }
|
|
@@ -1611,6 +1644,7 @@ class FeedsApi {
|
|
|
1611
1644
|
visibility: request?.visibility,
|
|
1612
1645
|
visibility_tag: request?.visibility_tag,
|
|
1613
1646
|
attachments: request?.attachments,
|
|
1647
|
+
collection_refs: request?.collection_refs,
|
|
1614
1648
|
filter_tags: request?.filter_tags,
|
|
1615
1649
|
interest_tags: request?.interest_tags,
|
|
1616
1650
|
mentioned_user_ids: request?.mentioned_user_ids,
|
|
@@ -1900,6 +1934,7 @@ class FeedsApi {
|
|
|
1900
1934
|
text: request?.text,
|
|
1901
1935
|
visibility: request?.visibility,
|
|
1902
1936
|
attachments: request?.attachments,
|
|
1937
|
+
collection_refs: request?.collection_refs,
|
|
1903
1938
|
feeds: request?.feeds,
|
|
1904
1939
|
filter_tags: request?.filter_tags,
|
|
1905
1940
|
interest_tags: request?.interest_tags,
|
|
@@ -1987,6 +2022,52 @@ class FeedsApi {
|
|
|
1987
2022
|
decoders.QueryBookmarksResponse?.(response.body);
|
|
1988
2023
|
return { ...response.body, metadata: response.metadata };
|
|
1989
2024
|
}
|
|
2025
|
+
async deleteCollections(request) {
|
|
2026
|
+
const queryParams = {
|
|
2027
|
+
collection_refs: request?.collection_refs
|
|
2028
|
+
};
|
|
2029
|
+
const response = await this.apiClient.sendRequest("DELETE", "/api/v2/feeds/collections", void 0, queryParams);
|
|
2030
|
+
decoders.DeleteCollectionsResponse?.(response.body);
|
|
2031
|
+
return { ...response.body, metadata: response.metadata };
|
|
2032
|
+
}
|
|
2033
|
+
async readCollections(request) {
|
|
2034
|
+
const queryParams = {
|
|
2035
|
+
collection_refs: request?.collection_refs
|
|
2036
|
+
};
|
|
2037
|
+
const response = await this.apiClient.sendRequest("GET", "/api/v2/feeds/collections", void 0, queryParams);
|
|
2038
|
+
decoders.ReadCollectionsResponse?.(response.body);
|
|
2039
|
+
return { ...response.body, metadata: response.metadata };
|
|
2040
|
+
}
|
|
2041
|
+
async updateCollections(request) {
|
|
2042
|
+
const body = {
|
|
2043
|
+
collections: request?.collections
|
|
2044
|
+
};
|
|
2045
|
+
const response = await this.apiClient.sendRequest(
|
|
2046
|
+
"PATCH",
|
|
2047
|
+
"/api/v2/feeds/collections",
|
|
2048
|
+
void 0,
|
|
2049
|
+
void 0,
|
|
2050
|
+
body,
|
|
2051
|
+
"application/json"
|
|
2052
|
+
);
|
|
2053
|
+
decoders.UpdateCollectionsResponse?.(response.body);
|
|
2054
|
+
return { ...response.body, metadata: response.metadata };
|
|
2055
|
+
}
|
|
2056
|
+
async createCollections(request) {
|
|
2057
|
+
const body = {
|
|
2058
|
+
collections: request?.collections
|
|
2059
|
+
};
|
|
2060
|
+
const response = await this.apiClient.sendRequest(
|
|
2061
|
+
"POST",
|
|
2062
|
+
"/api/v2/feeds/collections",
|
|
2063
|
+
void 0,
|
|
2064
|
+
void 0,
|
|
2065
|
+
body,
|
|
2066
|
+
"application/json"
|
|
2067
|
+
);
|
|
2068
|
+
decoders.CreateCollectionsResponse?.(response.body);
|
|
2069
|
+
return { ...response.body, metadata: response.metadata };
|
|
2070
|
+
}
|
|
1990
2071
|
async getComments(request) {
|
|
1991
2072
|
const queryParams = {
|
|
1992
2073
|
object_id: request?.object_id,
|
|
@@ -3763,7 +3844,7 @@ const getRateLimitFromResponseHeader = (response_headers) => {
|
|
|
3763
3844
|
};
|
|
3764
3845
|
return result;
|
|
3765
3846
|
};
|
|
3766
|
-
const version = "0.3.
|
|
3847
|
+
const version = "0.3.7";
|
|
3767
3848
|
class ApiClient {
|
|
3768
3849
|
constructor(apiKey, tokenManager, connectionIdManager, options) {
|
|
3769
3850
|
this.apiKey = apiKey;
|
|
@@ -7339,4 +7420,4 @@ export {
|
|
|
7339
7420
|
shouldUpdateState as s,
|
|
7340
7421
|
uniqueArrayMerge as u
|
|
7341
7422
|
};
|
|
7342
|
-
//# sourceMappingURL=feeds-client-
|
|
7423
|
+
//# sourceMappingURL=feeds-client-3aXF89xy.mjs.map
|