pups-client 0.7.0 → 0.8.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 +5 -5
- package/dist/discovery.d.ts +5 -0
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +1 -0
- package/dist/discovery.js.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/feed.d.ts +38 -70
- package/dist/feed.d.ts.map +1 -1
- package/dist/feed.js +123 -566
- package/dist/feed.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mentions.d.ts.map +1 -1
- package/dist/mentions.js +2 -2
- package/dist/mentions.js.map +1 -1
- package/dist/session.d.ts +11 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +13 -0
- package/dist/session.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 +6 -0
- package/src/errors.ts +1 -1
- package/src/feed.ts +128 -598
- package/src/index.ts +0 -1
- package/src/mentions.ts +2 -3
- package/src/session.ts +15 -1
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -142,7 +142,7 @@ const photo = await feed.uploadMedia(photoFile) // → https:/
|
|
|
142
142
|
const post = await feed.addPost({ title: 'Hello', content_html: `<p>Hi!</p><img src="${photo.url}" alt="">` })
|
|
143
143
|
await feed.addPost({ markdown: 'Written in *Markdown*' }) // _source.markdown, with content_text as fallback
|
|
144
144
|
console.log(post.item.url) // the post's page on the homepage, if the site declares one
|
|
145
|
-
await feed.editPost(post.id, { title: 'Hello, world' }) // wherever the post is now
|
|
145
|
+
await feed.editPost(post.id, { title: 'Hello, world' }) // wherever the post is now; the server 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
148
|
if (feed.commentsAvailable && feed.comments(state.feed) == 'off')
|
|
@@ -152,11 +152,11 @@ for await (const item of feed.posts()) console.log(item.id) // newest firs
|
|
|
152
152
|
const feeds = await session.listFeeds() // the feeds registered in host-meta.json
|
|
153
153
|
```
|
|
154
154
|
|
|
155
|
-
- **
|
|
156
|
-
- **
|
|
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`),
|
|
155
|
+
- **Kept feeds** (RFC-7). The PUPS server keeps the feed: `addPost()`, `editPost()` and `deletePost()` each send one item with `POST` to the feed file, and the server gives new posts their index, puts them into the archives and writes the feed file. The library never writes archives. It needs a server with `"kept_feeds": true` in its configuration (`session.server.keptFeeds`); otherwise writes fail with `unsupported`. Settings (`updateSettings()`, icons, comments) are read-modify-writes of the feed file with ETags, repeated when another app or the owner wrote in between; the server keeps the items.
|
|
156
|
+
- **Archives** ([RFC-13](https://github.com/bigwide-net/RFCs/blob/main/RFC-13-JSON-Feed-Archives.md)). Every post is in exactly one 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`. `feed.posts()` and `feed.getPost()` read them.
|
|
157
|
+
- **Post URLs.** `addPost()` returns `url`, the post's address: its 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`), and the server gives new posts the URL of their page as `url`, unless the app sets one. Show `post.item.url` as the post's link.
|
|
158
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.**
|
|
159
|
+
- **Indexes.** The server gives every post 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. Readers can number the posts and load only the archives they need. An edit sends the post with its index, which tells the server which post it is.
|
|
160
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.
|
|
161
161
|
|
|
162
162
|
### Mentions and submissions
|
package/dist/discovery.d.ts
CHANGED
|
@@ -40,6 +40,11 @@ export interface PupsServer {
|
|
|
40
40
|
* (RFC-6 "Built-in receiver"). Feeds opt in with `feed.enableComments()`.
|
|
41
41
|
*/
|
|
42
42
|
commentEndpoint?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the server keeps feeds with the RFC-7 marker (`kept_feeds`): it writes their archives, and takes single
|
|
45
|
+
* items by POST. `PupsFeed` needs it to post.
|
|
46
|
+
*/
|
|
47
|
+
keptFeeds: boolean;
|
|
43
48
|
maxUploadBytes: number;
|
|
44
49
|
specVersion: string;
|
|
45
50
|
/** 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,wFAA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AAyF;IACzF,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUrD;AAoBD;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAmB/G;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,UAAU,CAmE9F"}
|
package/dist/discovery.js
CHANGED
|
@@ -133,6 +133,7 @@ export function parseConfig(json, domain, identityHosts) {
|
|
|
133
133
|
...hostMetaEndpoint ? { hostMetaEndpoint } : {},
|
|
134
134
|
...postEndpoint ? { postEndpoint } : {},
|
|
135
135
|
...commentEndpoint ? { commentEndpoint } : {},
|
|
136
|
+
keptFeeds: raw.kept_feeds === true,
|
|
136
137
|
maxUploadBytes: maxUploadBytes,
|
|
137
138
|
specVersion,
|
|
138
139
|
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":[],"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ACL,MAAM;QACN,aAAa;QACb,MAAM;QACN,qBAAqB,EAAE,KAAK,CAAC,wBAAwB,CAAC;QACtD,aAAa,EAAE,KAAK,CAAC,gBAAgB,CAAC;QACtC,kBAAkB,EAAE,KAAK,CAAC,qBAAqB,CAAC;QAChD,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC;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,SAAS,EAAE,GAAG,CAAC,UAAU,KAAK,IAAI;QAClC,cAAc,EAAE,cAAwB;QACxC,WAAW;QACX,GAAG;KACJ,CAAA;AACH,CAAC"}
|
package/dist/errors.js
CHANGED
|
@@ -48,7 +48,7 @@ export async function errorFromResponse(response, what) {
|
|
|
48
48
|
const serverMessage = typeof body.message == 'string' ? body.message : undefined;
|
|
49
49
|
const code = status == 400
|
|
50
50
|
? serverError == 'invalid_path' ? 'invalid_path' : 'invalid_request'
|
|
51
|
-
: statusCodes[status] ?? 'server_error';
|
|
51
|
+
: serverError == 'not_pups_controlled' ? serverError : statusCodes[status] ?? 'server_error';
|
|
52
52
|
const retryAfterHeader = Number(response.headers.get('Retry-After'));
|
|
53
53
|
return new PupsError(code, `${what} failed with HTTP ${status}${serverMessage ? `: ${serverMessage}` : ''}`, {
|
|
54
54
|
status,
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AA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;IAAC,MAAM,CAAC;QACP,4FAA4F;IAC9F,CAAC;IACD,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAA;IAC9B,MAAM,WAAW,GAAG,OAAO,IAAI,CAAC,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;IAC1E,MAAM,aAAa,GAAG,OAAO,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;IAChF,MAAM,IAAI,GAAkB,MAAM,IAAI,GAAG;QACvC,CAAC,CAAC,WAAW,IAAI,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB;QACpE,CAAC,CAAC,WAAW,IAAI,qBAAqB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,cAAc,CAAA;IAC9F,MAAM,gBAAgB,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAA;IACpE,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,GAAG,IAAI,qBAAqB,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE;QAC3G,MAAM;QACN,aAAa;QACb,UAAU,EAAE,gBAAgB,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS;KAChE,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/feed.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { Body, PupsSession } from './session.js';
|
|
|
5
5
|
export declare const FEED_REL = "https://bigwide.net/ns/feed";
|
|
6
6
|
/**
|
|
7
7
|
* The site property in `host-meta.json` with the URL template of the pages that show single posts, e.g.
|
|
8
|
-
* `https://tim.example/p/{feed}/post/{index}` (RFC-6 "Post URLs"
|
|
8
|
+
* `https://tim.example/p/{feed}/post/{index}` (RFC-6 "Post URLs"). The server fills it into new posts.
|
|
9
9
|
*/
|
|
10
10
|
export declare const POST_URL_TEMPLATE = "https://bigwide.net/ns/post-url-template";
|
|
11
11
|
/** The `about` of the `_pups` object: RFC-7. Not its final location; readers must not rely on it. */
|
|
@@ -53,15 +53,13 @@ export interface ItemArchive {
|
|
|
53
53
|
index?: number;
|
|
54
54
|
[field: string]: unknown;
|
|
55
55
|
}
|
|
56
|
-
/** @deprecated The index moved from `_pups` to `_archive` (RFC-13): use ItemArchive. */
|
|
57
|
-
export type ItemMarker = ItemArchive;
|
|
58
56
|
/** The `_pups` object of a feed file or archive: the marker of RFC-7. */
|
|
59
57
|
export interface PupsMarker {
|
|
60
58
|
about?: string;
|
|
61
59
|
pupsControlled?: boolean;
|
|
62
60
|
[field: string]: unknown;
|
|
63
61
|
}
|
|
64
|
-
/** The `_archive` object of a feed file or archive (RFC-13). */
|
|
62
|
+
/** The `_archive` object of a feed file or archive (RFC-13). The server writes it. */
|
|
65
63
|
export interface ArchiveFields {
|
|
66
64
|
about?: string;
|
|
67
65
|
/** In the feed file: the public URL of the newest archive. */
|
|
@@ -74,10 +72,7 @@ export interface ArchiveFields {
|
|
|
74
72
|
updates_url?: string;
|
|
75
73
|
/** In an archive: its number, from 0 for the oldest. */
|
|
76
74
|
number?: number;
|
|
77
|
-
/**
|
|
78
|
-
* The index the next new item gets (RFC-13 "Indexes"). Valid in the newest archive, or in the feed file of a feed
|
|
79
|
-
* without archives.
|
|
80
|
-
*/
|
|
75
|
+
/** In the newest archive: the index the next new item gets (RFC-13 "Indexes"). */
|
|
81
76
|
next_index?: number;
|
|
82
77
|
[field: string]: unknown;
|
|
83
78
|
}
|
|
@@ -183,13 +178,13 @@ export type PostChanges = {
|
|
|
183
178
|
};
|
|
184
179
|
export interface PostResult {
|
|
185
180
|
id: string;
|
|
186
|
-
/** The item's index (RFC-
|
|
181
|
+
/** The item's index (RFC-13 "Indexes"). */
|
|
187
182
|
index?: number;
|
|
188
183
|
/** The item as stored. */
|
|
189
184
|
item: FeedItem;
|
|
190
185
|
/**
|
|
191
|
-
* The URL of
|
|
192
|
-
* as the `source` of an RFC-4 webmention.
|
|
186
|
+
* The item's address: the URL of its archive plus `#<id>` (RFC-13 "Items"). Items never leave their archive, so it
|
|
187
|
+
* never changes; use it e.g. as the `source` of an RFC-4 webmention. The post's page, if it has one, is `item.url`.
|
|
193
188
|
*/
|
|
194
189
|
url: string;
|
|
195
190
|
/**
|
|
@@ -211,7 +206,7 @@ export type FeedState =
|
|
|
211
206
|
{
|
|
212
207
|
status: 'missing';
|
|
213
208
|
}
|
|
214
|
-
/** A feed
|
|
209
|
+
/** A feed kept by the PUPS server, ready to write. */
|
|
215
210
|
| {
|
|
216
211
|
status: 'pups';
|
|
217
212
|
feed: FeedDocument;
|
|
@@ -227,28 +222,8 @@ export type FeedState =
|
|
|
227
222
|
status: 'invalid';
|
|
228
223
|
};
|
|
229
224
|
export interface FeedOptions {
|
|
230
|
-
/** How
|
|
231
|
-
maxItems?: number;
|
|
232
|
-
/** How many items an archive holds. Default 20 (RFC-7 "Archives"); other clients expect 20. */
|
|
233
|
-
archiveSize?: number;
|
|
234
|
-
/**
|
|
235
|
-
* Whether to start archives for a feed that has none, on its next post (RFC-7 "Starting the archives").
|
|
236
|
-
* Default true. With false, posts to such a feed only go into the feed file, and items beyond `maxItems` are
|
|
237
|
-
* dropped. Feeds that have archives always keep them.
|
|
238
|
-
*/
|
|
239
|
-
startArchives?: boolean;
|
|
240
|
-
/**
|
|
241
|
-
* Optional: keep fewer items in the feed file when it would be larger than this many bytes, but at least 10
|
|
242
|
-
* (RFC-7 "Size in bytes").
|
|
243
|
-
*/
|
|
244
|
-
maxBytes?: number;
|
|
245
|
-
/** How often an operation is repeated when another client changed the feed in between. Default 8. */
|
|
225
|
+
/** How often a change of the feed's settings is repeated when someone changed the feed in between. Default 8. */
|
|
246
226
|
maxAttempts?: number;
|
|
247
|
-
/**
|
|
248
|
-
* Whether posts of a feed with archives get a `url` from the site's post URL template, if `host-meta.json`
|
|
249
|
-
* declares one and the post has no `url` (RFC-7 "Post URLs"). Default true.
|
|
250
|
-
*/
|
|
251
|
-
postUrls?: boolean;
|
|
252
227
|
/**
|
|
253
228
|
* Whether to send RFC-11 mentions after `addPost()`, `editPost()` and `deletePost()`: to the domains a post names
|
|
254
229
|
* (`@tim.example.com`) and to the author of the item it answers. `true` uses `session.mentions`. Default false.
|
|
@@ -277,17 +252,18 @@ type WithMentions = Signal & {
|
|
|
277
252
|
};
|
|
278
253
|
/** The scopes an app needs to write a feed: the feed file and the feed directory (RFC-7 "Server requirements"). */
|
|
279
254
|
export declare function feedScopes(name?: string): Scope[];
|
|
280
|
-
/** The index of an item (RFC-13 "Indexes"),
|
|
255
|
+
/** The index of an item (RFC-13 "Indexes"), or undefined if it has none. */
|
|
281
256
|
export declare function itemIndex(item: FeedItem): number | undefined;
|
|
282
257
|
/**
|
|
283
|
-
* A feed on the owner's domain,
|
|
284
|
-
* `/feed/<name>.json`, each with its feed directory for archives, icons and media: `/feed/`, or `/feed/<name>/`.
|
|
258
|
+
* A feed on the owner's domain, kept by the PUPS server according to RFC-7: the main feed `/feed.json`, or a named
|
|
259
|
+
* feed `/feed/<name>.json`, each with its feed directory for archives, icons and media: `/feed/`, or `/feed/<name>/`.
|
|
285
260
|
* The main feed keeps its media in `/feed/images/` and `/feed/media/`, since the rest of `/feed/` belongs to the
|
|
286
261
|
* named feeds.
|
|
287
262
|
*
|
|
288
263
|
* Get one from `session.feed()` or `session.feed('photos')`. The session needs the feed's scopes, see
|
|
289
|
-
* {@link feedScopes}.
|
|
290
|
-
* read-modify-write cycles with ETags, repeated when
|
|
264
|
+
* {@link feedScopes}. Posts are sent to the server one at a time, which gives them their index and puts them into
|
|
265
|
+
* the archives (RFC-13); changes of the feed's settings are read-modify-write cycles with ETags, repeated when
|
|
266
|
+
* another app wrote in between.
|
|
291
267
|
*/
|
|
292
268
|
export declare class PupsFeed {
|
|
293
269
|
#private;
|
|
@@ -305,14 +281,15 @@ export declare class PupsFeed {
|
|
|
305
281
|
get scopes(): Scope[];
|
|
306
282
|
/** Whether the session may write the feed file and the feed directory. */
|
|
307
283
|
get writable(): boolean;
|
|
308
|
-
/** Reads the feed file and tells whether it exists, and whether
|
|
284
|
+
/** Reads the feed file and tells whether it exists, and whether the server keeps it. */
|
|
309
285
|
load(options?: Signal): Promise<FeedState>;
|
|
310
286
|
/**
|
|
311
|
-
* Sets up a new feed (RFC-7 "Setting up a feed"): uploads the icons, writes the feed file with the
|
|
312
|
-
* and
|
|
287
|
+
* Sets up a new feed (RFC-7 "Setting up a feed"): uploads the icons, writes the feed file with the `_pups` marker,
|
|
288
|
+
* and registers the feed in `host-meta.json` (unless `register` is false). The server sets the fixed fields.
|
|
313
289
|
* @returns `registered`: false if the feed couldn't be registered; call `register()` again later, or tell the owner
|
|
314
290
|
* to add the link to `host-meta.json` by hand.
|
|
315
|
-
* @throws {PupsError} `precondition_failed` if the feed file exists already; `insufficient_scope
|
|
291
|
+
* @throws {PupsError} `precondition_failed` if the feed file exists already; `insufficient_scope`; `unsupported` if
|
|
292
|
+
* the server doesn't keep feeds.
|
|
316
293
|
*/
|
|
317
294
|
create(setup: FeedSetup, options?: Signal & {
|
|
318
295
|
register?: boolean;
|
|
@@ -365,27 +342,19 @@ export declare class PupsFeed {
|
|
|
365
342
|
folder?: string;
|
|
366
343
|
}): Promise<MediaResult>;
|
|
367
344
|
/**
|
|
368
|
-
* Adds a post (RFC-7 "Posting
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
* media with `uploadMedia()` before posting.
|
|
372
|
-
* In a feed with archives, a post without `url` gets one from the site's post URL template, if `host-meta.json`
|
|
373
|
-
* has one and `postUrls` isn't false: the page that shows the post (RFC-7 "Post URLs").
|
|
345
|
+
* Adds a post (RFC-7 "Posting items"): sends it to the server, which gives it its index, puts it into the newest
|
|
346
|
+
* archive and at the top of the feed file, and, if the site declares a post URL template, gives it the `url` of
|
|
347
|
+
* its page. Upload media with `uploadMedia()` before posting.
|
|
374
348
|
* With the option `mentions`, the domains the post names and the author of the item it answers are notified
|
|
375
349
|
* (RFC-11) once the post is visible; see `PostResult.mentions`.
|
|
376
|
-
* @returns the post, with `url`: its
|
|
377
|
-
*
|
|
378
|
-
*
|
|
350
|
+
* @returns the post as stored, with `url`: its address, which never changes. The post's page, if it has one, is
|
|
351
|
+
* `item.url`.
|
|
352
|
+
* @throws {PupsError} `not_found` if the feed doesn't exist; `not_pups_controlled`; `unsupported` if the server
|
|
353
|
+
* doesn't keep feeds.
|
|
379
354
|
*/
|
|
380
355
|
addPost(input: PostInput, options?: WithMentions): Promise<PostResult>;
|
|
381
356
|
/**
|
|
382
|
-
*
|
|
383
|
-
* `addPost()` does this by itself before the first post to a feed that hasn't been indexed yet; call it to
|
|
384
|
-
* index a feed without posting.
|
|
385
|
-
*/
|
|
386
|
-
assignIndexes(options?: Signal): Promise<void>;
|
|
387
|
-
/**
|
|
388
|
-
* Finds a post by id in the archives (or, for a handed-over feed without archives yet, in the feed file).
|
|
357
|
+
* Finds a post by id in the archives.
|
|
389
358
|
* @returns undefined if there is no such post.
|
|
390
359
|
*/
|
|
391
360
|
getPost(id: string, options?: Signal): Promise<PostResult | undefined>;
|
|
@@ -395,21 +364,20 @@ export declare class PupsFeed {
|
|
|
395
364
|
*/
|
|
396
365
|
posts(options?: Signal): AsyncGenerator<FeedItem>;
|
|
397
366
|
/**
|
|
398
|
-
* Edits a post
|
|
399
|
-
*
|
|
400
|
-
* a function that gets a copy of the item and returns the new item, or
|
|
401
|
-
*
|
|
367
|
+
* Edits a post (RFC-7 "Posting items"): reads it from its archive, applies `changes`, and sends it to the server,
|
|
368
|
+
* which replaces it in its archive and in the feed file and sets `date_modified`. `changes` is either an object (a
|
|
369
|
+
* value sets a field, `null` removes it), or a function that gets a copy of the item and returns the new item, or
|
|
370
|
+
* `undefined` to leave it unchanged. The post keeps its id and index.
|
|
402
371
|
*
|
|
403
372
|
* 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.
|
|
405
|
-
* archives that has no `url`, and had none before, gets one from the post URL template, as in `addPost()`.
|
|
373
|
+
* `mentions`, everyone the old or the new version mentions is notified.
|
|
406
374
|
* @throws {PupsError} `not_found`
|
|
407
375
|
*/
|
|
408
376
|
editPost(id: string, changes: PostChanges | ((item: FeedItem) => FeedItem | undefined | Promise<FeedItem | undefined>), options?: WithMentions): Promise<PostResult>;
|
|
409
377
|
/**
|
|
410
|
-
* Deletes a post from its archive and from the feed file, which
|
|
411
|
-
* from the archives. With `deleteMedia`, it also deletes the files in the feed directory that the
|
|
412
|
-
* and no other post does; this reads all archives.
|
|
378
|
+
* Deletes a post (RFC-7 "Posting items"): the server removes it from its archive and from the feed file, which it
|
|
379
|
+
* fills up again from the archives. With `deleteMedia`, it also deletes the files in the feed directory that the
|
|
380
|
+
* post references and no other post does; this reads all archives.
|
|
413
381
|
* @returns the deleted item, and the public URLs of the deleted media files.
|
|
414
382
|
* @throws {PupsError} `not_found`
|
|
415
383
|
*/
|
|
@@ -430,9 +398,9 @@ export declare class PupsFeed {
|
|
|
430
398
|
}): Promise<MentionReport[]>;
|
|
431
399
|
/**
|
|
432
400
|
* 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
|
|
434
|
-
*
|
|
435
|
-
*
|
|
401
|
+
* (RFC-4 "Submitting"): `source` is the post's address, `target` its `_source.inReplyTo`. Call it after `addPost()`
|
|
402
|
+
* or `editPost()`, also to submit an edit or a delete again. Show the target's terms of service and what its
|
|
403
|
+
* `republish` means before the first submission.
|
|
436
404
|
* @throws {PupsError} `not_found`; `invalid_request` if the post answers nothing; `unsupported` if the target
|
|
437
405
|
* feed takes no submissions.
|
|
438
406
|
* @deprecated Comments and group posts don't belong in a feed for readers (RFC-7 "Comment feeds"). Use
|
package/dist/feed.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,CAAA;AAGrD,mGAAmG;AACnG,eAAO,MAAM,QAAQ,gCAAgC,CAAA;AAErD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,6CAA6C,CAAA;AAE3E,qGAAqG;AACrG,eAAO,MAAM,cAAc,qFAAqF,CAAA;AAEhH,wGAAwG;AACxG,eAAO,MAAM,YAAY,+EAA+E,CAAA;
|
|
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,CAAA;AAGrD,mGAAmG;AACnG,eAAO,MAAM,QAAQ,gCAAgC,CAAA;AAErD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,6CAA6C,CAAA;AAE3E,qGAAqG;AACrG,eAAO,MAAM,cAAc,qFAAqF,CAAA;AAEhH,wGAAwG;AACxG,eAAO,MAAM,YAAY,+EAA+E,CAAA;AAgBxG,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA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