@sockethub/server 5.0.0-alpha.3

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.
Files changed (118) hide show
  1. package/LICENSE +165 -0
  2. package/README.md +136 -0
  3. package/bin/sockethub +3 -0
  4. package/coverage/tmp/coverage-93126-1649152190997-0.json +1 -0
  5. package/dist/bootstrap/init.d.ts +18 -0
  6. package/dist/bootstrap/init.js +63 -0
  7. package/dist/bootstrap/init.js.map +1 -0
  8. package/dist/bootstrap/platforms.js +75 -0
  9. package/dist/common.d.ts +3 -0
  10. package/dist/common.js +20 -0
  11. package/dist/common.js.map +1 -0
  12. package/dist/config.d.ts +6 -0
  13. package/dist/config.js +102 -0
  14. package/dist/config.js.map +1 -0
  15. package/dist/crypto.d.ts +10 -0
  16. package/dist/crypto.js +38 -0
  17. package/dist/crypto.js.map +1 -0
  18. package/dist/defaults.json +28 -0
  19. package/dist/index.d.ts +2 -0
  20. package/dist/index.js +25 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/janitor.d.ts +15 -0
  23. package/dist/janitor.js +89 -0
  24. package/dist/janitor.js.map +1 -0
  25. package/dist/listener.d.ts +28 -0
  26. package/dist/listener.js +91 -0
  27. package/dist/listener.js.map +1 -0
  28. package/dist/middleware/create-activity-object.d.ts +6 -0
  29. package/dist/middleware/create-activity-object.js +19 -0
  30. package/dist/middleware/create-activity-object.js.map +1 -0
  31. package/dist/middleware/expand-activity-stream.d.ts +2 -0
  32. package/dist/middleware/expand-activity-stream.js +33 -0
  33. package/dist/middleware/expand-activity-stream.js.map +1 -0
  34. package/dist/middleware/expand-activity-stream.test.data.d.ts +480 -0
  35. package/dist/middleware/expand-activity-stream.test.data.js +360 -0
  36. package/dist/middleware/expand-activity-stream.test.data.js.map +1 -0
  37. package/dist/middleware/store-credentials.d.ts +3 -0
  38. package/dist/middleware/store-credentials.js +19 -0
  39. package/dist/middleware/store-credentials.js.map +1 -0
  40. package/dist/middleware/validate.d.ts +2 -0
  41. package/dist/middleware/validate.js +58 -0
  42. package/dist/middleware/validate.js.map +1 -0
  43. package/dist/middleware/validate.test.data.d.ts +532 -0
  44. package/dist/middleware/validate.test.data.js +263 -0
  45. package/dist/middleware/validate.test.data.js.map +1 -0
  46. package/dist/middleware.d.ts +10 -0
  47. package/dist/middleware.js +54 -0
  48. package/dist/middleware.js.map +1 -0
  49. package/dist/platform-instance.d.ts +77 -0
  50. package/dist/platform-instance.js +211 -0
  51. package/dist/platform-instance.js.map +1 -0
  52. package/dist/platform.d.ts +6 -0
  53. package/dist/platform.js +187 -0
  54. package/dist/platform.js.map +1 -0
  55. package/dist/process-manager.d.ts +11 -0
  56. package/dist/process-manager.js +78 -0
  57. package/dist/process-manager.js.map +1 -0
  58. package/dist/routes.d.ts +13 -0
  59. package/dist/routes.js +83 -0
  60. package/dist/routes.js.map +1 -0
  61. package/dist/sockethub.d.ts +39 -0
  62. package/dist/sockethub.js +119 -0
  63. package/dist/sockethub.js.map +1 -0
  64. package/dist/store.d.ts +5 -0
  65. package/dist/store.js +17 -0
  66. package/dist/store.js.map +1 -0
  67. package/package.json +103 -0
  68. package/sockethub.config.example.json +33 -0
  69. package/src/bootstrap/init.d.ts +8 -0
  70. package/src/bootstrap/init.ts +83 -0
  71. package/src/bootstrap/platforms.js +75 -0
  72. package/src/common.test.ts +54 -0
  73. package/src/common.ts +14 -0
  74. package/src/config.d.ts +2 -0
  75. package/src/config.test.ts +28 -0
  76. package/src/config.ts +94 -0
  77. package/src/crypto.d.ts +5 -0
  78. package/src/crypto.test.ts +41 -0
  79. package/src/crypto.ts +41 -0
  80. package/src/defaults.json +28 -0
  81. package/src/index.ts +28 -0
  82. package/src/janitor.d.ts +8 -0
  83. package/src/janitor.ts +89 -0
  84. package/src/listener.ts +79 -0
  85. package/src/middleware/create-activity-object.test.ts +10 -0
  86. package/src/middleware/create-activity-object.ts +13 -0
  87. package/src/middleware/expand-activity-stream.test.data.ts +365 -0
  88. package/src/middleware/expand-activity-stream.test.ts +78 -0
  89. package/src/middleware/expand-activity-stream.ts +27 -0
  90. package/src/middleware/store-credentials.test.ts +73 -0
  91. package/src/middleware/store-credentials.ts +16 -0
  92. package/src/middleware/validate.d.ts +1 -0
  93. package/src/middleware/validate.test.data.ts +261 -0
  94. package/src/middleware/validate.test.ts +83 -0
  95. package/src/middleware/validate.ts +49 -0
  96. package/src/middleware.d.ts +21 -0
  97. package/src/middleware.test.ts +154 -0
  98. package/src/middleware.ts +52 -0
  99. package/src/platform-instance.test.ts +237 -0
  100. package/src/platform-instance.ts +242 -0
  101. package/src/platform.ts +191 -0
  102. package/src/process-manager.ts +64 -0
  103. package/src/routes.test.ts +100 -0
  104. package/src/routes.ts +98 -0
  105. package/src/sockethub.d.ts +1 -0
  106. package/src/sockethub.ts +165 -0
  107. package/src/store.test.ts +28 -0
  108. package/src/store.ts +17 -0
  109. package/test/init-suite.js +41 -0
  110. package/test/queue.functional.test.js +0 -0
  111. package/test/sockethub-suite.js +25 -0
  112. package/tsconfig.json +18 -0
  113. package/views/examples/dummy.ejs +93 -0
  114. package/views/examples/feeds.ejs +90 -0
  115. package/views/examples/irc.ejs +239 -0
  116. package/views/examples/shared.js +72 -0
  117. package/views/examples/xmpp.ejs +191 -0
  118. package/views/index.ejs +17 -0
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.getSocket = void 0;
26
+ const debug_1 = __importDefault(require("debug"));
27
+ const body_parser_1 = __importDefault(require("body-parser"));
28
+ const express_1 = __importDefault(require("express"));
29
+ const HTTP = __importStar(require("http"));
30
+ const socket_io_1 = require("socket.io");
31
+ const config_1 = __importDefault(require("./config"));
32
+ const routes_1 = __importDefault(require("./routes"));
33
+ const log = (0, debug_1.default)('sockethub:server:listener');
34
+ /**
35
+ * Handles the initialization and access of Sockethub resources.
36
+ *
37
+ * - HTTP Server
38
+ * - Express (serves resources and example routes)
39
+ * - Socket.io (bidirectional websocket communication)
40
+ */
41
+ class Listener {
42
+ /**
43
+ * Starts the services needed for Sockethub to operate. After this command completes,
44
+ * the `http` and `io` class properties will be set.
45
+ */
46
+ start() {
47
+ // initialize express and socket.io objects
48
+ const app = Listener.initExpress();
49
+ this.http = new HTTP.Server(app);
50
+ this.io = new socket_io_1.Server(this.http, {
51
+ path: config_1.default.get('sockethub:path'),
52
+ cors: {
53
+ origin: "*",
54
+ methods: ["GET", "POST"]
55
+ }
56
+ });
57
+ routes_1.default.setup(app);
58
+ this.startHttp();
59
+ }
60
+ startHttp() {
61
+ this.http.listen(config_1.default.get('sockethub:port'), config_1.default.get('sockethub:host'), () => {
62
+ log(`sockethub listening on ` +
63
+ `http://${config_1.default.get('sockethub:host')}:${config_1.default.get('sockethub:port')}`);
64
+ });
65
+ }
66
+ ;
67
+ static initExpress() {
68
+ let app = (0, express_1.default)();
69
+ // templating engines
70
+ app.set('view engine', 'ejs');
71
+ // use bodyParser
72
+ app.use(body_parser_1.default.urlencoded({ extended: true }));
73
+ app.use(body_parser_1.default.json());
74
+ return app;
75
+ }
76
+ }
77
+ const listener = new Listener();
78
+ async function getSocket(sessionId) {
79
+ const sockets = await listener.io.fetchSockets();
80
+ return new Promise((resolve, reject) => {
81
+ for (let socket of sockets) {
82
+ if (sessionId === socket.id) {
83
+ return resolve(socket);
84
+ }
85
+ }
86
+ return reject(`unable to find socket for sessionId ${sessionId}`);
87
+ });
88
+ }
89
+ exports.getSocket = getSocket;
90
+ exports.default = listener;
91
+ //# sourceMappingURL=/listener.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listener.js","sourceRoot":"/","sources":["listener.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,8DAAqC;AACrC,sDAA8B;AAC9B,2CAA6B;AAC7B,yCAAmC;AAEnC,sDAA8B;AAC9B,sDAA8B;AAE9B,MAAM,GAAG,GAAG,IAAA,eAAK,EAAC,2BAA2B,CAAC,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,QAAQ;IAIZ;;;OAGG;IACH,KAAK;QACH,2CAA2C;QAC3C,MAAM,GAAG,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC,EAAE,GAAG,IAAI,kBAAM,CAAC,IAAI,CAAC,IAAI,EAAE;YAC9B,IAAI,EAAE,gBAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC;YAClC,IAAI,EAAE;gBACJ,MAAM,EAAE,GAAG;gBACX,OAAO,EAAE,CAAE,KAAK,EAAE,MAAM,CAAE;aAC3B;SACF,CAAC,CAAC;QACH,gBAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClB,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAEO,SAAS;QACf,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,gBAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,GAAG,EAAE;YAChF,GAAG,CAAC,yBAAyB;gBAC3B,UAAU,gBAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,gBAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;IACL,CAAC;IAAA,CAAC;IAEM,MAAM,CAAC,WAAW;QACxB,IAAI,GAAG,GAAG,IAAA,iBAAO,GAAE,CAAC;QACpB,qBAAqB;QACrB,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QAC9B,iBAAiB;QACjB,GAAG,CAAC,GAAG,CAAC,qBAAU,CAAC,UAAU,CAAC,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;QACjD,GAAG,CAAC,GAAG,CAAC,qBAAU,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3B,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;AAOzB,KAAK,UAAU,SAAS,CAAC,SAAiB;IAC/C,MAAM,OAAO,GAA0B,MAAM,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC;IACxE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,KAAK,IAAI,MAAM,IAAI,OAAO,EAAE;YAC1B,IAAI,SAAS,KAAK,MAAM,CAAC,EAAE,EAAE;gBAC3B,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;aACxB;SACF;QACD,OAAO,MAAM,CAAC,uCAAuC,SAAS,EAAE,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;AACL,CAAC;AAVD,8BAUC;AAED,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A simple middleware wrapper for the activity-streams Object.create method.
3
+ * @param obj
4
+ * @param done
5
+ */
6
+ export default function createActivityObject(obj: any, done: Function): void;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const activity_streams_1 = __importDefault(require("@sockethub/activity-streams"));
7
+ const config_1 = __importDefault(require("../config"));
8
+ const activity = (0, activity_streams_1.default)(config_1.default.get('activity-streams:opts'));
9
+ /**
10
+ * A simple middleware wrapper for the activity-streams Object.create method.
11
+ * @param obj
12
+ * @param done
13
+ */
14
+ function createActivityObject(obj, done) {
15
+ activity.Object.create(obj);
16
+ done(obj);
17
+ }
18
+ exports.default = createActivityObject;
19
+ //# sourceMappingURL=/middleware/create-activity-object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-activity-object.js","sourceRoot":"/","sources":["middleware/create-activity-object.ts"],"names":[],"mappings":";;;;;AAAA,mFAA0D;AAC1D,uDAA+B;AAC/B,MAAM,QAAQ,GAAG,IAAA,0BAAe,EAAC,gBAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC;AAEtE;;;;GAIG;AACH,SAAwB,oBAAoB,CAAC,GAAQ,EAAE,IAAc;IACnE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,GAAG,CAAC,CAAC;AACZ,CAAC;AAHD,uCAGC"}
@@ -0,0 +1,2 @@
1
+ import { IActivityStream } from "@sockethub/schemas";
2
+ export default function expandActivityStream(msg: IActivityStream, done: Function): void;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const activity_streams_1 = __importDefault(require("@sockethub/activity-streams"));
7
+ const config_1 = __importDefault(require("../config"));
8
+ const activity = (0, activity_streams_1.default)(config_1.default.get('activity-streams:opts'));
9
+ function ensureObject(msg) {
10
+ return !((typeof msg !== 'object') || (Array.isArray(msg)));
11
+ }
12
+ function expandActivityStream(msg, done) {
13
+ if (!ensureObject(msg)) {
14
+ done(new Error(`message received is not an object.`));
15
+ }
16
+ else if (typeof msg.context !== 'string') {
17
+ done(new Error('activity stream must contain a context property'));
18
+ }
19
+ else if (typeof msg.type !== 'string') {
20
+ done(new Error('activity stream must contain a type property.'));
21
+ }
22
+ else {
23
+ msg = activity.Stream(msg);
24
+ if (!msg.actor) {
25
+ done(new Error('activity stream must contain an actor property.'));
26
+ }
27
+ else {
28
+ done(msg);
29
+ }
30
+ }
31
+ }
32
+ exports.default = expandActivityStream;
33
+ //# sourceMappingURL=/middleware/expand-activity-stream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expand-activity-stream.js","sourceRoot":"/","sources":["middleware/expand-activity-stream.ts"],"names":[],"mappings":";;;;;AAAA,mFAA0D;AAG1D,uDAA+B;AAE/B,MAAM,QAAQ,GAAG,IAAA,0BAAe,EAAC,gBAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC,CAAC;AAEtE,SAAS,YAAY,CAAC,GAAQ;IAC5B,OAAO,CAAC,CAAC,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED,SAAwB,oBAAoB,CAAC,GAAoB,EAAE,IAAc;IAC/E,IAAI,CAAE,YAAY,CAAC,GAAG,CAAC,EAAE;QACvB,IAAI,CAAC,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC;KACvD;SAAM,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EAAE;QAC1C,IAAI,CAAC,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC,CAAC;KACpE;SAAO,IAAI,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;QACxC,IAAI,CAAC,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC,CAAC;KAClE;SAAM;QACL,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAE,GAAG,CAAC,KAAK,EAAE;YACf,IAAI,CAAC,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC,CAAC;SACpE;aAAM;YACL,IAAI,CAAC,GAAG,CAAC,CAAC;SACX;KACF;AACH,CAAC;AAfD,uCAeC"}
@@ -0,0 +1,480 @@
1
+ declare const _default: ({
2
+ name: string;
3
+ valid: boolean;
4
+ type: string;
5
+ input: string;
6
+ error: string;
7
+ output?: undefined;
8
+ } | {
9
+ name: string;
10
+ valid: boolean;
11
+ type: string;
12
+ input: {
13
+ id: string;
14
+ type: string;
15
+ context: string;
16
+ actor: {
17
+ id: string;
18
+ type: string;
19
+ name: string;
20
+ image?: undefined;
21
+ url?: undefined;
22
+ };
23
+ target: {
24
+ id: string;
25
+ type: string;
26
+ name: string;
27
+ };
28
+ object: {
29
+ type: string;
30
+ nick?: undefined;
31
+ port?: undefined;
32
+ secure?: undefined;
33
+ server?: undefined;
34
+ username?: undefined;
35
+ password?: undefined;
36
+ resource?: undefined;
37
+ content?: undefined;
38
+ };
39
+ string?: undefined;
40
+ array?: undefined;
41
+ as?: undefined;
42
+ noId?: undefined;
43
+ noId2?: undefined;
44
+ noDisplayName?: undefined;
45
+ };
46
+ output: string;
47
+ error?: undefined;
48
+ } | {
49
+ name: string;
50
+ valid: boolean;
51
+ type: string;
52
+ input: {
53
+ type: string;
54
+ context: string;
55
+ actor: {
56
+ id: string;
57
+ type: string;
58
+ name: string;
59
+ image: {
60
+ height: number;
61
+ mediaType: string;
62
+ url: string;
63
+ width: number;
64
+ };
65
+ url: string;
66
+ };
67
+ object: {
68
+ type: string;
69
+ nick: string;
70
+ port: number;
71
+ secure: boolean;
72
+ server: string;
73
+ username?: undefined;
74
+ password?: undefined;
75
+ resource?: undefined;
76
+ content?: undefined;
77
+ };
78
+ id?: undefined;
79
+ target?: undefined;
80
+ string?: undefined;
81
+ array?: undefined;
82
+ as?: undefined;
83
+ noId?: undefined;
84
+ noId2?: undefined;
85
+ noDisplayName?: undefined;
86
+ };
87
+ output: string;
88
+ error?: undefined;
89
+ } | {
90
+ name: string;
91
+ valid: boolean;
92
+ type: string;
93
+ input: {
94
+ actor: string;
95
+ context: string;
96
+ object: {
97
+ username: string;
98
+ password: string;
99
+ server: string;
100
+ port: number;
101
+ resource: string;
102
+ type?: undefined;
103
+ nick?: undefined;
104
+ secure?: undefined;
105
+ content?: undefined;
106
+ };
107
+ id?: undefined;
108
+ type?: undefined;
109
+ target?: undefined;
110
+ string?: undefined;
111
+ array?: undefined;
112
+ as?: undefined;
113
+ noId?: undefined;
114
+ noId2?: undefined;
115
+ noDisplayName?: undefined;
116
+ };
117
+ error: string;
118
+ output?: undefined;
119
+ } | {
120
+ name: string;
121
+ type: string;
122
+ valid: string;
123
+ input: {
124
+ context: string;
125
+ type: string;
126
+ actor: string;
127
+ object: {
128
+ content: string;
129
+ type?: undefined;
130
+ nick?: undefined;
131
+ port?: undefined;
132
+ secure?: undefined;
133
+ server?: undefined;
134
+ username?: undefined;
135
+ password?: undefined;
136
+ resource?: undefined;
137
+ };
138
+ id?: undefined;
139
+ target?: undefined;
140
+ string?: undefined;
141
+ array?: undefined;
142
+ as?: undefined;
143
+ noId?: undefined;
144
+ noId2?: undefined;
145
+ noDisplayName?: undefined;
146
+ };
147
+ output: {
148
+ context: string;
149
+ type: string;
150
+ actor: {
151
+ id: string;
152
+ type?: undefined;
153
+ name?: undefined;
154
+ hello?: undefined;
155
+ i?: undefined;
156
+ image?: undefined;
157
+ url?: undefined;
158
+ };
159
+ object: {
160
+ content: string;
161
+ };
162
+ target?: undefined;
163
+ };
164
+ error?: undefined;
165
+ } | {
166
+ name: string;
167
+ type: string;
168
+ valid: boolean;
169
+ input: {
170
+ context: string;
171
+ type: string;
172
+ actor: string;
173
+ object: {
174
+ type?: undefined;
175
+ nick?: undefined;
176
+ port?: undefined;
177
+ secure?: undefined;
178
+ server?: undefined;
179
+ username?: undefined;
180
+ password?: undefined;
181
+ resource?: undefined;
182
+ content?: undefined;
183
+ };
184
+ id?: undefined;
185
+ target?: undefined;
186
+ string?: undefined;
187
+ array?: undefined;
188
+ as?: undefined;
189
+ noId?: undefined;
190
+ noId2?: undefined;
191
+ noDisplayName?: undefined;
192
+ };
193
+ output: {
194
+ context: string;
195
+ type: string;
196
+ actor: {
197
+ id: string;
198
+ type: string;
199
+ name: string;
200
+ hello?: undefined;
201
+ i?: undefined;
202
+ image?: undefined;
203
+ url?: undefined;
204
+ };
205
+ object: {
206
+ content?: undefined;
207
+ };
208
+ target?: undefined;
209
+ };
210
+ error?: undefined;
211
+ } | {
212
+ name: string;
213
+ valid: boolean;
214
+ type: string;
215
+ input: {
216
+ context: string;
217
+ type: string;
218
+ actor: string;
219
+ object: {
220
+ type?: undefined;
221
+ nick?: undefined;
222
+ port?: undefined;
223
+ secure?: undefined;
224
+ server?: undefined;
225
+ username?: undefined;
226
+ password?: undefined;
227
+ resource?: undefined;
228
+ content?: undefined;
229
+ };
230
+ id?: undefined;
231
+ target?: undefined;
232
+ string?: undefined;
233
+ array?: undefined;
234
+ as?: undefined;
235
+ noId?: undefined;
236
+ noId2?: undefined;
237
+ noDisplayName?: undefined;
238
+ };
239
+ output: {
240
+ context: string;
241
+ type: string;
242
+ actor: {
243
+ id: string;
244
+ type: string;
245
+ name: string;
246
+ hello: string;
247
+ i: string[];
248
+ image?: undefined;
249
+ url?: undefined;
250
+ };
251
+ object: {
252
+ content?: undefined;
253
+ };
254
+ target?: undefined;
255
+ };
256
+ error?: undefined;
257
+ } | {
258
+ name: string;
259
+ valid: boolean;
260
+ type: string;
261
+ input: {
262
+ string: string;
263
+ array: (string | {
264
+ an: string;
265
+ })[];
266
+ as: {
267
+ id: string;
268
+ type: string;
269
+ context: string;
270
+ actor: {
271
+ name: string;
272
+ };
273
+ target: {
274
+ type: string;
275
+ name: string;
276
+ };
277
+ object: {
278
+ type: string;
279
+ };
280
+ };
281
+ noId: {
282
+ name: string;
283
+ };
284
+ noId2: {
285
+ type: string;
286
+ name: string;
287
+ };
288
+ noDisplayName: {
289
+ id: string;
290
+ };
291
+ id?: undefined;
292
+ type?: undefined;
293
+ context?: undefined;
294
+ actor?: undefined;
295
+ target?: undefined;
296
+ object?: undefined;
297
+ };
298
+ error: string;
299
+ output?: undefined;
300
+ } | {
301
+ name: string;
302
+ valid: boolean;
303
+ type: string;
304
+ input: {
305
+ type: string;
306
+ context: string;
307
+ object: {
308
+ type: string;
309
+ content: string;
310
+ nick?: undefined;
311
+ port?: undefined;
312
+ secure?: undefined;
313
+ server?: undefined;
314
+ username?: undefined;
315
+ password?: undefined;
316
+ resource?: undefined;
317
+ };
318
+ id?: undefined;
319
+ actor?: undefined;
320
+ target?: undefined;
321
+ string?: undefined;
322
+ array?: undefined;
323
+ as?: undefined;
324
+ noId?: undefined;
325
+ noId2?: undefined;
326
+ noDisplayName?: undefined;
327
+ };
328
+ error: string;
329
+ output?: undefined;
330
+ } | {
331
+ name: string;
332
+ valid: boolean;
333
+ type: string;
334
+ input: {
335
+ actor: string;
336
+ type: string;
337
+ context: string;
338
+ target: string;
339
+ id?: undefined;
340
+ object?: undefined;
341
+ string?: undefined;
342
+ array?: undefined;
343
+ as?: undefined;
344
+ noId?: undefined;
345
+ noId2?: undefined;
346
+ noDisplayName?: undefined;
347
+ };
348
+ output: {
349
+ actor: {
350
+ id: string;
351
+ type?: undefined;
352
+ name?: undefined;
353
+ hello?: undefined;
354
+ i?: undefined;
355
+ image?: undefined;
356
+ url?: undefined;
357
+ };
358
+ type: string;
359
+ context: string;
360
+ target: {
361
+ id: string;
362
+ type?: undefined;
363
+ name?: undefined;
364
+ hello?: undefined;
365
+ i?: undefined;
366
+ };
367
+ object?: undefined;
368
+ };
369
+ error?: undefined;
370
+ } | {
371
+ name: string;
372
+ valid: boolean;
373
+ type: string;
374
+ input: {
375
+ actor: string;
376
+ type: string;
377
+ context: string;
378
+ object: {
379
+ type?: undefined;
380
+ nick?: undefined;
381
+ port?: undefined;
382
+ secure?: undefined;
383
+ server?: undefined;
384
+ username?: undefined;
385
+ password?: undefined;
386
+ resource?: undefined;
387
+ content?: undefined;
388
+ };
389
+ target: string;
390
+ id?: undefined;
391
+ string?: undefined;
392
+ array?: undefined;
393
+ as?: undefined;
394
+ noId?: undefined;
395
+ noId2?: undefined;
396
+ noDisplayName?: undefined;
397
+ };
398
+ output: {
399
+ actor: {
400
+ id: string;
401
+ type?: undefined;
402
+ name?: undefined;
403
+ hello?: undefined;
404
+ i?: undefined;
405
+ image?: undefined;
406
+ url?: undefined;
407
+ };
408
+ type: string;
409
+ context: string;
410
+ object: {
411
+ content?: undefined;
412
+ };
413
+ target: {
414
+ id: string;
415
+ type?: undefined;
416
+ name?: undefined;
417
+ hello?: undefined;
418
+ i?: undefined;
419
+ };
420
+ };
421
+ error?: undefined;
422
+ } | {
423
+ name: string;
424
+ valid: boolean;
425
+ type: string;
426
+ input: {
427
+ actor: string;
428
+ target: string;
429
+ type: string;
430
+ context: string;
431
+ object: {
432
+ type?: undefined;
433
+ nick?: undefined;
434
+ port?: undefined;
435
+ secure?: undefined;
436
+ server?: undefined;
437
+ username?: undefined;
438
+ password?: undefined;
439
+ resource?: undefined;
440
+ content?: undefined;
441
+ };
442
+ id?: undefined;
443
+ string?: undefined;
444
+ array?: undefined;
445
+ as?: undefined;
446
+ noId?: undefined;
447
+ noId2?: undefined;
448
+ noDisplayName?: undefined;
449
+ };
450
+ output: {
451
+ actor: {
452
+ id: string;
453
+ type: string;
454
+ name: string;
455
+ image: {
456
+ height: number;
457
+ mediaType: string;
458
+ url: string;
459
+ width: number;
460
+ };
461
+ url: string;
462
+ hello?: undefined;
463
+ i?: undefined;
464
+ };
465
+ target: {
466
+ id: string;
467
+ type: string;
468
+ name: string;
469
+ hello: string;
470
+ i: string[];
471
+ };
472
+ type: string;
473
+ context: string;
474
+ object: {
475
+ content?: undefined;
476
+ };
477
+ };
478
+ error?: undefined;
479
+ })[];
480
+ export default _default;