@graffiti-garden/api 0.6.3 → 1.0.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 +0 -4
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +3 -3
- package/dist/src/1-api.d.ts +198 -330
- package/dist/src/1-api.d.ts.map +1 -1
- package/dist/src/2-types.d.ts +52 -161
- package/dist/src/2-types.d.ts.map +1 -1
- package/dist/src/3-errors.d.ts +2 -2
- package/dist/src/3-errors.d.ts.map +1 -1
- package/dist/tests/crud.d.ts +1 -1
- package/dist/tests/crud.d.ts.map +1 -1
- package/dist/tests/discover.d.ts +1 -1
- package/dist/tests/discover.d.ts.map +1 -1
- package/dist/tests/index.d.ts +0 -4
- package/dist/tests/index.d.ts.map +1 -1
- package/dist/tests/utils.d.ts +3 -3
- package/dist/tests/utils.d.ts.map +1 -1
- package/dist/tests.mjs +3 -1269
- package/dist/tests.mjs.map +4 -4
- package/package.json +6 -7
- package/src/1-api.ts +203 -338
- package/src/2-types.ts +53 -166
- package/src/3-errors.ts +6 -6
- package/tests/crud.ts +42 -320
- package/tests/discover.ts +51 -349
- package/tests/index.ts +2 -4
- package/tests/utils.ts +4 -4
- package/dist/tests/channel-stats.d.ts +0 -3
- package/dist/tests/channel-stats.d.ts.map +0 -1
- package/dist/tests/orphans.d.ts +0 -3
- package/dist/tests/orphans.d.ts.map +0 -1
- package/tests/channel-stats.ts +0 -129
- package/tests/orphans.ts +0 -128
package/dist/src/1-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1-api.d.ts","sourceRoot":"","sources":["../../src/1-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,
|
|
1
|
+
{"version":3,"file":"1-api.d.ts","sourceRoot":"","sources":["../../src/1-api.ts"],"names":[],"mappings":"AAAA,OAAO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2
|
-
import type { Operation as JSONPatchOperation } from "fast-json-patch";
|
|
3
2
|
/**
|
|
4
3
|
* Objects are the atomic unit in Graffiti that can represent both data (*e.g.* a social media post or profile)
|
|
5
4
|
* and activities (*e.g.* a like or follow).
|
|
6
|
-
* Objects are created and modified by a single {@link actor | `actor`}.
|
|
7
5
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* Each object embeds the {@link actor | `actor`} that created it.
|
|
7
|
+
* Object content and metadata are static but an object may be deleted by
|
|
8
|
+
* its creating {@link actor | `actor`}.
|
|
9
|
+
*
|
|
10
|
+
* An object's content is stored in its {@link value | `value`} property, which can be any JSON
|
|
11
|
+
* object. However, it is recommended to use properties from the
|
|
10
12
|
* [Activity Vocabulary](https://www.w3.org/TR/activitystreams-vocabulary/)
|
|
11
13
|
* or properties that emerge in the Graffiti [folksonomy](https://en.wikipedia.org/wiki/Folksonomy)
|
|
12
14
|
* to promote interoperability.
|
|
13
15
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* The {@link channels | `channels`} and {@link allowed | `allowed`} properties
|
|
17
|
-
* enable the object's creator to shape the visibility of and access to their object.
|
|
16
|
+
* Each object is globally addressable via its {@link url | `url`}.
|
|
18
17
|
*
|
|
19
|
-
*
|
|
18
|
+
* An object's {@link channels | `channels`} and {@link allowed | `allowed`} properties
|
|
19
|
+
* are set by an objects creator to shape the visibility of and access to their object.
|
|
20
20
|
*/
|
|
21
21
|
export interface GraffitiObjectBase {
|
|
22
22
|
/**
|
|
@@ -32,11 +32,11 @@ export interface GraffitiObjectBase {
|
|
|
32
32
|
* {@link Graffiti.discover} method. This allows creators to express the intended audience of their object
|
|
33
33
|
* which helps to prevent [context collapse](https://en.wikipedia.org/wiki/Context_collapse) even
|
|
34
34
|
* in the highly interoperable ecosystem that Graffiti envisions. For example, channel URIs may be:
|
|
35
|
-
* - A
|
|
36
|
-
* the object to the
|
|
37
|
-
* - The URL of a Graffiti post.
|
|
35
|
+
* - A actor's own {@link actor | `actor`} URI. Posting an object to this channel is a way to broadcast
|
|
36
|
+
* the object to the actor's followers, like posting a tweet.
|
|
37
|
+
* - The URL of a Graffiti post. Posting an object to this channel is a way to broadcast to anyone viewing
|
|
38
38
|
* the post, like commenting on a tweet.
|
|
39
|
-
* - A URI representing a topic.
|
|
39
|
+
* - A URI representing a topic. Posting an object to this channel is a way to broadcast to anyone interested
|
|
40
40
|
* in that topic, like posting in a subreddit.
|
|
41
41
|
*/
|
|
42
42
|
channels: string[];
|
|
@@ -46,18 +46,19 @@ export interface GraffitiObjectBase {
|
|
|
46
46
|
* also know the right {@link channels | `channel` } to look in). An object can always be accessed by its creator, even if
|
|
47
47
|
* the `allowed` array is empty.
|
|
48
48
|
*
|
|
49
|
-
* The `allowed` array is not revealed to
|
|
50
|
-
* a BCC email.
|
|
49
|
+
* The `allowed` array is not revealed to actors other than the creator, like
|
|
50
|
+
* a BCC email. An actor may choose to add a `to` property to the object's {@link value | `value`} to indicate
|
|
51
51
|
* other recipients, however this is not enforced by Graffiti and may not accurately reflect the actual `allowed` array.
|
|
52
52
|
*
|
|
53
53
|
* `allowed` can be combined with {@link channels | `channels`}. For example, to send someone a direct message
|
|
54
|
-
* the sender should
|
|
54
|
+
* the sender should post their object to the channel of the recipient's {@link actor | `actor`} URI to notify them of the message and also add
|
|
55
55
|
* the recipient's {@link actor | `actor`} URI to the `allowed` array to prevent others from seeing the message.
|
|
56
56
|
*/
|
|
57
57
|
allowed?: string[] | null;
|
|
58
58
|
/**
|
|
59
|
-
* The URI of the `actor` that {@link Graffiti.
|
|
60
|
-
*
|
|
59
|
+
* The URI of the `actor` that {@link Graffiti.post | created } the object.
|
|
60
|
+
* This `actor` has the unique permission to
|
|
61
|
+
* {@link Graffiti.delete | delete} the object.
|
|
61
62
|
*
|
|
62
63
|
* We borrow the term actor from the ActivityPub because
|
|
63
64
|
* [like in ActivityPub](https://www.w3.org/TR/activitypub/#h-note-0)
|
|
@@ -72,8 +73,6 @@ export interface GraffitiObjectBase {
|
|
|
72
73
|
/**
|
|
73
74
|
* A globally unique identifier and locator for the object. It can be used to point to
|
|
74
75
|
* an object or to retrieve the object directly with {@link Graffiti.get}.
|
|
75
|
-
* If an object is {@link Graffiti.put | put} with the same URL
|
|
76
|
-
* as an existing object, the existing object will be replaced with the new object.
|
|
77
76
|
*
|
|
78
77
|
* An object's URL is generated when the object is first created and
|
|
79
78
|
* should include sufficient randomness to prevent collisions
|
|
@@ -82,24 +81,11 @@ export interface GraffitiObjectBase {
|
|
|
82
81
|
* to pull from multiple coexisting Graffiti implementations without collision.
|
|
83
82
|
* Existing schemes include `graffiti:local:` for objects stored locally
|
|
84
83
|
* (see the [local implementation](https://github.com/graffiti-garden/implementation-local))
|
|
85
|
-
* and `graffiti:remote:` for objects stored on Graffiti-specific web servers (see the
|
|
86
|
-
* [remote implementation](https://github.com/graffiti-garden/implementation-remote)).
|
|
84
|
+
* and `graffiti:remote:` for objects stored on Graffiti-specific web servers (see the [remote implementation](https://github.com/graffiti-garden/implementation-remote))
|
|
87
85
|
* Options available in the future might include `graffiti:solid:` for objects stored on Solid servers
|
|
88
86
|
* or `graffiti:p2p:` for objects stored on a peer-to-peer network.
|
|
89
87
|
*/
|
|
90
88
|
url: string;
|
|
91
|
-
/**
|
|
92
|
-
* The time the object was last modified, measured in milliseconds since January 1, 1970.
|
|
93
|
-
* It can be used to compare object versions.
|
|
94
|
-
* A number, rather than an ISO string or Date object, is used for easy comparison, sorting,
|
|
95
|
-
* and JSON Schema [range queries](https://json-schema.org/understanding-json-schema/reference/numeric#range).
|
|
96
|
-
*
|
|
97
|
-
* It is possible to use this value to sort objects in a user's interface but in many cases it would be better to
|
|
98
|
-
* use a [`published`](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-published)
|
|
99
|
-
* property in the object's {@link value | `value`} to indicate when the object was created
|
|
100
|
-
* rather than when it was modified.
|
|
101
|
-
*/
|
|
102
|
-
lastModified: number;
|
|
103
89
|
}
|
|
104
90
|
/**
|
|
105
91
|
* This type constrains the {@link GraffitiObjectBase} type to adhere to a
|
|
@@ -140,42 +126,35 @@ export declare const GraffitiObjectJSONSchema: {
|
|
|
140
126
|
readonly actor: {
|
|
141
127
|
readonly type: "string";
|
|
142
128
|
};
|
|
143
|
-
readonly lastModified: {
|
|
144
|
-
readonly type: "number";
|
|
145
|
-
};
|
|
146
129
|
};
|
|
147
130
|
readonly additionalProperties: false;
|
|
148
|
-
readonly required: readonly ["value", "channels", "actor", "url"
|
|
131
|
+
readonly required: readonly ["value", "channels", "actor", "url"];
|
|
149
132
|
};
|
|
150
133
|
/**
|
|
151
134
|
* This is an object containing only the {@link GraffitiObjectBase.url | `url`}
|
|
152
135
|
* property of a {@link GraffitiObjectBase | GraffitiObject}.
|
|
153
|
-
* It is used as a utility type so that
|
|
154
|
-
* {@link Graffiti.
|
|
136
|
+
* It is used as a utility type so that applications can call
|
|
137
|
+
* {@link Graffiti.delete} directly on an object
|
|
155
138
|
* rather than on `object.url`.
|
|
156
139
|
*/
|
|
157
140
|
export type GraffitiObjectUrl = Pick<GraffitiObjectBase, "url">;
|
|
158
141
|
/**
|
|
159
|
-
* This object is a subset of {@link GraffitiObjectBase} that
|
|
160
|
-
* This local copy
|
|
142
|
+
* This object is a subset of {@link GraffitiObjectBase} that must be constructed locally before calling {@link Graffiti.post}.
|
|
143
|
+
* This local copy ignores system-generated properties
|
|
144
|
+
* ({@link GraffitiObjectBase.url | `url`} and {@link GraffitiObjectBase.actor | `actor`}),
|
|
145
|
+
* and may be statically typed with
|
|
161
146
|
* a [JSON schema](https://json-schema.org/) to prevent the accidental creation of erroneous objects.
|
|
162
147
|
*
|
|
163
148
|
* This local object must have a {@link GraffitiObjectBase.value | `value`} and {@link GraffitiObjectBase.channels | `channels`}
|
|
164
149
|
* and may optionally have an {@link GraffitiObjectBase.allowed | `allowed`} property.
|
|
165
|
-
*
|
|
166
|
-
* It may also include a {@link GraffitiObjectBase.url | `url`} property to specify the
|
|
167
|
-
* URL of an existing object to replace. If no `url` is provided, one will be generated during object creation.
|
|
168
|
-
*
|
|
169
|
-
* This object does not need a {@link GraffitiObjectBase.lastModified | `lastModified`}
|
|
170
|
-
* property since it will be automatically generated by the Graffiti system.
|
|
171
150
|
*/
|
|
172
|
-
export type
|
|
151
|
+
export type GraffitiPostObject<Schema extends JSONSchema> = Pick<GraffitiObjectBase, "value" | "channels" | "allowed"> & Partial<GraffitiObjectBase> & FromSchema<Schema & typeof GraffitiPostObjectJSONSchema>;
|
|
173
152
|
/**
|
|
174
|
-
* A JSON Schema equivalent to the {@link
|
|
153
|
+
* A JSON Schema equivalent to the {@link GraffitiPostObject} type.
|
|
175
154
|
* Needed internally for type inference of JSON Schemas, but can
|
|
176
155
|
* be used by implementations to validate objects.
|
|
177
156
|
*/
|
|
178
|
-
export declare const
|
|
157
|
+
export declare const GraffitiPostObjectJSONSchema: {
|
|
179
158
|
readonly required: readonly ["value", "channels"];
|
|
180
159
|
readonly type: "object";
|
|
181
160
|
readonly properties: {
|
|
@@ -201,21 +180,17 @@ export declare const GraffitiPutObjectJSONSchema: {
|
|
|
201
180
|
readonly actor: {
|
|
202
181
|
readonly type: "string";
|
|
203
182
|
};
|
|
204
|
-
readonly lastModified: {
|
|
205
|
-
readonly type: "number";
|
|
206
|
-
};
|
|
207
183
|
};
|
|
208
184
|
readonly additionalProperties: false;
|
|
209
185
|
};
|
|
210
186
|
/**
|
|
211
187
|
* This object contains information that the underlying implementation can
|
|
212
|
-
* use to
|
|
213
|
-
* particular {@link GraffitiObjectBase.actor | `actor`}.
|
|
188
|
+
* use to authenticate a particular {@link GraffitiObjectBase.actor | `actor`}.
|
|
214
189
|
* This object is required of all {@link Graffiti} methods
|
|
215
|
-
* that modify objects and is optional for methods that read objects.
|
|
190
|
+
* that modify objects or media and is optional for methods that read objects.
|
|
216
191
|
*
|
|
217
192
|
* At a minimum the `session` object must contain the
|
|
218
|
-
* {@link GraffitiSession.actor | `actor`} URI
|
|
193
|
+
* {@link GraffitiSession.actor | `actor`} URI to authenticate with.
|
|
219
194
|
* However it is likely that the `session` object must contain other
|
|
220
195
|
* implementation-specific properties.
|
|
221
196
|
* For example, a Solid implementation might include a
|
|
@@ -226,13 +201,10 @@ export declare const GraffitiPutObjectJSONSchema: {
|
|
|
226
201
|
* As to why the `session` object is passed as an argument to every method
|
|
227
202
|
* rather than being an internal property of the {@link Graffiti} instance,
|
|
228
203
|
* this is primarily for type-checking to catch bugs related to login state.
|
|
229
|
-
* Graffiti applications can expose some functionality to
|
|
204
|
+
* Graffiti applications can expose some functionality to people who are not logged in
|
|
230
205
|
* with {@link Graffiti.get} and {@link Graffiti.discover} but without type-checking
|
|
231
206
|
* the `session` it can be easy to forget to hide buttons that trigger
|
|
232
207
|
* other methods that require login.
|
|
233
|
-
* In the future, `session` object may be updated to include scope information
|
|
234
|
-
* and passing the `session` to each method can type-check whether the session provides the
|
|
235
|
-
* necessary permissions.
|
|
236
208
|
*
|
|
237
209
|
* Passing the `session` object per-method also allows for multiple sessions
|
|
238
210
|
* to be used within the same application, like an Email client fetching from
|
|
@@ -240,57 +212,19 @@ export declare const GraffitiPutObjectJSONSchema: {
|
|
|
240
212
|
*/
|
|
241
213
|
export interface GraffitiSession {
|
|
242
214
|
/**
|
|
243
|
-
* The {@link GraffitiObjectBase.actor | `actor`}
|
|
215
|
+
* The {@link GraffitiObjectBase.actor | `actor`} to authenticate with.
|
|
244
216
|
*/
|
|
245
217
|
actor: string;
|
|
246
|
-
/**
|
|
247
|
-
* A yet undefined property detailing what operations the session
|
|
248
|
-
* grants the user to perform. For example, to allow a user to
|
|
249
|
-
* read private messages from a particular set of channels or
|
|
250
|
-
* to allow the user to write object matching a particular schema.
|
|
251
|
-
*/
|
|
252
|
-
scope?: {};
|
|
253
218
|
}
|
|
254
219
|
/**
|
|
255
|
-
*
|
|
256
|
-
* using the {@link Graffiti.patch} method. The patches must
|
|
257
|
-
* be an array of [JSON Patch](https://jsonpatch.com) operations.
|
|
258
|
-
* Patches can only be applied to the
|
|
259
|
-
* {@link GraffitiObjectBase.value | `value`}, {@link GraffitiObjectBase.channels | `channels`},
|
|
260
|
-
* and {@link GraffitiObjectBase.allowed | `allowed`} properties since the other
|
|
261
|
-
* properties either describe the object's location or are automatically generated.
|
|
262
|
-
* (See also {@link GraffitiPutObject}).
|
|
263
|
-
*/
|
|
264
|
-
export interface GraffitiPatch {
|
|
265
|
-
/**
|
|
266
|
-
* An array of [JSON Patch](https://jsonpatch.com) operations to
|
|
267
|
-
* modify the object's {@link GraffitiObjectBase.value | `value`}. The resulting
|
|
268
|
-
* `value` must still be a JSON object.
|
|
269
|
-
*/
|
|
270
|
-
value?: JSONPatchOperation[];
|
|
271
|
-
/**
|
|
272
|
-
* An array of [JSON Patch](https://jsonpatch.com) operations to
|
|
273
|
-
* modify the object's {@link GraffitiObjectBase.channels | `channels`}. The resulting
|
|
274
|
-
* `channels` must still be an array of strings.
|
|
275
|
-
*/
|
|
276
|
-
channels?: JSONPatchOperation[];
|
|
277
|
-
/**
|
|
278
|
-
* An array of [JSON Patch](https://jsonpatch.com) operations to
|
|
279
|
-
* modify the object's {@link GraffitiObjectBase.allowed | `allowed`} property. The resulting
|
|
280
|
-
* `allowed` property must still be an array of strings or `undefined`.
|
|
281
|
-
*/
|
|
282
|
-
allowed?: JSONPatchOperation[];
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* A stream of data that are returned by Graffiti's query-like operations
|
|
286
|
-
* {@link Graffiti.discover} and {@link Graffiti.recoverOrphans}.
|
|
220
|
+
* A stream of data that are returned by {@link Graffiti.discover}.
|
|
287
221
|
*
|
|
288
222
|
* Errors are returned within the stream rather than as
|
|
289
223
|
* exceptions that would halt the entire stream. This is because
|
|
290
224
|
* some implementations may pull data from multiple sources
|
|
291
225
|
* including some that may be unreliable. In many cases,
|
|
292
226
|
* these errors can be safely ignored.
|
|
293
|
-
* See {@link
|
|
227
|
+
* See {@link GraffitiObjectStreamError}.
|
|
294
228
|
*
|
|
295
229
|
* The stream is an [`AsyncGenerator`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
|
|
296
230
|
* that can be iterated over using `for await` loops or calling `next` on the generator.
|
|
@@ -300,14 +234,13 @@ export interface GraffitiPatch {
|
|
|
300
234
|
* function and a {@link GraffitiObjectStreamReturn.cursor | `cursor`} string,
|
|
301
235
|
* each of which can be used to resume the stream from where it left off.
|
|
302
236
|
*/
|
|
303
|
-
export type GraffitiObjectStream<Schema extends JSONSchema> = AsyncGenerator<
|
|
237
|
+
export type GraffitiObjectStream<Schema extends JSONSchema> = AsyncGenerator<GraffitiObjectStreamError | GraffitiObjectStreamEntry<Schema>, GraffitiObjectStreamReturn<Schema>>;
|
|
304
238
|
/**
|
|
305
|
-
* An error that can occur in
|
|
306
|
-
* {@link GraffitiObjectStream} or {@link GraffitiChannelStatsStream}.
|
|
239
|
+
* An error that can occur in a {@link GraffitiObjectStream}.
|
|
307
240
|
*
|
|
308
241
|
* @internal
|
|
309
242
|
*/
|
|
310
|
-
export interface
|
|
243
|
+
export interface GraffitiObjectStreamError {
|
|
311
244
|
/**
|
|
312
245
|
* The error that occurred while streaming data.
|
|
313
246
|
*/
|
|
@@ -327,7 +260,7 @@ export interface GraffitiStreamError {
|
|
|
327
260
|
*/
|
|
328
261
|
export interface GraffitiObjectStreamEntry<Schema extends JSONSchema> {
|
|
329
262
|
/**
|
|
330
|
-
* Empty property for compatibility with {@link
|
|
263
|
+
* Empty property for compatibility with {@link GraffitiObjectStreamError}
|
|
331
264
|
*/
|
|
332
265
|
error?: undefined;
|
|
333
266
|
/**
|
|
@@ -343,13 +276,13 @@ export interface GraffitiObjectStreamEntry<Schema extends JSONSchema> {
|
|
|
343
276
|
* A result from a {@link GraffitiObjectStreamContinue} that indicated
|
|
344
277
|
* an object has been deleted since the original stream was run.
|
|
345
278
|
* Only sparse metadata about the deleted object is returned to respect
|
|
346
|
-
* the deleting
|
|
279
|
+
* the deleting actor's privacy.
|
|
347
280
|
*
|
|
348
281
|
* @internal
|
|
349
282
|
*/
|
|
350
283
|
export interface GraffitiObjectStreamContinueTombstone {
|
|
351
284
|
/**
|
|
352
|
-
* Empty property for compatibility with {@link
|
|
285
|
+
* Empty property for compatibility with {@link GraffitiObjectStreamError}
|
|
353
286
|
*/
|
|
354
287
|
error?: undefined;
|
|
355
288
|
/**
|
|
@@ -359,25 +292,13 @@ export interface GraffitiObjectStreamContinueTombstone {
|
|
|
359
292
|
tombstone: true;
|
|
360
293
|
/**
|
|
361
294
|
* Sparse metadata about the deleted object. The full object is not returned
|
|
362
|
-
* to respect
|
|
295
|
+
* to respect an actor's privacy.
|
|
363
296
|
*/
|
|
364
297
|
object: {
|
|
365
298
|
/**
|
|
366
299
|
* The {@link GraffitiObjectBase.url | `url`} of the deleted object.
|
|
367
300
|
*/
|
|
368
301
|
url: string;
|
|
369
|
-
/**
|
|
370
|
-
* The time at which the object was deleted, comparable to
|
|
371
|
-
* {@link GraffitiObjectBase.lastModified | `lastModified`}.
|
|
372
|
-
*
|
|
373
|
-
* While it is not possible to re-{@link Graffiti.put | put} objects that have been
|
|
374
|
-
* {@link Graffiti.delete | deleted}, objects may appear deleted if
|
|
375
|
-
* an {@link GraffitiObjectBase.actor | `actor`} is no longer
|
|
376
|
-
* {@link GraffitiObjectBase.allowed | `allowed`} to access them.
|
|
377
|
-
* Therefore the {@link GraffitiObjectBase.lastModified | `lastModified`} property
|
|
378
|
-
* is necessary to compare object versions.
|
|
379
|
-
*/
|
|
380
|
-
lastModified: number;
|
|
381
302
|
};
|
|
382
303
|
}
|
|
383
304
|
/**
|
|
@@ -392,7 +313,7 @@ export type GraffitiObjectStreamContinueEntry<Schema extends JSONSchema> = Graff
|
|
|
392
313
|
* that allows the stream to be continued from where it left off.
|
|
393
314
|
*
|
|
394
315
|
* The {@link continue} function preserves the typing of the original stream,
|
|
395
|
-
* where as the {@link cursor} string can be serialized for use after a
|
|
316
|
+
* where as the {@link cursor} string can be serialized for use after a person
|
|
396
317
|
* has closed and reopened an application.
|
|
397
318
|
*
|
|
398
319
|
* The continued stream may include `tombstone`s of objects that have been
|
|
@@ -411,7 +332,7 @@ export interface GraffitiObjectStreamReturn<Schema extends JSONSchema> {
|
|
|
411
332
|
continue: () => GraffitiObjectStreamContinue<Schema>;
|
|
412
333
|
/**
|
|
413
334
|
* A string that can be serialized and stored to resume the stream later.
|
|
414
|
-
* It must be passed to the {@link Graffiti.
|
|
335
|
+
* It must be passed to the {@link Graffiti.continueDiscover} method
|
|
415
336
|
* to resume the stream.
|
|
416
337
|
*/
|
|
417
338
|
cursor: string;
|
|
@@ -419,47 +340,17 @@ export interface GraffitiObjectStreamReturn<Schema extends JSONSchema> {
|
|
|
419
340
|
/**
|
|
420
341
|
* A continutation of the {@link GraffitiObjectStream} type, as returned by
|
|
421
342
|
* the {@link GraffitiObjectStreamReturn.continue} or by using
|
|
422
|
-
* {@link GraffitiObjectStreamReturn.cursor} with {@link Graffiti.
|
|
343
|
+
* {@link GraffitiObjectStreamReturn.cursor} with {@link Graffiti.continueDiscover}.
|
|
423
344
|
*
|
|
424
345
|
* The continued stream may include `tombstone`s of objects that have been
|
|
425
346
|
* deleted since the original stream was run. See {@link GraffitiObjectStreamContinueTombstone}.
|
|
426
347
|
*
|
|
427
348
|
* @internal
|
|
428
349
|
*/
|
|
429
|
-
export type GraffitiObjectStreamContinue<Schema extends JSONSchema> = AsyncGenerator<
|
|
430
|
-
/**
|
|
431
|
-
* Statistic about single channel returned by {@link Graffiti.channelStats}.
|
|
432
|
-
* These statistics only account for contributions made by the
|
|
433
|
-
* querying actor.
|
|
434
|
-
*/
|
|
435
|
-
export type ChannelStats = {
|
|
436
|
-
/**
|
|
437
|
-
* The URI of the channel.
|
|
438
|
-
*/
|
|
439
|
-
channel: string;
|
|
440
|
-
/**
|
|
441
|
-
* The number of objects that the actor has {@link Graffiti.put | put}
|
|
442
|
-
* and not {@link Graffiti.delete | deleted} in the channel.
|
|
443
|
-
*/
|
|
444
|
-
count: number;
|
|
445
|
-
/**
|
|
446
|
-
* The time that the actor {@link GraffitiObjectBase.lastModified | last modified} an object in the channel,
|
|
447
|
-
* measured in milliseconds since January 1, 1970.
|
|
448
|
-
* {@link Graffiti.delete | Deleted} objects do not effect this modification time.
|
|
449
|
-
*/
|
|
450
|
-
lastModified: number;
|
|
451
|
-
};
|
|
452
|
-
/**
|
|
453
|
-
* A stream of data that are returned by Graffiti's {@link Graffiti.channelStats} method.
|
|
454
|
-
* See {@link GraffitiObjectStream} for more information on streams.
|
|
455
|
-
*/
|
|
456
|
-
export type GraffitiChannelStatsStream = AsyncGenerator<GraffitiStreamError | {
|
|
457
|
-
error?: undefined;
|
|
458
|
-
value: ChannelStats;
|
|
459
|
-
}>;
|
|
350
|
+
export type GraffitiObjectStreamContinue<Schema extends JSONSchema> = AsyncGenerator<GraffitiObjectStreamError | GraffitiObjectStreamContinueEntry<Schema>, GraffitiObjectStreamReturn<Schema>>;
|
|
460
351
|
/**
|
|
461
352
|
* The event type produced in {@link Graffiti.sessionEvents}
|
|
462
|
-
* when a
|
|
353
|
+
* when a actor logs in manually from {@link Graffiti.login}
|
|
463
354
|
* or when their session is restored from a previous login.
|
|
464
355
|
* The event name to listen for is `login`.
|
|
465
356
|
*/
|
|
@@ -472,7 +363,7 @@ export type GraffitiLoginEvent = CustomEvent<{
|
|
|
472
363
|
}>;
|
|
473
364
|
/**
|
|
474
365
|
* The event type produced in {@link Graffiti.sessionEvents}
|
|
475
|
-
* when a
|
|
366
|
+
* when a actor logs out either manually with {@link Graffiti.logout}
|
|
476
367
|
* or when their session times out or otherwise becomes invalid.
|
|
477
368
|
* The event name to listen for is `logout`.
|
|
478
369
|
*/
|
|
@@ -491,8 +382,8 @@ export type GraffitiLogoutEvent = CustomEvent<{
|
|
|
491
382
|
* their own {@link GraffitiLoginEvent} events.
|
|
492
383
|
*
|
|
493
384
|
* This event optionally returns an `href` property
|
|
494
|
-
* representing the URL
|
|
495
|
-
*
|
|
385
|
+
* representing the URL that originated a login request,
|
|
386
|
+
* which may be useful for redirecting the user back to
|
|
496
387
|
* the page they were on after login.
|
|
497
388
|
* The event name to listen for is `initialized`.
|
|
498
389
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2-types.d.ts","sourceRoot":"","sources":["../../src/2-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"2-types.d.ts","sourceRoot":"","sources":["../../src/2-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,KAAK,EAAE,EAAE,CAAC;IAEV;;;;;;;;;;;;OAYG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IAEnB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE1B;;;;;;;;;;;;;OAaG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;;;;;;;OAcG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,CAAC,MAAM,SAAS,UAAU,IAAI,kBAAkB,GACxE,UAAU,CAAC,MAAM,GAAG,OAAO,wBAAwB,CAAC,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWN,CAAC;AAEhC;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;AAEhE;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,CAAC,MAAM,SAAS,UAAU,IAAI,IAAI,CAC9D,kBAAkB,EAClB,OAAO,GAAG,UAAU,GAAG,SAAS,CACj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0B,CAAC,MAAM,SAAS,UAAU;IACnE;;;OAGG;IACH,QAAQ,EAAE,MAAM,4BAA4B,CAAC,MAAM,CAAC,CAAC;IACrD;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,4BAA4B,CAAC,MAAM,SAAS,UAAU,IAChE,cAAc,CACZ,yBAAyB,GAAG,iCAAiC,CAAC,MAAM,CAAC,EACrE,0BAA0B,CAAC,MAAM,CAAC,CACnC,CAAC;AAEJ;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,CACxC;IACE,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,GACD;IACE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,eAAe,CAAC;CAC1B,CACJ,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CACzC;IACE,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GACD;IACE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,CACJ,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,+BAA+B,GAAG,WAAW,CACrD;IACE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GACD,IAAI,GACJ,SAAS,CACZ,CAAC"}
|
package/dist/src/3-errors.d.ts
CHANGED
|
@@ -13,10 +13,10 @@ export declare class GraffitiErrorInvalidSchema extends Error {
|
|
|
13
13
|
export declare class GraffitiErrorSchemaMismatch extends Error {
|
|
14
14
|
constructor(message?: string);
|
|
15
15
|
}
|
|
16
|
-
export declare class
|
|
16
|
+
export declare class GraffitiErrorTooLarge extends Error {
|
|
17
17
|
constructor(message?: string);
|
|
18
18
|
}
|
|
19
|
-
export declare class
|
|
19
|
+
export declare class GraffitiErrorNotAcceptable extends Error {
|
|
20
20
|
constructor(message?: string);
|
|
21
21
|
}
|
|
22
22
|
export declare class GraffitiErrorInvalidUrl extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3-errors.d.ts","sourceRoot":"","sources":["../../src/3-errors.ts"],"names":[],"mappings":"AAAA,qBAAa,yBAA0B,SAAQ,KAAK;gBACtC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,2BAA4B,SAAQ,KAAK;gBACxC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,
|
|
1
|
+
{"version":3,"file":"3-errors.d.ts","sourceRoot":"","sources":["../../src/3-errors.ts"],"names":[],"mappings":"AAAA,qBAAa,yBAA0B,SAAQ,KAAK;gBACtC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,2BAA4B,SAAQ,KAAK;gBACxC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,OAAO,CAAC,EAAE,MAAM;CAK7B;AAED,qBAAa,kCAAmC,SAAQ,KAAK;gBAC/C,OAAO,CAAC,EAAE,MAAM;CAK7B"}
|
package/dist/tests/crud.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Graffiti, GraffitiSession } from "@graffiti-garden/api";
|
|
2
|
-
export declare const graffitiCRUDTests: (useGraffiti: () => Pick<Graffiti, "
|
|
2
|
+
export declare const graffitiCRUDTests: (useGraffiti: () => Pick<Graffiti, "post" | "get" | "delete">, useSession1: () => GraffitiSession | Promise<GraffitiSession>, useSession2: () => GraffitiSession | Promise<GraffitiSession>) => void;
|
|
3
3
|
//# sourceMappingURL=crud.d.ts.map
|
package/dist/tests/crud.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crud.d.ts","sourceRoot":"","sources":["../../tests/crud.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,
|
|
1
|
+
{"version":3,"file":"crud.d.ts","sourceRoot":"","sources":["../../tests/crud.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAS9B,eAAO,MAAM,iBAAiB,GAC5B,aAAa,MAAM,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC,EAC5D,aAAa,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,EAC7D,aAAa,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,SAoP9D,CAAC"}
|
package/dist/tests/discover.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Graffiti, GraffitiSession } from "@graffiti-garden/api";
|
|
2
|
-
export declare const graffitiDiscoverTests: (useGraffiti: () => Pick<Graffiti, "discover" | "
|
|
2
|
+
export declare const graffitiDiscoverTests: (useGraffiti: () => Pick<Graffiti, "discover" | "post" | "delete" | "continueDiscover">, useSession1: () => GraffitiSession | Promise<GraffitiSession>, useSession2: () => GraffitiSession | Promise<GraffitiSession>) => void;
|
|
3
3
|
//# sourceMappingURL=discover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../tests/discover.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,QAAQ,EAER,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAQ9B,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,IAAI,CACrB,QAAQ,EACR,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../tests/discover.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,QAAQ,EAER,eAAe,EAEhB,MAAM,sBAAsB,CAAC;AAQ9B,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,IAAI,CACrB,QAAQ,EACR,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,kBAAkB,CACpD,EACD,aAAa,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,EAC7D,aAAa,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,SAkY9D,CAAC"}
|
package/dist/tests/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../tests/index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC"}
|
package/dist/tests/utils.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GraffitiPostObject, GraffitiObjectStream, JSONSchema, GraffitiObject, GraffitiObjectStreamReturn, GraffitiObjectStreamContinue, Graffiti, GraffitiSession } from "@graffiti-garden/api";
|
|
2
2
|
export declare function randomString(): string;
|
|
3
3
|
export declare function randomValue(): {
|
|
4
4
|
[x: string]: string;
|
|
5
5
|
};
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function randomPostObject(): GraffitiPostObject<{}>;
|
|
7
7
|
export declare function nextStreamValue<Schema extends JSONSchema>(iterator: GraffitiObjectStream<Schema>): Promise<GraffitiObject<Schema>>;
|
|
8
|
-
export declare function continueStream<Schema extends JSONSchema>(graffiti: Pick<Graffiti, "
|
|
8
|
+
export declare function continueStream<Schema extends JSONSchema>(graffiti: Pick<Graffiti, "continueDiscover">, streamReturn: GraffitiObjectStreamReturn<Schema>, type: "cursor" | "continue", session?: GraffitiSession | null): GraffitiObjectStreamContinue<Schema>;
|
|
9
9
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../tests/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../tests/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,0BAA0B,EAC1B,4BAA4B,EAC5B,QAAQ,EACR,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B,wBAAgB,YAAY,IAAI,MAAM,CASrC;AAED,wBAAgB,WAAW;;EAI1B;AAED,wBAAgB,gBAAgB,IAAI,kBAAkB,CAAC,EAAE,CAAC,CAKzD;AAED,wBAAsB,eAAe,CAAC,MAAM,SAAS,UAAU,EAC7D,QAAQ,EAAE,oBAAoB,CAAC,MAAM,CAAC,GACrC,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAKjC;AAED,wBAAgB,cAAc,CAAC,MAAM,SAAS,UAAU,EACtD,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,kBAAkB,CAAC,EAC5C,YAAY,EAAE,0BAA0B,CAAC,MAAM,CAAC,EAChD,IAAI,EAAE,QAAQ,GAAG,UAAU,EAC3B,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,GAC/B,4BAA4B,CAAC,MAAM,CAAC,CAStC"}
|