Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

getstream

Package Overview
Dependencies
Maintainers
12
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

getstream - npm Package Compare versions

Comparing version 7.2.9 to 7.2.10

18

lib/client.d.ts

@@ -12,5 +12,5 @@ /// <reference path="../types/modules.d.ts" />

import { StreamReaction } from './reaction';
import { EnrichedUser, StreamUser } from './user';
import { StreamUser } from './user';
import { FollowRelation, UnfollowRelation } from './batch_operations';
import { StreamFeed, UpdateActivity, Activity, EnrichOptions, PersonalizationFeedAPIResponse, GetActivitiesAPIResponse, GetFeedOptions } from './feed';
import { StreamFeed, UpdateActivity, Activity, EnrichOptions, PersonalizationFeedAPIResponse, GetActivitiesAPIResponse, GetFeedOptions, EnrichedActivity } from './feed';
export declare type UR = Record<string, unknown>;

@@ -96,7 +96,7 @@ export declare type UnknownRecord = UR;

};
export declare type RealTimeMessage<UserType extends UR = UR, ActivityType extends UR = UR> = {
export declare type RealTimeMessage<UserType extends UR = UR, ActivityType extends UR = UR, CollectionType extends UR = UR, ReactionType extends UR = UR> = {
deleted: Array<string>;
deleted_foreign_ids: Array<[id: string, time: string]>;
new: Array<Omit<Activity<ActivityType>, 'actor'> & {
actor: string | EnrichedUser<UserType>;
new: Array<Omit<EnrichedActivity<UserType, ActivityType, CollectionType, ReactionType>, 'latest_reactions' | 'latest_reactions_extra' | 'own_reactions' | 'own_reactions_extra' | 'reaction_counts'> & {
group?: string;
}>;

@@ -130,3 +130,3 @@ app_id?: string;

location: string;
fayeClient: Faye.Client<RealTimeMessage<UserType, ActivityType>> | null;
fayeClient: Faye.Client<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>> | null;
browser: boolean;

@@ -296,4 +296,4 @@ node: boolean;

getFayeAuthorization(): {
incoming: (message: Faye.Message<RealTimeMessage<UserType, ActivityType>>, callback: Faye.Callback<RealTimeMessage<UserType, ActivityType>>) => unknown;
outgoing: (message: Faye.Message<RealTimeMessage<UserType, ActivityType>>, callback: Faye.Callback<RealTimeMessage<UserType, ActivityType>>) => void;
incoming: (message: Faye.Message<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>, callback: Faye.Callback<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>) => unknown;
outgoing: (message: Faye.Message<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>, callback: Faye.Callback<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>) => void;
};

@@ -308,3 +308,3 @@ /**

*/
getFayeClient(timeout?: number): Faye.Client<RealTimeMessage<UserType, ActivityType>>;
getFayeClient(timeout?: number): Faye.Client<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>;
handleResponse: <T>(response: axios.AxiosResponse<T>) => T;

@@ -311,0 +311,0 @@ doAxiosRequest: <T>(method: axios.Method, options: AxiosConfig) => Promise<T>;

@@ -310,3 +310,3 @@ /// <reference path="../types/modules.d.ts" />

*/
getFayeClient(): Faye.Client<RealTimeMessage<UserType, ActivityType>>;
getFayeClient(): Faye.Client<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>;
/**

@@ -317,3 +317,3 @@ * Subscribes to any changes in the feed, return a promise

* @memberof StreamFeed.prototype
* @param {function} Faye.Callback<RealTimeMessage<UserType, ActivityType>> Callback to call on completion
* @param {function} Faye.Callback<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>> Callback to call on completion
* @return {Promise<Faye.Subscription>}

@@ -325,3 +325,3 @@ * @example

*/
subscribe(callback: Faye.SubscribeCallback<RealTimeMessage<UserType, ActivityType>>): Promise<Faye.Subscription>;
subscribe(callback: Faye.SubscribeCallback<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>): Promise<Faye.Subscription>;
/**

@@ -328,0 +328,0 @@ * Cancel updates created via feed.subscribe()

@@ -371,3 +371,3 @@ "use strict";

* @memberof StreamFeed.prototype
* @param {function} Faye.Callback<RealTimeMessage<UserType, ActivityType>> Callback to call on completion
* @param {function} Faye.Callback<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>> Callback to call on completion
* @return {Promise<Faye.Subscription>}

@@ -374,0 +374,0 @@ * @example

@@ -14,3 +14,3 @@ {

"license": "BSD-3-Clause",
"version": "7.2.9",
"version": "7.2.10",
"scripts": {

@@ -17,0 +17,0 @@ "transpile": "babel src --out-dir lib --extensions '.ts'",

@@ -14,3 +14,3 @@ /// <reference path="../types/modules.d.ts" />

import { StreamReaction } from './reaction';
import { EnrichedUser, StreamUser } from './user';
import { StreamUser } from './user';
import { JWTScopeToken, JWTUserSessionToken } from './signing';

@@ -29,2 +29,3 @@ import { FeedError, StreamApiError, SiteError } from './errors';

GetFeedOptions,
EnrichedActivity,
} from './feed';

@@ -119,6 +120,16 @@

export type RealTimeMessage<UserType extends UR = UR, ActivityType extends UR = UR> = {
export type RealTimeMessage<
UserType extends UR = UR,
ActivityType extends UR = UR,
CollectionType extends UR = UR,
ReactionType extends UR = UR
> = {
deleted: Array<string>;
deleted_foreign_ids: Array<[id: string, time: string]>;
new: Array<Omit<Activity<ActivityType>, 'actor'> & { actor: string | EnrichedUser<UserType> }>;
new: Array<
Omit<
EnrichedActivity<UserType, ActivityType, CollectionType, ReactionType>,
'latest_reactions' | 'latest_reactions_extra' | 'own_reactions' | 'own_reactions_extra' | 'reaction_counts'
> & { group?: string }
>;
app_id?: string;

@@ -159,3 +170,3 @@ feed?: string;

location: string;
fayeClient: Faye.Client<RealTimeMessage<UserType, ActivityType>> | null;
fayeClient: Faye.Client<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>> | null;
browser: boolean;

@@ -617,8 +628,8 @@ node: boolean;

incoming: (
message: Faye.Message<RealTimeMessage<UserType, ActivityType>>,
callback: Faye.Callback<RealTimeMessage<UserType, ActivityType>>,
message: Faye.Message<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>,
callback: Faye.Callback<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>,
) => callback(message),
outgoing: (
message: Faye.Message<RealTimeMessage<UserType, ActivityType>>,
callback: Faye.Callback<RealTimeMessage<UserType, ActivityType>>,
message: Faye.Message<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>,
callback: Faye.Callback<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>,
) => {

@@ -650,3 +661,6 @@ if (message.subscription && this.subscriptions[message.subscription]) {

if (this.fayeClient === null) {
this.fayeClient = new Faye.Client<RealTimeMessage<UserType, ActivityType>>(this.fayeUrl, { timeout });
this.fayeClient = new Faye.Client<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>(
this.fayeUrl,
{ timeout },
);
const authExtension = this.getFayeAuthorization();

@@ -653,0 +667,0 @@ this.fayeClient.addExtension(authExtension);

@@ -550,3 +550,3 @@ /// <reference path="../types/modules.d.ts" />

* @memberof StreamFeed.prototype
* @param {function} Faye.Callback<RealTimeMessage<UserType, ActivityType>> Callback to call on completion
* @param {function} Faye.Callback<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>> Callback to call on completion
* @return {Promise<Faye.Subscription>}

@@ -558,3 +558,3 @@ * @example

*/
subscribe(callback: Faye.SubscribeCallback<RealTimeMessage<UserType, ActivityType>>) {
subscribe(callback: Faye.SubscribeCallback<RealTimeMessage<UserType, ActivityType, CollectionType, ReactionType>>) {
if (!this.client.appId) {

@@ -561,0 +561,0 @@ throw new SiteError(

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc