Initial release
[websub-hub] / src / enum.js
diff --git a/src/enum.js b/src/enum.js
new file mode 100644 (file)
index 0000000..8752bfb
--- /dev/null
@@ -0,0 +1,38 @@
+'use strict';
+
+const common = require('./common');
+const { Enum: DingusEnum } = require('@squeep/api-dingus');
+
+const Enum = common.mergeDeep(DingusEnum, {
+  Specification: 'W3C.REC-websub-20180123',
+
+  Mode: {
+    Denied: 'denied',
+    Publish: 'publish',
+    Subscribe: 'subscribe',
+    Unsubscribe: 'unsubscribe',
+  },
+  
+  Header: {
+    Authorization: 'Authorization',
+    From: 'From',
+    LastSeen: 'Last-Seen',
+    Link: 'Link',
+    Location: 'Location',
+    Signature: 'Signature',
+    UserAgent: 'User-Agent',
+    WWWAuthenticate: 'WWW-Authenticate',
+    XHubSignature: 'X-Hub-Signature',
+  },
+
+  ContentType: {
+    ApplicationAtom: 'application/atom+xml',
+    ApplicationRDF: 'application/rdf+xml',
+    ApplicationRSS: 'application/rss+xml',
+    ApplicationXML: 'application/xml',
+    ImageSVG: 'image/svg+xml',
+    TextXML: 'text/xml',
+  },
+});
+
+module.exports = common.freezeDeep(Enum);
\ No newline at end of file