@openpeepshq/client 0.10.0 → 0.11.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.
|
@@ -22329,6 +22329,21 @@ export declare const profiles: (rawClient: FetchClient, eventSource: ReturnType<
|
|
|
22329
22329
|
}, {
|
|
22330
22330
|
accessTokenId: string;
|
|
22331
22331
|
}, undefined>;
|
|
22332
|
+
calendarFeed: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
22333
|
+
success: true;
|
|
22334
|
+
token: string;
|
|
22335
|
+
}, {
|
|
22336
|
+
success: boolean;
|
|
22337
|
+
message?: string | undefined;
|
|
22338
|
+
key?: string | undefined;
|
|
22339
|
+
}, undefined, undefined>;
|
|
22340
|
+
revokeCalendarFeed: import("@openpeepshq/fetch-client").TypedNoPayloadEndpoint<{
|
|
22341
|
+
success: true;
|
|
22342
|
+
}, {
|
|
22343
|
+
success: boolean;
|
|
22344
|
+
message?: string | undefined;
|
|
22345
|
+
key?: string | undefined;
|
|
22346
|
+
}, undefined, undefined>;
|
|
22332
22347
|
sessionEvents: {
|
|
22333
22348
|
listen: import("@openpeepshq/fetch-client").TypedNoPayloadEventSource<{
|
|
22334
22349
|
type: "invalidate";
|
|
@@ -15,6 +15,11 @@ export const profiles = (rawClient, eventSource) => ({
|
|
|
15
15
|
accessTokens: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/access-tokens'),
|
|
16
16
|
createAccessToken: allpeepPayloadEndpoint(rawClient, '/profiles/current/access-tokens', 'post'),
|
|
17
17
|
revokeAccessToken: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/access-tokens/:accessTokenId', 'delete'),
|
|
18
|
+
// `calendarFeed` is a bare resource: POST mints (and revokes the old)
|
|
19
|
+
// token, DELETE revokes all — neither takes or returns a body beyond the
|
|
20
|
+
// typed response.
|
|
21
|
+
calendarFeed: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/calendar-feed', 'post'),
|
|
22
|
+
revokeCalendarFeed: allpeepNoPayloadEndpoint(rawClient, '/profiles/current/calendar-feed', 'delete'),
|
|
18
23
|
sessionEvents: {
|
|
19
24
|
listen: eventSource('/profiles/current/session/events'),
|
|
20
25
|
},
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openpeepshq/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@openpeepshq/common": "^0.
|
|
8
|
+
"@openpeepshq/common": "^0.16.0",
|
|
9
9
|
"@openpeepshq/fetch-client": "^0.2.1"
|
|
10
10
|
},
|
|
11
11
|
"main": "./dist/index.js",
|
|
@@ -22,6 +22,7 @@ import type {
|
|
|
22
22
|
ProfileSettings,
|
|
23
23
|
ProfileSettingsData,
|
|
24
24
|
PublicAccessToken,
|
|
25
|
+
CalendarFeedTokenResponse,
|
|
25
26
|
SessionEvent,
|
|
26
27
|
SessionPlatform,
|
|
27
28
|
Hashtag,
|
|
@@ -93,6 +94,19 @@ export const profiles = (
|
|
|
93
94
|
SuccessResponse,
|
|
94
95
|
{ accessTokenId: string }
|
|
95
96
|
>(rawClient, '/profiles/current/access-tokens/:accessTokenId', 'delete'),
|
|
97
|
+
// `calendarFeed` is a bare resource: POST mints (and revokes the old)
|
|
98
|
+
// token, DELETE revokes all — neither takes or returns a body beyond the
|
|
99
|
+
// typed response.
|
|
100
|
+
calendarFeed: allpeepNoPayloadEndpoint<CalendarFeedTokenResponse>(
|
|
101
|
+
rawClient,
|
|
102
|
+
'/profiles/current/calendar-feed',
|
|
103
|
+
'post',
|
|
104
|
+
),
|
|
105
|
+
revokeCalendarFeed: allpeepNoPayloadEndpoint<SuccessResponse>(
|
|
106
|
+
rawClient,
|
|
107
|
+
'/profiles/current/calendar-feed',
|
|
108
|
+
'delete',
|
|
109
|
+
),
|
|
96
110
|
sessionEvents: {
|
|
97
111
|
listen: eventSource<
|
|
98
112
|
SessionEvent,
|