@stream-io/node-sdk 0.7.57 → 0.7.58
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/index.cjs.js +43 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +43 -1
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/feeds/FeedsApi.d.ts +3 -1
- package/dist/src/gen/models/index.d.ts +42 -0
- package/package.json +1 -1
- package/src/gen/feeds/FeedsApi.ts +63 -0
- package/src/gen/model-decoders/decoders.ts +14 -0
- package/src/gen/models/index.ts +54 -0
package/dist/index.es.mjs
CHANGED
|
@@ -2238,6 +2238,18 @@ decoders.GetOrCreateFeedViewResponse = (input) => {
|
|
|
2238
2238
|
};
|
|
2239
2239
|
return decode(typeMappings, input);
|
|
2240
2240
|
};
|
|
2241
|
+
decoders.GetOrCreateFollowResponse = (input) => {
|
|
2242
|
+
const typeMappings = {
|
|
2243
|
+
follow: { type: 'FollowResponse', isSingle: true },
|
|
2244
|
+
};
|
|
2245
|
+
return decode(typeMappings, input);
|
|
2246
|
+
};
|
|
2247
|
+
decoders.GetOrCreateUnfollowResponse = (input) => {
|
|
2248
|
+
const typeMappings = {
|
|
2249
|
+
follow: { type: 'FollowResponse', isSingle: true },
|
|
2250
|
+
};
|
|
2251
|
+
return decode(typeMappings, input);
|
|
2252
|
+
};
|
|
2241
2253
|
decoders.GetPushTemplatesResponse = (input) => {
|
|
2242
2254
|
const typeMappings = {
|
|
2243
2255
|
templates: { type: 'PushTemplateResponse', isSingle: false },
|
|
@@ -8127,7 +8139,7 @@ class ApiClient {
|
|
|
8127
8139
|
const headers = {
|
|
8128
8140
|
Authorization: this.apiConfig.token,
|
|
8129
8141
|
'stream-auth-type': 'jwt',
|
|
8130
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
8142
|
+
'X-Stream-Client': 'stream-node-' + "0.7.58",
|
|
8131
8143
|
'Accept-Encoding': 'gzip',
|
|
8132
8144
|
'x-client-request-id': clientRequestId,
|
|
8133
8145
|
};
|
|
@@ -9399,6 +9411,24 @@ class FeedsApi {
|
|
|
9399
9411
|
decoders.RejectFollowResponse?.(response.body);
|
|
9400
9412
|
return { ...response.body, metadata: response.metadata };
|
|
9401
9413
|
}
|
|
9414
|
+
async getOrCreateFollow(request) {
|
|
9415
|
+
const body = {
|
|
9416
|
+
source: request?.source,
|
|
9417
|
+
target: request?.target,
|
|
9418
|
+
activity_copy_limit: request?.activity_copy_limit,
|
|
9419
|
+
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
9420
|
+
create_notification_activity: request?.create_notification_activity,
|
|
9421
|
+
create_users: request?.create_users,
|
|
9422
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
9423
|
+
push_preference: request?.push_preference,
|
|
9424
|
+
skip_push: request?.skip_push,
|
|
9425
|
+
status: request?.status,
|
|
9426
|
+
custom: request?.custom,
|
|
9427
|
+
};
|
|
9428
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/follows/upsert', undefined, undefined, body, 'application/json');
|
|
9429
|
+
decoders.GetOrCreateFollowResponse?.(response.body);
|
|
9430
|
+
return { ...response.body, metadata: response.metadata };
|
|
9431
|
+
}
|
|
9402
9432
|
async unfollow(request) {
|
|
9403
9433
|
const queryParams = {
|
|
9404
9434
|
delete_notification_activity: request?.delete_notification_activity,
|
|
@@ -9502,6 +9532,18 @@ class FeedsApi {
|
|
|
9502
9532
|
decoders.UnfollowBatchResponse?.(response.body);
|
|
9503
9533
|
return { ...response.body, metadata: response.metadata };
|
|
9504
9534
|
}
|
|
9535
|
+
async getOrCreateUnfollow(request) {
|
|
9536
|
+
const body = {
|
|
9537
|
+
source: request?.source,
|
|
9538
|
+
target: request?.target,
|
|
9539
|
+
delete_notification_activity: request?.delete_notification_activity,
|
|
9540
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
9541
|
+
keep_history: request?.keep_history,
|
|
9542
|
+
};
|
|
9543
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/unfollow/upsert', undefined, undefined, body, 'application/json');
|
|
9544
|
+
decoders.GetOrCreateUnfollowResponse?.(response.body);
|
|
9545
|
+
return { ...response.body, metadata: response.metadata };
|
|
9546
|
+
}
|
|
9505
9547
|
async deleteFeedUserData(request) {
|
|
9506
9548
|
const pathParams = {
|
|
9507
9549
|
user_id: request?.user_id,
|