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

getstream

Package Overview
Dependencies
Maintainers
10
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.10 to 7.2.11

22

lib/feed.d.ts

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

};
declare type BaseActivity<ActivityType> = ActivityType & {
object: string | unknown;
declare type BaseActivity = {
verb: string;

@@ -70,16 +69,19 @@ target?: string;

};
export declare type NewActivity<ActivityType extends UR = UR> = BaseActivity<ActivityType> & {
export declare type NewActivity<ActivityType extends UR = UR> = ActivityType & BaseActivity & {
actor: string | StreamUser;
object: string | unknown;
foreign_id?: string;
time?: string;
};
export declare type UpdateActivity<ActivityType extends UR = UR> = BaseActivity<ActivityType> & {
export declare type UpdateActivity<ActivityType extends UR = UR> = ActivityType & BaseActivity & {
actor: string;
foreign_id: string;
object: string | unknown;
time: string;
};
export declare type Activity<ActivityType extends UR = UR> = BaseActivity<ActivityType> & {
export declare type Activity<ActivityType extends UR = UR> = ActivityType & BaseActivity & {
actor: string;
foreign_id: string;
id: string;
object: string | unknown;
time: string;

@@ -92,3 +94,3 @@ analytics?: Record<string, number>;

export declare type ReactionsRecords<ReactionType extends UR = UR, ChildReactionType extends UR = UR, UserType extends UR = UR> = Record<string, EnrichedReaction<ReactionType, ChildReactionType, UserType>[]>;
export declare type EnrichedActivity<UserType extends UR = UR, ActivityType extends UR = UR, CollectionType extends UR = UR, ReactionType extends UR = UR, ChildReactionType extends UR = UR> = Omit<Activity<ActivityType>, 'actor' | 'object'> & {
export declare type EnrichedActivity<UserType extends UR = UR, ActivityType extends UR = UR, CollectionType extends UR = UR, ReactionType extends UR = UR, ChildReactionType extends UR = UR> = ActivityType & BaseActivity & Pick<Activity, 'foreign_id' | 'id' | 'time' | 'analytics' | 'extra_context' | 'origin' | 'score'> & {
actor: EnrichedUser<UserType> | string;

@@ -342,11 +344,7 @@ object: string | unknown | EnrichedActivity<UserType, ActivityType, CollectionType, ReactionType, ChildReactionType> | EnrichedReaction<ReactionType, ChildReactionType, UserType> | CollectionResponse<CollectionType>;

*/
updateActivityToTargets(foreignId: string, time: string, newTargets?: string[], addedTargets?: string[], removedTargets?: string[]): Promise<APIResponse & ActivityType & {
object: unknown;
verb: string;
target?: string | undefined;
to?: string[] | undefined;
} & {
updateActivityToTargets(foreignId: string, time: string, newTargets?: string[], addedTargets?: string[], removedTargets?: string[]): Promise<APIResponse & ActivityType & BaseActivity & {
actor: string;
foreign_id: string;
id: string;
object: unknown;
time: string;

@@ -353,0 +351,0 @@ analytics?: Record<string, number> | undefined;

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

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

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

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

type BaseActivity<ActivityType> = ActivityType & {
object: string | unknown;
type BaseActivity = {
verb: string;

@@ -73,24 +72,31 @@ target?: string;

export type NewActivity<ActivityType extends UR = UR> = BaseActivity<ActivityType> & {
actor: string | StreamUser;
foreign_id?: string;
time?: string;
};
export type NewActivity<ActivityType extends UR = UR> = ActivityType &
BaseActivity & {
actor: string | StreamUser;
object: string | unknown;
foreign_id?: string;
time?: string;
};
export type UpdateActivity<ActivityType extends UR = UR> = BaseActivity<ActivityType> & {
actor: string;
foreign_id: string;
time: string;
};
export type UpdateActivity<ActivityType extends UR = UR> = ActivityType &
BaseActivity & {
actor: string;
foreign_id: string;
object: string | unknown;
time: string;
};
export type Activity<ActivityType extends UR = UR> = BaseActivity<ActivityType> & {
actor: string;
foreign_id: string;
id: string;
time: string;
analytics?: Record<string, number>; // ranked feeds only
extra_context?: UR;
origin?: string;
score?: number; // ranked feeds only
};
export type Activity<ActivityType extends UR = UR> = ActivityType &
BaseActivity & {
actor: string;
foreign_id: string;
id: string;
object: string | unknown;
time: string;
analytics?: Record<string, number>; // ranked feeds only
extra_context?: UR;
origin?: string;
score?: number; // ranked feeds only
// ** Add new fields to EnrichedActivity as well **
};

@@ -109,20 +115,22 @@ export type ReactionsRecords<

ChildReactionType extends UR = UR
> = Omit<Activity<ActivityType>, 'actor' | 'object'> & {
actor: EnrichedUser<UserType> | string;
// Object should be casted based on the verb
object:
| string
| unknown
| EnrichedActivity<UserType, ActivityType, CollectionType, ReactionType, ChildReactionType>
| EnrichedReaction<ReactionType, ChildReactionType, UserType>
| CollectionResponse<CollectionType>;
latest_reactions?: ReactionsRecords<ReactionType, ChildReactionType, UserType>;
latest_reactions_extra?: Record<string, { next?: string }>;
own_reactions?: ReactionsRecords<ReactionType, ChildReactionType, UserType>;
own_reactions_extra?: Record<string, { next?: string }>;
// Reaction posted to feed
reaction?: EnrichedReaction<ReactionType, ChildReactionType, UserType>;
// enriched reactions
reaction_counts?: Record<string, number>;
};
> = ActivityType &
BaseActivity &
Pick<Activity, 'foreign_id' | 'id' | 'time' | 'analytics' | 'extra_context' | 'origin' | 'score'> & {
actor: EnrichedUser<UserType> | string;
// Object should be casted based on the verb
object:
| string
| unknown
| EnrichedActivity<UserType, ActivityType, CollectionType, ReactionType, ChildReactionType>
| EnrichedReaction<ReactionType, ChildReactionType, UserType>
| CollectionResponse<CollectionType>;
latest_reactions?: ReactionsRecords<ReactionType, ChildReactionType, UserType>;
latest_reactions_extra?: Record<string, { next?: string }>;
own_reactions?: ReactionsRecords<ReactionType, ChildReactionType, UserType>;
own_reactions_extra?: Record<string, { next?: string }>;
// Reaction posted to feed
reaction?: EnrichedReaction<ReactionType, ChildReactionType, UserType>;
// enriched reactions
reaction_counts?: Record<string, number>;
};

@@ -129,0 +137,0 @@ export type FlatActivity<ActivityType extends UR = UR> = Activity<ActivityType>;

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

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