pups-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.
- package/README.md +37 -2
- package/dist/discovery.d.ts +5 -0
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +2 -0
- package/dist/discovery.js.map +1 -1
- package/dist/feed.d.ts +121 -13
- package/dist/feed.d.ts.map +1 -1
- package/dist/feed.js +224 -45
- package/dist/feed.js.map +1 -1
- package/dist/handles.d.ts +34 -0
- package/dist/handles.d.ts.map +1 -0
- package/dist/handles.js +91 -0
- package/dist/handles.js.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/mentions.d.ts +222 -0
- package/dist/mentions.d.ts.map +1 -0
- package/dist/mentions.js +343 -0
- package/dist/mentions.js.map +1 -0
- package/dist/session.d.ts +6 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +9 -0
- package/dist/session.js.map +1 -1
- package/dist/util.d.ts +2 -0
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +2 -0
- package/dist/util.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/discovery.ts +7 -0
- package/src/feed.ts +290 -54
- package/src/handles.ts +101 -0
- package/src/index.ts +10 -1
- package/src/mentions.ts +447 -0
- package/src/session.ts +10 -0
- package/src/util.ts +4 -0
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -145,17 +145,52 @@ console.log(post.item.url) // the post's
|
|
|
145
145
|
await feed.editPost(post.id, { title: 'Hello, world' }) // wherever the post is now, sets date_modified
|
|
146
146
|
await feed.deletePost(post.id, { deleteMedia: true }) // also deletes media no other post uses
|
|
147
147
|
await feed.updateSettings({ description: 'Longer notes', _podcast: { explicit: false } })
|
|
148
|
+
if (feed.commentsAvailable && feed.comments(state.feed) == 'off')
|
|
149
|
+
await feed.enableComments({ policy: { maxLength: 1000 } }) // comments go into the owner's inbox
|
|
148
150
|
|
|
149
151
|
for await (const item of feed.posts()) console.log(item.id) // newest first, through all archives
|
|
150
152
|
const feeds = await session.listFeeds() // the feeds registered in host-meta.json
|
|
151
153
|
```
|
|
152
154
|
|
|
153
|
-
- **Archives
|
|
155
|
+
- **Archives** ([RFC-13](https://github.com/bigwide-net/RFCs/blob/main/RFC-13-JSON-Feed-Archives.md)). Every post goes into the newest archive, `feed.000000.json`, `feed.000001.json`, … in the feed directory, 20 posts each, linked with `next_url`; posts never move. The feed file holds a copy of the newest 30 posts and points to the newest archive with `_archive.archive_url`, and names the archive template and size; archives point back with `_archive.updates_url` and carry their `_archive.number`. Feeds written before RFC-13, with these fields in `_pups`, are read as before and moved to `_archive` on their next write. `session.feed(name, { maxItems, archiveSize, maxBytes })` changes the sizes. Archives are optional in RFC-7: with `{ startArchives: false }`, a feed without archives stays a plain feed file with the newest posts; a feed that has archives always keeps them.
|
|
154
156
|
- **Concurrency.** Every change is a read-modify-write with ETags, repeated when another app or the owner wrote in between. The archive is always written before the feed file, so no post is ever lost, and the next post repairs a feed file that an interrupted post didn't reach.
|
|
155
157
|
- **Post URLs.** `addPost()` returns `url`, the post's archive URL plus `#<id>`. It never changes, so it can be the `source` of an RFC-4 webmention. If the site has a homepage that shows single posts, such as webpup, `host-meta.json` declares their URLs with the property `https://bigwide.net/ns/post-url-template` (`POST_URL_TEMPLATE`), e.g. `https://tim.example/p/{feed}/post/{index}`. Posts of a feed with archives then get the URL of their page as `url`, unless the app sets one; `editPost()` adds it to older posts that have none. Show `post.item.url` as the post's link; `session.feed(name, { postUrls: false })` turns this off.
|
|
156
|
-
- **
|
|
158
|
+
- **Comments on your feed.** If the server has a `comment_endpoint` (RFC-6 "Built-in receiver"), `feed.enableComments({ policy, tos })` opens the feed for RFC-4 comments: it writes `_submissions` into the feed file, with the endpoint as `url`, a `comments` policy and `republish: "no"`, and the server puts the comments into the owner's inbox. `feed.disableComments()` removes it, `feed.comments(doc)` tells whether comments go to this server (`pups`), another service (`other`) or nowhere (`off`). Archives don't copy `_submissions`: the feed file alone decides. Single posts are closed with `_commenting: { allowComments: false }`.
|
|
159
|
+
- **Indexes.** Every post gets an index, `_archive.index` (also `PostResult.index`, or `itemIndex(item)`): 0 for the first post, then counting up, never changed and never given out again, with the counter `_archive.next_index` in the newest archive. Readers can number the posts and load only the archives they need. A feed written before indexes existed is indexed on its next post, or with `feed.assignIndexes()`; posts of apps that don't know indexes get theirs on the next post.
|
|
157
160
|
- Errors: `not_pups_controlled` for feeds without the marker, `invalid_feed` for files that aren't JSON Feeds, `not_found` for a missing feed or post.
|
|
158
161
|
|
|
162
|
+
### Mentions and submissions
|
|
163
|
+
|
|
164
|
+
A feed can tell the people a post names or answers ([RFC-11](https://github.com/bigwide-net/RFCs/blob/main/RFC-11-Mentions.md)), and submit comments to other feeds ([RFC-4](https://github.com/bigwide-net/RFCs/blob/main/RFC-4-Feed-Submissions.md)):
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
const feed = session.feed(undefined, { mentions: true })
|
|
168
|
+
const post = await feed.addPost({ content_html: '<p>Great talk by <a href="https://alice.example/">@alice.example</a></p>' })
|
|
169
|
+
for (const r of await post.mentions ?? []) console.log(r.account, r.status) // @alice.example accepted
|
|
170
|
+
|
|
171
|
+
const comment = await feed.addPost({ content_text: 'Agreed!', _source: { inReplyTo: 'https://rm.example/groups/g/posts.json#a8Kd03' } })
|
|
172
|
+
const submission = await feed.submit(comment.id) // to the target feed's _submissions.url
|
|
173
|
+
await session.mentions.submissionStatus(submission.statusUrl!) // { status: 'success', pubUrl: … }
|
|
174
|
+
|
|
175
|
+
await session.mentions.notify(source, '@alice.example') // the generic interface: any source, any account
|
|
176
|
+
await session.mentions.reply(source, 'https://bob.example/feed.json#p-12')
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
- **Asking first.** `feed.planMentions(input)` lists the accounts a post would notify, without sending anything, so the app can ask before posting. Each write takes `{ mentions }`: `true`, `false` (post without mentions), or the confirmed list:
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
const planned = await feed.planMentions(input) // [{ account: '@alice.example', kind: 'mention', target }]
|
|
183
|
+
const confirmed = planned.length && await confirmDialog(planned) ? planned : false
|
|
184
|
+
await feed.addPost(input, { mentions: confirmed })
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
For an edit, plan with the new version and `{ previous: oldItem }`; for a delete, `planMentions(undefined, { previous: oldItem })`. `{ discover: true }` leaves out the domains without an endpoint, but looks them up before the post is published, which tells them that it names them.
|
|
188
|
+
- **Automatic mentions.** With `{ mentions: true }`, `addPost()`, `editPost()` and `deletePost()` find the handles in the post's title and visible text, e.g. `@alice.example`, also lists like `@alice.example/@bob.example`, but not e-mail addresses, fediverse addresses, names without a dot or paths. The author of the item a post answers (`_source.inReplyTo`) gets a reply mention. Each account is notified once, never the owner, at most 20 per post; after an edit or delete, everyone the old or the new version named.
|
|
189
|
+
- **After the upload.** The mentions are sent in the background, once the post is visible at its public URL (so that a CDN doesn't hand the receiver an old copy), with the archive URL plus `#<id>` as `source`. `post.mentions` resolves to one report per account (`accepted`, `rejected`, `failed`, `unknown` or `no-endpoint`) and never rejects; a failed mention never fails the post. Network errors, `5xx` and `429` are retried a few times; `feed.sendMentions(id)` sends again later.
|
|
190
|
+
- **Discovery.** The endpoint is the link `https://bigwide.net/ns/mention` in the domain's `host-meta.json`, cached for a day, failures for an hour. A domain without one, or whose `host-meta.json` doesn't allow CORS, gets nothing. An endpoint without CORS headers still receives the mention; its report says `unknown`.
|
|
191
|
+
- **Replies to RFC-4 feeds** are submissions, not mentions: if the answered feed has `_submissions`, no mentions are sent (the RFC-4 server sends them once it republishes the comment). Submitting is never automatic, because the app must first show the target's terms of service and what `republish` means: call `feed.submit(id)` after `addPost()`, and again after `editPost()` or `deletePost()`.
|
|
192
|
+
- `new Mentions({ fetch })` works without a session. `findHandles()`, `itemHandles()` and `visibleText()` are exported too.
|
|
193
|
+
|
|
159
194
|
### What the library does for you
|
|
160
195
|
|
|
161
196
|
- **Discovery** through `/.well-known/host-meta.json` and the configuration document.
|
package/dist/discovery.d.ts
CHANGED
|
@@ -35,6 +35,11 @@ export interface PupsServer {
|
|
|
35
35
|
hostMetaEndpoint?: string;
|
|
36
36
|
/** Present only if the server can't accept `PUT` and `DELETE`; all writes then go here. */
|
|
37
37
|
postEndpoint?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Present if the server accepts RFC-4 comments on posts of the owner's feeds and writes them into the owner's inbox
|
|
40
|
+
* (RFC-6 "Built-in receiver"). Feeds opt in with `feed.enableComments()`.
|
|
41
|
+
*/
|
|
42
|
+
commentEndpoint?: string;
|
|
38
43
|
maxUploadBytes: number;
|
|
39
44
|
specVersion: string;
|
|
40
45
|
/** The configuration document as fetched, including fields this library doesn't know. */
|
package/dist/discovery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAGA,wHAAwH;AACxH,eAAO,MAAM,QAAQ,4CAA4C,CAAA;AAEjE,yDAAyD;AACzD,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAAY,CAAA;AAIjE,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC5B,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAA;IACZ,wFAAwF;IACxF,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,4EAA4E;IAC5E,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,0EAA0E;IAC1E,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,uFAAuF;IACvF,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB;AAED,wHAAwH;AACxH,MAAM,WAAW,UAAU;IACzB,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAA;IACd,yGAAyG;IACzG,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,MAAM,EAAE,MAA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|
package/dist/discovery.js
CHANGED
|
@@ -118,6 +118,7 @@ export function parseConfig(json, domain, identityHosts) {
|
|
|
118
118
|
});
|
|
119
119
|
const hostMetaEndpoint = optionalHttps('host_meta_endpoint');
|
|
120
120
|
const postEndpoint = optionalHttps('post_endpoint');
|
|
121
|
+
const commentEndpoint = optionalHttps('comment_endpoint');
|
|
121
122
|
return {
|
|
122
123
|
domain,
|
|
123
124
|
identityHosts,
|
|
@@ -131,6 +132,7 @@ export function parseConfig(json, domain, identityHosts) {
|
|
|
131
132
|
wellKnownPaths,
|
|
132
133
|
...hostMetaEndpoint ? { hostMetaEndpoint } : {},
|
|
133
134
|
...postEndpoint ? { postEndpoint } : {},
|
|
135
|
+
...commentEndpoint ? { commentEndpoint } : {},
|
|
134
136
|
maxUploadBytes: maxUploadBytes,
|
|
135
137
|
specVersion,
|
|
136
138
|
raw,
|
package/dist/discovery.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEtD,wHAAwH;AACxH,MAAM,CAAC,MAAM,QAAQ,GAAG,yCAAyC,CAAA;AAEjE,yDAAyD;AACzD,MAAM,CAAC,MAAM,uBAAuB,GAAsB,CAAC,KAAK,CAAC,CAAA;AAEjE,MAAM,kBAAkB,GAAG,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEtD,wHAAwH;AACxH,MAAM,CAAC,MAAM,QAAQ,GAAG,yCAAyC,CAAA;AAEjE,yDAAyD;AACzD,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AC;QACjC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC;QAC/B,eAAe,EAAE,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC,gBAAgB,CAAC;QAClE,cAAc;QACd,GAAG,gBAAgB,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE;QAC/C,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE;QACvC,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE;QAC7C,cAAc,EAAE,cAAwB;QACxC,WAAW;QACX,GAAG;KACJ,CAAA;AACH,CAAC"}
|
package/dist/feed.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Mentions, MentionReport, MentionSource, PlannedMention, Submission } from './mentions.js';
|
|
1
2
|
import type { Scope } from './scopes.js';
|
|
2
3
|
import type { Body, PupsSession } from './session.js';
|
|
3
4
|
/** The link relation that registers a feed in `host-meta.json` (RFC-7). A placeholder in RFC-7. */
|
|
@@ -9,6 +10,8 @@ export declare const FEED_REL = "https://bigwide.net/ns/feed";
|
|
|
9
10
|
export declare const POST_URL_TEMPLATE = "https://bigwide.net/ns/post-url-template";
|
|
10
11
|
/** The `about` of the `_pups` object: RFC-7. Not its final location; readers must not rely on it. */
|
|
11
12
|
export declare const PUPS_FEED_SPEC = "https://github.com/bigwide-net/RFCs/blob/main/RFC-7-Feed-Publishing-with-PUPS.md";
|
|
13
|
+
/** The `about` of the `_archive` object: RFC-13 (JSON Feed Archives). Not its final location either. */
|
|
14
|
+
export declare const ARCHIVE_SPEC = "https://github.com/bigwide-net/RFCs/blob/main/RFC-13-JSON-Feed-Archives.md";
|
|
12
15
|
export interface FeedAuthor {
|
|
13
16
|
name?: string;
|
|
14
17
|
url?: string;
|
|
@@ -40,26 +43,39 @@ export interface FeedItem {
|
|
|
40
43
|
tags?: string[];
|
|
41
44
|
language?: string;
|
|
42
45
|
attachments?: FeedAttachment[];
|
|
43
|
-
/** The item's `
|
|
44
|
-
|
|
46
|
+
/** The item's `_archive` object, with its index (RFC-13 "Indexes"). */
|
|
47
|
+
_archive?: ItemArchive;
|
|
45
48
|
[field: string]: unknown;
|
|
46
49
|
}
|
|
47
|
-
/** The `
|
|
48
|
-
export interface
|
|
49
|
-
/** The item's index: 0 for a feed's first item, then counting up; never changed, never used again (RFC-
|
|
50
|
+
/** The `_archive` object of an item (RFC-13). */
|
|
51
|
+
export interface ItemArchive {
|
|
52
|
+
/** The item's index: 0 for a feed's first item, then counting up; never changed, never used again (RFC-13 "Indexes"). */
|
|
50
53
|
index?: number;
|
|
51
54
|
[field: string]: unknown;
|
|
52
55
|
}
|
|
53
|
-
/** The `_pups`
|
|
56
|
+
/** @deprecated The index moved from `_pups` to `_archive` (RFC-13): use ItemArchive. */
|
|
57
|
+
export type ItemMarker = ItemArchive;
|
|
58
|
+
/** The `_pups` object of a feed file or archive: the marker of RFC-7. */
|
|
54
59
|
export interface PupsMarker {
|
|
55
60
|
about?: string;
|
|
56
61
|
pupsControlled?: boolean;
|
|
62
|
+
[field: string]: unknown;
|
|
63
|
+
}
|
|
64
|
+
/** The `_archive` object of a feed file or archive (RFC-13). */
|
|
65
|
+
export interface ArchiveFields {
|
|
66
|
+
about?: string;
|
|
57
67
|
/** In the feed file: the public URL of the newest archive. */
|
|
58
68
|
archive_url?: string;
|
|
69
|
+
/** In the feed file: the URL of every archive, with `{number}` for its six-digit number. */
|
|
70
|
+
archive_template?: string;
|
|
71
|
+
/** In the feed file: the most items an archive holds. */
|
|
72
|
+
archive_size?: number;
|
|
59
73
|
/** In an archive: the public URL of the feed file, which readers poll. */
|
|
60
74
|
updates_url?: string;
|
|
75
|
+
/** In an archive: its number, from 0 for the oldest. */
|
|
76
|
+
number?: number;
|
|
61
77
|
/**
|
|
62
|
-
* The index the next new item gets (RFC-
|
|
78
|
+
* The index the next new item gets (RFC-13 "Indexes"). Valid in the newest archive, or in the feed file of a feed
|
|
63
79
|
* without archives.
|
|
64
80
|
*/
|
|
65
81
|
next_index?: number;
|
|
@@ -82,6 +98,7 @@ export interface FeedDocument {
|
|
|
82
98
|
hubs?: unknown[];
|
|
83
99
|
items: FeedItem[];
|
|
84
100
|
_pups?: PupsMarker;
|
|
101
|
+
_archive?: ArchiveFields;
|
|
85
102
|
[field: string]: unknown;
|
|
86
103
|
}
|
|
87
104
|
/**
|
|
@@ -96,6 +113,24 @@ export interface FeedSettings {
|
|
|
96
113
|
expired?: boolean;
|
|
97
114
|
[extension: `_${string}`]: unknown;
|
|
98
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* The rules for comments of RFC-4 "Policies". Missing rules have RFC-4's defaults; servers may add others. The PUPS
|
|
118
|
+
* server's receiver enforces `title`, `minLength`, `maxLength`, `requireSocialSpec`, `allowEdit` and `allowDelete`.
|
|
119
|
+
*/
|
|
120
|
+
export interface CommentPolicy {
|
|
121
|
+
title?: 'required' | 'allowed' | 'none';
|
|
122
|
+
minLength?: number;
|
|
123
|
+
maxLength?: number;
|
|
124
|
+
requireSocialSpec?: boolean;
|
|
125
|
+
allowEdit?: boolean;
|
|
126
|
+
allowDelete?: boolean;
|
|
127
|
+
[rule: string]: unknown;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Whether a feed accepts comments (RFC-4 `_submissions`): `pups` through the PUPS server's receiver, `other`
|
|
131
|
+
* through another service, such as an rssmention server, or `off`.
|
|
132
|
+
*/
|
|
133
|
+
export type CommentsState = 'pups' | 'other' | 'off';
|
|
99
134
|
/** Changes to the settings: a value sets the field, `null` removes it, `undefined` leaves it unchanged. */
|
|
100
135
|
export type FeedSettingsChanges = {
|
|
101
136
|
[K in keyof FeedSettings]?: FeedSettings[K] | null;
|
|
@@ -157,6 +192,11 @@ export interface PostResult {
|
|
|
157
192
|
* as the `source` of an RFC-4 webmention. In a feed without archives, the feed file's URL plus `#<id>`.
|
|
158
193
|
*/
|
|
159
194
|
url: string;
|
|
195
|
+
/**
|
|
196
|
+
* With the option `mentions`: the RFC-11 mentions, sent once the post is visible at its public URL. Never
|
|
197
|
+
* rejects. Missing if the post names and answers no one.
|
|
198
|
+
*/
|
|
199
|
+
mentions?: Promise<MentionReport[]>;
|
|
160
200
|
}
|
|
161
201
|
export interface MediaResult {
|
|
162
202
|
path: string;
|
|
@@ -209,6 +249,12 @@ export interface FeedOptions {
|
|
|
209
249
|
* declares one and the post has no `url` (RFC-7 "Post URLs"). Default true.
|
|
210
250
|
*/
|
|
211
251
|
postUrls?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Whether to send RFC-11 mentions after `addPost()`, `editPost()` and `deletePost()`: to the domains a post names
|
|
254
|
+
* (`@tim.example.com`) and to the author of the item it answers. `true` uses `session.mentions`. Default false.
|
|
255
|
+
* Each write can decide otherwise with its own option `mentions`, e.g. with the accounts the author confirmed.
|
|
256
|
+
*/
|
|
257
|
+
mentions?: boolean | Mentions;
|
|
212
258
|
}
|
|
213
259
|
/** A feed registered in `host-meta.json`. */
|
|
214
260
|
export interface FeedLink {
|
|
@@ -221,9 +267,17 @@ export interface FeedLink {
|
|
|
221
267
|
type Signal = {
|
|
222
268
|
signal?: AbortSignal;
|
|
223
269
|
};
|
|
270
|
+
/**
|
|
271
|
+
* Which RFC-11 mentions a write sends: `true` all of them, `false` none, or a list from `planMentions()`, e.g. the
|
|
272
|
+
* accounts the author confirmed. Default: the feed's option `mentions`.
|
|
273
|
+
*/
|
|
274
|
+
export type MentionChoice = boolean | PlannedMention[];
|
|
275
|
+
type WithMentions = Signal & {
|
|
276
|
+
mentions?: MentionChoice;
|
|
277
|
+
};
|
|
224
278
|
/** The scopes an app needs to write a feed: the feed file and the feed directory (RFC-7 "Server requirements"). */
|
|
225
279
|
export declare function feedScopes(name?: string): Scope[];
|
|
226
|
-
/** The index of an item (RFC-
|
|
280
|
+
/** The index of an item (RFC-13 "Indexes"), also from `_pups` of earlier drafts, or undefined if it has none. */
|
|
227
281
|
export declare function itemIndex(item: FeedItem): number | undefined;
|
|
228
282
|
/**
|
|
229
283
|
* A feed on the owner's domain, maintained according to RFC-7: the main feed `/feed.json`, or a named feed
|
|
@@ -284,6 +338,24 @@ export declare class PupsFeed {
|
|
|
284
338
|
setIcon(media: MediaInput | null, options?: Signal): Promise<FeedDocument>;
|
|
285
339
|
/** Uploads a new favicon (64 × 64) to the icons directory, like `setIcon()`, or removes it with `null`. */
|
|
286
340
|
setFavicon(media: MediaInput | null, options?: Signal): Promise<FeedDocument>;
|
|
341
|
+
/** Whether the PUPS server can receive comments on the feed's posts (`comment_endpoint`, RFC-6 "Built-in receiver"). */
|
|
342
|
+
get commentsAvailable(): boolean;
|
|
343
|
+
/** Whether the feed accepts comments, and through whom; `doc` is the feed file, e.g. from `load()`. */
|
|
344
|
+
comments(doc: FeedDocument): CommentsState;
|
|
345
|
+
/**
|
|
346
|
+
* Lets readers comment on the feed's posts through the PUPS server, which puts the comments into the owner's inbox
|
|
347
|
+
* (RFC-6 "Built-in receiver"): writes RFC-4 `_submissions` into the feed file, with `comment_endpoint` as `url`,
|
|
348
|
+
* the comments policy (RFC-4's defaults for `title`, `minLength` and `maxLength`, overridden by `policy`) and
|
|
349
|
+
* `republish: "no"`. Replaces the `_submissions` of another service; check `comments()` first and ask the owner.
|
|
350
|
+
* Single posts are closed with `_commenting: { allowComments: false }` (RFC-4).
|
|
351
|
+
* @throws {PupsError} `unsupported` if the server has no `comment_endpoint`.
|
|
352
|
+
*/
|
|
353
|
+
enableComments(settings?: {
|
|
354
|
+
policy?: CommentPolicy;
|
|
355
|
+
tos?: string;
|
|
356
|
+
}, options?: Signal): Promise<FeedDocument>;
|
|
357
|
+
/** Closes the feed for comments: removes `_submissions` from the feed file, whichever service it names. */
|
|
358
|
+
disableComments(options?: Signal): Promise<FeedDocument>;
|
|
287
359
|
/**
|
|
288
360
|
* Uploads an image, audio or video file into the feed directory under a new, unique name, by default
|
|
289
361
|
* `images/<year>/…` for images and `media/<year>/…` for everything else. Reference it from a post by its `url`.
|
|
@@ -299,11 +371,13 @@ export declare class PupsFeed {
|
|
|
299
371
|
* media with `uploadMedia()` before posting.
|
|
300
372
|
* In a feed with archives, a post without `url` gets one from the site's post URL template, if `host-meta.json`
|
|
301
373
|
* has one and `postUrls` isn't false: the page that shows the post (RFC-7 "Post URLs").
|
|
374
|
+
* With the option `mentions`, the domains the post names and the author of the item it answers are notified
|
|
375
|
+
* (RFC-11) once the post is visible; see `PostResult.mentions`.
|
|
302
376
|
* @returns the post, with `url`: its archive's URL plus `#<id>`, which never changes; for a feed without
|
|
303
377
|
* archives, the feed file's URL plus `#<id>`, valid while the post is among the newest. The post's page, if it
|
|
304
378
|
* has one, is `item.url`.
|
|
305
379
|
*/
|
|
306
|
-
addPost(input: PostInput, options?:
|
|
380
|
+
addPost(input: PostInput, options?: WithMentions): Promise<PostResult>;
|
|
307
381
|
/**
|
|
308
382
|
* Gives every item of the feed without an index one (RFC-7 "Indexing an existing feed"), and sets the counter.
|
|
309
383
|
* `addPost()` does this by itself before the first post to a feed that hasn't been indexed yet; call it to
|
|
@@ -316,7 +390,7 @@ export declare class PupsFeed {
|
|
|
316
390
|
*/
|
|
317
391
|
getPost(id: string, options?: Signal): Promise<PostResult | undefined>;
|
|
318
392
|
/**
|
|
319
|
-
* All posts, newest first: the archives from `
|
|
393
|
+
* All posts, newest first: the archives from `_archive.archive_url` along `next_url` (for a feed without archives,
|
|
320
394
|
* the feed file and its `next_url` chain). Each post is returned once.
|
|
321
395
|
*/
|
|
322
396
|
posts(options?: Signal): AsyncGenerator<FeedItem>;
|
|
@@ -326,11 +400,12 @@ export declare class PupsFeed {
|
|
|
326
400
|
* a function that gets a copy of the item and returns the new item, or `undefined` to leave it unchanged. The
|
|
327
401
|
* function may run more than once.
|
|
328
402
|
*
|
|
329
|
-
* Apps should edit posts only when the owner asks them to, whichever app created them.
|
|
403
|
+
* Apps should edit posts only when the owner asks them to, whichever app created them. With the option
|
|
404
|
+
* `mentions`, everyone the old or the new version mentions is notified. A post of a feed with
|
|
330
405
|
* archives that has no `url`, and had none before, gets one from the post URL template, as in `addPost()`.
|
|
331
406
|
* @throws {PupsError} `not_found`
|
|
332
407
|
*/
|
|
333
|
-
editPost(id: string, changes: PostChanges | ((item: FeedItem) => FeedItem | undefined | Promise<FeedItem | undefined>), options?:
|
|
408
|
+
editPost(id: string, changes: PostChanges | ((item: FeedItem) => FeedItem | undefined | Promise<FeedItem | undefined>), options?: WithMentions): Promise<PostResult>;
|
|
334
409
|
/**
|
|
335
410
|
* Deletes a post from its archive and from the feed file, which is then filled up again with the newest items
|
|
336
411
|
* from the archives. With `deleteMedia`, it also deletes the files in the feed directory that the post references
|
|
@@ -338,12 +413,45 @@ export declare class PupsFeed {
|
|
|
338
413
|
* @returns the deleted item, and the public URLs of the deleted media files.
|
|
339
414
|
* @throws {PupsError} `not_found`
|
|
340
415
|
*/
|
|
341
|
-
deletePost(id: string, options?:
|
|
416
|
+
deletePost(id: string, options?: WithMentions & {
|
|
342
417
|
deleteMedia?: boolean;
|
|
343
418
|
}): Promise<{
|
|
344
419
|
item: FeedItem;
|
|
345
420
|
deletedMedia: string[];
|
|
421
|
+
mentions?: Promise<MentionReport[]>;
|
|
346
422
|
}>;
|
|
423
|
+
/**
|
|
424
|
+
* Sends the RFC-11 mentions of a post now, e.g. to try again those that failed (see `Mentions.notifyAll()`). With
|
|
425
|
+
* `previous`, the version before an edit, also to the accounts that one mentioned.
|
|
426
|
+
* @throws {PupsError} `not_found`
|
|
427
|
+
*/
|
|
428
|
+
sendMentions(id: string, options?: Signal & {
|
|
429
|
+
previous?: FeedItem;
|
|
430
|
+
}): Promise<MentionReport[]>;
|
|
431
|
+
/**
|
|
432
|
+
* Submits a post that answers an item of an RFC-4 feed, e.g. a comment, to that feed's `_submissions.url`
|
|
433
|
+
* (RFC-4 "Submitting"): `source` is the post's archive URL plus `#<id>`, `target` its `_source.inReplyTo`. Call it
|
|
434
|
+
* after `addPost()` or `editPost()`, also to submit an edit or a delete again. Show the target's terms of service
|
|
435
|
+
* and what its `republish` means before the first submission.
|
|
436
|
+
* @throws {PupsError} `not_found`; `invalid_request` if the post answers nothing; `unsupported` if the target
|
|
437
|
+
* feed takes no submissions.
|
|
438
|
+
*/
|
|
439
|
+
submit(id: string, options?: Signal): Promise<Submission>;
|
|
440
|
+
/**
|
|
441
|
+
* The RFC-11 mentions a post would send (see `Mentions.plan()`), e.g. to ask the author before posting:
|
|
442
|
+
*
|
|
443
|
+
* ```ts
|
|
444
|
+
* const planned = await feed.planMentions(input)
|
|
445
|
+
* const confirmed = planned.length && await askToNotify(planned) ? planned : false // the app's dialog
|
|
446
|
+
* await feed.addPost(input, { mentions: confirmed })
|
|
447
|
+
* ```
|
|
448
|
+
*
|
|
449
|
+
* For an edit, pass the post as it will be and the current version as `previous`; for a delete, only `previous`.
|
|
450
|
+
*/
|
|
451
|
+
planMentions(post: MentionSource | undefined, options?: Signal & {
|
|
452
|
+
previous?: MentionSource;
|
|
453
|
+
discover?: boolean;
|
|
454
|
+
}): Promise<PlannedMention[]>;
|
|
347
455
|
}
|
|
348
456
|
/** The feeds registered in the owner's `host-meta.json` (RFC-7 "Registering feeds"). */
|
|
349
457
|
export declare function listFeeds(session: PupsSession, options?: Signal & FeedOptions): Promise<FeedLink[]>;
|
package/dist/feed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../src/feed.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../src/feed.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACvG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAA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