@yaks/hook 0.0.0-stage → 0.2.36

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/vocab.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "$id": "urn:uuid:124c81e9-94ba-47f5-b0d7-d8207732130f",
3
+ "$vocabulary": {
4
+ "https://yak.sh/vocab/core": true,
5
+ "https://yak.sh/vocab/id": true,
6
+ "https://yak.sh/vocab/blob": true
7
+ },
8
+ "title": "hook",
9
+ "$defs": {
10
+ "hook": {
11
+ "$id": "urn:uuid:66e0f5a0-5f2a-4e9a-9d28-8b9610abef69",
12
+ "component": true,
13
+ "type": "object",
14
+ "properties": {
15
+ "source": {
16
+ "$id": "urn:uuid:a1beb809-c161-46a9-89aa-b182dea73047",
17
+ "type": "string",
18
+ "stamped": true,
19
+ "description": "who sent it"
20
+ },
21
+ "event": {
22
+ "$id": "urn:uuid:d0af272f-c927-4d33-868f-02b818883441",
23
+ "type": "string",
24
+ "stamped": true,
25
+ "description": "the event name the sender gave it"
26
+ },
27
+ "payload": {
28
+ "$id": "urn:uuid:844e9a87-57c9-488c-9b9d-c6b38fcc959c",
29
+ "type": "string",
30
+ "store": "blob",
31
+ "stamped": true,
32
+ "description": "the body exactly as delivered"
33
+ },
34
+ "method": {
35
+ "$id": "urn:uuid:8b8ce8c6-c51c-4e01-9cb7-34d59cfe90c6",
36
+ "type": "string",
37
+ "stamped": true,
38
+ "description": "the HTTP method it arrived by"
39
+ },
40
+ "path": {
41
+ "$id": "urn:uuid:a141f4b3-9961-43d6-be38-e61f5d6e499b",
42
+ "type": "string",
43
+ "stamped": true,
44
+ "description": "the path it arrived on"
45
+ },
46
+ "headers": {
47
+ "$id": "urn:uuid:81ec23fa-b3a6-4f39-b795-d060a99dd60e",
48
+ "type": "string",
49
+ "store": "blob",
50
+ "stamped": true,
51
+ "description": "the headers, as sent"
52
+ },
53
+ "verified": {
54
+ "$id": "urn:uuid:5f8e66f3-3add-4509-bd98-8d89f20d5e9d",
55
+ "type": "boolean",
56
+ "stamped": true,
57
+ "description": "whether the sender's signature verified — the same property name @yaks/mail uses in `mail.verified`"
58
+ }
59
+ },
60
+ "description": "an event another system delivered, kept as it arrived — the payload is the body that was sent, not a parsed version of it"
61
+ }
62
+ },
63
+ "kinds": {
64
+ "hook": {
65
+ "$id": "urn:uuid:66e0f5a0-5f2a-4e9a-9d28-8b9610abef69",
66
+ "description": "an event another system delivered, kept as it arrived — the payload is the body that was sent, not a parsed version of it",
67
+ "with": {
68
+ "doc": true
69
+ },
70
+ "prefix": "H"
71
+ }
72
+ }
73
+ }
package/vocab.ts ADDED
@@ -0,0 +1,17 @@
1
+ // The component declarations, and nothing else: the module a server or a
2
+ // browser page imports at `@yaks/hook/vocab`. It reaches no storage, no SQL
3
+ // and no runtime, so a browser tab loading this vocabulary loads nothing else.
4
+
5
+ import type { VocabDoc } from 'jsr:@yaks/vocab@0.2.36'
6
+ import doc from './vocab.json' with { type: 'json' }
7
+ import manifest from './package.json' with { type: 'json' }
8
+
9
+ /** The hook vocabulary, in the form `loadVocab` accepts. */
10
+ export let hookDoc: VocabDoc = doc as VocabDoc
11
+
12
+ /** What this package is: its manifest's description, the one place it is
13
+ * written, which a host stamps on each document here. */
14
+ export let description: string = manifest.description
15
+
16
+ /** Every document this plugin declares. */
17
+ export let docs: VocabDoc[] = [hookDoc]