mongodb-livedata-server 0.1.3 → 0.1.5

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 (92) hide show
  1. package/README.md +2 -2
  2. package/dist/livedata_server.d.ts +4 -4
  3. package/dist/livedata_server.js +11 -11
  4. package/dist/meteor/binary-heap/max_heap.d.ts +31 -31
  5. package/dist/meteor/binary-heap/max_heap.js +186 -186
  6. package/dist/meteor/binary-heap/min_heap.d.ts +6 -6
  7. package/dist/meteor/binary-heap/min_heap.js +17 -17
  8. package/dist/meteor/binary-heap/min_max_heap.d.ts +11 -11
  9. package/dist/meteor/binary-heap/min_max_heap.js +48 -48
  10. package/dist/meteor/callback-hook/hook.d.ts +11 -11
  11. package/dist/meteor/callback-hook/hook.js +78 -78
  12. package/dist/meteor/ddp/crossbar.d.ts +15 -15
  13. package/dist/meteor/ddp/crossbar.js +136 -136
  14. package/dist/meteor/ddp/heartbeat.d.ts +19 -19
  15. package/dist/meteor/ddp/heartbeat.js +77 -77
  16. package/dist/meteor/ddp/livedata_server.d.ts +141 -142
  17. package/dist/meteor/ddp/livedata_server.js +403 -403
  18. package/dist/meteor/ddp/method-invocation.d.ts +35 -35
  19. package/dist/meteor/ddp/method-invocation.js +72 -72
  20. package/dist/meteor/ddp/random-stream.d.ts +8 -8
  21. package/dist/meteor/ddp/random-stream.js +100 -100
  22. package/dist/meteor/ddp/session-collection-view.d.ts +20 -20
  23. package/dist/meteor/ddp/session-collection-view.js +106 -106
  24. package/dist/meteor/ddp/session-document-view.d.ts +8 -8
  25. package/dist/meteor/ddp/session-document-view.js +82 -82
  26. package/dist/meteor/ddp/session.d.ts +75 -75
  27. package/dist/meteor/ddp/session.js +590 -590
  28. package/dist/meteor/ddp/stream_server.d.ts +20 -21
  29. package/dist/meteor/ddp/stream_server.js +181 -181
  30. package/dist/meteor/ddp/subscription.d.ts +94 -94
  31. package/dist/meteor/ddp/subscription.js +370 -370
  32. package/dist/meteor/ddp/utils.d.ts +8 -8
  33. package/dist/meteor/ddp/utils.js +104 -104
  34. package/dist/meteor/ddp/writefence.d.ts +20 -20
  35. package/dist/meteor/ddp/writefence.js +111 -111
  36. package/dist/meteor/diff-sequence/diff.d.ts +17 -17
  37. package/dist/meteor/diff-sequence/diff.js +257 -257
  38. package/dist/meteor/ejson/ejson.d.ts +82 -82
  39. package/dist/meteor/ejson/ejson.js +568 -569
  40. package/dist/meteor/ejson/stringify.d.ts +2 -2
  41. package/dist/meteor/ejson/stringify.js +119 -119
  42. package/dist/meteor/ejson/utils.d.ts +12 -12
  43. package/dist/meteor/ejson/utils.js +42 -42
  44. package/dist/meteor/mongo/caching_change_observer.d.ts +16 -16
  45. package/dist/meteor/mongo/caching_change_observer.js +63 -63
  46. package/dist/meteor/mongo/doc_fetcher.d.ts +7 -7
  47. package/dist/meteor/mongo/doc_fetcher.js +53 -53
  48. package/dist/meteor/mongo/geojson_utils.d.ts +3 -3
  49. package/dist/meteor/mongo/geojson_utils.js +40 -41
  50. package/dist/meteor/mongo/live_connection.d.ts +28 -28
  51. package/dist/meteor/mongo/live_connection.js +264 -264
  52. package/dist/meteor/mongo/live_cursor.d.ts +25 -25
  53. package/dist/meteor/mongo/live_cursor.js +60 -60
  54. package/dist/meteor/mongo/minimongo_common.d.ts +84 -84
  55. package/dist/meteor/mongo/minimongo_common.js +1998 -1998
  56. package/dist/meteor/mongo/minimongo_matcher.d.ts +23 -23
  57. package/dist/meteor/mongo/minimongo_matcher.js +283 -283
  58. package/dist/meteor/mongo/minimongo_sorter.d.ts +16 -16
  59. package/dist/meteor/mongo/minimongo_sorter.js +268 -268
  60. package/dist/meteor/mongo/observe_driver_utils.d.ts +9 -9
  61. package/dist/meteor/mongo/observe_driver_utils.js +72 -73
  62. package/dist/meteor/mongo/observe_multiplexer.d.ts +46 -46
  63. package/dist/meteor/mongo/observe_multiplexer.js +203 -203
  64. package/dist/meteor/mongo/oplog-observe-driver.d.ts +68 -68
  65. package/dist/meteor/mongo/oplog-observe-driver.js +918 -918
  66. package/dist/meteor/mongo/oplog_tailing.d.ts +35 -35
  67. package/dist/meteor/mongo/oplog_tailing.js +352 -352
  68. package/dist/meteor/mongo/oplog_v2_converter.d.ts +1 -1
  69. package/dist/meteor/mongo/oplog_v2_converter.js +125 -126
  70. package/dist/meteor/mongo/polling_observe_driver.d.ts +30 -30
  71. package/dist/meteor/mongo/polling_observe_driver.js +216 -221
  72. package/dist/meteor/mongo/synchronous-cursor.d.ts +17 -17
  73. package/dist/meteor/mongo/synchronous-cursor.js +261 -261
  74. package/dist/meteor/mongo/synchronous-queue.d.ts +13 -13
  75. package/dist/meteor/mongo/synchronous-queue.js +110 -110
  76. package/dist/meteor/ordered-dict/ordered_dict.d.ts +31 -31
  77. package/dist/meteor/ordered-dict/ordered_dict.js +198 -198
  78. package/dist/meteor/random/AbstractRandomGenerator.d.ts +42 -42
  79. package/dist/meteor/random/AbstractRandomGenerator.js +92 -92
  80. package/dist/meteor/random/AleaRandomGenerator.d.ts +13 -13
  81. package/dist/meteor/random/AleaRandomGenerator.js +90 -90
  82. package/dist/meteor/random/NodeRandomGenerator.d.ts +16 -16
  83. package/dist/meteor/random/NodeRandomGenerator.js +42 -42
  84. package/dist/meteor/random/createAleaGenerator.d.ts +2 -2
  85. package/dist/meteor/random/createAleaGenerator.js +32 -32
  86. package/dist/meteor/random/createRandom.d.ts +1 -1
  87. package/dist/meteor/random/createRandom.js +22 -22
  88. package/dist/meteor/random/main.d.ts +1 -1
  89. package/dist/meteor/random/main.js +12 -12
  90. package/dist/meteor/types.d.ts +1 -1
  91. package/dist/meteor/types.js +2 -2
  92. package/package.json +5 -5
@@ -1,77 +1,77 @@
1
- "use strict";
2
- // Heartbeat options:
3
- // heartbeatInterval: interval to send pings, in milliseconds.
4
- // heartbeatTimeout: timeout to close the connection if a reply isn't
5
- // received, in milliseconds.
6
- // sendPing: function to call to send a ping on the connection.
7
- // onTimeout: function to call to close the connection.
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.Heartbeat = void 0;
10
- class Heartbeat {
11
- constructor(options) {
12
- this.heartbeatInterval = options.heartbeatInterval;
13
- this.heartbeatTimeout = options.heartbeatTimeout;
14
- this._sendPing = options.sendPing;
15
- this._onTimeout = options.onTimeout;
16
- this._seenPacket = false;
17
- this._heartbeatIntervalHandle = null;
18
- this._heartbeatTimeoutHandle = null;
19
- }
20
- stop() {
21
- this._clearHeartbeatIntervalTimer();
22
- this._clearHeartbeatTimeoutTimer();
23
- }
24
- start() {
25
- this.stop();
26
- this._startHeartbeatIntervalTimer();
27
- }
28
- _startHeartbeatIntervalTimer() {
29
- this._heartbeatIntervalHandle = setInterval(() => this._heartbeatIntervalFired(), this.heartbeatInterval);
30
- }
31
- _startHeartbeatTimeoutTimer() {
32
- this._heartbeatTimeoutHandle = setTimeout(() => this._heartbeatTimeoutFired(), this.heartbeatTimeout);
33
- }
34
- _clearHeartbeatIntervalTimer() {
35
- if (this._heartbeatIntervalHandle) {
36
- clearInterval(this._heartbeatIntervalHandle);
37
- this._heartbeatIntervalHandle = null;
38
- }
39
- }
40
- _clearHeartbeatTimeoutTimer() {
41
- if (this._heartbeatTimeoutHandle) {
42
- clearTimeout(this._heartbeatTimeoutHandle);
43
- this._heartbeatTimeoutHandle = null;
44
- }
45
- }
46
- // The heartbeat interval timer is fired when we should send a ping.
47
- _heartbeatIntervalFired() {
48
- // don't send ping if we've seen a packet since we last checked,
49
- // *or* if we have already sent a ping and are awaiting a timeout.
50
- // That shouldn't happen, but it's possible if
51
- // `this.heartbeatInterval` is smaller than
52
- // `this.heartbeatTimeout`.
53
- if (!this._seenPacket && !this._heartbeatTimeoutHandle) {
54
- this._sendPing();
55
- // Set up timeout, in case a pong doesn't arrive in time.
56
- this._startHeartbeatTimeoutTimer();
57
- }
58
- this._seenPacket = false;
59
- }
60
- // The heartbeat timeout timer is fired when we sent a ping, but we
61
- // timed out waiting for the pong.
62
- _heartbeatTimeoutFired() {
63
- this._heartbeatTimeoutHandle = null;
64
- this._onTimeout();
65
- }
66
- messageReceived() {
67
- // Tell periodic checkin that we have seen a packet, and thus it
68
- // does not need to send a ping this cycle.
69
- this._seenPacket = true;
70
- // If we were waiting for a pong, we got it.
71
- if (this._heartbeatTimeoutHandle) {
72
- this._clearHeartbeatTimeoutTimer();
73
- }
74
- }
75
- }
76
- exports.Heartbeat = Heartbeat;
77
- ;
1
+ "use strict";
2
+ // Heartbeat options:
3
+ // heartbeatInterval: interval to send pings, in milliseconds.
4
+ // heartbeatTimeout: timeout to close the connection if a reply isn't
5
+ // received, in milliseconds.
6
+ // sendPing: function to call to send a ping on the connection.
7
+ // onTimeout: function to call to close the connection.
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.Heartbeat = void 0;
10
+ class Heartbeat {
11
+ constructor(options) {
12
+ this.heartbeatInterval = options.heartbeatInterval;
13
+ this.heartbeatTimeout = options.heartbeatTimeout;
14
+ this._sendPing = options.sendPing;
15
+ this._onTimeout = options.onTimeout;
16
+ this._seenPacket = false;
17
+ this._heartbeatIntervalHandle = null;
18
+ this._heartbeatTimeoutHandle = null;
19
+ }
20
+ stop() {
21
+ this._clearHeartbeatIntervalTimer();
22
+ this._clearHeartbeatTimeoutTimer();
23
+ }
24
+ start() {
25
+ this.stop();
26
+ this._startHeartbeatIntervalTimer();
27
+ }
28
+ _startHeartbeatIntervalTimer() {
29
+ this._heartbeatIntervalHandle = setInterval(() => this._heartbeatIntervalFired(), this.heartbeatInterval);
30
+ }
31
+ _startHeartbeatTimeoutTimer() {
32
+ this._heartbeatTimeoutHandle = setTimeout(() => this._heartbeatTimeoutFired(), this.heartbeatTimeout);
33
+ }
34
+ _clearHeartbeatIntervalTimer() {
35
+ if (this._heartbeatIntervalHandle) {
36
+ clearInterval(this._heartbeatIntervalHandle);
37
+ this._heartbeatIntervalHandle = null;
38
+ }
39
+ }
40
+ _clearHeartbeatTimeoutTimer() {
41
+ if (this._heartbeatTimeoutHandle) {
42
+ clearTimeout(this._heartbeatTimeoutHandle);
43
+ this._heartbeatTimeoutHandle = null;
44
+ }
45
+ }
46
+ // The heartbeat interval timer is fired when we should send a ping.
47
+ _heartbeatIntervalFired() {
48
+ // don't send ping if we've seen a packet since we last checked,
49
+ // *or* if we have already sent a ping and are awaiting a timeout.
50
+ // That shouldn't happen, but it's possible if
51
+ // `this.heartbeatInterval` is smaller than
52
+ // `this.heartbeatTimeout`.
53
+ if (!this._seenPacket && !this._heartbeatTimeoutHandle) {
54
+ this._sendPing();
55
+ // Set up timeout, in case a pong doesn't arrive in time.
56
+ this._startHeartbeatTimeoutTimer();
57
+ }
58
+ this._seenPacket = false;
59
+ }
60
+ // The heartbeat timeout timer is fired when we sent a ping, but we
61
+ // timed out waiting for the pong.
62
+ _heartbeatTimeoutFired() {
63
+ this._heartbeatTimeoutHandle = null;
64
+ this._onTimeout();
65
+ }
66
+ messageReceived() {
67
+ // Tell periodic checkin that we have seen a packet, and thus it
68
+ // does not need to send a ping this cycle.
69
+ this._seenPacket = true;
70
+ // If we were waiting for a pong, we got it.
71
+ if (this._heartbeatTimeoutHandle) {
72
+ this._clearHeartbeatTimeoutTimer();
73
+ }
74
+ }
75
+ }
76
+ exports.Heartbeat = Heartbeat;
77
+ ;
@@ -1,142 +1,141 @@
1
- /// <reference types="node" />
2
- import { MethodInvocation } from "./method-invocation";
3
- import { StreamServerSocket } from "./stream_server";
4
- import { DDPSession, SessionConnectionHandle } from "./session";
5
- import { Server } from "http";
6
- import { Hook } from "../callback-hook/hook";
7
- import { Subscription } from "./subscription";
8
- export declare const DDP: {
9
- _CurrentPublicationInvocation: Subscription;
10
- _CurrentMethodInvocation: MethodInvocation;
11
- };
12
- /******************************************************************************/
13
- /******************************************************************************/
14
- interface PublicationStrategy {
15
- useCollectionView: boolean;
16
- doAccountingForCollection: boolean;
17
- }
18
- export declare class DDPServer {
19
- private options;
20
- private onConnectionHook;
21
- onMessageHook: Hook;
22
- private publish_handlers;
23
- universal_publish_handlers: any[];
24
- private method_handlers;
25
- private _publicationStrategies;
26
- private sessions;
27
- private stream_server;
28
- constructor(options: {}, httpServer: Server);
29
- static publicationStrategies: {
30
- SERVER_MERGE: {
31
- useCollectionView: boolean;
32
- doAccountingForCollection: boolean;
33
- };
34
- NO_MERGE_NO_HISTORY: {
35
- useCollectionView: boolean;
36
- doAccountingForCollection: boolean;
37
- };
38
- NO_MERGE: {
39
- useCollectionView: boolean;
40
- doAccountingForCollection: boolean;
41
- };
42
- };
43
- /**
44
- * @summary Register a callback to be called when a new DDP connection is made to the server.
45
- * @locus Server
46
- * @param {function} callback The function to call when a new DDP connection is established.
47
- * @memberOf Meteor
48
- * @importFromPackage meteor
49
- */
50
- onConnection(fn: (conn: SessionConnectionHandle) => void): {
51
- callback: any;
52
- stop: () => void;
53
- };
54
- /**
55
- * @summary Set publication strategy for the given publication. Publications strategies are available from `DDPServer.publicationStrategies`. You call this method from `Meteor.server`, like `Meteor.server.setPublicationStrategy()`
56
- * @locus Server
57
- * @alias setPublicationStrategy
58
- * @param publicationName {String}
59
- * @param strategy {{useCollectionView: boolean, doAccountingForCollection: boolean}}
60
- * @memberOf Meteor.server
61
- * @importFromPackage meteor
62
- */
63
- setPublicationStrategy(publicationName: string, strategy: PublicationStrategy): void;
64
- /**
65
- * @summary Gets the publication strategy for the requested publication. You call this method from `Meteor.server`, like `Meteor.server.getPublicationStrategy()`
66
- * @locus Server
67
- * @alias getPublicationStrategy
68
- * @param publicationName {String}
69
- * @memberOf Meteor.server
70
- * @importFromPackage meteor
71
- * @return {{useCollectionView: boolean, doAccountingForCollection: boolean}}
72
- */
73
- getPublicationStrategy(publicationName: string): PublicationStrategy;
74
- /**
75
- * @summary Register a callback to be called when a new DDP message is received.
76
- * @locus Server
77
- * @param {function} callback The function to call when a new DDP message is received.
78
- * @memberOf Meteor
79
- * @importFromPackage meteor
80
- */
81
- onMessage(fn: any): {
82
- callback: any;
83
- stop: () => void;
84
- };
85
- _handleConnect(socket: StreamServerSocket, msg: any): void;
86
- /**
87
- * Register a publish handler function.
88
- *
89
- * @param name {String} identifier for query
90
- * @param handler {Function} publish handler
91
- *
92
- * Server will call handler function on each new subscription,
93
- * either when receiving DDP sub message for a named subscription, or on
94
- * DDP connect for a universal subscription.
95
- *
96
- * If name is null, this will be a subscription that is
97
- * automatically established and permanently on for all connected
98
- * client, instead of a subscription that can be turned on and off
99
- * with subscribe().
100
- *
101
- */
102
- /**
103
- * @summary Publish a record set.
104
- * @memberOf Meteor
105
- * @importFromPackage meteor
106
- * @locus Server
107
- * @param {String|Object} name If String, name of the record set. If Object, publications Dictionary of publish functions by name. If `null`, the set has no name, and the record set is automatically sent to all connected clients.
108
- * @param {Function} func Function called on the server each time a client subscribes. Inside the function, `this` is the publish handler object, described below. If the client passed arguments to `subscribe`, the function is called with the same arguments.
109
- */
110
- publish(name: string | Record<string, (this: MethodInvocation, ...args: any[]) => Promise<any>> | null, handler?: (this: MethodInvocation, ...args: any[]) => Promise<any>): void;
111
- _removeSession(session: DDPSession): void;
112
- /**
113
- * @summary Defines functions that can be invoked over the network by clients.
114
- * @locus Anywhere
115
- * @param {Object} methods Dictionary whose keys are method names and values are functions.
116
- * @memberOf Meteor
117
- * @importFromPackage meteor
118
- */
119
- methods(methods: Record<string, (this: MethodInvocation, ...args: any[]) => Promise<any>>): void;
120
- callAsync(name: string, ...args: any[]): Promise<unknown>;
121
- applyAsync(name: string, args: any[]): Promise<unknown>;
122
- _urlForSession(sessionId: any): string;
123
- }
124
- export declare function _calculateVersion(clientSupportedVersions: any, serverSupportedVersions: any): any;
125
- export declare function wrapInternalException(exception: any, context: string): any;
126
- export declare function maybeAuditArgumentChecks<T>(f: (...args: any[]) => T, context: any, args: any[] | null, description: string): T;
127
- export declare function ddpError(error: string | number, reason?: string, details?: string): {
128
- isClientSafe: boolean;
129
- error: string | number;
130
- reason: string;
131
- message: string;
132
- errorType: string;
133
- };
134
- export declare class ClientSafeError extends Error {
135
- error: string | number;
136
- reason?: string;
137
- details?: string;
138
- constructor(error: string | number, reason?: string, details?: string);
139
- isClientSafe: boolean;
140
- errorType: string;
141
- }
142
- export {};
1
+ import { MethodInvocation } from "./method-invocation";
2
+ import { StreamServerSocket } from "./stream_server";
3
+ import { DDPSession, SessionConnectionHandle } from "./session";
4
+ import { Server } from "http";
5
+ import { Hook } from "../callback-hook/hook";
6
+ import { Subscription } from "./subscription";
7
+ export declare const DDP: {
8
+ _CurrentPublicationInvocation: Subscription;
9
+ _CurrentMethodInvocation: MethodInvocation;
10
+ };
11
+ /******************************************************************************/
12
+ /******************************************************************************/
13
+ interface PublicationStrategy {
14
+ useCollectionView: boolean;
15
+ doAccountingForCollection: boolean;
16
+ }
17
+ export declare class DDPServer {
18
+ private options;
19
+ private onConnectionHook;
20
+ onMessageHook: Hook;
21
+ private publish_handlers;
22
+ universal_publish_handlers: any[];
23
+ private method_handlers;
24
+ private _publicationStrategies;
25
+ private sessions;
26
+ private stream_server;
27
+ constructor(options: {}, httpServer: Server);
28
+ static publicationStrategies: {
29
+ SERVER_MERGE: {
30
+ useCollectionView: boolean;
31
+ doAccountingForCollection: boolean;
32
+ };
33
+ NO_MERGE_NO_HISTORY: {
34
+ useCollectionView: boolean;
35
+ doAccountingForCollection: boolean;
36
+ };
37
+ NO_MERGE: {
38
+ useCollectionView: boolean;
39
+ doAccountingForCollection: boolean;
40
+ };
41
+ };
42
+ /**
43
+ * @summary Register a callback to be called when a new DDP connection is made to the server.
44
+ * @locus Server
45
+ * @param {function} callback The function to call when a new DDP connection is established.
46
+ * @memberOf Meteor
47
+ * @importFromPackage meteor
48
+ */
49
+ onConnection(fn: (conn: SessionConnectionHandle) => void): {
50
+ callback: any;
51
+ stop: () => void;
52
+ };
53
+ /**
54
+ * @summary Set publication strategy for the given publication. Publications strategies are available from `DDPServer.publicationStrategies`. You call this method from `Meteor.server`, like `Meteor.server.setPublicationStrategy()`
55
+ * @locus Server
56
+ * @alias setPublicationStrategy
57
+ * @param publicationName {String}
58
+ * @param strategy {{useCollectionView: boolean, doAccountingForCollection: boolean}}
59
+ * @memberOf Meteor.server
60
+ * @importFromPackage meteor
61
+ */
62
+ setPublicationStrategy(publicationName: string, strategy: PublicationStrategy): void;
63
+ /**
64
+ * @summary Gets the publication strategy for the requested publication. You call this method from `Meteor.server`, like `Meteor.server.getPublicationStrategy()`
65
+ * @locus Server
66
+ * @alias getPublicationStrategy
67
+ * @param publicationName {String}
68
+ * @memberOf Meteor.server
69
+ * @importFromPackage meteor
70
+ * @return {{useCollectionView: boolean, doAccountingForCollection: boolean}}
71
+ */
72
+ getPublicationStrategy(publicationName: string): PublicationStrategy;
73
+ /**
74
+ * @summary Register a callback to be called when a new DDP message is received.
75
+ * @locus Server
76
+ * @param {function} callback The function to call when a new DDP message is received.
77
+ * @memberOf Meteor
78
+ * @importFromPackage meteor
79
+ */
80
+ onMessage(fn: any): {
81
+ callback: any;
82
+ stop: () => void;
83
+ };
84
+ _handleConnect(socket: StreamServerSocket, msg: any): void;
85
+ /**
86
+ * Register a publish handler function.
87
+ *
88
+ * @param name {String} identifier for query
89
+ * @param handler {Function} publish handler
90
+ *
91
+ * Server will call handler function on each new subscription,
92
+ * either when receiving DDP sub message for a named subscription, or on
93
+ * DDP connect for a universal subscription.
94
+ *
95
+ * If name is null, this will be a subscription that is
96
+ * automatically established and permanently on for all connected
97
+ * client, instead of a subscription that can be turned on and off
98
+ * with subscribe().
99
+ *
100
+ */
101
+ /**
102
+ * @summary Publish a record set.
103
+ * @memberOf Meteor
104
+ * @importFromPackage meteor
105
+ * @locus Server
106
+ * @param {String|Object} name If String, name of the record set. If Object, publications Dictionary of publish functions by name. If `null`, the set has no name, and the record set is automatically sent to all connected clients.
107
+ * @param {Function} func Function called on the server each time a client subscribes. Inside the function, `this` is the publish handler object, described below. If the client passed arguments to `subscribe`, the function is called with the same arguments.
108
+ */
109
+ publish(name: string | Record<string, (this: MethodInvocation, ...args: any[]) => Promise<any>> | null, handler?: (this: MethodInvocation, ...args: any[]) => Promise<any>): void;
110
+ _removeSession(session: DDPSession): void;
111
+ /**
112
+ * @summary Defines functions that can be invoked over the network by clients.
113
+ * @locus Anywhere
114
+ * @param {Object} methods Dictionary whose keys are method names and values are functions.
115
+ * @memberOf Meteor
116
+ * @importFromPackage meteor
117
+ */
118
+ methods(methods: Record<string, (this: MethodInvocation, ...args: any[]) => Promise<any>>): void;
119
+ callAsync(name: string, ...args: any[]): Promise<unknown>;
120
+ applyAsync(name: string, args: any[]): Promise<unknown>;
121
+ _urlForSession(sessionId: any): string;
122
+ }
123
+ export declare function _calculateVersion(clientSupportedVersions: any, serverSupportedVersions: any): any;
124
+ export declare function wrapInternalException(exception: any, context: string): any;
125
+ export declare function maybeAuditArgumentChecks<T>(f: (...args: any[]) => T, context: any, args: any[] | null, description: string): T;
126
+ export declare function ddpError(error: string | number, reason?: string, details?: string): {
127
+ isClientSafe: boolean;
128
+ error: string | number;
129
+ reason: string;
130
+ message: string;
131
+ errorType: string;
132
+ };
133
+ export declare class ClientSafeError extends Error {
134
+ error: string | number;
135
+ reason?: string;
136
+ details?: string;
137
+ constructor(error: string | number, reason?: string, details?: string);
138
+ isClientSafe: boolean;
139
+ errorType: string;
140
+ }
141
+ export {};