zai-fca 1.0.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.

Potentially problematic release.


This version of zai-fca might be problematic. Click here for more details.

Files changed (185) hide show
  1. package/.cache/replit/env/latest +56 -0
  2. package/.cache/replit/env/latest.json +1 -0
  3. package/.cache/replit/modules/nodejs-20.res +1 -0
  4. package/.cache/replit/modules/replit.res +1 -0
  5. package/.cache/replit/modules.stamp +0 -0
  6. package/.cache/typescript/5.6/node_modules/.package-lock.json +40 -0
  7. package/.cache/typescript/5.6/node_modules/@types/node/LICENSE +21 -0
  8. package/.cache/typescript/5.6/node_modules/@types/node/README.md +15 -0
  9. package/.cache/typescript/5.6/node_modules/@types/node/assert/strict.d.ts +8 -0
  10. package/.cache/typescript/5.6/node_modules/@types/node/assert.d.ts +1040 -0
  11. package/.cache/typescript/5.6/node_modules/@types/node/async_hooks.d.ts +541 -0
  12. package/.cache/typescript/5.6/node_modules/@types/node/buffer.buffer.d.ts +385 -0
  13. package/.cache/typescript/5.6/node_modules/@types/node/buffer.d.ts +1933 -0
  14. package/.cache/typescript/5.6/node_modules/@types/node/child_process.d.ts +1549 -0
  15. package/.cache/typescript/5.6/node_modules/@types/node/cluster.d.ts +579 -0
  16. package/.cache/typescript/5.6/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
  17. package/.cache/typescript/5.6/node_modules/@types/node/compatibility/index.d.ts +9 -0
  18. package/.cache/typescript/5.6/node_modules/@types/node/compatibility/indexable.d.ts +23 -0
  19. package/.cache/typescript/5.6/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  20. package/.cache/typescript/5.6/node_modules/@types/node/console.d.ts +452 -0
  21. package/.cache/typescript/5.6/node_modules/@types/node/constants.d.ts +19 -0
  22. package/.cache/typescript/5.6/node_modules/@types/node/crypto.d.ts +4475 -0
  23. package/.cache/typescript/5.6/node_modules/@types/node/dgram.d.ts +596 -0
  24. package/.cache/typescript/5.6/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
  25. package/.cache/typescript/5.6/node_modules/@types/node/dns/promises.d.ts +476 -0
  26. package/.cache/typescript/5.6/node_modules/@types/node/dns.d.ts +865 -0
  27. package/.cache/typescript/5.6/node_modules/@types/node/dom-events.d.ts +124 -0
  28. package/.cache/typescript/5.6/node_modules/@types/node/domain.d.ts +170 -0
  29. package/.cache/typescript/5.6/node_modules/@types/node/events.d.ts +931 -0
  30. package/.cache/typescript/5.6/node_modules/@types/node/fs/promises.d.ts +1275 -0
  31. package/.cache/typescript/5.6/node_modules/@types/node/fs.d.ts +4396 -0
  32. package/.cache/typescript/5.6/node_modules/@types/node/globals.d.ts +566 -0
  33. package/.cache/typescript/5.6/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  34. package/.cache/typescript/5.6/node_modules/@types/node/http.d.ts +1958 -0
  35. package/.cache/typescript/5.6/node_modules/@types/node/http2.d.ts +2558 -0
  36. package/.cache/typescript/5.6/node_modules/@types/node/https.d.ts +543 -0
  37. package/.cache/typescript/5.6/node_modules/@types/node/index.d.ts +92 -0
  38. package/.cache/typescript/5.6/node_modules/@types/node/inspector.d.ts +3966 -0
  39. package/.cache/typescript/5.6/node_modules/@types/node/module.d.ts +402 -0
  40. package/.cache/typescript/5.6/node_modules/@types/node/net.d.ts +1001 -0
  41. package/.cache/typescript/5.6/node_modules/@types/node/os.d.ts +495 -0
  42. package/.cache/typescript/5.6/node_modules/@types/node/package.json +220 -0
  43. package/.cache/typescript/5.6/node_modules/@types/node/path.d.ts +200 -0
  44. package/.cache/typescript/5.6/node_modules/@types/node/perf_hooks.d.ts +965 -0
  45. package/.cache/typescript/5.6/node_modules/@types/node/process.d.ts +1963 -0
  46. package/.cache/typescript/5.6/node_modules/@types/node/punycode.d.ts +117 -0
  47. package/.cache/typescript/5.6/node_modules/@types/node/querystring.d.ts +153 -0
  48. package/.cache/typescript/5.6/node_modules/@types/node/readline/promises.d.ts +162 -0
  49. package/.cache/typescript/5.6/node_modules/@types/node/readline.d.ts +589 -0
  50. package/.cache/typescript/5.6/node_modules/@types/node/repl.d.ts +430 -0
  51. package/.cache/typescript/5.6/node_modules/@types/node/sea.d.ts +153 -0
  52. package/.cache/typescript/5.6/node_modules/@types/node/sqlite.d.ts +213 -0
  53. package/.cache/typescript/5.6/node_modules/@types/node/stream/consumers.d.ts +12 -0
  54. package/.cache/typescript/5.6/node_modules/@types/node/stream/promises.d.ts +90 -0
  55. package/.cache/typescript/5.6/node_modules/@types/node/stream/web.d.ts +609 -0
  56. package/.cache/typescript/5.6/node_modules/@types/node/stream.d.ts +1726 -0
  57. package/.cache/typescript/5.6/node_modules/@types/node/string_decoder.d.ts +67 -0
  58. package/.cache/typescript/5.6/node_modules/@types/node/test.d.ts +2248 -0
  59. package/.cache/typescript/5.6/node_modules/@types/node/timers/promises.d.ts +97 -0
  60. package/.cache/typescript/5.6/node_modules/@types/node/timers.d.ts +240 -0
  61. package/.cache/typescript/5.6/node_modules/@types/node/tls.d.ts +1226 -0
  62. package/.cache/typescript/5.6/node_modules/@types/node/trace_events.d.ts +197 -0
  63. package/.cache/typescript/5.6/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +385 -0
  64. package/.cache/typescript/5.6/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  65. package/.cache/typescript/5.6/node_modules/@types/node/ts5.6/index.d.ts +92 -0
  66. package/.cache/typescript/5.6/node_modules/@types/node/tty.d.ts +208 -0
  67. package/.cache/typescript/5.6/node_modules/@types/node/url.d.ts +972 -0
  68. package/.cache/typescript/5.6/node_modules/@types/node/util.d.ts +2371 -0
  69. package/.cache/typescript/5.6/node_modules/@types/node/v8.d.ts +808 -0
  70. package/.cache/typescript/5.6/node_modules/@types/node/vm.d.ts +976 -0
  71. package/.cache/typescript/5.6/node_modules/@types/node/wasi.d.ts +181 -0
  72. package/.cache/typescript/5.6/node_modules/@types/node/worker_threads.d.ts +745 -0
  73. package/.cache/typescript/5.6/node_modules/@types/node/zlib.d.ts +539 -0
  74. package/.cache/typescript/5.6/node_modules/@types/npmlog/LICENSE +21 -0
  75. package/.cache/typescript/5.6/node_modules/@types/npmlog/README.md +15 -0
  76. package/.cache/typescript/5.6/node_modules/@types/npmlog/index.d.ts +84 -0
  77. package/.cache/typescript/5.6/node_modules/@types/npmlog/package.json +32 -0
  78. package/.cache/typescript/5.6/node_modules/types-registry/README.md +2 -0
  79. package/.cache/typescript/5.6/node_modules/types-registry/index.json +1 -0
  80. package/.cache/typescript/5.6/node_modules/types-registry/package.json +20 -0
  81. package/.cache/typescript/5.6/node_modules/undici-types/LICENSE +21 -0
  82. package/.cache/typescript/5.6/node_modules/undici-types/README.md +6 -0
  83. package/.cache/typescript/5.6/node_modules/undici-types/agent.d.ts +31 -0
  84. package/.cache/typescript/5.6/node_modules/undici-types/api.d.ts +43 -0
  85. package/.cache/typescript/5.6/node_modules/undici-types/balanced-pool.d.ts +29 -0
  86. package/.cache/typescript/5.6/node_modules/undici-types/cache.d.ts +36 -0
  87. package/.cache/typescript/5.6/node_modules/undici-types/client.d.ts +108 -0
  88. package/.cache/typescript/5.6/node_modules/undici-types/connector.d.ts +34 -0
  89. package/.cache/typescript/5.6/node_modules/undici-types/content-type.d.ts +21 -0
  90. package/.cache/typescript/5.6/node_modules/undici-types/cookies.d.ts +28 -0
  91. package/.cache/typescript/5.6/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
  92. package/.cache/typescript/5.6/node_modules/undici-types/dispatcher.d.ts +255 -0
  93. package/.cache/typescript/5.6/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
  94. package/.cache/typescript/5.6/node_modules/undici-types/errors.d.ts +149 -0
  95. package/.cache/typescript/5.6/node_modules/undici-types/eventsource.d.ts +61 -0
  96. package/.cache/typescript/5.6/node_modules/undici-types/fetch.d.ts +209 -0
  97. package/.cache/typescript/5.6/node_modules/undici-types/file.d.ts +39 -0
  98. package/.cache/typescript/5.6/node_modules/undici-types/filereader.d.ts +54 -0
  99. package/.cache/typescript/5.6/node_modules/undici-types/formdata.d.ts +108 -0
  100. package/.cache/typescript/5.6/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  101. package/.cache/typescript/5.6/node_modules/undici-types/global-origin.d.ts +7 -0
  102. package/.cache/typescript/5.6/node_modules/undici-types/handlers.d.ts +15 -0
  103. package/.cache/typescript/5.6/node_modules/undici-types/header.d.ts +4 -0
  104. package/.cache/typescript/5.6/node_modules/undici-types/index.d.ts +71 -0
  105. package/.cache/typescript/5.6/node_modules/undici-types/interceptors.d.ts +17 -0
  106. package/.cache/typescript/5.6/node_modules/undici-types/mock-agent.d.ts +50 -0
  107. package/.cache/typescript/5.6/node_modules/undici-types/mock-client.d.ts +25 -0
  108. package/.cache/typescript/5.6/node_modules/undici-types/mock-errors.d.ts +12 -0
  109. package/.cache/typescript/5.6/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  110. package/.cache/typescript/5.6/node_modules/undici-types/mock-pool.d.ts +25 -0
  111. package/.cache/typescript/5.6/node_modules/undici-types/package.json +55 -0
  112. package/.cache/typescript/5.6/node_modules/undici-types/patch.d.ts +33 -0
  113. package/.cache/typescript/5.6/node_modules/undici-types/pool-stats.d.ts +19 -0
  114. package/.cache/typescript/5.6/node_modules/undici-types/pool.d.ts +39 -0
  115. package/.cache/typescript/5.6/node_modules/undici-types/proxy-agent.d.ts +28 -0
  116. package/.cache/typescript/5.6/node_modules/undici-types/readable.d.ts +60 -0
  117. package/.cache/typescript/5.6/node_modules/undici-types/retry-agent.d.ts +8 -0
  118. package/.cache/typescript/5.6/node_modules/undici-types/retry-handler.d.ts +116 -0
  119. package/.cache/typescript/5.6/node_modules/undici-types/util.d.ts +18 -0
  120. package/.cache/typescript/5.6/node_modules/undici-types/webidl.d.ts +222 -0
  121. package/.cache/typescript/5.6/node_modules/undici-types/websocket.d.ts +150 -0
  122. package/.cache/typescript/5.6/package-lock.json +48 -0
  123. package/.cache/typescript/5.6/package.json +1 -0
  124. package/.replit +4 -0
  125. package/.upm/store.json +1 -0
  126. package/README.md +289 -0
  127. package/index.js +460 -0
  128. package/package.json +30 -0
  129. package/src/Screenshot.js +83 -0
  130. package/src/addExternalModule.js +15 -0
  131. package/src/addUserToGroup.js +77 -0
  132. package/src/changeAdminStatus.js +47 -0
  133. package/src/changeArchivedStatus.js +41 -0
  134. package/src/changeAvt.js +85 -0
  135. package/src/changeBio.js +65 -0
  136. package/src/changeBlockedStatus.js +36 -0
  137. package/src/changeGroupImage.js +106 -0
  138. package/src/changeNickname.js +45 -0
  139. package/src/changeThreadColor.js +61 -0
  140. package/src/changeThreadEmoji.js +41 -0
  141. package/src/createNewGroup.js +70 -0
  142. package/src/createPoll.js +59 -0
  143. package/src/createPost.js +277 -0
  144. package/src/deleteMessage.js +44 -0
  145. package/src/deleteThread.js +42 -0
  146. package/src/forwardAttachment.js +47 -0
  147. package/src/getCurrentUserID.js +7 -0
  148. package/src/getEmojiUrl.js +27 -0
  149. package/src/getFriendsList.js +73 -0
  150. package/src/getThreadHistory.js +537 -0
  151. package/src/getThreadHistoryDeprecated.js +71 -0
  152. package/src/getThreadInfo.js +232 -0
  153. package/src/getThreadInfoDeprecated.js +56 -0
  154. package/src/getThreadList.js +213 -0
  155. package/src/getThreadListDeprecated.js +46 -0
  156. package/src/getThreadPictures.js +59 -0
  157. package/src/getUID.js +119 -0
  158. package/src/getUserID.js +61 -0
  159. package/src/getUserInfo.js +66 -0
  160. package/src/handleFriendRequest.js +46 -0
  161. package/src/handleMessageRequest.js +47 -0
  162. package/src/httpGet.js +49 -0
  163. package/src/httpPost.js +48 -0
  164. package/src/listenMqtt.js +827 -0
  165. package/src/listenMqtt.txt +827 -0
  166. package/src/logout.js +68 -0
  167. package/src/markAsDelivered.js +47 -0
  168. package/src/markAsRead.js +70 -0
  169. package/src/markAsReadAll.js +40 -0
  170. package/src/markAsSeen.js +48 -0
  171. package/src/muteThread.js +45 -0
  172. package/src/postFormData.txt +46 -0
  173. package/src/removeUserFromGroup.js +45 -0
  174. package/src/resolvePhotoUrl.js +36 -0
  175. package/src/searchForThread.js +42 -0
  176. package/src/sendMessage.js +329 -0
  177. package/src/sendTypingIndicator.js +70 -0
  178. package/src/setMessageReaction.js +109 -0
  179. package/src/setPostReaction.js +102 -0
  180. package/src/setTitle.js +70 -0
  181. package/src/shareContact.js +46 -0
  182. package/src/shareLink.js +62 -0
  183. package/src/threadColors.js +41 -0
  184. package/src/unfriend.js +42 -0
  185. package/src/unsendMessage.js +39 -0
