@jsonjoy.com/json-pack 1.20.0 → 17.59.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 (344) hide show
  1. package/lib/JsonPackExtension.d.ts +8 -0
  2. package/lib/JsonPackExtension.js +8 -0
  3. package/lib/JsonPackExtension.js.map +1 -1
  4. package/lib/JsonPackMpint.d.ts +25 -0
  5. package/lib/JsonPackMpint.js +31 -1
  6. package/lib/JsonPackMpint.js.map +1 -1
  7. package/lib/JsonPackValue.d.ts +10 -0
  8. package/lib/JsonPackValue.js +10 -0
  9. package/lib/JsonPackValue.js.map +1 -1
  10. package/lib/avro/AvroDecoder.d.ts +67 -0
  11. package/lib/avro/AvroDecoder.js +77 -5
  12. package/lib/avro/AvroDecoder.js.map +1 -1
  13. package/lib/avro/AvroEncoder.d.ts +71 -0
  14. package/lib/avro/AvroEncoder.js +90 -12
  15. package/lib/avro/AvroEncoder.js.map +1 -1
  16. package/lib/avro/AvroSchemaDecoder.d.ts +53 -0
  17. package/lib/avro/AvroSchemaDecoder.js +60 -3
  18. package/lib/avro/AvroSchemaDecoder.js.map +1 -1
  19. package/lib/avro/AvroSchemaEncoder.d.ts +65 -0
  20. package/lib/avro/AvroSchemaEncoder.js +84 -5
  21. package/lib/avro/AvroSchemaEncoder.js.map +1 -1
  22. package/lib/avro/AvroSchemaValidator.d.ts +10 -0
  23. package/lib/avro/AvroSchemaValidator.js +18 -1
  24. package/lib/avro/AvroSchemaValidator.js.map +1 -1
  25. package/lib/avro/types.d.ts +31 -0
  26. package/lib/avro/types.js +4 -0
  27. package/lib/avro/types.js.map +1 -1
  28. package/lib/bencode/BencodeDecoder.js +9 -9
  29. package/lib/bencode/BencodeDecoder.js.map +1 -1
  30. package/lib/bencode/BencodeEncoder.d.ts +5 -0
  31. package/lib/bencode/BencodeEncoder.js +25 -20
  32. package/lib/bencode/BencodeEncoder.js.map +1 -1
  33. package/lib/bson/BsonDecoder.js +48 -33
  34. package/lib/bson/BsonDecoder.js.map +1 -1
  35. package/lib/bson/BsonEncoder.js +11 -3
  36. package/lib/bson/BsonEncoder.js.map +1 -1
  37. package/lib/cbor/CborDecoder.d.ts +24 -0
  38. package/lib/cbor/CborDecoder.js +94 -56
  39. package/lib/cbor/CborDecoder.js.map +1 -1
  40. package/lib/cbor/CborDecoderBase.d.ts +1 -0
  41. package/lib/cbor/CborDecoderBase.js +63 -53
  42. package/lib/cbor/CborDecoderBase.js.map +1 -1
  43. package/lib/cbor/CborEncoder.d.ts +5 -0
  44. package/lib/cbor/CborEncoder.js +9 -3
  45. package/lib/cbor/CborEncoder.js.map +1 -1
  46. package/lib/cbor/CborEncoderFast.d.ts +7 -0
  47. package/lib/cbor/CborEncoderFast.js +22 -14
  48. package/lib/cbor/CborEncoderFast.js.map +1 -1
  49. package/lib/cbor/CborEncoderStable.d.ts +1 -0
  50. package/lib/cbor/CborEncoderStable.js +2 -1
  51. package/lib/cbor/CborEncoderStable.js.map +1 -1
  52. package/lib/cbor/shared.d.ts +1 -1
  53. package/lib/codecs/Codecs.d.ts +1 -1
  54. package/lib/codecs/cbor.js +1 -1
  55. package/lib/codecs/cbor.js.map +1 -1
  56. package/lib/codecs/json.js +1 -1
  57. package/lib/codecs/json.js.map +1 -1
  58. package/lib/codecs/msgpack.js +1 -1
  59. package/lib/codecs/msgpack.js.map +1 -1
  60. package/lib/ejson/EjsonDecoder.d.ts +5 -0
  61. package/lib/ejson/EjsonDecoder.js +72 -37
  62. package/lib/ejson/EjsonDecoder.js.map +1 -1
  63. package/lib/ejson/EjsonEncoder.d.ts +5 -0
  64. package/lib/ejson/EjsonEncoder.js +149 -114
  65. package/lib/ejson/EjsonEncoder.js.map +1 -1
  66. package/lib/ejson/index.js +1 -0
  67. package/lib/ejson/index.js.map +1 -1
  68. package/lib/ion/Import.d.ts +1 -1
  69. package/lib/ion/Import.js.map +1 -1
  70. package/lib/ion/IonDecoder.d.ts +0 -1
  71. package/lib/ion/IonDecoder.js +4 -3
  72. package/lib/ion/IonDecoder.js.map +1 -1
  73. package/lib/ion/IonDecoderBase.js +29 -18
  74. package/lib/ion/IonDecoderBase.js.map +1 -1
  75. package/lib/ion/IonEncoderFast.d.ts +1 -1
  76. package/lib/ion/IonEncoderFast.js +30 -30
  77. package/lib/ion/IonEncoderFast.js.map +1 -1
  78. package/lib/ion/ast.d.ts +4 -1
  79. package/lib/ion/symbols.d.ts +1 -1
  80. package/lib/json/JsonDecoder.js +72 -66
  81. package/lib/json/JsonDecoder.js.map +1 -1
  82. package/lib/json/JsonDecoderDag.js +14 -0
  83. package/lib/json/JsonDecoderDag.js.map +1 -1
  84. package/lib/json/JsonDecoderPartial.d.ts +22 -0
  85. package/lib/json/JsonDecoderPartial.js +30 -8
  86. package/lib/json/JsonDecoderPartial.js.map +1 -1
  87. package/lib/json/JsonEncoder.d.ts +5 -0
  88. package/lib/json/JsonEncoder.js +68 -54
  89. package/lib/json/JsonEncoder.js.map +1 -1
  90. package/lib/json/JsonEncoderDag.d.ts +17 -0
  91. package/lib/json/JsonEncoderDag.js +27 -10
  92. package/lib/json/JsonEncoderDag.js.map +1 -1
  93. package/lib/json/JsonEncoderStable.js +5 -5
  94. package/lib/json/JsonEncoderStable.js.map +1 -1
  95. package/lib/json-binary/codec.d.ts +8 -1
  96. package/lib/json-binary/codec.js +7 -0
  97. package/lib/json-binary/codec.js.map +1 -1
  98. package/lib/msgpack/MsgPackDecoder.d.ts +27 -0
  99. package/lib/msgpack/MsgPackDecoder.js +55 -23
  100. package/lib/msgpack/MsgPackDecoder.js.map +1 -1
  101. package/lib/msgpack/MsgPackDecoderFast.d.ts +8 -0
  102. package/lib/msgpack/MsgPackDecoderFast.js +14 -5
  103. package/lib/msgpack/MsgPackDecoderFast.js.map +1 -1
  104. package/lib/msgpack/MsgPackEncoder.d.ts +3 -0
  105. package/lib/msgpack/MsgPackEncoder.js +7 -4
  106. package/lib/msgpack/MsgPackEncoder.js.map +1 -1
  107. package/lib/msgpack/MsgPackEncoderFast.d.ts +26 -4
  108. package/lib/msgpack/MsgPackEncoderFast.js +31 -0
  109. package/lib/msgpack/MsgPackEncoderFast.js.map +1 -1
  110. package/lib/msgpack/MsgPackEncoderStable.d.ts +3 -0
  111. package/lib/msgpack/MsgPackEncoderStable.js +3 -0
  112. package/lib/msgpack/MsgPackEncoderStable.js.map +1 -1
  113. package/lib/msgpack/MsgPackToJsonConverter.d.ts +30 -4
  114. package/lib/msgpack/MsgPackToJsonConverter.js +32 -5
  115. package/lib/msgpack/MsgPackToJsonConverter.js.map +1 -1
  116. package/lib/msgpack/index.d.ts +29 -0
  117. package/lib/msgpack/index.js +30 -0
  118. package/lib/msgpack/index.js.map +1 -1
  119. package/lib/msgpack/shallow-read.js +7 -7
  120. package/lib/msgpack/shallow-read.js.map +1 -1
  121. package/lib/msgpack/types.d.ts +1 -0
  122. package/lib/msgpack/util.d.ts +1 -1
  123. package/lib/nfs/v3/FullNfsv3Encoder.d.ts +3 -3
  124. package/lib/nfs/v3/FullNfsv3Encoder.js +3 -3
  125. package/lib/nfs/v3/FullNfsv3Encoder.js.map +1 -1
  126. package/lib/nfs/v3/Nfsv3Decoder.js +51 -50
  127. package/lib/nfs/v3/Nfsv3Decoder.js.map +1 -1
  128. package/lib/nfs/v3/Nfsv3Encoder.d.ts +2 -2
  129. package/lib/nfs/v3/Nfsv3Encoder.js +52 -52
  130. package/lib/nfs/v3/Nfsv3Encoder.js.map +1 -1
  131. package/lib/nfs/v3/constants.d.ts +34 -0
  132. package/lib/nfs/v3/constants.js +4 -0
  133. package/lib/nfs/v3/constants.js.map +1 -1
  134. package/lib/nfs/v3/locks/NlmDecoder.js +20 -20
  135. package/lib/nfs/v3/locks/NlmDecoder.js.map +1 -1
  136. package/lib/nfs/v3/locks/NlmEncoder.d.ts +2 -2
  137. package/lib/nfs/v3/locks/NlmEncoder.js +20 -20
  138. package/lib/nfs/v3/locks/NlmEncoder.js.map +1 -1
  139. package/lib/nfs/v3/locks/constants.d.ts +9 -0
  140. package/lib/nfs/v3/locks/messages.d.ts +58 -1
  141. package/lib/nfs/v3/locks/messages.js +54 -0
  142. package/lib/nfs/v3/locks/messages.js.map +1 -1
  143. package/lib/nfs/v3/locks/structs.d.ts +15 -0
  144. package/lib/nfs/v3/locks/structs.js +15 -0
  145. package/lib/nfs/v3/locks/structs.js.map +1 -1
  146. package/lib/nfs/v3/messages.d.ts +249 -0
  147. package/lib/nfs/v3/messages.js +249 -0
  148. package/lib/nfs/v3/messages.js.map +1 -1
  149. package/lib/nfs/v3/mount/MountDecoder.js +12 -12
  150. package/lib/nfs/v3/mount/MountEncoder.d.ts +2 -2
  151. package/lib/nfs/v3/mount/MountEncoder.js +13 -13
  152. package/lib/nfs/v3/mount/MountEncoder.js.map +1 -1
  153. package/lib/nfs/v3/mount/constants.d.ts +9 -0
  154. package/lib/nfs/v3/mount/messages.d.ts +31 -1
  155. package/lib/nfs/v3/mount/messages.js +27 -0
  156. package/lib/nfs/v3/mount/messages.js.map +1 -1
  157. package/lib/nfs/v3/mount/structs.d.ts +15 -0
  158. package/lib/nfs/v3/mount/structs.js +15 -0
  159. package/lib/nfs/v3/mount/structs.js.map +1 -1
  160. package/lib/nfs/v3/structs.d.ts +78 -0
  161. package/lib/nfs/v3/structs.js +78 -0
  162. package/lib/nfs/v3/structs.js.map +1 -1
  163. package/lib/nfs/v4/Nfsv4Decoder.d.ts +14 -12
  164. package/lib/nfs/v4/Nfsv4Decoder.js +241 -165
  165. package/lib/nfs/v4/Nfsv4Decoder.js.map +1 -1
  166. package/lib/nfs/v4/Nfsv4Encoder.d.ts +6 -93
  167. package/lib/nfs/v4/Nfsv4Encoder.js +8 -824
  168. package/lib/nfs/v4/Nfsv4Encoder.js.map +1 -1
  169. package/lib/nfs/v4/Nfsv4FullEncoder.d.ts +32 -0
  170. package/lib/nfs/v4/Nfsv4FullEncoder.js +72 -0
  171. package/lib/nfs/v4/Nfsv4FullEncoder.js.map +1 -0
  172. package/lib/nfs/v4/attributes.d.ts +79 -0
  173. package/lib/nfs/v4/attributes.js +265 -0
  174. package/lib/nfs/v4/attributes.js.map +1 -0
  175. package/lib/nfs/v4/builder.d.ts +333 -0
  176. package/lib/nfs/v4/builder.js +460 -0
  177. package/lib/nfs/v4/builder.js.map +1 -0
  178. package/lib/nfs/v4/client/NfsFsDir.d.ts +23 -0
  179. package/lib/nfs/v4/client/NfsFsDir.js +132 -0
  180. package/lib/nfs/v4/client/NfsFsDir.js.map +1 -0
  181. package/lib/nfs/v4/client/NfsFsDirent.d.ts +17 -0
  182. package/lib/nfs/v4/client/NfsFsDirent.js +35 -0
  183. package/lib/nfs/v4/client/NfsFsDirent.js.map +1 -0
  184. package/lib/nfs/v4/client/NfsFsFileHandle.d.ts +35 -0
  185. package/lib/nfs/v4/client/NfsFsFileHandle.js +271 -0
  186. package/lib/nfs/v4/client/NfsFsFileHandle.js.map +1 -0
  187. package/lib/nfs/v4/client/NfsFsStats.d.ts +34 -0
  188. package/lib/nfs/v4/client/NfsFsStats.js +52 -0
  189. package/lib/nfs/v4/client/NfsFsStats.js.map +1 -0
  190. package/lib/nfs/v4/client/Nfsv4FsClient.d.ts +53 -0
  191. package/lib/nfs/v4/client/Nfsv4FsClient.js +812 -0
  192. package/lib/nfs/v4/client/Nfsv4FsClient.js.map +1 -0
  193. package/lib/nfs/v4/client/Nfsv4TcpClient.d.ts +41 -0
  194. package/lib/nfs/v4/client/Nfsv4TcpClient.js +216 -0
  195. package/lib/nfs/v4/client/Nfsv4TcpClient.js.map +1 -0
  196. package/lib/nfs/v4/client/types.d.ts +9 -0
  197. package/lib/nfs/v4/client/types.js +3 -0
  198. package/lib/nfs/v4/client/types.js.map +1 -0
  199. package/lib/nfs/v4/constants.d.ts +80 -0
  200. package/lib/nfs/v4/constants.js +4 -0
  201. package/lib/nfs/v4/constants.js.map +1 -1
  202. package/lib/nfs/v4/format.d.ts +23 -0
  203. package/lib/nfs/v4/format.js +870 -0
  204. package/lib/nfs/v4/format.js.map +1 -0
  205. package/lib/nfs/v4/index.d.ts +3 -1
  206. package/lib/nfs/v4/index.js +3 -1
  207. package/lib/nfs/v4/index.js.map +1 -1
  208. package/lib/nfs/v4/messages.d.ts +208 -90
  209. package/lib/nfs/v4/messages.js +585 -1
  210. package/lib/nfs/v4/messages.js.map +1 -1
  211. package/lib/nfs/v4/server/Nfsv4CompoundProcCtx.d.ts +30 -0
  212. package/lib/nfs/v4/server/Nfsv4CompoundProcCtx.js +176 -0
  213. package/lib/nfs/v4/server/Nfsv4CompoundProcCtx.js.map +1 -0
  214. package/lib/nfs/v4/server/Nfsv4Connection.d.ts +45 -0
  215. package/lib/nfs/v4/server/Nfsv4Connection.js +163 -0
  216. package/lib/nfs/v4/server/Nfsv4Connection.js.map +1 -0
  217. package/lib/nfs/v4/server/Nfsv4TcpServer.d.ts +25 -0
  218. package/lib/nfs/v4/server/Nfsv4TcpServer.js +92 -0
  219. package/lib/nfs/v4/server/Nfsv4TcpServer.js.map +1 -0
  220. package/lib/nfs/v4/server/operations/ByteRangeLock.d.ts +79 -0
  221. package/lib/nfs/v4/server/operations/ByteRangeLock.js +63 -0
  222. package/lib/nfs/v4/server/operations/ByteRangeLock.js.map +1 -0
  223. package/lib/nfs/v4/server/operations/ClientRecord.d.ts +110 -0
  224. package/lib/nfs/v4/server/operations/ClientRecord.js +70 -0
  225. package/lib/nfs/v4/server/operations/ClientRecord.js.map +1 -0
  226. package/lib/nfs/v4/server/operations/FilesystemStats.d.ts +30 -0
  227. package/lib/nfs/v4/server/operations/FilesystemStats.js +30 -0
  228. package/lib/nfs/v4/server/operations/FilesystemStats.js.map +1 -0
  229. package/lib/nfs/v4/server/operations/LockOwnerState.d.ts +82 -0
  230. package/lib/nfs/v4/server/operations/LockOwnerState.js +57 -0
  231. package/lib/nfs/v4/server/operations/LockOwnerState.js.map +1 -0
  232. package/lib/nfs/v4/server/operations/LockStateid.d.ts +64 -0
  233. package/lib/nfs/v4/server/operations/LockStateid.js +58 -0
  234. package/lib/nfs/v4/server/operations/LockStateid.js.map +1 -0
  235. package/lib/nfs/v4/server/operations/Nfsv4Operations.d.ts +45 -0
  236. package/lib/nfs/v4/server/operations/Nfsv4Operations.js +3 -0
  237. package/lib/nfs/v4/server/operations/Nfsv4Operations.js.map +1 -0
  238. package/lib/nfs/v4/server/operations/Nfsv4OperationsNotImpl.d.ts +42 -0
  239. package/lib/nfs/v4/server/operations/Nfsv4OperationsNotImpl.js +159 -0
  240. package/lib/nfs/v4/server/operations/Nfsv4OperationsNotImpl.js.map +1 -0
  241. package/lib/nfs/v4/server/operations/OpenFileState.d.ts +102 -0
  242. package/lib/nfs/v4/server/operations/OpenFileState.js +68 -0
  243. package/lib/nfs/v4/server/operations/OpenFileState.js.map +1 -0
  244. package/lib/nfs/v4/server/operations/OpenOwnerState.d.ts +83 -0
  245. package/lib/nfs/v4/server/operations/OpenOwnerState.js +58 -0
  246. package/lib/nfs/v4/server/operations/OpenOwnerState.js.map +1 -0
  247. package/lib/nfs/v4/server/operations/node/Nfsv4OperationsNode.d.ts +169 -0
  248. package/lib/nfs/v4/server/operations/node/Nfsv4OperationsNode.js +1474 -0
  249. package/lib/nfs/v4/server/operations/node/Nfsv4OperationsNode.js.map +1 -0
  250. package/lib/nfs/v4/server/operations/node/attrs.d.ts +17 -0
  251. package/lib/nfs/v4/server/operations/node/attrs.js +275 -0
  252. package/lib/nfs/v4/server/operations/node/attrs.js.map +1 -0
  253. package/lib/nfs/v4/server/operations/node/fh.d.ts +93 -0
  254. package/lib/nfs/v4/server/operations/node/fh.js +209 -0
  255. package/lib/nfs/v4/server/operations/node/fh.js.map +1 -0
  256. package/lib/nfs/v4/server/operations/node/util.d.ts +4 -0
  257. package/lib/nfs/v4/server/operations/node/util.js +17 -0
  258. package/lib/nfs/v4/server/operations/node/util.js.map +1 -0
  259. package/lib/nfs/v4/server/types.d.ts +4 -0
  260. package/lib/nfs/v4/server/types.js +3 -0
  261. package/lib/nfs/v4/server/types.js.map +1 -0
  262. package/lib/nfs/v4/server/util.d.ts +5 -0
  263. package/lib/nfs/v4/server/util.js +184 -0
  264. package/lib/nfs/v4/server/util.js.map +1 -0
  265. package/lib/nfs/v4/structs.d.ts +243 -56
  266. package/lib/nfs/v4/structs.js +367 -17
  267. package/lib/nfs/v4/structs.js.map +1 -1
  268. package/lib/resp/RespDecoder.d.ts +9 -0
  269. package/lib/resp/RespDecoder.js +93 -76
  270. package/lib/resp/RespDecoder.js.map +1 -1
  271. package/lib/resp/RespEncoder.d.ts +8 -0
  272. package/lib/resp/RespEncoder.js +107 -89
  273. package/lib/resp/RespEncoder.js.map +1 -1
  274. package/lib/resp/RespEncoderLegacy.d.ts +3 -0
  275. package/lib/resp/RespEncoderLegacy.js +7 -4
  276. package/lib/resp/RespEncoderLegacy.js.map +1 -1
  277. package/lib/resp/RespStreamingDecoder.d.ts +48 -0
  278. package/lib/resp/RespStreamingDecoder.js +48 -0
  279. package/lib/resp/RespStreamingDecoder.js.map +1 -1
  280. package/lib/resp/constants.d.ts +19 -19
  281. package/lib/rm/RmRecordDecoder.js.map +1 -1
  282. package/lib/rm/RmRecordEncoder.d.ts +17 -1
  283. package/lib/rm/RmRecordEncoder.js +40 -1
  284. package/lib/rm/RmRecordEncoder.js.map +1 -1
  285. package/lib/rpc/RpcMessageDecoder.d.ts +1 -1
  286. package/lib/rpc/RpcMessageDecoder.js +11 -8
  287. package/lib/rpc/RpcMessageDecoder.js.map +1 -1
  288. package/lib/rpc/RpcMessageEncoder.d.ts +2 -2
  289. package/lib/rpc/RpcMessageEncoder.js +6 -6
  290. package/lib/rpc/RpcMessageEncoder.js.map +1 -1
  291. package/lib/rpc/constants.d.ts +76 -28
  292. package/lib/rpc/constants.js +10 -0
  293. package/lib/rpc/constants.js.map +1 -1
  294. package/lib/ssh/SshDecoder.d.ts +47 -1
  295. package/lib/ssh/SshDecoder.js +52 -2
  296. package/lib/ssh/SshDecoder.js.map +1 -1
  297. package/lib/ssh/SshEncoder.d.ts +70 -1
  298. package/lib/ssh/SshEncoder.js +81 -8
  299. package/lib/ssh/SshEncoder.js.map +1 -1
  300. package/lib/ssh/index.d.ts +6 -0
  301. package/lib/ssh/index.js +6 -0
  302. package/lib/ssh/index.js.map +1 -1
  303. package/lib/ubjson/UbjsonDecoder.js +1 -1
  304. package/lib/ubjson/UbjsonDecoder.js.map +1 -1
  305. package/lib/ubjson/UbjsonEncoder.js +6 -5
  306. package/lib/ubjson/UbjsonEncoder.js.map +1 -1
  307. package/lib/util/CompressionTable.js +4 -4
  308. package/lib/util/CompressionTable.js.map +1 -1
  309. package/lib/util/DecompressionTable.js +3 -2
  310. package/lib/util/DecompressionTable.js.map +1 -1
  311. package/lib/ws/WsFrameDecoder.d.ts +18 -0
  312. package/lib/ws/WsFrameDecoder.js +18 -0
  313. package/lib/ws/WsFrameDecoder.js.map +1 -1
  314. package/lib/ws/WsFrameEncoder.d.ts +1 -1
  315. package/lib/ws/WsFrameEncoder.js +3 -3
  316. package/lib/ws/WsFrameEncoder.js.map +1 -1
  317. package/lib/ws/constants.js +5 -0
  318. package/lib/ws/constants.js.map +1 -1
  319. package/lib/xdr/XdrDecoder.d.ts +62 -0
  320. package/lib/xdr/XdrDecoder.js +73 -6
  321. package/lib/xdr/XdrDecoder.js.map +1 -1
  322. package/lib/xdr/XdrEncoder.d.ts +71 -0
  323. package/lib/xdr/XdrEncoder.js +88 -13
  324. package/lib/xdr/XdrEncoder.js.map +1 -1
  325. package/lib/xdr/XdrSchemaDecoder.d.ts +40 -0
  326. package/lib/xdr/XdrSchemaDecoder.js +52 -0
  327. package/lib/xdr/XdrSchemaDecoder.js.map +1 -1
  328. package/lib/xdr/XdrSchemaEncoder.d.ts +5 -0
  329. package/lib/xdr/XdrSchemaEncoder.js +9 -0
  330. package/lib/xdr/XdrSchemaEncoder.js.map +1 -1
  331. package/lib/xdr/XdrSchemaValidator.d.ts +9 -0
  332. package/lib/xdr/XdrSchemaValidator.js +42 -11
  333. package/lib/xdr/XdrSchemaValidator.js.map +1 -1
  334. package/lib/xdr/XdrUnion.d.ts +5 -0
  335. package/lib/xdr/XdrUnion.js +5 -0
  336. package/lib/xdr/XdrUnion.js.map +1 -1
  337. package/lib/xdr/index.d.ts +14 -0
  338. package/lib/xdr/index.js +14 -0
  339. package/lib/xdr/index.js.map +1 -1
  340. package/lib/xdr/types.d.ts +52 -0
  341. package/package.json +35 -56
  342. package/lib/nfs/v4/FullNfsv4Encoder.d.ts +0 -28
  343. package/lib/nfs/v4/FullNfsv4Encoder.js +0 -73
  344. package/lib/nfs/v4/FullNfsv4Encoder.js.map +0 -1
@@ -3,10 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Nfsv4OpenDowngradeRequest = exports.Nfsv4OpenConfirmResponse = exports.Nfsv4OpenConfirmResOk = exports.Nfsv4OpenConfirmRequest = exports.Nfsv4OpenattrResponse = exports.Nfsv4OpenattrRequest = exports.Nfsv4OpenResponse = exports.Nfsv4OpenResOk = exports.Nfsv4OpenRequest = exports.Nfsv4NverifyResponse = exports.Nfsv4NverifyRequest = exports.Nfsv4LookuppResponse = exports.Nfsv4LookuppRequest = exports.Nfsv4LookupResponse = exports.Nfsv4LookupRequest = exports.Nfsv4LockuResponse = exports.Nfsv4LockuResOk = exports.Nfsv4LockuRequest = exports.Nfsv4LocktResponse = exports.Nfsv4LocktResDenied = exports.Nfsv4LocktRequest = exports.Nfsv4LockResponse = exports.Nfsv4LockResDenied = exports.Nfsv4LockResOk = exports.Nfsv4LockRequest = exports.Nfsv4LinkResponse = exports.Nfsv4LinkResOk = exports.Nfsv4LinkRequest = exports.Nfsv4GetfhResponse = exports.Nfsv4GetfhResOk = exports.Nfsv4GetfhRequest = exports.Nfsv4GetattrResponse = exports.Nfsv4GetattrResOk = exports.Nfsv4GetattrRequest = exports.Nfsv4DelegreturnResponse = exports.Nfsv4DelegreturnRequest = exports.Nfsv4DelegpurgeResponse = exports.Nfsv4DelegpurgeRequest = exports.Nfsv4CreateResponse = exports.Nfsv4CreateResOk = exports.Nfsv4CreateRequest = exports.Nfsv4CommitResponse = exports.Nfsv4CommitResOk = exports.Nfsv4CommitRequest = exports.Nfsv4CloseResponse = exports.Nfsv4CloseResOk = exports.Nfsv4CloseRequest = exports.Nfsv4AccessResponse = exports.Nfsv4AccessResOk = exports.Nfsv4AccessRequest = void 0;
4
4
  exports.Nfsv4CompoundRequest = exports.Nfsv4IllegalResponse = exports.Nfsv4IllegalRequest = exports.Nfsv4ReleaseLockOwnerResponse = exports.Nfsv4ReleaseLockOwnerRequest = exports.Nfsv4WriteResponse = exports.Nfsv4WriteResOk = exports.Nfsv4WriteRequest = exports.Nfsv4VerifyResponse = exports.Nfsv4VerifyRequest = exports.Nfsv4SetclientidConfirmResponse = exports.Nfsv4SetclientidConfirmRequest = exports.Nfsv4SetclientidResponse = exports.Nfsv4SetclientidResOk = exports.Nfsv4SetclientidRequest = exports.Nfsv4SetattrResponse = exports.Nfsv4SetattrResOk = exports.Nfsv4SetattrRequest = exports.Nfsv4SecinfoResponse = exports.Nfsv4SecinfoResOk = exports.Nfsv4SecinfoRequest = exports.Nfsv4SavefhResponse = exports.Nfsv4SavefhRequest = exports.Nfsv4RestorefhResponse = exports.Nfsv4RestorefhRequest = exports.Nfsv4RenewResponse = exports.Nfsv4RenewRequest = exports.Nfsv4RenameResponse = exports.Nfsv4RenameResOk = exports.Nfsv4RenameRequest = exports.Nfsv4RemoveResponse = exports.Nfsv4RemoveResOk = exports.Nfsv4RemoveRequest = exports.Nfsv4ReadlinkResponse = exports.Nfsv4ReadlinkResOk = exports.Nfsv4ReadlinkRequest = exports.Nfsv4ReaddirResponse = exports.Nfsv4ReaddirResOk = exports.Nfsv4ReaddirRequest = exports.Nfsv4ReadResponse = exports.Nfsv4ReadResOk = exports.Nfsv4ReadRequest = exports.Nfsv4PutrootfhResponse = exports.Nfsv4PutrootfhRequest = exports.Nfsv4PutpubfhResponse = exports.Nfsv4PutpubfhRequest = exports.Nfsv4PutfhResponse = exports.Nfsv4PutfhRequest = exports.Nfsv4OpenDowngradeResponse = exports.Nfsv4OpenDowngradeResOk = void 0;
5
5
  exports.Nfsv4CbCompoundResponse = exports.Nfsv4CbCompoundRequest = exports.Nfsv4CbIllegalResponse = exports.Nfsv4CbIllegalRequest = exports.Nfsv4CbRecallResponse = exports.Nfsv4CbRecallRequest = exports.Nfsv4CbGetattrResponse = exports.Nfsv4CbGetattrResOk = exports.Nfsv4CbGetattrRequest = exports.Nfsv4CompoundResponse = void 0;
6
+ const tslib_1 = require("tslib");
7
+ const structs = tslib_1.__importStar(require("./structs"));
6
8
  class Nfsv4AccessRequest {
9
+ static decode(xdr) {
10
+ const access = xdr.readUnsignedInt();
11
+ return new Nfsv4AccessRequest(access);
12
+ }
7
13
  constructor(access) {
8
14
  this.access = access;
9
15
  }
16
+ encode(xdr) {
17
+ xdr.writeUnsignedInt(3 /* Nfsv4Op.ACCESS */);
18
+ xdr.writeUnsignedInt(this.access);
19
+ }
10
20
  }
11
21
  exports.Nfsv4AccessRequest = Nfsv4AccessRequest;
12
22
  class Nfsv4AccessResOk {
@@ -14,6 +24,10 @@ class Nfsv4AccessResOk {
14
24
  this.supported = supported;
15
25
  this.access = access;
16
26
  }
27
+ encode(xdr) {
28
+ xdr.writeUnsignedInt(this.supported);
29
+ xdr.writeUnsignedInt(this.access);
30
+ }
17
31
  }
18
32
  exports.Nfsv4AccessResOk = Nfsv4AccessResOk;
19
33
  class Nfsv4AccessResponse {
@@ -21,19 +35,38 @@ class Nfsv4AccessResponse {
21
35
  this.status = status;
22
36
  this.resok = resok;
23
37
  }
38
+ encode(xdr) {
39
+ xdr.writeUnsignedInt(3 /* Nfsv4Op.ACCESS */);
40
+ xdr.writeUnsignedInt(this.status);
41
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */)
42
+ this.resok?.encode(xdr);
43
+ }
24
44
  }
25
45
  exports.Nfsv4AccessResponse = Nfsv4AccessResponse;
26
46
  class Nfsv4CloseRequest {
47
+ static decode(xdr) {
48
+ const seqid = xdr.readUnsignedInt();
49
+ const openStateid = structs.Nfsv4Stateid.decode(xdr);
50
+ return new Nfsv4CloseRequest(seqid, openStateid);
51
+ }
27
52
  constructor(seqid, openStateid) {
28
53
  this.seqid = seqid;
29
54
  this.openStateid = openStateid;
30
55
  }
56
+ encode(xdr) {
57
+ xdr.writeUnsignedInt(4 /* Nfsv4Op.CLOSE */);
58
+ xdr.writeUnsignedInt(this.seqid);
59
+ this.openStateid.encode(xdr);
60
+ }
31
61
  }
32
62
  exports.Nfsv4CloseRequest = Nfsv4CloseRequest;
33
63
  class Nfsv4CloseResOk {
34
64
  constructor(openStateid) {
35
65
  this.openStateid = openStateid;
36
66
  }
67
+ encode(xdr) {
68
+ this.openStateid.encode(xdr);
69
+ }
37
70
  }
38
71
  exports.Nfsv4CloseResOk = Nfsv4CloseResOk;
39
72
  class Nfsv4CloseResponse {
@@ -41,19 +74,38 @@ class Nfsv4CloseResponse {
41
74
  this.status = status;
42
75
  this.resok = resok;
43
76
  }
77
+ encode(xdr) {
78
+ xdr.writeUnsignedInt(4 /* Nfsv4Op.CLOSE */);
79
+ xdr.writeUnsignedInt(this.status);
80
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */)
81
+ this.resok?.encode(xdr);
82
+ }
44
83
  }
45
84
  exports.Nfsv4CloseResponse = Nfsv4CloseResponse;
46
85
  class Nfsv4CommitRequest {
86
+ static decode(xdr) {
87
+ const offset = xdr.readUnsignedHyper();
88
+ const count = xdr.readUnsignedInt();
89
+ return new Nfsv4CommitRequest(offset, count);
90
+ }
47
91
  constructor(offset, count) {
48
92
  this.offset = offset;
49
93
  this.count = count;
50
94
  }
95
+ encode(xdr) {
96
+ xdr.writeUnsignedInt(5 /* Nfsv4Op.COMMIT */);
97
+ xdr.writeUnsignedHyper(this.offset);
98
+ xdr.writeUnsignedInt(this.count);
99
+ }
51
100
  }
52
101
  exports.Nfsv4CommitRequest = Nfsv4CommitRequest;
53
102
  class Nfsv4CommitResOk {
54
103
  constructor(writeverf) {
55
104
  this.writeverf = writeverf;
56
105
  }
106
+ encode(xdr) {
107
+ this.writeverf.encode(xdr);
108
+ }
57
109
  }
58
110
  exports.Nfsv4CommitResOk = Nfsv4CommitResOk;
59
111
  class Nfsv4CommitResponse {
@@ -61,12 +113,25 @@ class Nfsv4CommitResponse {
61
113
  this.status = status;
62
114
  this.resok = resok;
63
115
  }
116
+ encode(xdr) {
117
+ xdr.writeUnsignedInt(5 /* Nfsv4Op.COMMIT */);
118
+ xdr.writeUnsignedInt(this.status);
119
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */)
120
+ this.resok?.encode(xdr);
121
+ }
64
122
  }
65
123
  exports.Nfsv4CommitResponse = Nfsv4CommitResponse;
66
124
  class Nfsv4CreateRequest {
67
- constructor(objtype, objname) {
125
+ constructor(objtype, objname, createattrs) {
68
126
  this.objtype = objtype;
69
127
  this.objname = objname;
128
+ this.createattrs = createattrs;
129
+ }
130
+ encode(xdr) {
131
+ xdr.writeUnsignedInt(6 /* Nfsv4Op.CREATE */);
132
+ this.objtype.encode(xdr);
133
+ xdr.writeStr(this.objname);
134
+ this.createattrs.encode(xdr);
70
135
  }
71
136
  }
72
137
  exports.Nfsv4CreateRequest = Nfsv4CreateRequest;
@@ -75,6 +140,10 @@ class Nfsv4CreateResOk {
75
140
  this.cinfo = cinfo;
76
141
  this.attrset = attrset;
77
142
  }
143
+ encode(xdr) {
144
+ this.cinfo.encode(xdr);
145
+ this.attrset.encode(xdr);
146
+ }
78
147
  }
79
148
  exports.Nfsv4CreateResOk = Nfsv4CreateResOk;
80
149
  class Nfsv4CreateResponse {
@@ -82,42 +151,79 @@ class Nfsv4CreateResponse {
82
151
  this.status = status;
83
152
  this.resok = resok;
84
153
  }
154
+ encode(xdr) {
155
+ xdr.writeUnsignedInt(6 /* Nfsv4Op.CREATE */);
156
+ xdr.writeUnsignedInt(this.status);
157
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */)
158
+ this.resok?.encode(xdr);
159
+ }
85
160
  }
86
161
  exports.Nfsv4CreateResponse = Nfsv4CreateResponse;
87
162
  class Nfsv4DelegpurgeRequest {
163
+ static decode(xdr) {
164
+ const clientid = xdr.readUnsignedHyper();
165
+ return new Nfsv4DelegpurgeRequest(clientid);
166
+ }
88
167
  constructor(clientid) {
89
168
  this.clientid = clientid;
90
169
  }
170
+ encode(xdr) {
171
+ xdr.writeUnsignedInt(7 /* Nfsv4Op.DELEGPURGE */);
172
+ xdr.writeUnsignedHyper(this.clientid);
173
+ }
91
174
  }
92
175
  exports.Nfsv4DelegpurgeRequest = Nfsv4DelegpurgeRequest;
93
176
  class Nfsv4DelegpurgeResponse {
94
177
  constructor(status) {
95
178
  this.status = status;
96
179
  }
180
+ encode(xdr) {
181
+ xdr.writeUnsignedInt(7 /* Nfsv4Op.DELEGPURGE */);
182
+ xdr.writeUnsignedInt(this.status);
183
+ }
97
184
  }
98
185
  exports.Nfsv4DelegpurgeResponse = Nfsv4DelegpurgeResponse;
99
186
  class Nfsv4DelegreturnRequest {
187
+ static decode(xdr) {
188
+ const delegStateid = structs.Nfsv4Stateid.decode(xdr);
189
+ return new Nfsv4DelegreturnRequest(delegStateid);
190
+ }
100
191
  constructor(delegStateid) {
101
192
  this.delegStateid = delegStateid;
102
193
  }
194
+ encode(xdr) {
195
+ xdr.writeUnsignedInt(8 /* Nfsv4Op.DELEGRETURN */);
196
+ this.delegStateid.encode(xdr);
197
+ }
103
198
  }
104
199
  exports.Nfsv4DelegreturnRequest = Nfsv4DelegreturnRequest;
105
200
  class Nfsv4DelegreturnResponse {
106
201
  constructor(status) {
107
202
  this.status = status;
108
203
  }
204
+ encode(xdr) {
205
+ xdr.writeUnsignedInt(8 /* Nfsv4Op.DELEGRETURN */);
206
+ xdr.writeUnsignedInt(this.status);
207
+ }
109
208
  }
110
209
  exports.Nfsv4DelegreturnResponse = Nfsv4DelegreturnResponse;
111
210
  class Nfsv4GetattrRequest {
112
211
  constructor(attrRequest) {
113
212
  this.attrRequest = attrRequest;
114
213
  }
214
+ encode(xdr) {
215
+ xdr.writeUnsignedInt(9 /* Nfsv4Op.GETATTR */);
216
+ this.attrRequest.encode(xdr);
217
+ }
115
218
  }
116
219
  exports.Nfsv4GetattrRequest = Nfsv4GetattrRequest;
117
220
  class Nfsv4GetattrResOk {
118
221
  constructor(objAttributes) {
119
222
  this.objAttributes = objAttributes;
120
223
  }
224
+ encode(xdr) {
225
+ this.objAttributes.encode(xdr);
226
+ }
121
227
  }
122
228
  exports.Nfsv4GetattrResOk = Nfsv4GetattrResOk;
123
229
  class Nfsv4GetattrResponse {
@@ -125,15 +231,27 @@ class Nfsv4GetattrResponse {
125
231
  this.status = status;
126
232
  this.resok = resok;
127
233
  }
234
+ encode(xdr) {
235
+ xdr.writeUnsignedInt(9 /* Nfsv4Op.GETATTR */);
236
+ xdr.writeUnsignedInt(this.status);
237
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */)
238
+ this.resok?.encode(xdr);
239
+ }
128
240
  }
129
241
  exports.Nfsv4GetattrResponse = Nfsv4GetattrResponse;
130
242
  class Nfsv4GetfhRequest {
243
+ encode(xdr) {
244
+ xdr.writeUnsignedInt(10 /* Nfsv4Op.GETFH */);
245
+ }
131
246
  }
132
247
  exports.Nfsv4GetfhRequest = Nfsv4GetfhRequest;
133
248
  class Nfsv4GetfhResOk {
134
249
  constructor(object) {
135
250
  this.object = object;
136
251
  }
252
+ encode(xdr) {
253
+ this.object.encode(xdr);
254
+ }
137
255
  }
138
256
  exports.Nfsv4GetfhResOk = Nfsv4GetfhResOk;
139
257
  class Nfsv4GetfhResponse {
@@ -141,18 +259,31 @@ class Nfsv4GetfhResponse {
141
259
  this.status = status;
142
260
  this.resok = resok;
143
261
  }
262
+ encode(xdr) {
263
+ xdr.writeUnsignedInt(10 /* Nfsv4Op.GETFH */);
264
+ xdr.writeUnsignedInt(this.status);
265
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */)
266
+ this.resok?.encode(xdr);
267
+ }
144
268
  }
145
269
  exports.Nfsv4GetfhResponse = Nfsv4GetfhResponse;
146
270
  class Nfsv4LinkRequest {
147
271
  constructor(newname) {
148
272
  this.newname = newname;
149
273
  }
274
+ encode(xdr) {
275
+ xdr.writeUnsignedInt(11 /* Nfsv4Op.LINK */);
276
+ xdr.writeStr(this.newname);
277
+ }
150
278
  }
151
279
  exports.Nfsv4LinkRequest = Nfsv4LinkRequest;
152
280
  class Nfsv4LinkResOk {
153
281
  constructor(cinfo) {
154
282
  this.cinfo = cinfo;
155
283
  }
284
+ encode(xdr) {
285
+ this.cinfo.encode(xdr);
286
+ }
156
287
  }
157
288
  exports.Nfsv4LinkResOk = Nfsv4LinkResOk;
158
289
  class Nfsv4LinkResponse {
@@ -160,6 +291,12 @@ class Nfsv4LinkResponse {
160
291
  this.status = status;
161
292
  this.resok = resok;
162
293
  }
294
+ encode(xdr) {
295
+ xdr.writeUnsignedInt(11 /* Nfsv4Op.LINK */);
296
+ xdr.writeUnsignedInt(this.status);
297
+ if (this.status === 0)
298
+ this.resok?.encode(xdr);
299
+ }
163
300
  }
164
301
  exports.Nfsv4LinkResponse = Nfsv4LinkResponse;
165
302
  class Nfsv4LockRequest {
@@ -170,12 +307,23 @@ class Nfsv4LockRequest {
170
307
  this.length = length;
171
308
  this.locker = locker;
172
309
  }
310
+ encode(xdr) {
311
+ xdr.writeUnsignedInt(12 /* Nfsv4Op.LOCK */);
312
+ xdr.writeUnsignedInt(this.locktype);
313
+ xdr.writeBoolean(this.reclaim);
314
+ xdr.writeUnsignedHyper(this.offset);
315
+ xdr.writeUnsignedHyper(this.length);
316
+ this.locker.encode(xdr);
317
+ }
173
318
  }
174
319
  exports.Nfsv4LockRequest = Nfsv4LockRequest;
175
320
  class Nfsv4LockResOk {
176
321
  constructor(lockStateid) {
177
322
  this.lockStateid = lockStateid;
178
323
  }
324
+ encode(xdr) {
325
+ this.lockStateid.encode(xdr);
326
+ }
179
327
  }
180
328
  exports.Nfsv4LockResOk = Nfsv4LockResOk;
181
329
  class Nfsv4LockResDenied {
@@ -185,6 +333,12 @@ class Nfsv4LockResDenied {
185
333
  this.locktype = locktype;
186
334
  this.owner = owner;
187
335
  }
336
+ encode(xdr) {
337
+ xdr.writeUnsignedHyper(this.offset);
338
+ xdr.writeUnsignedHyper(this.length);
339
+ xdr.writeUnsignedInt(this.locktype);
340
+ this.owner.encode(xdr);
341
+ }
188
342
  }
189
343
  exports.Nfsv4LockResDenied = Nfsv4LockResDenied;
190
344
  class Nfsv4LockResponse {
@@ -193,6 +347,16 @@ class Nfsv4LockResponse {
193
347
  this.resok = resok;
194
348
  this.denied = denied;
195
349
  }
350
+ encode(xdr) {
351
+ xdr.writeUnsignedInt(12 /* Nfsv4Op.LOCK */);
352
+ xdr.writeUnsignedInt(this.status);
353
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */ && this.resok) {
354
+ this.resok.encode(xdr);
355
+ }
356
+ else if (this.denied) {
357
+ this.denied.encode(xdr);
358
+ }
359
+ }
196
360
  }
197
361
  exports.Nfsv4LockResponse = Nfsv4LockResponse;
198
362
  class Nfsv4LocktRequest {
@@ -202,6 +366,13 @@ class Nfsv4LocktRequest {
202
366
  this.length = length;
203
367
  this.owner = owner;
204
368
  }
369
+ encode(xdr) {
370
+ xdr.writeUnsignedInt(13 /* Nfsv4Op.LOCKT */);
371
+ xdr.writeUnsignedInt(this.locktype);
372
+ xdr.writeUnsignedHyper(this.offset);
373
+ xdr.writeUnsignedHyper(this.length);
374
+ this.owner.encode(xdr);
375
+ }
205
376
  }
206
377
  exports.Nfsv4LocktRequest = Nfsv4LocktRequest;
207
378
  class Nfsv4LocktResDenied {
@@ -211,6 +382,12 @@ class Nfsv4LocktResDenied {
211
382
  this.locktype = locktype;
212
383
  this.owner = owner;
213
384
  }
385
+ encode(xdr) {
386
+ xdr.writeUnsignedHyper(this.offset);
387
+ xdr.writeUnsignedHyper(this.length);
388
+ xdr.writeUnsignedInt(this.locktype);
389
+ this.owner.encode(xdr);
390
+ }
214
391
  }
215
392
  exports.Nfsv4LocktResDenied = Nfsv4LocktResDenied;
216
393
  class Nfsv4LocktResponse {
@@ -218,6 +395,11 @@ class Nfsv4LocktResponse {
218
395
  this.status = status;
219
396
  this.denied = denied;
220
397
  }
398
+ encode(xdr) {
399
+ xdr.writeUnsignedInt(13 /* Nfsv4Op.LOCKT */);
400
+ xdr.writeUnsignedInt(this.status);
401
+ this.denied?.encode(xdr);
402
+ }
221
403
  }
222
404
  exports.Nfsv4LocktResponse = Nfsv4LocktResponse;
223
405
  class Nfsv4LockuRequest {
@@ -228,12 +410,23 @@ class Nfsv4LockuRequest {
228
410
  this.offset = offset;
229
411
  this.length = length;
230
412
  }
413
+ encode(xdr) {
414
+ xdr.writeUnsignedInt(14 /* Nfsv4Op.LOCKU */);
415
+ xdr.writeUnsignedInt(this.locktype);
416
+ xdr.writeUnsignedInt(this.seqid);
417
+ this.lockStateid.encode(xdr);
418
+ xdr.writeUnsignedHyper(this.offset);
419
+ xdr.writeUnsignedHyper(this.length);
420
+ }
231
421
  }
232
422
  exports.Nfsv4LockuRequest = Nfsv4LockuRequest;
233
423
  class Nfsv4LockuResOk {
234
424
  constructor(lockStateid) {
235
425
  this.lockStateid = lockStateid;
236
426
  }
427
+ encode(xdr) {
428
+ this.lockStateid.encode(xdr);
429
+ }
237
430
  }
238
431
  exports.Nfsv4LockuResOk = Nfsv4LockuResOk;
239
432
  class Nfsv4LockuResponse {
@@ -241,39 +434,68 @@ class Nfsv4LockuResponse {
241
434
  this.status = status;
242
435
  this.resok = resok;
243
436
  }
437
+ encode(xdr) {
438
+ xdr.writeUnsignedInt(14 /* Nfsv4Op.LOCKU */);
439
+ xdr.writeUnsignedInt(this.status);
440
+ if (this.status === 0)
441
+ this.resok?.encode(xdr);
442
+ }
244
443
  }
245
444
  exports.Nfsv4LockuResponse = Nfsv4LockuResponse;
246
445
  class Nfsv4LookupRequest {
247
446
  constructor(objname) {
248
447
  this.objname = objname;
249
448
  }
449
+ encode(xdr) {
450
+ xdr.writeUnsignedInt(15 /* Nfsv4Op.LOOKUP */);
451
+ xdr.writeStr(this.objname);
452
+ }
250
453
  }
251
454
  exports.Nfsv4LookupRequest = Nfsv4LookupRequest;
252
455
  class Nfsv4LookupResponse {
253
456
  constructor(status) {
254
457
  this.status = status;
255
458
  }
459
+ encode(xdr) {
460
+ xdr.writeUnsignedInt(15 /* Nfsv4Op.LOOKUP */);
461
+ xdr.writeUnsignedInt(this.status);
462
+ }
256
463
  }
257
464
  exports.Nfsv4LookupResponse = Nfsv4LookupResponse;
258
465
  class Nfsv4LookuppRequest {
466
+ encode(xdr) {
467
+ xdr.writeUnsignedInt(16 /* Nfsv4Op.LOOKUPP */);
468
+ }
259
469
  }
260
470
  exports.Nfsv4LookuppRequest = Nfsv4LookuppRequest;
261
471
  class Nfsv4LookuppResponse {
262
472
  constructor(status) {
263
473
  this.status = status;
264
474
  }
475
+ encode(xdr) {
476
+ xdr.writeUnsignedInt(16 /* Nfsv4Op.LOOKUPP */);
477
+ xdr.writeUnsignedInt(this.status);
478
+ }
265
479
  }
266
480
  exports.Nfsv4LookuppResponse = Nfsv4LookuppResponse;
267
481
  class Nfsv4NverifyRequest {
268
482
  constructor(objAttributes) {
269
483
  this.objAttributes = objAttributes;
270
484
  }
485
+ encode(xdr) {
486
+ xdr.writeUnsignedInt(17 /* Nfsv4Op.NVERIFY */);
487
+ this.objAttributes.encode(xdr);
488
+ }
271
489
  }
272
490
  exports.Nfsv4NverifyRequest = Nfsv4NverifyRequest;
273
491
  class Nfsv4NverifyResponse {
274
492
  constructor(status) {
275
493
  this.status = status;
276
494
  }
495
+ encode(xdr) {
496
+ xdr.writeUnsignedInt(17 /* Nfsv4Op.NVERIFY */);
497
+ xdr.writeUnsignedInt(this.status);
498
+ }
277
499
  }
278
500
  exports.Nfsv4NverifyResponse = Nfsv4NverifyResponse;
279
501
  class Nfsv4OpenRequest {
@@ -285,6 +507,15 @@ class Nfsv4OpenRequest {
285
507
  this.openhow = openhow;
286
508
  this.claim = claim;
287
509
  }
510
+ encode(xdr) {
511
+ xdr.writeUnsignedInt(18 /* Nfsv4Op.OPEN */);
512
+ xdr.writeUnsignedInt(this.seqid);
513
+ xdr.writeUnsignedInt(this.shareAccess);
514
+ xdr.writeUnsignedInt(this.shareDeny);
515
+ this.owner.encode(xdr);
516
+ this.openhow.encode(xdr);
517
+ this.claim.encode(xdr);
518
+ }
288
519
  }
289
520
  exports.Nfsv4OpenRequest = Nfsv4OpenRequest;
290
521
  class Nfsv4OpenResOk {
@@ -295,6 +526,13 @@ class Nfsv4OpenResOk {
295
526
  this.attrset = attrset;
296
527
  this.delegation = delegation;
297
528
  }
529
+ encode(xdr) {
530
+ this.stateid.encode(xdr);
531
+ this.cinfo.encode(xdr);
532
+ xdr.writeUnsignedInt(this.rflags);
533
+ this.attrset.encode(xdr);
534
+ this.delegation.encode(xdr);
535
+ }
298
536
  }
299
537
  exports.Nfsv4OpenResOk = Nfsv4OpenResOk;
300
538
  class Nfsv4OpenResponse {
@@ -302,18 +540,33 @@ class Nfsv4OpenResponse {
302
540
  this.status = status;
303
541
  this.resok = resok;
304
542
  }
543
+ encode(xdr) {
544
+ xdr.writeUnsignedInt(18 /* Nfsv4Op.OPEN */);
545
+ xdr.writeUnsignedInt(this.status);
546
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */ && this.resok) {
547
+ this.resok.encode(xdr);
548
+ }
549
+ }
305
550
  }
306
551
  exports.Nfsv4OpenResponse = Nfsv4OpenResponse;
307
552
  class Nfsv4OpenattrRequest {
308
553
  constructor(createdir) {
309
554
  this.createdir = createdir;
310
555
  }
556
+ encode(xdr) {
557
+ xdr.writeUnsignedInt(19 /* Nfsv4Op.OPENATTR */);
558
+ xdr.writeBoolean(this.createdir);
559
+ }
311
560
  }
312
561
  exports.Nfsv4OpenattrRequest = Nfsv4OpenattrRequest;
313
562
  class Nfsv4OpenattrResponse {
314
563
  constructor(status) {
315
564
  this.status = status;
316
565
  }
566
+ encode(xdr) {
567
+ xdr.writeUnsignedInt(19 /* Nfsv4Op.OPENATTR */);
568
+ xdr.writeUnsignedInt(this.status);
569
+ }
317
570
  }
318
571
  exports.Nfsv4OpenattrResponse = Nfsv4OpenattrResponse;
319
572
  class Nfsv4OpenConfirmRequest {
@@ -321,12 +574,20 @@ class Nfsv4OpenConfirmRequest {
321
574
  this.openStateid = openStateid;
322
575
  this.seqid = seqid;
323
576
  }
577
+ encode(xdr) {
578
+ xdr.writeUnsignedInt(20 /* Nfsv4Op.OPEN_CONFIRM */);
579
+ this.openStateid.encode(xdr);
580
+ xdr.writeUnsignedInt(this.seqid);
581
+ }
324
582
  }
325
583
  exports.Nfsv4OpenConfirmRequest = Nfsv4OpenConfirmRequest;
326
584
  class Nfsv4OpenConfirmResOk {
327
585
  constructor(openStateid) {
328
586
  this.openStateid = openStateid;
329
587
  }
588
+ encode(xdr) {
589
+ this.openStateid.encode(xdr);
590
+ }
330
591
  }
331
592
  exports.Nfsv4OpenConfirmResOk = Nfsv4OpenConfirmResOk;
332
593
  class Nfsv4OpenConfirmResponse {
@@ -334,6 +595,13 @@ class Nfsv4OpenConfirmResponse {
334
595
  this.status = status;
335
596
  this.resok = resok;
336
597
  }
598
+ encode(xdr) {
599
+ xdr.writeUnsignedInt(20 /* Nfsv4Op.OPEN_CONFIRM */);
600
+ xdr.writeUnsignedInt(this.status);
601
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */ && this.resok) {
602
+ this.resok.encode(xdr);
603
+ }
604
+ }
337
605
  }
338
606
  exports.Nfsv4OpenConfirmResponse = Nfsv4OpenConfirmResponse;
339
607
  class Nfsv4OpenDowngradeRequest {
@@ -343,12 +611,22 @@ class Nfsv4OpenDowngradeRequest {
343
611
  this.shareAccess = shareAccess;
344
612
  this.shareDeny = shareDeny;
345
613
  }
614
+ encode(xdr) {
615
+ xdr.writeUnsignedInt(21 /* Nfsv4Op.OPEN_DOWNGRADE */);
616
+ this.openStateid.encode(xdr);
617
+ xdr.writeUnsignedInt(this.seqid);
618
+ xdr.writeUnsignedInt(this.shareAccess);
619
+ xdr.writeUnsignedInt(this.shareDeny);
620
+ }
346
621
  }
347
622
  exports.Nfsv4OpenDowngradeRequest = Nfsv4OpenDowngradeRequest;
348
623
  class Nfsv4OpenDowngradeResOk {
349
624
  constructor(openStateid) {
350
625
  this.openStateid = openStateid;
351
626
  }
627
+ encode(xdr) {
628
+ this.openStateid.encode(xdr);
629
+ }
352
630
  }
353
631
  exports.Nfsv4OpenDowngradeResOk = Nfsv4OpenDowngradeResOk;
354
632
  class Nfsv4OpenDowngradeResponse {
@@ -356,36 +634,69 @@ class Nfsv4OpenDowngradeResponse {
356
634
  this.status = status;
357
635
  this.resok = resok;
358
636
  }
637
+ encode(xdr) {
638
+ xdr.writeUnsignedInt(21 /* Nfsv4Op.OPEN_DOWNGRADE */);
639
+ xdr.writeUnsignedInt(this.status);
640
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */ && this.resok) {
641
+ this.resok.encode(xdr);
642
+ }
643
+ }
359
644
  }
360
645
  exports.Nfsv4OpenDowngradeResponse = Nfsv4OpenDowngradeResponse;
361
646
  class Nfsv4PutfhRequest {
362
647
  constructor(object) {
363
648
  this.object = object;
364
649
  }
650
+ encode(xdr) {
651
+ xdr.writeUnsignedInt(22 /* Nfsv4Op.PUTFH */);
652
+ this.object.encode(xdr);
653
+ }
365
654
  }
366
655
  exports.Nfsv4PutfhRequest = Nfsv4PutfhRequest;
367
656
  class Nfsv4PutfhResponse {
368
657
  constructor(status) {
369
658
  this.status = status;
370
659
  }
660
+ encode(xdr) {
661
+ xdr.writeUnsignedInt(22 /* Nfsv4Op.PUTFH */);
662
+ xdr.writeUnsignedInt(this.status);
663
+ }
371
664
  }
372
665
  exports.Nfsv4PutfhResponse = Nfsv4PutfhResponse;
373
666
  class Nfsv4PutpubfhRequest {
667
+ encode(xdr) {
668
+ xdr.writeUnsignedInt(23 /* Nfsv4Op.PUTPUBFH */);
669
+ }
374
670
  }
375
671
  exports.Nfsv4PutpubfhRequest = Nfsv4PutpubfhRequest;
376
672
  class Nfsv4PutpubfhResponse {
673
+ static decode(xdr) {
674
+ const status = xdr.readUnsignedInt();
675
+ return new Nfsv4PutpubfhResponse(status);
676
+ }
377
677
  constructor(status) {
378
678
  this.status = status;
379
679
  }
680
+ encode(xdr) {
681
+ xdr.writeUnsignedInt(23 /* Nfsv4Op.PUTPUBFH */);
682
+ xdr.writeUnsignedInt(this.status);
683
+ }
380
684
  }
381
685
  exports.Nfsv4PutpubfhResponse = Nfsv4PutpubfhResponse;
382
686
  class Nfsv4PutrootfhRequest {
687
+ encode(xdr) {
688
+ xdr.writeUnsignedInt(24 /* Nfsv4Op.PUTROOTFH */);
689
+ }
383
690
  }
384
691
  exports.Nfsv4PutrootfhRequest = Nfsv4PutrootfhRequest;
385
692
  class Nfsv4PutrootfhResponse {
386
693
  constructor(status) {
387
694
  this.status = status;
388
695
  }
696
+ encode(xdr) {
697
+ xdr.writeUnsignedInt(24 /* Nfsv4Op.PUTROOTFH */);
698
+ xdr.writeUnsignedInt(this.status);
699
+ }
389
700
  }
390
701
  exports.Nfsv4PutrootfhResponse = Nfsv4PutrootfhResponse;
391
702
  class Nfsv4ReadRequest {
@@ -394,6 +705,12 @@ class Nfsv4ReadRequest {
394
705
  this.offset = offset;
395
706
  this.count = count;
396
707
  }
708
+ encode(xdr) {
709
+ xdr.writeUnsignedInt(25 /* Nfsv4Op.READ */);
710
+ this.stateid.encode(xdr);
711
+ xdr.writeUnsignedHyper(this.offset);
712
+ xdr.writeUnsignedInt(this.count);
713
+ }
397
714
  }
398
715
  exports.Nfsv4ReadRequest = Nfsv4ReadRequest;
399
716
  class Nfsv4ReadResOk {
@@ -401,6 +718,10 @@ class Nfsv4ReadResOk {
401
718
  this.eof = eof;
402
719
  this.data = data;
403
720
  }
721
+ encode(xdr) {
722
+ xdr.writeBoolean(this.eof);
723
+ xdr.writeVarlenOpaque(this.data);
724
+ }
404
725
  }
405
726
  exports.Nfsv4ReadResOk = Nfsv4ReadResOk;
406
727
  class Nfsv4ReadResponse {
@@ -408,6 +729,13 @@ class Nfsv4ReadResponse {
408
729
  this.status = status;
409
730
  this.resok = resok;
410
731
  }
732
+ encode(xdr) {
733
+ xdr.writeUnsignedInt(25 /* Nfsv4Op.READ */);
734
+ xdr.writeUnsignedInt(this.status);
735
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */ && this.resok) {
736
+ this.resok.encode(xdr);
737
+ }
738
+ }
411
739
  }
412
740
  exports.Nfsv4ReadResponse = Nfsv4ReadResponse;
413
741
  class Nfsv4ReaddirRequest {
@@ -418,6 +746,14 @@ class Nfsv4ReaddirRequest {
418
746
  this.maxcount = maxcount;
419
747
  this.attrRequest = attrRequest;
420
748
  }
749
+ encode(xdr) {
750
+ xdr.writeUnsignedInt(26 /* Nfsv4Op.READDIR */);
751
+ xdr.writeUnsignedHyper(this.cookie);
752
+ this.cookieverf.encode(xdr);
753
+ xdr.writeUnsignedInt(this.dircount);
754
+ xdr.writeUnsignedInt(this.maxcount);
755
+ this.attrRequest.encode(xdr);
756
+ }
421
757
  }
422
758
  exports.Nfsv4ReaddirRequest = Nfsv4ReaddirRequest;
423
759
  class Nfsv4ReaddirResOk {
@@ -426,6 +762,18 @@ class Nfsv4ReaddirResOk {
426
762
  this.entries = entries;
427
763
  this.eof = eof;
428
764
  }
765
+ encode(xdr) {
766
+ this.cookieverf.encode(xdr);
767
+ const entries = this.entries;
768
+ const length = entries.length;
769
+ for (let i = 0; i < length; i++) {
770
+ const entry = entries[i];
771
+ xdr.writeBoolean(true);
772
+ entry.encode(xdr);
773
+ }
774
+ xdr.writeBoolean(false);
775
+ xdr.writeBoolean(this.eof);
776
+ }
429
777
  }
430
778
  exports.Nfsv4ReaddirResOk = Nfsv4ReaddirResOk;
431
779
  class Nfsv4ReaddirResponse {
@@ -433,15 +781,28 @@ class Nfsv4ReaddirResponse {
433
781
  this.status = status;
434
782
  this.resok = resok;
435
783
  }
784
+ encode(xdr) {
785
+ xdr.writeUnsignedInt(26 /* Nfsv4Op.READDIR */);
786
+ xdr.writeUnsignedInt(this.status);
787
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */ && this.resok) {
788
+ this.resok.encode(xdr);
789
+ }
790
+ }
436
791
  }
437
792
  exports.Nfsv4ReaddirResponse = Nfsv4ReaddirResponse;
438
793
  class Nfsv4ReadlinkRequest {
794
+ encode(xdr) {
795
+ xdr.writeUnsignedInt(27 /* Nfsv4Op.READLINK */);
796
+ }
439
797
  }
440
798
  exports.Nfsv4ReadlinkRequest = Nfsv4ReadlinkRequest;
441
799
  class Nfsv4ReadlinkResOk {
442
800
  constructor(link) {
443
801
  this.link = link;
444
802
  }
803
+ encode(xdr) {
804
+ xdr.writeStr(this.link);
805
+ }
445
806
  }
446
807
  exports.Nfsv4ReadlinkResOk = Nfsv4ReadlinkResOk;
447
808
  class Nfsv4ReadlinkResponse {
@@ -449,18 +810,32 @@ class Nfsv4ReadlinkResponse {
449
810
  this.status = status;
450
811
  this.resok = resok;
451
812
  }
813
+ encode(xdr) {
814
+ xdr.writeUnsignedInt(27 /* Nfsv4Op.READLINK */);
815
+ xdr.writeUnsignedInt(this.status);
816
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */ && this.resok) {
817
+ this.resok.encode(xdr);
818
+ }
819
+ }
452
820
  }
453
821
  exports.Nfsv4ReadlinkResponse = Nfsv4ReadlinkResponse;
454
822
  class Nfsv4RemoveRequest {
455
823
  constructor(target) {
456
824
  this.target = target;
457
825
  }
826
+ encode(xdr) {
827
+ xdr.writeUnsignedInt(28 /* Nfsv4Op.REMOVE */);
828
+ xdr.writeStr(this.target);
829
+ }
458
830
  }
459
831
  exports.Nfsv4RemoveRequest = Nfsv4RemoveRequest;
460
832
  class Nfsv4RemoveResOk {
461
833
  constructor(cinfo) {
462
834
  this.cinfo = cinfo;
463
835
  }
836
+ encode(xdr) {
837
+ this.cinfo.encode(xdr);
838
+ }
464
839
  }
465
840
  exports.Nfsv4RemoveResOk = Nfsv4RemoveResOk;
