@openpeepshq/client 0.4.0 → 0.6.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.
@@ -1083,7 +1083,7 @@ export declare const jams: (rawClient: FetchClient, eventSource: ReturnType<type
1083
1083
  repostCount: number;
1084
1084
  replyCount: number;
1085
1085
  reactions: {
1086
- reaction: "👍";
1086
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
1087
1087
  profile: {
1088
1088
  id: string;
1089
1089
  type: "guest" | "local" | "federated";
@@ -7148,7 +7148,7 @@ export declare const jams: (rawClient: FetchClient, eventSource: ReturnType<type
7148
7148
  repostCount: number;
7149
7149
  replyCount: number;
7150
7150
  reactions: {
7151
- reaction: "👍";
7151
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
7152
7152
  profile: {
7153
7153
  id: string;
7154
7154
  type: "guest" | "local" | "federated";
@@ -10988,6 +10988,7 @@ export declare const jams: (rawClient: FetchClient, eventSource: ReturnType<type
10988
10988
  state: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
10989
10989
  active: boolean;
10990
10990
  participants: string[];
10991
+ observers?: number | undefined;
10991
10992
  }, {
10992
10993
  success: boolean;
10993
10994
  message?: string | undefined;
@@ -103,6 +103,8 @@ type Mutators = {
103
103
  }>;
104
104
  retractReaction: OpenpeepsNoPayloadEndpoint<SuccessResponse, {
105
105
  id: string;
106
+ }, {
107
+ reaction?: string;
106
108
  }>;
107
109
  bookmark: OpenpeepsNoPayloadEndpoint<SuccessResponse, {
108
110
  id: string;
@@ -1,5 +1,5 @@
1
1
  import type { FetchClient, noPayloadEventSource } from '@openpeepshq/fetch-client';
2
- import type { AccessTokenWithMeta, ChronologicalInfiniteQueryParams, ProfileWithMeta, ProfileSettings, PublicAccessToken, SessionPlatform, Hashtag } from '@openpeepshq/common';
2
+ import type { AccessTokenWithMeta, NotificationFeedExcludeTypesQuery, ProfileWithMeta, ProfileSettings, PublicAccessToken, SessionPlatform, Hashtag } from '@openpeepshq/common';
3
3
  export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<typeof noPayloadEventSource>) => {
4
4
  current: {
5
5
  read: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<ProfileWithMeta, {
@@ -1222,7 +1222,7 @@ export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<
1222
1222
  repostCount: number;
1223
1223
  replyCount: number;
1224
1224
  reactions: {
1225
- reaction: "👍";
1225
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
1226
1226
  profile: {
1227
1227
  id: string;
1228
1228
  type: "guest" | "local" | "federated";
@@ -7287,7 +7287,7 @@ export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<
7287
7287
  repostCount: number;
7288
7288
  replyCount: number;
7289
7289
  reactions: {
7290
- reaction: "👍";
7290
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
7291
7291
  profile: {
7292
7292
  id: string;
7293
7293
  type: "guest" | "local" | "federated";
@@ -11123,7 +11123,13 @@ export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<
11123
11123
  success: boolean;
11124
11124
  message?: string | undefined;
11125
11125
  key?: string | undefined;
11126
- }, undefined, ChronologicalInfiniteQueryParams>;
11126
+ }, undefined, {
11127
+ start?: string | undefined;
11128
+ limit?: number | undefined;
11129
+ format?: "threaded" | "linear" | undefined;
11130
+ groupId?: string | undefined;
11131
+ ungrouped?: "true" | undefined;
11132
+ } & NotificationFeedExcludeTypesQuery>;
11127
11133
  notificationStats: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
11128
11134
  unread: number;
11129
11135
  unseen: number;
@@ -12223,7 +12229,7 @@ export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<
12223
12229
  repostCount: number;
12224
12230
  replyCount: number;
12225
12231
  reactions: {
12226
- reaction: "👍";
12232
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
12227
12233
  profile: {
12228
12234
  id: string;
12229
12235
  type: "guest" | "local" | "federated";
@@ -18288,7 +18294,7 @@ export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<
18288
18294
  repostCount: number;
18289
18295
  replyCount: number;
18290
18296
  reactions: {
18291
- reaction: "👍";
18297
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
18292
18298
  profile: {
18293
18299
  id: string;
18294
18300
  type: "guest" | "local" | "federated";
@@ -22134,7 +22140,7 @@ export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<
22134
22140
  success: boolean;
22135
22141
  message?: string | undefined;
22136
22142
  key?: string | undefined;
22137
- }, undefined, undefined>;
22143
+ }, undefined, NotificationFeedExcludeTypesQuery>;
22138
22144
  readSettings: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<ProfileSettings, {
22139
22145
  success: boolean;
22140
22146
  message?: string | undefined;
@@ -22155,6 +22161,7 @@ export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<
22155
22161
  push: boolean;
22156
22162
  email: boolean;
22157
22163
  }> | undefined;
22164
+ hiddenNotificationTypes?: string[] | undefined;
22158
22165
  groupNotificationLevels?: Record<string, "all" | "mostRelevant" | "off"> | undefined;
22159
22166
  jamSettings?: {
22160
22167
  backgroundObfuscation?: {
@@ -23804,7 +23811,7 @@ export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<
23804
23811
  repostCount: number;
23805
23812
  replyCount: number;
23806
23813
  reactions: {
23807
- reaction: "👍";
23814
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
23808
23815
  profile: {
23809
23816
  id: string;
23810
23817
  type: "guest" | "local" | "federated";
@@ -29870,7 +29877,7 @@ export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<
29870
29877
  repostCount: number;
29871
29878
  replyCount: number;
29872
29879
  reactions: {
29873
- reaction: "👍";
29880
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
29874
29881
  profile: {
29875
29882
  id: string;
29876
29883
  type: "guest" | "local" | "federated";
@@ -1079,7 +1079,7 @@ export declare const search: (rawClient: FetchClient) => {
1079
1079
  repostCount: number;
1080
1080
  replyCount: number;
1081
1081
  reactions: {
1082
- reaction: "👍";
1082
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
1083
1083
  profile: {
1084
1084
  id: string;
1085
1085
  type: "guest" | "local" | "federated";
@@ -7144,7 +7144,7 @@ export declare const search: (rawClient: FetchClient) => {
7144
7144
  repostCount: number;
7145
7145
  replyCount: number;
7146
7146
  reactions: {
7147
- reaction: "👍";
7147
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
7148
7148
  profile: {
7149
7149
  id: string;
7150
7150
  type: "guest" | "local" | "federated";
@@ -12129,7 +12129,7 @@ export declare const search: (rawClient: FetchClient) => {
12129
12129
  repostCount: number;
12130
12130
  replyCount: number;
12131
12131
  reactions: {
12132
- reaction: "👍";
12132
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
12133
12133
  profile: {
12134
12134
  id: string;
12135
12135
  type: "guest" | "local" | "federated";
@@ -18194,7 +18194,7 @@ export declare const search: (rawClient: FetchClient) => {
18194
18194
  repostCount: number;
18195
18195
  replyCount: number;
18196
18196
  reactions: {
18197
- reaction: "👍";
18197
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
18198
18198
  profile: {
18199
18199
  id: string;
18200
18200
  type: "guest" | "local" | "federated";
@@ -23112,7 +23112,7 @@ export declare const search: (rawClient: FetchClient) => {
23112
23112
  repostCount: number;
23113
23113
  replyCount: number;
23114
23114
  reactions: {
23115
- reaction: "👍";
23115
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
23116
23116
  profile: {
23117
23117
  id: string;
23118
23118
  type: "guest" | "local" | "federated";
@@ -29177,7 +29177,7 @@ export declare const search: (rawClient: FetchClient) => {
29177
29177
  repostCount: number;
29178
29178
  replyCount: number;
29179
29179
  reactions: {
29180
- reaction: "👍";
29180
+ reaction: "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🎉";
29181
29181
  profile: {
29182
29182
  id: string;
29183
29183
  type: "guest" | "local" | "federated";
@@ -63,6 +63,7 @@ export declare const server: (rawClient: FetchClient) => {
63
63
  codeOfConduct?: string | undefined;
64
64
  welcomeEmail?: string | undefined;
65
65
  pinnedPost?: string | undefined;
66
+ autoFollow?: string[] | undefined;
66
67
  };
67
68
  settings: {
68
69
  openRegistrations: boolean;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openpeepshq/client",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "dependencies": {
8
- "@openpeepshq/fetch-client": "^0.2.1",
9
- "@openpeepshq/common": "^0.8.0"
8
+ "@openpeepshq/common": "^0.11.0",
9
+ "@openpeepshq/fetch-client": "^0.2.1"
10
10
  },
11
11
  "main": "./dist/index.js",
12
12
  "types": "./dist/index.d.ts",
@@ -330,7 +330,11 @@ type Mutators = {
330
330
  ReactionData,
331
331
  { id: string }
332
332
  >;
333
- retractReaction: OpenpeepsNoPayloadEndpoint<SuccessResponse, { id: string }>;
333
+ retractReaction: OpenpeepsNoPayloadEndpoint<
334
+ SuccessResponse,
335
+ { id: string },
336
+ { reaction?: string }
337
+ >;
334
338
  bookmark: OpenpeepsNoPayloadEndpoint<SuccessResponse, { id: string }>;
335
339
  unbookmark: OpenpeepsNoPayloadEndpoint<SuccessResponse, { id: string }>;
336
340
  seen: OpenpeepsPayloadEndpoint<SuccessResponse, PostsSeenRequest>;
@@ -368,11 +372,11 @@ const mutators = (rawClient: FetchClient): Mutators => ({
368
372
  rawClient,
369
373
  '/posts/:id/react',
370
374
  ),
371
- retractReaction: allpeepNoPayloadEndpoint<SuccessResponse, { id: string }>(
372
- rawClient,
373
- '/posts/:id/react',
374
- 'delete',
375
- ),
375
+ retractReaction: allpeepNoPayloadEndpoint<
376
+ SuccessResponse,
377
+ { id: string },
378
+ { reaction?: string }
379
+ >(rawClient, '/posts/:id/react', 'delete'),
376
380
  bookmark: allpeepNoPayloadEndpoint<SuccessResponse, { id: string }>(
377
381
  rawClient,
378
382
  '/posts/:id/bookmark',
@@ -7,7 +7,8 @@ import type {
7
7
  AccessTokenWithMeta,
8
8
  FollowData,
9
9
  GroupWithMeta,
10
- ChronologicalInfiniteQueryParams,
10
+ NotificationFeedQueryParams,
11
+ NotificationFeedExcludeTypesQuery,
11
12
  PublicPost,
12
13
  NotificationStats,
13
14
  ProfileData,
@@ -49,7 +50,7 @@ export const profiles = (
49
50
  notifications: allpeepNoPayloadEndpoint<
50
51
  PublicNotification[],
51
52
  undefined,
52
- ChronologicalInfiniteQueryParams
53
+ NotificationFeedQueryParams
53
54
  >(rawClient, '/profiles/current/notifications'),
54
55
  notificationStats: allpeepNoPayloadEndpoint<NotificationStats>(
55
56
  rawClient,
@@ -67,11 +68,11 @@ export const profiles = (
67
68
  rawClient,
68
69
  '/profiles/current/bookmarkedIds',
69
70
  ),
70
- markAllNotificationsAsSeen: allpeepNoPayloadEndpoint<SuccessResponse>(
71
- rawClient,
72
- '/profiles/current/notifications/mark-all-seen',
73
- 'put',
74
- ),
71
+ markAllNotificationsAsSeen: allpeepNoPayloadEndpoint<
72
+ SuccessResponse,
73
+ undefined,
74
+ NotificationFeedExcludeTypesQuery
75
+ >(rawClient, '/profiles/current/notifications/mark-all-seen', 'put'),
75
76
  readSettings: allpeepNoPayloadEndpoint<ProfileSettings>(
76
77
  rawClient,
77
78
  '/profiles/current/settings',