@@ -0,0 +1,222 @@
1
+ // These types are not exported, and are only used internally
2
+
3
+ /**
4
+ * Take in an unknown value and return one that is of type T
5
+ */
6
+ type Converter<T> = (object: unknown) => T
7
+
8
+ type SequenceConverter<T> = (object: unknown, iterable?: IterableIterator<T>) => T[]
9
+
10
+ type RecordConverter<K extends string, V> = (object: unknown) => Record<K, V>
11
+
12
+ interface ConvertToIntOpts {
13
+ clamp?: boolean
14
+ enforceRange?: boolean
15
+ }
16
+
17
+ interface WebidlErrors {
18
+ exception (opts: { header: string, message: string }): TypeError
19
+ /**
20
+ * @description Throw an error when conversion from one type to another has failed
21
+ */
22
+ conversionFailed (opts: {
23
+ prefix: string
24
+ argument: string
25
+ types: string[]
26
+ }): TypeError
27
+ /**
28
+ * @description Throw an error when an invalid argument is provided
29
+ */
30
+ invalidArgument (opts: {
31
+ prefix: string
32
+ value: string
33
+ type: string
34
+ }): TypeError
35
+ }
36
+
37
+ interface WebidlUtil {
38
+ /**
39
+ * @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values
40
+ */
41
+ Type (object: unknown):
42
+ | 'Undefined'
43
+ | 'Boolean'
44
+ | 'String'
45
+ | 'Symbol'
46
+ | 'Number'
47
+ | 'BigInt'
48
+ | 'Null'
49
+ | 'Object'
50
+
51
+ /**
52
+ * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
53
+ */
54
+ ConvertToInt (
55
+ V: unknown,
56
+ bitLength: number,
57
+ signedness: 'signed' | 'unsigned',
58
+ opts?: ConvertToIntOpts
59
+ ): number
60
+
61
+ /**
62
+ * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
63
+ */
64
+ IntegerPart (N: number): number
65
+
66
+ /**
67
+ * Stringifies {@param V}
68
+ */
69
+ Stringify (V: any): string
70
+ }
71
+
72
+ interface WebidlConverters {
73
+ /**
74
+ * @see https://webidl.spec.whatwg.org/#es-DOMString
75
+ */
76
+ DOMString (V: unknown, prefix: string, argument: string, opts?: {
77
+ legacyNullToEmptyString: boolean
78
+ }): string
79
+
80
+ /**
81
+ * @see https://webidl.spec.whatwg.org/#es-ByteString
82
+ */
83
+ ByteString (V: unknown, prefix: string, argument: string): string
84
+
85
+ /**
86
+ * @see https://webidl.spec.whatwg.org/#es-USVString
87
+ */
88
+ USVString (V: unknown): string
89
+
90
+ /**
91
+ * @see https://webidl.spec.whatwg.org/#es-boolean
92
+ */
93
+ boolean (V: unknown): boolean
94
+
95
+ /**
96
+ * @see https://webidl.spec.whatwg.org/#es-any
97
+ */
98
+ any <Value>(V: Value): Value
99
+
100
+ /**
101
+ * @see https://webidl.spec.whatwg.org/#es-long-long
102
+ */
103
+ ['long long'] (V: unknown): number
104
+
105
+ /**
106
+ * @see https://webidl.spec.whatwg.org/#es-unsigned-long-long
107
+ */
108
+ ['unsigned long long'] (V: unknown): number
109
+
110
+ /**
111
+ * @see https://webidl.spec.whatwg.org/#es-unsigned-long
112
+ */
113
+ ['unsigned long'] (V: unknown): number
114
+
115
+ /**
116
+ * @see https://webidl.spec.whatwg.org/#es-unsigned-short
117
+ */
118
+ ['unsigned short'] (V: unknown, opts?: ConvertToIntOpts): number
119
+
120
+ /**
121
+ * @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer
122
+ */
123
+ ArrayBuffer (V: unknown): ArrayBufferLike
124
+ ArrayBuffer (V: unknown, opts: { allowShared: false }): ArrayBuffer
125
+
126
+ /**
127
+ * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
128
+ */
129
+ TypedArray (
130
+ V: unknown,
131
+ TypedArray: NodeJS.TypedArray | ArrayBufferLike
132
+ ): NodeJS.TypedArray | ArrayBufferLike
133
+ TypedArray (
134
+ V: unknown,
135
+ TypedArray: NodeJS.TypedArray | ArrayBufferLike,
136
+ opts?: { allowShared: false }
137
+ ): NodeJS.TypedArray | ArrayBuffer
138
+
139
+ /**
140
+ * @see https://webidl.spec.whatwg.org/#es-buffer-source-types
141
+ */
142
+ DataView (V: unknown, opts?: { allowShared: boolean }): DataView
143
+
144
+ /**
145
+ * @see https://webidl.spec.whatwg.org/#BufferSource
146
+ */
147
+ BufferSource (
148
+ V: unknown,
149
+ opts?: { allowShared: boolean }
150
+ ): NodeJS.TypedArray | ArrayBufferLike | DataView
151
+
152
+ ['sequence<ByteString>']: SequenceConverter<string>
153
+
154
+ ['sequence<sequence<ByteString>>']: SequenceConverter<string[]>
155
+
156
+ ['record<ByteString, ByteString>']: RecordConverter<string, string>
157
+
158
+ [Key: string]: (...args: any[]) => unknown
159
+ }
160
+
161
+ export interface Webidl {
162
+ errors: WebidlErrors
163
+ util: WebidlUtil
164
+ converters: WebidlConverters
165
+
166
+ /**
167
+ * @description Performs a brand-check on {@param V} to ensure it is a
168
+ * {@param cls} object.
169
+ */
170
+ brandCheck <Interface>(V: unknown, cls: Interface, opts?: { strict?: boolean }): asserts V is Interface
171
+
172
+ /**
173
+ * @see https://webidl.spec.whatwg.org/#es-sequence
174
+ * @description Convert a value, V, to a WebIDL sequence type.
175
+ */
176
+ sequenceConverter <Type>(C: Converter<Type>): SequenceConverter<Type>
177
+
178
+ illegalConstructor (): never
179
+
180
+ /**
181
+ * @see https://webidl.spec.whatwg.org/#es-to-record
182
+ * @description Convert a value, V, to a WebIDL record type.
183
+ */
184
+ recordConverter <K extends string, V>(
185
+ keyConverter: Converter<K>,
186
+ valueConverter: Converter<V>
187
+ ): RecordConverter<K, V>
188
+
189
+ /**
190
+ * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party
191
+ * interfaces are allowed.
192
+ */
193
+ interfaceConverter <Interface>(cls: Interface): (
194
+ V: unknown,
195
+ opts?: { strict: boolean }
196
+ ) => asserts V is typeof cls
197
+
198
+ // TODO(@KhafraDev): a type could likely be implemented that can infer the return type
199
+ // from the converters given?
200
+ /**
201
+ * Converts a value, V, to a WebIDL dictionary types. Allows limiting which keys are
202
+ * allowed, values allowed, optional and required keys. Auto converts the value to
203
+ * a type given a converter.
204
+ */
205
+ dictionaryConverter (converters: {
206
+ key: string,
207
+ defaultValue?: () => unknown,
208
+ required?: boolean,
209
+ converter: (...args: unknown[]) => unknown,
210
+ allowedValues?: unknown[]
211
+ }[]): (V: unknown) => Record<string, unknown>
212
+
213
+ /**
214
+ * @see https://webidl.spec.whatwg.org/#idl-nullable-type
215
+ * @description allows a type, V, to be null
216
+ */
217
+ nullableConverter <T>(
218
+ converter: Converter<T>
219
+ ): (V: unknown) => ReturnType<typeof converter> | null
220
+
221
+ argumentLengthCheck (args: { length: number }, min: number, context: string): void
222
+ }
@@ -0,0 +1,150 @@
1
+ /// <reference types="node" />
2
+
3
+ import type { Blob } from 'buffer'
4
+ import type { MessagePort } from 'worker_threads'
5
+ import {
6
+ EventInit,
7
+ EventListenerOptions,
8
+ AddEventListenerOptions,
9
+ EventListenerOrEventListenerObject
10
+ } from './patch'
11
+ import Dispatcher from './dispatcher'
12
+ import { HeadersInit } from './fetch'
13
+
14
+ export type BinaryType = 'blob' | 'arraybuffer'
15
+
16
+ interface WebSocketEventMap {
17
+ close: CloseEvent
18
+ error: ErrorEvent
19
+ message: MessageEvent
20
+ open: Event
21
+ }
22
+
23
+ interface WebSocket extends EventTarget {
24
+ binaryType: BinaryType
25
+
26
+ readonly bufferedAmount: number
27
+ readonly extensions: string
28
+
29
+ onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null
30
+ onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null
31
+ onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null
32
+ onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null
33
+
34
+ readonly protocol: string
35
+ readonly readyState: number
36
+ readonly url: string
37
+
38
+ close(code?: number, reason?: string): void
39
+ send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void
40
+
41
+ readonly CLOSED: number
42
+ readonly CLOSING: number
43
+ readonly CONNECTING: number
44
+ readonly OPEN: number
45
+
46
+ addEventListener<K extends keyof WebSocketEventMap>(
47
+ type: K,
48
+ listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any,
49
+ options?: boolean | AddEventListenerOptions
50
+ ): void
51
+ addEventListener(
52
+ type: string,
53
+ listener: EventListenerOrEventListenerObject,
54
+ options?: boolean | AddEventListenerOptions
55
+ ): void
56
+ removeEventListener<K extends keyof WebSocketEventMap>(
57
+ type: K,
58
+ listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any,
59
+ options?: boolean | EventListenerOptions
60
+ ): void
61
+ removeEventListener(
62
+ type: string,
63
+ listener: EventListenerOrEventListenerObject,
64
+ options?: boolean | EventListenerOptions
65
+ ): void
66
+ }
67
+
68
+ export declare const WebSocket: {
69
+ prototype: WebSocket
70
+ new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket
71
+ readonly CLOSED: number
72
+ readonly CLOSING: number
73
+ readonly CONNECTING: number
74
+ readonly OPEN: number
75
+ }
76
+
77
+ interface CloseEventInit extends EventInit {
78
+ code?: number
79
+ reason?: string
80
+ wasClean?: boolean
81
+ }
82
+
83
+ interface CloseEvent extends Event {
84
+ readonly code: number
85
+ readonly reason: string
86
+ readonly wasClean: boolean
87
+ }
88
+
89
+ export declare const CloseEvent: {
90
+ prototype: CloseEvent
91
+ new (type: string, eventInitDict?: CloseEventInit): CloseEvent
92
+ }
93
+
94
+ interface MessageEventInit<T = any> extends EventInit {
95
+ data?: T
96
+ lastEventId?: string
97
+ origin?: string
98
+ ports?: (typeof MessagePort)[]
99
+ source?: typeof MessagePort | null
100
+ }
101
+
102
+ interface MessageEvent<T = any> extends Event {
103
+ readonly data: T
104
+ readonly lastEventId: string
105
+ readonly origin: string
106
+ readonly ports: ReadonlyArray<typeof MessagePort>
107
+ readonly source: typeof MessagePort | null
108
+ initMessageEvent(
109
+ type: string,
110
+ bubbles?: boolean,
111
+ cancelable?: boolean,
112
+ data?: any,
113
+ origin?: string,
114
+ lastEventId?: string,
115
+ source?: typeof MessagePort | null,
116
+ ports?: (typeof MessagePort)[]
117
+ ): void;
118
+ }
119
+
120
+ export declare const MessageEvent: {
121
+ prototype: MessageEvent
122
+ new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>
123
+ }
124
+
125
+ interface ErrorEventInit extends EventInit {
126
+ message?: string
127
+ filename?: string
128
+ lineno?: number
129
+ colno?: number
130
+ error?: any
131
+ }
132
+
133
+ interface ErrorEvent extends Event {
134
+ readonly message: string
135
+ readonly filename: string
136
+ readonly lineno: number
137
+ readonly colno: number
138
+ readonly error: any
139
+ }
140
+
141
+ export declare const ErrorEvent: {
142
+ prototype: ErrorEvent
143
+ new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent
144
+ }
145
+
146
+ interface WebSocketInit {
147
+ protocols?: string | string[],
148
+ dispatcher?: Dispatcher,
149
+ headers?: HeadersInit
150
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "5.6",
3
+ "lockfileVersion": 3,
4
+ "requires": true,
5
+ "packages": {
6
+ "": {
7
+ "dependencies": {
8
+ "types-registry": "^0.1.701"
9
+ },
10
+ "devDependencies": {
11
+ "@types/npmlog": "^7.0.0"
12
+ }
13
+ },
14
+ "node_modules/@types/node": {
15
+ "version": "22.10.3",
16
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.3.tgz",
17
+ "integrity": "sha512-DifAyw4BkrufCILvD3ucnuN8eydUfc/C1GlyrnI+LK6543w5/L3VeVgf05o3B4fqSXP1dKYLOZsKfutpxPzZrw==",
18
+ "dev": true,
19
+ "license": "MIT",
20
+ "dependencies": {
21
+ "undici-types": "~6.20.0"
22
+ }
23
+ },
24
+ "node_modules/@types/npmlog": {
25
+ "version": "7.0.0",
26
+ "resolved": "https://registry.npmjs.org/@types/npmlog/-/npmlog-7.0.0.tgz",
27
+ "integrity": "sha512-hJWbrKFvxKyWwSUXjZMYTINsSOY6IclhvGOZ97M8ac2tmR9hMwmTnYaMdpGhvju9ctWLTPhCS+eLfQNluiEjQQ==",
28
+ "dev": true,
29
+ "license": "MIT",
30
+ "dependencies": {
31
+ "@types/node": "*"
32
+ }
33
+ },
34
+ "node_modules/types-registry": {
35
+ "version": "0.1.701",
36
+ "resolved": "https://registry.npmjs.org/types-registry/-/types-registry-0.1.701.tgz",
37
+ "integrity": "sha512-risiPg6ANtMZvHX6Idly8H2EM72d8tsQSVtgjRis6GY2RTHivZuMXzet0ML+I7gm5TTu/Tz45N1VG2gBnoxDgw==",
38
+ "license": "MIT"
39
+ },
40
+ "node_modules/undici-types": {
41
+ "version": "6.20.0",
42
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
43
+ "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
44
+ "dev": true,
45
+ "license": "MIT"
46
+ }
47
+ }
48
+ }
@@ -0,0 +1 @@
1
+ {"private":true,"dependencies":{"types-registry":"^0.1.701"},"devDependencies":{"@types/npmlog":"^7.0.0"}}
package/.replit ADDED
@@ -0,0 +1,4 @@
1
+ modules = ["nodejs-20"]
2
+
3
+ [nix]
4
+ channel = "stable-24_05"
@@ -0,0 +1 @@
1
+ {"version":2,"languages":{"nodejs-npm":{"specfileHash":"11981d5dac09b9c54e6ecda0a9e73858","lockfileHash":"5cc7887a3a9318c976689efe5b330b6b"}}}