466
841
  class Nfsv4RemoveResponse {
@@ -468,6 +843,13 @@ class Nfsv4RemoveResponse {
468
843
  this.status = status;
469
844
  this.resok = resok;
470
845
  }
846
+ encode(xdr) {
847
+ xdr.writeUnsignedInt(28 /* Nfsv4Op.REMOVE */);
848
+ xdr.writeUnsignedInt(this.status);
849
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */ && this.resok) {
850
+ this.resok.encode(xdr);
851
+ }
852
+ }
471
853
  }
472
854
  exports.Nfsv4RemoveResponse = Nfsv4RemoveResponse;
473
855
  class Nfsv4RenameRequest {
@@ -475,6 +857,11 @@ class Nfsv4RenameRequest {
475
857
  this.oldname = oldname;
476
858
  this.newname = newname;
477
859
  }
860
+ encode(xdr) {
861
+ xdr.writeUnsignedInt(29 /* Nfsv4Op.RENAME */);
862
+ xdr.writeStr(this.oldname);
863
+ xdr.writeStr(this.newname);
864
+ }
478
865
  }
479
866
  exports.Nfsv4RenameRequest = Nfsv4RenameRequest;
480
867
  class Nfsv4RenameResOk {
@@ -482,6 +869,10 @@ class Nfsv4RenameResOk {
482
869
  this.sourceCinfo = sourceCinfo;
483
870
  this.targetCinfo = targetCinfo;
484
871
  }
872
+ encode(xdr) {
873
+ this.sourceCinfo.encode(xdr);
874
+ this.targetCinfo.encode(xdr);
875
+ }
485
876
  }
486
877
  exports.Nfsv4RenameResOk = Nfsv4RenameResOk;
487
878
  class Nfsv4RenameResponse {
@@ -489,48 +880,87 @@ class Nfsv4RenameResponse {
489
880
  this.status = status;
490
881
  this.resok = resok;
491
882
  }
883
+ encode(xdr) {
884
+ xdr.writeUnsignedInt(29 /* Nfsv4Op.RENAME */);
885
+ xdr.writeUnsignedInt(this.status);
886
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */)
887
+ this.resok?.encode(xdr);
888
+ }
492
889
  }
493
890
  exports.Nfsv4RenameResponse = Nfsv4RenameResponse;
494
891
  class Nfsv4RenewRequest {
495
892
  constructor(clientid) {
496
893
  this.clientid = clientid;
497
894
  }
895
+ encode(xdr) {
896
+ xdr.writeUnsignedInt(30 /* Nfsv4Op.RENEW */);
897
+ xdr.writeUnsignedHyper(this.clientid);
898
+ }
498
899
  }
499
900
  exports.Nfsv4RenewRequest = Nfsv4RenewRequest;
500
901
  class Nfsv4RenewResponse {
501
902
  constructor(status) {
502
903
  this.status = status;
503
904
  }
905
+ encode(xdr) {
906
+ xdr.writeUnsignedInt(30 /* Nfsv4Op.RENEW */);
907
+ xdr.writeUnsignedInt(this.status);
908
+ }
504
909
  }
505
910
  exports.Nfsv4RenewResponse = Nfsv4RenewResponse;
506
911
  class Nfsv4RestorefhRequest {
912
+ encode(xdr) {
913
+ xdr.writeUnsignedInt(31 /* Nfsv4Op.RESTOREFH */);
914
+ }
507
915
  }
508
916
  exports.Nfsv4RestorefhRequest = Nfsv4RestorefhRequest;
509
917
  class Nfsv4RestorefhResponse {
510
918
  constructor(status) {
511
919
  this.status = status;
512
920
  }
921
+ encode(xdr) {
922
+ xdr.writeUnsignedInt(31 /* Nfsv4Op.RESTOREFH */);
923
+ xdr.writeUnsignedInt(this.status);
924
+ }
513
925
  }
514
926
  exports.Nfsv4RestorefhResponse = Nfsv4RestorefhResponse;
515
927
  class Nfsv4SavefhRequest {
928
+ encode(xdr) {
929
+ xdr.writeUnsignedInt(32 /* Nfsv4Op.SAVEFH */);
930
+ }
516
931
  }
517
932
  exports.Nfsv4SavefhRequest = Nfsv4SavefhRequest;
518
933
  class Nfsv4SavefhResponse {
519
934
  constructor(status) {
520
935
  this.status = status;
521
936
  }
937
+ encode(xdr) {
938
+ xdr.writeUnsignedInt(32 /* Nfsv4Op.SAVEFH */);
939
+ xdr.writeUnsignedInt(this.status);
940
+ }
522
941
  }
523
942
  exports.Nfsv4SavefhResponse = Nfsv4SavefhResponse;
524
943
  class Nfsv4SecinfoRequest {
525
944
  constructor(name) {
526
945
  this.name = name;
527
946
  }
947
+ encode(xdr) {
948
+ xdr.writeUnsignedInt(33 /* Nfsv4Op.SECINFO */);
949
+ xdr.writeStr(this.name);
950
+ }
528
951
  }
529
952
  exports.Nfsv4SecinfoRequest = Nfsv4SecinfoRequest;
530
953
  class Nfsv4SecinfoResOk {
531
954
  constructor(flavors) {
532
955
  this.flavors = flavors;
533
956
  }
957
+ encode(xdr) {
958
+ const flavors = this.flavors;
959
+ const len = flavors.length;
960
+ xdr.writeUnsignedInt(len);
961
+ for (let i = 0; i < len; i++)
962
+ flavors[i].encode(xdr);
963
+ }
534
964
  }
535
965
  exports.Nfsv4SecinfoResOk = Nfsv4SecinfoResOk;
536
966
  class Nfsv4SecinfoResponse {
@@ -538,6 +968,12 @@ class Nfsv4SecinfoResponse {
538
968
  this.status = status;
539
969
  this.resok = resok;
540
970
  }
971
+ encode(xdr) {
972
+ xdr.writeUnsignedInt(33 /* Nfsv4Op.SECINFO */);
973
+ xdr.writeUnsignedInt(this.status);
974
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */ && this.resok)
975
+ this.resok.encode(xdr);
976
+ }
541
977
  }
542
978
  exports.Nfsv4SecinfoResponse = Nfsv4SecinfoResponse;
543
979
  class Nfsv4SetattrRequest {
@@ -545,12 +981,20 @@ class Nfsv4SetattrRequest {
545
981
  this.stateid = stateid;
546
982
  this.objAttributes = objAttributes;
547
983
  }
984
+ encode(xdr) {
985
+ xdr.writeUnsignedInt(34 /* Nfsv4Op.SETATTR */);
986
+ this.stateid.encode(xdr);
987
+ this.objAttributes.encode(xdr);
988
+ }
548
989
  }
549
990
  exports.Nfsv4SetattrRequest = Nfsv4SetattrRequest;
550
991
  class Nfsv4SetattrResOk {
551
992
  constructor(attrsset) {
552
993
  this.attrsset = attrsset;
553
994
  }
995
+ encode(xdr) {
996
+ this.attrsset.encode(xdr);
997
+ }
554
998
  }
555
999
  exports.Nfsv4SetattrResOk = Nfsv4SetattrResOk;
556
1000
  class Nfsv4SetattrResponse {
@@ -558,6 +1002,11 @@ class Nfsv4SetattrResponse {
558
1002
  this.status = status;
559
1003
  this.resok = resok;
560
1004
  }
1005
+ encode(xdr) {
1006
+ xdr.writeUnsignedInt(34 /* Nfsv4Op.SETATTR */);
1007
+ xdr.writeUnsignedInt(this.status);
1008
+ this.resok?.encode(xdr);
1009
+ }
561
1010
  }
562
1011
  exports.Nfsv4SetattrResponse = Nfsv4SetattrResponse;
563
1012
  class Nfsv4SetclientidRequest {
@@ -566,6 +1015,12 @@ class Nfsv4SetclientidRequest {
566
1015
  this.callback = callback;
567
1016
  this.callbackIdent = callbackIdent;
568
1017
  }
1018
+ encode(xdr) {
1019
+ xdr.writeUnsignedInt(35 /* Nfsv4Op.SETCLIENTID */);
1020
+ this.client.encode(xdr);
1021
+ this.callback.encode(xdr);
1022
+ xdr.writeUnsignedInt(this.callbackIdent);
1023
+ }
569
1024
  }
570
1025
  exports.Nfsv4SetclientidRequest = Nfsv4SetclientidRequest;
571
1026
  class Nfsv4SetclientidResOk {
@@ -573,6 +1028,10 @@ class Nfsv4SetclientidResOk {
573
1028
  this.clientid = clientid;
574
1029
  this.setclientidConfirm = setclientidConfirm;
575
1030
  }
1031
+ encode(xdr) {
1032
+ xdr.writeUnsignedHyper(this.clientid);
1033
+ this.setclientidConfirm.encode(xdr);
1034
+ }
576
1035
  }
577
1036
  exports.Nfsv4SetclientidResOk = Nfsv4SetclientidResOk;
578
1037
  class Nfsv4SetclientidResponse {
@@ -580,6 +1039,12 @@ class Nfsv4SetclientidResponse {
580
1039
  this.status = status;
581
1040
  this.resok = resok;
582
1041
  }
1042
+ encode(xdr) {
1043
+ xdr.writeUnsignedInt(35 /* Nfsv4Op.SETCLIENTID */);
1044
+ xdr.writeUnsignedInt(this.status);
1045
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */)
1046
+ this.resok?.encode(xdr);
1047
+ }
583
1048
  }
584
1049
  exports.Nfsv4SetclientidResponse = Nfsv4SetclientidResponse;
585
1050
  class Nfsv4SetclientidConfirmRequest {
@@ -587,24 +1052,41 @@ class Nfsv4SetclientidConfirmRequest {
587
1052
  this.clientid = clientid;
588
1053
  this.setclientidConfirm = setclientidConfirm;
589
1054
  }
1055
+ encode(xdr) {
1056
+ xdr.writeUnsignedInt(36 /* Nfsv4Op.SETCLIENTID_CONFIRM */);
1057
+ xdr.writeUnsignedHyper(this.clientid);
1058
+ this.setclientidConfirm.encode(xdr);
1059
+ }
590
1060
  }
591
1061
  exports.Nfsv4SetclientidConfirmRequest = Nfsv4SetclientidConfirmRequest;
592
1062
  class Nfsv4SetclientidConfirmResponse {
593
1063
  constructor(status) {
594
1064
  this.status = status;
595
1065
  }
1066
+ encode(xdr) {
1067
+ xdr.writeUnsignedInt(36 /* Nfsv4Op.SETCLIENTID_CONFIRM */);
1068
+ xdr.writeUnsignedInt(this.status);
1069
+ }
596
1070
  }
597
1071
  exports.Nfsv4SetclientidConfirmResponse = Nfsv4SetclientidConfirmResponse;
598
1072
  class Nfsv4VerifyRequest {
599
1073
  constructor(objAttributes) {
600
1074
  this.objAttributes = objAttributes;
601
1075
  }
1076
+ encode(xdr) {
1077
+ xdr.writeUnsignedInt(37 /* Nfsv4Op.VERIFY */);
1078
+ this.objAttributes.encode(xdr);
1079
+ }
602
1080
  }
603
1081
  exports.Nfsv4VerifyRequest = Nfsv4VerifyRequest;
