@openpeepshq/client 0.1.36 → 0.1.37
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/endpoints/admin.d.ts +57 -0
- package/dist/endpoints/admin.js +1 -0
- package/dist/endpoints/analytics.d.ts +15 -0
- package/dist/endpoints/analytics.js +4 -0
- package/dist/endpoints/profiles.d.ts +32 -3
- package/dist/endpoints/profiles.js +4 -1
- package/dist/endpoints/server.d.ts +8 -0
- package/dist/endpoints/types.d.ts +3 -0
- package/dist/index.js +3 -1
- package/package.json +3 -3
|
@@ -16946,6 +16946,36 @@ export declare const admin: (rawClient: FetchClient) => {
|
|
|
16946
16946
|
value: number;
|
|
16947
16947
|
}[] | undefined;
|
|
16948
16948
|
};
|
|
16949
|
+
dau: {
|
|
16950
|
+
key: string;
|
|
16951
|
+
value: number;
|
|
16952
|
+
previousValue: number;
|
|
16953
|
+
deltaPct: number | null;
|
|
16954
|
+
series?: {
|
|
16955
|
+
day: string;
|
|
16956
|
+
value: number;
|
|
16957
|
+
}[] | undefined;
|
|
16958
|
+
};
|
|
16959
|
+
mau: {
|
|
16960
|
+
key: string;
|
|
16961
|
+
value: number;
|
|
16962
|
+
previousValue: number;
|
|
16963
|
+
deltaPct: number | null;
|
|
16964
|
+
series?: {
|
|
16965
|
+
day: string;
|
|
16966
|
+
value: number;
|
|
16967
|
+
}[] | undefined;
|
|
16968
|
+
};
|
|
16969
|
+
dauMau: {
|
|
16970
|
+
key: string;
|
|
16971
|
+
value: number;
|
|
16972
|
+
previousValue: number;
|
|
16973
|
+
deltaPct: number | null;
|
|
16974
|
+
series?: {
|
|
16975
|
+
day: string;
|
|
16976
|
+
value: number;
|
|
16977
|
+
}[] | undefined;
|
|
16978
|
+
};
|
|
16949
16979
|
};
|
|
16950
16980
|
signupsByDay: {
|
|
16951
16981
|
day: string;
|
|
@@ -17055,6 +17085,7 @@ export declare const admin: (rawClient: FetchClient) => {
|
|
|
17055
17085
|
comments: number;
|
|
17056
17086
|
reposts: number;
|
|
17057
17087
|
bookmarks: number;
|
|
17088
|
+
dms: number;
|
|
17058
17089
|
}[];
|
|
17059
17090
|
impressionsByPeriod: {
|
|
17060
17091
|
day: string;
|
|
@@ -17157,6 +17188,32 @@ export declare const admin: (rawClient: FetchClient) => {
|
|
|
17157
17188
|
from?: string | undefined;
|
|
17158
17189
|
to?: string | undefined;
|
|
17159
17190
|
}>;
|
|
17191
|
+
clicks: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
17192
|
+
range: {
|
|
17193
|
+
from: string;
|
|
17194
|
+
to: string;
|
|
17195
|
+
previousFrom: string;
|
|
17196
|
+
previousTo: string;
|
|
17197
|
+
compiledAt: string | null;
|
|
17198
|
+
preset?: "all" | "7d" | "30d" | "3m" | "6m" | "12m" | undefined;
|
|
17199
|
+
};
|
|
17200
|
+
pages: {
|
|
17201
|
+
target: string;
|
|
17202
|
+
clicks: number;
|
|
17203
|
+
}[];
|
|
17204
|
+
links: {
|
|
17205
|
+
target: string;
|
|
17206
|
+
clicks: number;
|
|
17207
|
+
}[];
|
|
17208
|
+
}, {
|
|
17209
|
+
success: boolean;
|
|
17210
|
+
message?: string | undefined;
|
|
17211
|
+
key?: string | undefined;
|
|
17212
|
+
}, undefined, {
|
|
17213
|
+
preset?: "all" | "7d" | "30d" | "3m" | "6m" | "12m" | undefined;
|
|
17214
|
+
from?: string | undefined;
|
|
17215
|
+
to?: string | undefined;
|
|
17216
|
+
}>;
|
|
17160
17217
|
reportSettings: {
|
|
17161
17218
|
read: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
17162
17219
|
enabled: boolean;
|
package/dist/endpoints/admin.js
CHANGED
|
@@ -98,6 +98,7 @@ export const admin = (rawClient) => ({
|
|
|
98
98
|
growth: allpeepNoPayloadEndpoint(rawClient, '/admin/analytics/growth'),
|
|
99
99
|
engagement: allpeepNoPayloadEndpoint(rawClient, '/admin/analytics/engagement'),
|
|
100
100
|
retention: allpeepNoPayloadEndpoint(rawClient, '/admin/analytics/retention'),
|
|
101
|
+
clicks: allpeepNoPayloadEndpoint(rawClient, '/admin/analytics/clicks'),
|
|
101
102
|
reportSettings: {
|
|
102
103
|
read: allpeepNoPayloadEndpoint(rawClient, '/admin/analytics/report-settings'),
|
|
103
104
|
update: allpeepPayloadEndpoint(rawClient, '/admin/analytics/report-settings', 'put'),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FetchClient } from '@openpeepshq/fetch-client';
|
|
2
|
+
export declare const analytics: (rawClient: FetchClient) => {
|
|
3
|
+
recordClicks: import("@openpeepshq/fetch-client").TypedPayloadEndpoint<{
|
|
4
|
+
success: true;
|
|
5
|
+
}, {
|
|
6
|
+
events: {
|
|
7
|
+
kind: "link" | "page";
|
|
8
|
+
target: string;
|
|
9
|
+
}[];
|
|
10
|
+
}, {
|
|
11
|
+
success: boolean;
|
|
12
|
+
message?: string | undefined;
|
|
13
|
+
key?: string | undefined;
|
|
14
|
+
}, undefined, undefined>;
|
|
15
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FetchClient } from '@openpeepshq/fetch-client';
|
|
2
|
-
import type { AccessTokenWithMeta, ChronologicalInfiniteQueryParams, ProfileWithMeta, ProfileSettings, PublicAccessToken } from '@openpeepshq/common';
|
|
3
|
-
export declare const profiles: (rawClient: FetchClient) => {
|
|
1
|
+
import type { FetchClient, noPayloadEventSource } from '@openpeepshq/fetch-client';
|
|
2
|
+
import type { AccessTokenWithMeta, ChronologicalInfiniteQueryParams, ProfileWithMeta, ProfileSettings, PublicAccessToken, SessionPlatform } from '@openpeepshq/common';
|
|
3
|
+
export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<typeof noPayloadEventSource>) => {
|
|
4
4
|
current: {
|
|
5
5
|
read: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<ProfileWithMeta, {
|
|
6
6
|
success: boolean;
|
|
@@ -6589,6 +6589,35 @@ export declare const profiles: (rawClient: FetchClient) => {
|
|
|
6589
6589
|
}, {
|
|
6590
6590
|
accessTokenId: string;
|
|
6591
6591
|
}, undefined>;
|
|
6592
|
+
sessionEvents: {
|
|
6593
|
+
listen: import("@openpeepshq/fetch-client").TypedNoPayloadEventSource<{
|
|
6594
|
+
type: "invalidate";
|
|
6595
|
+
notification?: {
|
|
6596
|
+
title?: string | undefined;
|
|
6597
|
+
options?: {
|
|
6598
|
+
body?: string | undefined;
|
|
6599
|
+
icon?: string | undefined;
|
|
6600
|
+
image?: string | undefined;
|
|
6601
|
+
link?: string | undefined;
|
|
6602
|
+
tag?: string | undefined;
|
|
6603
|
+
badge?: number | undefined;
|
|
6604
|
+
data?: Record<string, unknown> | undefined;
|
|
6605
|
+
actions?: {
|
|
6606
|
+
action: string;
|
|
6607
|
+
title: string;
|
|
6608
|
+
}[] | undefined;
|
|
6609
|
+
} | undefined;
|
|
6610
|
+
invalidateQueries?: string[][] | undefined;
|
|
6611
|
+
} | undefined;
|
|
6612
|
+
notificationStats?: {
|
|
6613
|
+
unread: number;
|
|
6614
|
+
unseen: number;
|
|
6615
|
+
} | undefined;
|
|
6616
|
+
}, undefined, {
|
|
6617
|
+
platform: SessionPlatform;
|
|
6618
|
+
connectionId: string;
|
|
6619
|
+
}>;
|
|
6620
|
+
};
|
|
6592
6621
|
};
|
|
6593
6622
|
list: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
6594
6623
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { allpeepNoPayloadEndpoint, allpeepPayloadEndpoint } from './helpers.js';
|
|
2
|
-
export const profiles = (rawClient) => ({
|
|
2
|
+
export const profiles = (rawClient, eventSource) => ({
|
|
3
3
|
current: {
|
|
4
4
|
read: allpeepNoPayloadEndpoint(rawClient, '/profiles/current'),
|
|
5
5
|
update: allpeepPayloadEndpoint(rawClient, '/profiles/current', 'patch'),
|
|
@@ -14,6 +14,9 @@ export const profiles = (rawClient) => ({
|
|
|
14
14
|
accessTokens: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/access-tokens'),
|
|
15
15
|
createAccessToken: allpeepPayloadEndpoint(rawClient, '/profiles/current/access-tokens', 'post'),
|
|
16
16
|
revokeAccessToken: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/access-tokens/:accessTokenId', 'delete'),
|
|
17
|
+
sessionEvents: {
|
|
18
|
+
listen: eventSource('/profiles/current/session/events'),
|
|
19
|
+
},
|
|
17
20
|
},
|
|
18
21
|
list: allpeepNoPayloadEndpoint(rawClient, '/profiles'),
|
|
19
22
|
findById: allpeepNoPayloadEndpoint(rawClient, '/profiles/:id'),
|
|
@@ -10,6 +10,10 @@ export declare const server: (rawClient: FetchClient) => {
|
|
|
10
10
|
primaryHex: string;
|
|
11
11
|
light: {
|
|
12
12
|
primaryHex: string;
|
|
13
|
+
secondaryHex?: string | undefined;
|
|
14
|
+
fontFamily?: string | undefined;
|
|
15
|
+
buttonRadius?: string | undefined;
|
|
16
|
+
radius?: string | undefined;
|
|
13
17
|
logoSmall?: string | undefined;
|
|
14
18
|
defaultProfileAvatar?: string | undefined;
|
|
15
19
|
defaultGroupAvatar?: string | undefined;
|
|
@@ -18,6 +22,10 @@ export declare const server: (rawClient: FetchClient) => {
|
|
|
18
22
|
};
|
|
19
23
|
dark: {
|
|
20
24
|
primaryHex: string;
|
|
25
|
+
secondaryHex?: string | undefined;
|
|
26
|
+
fontFamily?: string | undefined;
|
|
27
|
+
buttonRadius?: string | undefined;
|
|
28
|
+
radius?: string | undefined;
|
|
21
29
|
logoSmall?: string | undefined;
|
|
22
30
|
defaultProfileAvatar?: string | undefined;
|
|
23
31
|
defaultGroupAvatar?: string | undefined;
|
|
@@ -12,6 +12,7 @@ import type { reports } from './reports';
|
|
|
12
12
|
import type { server } from './server';
|
|
13
13
|
import type { sso } from './sso';
|
|
14
14
|
import type { admin } from './admin';
|
|
15
|
+
import type { analytics } from './analytics';
|
|
15
16
|
import type { previewLink } from './previewLink';
|
|
16
17
|
import type { search } from './search';
|
|
17
18
|
import type { payments } from './payments';
|
|
@@ -19,6 +20,7 @@ import type { plugins } from './plugins';
|
|
|
19
20
|
import type { streaming } from './streaming';
|
|
20
21
|
import type { WebhookHandler } from '../webhooks';
|
|
21
22
|
export type AdminEndpoints = ReturnType<typeof admin>;
|
|
23
|
+
export type AnalyticsEndpoints = ReturnType<typeof analytics>;
|
|
22
24
|
export type AccountsEndpoints = ReturnType<typeof accounts>;
|
|
23
25
|
export type AuthEndpoints = ReturnType<typeof auth>;
|
|
24
26
|
export type ConversationsEndpoints = ReturnType<typeof conversations>;
|
|
@@ -39,6 +41,7 @@ export type PluginEndpoints = ReturnType<typeof plugins>;
|
|
|
39
41
|
export type StreamingEndpoints = ReturnType<typeof streaming>;
|
|
40
42
|
export type Endpoints = {
|
|
41
43
|
admin: AdminEndpoints;
|
|
44
|
+
analytics: AnalyticsEndpoints;
|
|
42
45
|
accounts: AccountsEndpoints;
|
|
43
46
|
auth: AuthEndpoints;
|
|
44
47
|
conversations: ConversationsEndpoints;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { noPayloadEventSource, fetchClient } from '@openpeepshq/fetch-client';
|
|
2
2
|
import { admin } from './endpoints/admin.js';
|
|
3
|
+
import { analytics } from './endpoints/analytics.js';
|
|
3
4
|
import { i18n } from './endpoints/i18n.js';
|
|
4
5
|
import { accounts } from './endpoints/accounts.js';
|
|
5
6
|
import { jams } from './endpoints/jams.js';
|
|
@@ -39,6 +40,7 @@ export const openpeepsClient = (options) => {
|
|
|
39
40
|
const serverEndpoints = server(rawClient);
|
|
40
41
|
return {
|
|
41
42
|
admin: admin(rawClient),
|
|
43
|
+
analytics: analytics(rawClient),
|
|
42
44
|
accounts: accounts(rawClient),
|
|
43
45
|
auth: auth(rawClient),
|
|
44
46
|
conversations: conversations(rawClient),
|
|
@@ -49,7 +51,7 @@ export const openpeepsClient = (options) => {
|
|
|
49
51
|
plugins: plugins(rawClient),
|
|
50
52
|
posts: posts(rawClient),
|
|
51
53
|
previewLink: previewLink(rawClient),
|
|
52
|
-
profiles: profiles(rawClient),
|
|
54
|
+
profiles: profiles(rawClient, allPeepNoPayloadEventSource),
|
|
53
55
|
server: serverEndpoints,
|
|
54
56
|
sso: sso(rawClient),
|
|
55
57
|
location: location(rawClient),
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openpeepshq/client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.37",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"validator": "^13.11.0",
|
|
8
8
|
"zod": "^4.4.3",
|
|
9
|
-
"@openpeepshq/common": "^0.1.
|
|
10
|
-
"@openpeepshq/fetch-client": "^0.1.
|
|
9
|
+
"@openpeepshq/common": "^0.1.44",
|
|
10
|
+
"@openpeepshq/fetch-client": "^0.1.7"
|
|
11
11
|
},
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"types": "dist/index.d.ts",
|