moeralib 0.15.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.
Files changed (80) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +8 -0
  3. package/lib/naming/index.js +14 -0
  4. package/lib/naming/naming.js +203 -0
  5. package/lib/naming/schemas.mjs +184 -0
  6. package/lib/naming/types.js +2 -0
  7. package/lib/naming/validate.js +9 -0
  8. package/lib/naming/validators.js +2065 -0
  9. package/lib/node/caller.js +267 -0
  10. package/lib/node/cartes.js +55 -0
  11. package/lib/node/index.js +13 -0
  12. package/lib/node/node.js +1405 -0
  13. package/lib/node/schemas.mjs +4582 -0
  14. package/lib/node/types.js +3 -0
  15. package/lib/node/validate.js +9 -0
  16. package/lib/node/validators.js +60225 -0
  17. package/lib/schema.js +20 -0
  18. package/lib/schemas-compile.mjs +42 -0
  19. package/lib/universal-location.js +164 -0
  20. package/lib/util.js +42 -0
  21. package/nodejs-moera-api/nodejs-moera-api +4 -0
  22. package/nodejs-moera-api/nodejsmoeraapi.py +578 -0
  23. package/package.json +65 -0
  24. package/src/naming/index.ts +12 -0
  25. package/src/naming/naming.ts +234 -0
  26. package/src/naming/schemas.mjs +194 -0
  27. package/src/naming/types.ts +39 -0
  28. package/src/naming/validate.ts +6 -0
  29. package/src/naming/validators.d.ts +3 -0
  30. package/src/naming/validators.js +2084 -0
  31. package/src/node/caller.ts +311 -0
  32. package/src/node/cartes.ts +51 -0
  33. package/src/node/index.ts +3 -0
  34. package/src/node/node.ts +1285 -0
  35. package/src/node/schemas.mjs +4715 -0
  36. package/src/node/types.ts +1544 -0
  37. package/src/node/validate.ts +6 -0
  38. package/src/node/validators.d.ts +3 -0
  39. package/src/node/validators.js +60484 -0
  40. package/src/schema.ts +30 -0
  41. package/src/schemas-compile.mjs +51 -0
  42. package/src/universal-location.ts +212 -0
  43. package/src/util.ts +42 -0
  44. package/tsconfig.json +112 -0
  45. package/typings/naming/index.d.ts +2 -0
  46. package/typings/naming/index.d.ts.map +1 -0
  47. package/typings/naming/naming.d.ts +31 -0
  48. package/typings/naming/naming.d.ts.map +1 -0
  49. package/typings/naming/schemas.d.mts +271 -0
  50. package/typings/naming/schemas.d.mts.map +1 -0
  51. package/typings/naming/types.d.ts +35 -0
  52. package/typings/naming/types.d.ts.map +1 -0
  53. package/typings/naming/validate.d.ts +3 -0
  54. package/typings/naming/validate.d.ts.map +1 -0
  55. package/typings/naming/validators.d.ts +73 -0
  56. package/typings/naming/validators.d.ts.map +1 -0
  57. package/typings/node/caller.d.ts +52 -0
  58. package/typings/node/caller.d.ts.map +1 -0
  59. package/typings/node/cartes.d.ts +13 -0
  60. package/typings/node/cartes.d.ts.map +1 -0
  61. package/typings/node/index.d.ts +4 -0
  62. package/typings/node/index.d.ts.map +1 -0
  63. package/typings/node/node.d.ts +176 -0
  64. package/typings/node/node.d.ts.map +1 -0
  65. package/typings/node/schemas.d.mts +6205 -0
  66. package/typings/node/schemas.d.mts.map +1 -0
  67. package/typings/node/types.d.ts +1340 -0
  68. package/typings/node/types.d.ts.map +1 -0
  69. package/typings/node/validate.d.ts +3 -0
  70. package/typings/node/validate.d.ts.map +1 -0
  71. package/typings/node/validators.d.ts +920 -0
  72. package/typings/node/validators.d.ts.map +1 -0
  73. package/typings/schema.d.ts +18 -0
  74. package/typings/schema.d.ts.map +1 -0
  75. package/typings/schemas-compile.d.mts +2 -0
  76. package/typings/schemas-compile.d.mts.map +1 -0
  77. package/typings/universal-location.d.ts +25 -0
  78. package/typings/universal-location.d.ts.map +1 -0
  79. package/typings/util.d.ts +6 -0
  80. package/typings/util.d.ts.map +1 -0