604
1082
  class Nfsv4VerifyResponse {
605
1083
  constructor(status) {
606
1084
  this.status = status;
607
1085
  }
1086
+ encode(xdr) {
1087
+ xdr.writeUnsignedInt(37 /* Nfsv4Op.VERIFY */);
1088
+ xdr.writeUnsignedInt(this.status);
1089
+ }
608
1090
  }
609
1091
  exports.Nfsv4VerifyResponse = Nfsv4VerifyResponse;
610
1092
  class Nfsv4WriteRequest {
@@ -614,6 +1096,13 @@ class Nfsv4WriteRequest {
614
1096
  this.stable = stable;
615
1097
  this.data = data;
616
1098
  }
1099
+ encode(xdr) {
1100
+ xdr.writeUnsignedInt(38 /* Nfsv4Op.WRITE */);
1101
+ this.stateid.encode(xdr);
1102
+ xdr.writeUnsignedHyper(this.offset);
1103
+ xdr.writeUnsignedInt(this.stable);
1104
+ xdr.writeVarlenOpaque(this.data);
1105
+ }
617
1106
  }
618
1107
  exports.Nfsv4WriteRequest = Nfsv4WriteRequest;
619
1108
  class Nfsv4WriteResOk {
@@ -622,6 +1111,11 @@ class Nfsv4WriteResOk {
622
1111
  this.committed = committed;
623
1112
  this.writeverf = writeverf;
624
1113
  }
1114
+ encode(xdr) {
1115
+ xdr.writeUnsignedInt(this.count);
1116
+ xdr.writeUnsignedInt(this.committed);
1117
+ this.writeverf.encode(xdr);
1118
+ }
625
1119
  }
626
1120
  exports.Nfsv4WriteResOk = Nfsv4WriteResOk;
627
1121
  class Nfsv4WriteResponse {
@@ -629,27 +1123,48 @@ class Nfsv4WriteResponse {
629
1123
  this.status = status;
630
1124
  this.resok = resok;
631
1125
  }
1126
+ encode(xdr) {
1127
+ xdr.writeUnsignedInt(38 /* Nfsv4Op.WRITE */);
1128
+ xdr.writeUnsignedInt(this.status);
1129
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */ && this.resok)
1130
+ this.resok.encode(xdr);
1131
+ }
632
1132
  }
633
1133
  exports.Nfsv4WriteResponse = Nfsv4WriteResponse;
634
1134
  class Nfsv4ReleaseLockOwnerRequest {
635
1135
  constructor(lockOwner) {
636
1136
  this.lockOwner = lockOwner;
637
1137
  }
1138
+ encode(xdr) {
1139
+ xdr.writeUnsignedInt(39 /* Nfsv4Op.RELEASE_LOCKOWNER */);
1140
+ this.lockOwner.encode(xdr);
1141
+ }
638
1142
  }
639
1143
  exports.Nfsv4ReleaseLockOwnerRequest = Nfsv4ReleaseLockOwnerRequest;
640
1144
  class Nfsv4ReleaseLockOwnerResponse {
641
1145
  constructor(status) {
642
1146
  this.status = status;
643
1147
  }
1148
+ encode(xdr) {
1149
+ xdr.writeUnsignedInt(39 /* Nfsv4Op.RELEASE_LOCKOWNER */);
1150
+ xdr.writeUnsignedInt(this.status);
1151
+ }
644
1152
  }
645
1153
  exports.Nfsv4ReleaseLockOwnerResponse = Nfsv4ReleaseLockOwnerResponse;
646
1154
  class Nfsv4IllegalRequest {
1155
+ encode(xdr) {
1156
+ xdr.writeUnsignedInt(10044 /* Nfsv4Op.ILLEGAL */);
1157
+ }
647
1158
  }
648
1159
  exports.Nfsv4IllegalRequest = Nfsv4IllegalRequest;
649
1160
  class Nfsv4IllegalResponse {
650
1161
  constructor(status) {
651
1162
  this.status = status;
652
1163
  }
1164
+ encode(xdr) {
1165
+ xdr.writeUnsignedInt(10044 /* Nfsv4Op.ILLEGAL */);
1166
+ xdr.writeUnsignedInt(this.status);
1167
+ }
653
1168
  }
654
1169
  exports.Nfsv4IllegalResponse = Nfsv4IllegalResponse;
655
1170
  class Nfsv4CompoundRequest {
@@ -658,6 +1173,15 @@ class Nfsv4CompoundRequest {
658
1173
  this.minorversion = minorversion;
659
1174
  this.argarray = argarray;
660
1175
  }
1176
+ encode(xdr) {
1177
+ xdr.writeStr(this.tag);
1178
+ xdr.writeUnsignedInt(this.minorversion);
1179
+ const argarray = this.argarray;
1180
+ const len = argarray.length;
1181
+ xdr.writeUnsignedInt(len);
1182
+ for (let i = 0; i < len; i++)
1183
+ argarray[i].encode(xdr);
1184
+ }
661
1185
  }
662
1186
  exports.Nfsv4CompoundRequest = Nfsv4CompoundRequest;
663
1187
  class Nfsv4CompoundResponse {
@@ -666,6 +1190,15 @@ class Nfsv4CompoundResponse {
666
1190
  this.tag = tag;
667
1191
  this.resarray = resarray;
668
1192
  }
1193
+ encode(xdr) {
1194
+ xdr.writeUnsignedInt(this.status);
1195
+ xdr.writeStr(this.tag);
1196
+ const resarray = this.resarray;
1197
+ const len = resarray.length;
1198
+ xdr.writeUnsignedInt(len);
1199
+ for (let i = 0; i < len; i++)
1200
+ resarray[i].encode(xdr);
1201
+ }
669
1202
  }
670
1203
  exports.Nfsv4CompoundResponse = Nfsv4CompoundResponse;
671
1204
  class Nfsv4CbGetattrRequest {
@@ -673,12 +1206,20 @@ class Nfsv4CbGetattrRequest {
673
1206
  this.fh = fh;
674
1207
  this.attrRequest = attrRequest;
675
1208
  }
1209
+ encode(xdr) {
1210
+ xdr.writeUnsignedInt(3 /* Nfsv4CbOp.CB_GETATTR */);
1211
+ this.fh.encode(xdr);
1212
+ this.attrRequest.encode(xdr);
1213
+ }
676
1214
  }
677
1215
  exports.Nfsv4CbGetattrRequest = Nfsv4CbGetattrRequest;
678
1216
  class Nfsv4CbGetattrResOk {
679
1217
  constructor(objAttributes) {
680
1218
  this.objAttributes = objAttributes;
681
1219
  }
1220
+ encode(xdr) {
1221
+ this.objAttributes.encode(xdr);
1222
+ }
682
1223
  }
683
1224
  exports.Nfsv4CbGetattrResOk = Nfsv4CbGetattrResOk;
684
1225
  class Nfsv4CbGetattrResponse {
@@ -686,6 +1227,13 @@ class Nfsv4CbGetattrResponse {
686
1227
  this.status = status;
687
1228
  this.resok = resok;
688
1229
  }
1230
+ encode(xdr) {
1231
+ xdr.writeUnsignedInt(3 /* Nfsv4CbOp.CB_GETATTR */);
1232
+ xdr.writeUnsignedInt(this.status);
1233
+ if (this.status === 0 /* Nfsv4Stat.NFS4_OK */ && this.resok) {
1234
+ this.resok.encode(xdr);
1235
+ }
1236
+ }
689
1237
  }
690
1238
  exports.Nfsv4CbGetattrResponse = Nfsv4CbGetattrResponse;
691
1239
  class Nfsv4CbRecallRequest {
@@ -694,21 +1242,38 @@ class Nfsv4CbRecallRequest {
694
1242
  this.truncate = truncate;
695
1243
  this.fh = fh;
696
1244
  }
1245
+ encode(xdr) {
1246
+ xdr.writeUnsignedInt(4 /* Nfsv4CbOp.CB_RECALL */);
1247
+ this.stateid.encode(xdr);
1248
+ xdr.writeBoolean(this.truncate);
1249
+ this.fh.encode(xdr);
1250
+ }
697
1251
  }
698
1252
  exports.Nfsv4CbRecallRequest = Nfsv4CbRecallRequest;
699
1253
  class Nfsv4CbRecallResponse {
700
1254
  constructor(status) {
701
1255
  this.status = status;
702
1256
  }
1257
+ encode(xdr) {
1258
+ xdr.writeUnsignedInt(4 /* Nfsv4CbOp.CB_RECALL */);
1259
+ xdr.writeUnsignedInt(this.status);
1260
+ }
703
1261
  }
704
1262
  exports.Nfsv4CbRecallResponse = Nfsv4CbRecallResponse;
705
1263
  class Nfsv4CbIllegalRequest {
1264
+ encode(xdr) {
1265
+ xdr.writeUnsignedInt(10044 /* Nfsv4CbOp.CB_ILLEGAL */);
1266
+ }
706
1267
  }
707
1268
  exports.Nfsv4CbIllegalRequest = Nfsv4CbIllegalRequest;
708
1269
  class Nfsv4CbIllegalResponse {
709
1270
  constructor(status) {
710
1271
  this.status = status;
711
1272
  }
1273
+ encode(xdr) {
1274
+ xdr.writeUnsignedInt(10044 /* Nfsv4CbOp.CB_ILLEGAL */);
1275
+ xdr.writeUnsignedInt(this.status);
1276
+ }
712
1277
  }
713
1278
  exports.Nfsv4CbIllegalResponse = Nfsv4CbIllegalResponse;
714
1279
  class Nfsv4CbCompoundRequest {
@@ -718,6 +1283,16 @@ class Nfsv4CbCompoundRequest {
718
1283
  this.callbackIdent = callbackIdent;
719
1284
  this.argarray = argarray;
720
1285
  }
1286
+ encode(xdr) {
1287
+ xdr.writeStr(this.tag);
1288
+ xdr.writeUnsignedInt(this.minorversion);
1289
+ xdr.writeUnsignedInt(this.callbackIdent);
1290
+ const argarray = this.argarray;
1291
+ const len = argarray.length;
1292
+ xdr.writeUnsignedInt(len);
1293
+ for (let i = 0; i < len; i++)
1294
+ argarray[i].encode(xdr);
1295
+ }
721
1296
  }
722
1297
  exports.Nfsv4CbCompoundRequest = Nfsv4CbCompoundRequest;
723
1298
  class Nfsv4CbCompoundResponse {
@@ -726,6 +1301,15 @@ class Nfsv4CbCompoundResponse {
726
1301
  this.tag = tag;
727
1302
  this.resarray = resarray;
728
1303
  }
1304
+ encode(xdr) {
1305
+ xdr.writeUnsignedInt(this.status);
1306
+ xdr.writeStr(this.tag);
1307
+ const resarray = this.resarray;
1308
+ const len = resarray.length;
1309
+ xdr.writeUnsignedInt(len);
1310
+ for (let i = 0; i < len; i++)
1311
+ resarray[i].encode(xdr);
1312
+ }
729
1313
  }
730
1314
  exports.Nfsv4CbCompoundResponse = Nfsv4CbCompoundResponse;
731
1315
  //# sourceMappingURL=messages.js.map