@@ -0,0 +1,1405 @@
1
+ "use strict";
2
+ // This file is generated
3
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
+ return new (P || (P = Promise))(function (resolve, reject) {
6
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
10
+ });
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.MoeraNode = void 0;
14
+ const caller_1 = require("./caller");
15
+ const util_1 = require("../util");
16
+ class MoeraNode extends caller_1.Caller {
17
+ constructor(nodeUrl = null) {
18
+ super();
19
+ if (nodeUrl != null) {
20
+ this.nodeUrl(nodeUrl);
21
+ }
22
+ }
23
+ searchActivityReactions(filter) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const location = "/activity/reactions/search";
26
+ return yield this.call("searchActivityReactions", location, {
27
+ method: "POST", body: filter, schema: "ActivityReactionInfoArray"
28
+ });
29
+ });
30
+ }
31
+ getRemotePostingVerificationStatus(id) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ const location = (0, util_1.ut) `/async-operations/remote-posting-verification/${id}`;
34
+ return yield this.call("getRemotePostingVerificationStatus", location, {
35
+ method: "GET", schema: "RemotePostingVerificationInfo"
36
+ });
37
+ });
38
+ }
39
+ getRemoteReactionVerificationStatus(id) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ const location = (0, util_1.ut) `/async-operations/remote-reaction-verification/${id}`;
42
+ return yield this.call("getRemoteReactionVerificationStatus", location, {
43
+ method: "GET", schema: "RemoteReactionVerificationInfo"
44
+ });
45
+ });
46
+ }
47
+ getAvatars() {
48
+ return __awaiter(this, void 0, void 0, function* () {
49
+ const location = "/avatars";
50
+ return yield this.call("getAvatars", location, {
51
+ method: "GET", schema: "AvatarInfoArray"
52
+ });
53
+ });
54
+ }
55
+ createAvatar(avatar) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ const location = "/avatars";
58
+ return yield this.call("createAvatar", location, {
59
+ method: "POST", body: avatar, schema: "AvatarInfo"
60
+ });
61
+ });
62
+ }
63
+ getAvatar(id) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const location = (0, util_1.ut) `/avatars/${id}`;
66
+ return yield this.call("getAvatar", location, {
67
+ method: "GET", schema: "AvatarInfo"
68
+ });
69
+ });
70
+ }
71
+ deleteAvatar(id) {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ const location = (0, util_1.ut) `/avatars/${id}`;
74
+ return yield this.call("deleteAvatar", location, {
75
+ method: "DELETE", schema: "Result"
76
+ });
77
+ });
78
+ }
79
+ reorderAvatars(order) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ const location = "/avatars/reorder";
82
+ return yield this.call("reorderAvatars", location, {
83
+ method: "POST", body: order, schema: "AvatarOrdinalArray"
84
+ });
85
+ });
86
+ }
87
+ blockInstant(instant) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ const location = "/blocked-instants";
90
+ return yield this.call("blockInstant", location, {
91
+ method: "POST", body: instant, schema: "BlockedInstantInfo"
92
+ });
93
+ });
94
+ }
95
+ getBlockedInstant(id) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ const location = (0, util_1.ut) `/blocked-instants/${id}`;
98
+ return yield this.call("getBlockedInstant", location, {
99
+ method: "GET", schema: "BlockedInstantInfo"
100
+ });
101
+ });
102
+ }
103
+ unblockInstant(id) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ const location = (0, util_1.ut) `/blocked-instants/${id}`;
106
+ return yield this.call("unblockInstant", location, {
107
+ method: "DELETE", schema: "Result"
108
+ });
109
+ });
110
+ }
111
+ searchBlockedInstants(filter) {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ const location = "/blocked-instants/search";
114
+ return yield this.call("searchBlockedInstants", location, {
115
+ method: "POST", body: filter, schema: "BlockedInstantInfoArray"
116
+ });
117
+ });
118
+ }
119
+ blockUser(user) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ const location = "/people/blocked-users";
122
+ return yield this.call("blockUser", location, {
123
+ method: "POST", body: user, schema: "BlockedUserInfo"
124
+ });
125
+ });
126
+ }
127
+ getBlockedUser(id) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const location = (0, util_1.ut) `/people/blocked-users/${id}`;
130
+ return yield this.call("getBlockedUser", location, {
131
+ method: "GET", schema: "BlockedUserInfo"
132
+ });
133
+ });
134
+ }
135
+ unblockUser(id) {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ const location = (0, util_1.ut) `/people/blocked-users/${id}`;
138
+ return yield this.call("unblockUser", location, {
139
+ method: "DELETE", schema: "Result"
140
+ });
141
+ });
142
+ }
143
+ searchBlockedUsers(filter) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ const location = "/people/blocked-users/search";
146
+ return yield this.call("searchBlockedUsers", location, {
147
+ method: "POST", body: filter, schema: "BlockedUserInfoArray"
148
+ });
149
+ });
150
+ }
151
+ getBlockedUsersChecksums() {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ const location = "/people/blocked-users/checksums";
154
+ return yield this.call("getBlockedUsersChecksums", location, {
155
+ method: "GET", schema: "BlockedUsersChecksums"
156
+ });
157
+ });
158
+ }
159
+ getBlockedByUser(id) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ const location = (0, util_1.ut) `/people/blocked-by-users/${id}`;
162
+ return yield this.call("getBlockedByUser", location, {
163
+ method: "GET", schema: "BlockedByUserInfo"
164
+ });
165
+ });
166
+ }
167
+ searchBlockedByUsers(filter) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ const location = "/people/blocked-by-users/search";
170
+ return yield this.call("searchBlockedByUsers", location, {
171
+ method: "POST", body: filter, schema: "BlockedByUserInfoArray"
172
+ });
173
+ });
174
+ }
175
+ getCartes() {
176
+ return __awaiter(this, arguments, void 0, function* (limit = null) {
177
+ const location = (0, util_1.ut) `/cartes`;
178
+ const params = { limit };
179
+ return yield this.call("getCartes", location, {
180
+ method: "GET", params, schema: "CarteSet"
181
+ });
182
+ });
183
+ }
184
+ getCommentsSlice(postingId_1) {
185
+ return __awaiter(this, arguments, void 0, function* (postingId, after = null, before = null, limit = null) {
186
+ const location = (0, util_1.ut) `/postings/${postingId}/comments`;
187
+ const params = { after, before, limit };
188
+ return yield this.call("getCommentsSlice", location, {
189
+ method: "GET", params, schema: "CommentsSliceInfo", bodies: true
190
+ });
191
+ });
192
+ }
193
+ createComment(postingId, comment) {
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ const location = (0, util_1.ut) `/postings/${postingId}/comments`;
196
+ return yield this.call("createComment", location, {
197
+ method: "POST", body: comment, schema: "CommentCreated", bodies: true
198
+ });
199
+ });
200
+ }
201
+ getComment(postingId_1, commentId_1) {
202
+ return __awaiter(this, arguments, void 0, function* (postingId, commentId, withSource = false) {
203
+ const include = (0, util_1.commaSeparatedFlags)({ "source": withSource });
204
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}`;
205
+ const params = { include };
206
+ return yield this.call("getComment", location, {
207
+ method: "GET", params, schema: "CommentInfo", bodies: true
208
+ });
209
+ });
210
+ }
211
+ updateAllComments(postingId, attributes) {
212
+ return __awaiter(this, void 0, void 0, function* () {
213
+ const location = (0, util_1.ut) `/postings/${postingId}/comments`;
214
+ return yield this.call("updateAllComments", location, {
215
+ method: "PUT", body: attributes, schema: "Result"
216
+ });
217
+ });
218
+ }
219
+ updateComment(postingId, commentId, comment) {
220
+ return __awaiter(this, void 0, void 0, function* () {
221
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}`;
222
+ return yield this.call("updateComment", location, {
223
+ method: "PUT", body: comment, schema: "CommentInfo", bodies: true
224
+ });
225
+ });
226
+ }
227
+ deleteComment(postingId, commentId) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}`;
230
+ return yield this.call("deleteComment", location, {
231
+ method: "DELETE", schema: "CommentTotalInfo"
232
+ });
233
+ });
234
+ }
235
+ getPostingsAttachedToComment(postingId, commentId) {
236
+ return __awaiter(this, void 0, void 0, function* () {
237
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}/attached`;
238
+ return yield this.call("getPostingsAttachedToComment", location, {
239
+ method: "GET", schema: "PostingInfoArray", bodies: true
240
+ });
241
+ });
242
+ }
243
+ getCommentRevisions(postingId, commentId) {
244
+ return __awaiter(this, void 0, void 0, function* () {
245
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}/revisions`;
246
+ return yield this.call("getCommentRevisions", location, {
247
+ method: "GET", schema: "CommentRevisionInfoArray", bodies: true
248
+ });
249
+ });
250
+ }
251
+ getCommentRevision(postingId, commentId, id) {
252
+ return __awaiter(this, void 0, void 0, function* () {
253
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}/revisions/${id}`;
254
+ return yield this.call("getCommentRevision", location, {
255
+ method: "GET", schema: "CommentRevisionInfo", bodies: true
256
+ });
257
+ });
258
+ }
259
+ createCommentReaction(postingId, commentId, reaction) {
260
+ return __awaiter(this, void 0, void 0, function* () {
261
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}/reactions`;
262
+ return yield this.call("createCommentReaction", location, {
263
+ method: "POST", body: reaction, schema: "ReactionCreated"
264
+ });
265
+ });
266
+ }
267
+ updateCommentReaction(postingId, commentId, ownerName, reaction) {
268
+ return __awaiter(this, void 0, void 0, function* () {
269
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}/reactions/${ownerName}`;
270
+ return yield this.call("updateCommentReaction", location, {
271
+ method: "PUT", body: reaction, schema: "ReactionInfo"
272
+ });
273
+ });
274
+ }
275
+ getCommentReactionsSlice(postingId_1, commentId_1) {
276
+ return __awaiter(this, arguments, void 0, function* (postingId, commentId, negative = null, emoji = null, before = null, limit = null) {
277
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}/reactions`;
278
+ const params = { negative, emoji, before, limit };
279
+ return yield this.call("getCommentReactionsSlice", location, {
280
+ method: "GET", params, schema: "ReactionsSliceInfo"
281
+ });
282
+ });
283
+ }
284
+ getCommentReaction(postingId, commentId, ownerName) {
285
+ return __awaiter(this, void 0, void 0, function* () {
286
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}/reactions/${ownerName}`;
287
+ return yield this.call("getCommentReaction", location, {
288
+ method: "GET", schema: "ReactionInfo"
289
+ });
290
+ });
291
+ }
292
+ deleteAllCommentReactions(postingId, commentId) {
293
+ return __awaiter(this, void 0, void 0, function* () {
294
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}/reactions`;
295
+ return yield this.call("deleteAllCommentReactions", location, {
296
+ method: "DELETE", schema: "Result"
297
+ });
298
+ });
299
+ }
300
+ deleteCommentReaction(postingId, commentId, ownerName) {
301
+ return __awaiter(this, void 0, void 0, function* () {
302
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}/reactions/${ownerName}`;
303
+ return yield this.call("deleteCommentReaction", location, {
304
+ method: "DELETE", schema: "ReactionTotalsInfo"
305
+ });
306
+ });
307
+ }
308
+ getCommentReactionTotals(postingId, commentId) {
309
+ return __awaiter(this, void 0, void 0, function* () {
310
+ const location = (0, util_1.ut) `/postings/${postingId}/comments/${commentId}/reaction-totals`;
311
+ return yield this.call("getCommentReactionTotals", location, {
312
+ method: "GET", schema: "ReactionTotalsInfo"
313
+ });
314
+ });
315
+ }
316
+ getContacts() {
317
+ return __awaiter(this, arguments, void 0, function* (query = null, limit = null) {
318
+ const location = (0, util_1.ut) `/people/contacts`;
319
+ const params = { query, limit };
320
+ return yield this.call("getContacts", location, {
321
+ method: "GET", params, schema: "ContactInfoArray"
322
+ });
323
+ });
324
+ }
325
+ checkCredentials() {
326
+ return __awaiter(this, void 0, void 0, function* () {
327
+ const location = "/credentials";
328
+ return yield this.call("checkCredentials", location, {
329
+ method: "GET", schema: "CredentialsCreated"
330
+ });
331
+ });
332
+ }
333
+ createCredentials(credentials) {
334
+ return __awaiter(this, void 0, void 0, function* () {
335
+ const location = "/credentials";
336
+ return yield this.call("createCredentials", location, {
337
+ method: "POST", body: credentials, schema: "Result"
338
+ });
339
+ });
340
+ }
341
+ updateCredentials(credentials) {
342
+ return __awaiter(this, void 0, void 0, function* () {
343
+ const location = "/credentials";
344
+ return yield this.call("updateCredentials", location, {
345
+ method: "PUT", body: credentials, schema: "Result"
346
+ });
347
+ });
348
+ }
349
+ deleteCredentials() {
350
+ return __awaiter(this, void 0, void 0, function* () {
351
+ const location = "/credentials";
352
+ return yield this.call("deleteCredentials", location, {
353
+ method: "DELETE", schema: "Result"
354
+ });
355
+ });
356
+ }
357
+ resetCredentials() {
358
+ return __awaiter(this, void 0, void 0, function* () {
359
+ const location = "/credentials/reset";
360
+ return yield this.call("resetCredentials", location, {
361
+ method: "POST", schema: "EmailHint"
362
+ });
363
+ });
364
+ }
365
+ getDeletedPostings() {
366
+ return __awaiter(this, arguments, void 0, function* (page = null, limit = null) {
367
+ const location = (0, util_1.ut) `/deleted-postings`;
368
+ const params = { page, limit };
369
+ return yield this.call("getDeletedPostings", location, {
370
+ method: "GET", params, schema: "PostingInfoArray", bodies: true
371
+ });
372
+ });
373
+ }
374
+ getDeletedPosting(id) {
375
+ return __awaiter(this, void 0, void 0, function* () {
376
+ const location = (0, util_1.ut) `/deleted-postings/${id}`;
377
+ return yield this.call("getDeletedPosting", location, {
378
+ method: "GET", schema: "PostingInfo", bodies: true
379
+ });
380
+ });
381
+ }
382
+ restoreDeletedPosting(id) {
383
+ return __awaiter(this, void 0, void 0, function* () {
384
+ const location = (0, util_1.ut) `/deleted-postings/${id}/restore`;
385
+ return yield this.call("restoreDeletedPosting", location, {
386
+ method: "POST", schema: "PostingInfo", bodies: true
387
+ });
388
+ });
389
+ }
390
+ getDeletePostingRevisions(postingId_1) {
391
+ return __awaiter(this, arguments, void 0, function* (postingId, limit = null) {
392
+ const location = (0, util_1.ut) `/deleted-postings/${postingId}/revisions`;
393
+ const params = { limit };
394
+ return yield this.call("getDeletePostingRevisions", location, {
395
+ method: "GET", params, schema: "PostingRevisionInfoArray", bodies: true
396
+ });
397
+ });
398
+ }
399
+ getDeletedPostingRevision(postingId, id) {
400
+ return __awaiter(this, void 0, void 0, function* () {
401
+ const location = (0, util_1.ut) `/deleted-postings/${postingId}/revisions/${id}`;
402
+ return yield this.call("getDeletedPostingRevision", location, {
403
+ method: "GET", schema: "PostingRevisionInfo", bodies: true
404
+ });
405
+ });
406
+ }
407
+ restoreDeletedPostingRevision(postingId, id) {
408
+ return __awaiter(this, void 0, void 0, function* () {
409
+ const location = (0, util_1.ut) `/postings/${postingId}/revisions/${id}/restore`;
410
+ return yield this.call("restoreDeletedPostingRevision", location, {
411
+ method: "POST", schema: "PostingRevisionInfo", bodies: true
412
+ });
413
+ });
414
+ }
415
+ getDomains() {
416
+ return __awaiter(this, void 0, void 0, function* () {
417
+ const location = "/domains";
418
+ return yield this.call("getDomains", location, {
419
+ method: "GET", schema: "DomainInfoArray"
420
+ });
421
+ });
422
+ }
423
+ getDomain(name) {
424
+ return __awaiter(this, void 0, void 0, function* () {
425
+ const location = (0, util_1.ut) `/domains/${name}`;
426
+ return yield this.call("getDomain", location, {
427
+ method: "GET", schema: "DomainInfo"
428
+ });
429
+ });
430
+ }
431
+ createDomain(domain) {
432
+ return __awaiter(this, void 0, void 0, function* () {
433
+ const location = "/domains";
434
+ return yield this.call("createDomain", location, {
435
+ method: "POST", body: domain, schema: "DomainInfo"
436
+ });
437
+ });
438
+ }
439
+ updateDomain(name, domain) {
440
+ return __awaiter(this, void 0, void 0, function* () {
441
+ const location = (0, util_1.ut) `/domains/${name}`;
442
+ return yield this.call("updateDomain", location, {
443
+ method: "PUT", body: domain, schema: "DomainInfo"
444
+ });
445
+ });
446
+ }
447
+ deleteDomain(name) {
448
+ return __awaiter(this, void 0, void 0, function* () {
449
+ const location = (0, util_1.ut) `/domains/${name}`;
450
+ return yield this.call("deleteDomain", location, {
451
+ method: "DELETE", schema: "Result"
452
+ });
453
+ });
454
+ }
455
+ isDomainAvailable(remoteNodeName) {
456
+ return __awaiter(this, void 0, void 0, function* () {
457
+ const location = (0, util_1.ut) `/domains/available`;
458
+ const params = { nodeName: remoteNodeName };
459
+ return yield this.call("isDomainAvailable", location, {
460
+ method: "GET", params, schema: "DomainAvailable"
461
+ });
462
+ });
463
+ }
464
+ getDrafts(draftType_1, remoteNodeName_1) {
465
+ return __awaiter(this, arguments, void 0, function* (draftType, remoteNodeName, postingId = null, commentId = null, page = null, limit = null) {
466
+ const location = (0, util_1.ut) `/drafts`;
467
+ const params = { draftType, nodeName: remoteNodeName, postingId, commentId, page, limit };
468
+ return yield this.call("getDrafts", location, {
469
+ method: "GET", params, schema: "DraftInfoArray", bodies: true
470
+ });
471
+ });
472
+ }
473
+ createDraft(draft) {
474
+ return __awaiter(this, void 0, void 0, function* () {
475
+ const location = "/drafts";
476
+ return yield this.call("createDraft", location, {
477
+ method: "POST", body: draft, schema: "DraftInfo", bodies: true
478
+ });
479
+ });
480
+ }
481
+ getDraft(id) {
482
+ return __awaiter(this, void 0, void 0, function* () {
483
+ const location = (0, util_1.ut) `/drafts/${id}`;
484
+ return yield this.call("getDraft", location, {
485
+ method: "GET", schema: "DraftInfo", bodies: true
486
+ });
487
+ });
488
+ }
489
+ updateDraft(id, draft) {
490
+ return __awaiter(this, void 0, void 0, function* () {
491
+ const location = (0, util_1.ut) `/drafts/${id}`;
492
+ return yield this.call("updateDraft", location, {
493
+ method: "PUT", body: draft, schema: "DraftInfo", bodies: true
494
+ });
495
+ });
496
+ }
497
+ deleteDraft(id) {
498
+ return __awaiter(this, void 0, void 0, function* () {
499
+ const location = (0, util_1.ut) `/drafts/${id}`;
500
+ return yield this.call("deleteDraft", location, {
501
+ method: "DELETE", schema: "Result"
502
+ });
503
+ });
504
+ }
505
+ getFeatures() {
506
+ return __awaiter(this, void 0, void 0, function* () {
507
+ const location = "/features";
508
+ return yield this.call("getFeatures", location, {
509
+ method: "GET", schema: "Features"
510
+ });
511
+ });
512
+ }
513
+ getFeeds() {
514
+ return __awaiter(this, void 0, void 0, function* () {
515
+ const location = "/feeds";
516
+ return yield this.call("getFeeds", location, {
517
+ method: "GET", schema: "FeedInfoArray"
518
+ });
519
+ });
520
+ }
521
+ getFeedGeneral(feedName) {
522
+ return __awaiter(this, void 0, void 0, function* () {
523
+ const location = (0, util_1.ut) `/feeds/${feedName}`;
524
+ return yield this.call("getFeedGeneral", location, {
525
+ method: "GET", schema: "FeedInfo"
526
+ });
527
+ });
528
+ }
529
+ getFeedStatus(feedName) {
530
+ return __awaiter(this, void 0, void 0, function* () {
531
+ const location = (0, util_1.ut) `/feeds/${feedName}/status`;
532
+ return yield this.call("getFeedStatus", location, {
533
+ method: "GET", schema: "FeedStatus"
534
+ });
535
+ });
536
+ }
537
+ updateFeedStatus(feedName, change) {
538
+ return __awaiter(this, void 0, void 0, function* () {
539
+ const location = (0, util_1.ut) `/feeds/${feedName}/status`;
540
+ return yield this.call("updateFeedStatus", location, {
541
+ method: "PUT", body: change, schema: "FeedStatus"
542
+ });
543
+ });
544
+ }
545
+ getFeedSlice(feedName_1) {
546
+ return __awaiter(this, arguments, void 0, function* (feedName, after = null, before = null, limit = null) {
547
+ const location = (0, util_1.ut) `/feeds/${feedName}/stories`;
548
+ const params = { after, before, limit };
549
+ return yield this.call("getFeedSlice", location, {
550
+ method: "GET", params, schema: "FeedSliceInfo", bodies: true
551
+ });
552
+ });
553
+ }
554
+ getFriendGroups() {
555
+ return __awaiter(this, void 0, void 0, function* () {
556
+ const location = "/people/friends/groups";
557
+ return yield this.call("getFriendGroups", location, {
558
+ method: "GET", schema: "FriendGroupInfoArray"
559
+ });
560
+ });
561
+ }
562
+ getFriendGroup(id) {
563
+ return __awaiter(this, void 0, void 0, function* () {
564
+ const location = (0, util_1.ut) `/people/friends/groups/${id}`;
565
+ return yield this.call("getFriendGroup", location, {
566
+ method: "GET", schema: "FriendGroupInfo"
567
+ });
568
+ });
569
+ }
570
+ createFriendGroup(friendGroup) {
571
+ return __awaiter(this, void 0, void 0, function* () {
572
+ const location = "/people/friends/groups";
573
+ return yield this.call("createFriendGroup", location, {
574
+ method: "POST", body: friendGroup, schema: "FriendGroupInfo"
575
+ });
576
+ });
577
+ }
578
+ updateFriendGroup(id, friendGroup) {
579
+ return __awaiter(this, void 0, void 0, function* () {
580
+ const location = (0, util_1.ut) `/people/friends/groups/${id}`;
581
+ return yield this.call("updateFriendGroup", location, {
582
+ method: "PUT", body: friendGroup, schema: "FriendGroupInfo"
583
+ });
584
+ });
585
+ }
586
+ deleteFriendGroup(id) {
587
+ return __awaiter(this, void 0, void 0, function* () {
588
+ const location = (0, util_1.ut) `/people/friends/groups/${id}`;
589
+ return yield this.call("deleteFriendGroup", location, {
590
+ method: "DELETE", schema: "Result"
591
+ });
592
+ });
593
+ }
594
+ getFriends() {
595
+ return __awaiter(this, arguments, void 0, function* (groupId = null) {
596
+ const location = (0, util_1.ut) `/people/friends`;
597
+ const params = { groupId };
598
+ return yield this.call("getFriends", location, {
599
+ method: "GET", params, schema: "FriendInfoArray"
600
+ });
601
+ });
602
+ }
603
+ getFriend(name) {
604
+ return __awaiter(this, void 0, void 0, function* () {
605
+ const location = (0, util_1.ut) `/people/friends/${name}`;
606
+ return yield this.call("getFriend", location, {
607
+ method: "GET", schema: "FriendInfo"
608
+ });
609
+ });
610
+ }
611
+ updateFriends(friends) {
612
+ return __awaiter(this, void 0, void 0, function* () {
613
+ const location = "/people/friends";
614
+ return yield this.call("updateFriends", location, {
615
+ method: "PUT", body: friends, schema: "FriendInfoArray"
616
+ });
617
+ });
618
+ }
619
+ getFriendOfs() {
620
+ return __awaiter(this, void 0, void 0, function* () {
621
+ const location = "/people/friend-ofs";
622
+ return yield this.call("getFriendOfs", location, {
623
+ method: "GET", schema: "FriendOfInfoArray"
624
+ });
625
+ });
626
+ }
627
+ getFriendOf(name) {
628
+ return __awaiter(this, void 0, void 0, function* () {
629
+ const location = (0, util_1.ut) `/people/friend-ofs/${name}`;
630
+ return yield this.call("getFriendOf", location, {
631
+ method: "GET", schema: "FriendOfInfo"
632
+ });
633
+ });
634
+ }
635
+ uploadPrivateMedia(body) {
636
+ return __awaiter(this, void 0, void 0, function* () {
637
+ const location = "/media/private";
638
+ return yield this.call("uploadPrivateMedia", location, {
639
+ method: "POST", body, schema: "PrivateMediaFileInfo"
640
+ });
641
+ });
642
+ }
643
+ getPrivateMedia(id_1) {
644
+ return __awaiter(this, arguments, void 0, function* (id, width = null, download = null) {
645
+ const location = (0, util_1.ut) `/media/private/${id}/data`;
646
+ const params = { width, download };
647
+ return yield this.call("getPrivateMedia", location, {
648
+ method: "GET", params, schema: "blob"
649
+ });
650
+ });
651
+ }
652
+ getPrivateMediaInfo(id) {
653
+ return __awaiter(this, void 0, void 0, function* () {
654
+ const location = (0, util_1.ut) `/media/private/${id}/info`;
655
+ return yield this.call("getPrivateMediaInfo", location, {
656
+ method: "GET", schema: "PrivateMediaFileInfo"
657
+ });
658
+ });
659
+ }
660
+ getPrivateMediaParentEntry(id) {
661
+ return __awaiter(this, void 0, void 0, function* () {
662
+ const location = (0, util_1.ut) `/media/private/${id}/parent`;
663
+ return yield this.call("getPrivateMediaParentEntry", location, {
664
+ method: "GET", schema: "EntryInfoArray", bodies: true
665
+ });
666
+ });
667
+ }
668
+ uploadPublicMedia(body) {
669
+ return __awaiter(this, void 0, void 0, function* () {
670
+ const location = "/media/public";
671
+ return yield this.call("uploadPublicMedia", location, {
672
+ method: "POST", body, schema: "PublicMediaFileInfo"
673
+ });
674
+ });
675
+ }
676
+ getPublicMedia(id_1) {
677
+ return __awaiter(this, arguments, void 0, function* (id, width = null, download = null) {
678
+ const location = (0, util_1.ut) `/media/public/${id}/data`;
679
+ const params = { width, download };
680
+ return yield this.call("getPublicMedia", location, {
681
+ method: "GET", params, schema: "blob"
682
+ });
683
+ });
684
+ }
685
+ getPublicMediaInfo(id) {
686
+ return __awaiter(this, void 0, void 0, function* () {
687
+ const location = (0, util_1.ut) `/media/public/${id}/info`;
688
+ return yield this.call("getPublicMediaInfo", location, {
689
+ method: "GET", schema: "PublicMediaFileInfo"
690
+ });
691
+ });
692
+ }
693
+ getNodeName() {
694
+ return __awaiter(this, void 0, void 0, function* () {
695
+ const location = "/node-name";
696
+ return yield this.call("getNodeName", location, {
697
+ method: "GET", schema: "NodeNameInfo"
698
+ });
699
+ });
700
+ }
701
+ createNodeName(nameToRegister) {
702
+ return __awaiter(this, void 0, void 0, function* () {
703
+ const location = "/node-name";
704
+ return yield this.call("createNodeName", location, {
705
+ method: "POST", body: nameToRegister, schema: "RegisteredNameSecret"
706
+ });
707
+ });
708
+ }
709
+ updateNodeName(secret) {
710
+ return __awaiter(this, void 0, void 0, function* () {
711
+ const location = "/node-name";
712
+ return yield this.call("updateNodeName", location, {
713
+ method: "PUT", body: secret, schema: "Result"
714
+ });
715
+ });
716
+ }
717
+ deleteNodeName() {
718
+ return __awaiter(this, void 0, void 0, function* () {
719
+ const location = "/node-name";
720
+ return yield this.call("deleteNodeName", location, {
721
+ method: "DELETE", schema: "Result"
722
+ });
723
+ });
724
+ }
725
+ sendNotification(packet) {
726
+ return __awaiter(this, void 0, void 0, function* () {
727
+ const location = "/notifications";
728
+ return yield this.call("sendNotification", location, {
729
+ method: "POST", body: packet, schema: "Result"
730
+ });
731
+ });
732
+ }
733
+ getPeopleGeneral() {
734
+ return __awaiter(this, void 0, void 0, function* () {
735
+ const location = "/people";
736
+ return yield this.call("getPeopleGeneral", location, {
737
+ method: "GET", schema: "PeopleGeneralInfo"
738
+ });
739
+ });
740
+ }
741
+ registerPlugin(plugin) {
742
+ return __awaiter(this, void 0, void 0, function* () {
743
+ const location = "/plugins";
744
+ return yield this.call("registerPlugin", location, {
745
+ method: "POST", body: plugin, schema: "PluginInfo"
746
+ });
747
+ });
748
+ }
749
+ getPlugins() {
750
+ return __awaiter(this, void 0, void 0, function* () {
751
+ const location = "/plugins";
752
+ return yield this.call("getPlugins", location, {
753
+ method: "GET", schema: "PluginInfoArray"
754
+ });
755
+ });
756
+ }
757
+ getPlugin(pluginName) {
758
+ return __awaiter(this, void 0, void 0, function* () {
759
+ const location = (0, util_1.ut) `/plugins/${pluginName}`;
760
+ return yield this.call("getPlugin", location, {
761
+ method: "GET", schema: "PluginInfo"
762
+ });
763
+ });
764
+ }
765
+ unregisterPlugin(pluginName) {
766
+ return __awaiter(this, void 0, void 0, function* () {
767
+ const location = (0, util_1.ut) `/plugins/${pluginName}`;
768
+ return yield this.call("unregisterPlugin", location, {
769
+ method: "DELETE", schema: "Result"
770
+ });
771
+ });
772
+ }
773
+ createPosting(posting) {
774
+ return __awaiter(this, void 0, void 0, function* () {
775
+ const location = "/postings";
776
+ return yield this.call("createPosting", location, {
777
+ method: "POST", body: posting, schema: "PostingInfo", bodies: true
778
+ });
779
+ });
780
+ }
781
+ updatePosting(id, posting) {
782
+ return __awaiter(this, void 0, void 0, function* () {
783
+ const location = (0, util_1.ut) `/postings/${id}`;
784
+ return yield this.call("updatePosting", location, {
785
+ method: "PUT", body: posting, schema: "PostingInfo", bodies: true
786
+ });
787
+ });
788
+ }
789
+ getPosting(id_1) {
790
+ return __awaiter(this, arguments, void 0, function* (id, withSource = false) {
791
+ const include = (0, util_1.commaSeparatedFlags)({ "source": withSource });
792
+ const location = (0, util_1.ut) `/postings/${id}`;
793
+ const params = { include };
794
+ return yield this.call("getPosting", location, {
795
+ method: "GET", params, schema: "PostingInfo", bodies: true
796
+ });
797
+ });
798
+ }
799
+ deletePosting(id) {
800
+ return __awaiter(this, void 0, void 0, function* () {
801
+ const location = (0, util_1.ut) `/postings/${id}`;
802
+ return yield this.call("deletePosting", location, {
803
+ method: "DELETE", schema: "Result"
804
+ });
805
+ });
806
+ }
807
+ getPostingsAttachedToPosting(id) {
808
+ return __awaiter(this, void 0, void 0, function* () {
809
+ const location = (0, util_1.ut) `/postings/${id}/attached`;
810
+ return yield this.call("getPostingsAttachedToPosting", location, {
811
+ method: "GET", schema: "PostingInfoArray", bodies: true
812
+ });
813
+ });
814
+ }
815
+ getPostingRevisions(postingId_1) {
816
+ return __awaiter(this, arguments, void 0, function* (postingId, limit = null) {
817
+ const location = (0, util_1.ut) `/postings/${postingId}/revisions`;
818
+ const params = { limit };
819
+ return yield this.call("getPostingRevisions", location, {
820
+ method: "GET", params, schema: "PostingRevisionInfoArray", bodies: true
821
+ });
822
+ });
823
+ }
824
+ getPostingRevision(postingId, id) {
825
+ return __awaiter(this, void 0, void 0, function* () {
826
+ const location = (0, util_1.ut) `/postings/${postingId}/revisions/${id}`;
827
+ return yield this.call("getPostingRevision", location, {
828
+ method: "GET", schema: "PostingRevisionInfo", bodies: true
829
+ });
830
+ });
831
+ }
832
+ restorePostingRevision(postingId, id) {
833
+ return __awaiter(this, void 0, void 0, function* () {
834
+ const location = (0, util_1.ut) `/postings/${postingId}/revisions/${id}/restore`;
835
+ return yield this.call("restorePostingRevision", location, {
836
+ method: "POST", schema: "PostingRevisionInfo", bodies: true
837
+ });
838
+ });
839
+ }
840
+ createPostingReaction(postingId, reaction) {
841
+ return __awaiter(this, void 0, void 0, function* () {
842
+ const location = (0, util_1.ut) `/postings/${postingId}/reactions`;
843
+ return yield this.call("createPostingReaction", location, {
844
+ method: "POST", body: reaction, schema: "ReactionCreated"
845
+ });
846
+ });
847
+ }
848
+ getPostingReactionsSlice(postingId_1) {
849
+ return __awaiter(this, arguments, void 0, function* (postingId, negative = null, emoji = null, before = null, limit = null) {
850
+ const location = (0, util_1.ut) `/postings/${postingId}/reactions`;
851
+ const params = { negative, emoji, before, limit };
852
+ return yield this.call("getPostingReactionsSlice", location, {
853
+ method: "GET", params, schema: "ReactionsSliceInfo"
854
+ });
855
+ });
856
+ }
857
+ updatePostingReaction(postingId, ownerName, reaction) {
858
+ return __awaiter(this, void 0, void 0, function* () {
859
+ const location = (0, util_1.ut) `/postings/${postingId}/reactions/${ownerName}`;
860
+ return yield this.call("updatePostingReaction", location, {
861
+ method: "PUT", body: reaction, schema: "ReactionInfo"
862
+ });
863
+ });
864
+ }
865
+ getPostingReaction(postingId, ownerName) {
866
+ return __awaiter(this, void 0, void 0, function* () {
867
+ const location = (0, util_1.ut) `/postings/${postingId}/reactions/${ownerName}`;
868
+ return yield this.call("getPostingReaction", location, {
869
+ method: "GET", schema: "ReactionInfo"
870
+ });
871
+ });
872
+ }
873
+ deleteAllPostingReactions(postingId) {
874
+ return __awaiter(this, void 0, void 0, function* () {
875
+ const location = (0, util_1.ut) `/postings/${postingId}/reactions`;
876
+ return yield this.call("deleteAllPostingReactions", location, {
877
+ method: "DELETE", schema: "Result"
878
+ });
879
+ });
880
+ }
881
+ deletePostingReaction(postingId, ownerName) {
882
+ return __awaiter(this, void 0, void 0, function* () {
883
+ const location = (0, util_1.ut) `/postings/${postingId}/reactions/${ownerName}`;
884
+ return yield this.call("deletePostingReaction", location, {
885
+ method: "DELETE", schema: "ReactionTotalsInfo"
886
+ });
887
+ });
888
+ }
889
+ searchPostingReactions(filter) {
890
+ return __awaiter(this, void 0, void 0, function* () {
891
+ const location = "/postings/reactions/search";
892
+ return yield this.call("searchPostingReactions", location, {
893
+ method: "POST", body: filter, schema: "ReactionInfoArray"
894
+ });
895
+ });
896
+ }
897
+ getPostingReactionTotals(postingId) {
898
+ return __awaiter(this, void 0, void 0, function* () {
899
+ const location = (0, util_1.ut) `/postings/${postingId}/reaction-totals`;
900
+ return yield this.call("getPostingReactionTotals", location, {
901
+ method: "GET", schema: "ReactionTotalsInfo"
902
+ });
903
+ });
904
+ }
905
+ searchPostingReactionTotals(filter) {
906
+ return __awaiter(this, void 0, void 0, function* () {
907
+ const location = "/postings/reaction-totals/search";
908
+ return yield this.call("searchPostingReactionTotals", location, {
909
+ method: "POST", body: filter, schema: "ReactionTotalsInfoArray"
910
+ });
911
+ });
912
+ }
913
+ getProfile() {
914
+ return __awaiter(this, arguments, void 0, function* (withSource = false) {
915
+ const include = (0, util_1.commaSeparatedFlags)({ "source": withSource });
916
+ const location = (0, util_1.ut) `/profile`;
917
+ const params = { include };
918
+ return yield this.call("getProfile", location, {
919
+ method: "GET", params, schema: "ProfileInfo"
920
+ });
921
+ });
922
+ }
923
+ updateProfile(profile) {
924
+ return __awaiter(this, void 0, void 0, function* () {
925
+ const location = "/profile";
926
+ return yield this.call("updateProfile", location, {
927
+ method: "PUT", body: profile, schema: "ProfileInfo"
928
+ });
929
+ });
930
+ }
931
+ getDeleteNodeRequestStatus() {
932
+ return __awaiter(this, void 0, void 0, function* () {
933
+ const location = "/provider/delete-node";
934
+ return yield this.call("getDeleteNodeRequestStatus", location, {
935
+ method: "GET", schema: "DeleteNodeStatus"
936
+ });
937
+ });
938
+ }
939
+ sendDeleteNodeRequest(deleteNodeText) {
940
+ return __awaiter(this, void 0, void 0, function* () {
941
+ const location = "/provider/delete-node";
942
+ return yield this.call("sendDeleteNodeRequest", location, {
943
+ method: "POST", body: deleteNodeText, schema: "DeleteNodeStatus"
944
+ });
945
+ });
946
+ }
947
+ cancelDeleteNodeRequest() {
948
+ return __awaiter(this, void 0, void 0, function* () {
949
+ const location = "/provider/delete-node";
950
+ return yield this.call("cancelDeleteNodeRequest", location, {
951
+ method: "DELETE", schema: "DeleteNodeStatus"
952
+ });
953
+ });
954
+ }
955
+ proxyMedia(url) {
956
+ return __awaiter(this, void 0, void 0, function* () {
957
+ const location = (0, util_1.ut) `/proxy/media`;
958
+ const params = { url };
959
+ return yield this.call("proxyMedia", location, {
960
+ method: "GET", params, schema: "blob"
961
+ });
962
+ });
963
+ }
964
+ proxyLinkPreview(url) {
965
+ return __awaiter(this, void 0, void 0, function* () {
966
+ const location = (0, util_1.ut) `/proxy/link-preview`;
967
+ const params = { url };
968
+ return yield this.call("proxyLinkPreview", location, {
969
+ method: "GET", params, schema: "LinkPreviewInfo"
970
+ });
971
+ });
972
+ }
973
+ registerAtPushRelay(attributes) {
974
+ return __awaiter(this, void 0, void 0, function* () {
975
+ const location = "/push-relay";
976
+ return yield this.call("registerAtPushRelay", location, {
977
+ method: "POST", body: attributes, schema: "Result"
978
+ });
979
+ });
980
+ }
981
+ askRemoteNode(remoteNodeName, details) {
982
+ return __awaiter(this, void 0, void 0, function* () {
983
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/ask`;
984
+ return yield this.call("askRemoteNode", location, {
985
+ method: "POST", body: details, schema: "Result"
986
+ });
987
+ });
988
+ }
989
+ createRemoteComment(remoteNodeName, postingId, comment) {
990
+ return __awaiter(this, void 0, void 0, function* () {
991
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}/comments`;
992
+ return yield this.call("createRemoteComment", location, {
993
+ method: "POST", body: comment, schema: "Result"
994
+ });
995
+ });
996
+ }
997
+ updateRemoteComment(remoteNodeName, postingId, commentId, comment) {
998
+ return __awaiter(this, void 0, void 0, function* () {
999
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}/comments/${commentId}`;
1000
+ return yield this.call("updateRemoteComment", location, {
1001
+ method: "PUT", body: comment, schema: "Result"
1002
+ });
1003
+ });
1004
+ }
1005
+ deleteRemoteComment(remoteNodeName, postingId, commentId) {
1006
+ return __awaiter(this, void 0, void 0, function* () {
1007
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}/comments/${commentId}`;
1008
+ return yield this.call("deleteRemoteComment", location, {
1009
+ method: "DELETE", schema: "Result"
1010
+ });
1011
+ });
1012
+ }
1013
+ verifyRemoteComment(remoteNodeName, postingId, commentId) {
1014
+ return __awaiter(this, void 0, void 0, function* () {
1015
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}/comments/${commentId}/verify`;
1016
+ return yield this.call("verifyRemoteComment", location, {
1017
+ method: "POST", schema: "AsyncOperationCreated"
1018
+ });
1019
+ });
1020
+ }
1021
+ createRemoteCommentReaction(remoteNodeName, postingId, commentId, reaction) {
1022
+ return __awaiter(this, void 0, void 0, function* () {
1023
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}/comments/${commentId}/reactions`;
1024
+ return yield this.call("createRemoteCommentReaction", location, {
1025
+ method: "POST", body: reaction, schema: "Result"
1026
+ });
1027
+ });
1028
+ }
1029
+ deleteRemoteCommentReaction(remoteNodeName, postingId, commentId) {
1030
+ return __awaiter(this, void 0, void 0, function* () {
1031
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}/comments/${commentId}/reactions`;
1032
+ return yield this.call("deleteRemoteCommentReaction", location, {
1033
+ method: "DELETE", schema: "Result"
1034
+ });
1035
+ });
1036
+ }
1037
+ verifyRemoteCommentReaction(remoteNodeName, postingId, commentId, ownerName) {
1038
+ return __awaiter(this, void 0, void 0, function* () {
1039
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}/comments/${commentId}/reactions/${ownerName}/verify`;
1040
+ return yield this.call("verifyRemoteCommentReaction", location, {
1041
+ method: "POST", schema: "AsyncOperationCreated"
1042
+ });
1043
+ });
1044
+ }
1045
+ createRemotePosting(remoteNodeName, posting) {
1046
+ return __awaiter(this, void 0, void 0, function* () {
1047
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings`;
1048
+ return yield this.call("createRemotePosting", location, {
1049
+ method: "POST", body: posting, schema: "Result"
1050
+ });
1051
+ });
1052
+ }
1053
+ updateRemotePosting(remoteNodeName, postingId, posting) {
1054
+ return __awaiter(this, void 0, void 0, function* () {
1055
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}`;
1056
+ return yield this.call("updateRemotePosting", location, {
1057
+ method: "PUT", body: posting, schema: "Result"
1058
+ });
1059
+ });
1060
+ }
1061
+ deleteRemotePosting(remoteNodeName, postingId) {
1062
+ return __awaiter(this, void 0, void 0, function* () {
1063
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}`;
1064
+ return yield this.call("deleteRemotePosting", location, {
1065
+ method: "DELETE", schema: "Result"
1066
+ });
1067
+ });
1068
+ }
1069
+ verifyRemotePosting(remoteNodeName, id) {
1070
+ return __awaiter(this, void 0, void 0, function* () {
1071
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${id}/verify`;
1072
+ return yield this.call("verifyRemotePosting", location, {
1073
+ method: "POST", schema: "AsyncOperationCreated"
1074
+ });
1075
+ });
1076
+ }
1077
+ verifyRemotePostingRevision(remoteNodeName, id, revisionId) {
1078
+ return __awaiter(this, void 0, void 0, function* () {
1079
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${id}/revisions/${revisionId}/verify`;
1080
+ return yield this.call("verifyRemotePostingRevision", location, {
1081
+ method: "POST", schema: "AsyncOperationCreated"
1082
+ });
1083
+ });
1084
+ }
1085
+ createRemotePostingReaction(remoteNodeName, postingId, reaction) {
1086
+ return __awaiter(this, void 0, void 0, function* () {
1087
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}/reactions`;
1088
+ return yield this.call("createRemotePostingReaction", location, {
1089
+ method: "POST", body: reaction, schema: "Result"
1090
+ });
1091
+ });
1092
+ }
1093
+ deleteRemotePostingReaction(remoteNodeName, postingId) {
1094
+ return __awaiter(this, void 0, void 0, function* () {
1095
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}/reactions`;
1096
+ return yield this.call("deleteRemotePostingReaction", location, {
1097
+ method: "DELETE", schema: "Result"
1098
+ });
1099
+ });
1100
+ }
1101
+ verifyRemotePostingReaction(remoteNodeName, postingId, ownerName) {
1102
+ return __awaiter(this, void 0, void 0, function* () {
1103
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/postings/${postingId}/reactions/${ownerName}/verify`;
1104
+ return yield this.call("verifyRemotePostingReaction", location, {
1105
+ method: "POST", schema: "AsyncOperationCreated"
1106
+ });
1107
+ });
1108
+ }
1109
+ createRemoteSheriffOrder(remoteNodeName, sheriffOrder) {
1110
+ return __awaiter(this, void 0, void 0, function* () {
1111
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/sheriff/orders`;
1112
+ return yield this.call("createRemoteSheriffOrder", location, {
1113
+ method: "POST", body: sheriffOrder, schema: "Result"
1114
+ });
1115
+ });
1116
+ }
1117
+ getRemoteSheriffOrder(remoteNodeName, id) {
1118
+ return __awaiter(this, void 0, void 0, function* () {
1119
+ const location = (0, util_1.ut) `/nodes/${remoteNodeName}/sheriff/orders/${id}`;
1120
+ return yield this.call("getRemoteSheriffOrder", location, {
1121
+ method: "GET", schema: "SheriffOrderInfo"
1122
+ });
1123
+ });
1124
+ }
1125
+ updateSettings(settings) {
1126
+ return __awaiter(this, void 0, void 0, function* () {
1127
+ const location = "/settings";
1128
+ return yield this.call("updateSettings", location, {
1129
+ method: "PUT", body: settings, schema: "Result"
1130
+ });
1131
+ });
1132
+ }
1133
+ getClientSettings() {
1134
+ return __awaiter(this, arguments, void 0, function* (prefix = null) {
1135
+ const location = (0, util_1.ut) `/settings/client`;
1136
+ const params = { prefix };
1137
+ return yield this.call("getClientSettings", location, {
1138
+ method: "GET", params, schema: "SettingInfoArray"
1139
+ });
1140
+ });
1141
+ }
1142
+ getNodeSettings() {
1143
+ return __awaiter(this, arguments, void 0, function* (prefix = null) {
1144
+ const location = (0, util_1.ut) `/settings/node`;
1145
+ const params = { prefix };
1146
+ return yield this.call("getNodeSettings", location, {
1147
+ method: "GET", params, schema: "SettingInfoArray"
1148
+ });
1149
+ });
1150
+ }
1151
+ getNodeSettingsMetadata() {
1152
+ return __awaiter(this, arguments, void 0, function* (prefix = null) {
1153
+ const location = (0, util_1.ut) `/settings/node/metadata`;
1154
+ const params = { prefix };
1155
+ return yield this.call("getNodeSettingsMetadata", location, {
1156
+ method: "GET", params, schema: "SettingMetaInfoArray"
1157
+ });
1158
+ });
1159
+ }
1160
+ updateNodeSettingsMetadata(metadata) {
1161
+ return __awaiter(this, void 0, void 0, function* () {
1162
+ const location = "/settings/node/metadata";
1163
+ return yield this.call("updateNodeSettingsMetadata", location, {
1164
+ method: "PUT", body: metadata, schema: "Result"
1165
+ });
1166
+ });
1167
+ }
1168
+ getSheriffComplaintGroupsSlice() {
1169
+ return __awaiter(this, arguments, void 0, function* (after = null, before = null, limit = null, status = null) {
1170
+ const location = (0, util_1.ut) `/sheriff/complaints/groups`;
1171
+ const params = { after, before, limit, status };
1172
+ return yield this.call("getSheriffComplaintGroupsSlice", location, {
1173
+ method: "GET", params, schema: "SheriffComplaintGroupsSliceInfo"
1174
+ });
1175
+ });
1176
+ }
1177
+ getSheriffComplaintGroup(id) {
1178
+ return __awaiter(this, void 0, void 0, function* () {
1179
+ const location = (0, util_1.ut) `/sheriff/complaints/groups/${id}`;
1180
+ return yield this.call("getSheriffComplaintGroup", location, {
1181
+ method: "GET", schema: "SheriffComplaintGroupInfo"
1182
+ });
1183
+ });
1184
+ }
1185
+ getSheriffComplaintsByGroup(id) {
1186
+ return __awaiter(this, void 0, void 0, function* () {
1187
+ const location = (0, util_1.ut) `/sheriff/complaints/groups/${id}/complaints`;
1188
+ return yield this.call("getSheriffComplaintsByGroup", location, {
1189
+ method: "GET", schema: "SheriffComplaintInfoArray"
1190
+ });
1191
+ });
1192
+ }
1193
+ updateSheriffComplaintGroup(id, decision) {
1194
+ return __awaiter(this, void 0, void 0, function* () {
1195
+ const location = (0, util_1.ut) `/sheriff/complaints/groups/${id}`;
1196
+ return yield this.call("updateSheriffComplaintGroup", location, {
1197
+ method: "PUT", body: decision, schema: "SheriffComplaintGroupInfo"
1198
+ });
1199
+ });
1200
+ }
1201
+ createSheriffComplaint(complaint) {
1202
+ return __awaiter(this, void 0, void 0, function* () {
1203
+ const location = "/sheriff/complaints";
1204
+ return yield this.call("createSheriffComplaint", location, {
1205
+ method: "POST", body: complaint, schema: "SheriffComplaintInfo"
1206
+ });
1207
+ });
1208
+ }
1209
+ createSheriffOrder(sheriffOrder) {
1210
+ return __awaiter(this, void 0, void 0, function* () {
1211
+ const location = "/sheriff/orders";
1212
+ return yield this.call("createSheriffOrder", location, {
1213
+ method: "POST", body: sheriffOrder, schema: "Result"
1214
+ });
1215
+ });
1216
+ }
1217
+ getStory(id) {
1218
+ return __awaiter(this, void 0, void 0, function* () {
1219
+ const location = (0, util_1.ut) `/stories/${id}`;
1220
+ return yield this.call("getStory", location, {
1221
+ method: "GET", schema: "StoryInfo", bodies: true
1222
+ });
1223
+ });
1224
+ }
1225
+ updateStory(id, story) {
1226
+ return __awaiter(this, void 0, void 0, function* () {
1227
+ const location = (0, util_1.ut) `/stories/${id}`;
1228
+ return yield this.call("updateStory", location, {
1229
+ method: "PUT", body: story, schema: "StoryInfo", bodies: true
1230
+ });
1231
+ });
1232
+ }
1233
+ getSubscribers() {
1234
+ return __awaiter(this, arguments, void 0, function* (remoteNodeName = null, type = null, feedName = null, entryId = null) {
1235
+ const location = (0, util_1.ut) `/people/subscribers`;
1236
+ const params = { nodeName: remoteNodeName, type, feedName, entryId };
1237
+ return yield this.call("getSubscribers", location, {
1238
+ method: "GET", params, schema: "SubscriberInfoArray"
1239
+ });
1240
+ });
1241
+ }
1242
+ createSubscriber(subscriber) {
1243
+ return __awaiter(this, void 0, void 0, function* () {
1244
+ const location = "/people/subscribers";
1245
+ return yield this.call("createSubscriber", location, {
1246
+ method: "POST", body: subscriber, schema: "SubscriberInfo"
1247
+ });
1248
+ });
1249
+ }
1250
+ getSubscriber(id) {
1251
+ return __awaiter(this, void 0, void 0, function* () {
1252
+ const location = (0, util_1.ut) `/people/subscribers/${id}`;
1253
+ return yield this.call("getSubscriber", location, {
1254
+ method: "GET", schema: "SubscriberInfo"
1255
+ });
1256
+ });
1257
+ }
1258
+ updateSubscriber(id, subscriber) {
1259
+ return __awaiter(this, void 0, void 0, function* () {
1260
+ const location = (0, util_1.ut) `/people/subscribers/${id}`;
1261
+ return yield this.call("updateSubscriber", location, {
1262
+ method: "PUT", body: subscriber, schema: "SubscriberInfo"
1263
+ });
1264
+ });
1265
+ }
1266
+ deleteSubscriber(id) {
1267
+ return __awaiter(this, void 0, void 0, function* () {
1268
+ const location = (0, util_1.ut) `/people/subscribers/${id}`;
1269
+ return yield this.call("deleteSubscriber", location, {
1270
+ method: "DELETE", schema: "ContactInfo"
1271
+ });
1272
+ });
1273
+ }
1274
+ getSubscriptions() {
1275
+ return __awaiter(this, arguments, void 0, function* (remoteNodeName = null, type = null) {
1276
+ const location = (0, util_1.ut) `/people/subscriptions`;
1277
+ const params = { nodeName: remoteNodeName, type };
1278
+ return yield this.call("getSubscriptions", location, {
1279
+ method: "GET", params, schema: "SubscriptionInfoArray"
1280
+ });
1281
+ });
1282
+ }
1283
+ createSubscription(subscription) {
1284
+ return __awaiter(this, void 0, void 0, function* () {
1285
+ const location = "/people/subscriptions";
1286
+ return yield this.call("createSubscription", location, {
1287
+ method: "POST", body: subscription, schema: "SubscriptionInfo"
1288
+ });
1289
+ });
1290
+ }
1291
+ updateSubscription(id, subscription) {
1292
+ return __awaiter(this, void 0, void 0, function* () {
1293
+ const location = (0, util_1.ut) `/people/subscriptions/${id}`;
1294
+ return yield this.call("updateSubscription", location, {
1295
+ method: "PUT", body: subscription, schema: "SubscriptionInfo"
1296
+ });
1297
+ });
1298
+ }
1299
+ deleteSubscription(id) {
1300
+ return __awaiter(this, void 0, void 0, function* () {
1301
+ const location = (0, util_1.ut) `/people/subscriptions/${id}`;
1302
+ return yield this.call("deleteSubscription", location, {
1303
+ method: "DELETE", schema: "ContactInfo"
1304
+ });
1305
+ });
1306
+ }
1307
+ searchSubscriptions(filter) {
1308
+ return __awaiter(this, void 0, void 0, function* () {
1309
+ const location = "/people/subscriptions/search";
1310
+ return yield this.call("searchSubscriptions", location, {
1311
+ method: "POST", body: filter, schema: "SubscriptionInfoArray"
1312
+ });
1313
+ });
1314
+ }
1315
+ getTokens() {
1316
+ return __awaiter(this, void 0, void 0, function* () {
1317
+ const location = "/tokens";
1318
+ return yield this.call("getTokens", location, {
1319
+ method: "GET", schema: "TokenInfoArray"
1320
+ });
1321
+ });
1322
+ }
1323
+ createToken(token) {
1324
+ return __awaiter(this, void 0, void 0, function* () {
1325
+ const location = "/tokens";
1326
+ return yield this.call("createToken", location, {
1327
+ method: "POST", body: token, schema: "TokenInfo"
1328
+ });
1329
+ });
1330
+ }
1331
+ getTokenInfo(id) {
1332
+ return __awaiter(this, void 0, void 0, function* () {
1333
+ const location = (0, util_1.ut) `/tokens/${id}`;
1334
+ return yield this.call("getTokenInfo", location, {
1335
+ method: "GET", schema: "TokenInfo"
1336
+ });
1337
+ });
1338
+ }
1339
+ updateToken(id, token) {
1340
+ return __awaiter(this, void 0, void 0, function* () {
1341
+ const location = (0, util_1.ut) `/tokens/${id}`;
1342
+ return yield this.call("updateToken", location, {
1343
+ method: "PUT", body: token, schema: "TokenInfo"
1344
+ });
1345
+ });
1346
+ }
1347
+ deleteToken(id) {
1348
+ return __awaiter(this, void 0, void 0, function* () {
1349
+ const location = (0, util_1.ut) `/tokens/${id}`;
1350
+ return yield this.call("deleteToken", location, {
1351
+ method: "DELETE", schema: "Result"
1352
+ });
1353
+ });
1354
+ }
1355
+ getUserListGeneral(name) {
1356
+ return __awaiter(this, void 0, void 0, function* () {
1357
+ const location = (0, util_1.ut) `/user-lists/${name}`;
1358
+ return yield this.call("getUserListGeneral", location, {
1359
+ method: "GET", schema: "UserListInfo"
1360
+ });
1361
+ });
1362
+ }
1363
+ getUserListSlice(name_1) {
1364
+ return __awaiter(this, arguments, void 0, function* (name, after = null, before = null, limit = null) {
1365
+ const location = (0, util_1.ut) `/user-lists/${name}/items`;
1366
+ const params = { after, before, limit };
1367
+ return yield this.call("getUserListSlice", location, {
1368
+ method: "GET", params, schema: "UserListSliceInfo"
1369
+ });
1370
+ });
1371
+ }
1372
+ getUserListItem(name, remoteNodeName) {
1373
+ return __awaiter(this, void 0, void 0, function* () {
1374
+ const location = (0, util_1.ut) `/user-lists/${name}/items/${remoteNodeName}`;
1375
+ return yield this.call("getUserListItem", location, {
1376
+ method: "GET", schema: "UserListItemInfo"
1377
+ });
1378
+ });
1379
+ }
1380
+ createUserListItem(name, item) {
1381
+ return __awaiter(this, void 0, void 0, function* () {
1382
+ const location = (0, util_1.ut) `/user-lists/${name}/items`;
1383
+ return yield this.call("createUserListItem", location, {
1384
+ method: "POST", body: item, schema: "UserListItemInfo"
1385
+ });
1386
+ });
1387
+ }
1388
+ deleteUserListItem(name, remoteNodeName) {
1389
+ return __awaiter(this, void 0, void 0, function* () {
1390
+ const location = (0, util_1.ut) `/user-lists/${name}/items/${remoteNodeName}`;
1391
+ return yield this.call("deleteUserListItem", location, {
1392
+ method: "DELETE", schema: "Result"
1393
+ });
1394
+ });
1395
+ }
1396
+ whoAmI() {
1397
+ return __awaiter(this, void 0, void 0, function* () {
1398
+ const location = "/whoami";
1399
+ return yield this.call("whoAmI", location, {
1400
+ method: "GET", schema: "WhoAmI"
1401
+ });
1402
+ });
1403
+ }
1404
+ }
1405
+ exports.MoeraNode = MoeraNode;