web-dc-api 0.1.5 → 0.1.7

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 (148) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/dc.min.js +1 -1
  3. package/dist/esm/index.js +1 -1
  4. package/dist/index.d.ts +934 -878
  5. package/package.json +4 -8
  6. package/dist/cjs/helia-core-B1Xqha7a.js +0 -1
  7. package/dist/cjs/helia-core-D8Uv1KjQ.js +0 -1
  8. package/dist/cjs/polkadot-api-7PhQf3ws.js +0 -1
  9. package/dist/cjs/polkadot-api-CtrJVWuZ.js +0 -1
  10. package/dist/esm/chunks/helia-core-BxMqyK2Y.js +0 -1
  11. package/dist/esm/chunks/helia-core-DMXRpcO-.js +0 -1
  12. package/dist/esm/chunks/polkadot-api-5Y9Bw8VT.js +0 -1
  13. package/dist/esm/chunks/polkadot-api-D69Ioun_.js +0 -1
  14. package/lib/common/blowfish/block.ts +0 -259
  15. package/lib/common/blowfish/cipher.ts +0 -144
  16. package/lib/common/blowfish/const.ts +0 -195
  17. package/lib/common/chain.ts +0 -469
  18. package/lib/common/commonclient.ts +0 -202
  19. package/lib/common/constants.ts +0 -55
  20. package/lib/common/dc-key/ed25519.ts +0 -343
  21. package/lib/common/dc-key/keyManager.ts +0 -424
  22. package/lib/common/dcapi.ts +0 -98
  23. package/lib/common/dcutil.ts +0 -627
  24. package/lib/common/define.ts +0 -70
  25. package/lib/common/error.ts +0 -67
  26. package/lib/common/grpc-dc.ts +0 -104
  27. package/lib/common/module-system.ts +0 -184
  28. package/lib/common/service-worker.ts +0 -234
  29. package/lib/common/types/types.ts +0 -344
  30. package/lib/dc.ts +0 -701
  31. package/lib/implements/account/client.ts +0 -185
  32. package/lib/implements/account/manager.ts +0 -683
  33. package/lib/implements/aiproxy/client.ts +0 -357
  34. package/lib/implements/aiproxy/manager.ts +0 -670
  35. package/lib/implements/cache/client.ts +0 -105
  36. package/lib/implements/cache/manager.ts +0 -127
  37. package/lib/implements/comment/client.ts +0 -982
  38. package/lib/implements/comment/manager.ts +0 -1151
  39. package/lib/implements/dc/client.ts +0 -51
  40. package/lib/implements/dc/manager.ts +0 -33
  41. package/lib/implements/file/client.ts +0 -253
  42. package/lib/implements/file/file-cache-manager.ts +0 -142
  43. package/lib/implements/file/manager.ts +0 -1240
  44. package/lib/implements/file/seekableFileStream.ts +0 -344
  45. package/lib/implements/file/streamwriter.ts +0 -322
  46. package/lib/implements/keyvalue/client.ts +0 -376
  47. package/lib/implements/keyvalue/manager.ts +0 -759
  48. package/lib/implements/message/client.ts +0 -250
  49. package/lib/implements/message/manager.ts +0 -215
  50. package/lib/implements/threaddb/cbor/coding.ts +0 -62
  51. package/lib/implements/threaddb/cbor/event.ts +0 -336
  52. package/lib/implements/threaddb/cbor/node.ts +0 -542
  53. package/lib/implements/threaddb/cbor/record.ts +0 -398
  54. package/lib/implements/threaddb/common/AsyncMutex.ts +0 -24
  55. package/lib/implements/threaddb/common/addrinfo.ts +0 -135
  56. package/lib/implements/threaddb/common/dispatcher.ts +0 -81
  57. package/lib/implements/threaddb/common/idbstore-adapter.ts +0 -260
  58. package/lib/implements/threaddb/common/json-patcher.ts +0 -204
  59. package/lib/implements/threaddb/common/key.ts +0 -290
  60. package/lib/implements/threaddb/common/level-adapter.ts +0 -235
  61. package/lib/implements/threaddb/common/lineReader.ts +0 -79
  62. package/lib/implements/threaddb/common/logstore.ts +0 -215
  63. package/lib/implements/threaddb/common/transformed-datastore.ts +0 -308
  64. package/lib/implements/threaddb/core/app.ts +0 -206
  65. package/lib/implements/threaddb/core/core.ts +0 -230
  66. package/lib/implements/threaddb/core/db.ts +0 -249
  67. package/lib/implements/threaddb/core/event.ts +0 -54
  68. package/lib/implements/threaddb/core/head.ts +0 -89
  69. package/lib/implements/threaddb/core/identity.ts +0 -171
  70. package/lib/implements/threaddb/core/logstore.ts +0 -137
  71. package/lib/implements/threaddb/core/options.ts +0 -14
  72. package/lib/implements/threaddb/core/record.ts +0 -54
  73. package/lib/implements/threaddb/db/collection.ts +0 -1910
  74. package/lib/implements/threaddb/db/db.ts +0 -698
  75. package/lib/implements/threaddb/db/json2Query.ts +0 -192
  76. package/lib/implements/threaddb/db/query.ts +0 -524
  77. package/lib/implements/threaddb/dbclient.ts +0 -543
  78. package/lib/implements/threaddb/dbmanager.ts +0 -1906
  79. package/lib/implements/threaddb/lsstoreds/addr_book.ts +0 -549
  80. package/lib/implements/threaddb/lsstoreds/cache.ts +0 -36
  81. package/lib/implements/threaddb/lsstoreds/cyclic_batch.ts +0 -87
  82. package/lib/implements/threaddb/lsstoreds/global.ts +0 -151
  83. package/lib/implements/threaddb/lsstoreds/headbook.ts +0 -373
  84. package/lib/implements/threaddb/lsstoreds/keybook.ts +0 -297
  85. package/lib/implements/threaddb/lsstoreds/logstore.ts +0 -29
  86. package/lib/implements/threaddb/lsstoreds/metadata.ts +0 -223
  87. package/lib/implements/threaddb/net/define.ts +0 -149
  88. package/lib/implements/threaddb/net/grpcClient.ts +0 -589
  89. package/lib/implements/threaddb/net/grpcserver.ts +0 -146
  90. package/lib/implements/threaddb/net/net.ts +0 -2047
  91. package/lib/implements/threaddb/pb/lstore.proto +0 -38
  92. package/lib/implements/threaddb/pb/lstore.ts +0 -393
  93. package/lib/implements/threaddb/pb/lstore_pb.d.ts +0 -433
  94. package/lib/implements/threaddb/pb/lstore_pb.js +0 -1085
  95. package/lib/implements/threaddb/pb/net.proto +0 -194
  96. package/lib/implements/threaddb/pb/net_pb.d.ts +0 -2349
  97. package/lib/implements/threaddb/pb/net_pb.js +0 -5525
  98. package/lib/implements/threaddb/pb/proto-custom-types.ts +0 -212
  99. package/lib/implements/util/client.ts +0 -72
  100. package/lib/implements/util/manager.ts +0 -146
  101. package/lib/implements/wallet/manager.ts +0 -671
  102. package/lib/index.ts +0 -57
  103. package/lib/interfaces/DCContext.ts +0 -51
  104. package/lib/interfaces/aiproxy-interface.ts +0 -145
  105. package/lib/interfaces/auth-interface.ts +0 -118
  106. package/lib/interfaces/cache-interface.ts +0 -22
  107. package/lib/interfaces/client-interface.ts +0 -11
  108. package/lib/interfaces/comment-interface.ts +0 -167
  109. package/lib/interfaces/components/news-component.ts +0 -0
  110. package/lib/interfaces/database-interface.ts +0 -169
  111. package/lib/interfaces/file-interface.ts +0 -120
  112. package/lib/interfaces/index.ts +0 -10
  113. package/lib/interfaces/keyvalue-interface.ts +0 -156
  114. package/lib/interfaces/message-interface.ts +0 -22
  115. package/lib/interfaces/util-interface.ts +0 -31
  116. package/lib/modules/aiproxy-module.ts +0 -246
  117. package/lib/modules/auth-module.ts +0 -753
  118. package/lib/modules/cache-module.ts +0 -99
  119. package/lib/modules/client-module.ts +0 -71
  120. package/lib/modules/comment-module.ts +0 -429
  121. package/lib/modules/components/news-components.ts +0 -390
  122. package/lib/modules/database-module.ts +0 -598
  123. package/lib/modules/file-module.ts +0 -291
  124. package/lib/modules/index.ts +0 -13
  125. package/lib/modules/keyvalue-module.ts +0 -379
  126. package/lib/modules/message-module.ts +0 -107
  127. package/lib/modules/util-module.ts +0 -148
  128. package/lib/polyfills/process-env-browser.ts +0 -1
  129. package/lib/proto/datasource.ts +0 -93
  130. package/lib/proto/dcnet.proto +0 -1601
  131. package/lib/proto/dcnet_proto.d.ts +0 -22857
  132. package/lib/proto/dcnet_proto.js +0 -55204
  133. package/lib/proto/dcnet_proto_sparse.js +0 -55166
  134. package/lib/proto/oidfetch.proto +0 -25
  135. package/lib/proto/oidfetch_proto.d.ts +0 -585
  136. package/lib/proto/oidfetch_proto.js +0 -1247
  137. package/lib/serverless/babel-browser.ts +0 -39
  138. package/lib/serverless/base_entity.ts +0 -78
  139. package/lib/serverless/base_repository.ts +0 -414
  140. package/lib/serverless/browser_schema_extractor.ts +0 -283
  141. package/lib/serverless/decorator_factory.ts +0 -322
  142. package/lib/util/BrowserLineReader.ts +0 -73
  143. package/lib/util/base64.ts +0 -105
  144. package/lib/util/bcrypt.ts +0 -206
  145. package/lib/util/curve25519Encryption.ts +0 -418
  146. package/lib/util/dccrypt.ts +0 -73
  147. package/lib/util/logger.ts +0 -104
  148. package/lib/util/utils.ts +0 -289
@@ -1,1247 +0,0 @@
1
- /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
2
- import * as $protobuf from "protobufjs/minimal";
3
-
4
- // Common aliases
5
- const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
6
-
7
- // Exported root namespace
8
- const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
9
-
10
- export const oidfetch = $root.oidfetch = (() => {
11
-
12
- /**
13
- * Namespace oidfetch.
14
- * @exports oidfetch
15
- * @namespace
16
- */
17
- const oidfetch = {};
18
-
19
- oidfetch.pb = (function() {
20
-
21
- /**
22
- * Namespace pb.
23
- * @memberof oidfetch
24
- * @namespace
25
- */
26
- const pb = {};
27
-
28
- pb.InitRequset = (function() {
29
-
30
- /**
31
- * Properties of an InitRequset.
32
- * @memberof oidfetch.pb
33
- * @interface IInitRequset
34
- */
35
-
36
- /**
37
- * Constructs a new InitRequset.
38
- * @memberof oidfetch.pb
39
- * @classdesc Represents an InitRequset.
40
- * @implements IInitRequset
41
- * @constructor
42
- * @param {oidfetch.pb.IInitRequset=} [properties] Properties to set
43
- */
44
- function InitRequset(properties) {
45
- if (properties)
46
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
47
- if (properties[keys[i]] != null)
48
- this[keys[i]] = properties[keys[i]];
49
- }
50
-
51
- /**
52
- * Creates a new InitRequset instance using the specified properties.
53
- * @function create
54
- * @memberof oidfetch.pb.InitRequset
55
- * @static
56
- * @param {oidfetch.pb.IInitRequset=} [properties] Properties to set
57
- * @returns {oidfetch.pb.InitRequset} InitRequset instance
58
- */
59
- InitRequset.create = function create(properties) {
60
- return new InitRequset(properties);
61
- };
62
-
63
- /**
64
- * Encodes the specified InitRequset message. Does not implicitly {@link oidfetch.pb.InitRequset.verify|verify} messages.
65
- * @function encode
66
- * @memberof oidfetch.pb.InitRequset
67
- * @static
68
- * @param {oidfetch.pb.IInitRequset} message InitRequset message or plain object to encode
69
- * @param {$protobuf.Writer} [writer] Writer to encode to
70
- * @returns {$protobuf.Writer} Writer
71
- */
72
- InitRequset.encode = function encode(message, writer) {
73
- if (!writer)
74
- writer = $Writer.create();
75
- return writer;
76
- };
77
-
78
- /**
79
- * Encodes the specified InitRequset message, length delimited. Does not implicitly {@link oidfetch.pb.InitRequset.verify|verify} messages.
80
- * @function encodeDelimited
81
- * @memberof oidfetch.pb.InitRequset
82
- * @static
83
- * @param {oidfetch.pb.IInitRequset} message InitRequset message or plain object to encode
84
- * @param {$protobuf.Writer} [writer] Writer to encode to
85
- * @returns {$protobuf.Writer} Writer
86
- */
87
- InitRequset.encodeDelimited = function encodeDelimited(message, writer) {
88
- return this.encode(message, writer).ldelim();
89
- };
90
-
91
- /**
92
- * Decodes an InitRequset message from the specified reader or buffer.
93
- * @function decode
94
- * @memberof oidfetch.pb.InitRequset
95
- * @static
96
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
97
- * @param {number} [length] Message length if known beforehand
98
- * @returns {oidfetch.pb.InitRequset} InitRequset
99
- * @throws {Error} If the payload is not a reader or valid buffer
100
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
101
- */
102
- InitRequset.decode = function decode(reader, length) {
103
- if (!(reader instanceof $Reader))
104
- reader = $Reader.create(reader);
105
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.oidfetch.pb.InitRequset();
106
- while (reader.pos < end) {
107
- let tag = reader.uint32();
108
- switch (tag >>> 3) {
109
- default:
110
- reader.skipType(tag & 7);
111
- break;
112
- }
113
- }
114
- return message;
115
- };
116
-
117
- /**
118
- * Decodes an InitRequset message from the specified reader or buffer, length delimited.
119
- * @function decodeDelimited
120
- * @memberof oidfetch.pb.InitRequset
121
- * @static
122
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
123
- * @returns {oidfetch.pb.InitRequset} InitRequset
124
- * @throws {Error} If the payload is not a reader or valid buffer
125
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
126
- */
127
- InitRequset.decodeDelimited = function decodeDelimited(reader) {
128
- if (!(reader instanceof $Reader))
129
- reader = new $Reader(reader);
130
- return this.decode(reader, reader.uint32());
131
- };
132
-
133
- /**
134
- * Verifies an InitRequset message.
135
- * @function verify
136
- * @memberof oidfetch.pb.InitRequset
137
- * @static
138
- * @param {Object.<string,*>} message Plain object to verify
139
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
140
- */
141
- InitRequset.verify = function verify(message) {
142
- if (typeof message !== "object" || message === null)
143
- return "object expected";
144
- return null;
145
- };
146
-
147
- /**
148
- * Creates an InitRequset message from a plain object. Also converts values to their respective internal types.
149
- * @function fromObject
150
- * @memberof oidfetch.pb.InitRequset
151
- * @static
152
- * @param {Object.<string,*>} object Plain object
153
- * @returns {oidfetch.pb.InitRequset} InitRequset
154
- */
155
- InitRequset.fromObject = function fromObject(object) {
156
- if (object instanceof $root.oidfetch.pb.InitRequset)
157
- return object;
158
- return new $root.oidfetch.pb.InitRequset();
159
- };
160
-
161
- /**
162
- * Creates a plain object from an InitRequset message. Also converts values to other types if specified.
163
- * @function toObject
164
- * @memberof oidfetch.pb.InitRequset
165
- * @static
166
- * @param {oidfetch.pb.InitRequset} message InitRequset
167
- * @param {$protobuf.IConversionOptions} [options] Conversion options
168
- * @returns {Object.<string,*>} Plain object
169
- */
170
- InitRequset.toObject = function toObject() {
171
- return {};
172
- };
173
-
174
- /**
175
- * Converts this InitRequset to JSON.
176
- * @function toJSON
177
- * @memberof oidfetch.pb.InitRequset
178
- * @instance
179
- * @returns {Object.<string,*>} JSON object
180
- */
181
- InitRequset.prototype.toJSON = function toJSON() {
182
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
183
- };
184
-
185
- /**
186
- * Gets the default type url for InitRequset
187
- * @function getTypeUrl
188
- * @memberof oidfetch.pb.InitRequset
189
- * @static
190
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
191
- * @returns {string} The default type url
192
- */
193
- InitRequset.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
194
- if (typeUrlPrefix === undefined) {
195
- typeUrlPrefix = "type.googleapis.com";
196
- }
197
- return typeUrlPrefix + "/oidfetch.pb.InitRequset";
198
- };
199
-
200
- return InitRequset;
201
- })();
202
-
203
- pb.InitReply = (function() {
204
-
205
- /**
206
- * Properties of an InitReply.
207
- * @memberof oidfetch.pb
208
- * @interface IInitReply
209
- * @property {number|null} [type] InitReply type
210
- * @property {Uint8Array|null} [oid] InitReply oid
211
- */
212
-
213
- /**
214
- * Constructs a new InitReply.
215
- * @memberof oidfetch.pb
216
- * @classdesc Represents an InitReply.
217
- * @implements IInitReply
218
- * @constructor
219
- * @param {oidfetch.pb.IInitReply=} [properties] Properties to set
220
- */
221
- function InitReply(properties) {
222
- if (properties)
223
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
224
- if (properties[keys[i]] != null)
225
- this[keys[i]] = properties[keys[i]];
226
- }
227
-
228
- /**
229
- * InitReply type.
230
- * @member {number} type
231
- * @memberof oidfetch.pb.InitReply
232
- * @instance
233
- */
234
- InitReply.prototype.type = 0;
235
-
236
- /**
237
- * InitReply oid.
238
- * @member {Uint8Array} oid
239
- * @memberof oidfetch.pb.InitReply
240
- * @instance
241
- */
242
- InitReply.prototype.oid = $util.newBuffer([]);
243
-
244
- /**
245
- * Creates a new InitReply instance using the specified properties.
246
- * @function create
247
- * @memberof oidfetch.pb.InitReply
248
- * @static
249
- * @param {oidfetch.pb.IInitReply=} [properties] Properties to set
250
- * @returns {oidfetch.pb.InitReply} InitReply instance
251
- */
252
- InitReply.create = function create(properties) {
253
- return new InitReply(properties);
254
- };
255
-
256
- /**
257
- * Encodes the specified InitReply message. Does not implicitly {@link oidfetch.pb.InitReply.verify|verify} messages.
258
- * @function encode
259
- * @memberof oidfetch.pb.InitReply
260
- * @static
261
- * @param {oidfetch.pb.IInitReply} message InitReply message or plain object to encode
262
- * @param {$protobuf.Writer} [writer] Writer to encode to
263
- * @returns {$protobuf.Writer} Writer
264
- */
265
- InitReply.encode = function encode(message, writer) {
266
- if (!writer)
267
- writer = $Writer.create();
268
- if (message.type != null && Object.hasOwnProperty.call(message, "type"))
269
- writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
270
- if (message.oid != null && Object.hasOwnProperty.call(message, "oid"))
271
- writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.oid);
272
- return writer;
273
- };
274
-
275
- /**
276
- * Encodes the specified InitReply message, length delimited. Does not implicitly {@link oidfetch.pb.InitReply.verify|verify} messages.
277
- * @function encodeDelimited
278
- * @memberof oidfetch.pb.InitReply
279
- * @static
280
- * @param {oidfetch.pb.IInitReply} message InitReply message or plain object to encode
281
- * @param {$protobuf.Writer} [writer] Writer to encode to
282
- * @returns {$protobuf.Writer} Writer
283
- */
284
- InitReply.encodeDelimited = function encodeDelimited(message, writer) {
285
- return this.encode(message, writer).ldelim();
286
- };
287
-
288
- /**
289
- * Decodes an InitReply message from the specified reader or buffer.
290
- * @function decode
291
- * @memberof oidfetch.pb.InitReply
292
- * @static
293
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
294
- * @param {number} [length] Message length if known beforehand
295
- * @returns {oidfetch.pb.InitReply} InitReply
296
- * @throws {Error} If the payload is not a reader or valid buffer
297
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
298
- */
299
- InitReply.decode = function decode(reader, length) {
300
- if (!(reader instanceof $Reader))
301
- reader = $Reader.create(reader);
302
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.oidfetch.pb.InitReply();
303
- while (reader.pos < end) {
304
- let tag = reader.uint32();
305
- switch (tag >>> 3) {
306
- case 1: {
307
- message.type = reader.int32();
308
- break;
309
- }
310
- case 2: {
311
- message.oid = reader.bytes();
312
- break;
313
- }
314
- default:
315
- reader.skipType(tag & 7);
316
- break;
317
- }
318
- }
319
- return message;
320
- };
321
-
322
- /**
323
- * Decodes an InitReply message from the specified reader or buffer, length delimited.
324
- * @function decodeDelimited
325
- * @memberof oidfetch.pb.InitReply
326
- * @static
327
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
328
- * @returns {oidfetch.pb.InitReply} InitReply
329
- * @throws {Error} If the payload is not a reader or valid buffer
330
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
331
- */
332
- InitReply.decodeDelimited = function decodeDelimited(reader) {
333
- if (!(reader instanceof $Reader))
334
- reader = new $Reader(reader);
335
- return this.decode(reader, reader.uint32());
336
- };
337
-
338
- /**
339
- * Verifies an InitReply message.
340
- * @function verify
341
- * @memberof oidfetch.pb.InitReply
342
- * @static
343
- * @param {Object.<string,*>} message Plain object to verify
344
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
345
- */
346
- InitReply.verify = function verify(message) {
347
- if (typeof message !== "object" || message === null)
348
- return "object expected";
349
- if (message.type != null && message.hasOwnProperty("type"))
350
- if (!$util.isInteger(message.type))
351
- return "type: integer expected";
352
- if (message.oid != null && message.hasOwnProperty("oid"))
353
- if (!(message.oid && typeof message.oid.length === "number" || $util.isString(message.oid)))
354
- return "oid: buffer expected";
355
- return null;
356
- };
357
-
358
- /**
359
- * Creates an InitReply message from a plain object. Also converts values to their respective internal types.
360
- * @function fromObject
361
- * @memberof oidfetch.pb.InitReply
362
- * @static
363
- * @param {Object.<string,*>} object Plain object
364
- * @returns {oidfetch.pb.InitReply} InitReply
365
- */
366
- InitReply.fromObject = function fromObject(object) {
367
- if (object instanceof $root.oidfetch.pb.InitReply)
368
- return object;
369
- let message = new $root.oidfetch.pb.InitReply();
370
- if (object.type != null)
371
- message.type = object.type | 0;
372
- if (object.oid != null)
373
- if (typeof object.oid === "string")
374
- $util.base64.decode(object.oid, message.oid = $util.newBuffer($util.base64.length(object.oid)), 0);
375
- else if (object.oid.length >= 0)
376
- message.oid = object.oid;
377
- return message;
378
- };
379
-
380
- /**
381
- * Creates a plain object from an InitReply message. Also converts values to other types if specified.
382
- * @function toObject
383
- * @memberof oidfetch.pb.InitReply
384
- * @static
385
- * @param {oidfetch.pb.InitReply} message InitReply
386
- * @param {$protobuf.IConversionOptions} [options] Conversion options
387
- * @returns {Object.<string,*>} Plain object
388
- */
389
- InitReply.toObject = function toObject(message, options) {
390
- if (!options)
391
- options = {};
392
- let object = {};
393
- if (options.defaults) {
394
- object.type = 0;
395
- if (options.bytes === String)
396
- object.oid = "";
397
- else {
398
- object.oid = [];
399
- if (options.bytes !== Array)
400
- object.oid = $util.newBuffer(object.oid);
401
- }
402
- }
403
- if (message.type != null && message.hasOwnProperty("type"))
404
- object.type = message.type;
405
- if (message.oid != null && message.hasOwnProperty("oid"))
406
- object.oid = options.bytes === String ? $util.base64.encode(message.oid, 0, message.oid.length) : options.bytes === Array ? Array.prototype.slice.call(message.oid) : message.oid;
407
- return object;
408
- };
409
-
410
- /**
411
- * Converts this InitReply to JSON.
412
- * @function toJSON
413
- * @memberof oidfetch.pb.InitReply
414
- * @instance
415
- * @returns {Object.<string,*>} JSON object
416
- */
417
- InitReply.prototype.toJSON = function toJSON() {
418
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
419
- };
420
-
421
- /**
422
- * Gets the default type url for InitReply
423
- * @function getTypeUrl
424
- * @memberof oidfetch.pb.InitReply
425
- * @static
426
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
427
- * @returns {string} The default type url
428
- */
429
- InitReply.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
430
- if (typeUrlPrefix === undefined) {
431
- typeUrlPrefix = "type.googleapis.com";
432
- }
433
- return typeUrlPrefix + "/oidfetch.pb.InitReply";
434
- };
435
-
436
- return InitReply;
437
- })();
438
-
439
- pb.FetchRequest = (function() {
440
-
441
- /**
442
- * Properties of a FetchRequest.
443
- * @memberof oidfetch.pb
444
- * @interface IFetchRequest
445
- * @property {Uint8Array|null} [cid] FetchRequest cid
446
- */
447
-
448
- /**
449
- * Constructs a new FetchRequest.
450
- * @memberof oidfetch.pb
451
- * @classdesc Represents a FetchRequest.
452
- * @implements IFetchRequest
453
- * @constructor
454
- * @param {oidfetch.pb.IFetchRequest=} [properties] Properties to set
455
- */
456
- function FetchRequest(properties) {
457
- if (properties)
458
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
459
- if (properties[keys[i]] != null)
460
- this[keys[i]] = properties[keys[i]];
461
- }
462
-
463
- /**
464
- * FetchRequest cid.
465
- * @member {Uint8Array} cid
466
- * @memberof oidfetch.pb.FetchRequest
467
- * @instance
468
- */
469
- FetchRequest.prototype.cid = $util.newBuffer([]);
470
-
471
- /**
472
- * Creates a new FetchRequest instance using the specified properties.
473
- * @function create
474
- * @memberof oidfetch.pb.FetchRequest
475
- * @static
476
- * @param {oidfetch.pb.IFetchRequest=} [properties] Properties to set
477
- * @returns {oidfetch.pb.FetchRequest} FetchRequest instance
478
- */
479
- FetchRequest.create = function create(properties) {
480
- return new FetchRequest(properties);
481
- };
482
-
483
- /**
484
- * Encodes the specified FetchRequest message. Does not implicitly {@link oidfetch.pb.FetchRequest.verify|verify} messages.
485
- * @function encode
486
- * @memberof oidfetch.pb.FetchRequest
487
- * @static
488
- * @param {oidfetch.pb.IFetchRequest} message FetchRequest message or plain object to encode
489
- * @param {$protobuf.Writer} [writer] Writer to encode to
490
- * @returns {$protobuf.Writer} Writer
491
- */
492
- FetchRequest.encode = function encode(message, writer) {
493
- if (!writer)
494
- writer = $Writer.create();
495
- if (message.cid != null && Object.hasOwnProperty.call(message, "cid"))
496
- writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.cid);
497
- return writer;
498
- };
499
-
500
- /**
501
- * Encodes the specified FetchRequest message, length delimited. Does not implicitly {@link oidfetch.pb.FetchRequest.verify|verify} messages.
502
- * @function encodeDelimited
503
- * @memberof oidfetch.pb.FetchRequest
504
- * @static
505
- * @param {oidfetch.pb.IFetchRequest} message FetchRequest message or plain object to encode
506
- * @param {$protobuf.Writer} [writer] Writer to encode to
507
- * @returns {$protobuf.Writer} Writer
508
- */
509
- FetchRequest.encodeDelimited = function encodeDelimited(message, writer) {
510
- return this.encode(message, writer).ldelim();
511
- };
512
-
513
- /**
514
- * Decodes a FetchRequest message from the specified reader or buffer.
515
- * @function decode
516
- * @memberof oidfetch.pb.FetchRequest
517
- * @static
518
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
519
- * @param {number} [length] Message length if known beforehand
520
- * @returns {oidfetch.pb.FetchRequest} FetchRequest
521
- * @throws {Error} If the payload is not a reader or valid buffer
522
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
523
- */
524
- FetchRequest.decode = function decode(reader, length) {
525
- if (!(reader instanceof $Reader))
526
- reader = $Reader.create(reader);
527
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.oidfetch.pb.FetchRequest();
528
- while (reader.pos < end) {
529
- let tag = reader.uint32();
530
- switch (tag >>> 3) {
531
- case 1: {
532
- message.cid = reader.bytes();
533
- break;
534
- }
535
- default:
536
- reader.skipType(tag & 7);
537
- break;
538
- }
539
- }
540
- return message;
541
- };
542
-
543
- /**
544
- * Decodes a FetchRequest message from the specified reader or buffer, length delimited.
545
- * @function decodeDelimited
546
- * @memberof oidfetch.pb.FetchRequest
547
- * @static
548
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
549
- * @returns {oidfetch.pb.FetchRequest} FetchRequest
550
- * @throws {Error} If the payload is not a reader or valid buffer
551
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
552
- */
553
- FetchRequest.decodeDelimited = function decodeDelimited(reader) {
554
- if (!(reader instanceof $Reader))
555
- reader = new $Reader(reader);
556
- return this.decode(reader, reader.uint32());
557
- };
558
-
559
- /**
560
- * Verifies a FetchRequest message.
561
- * @function verify
562
- * @memberof oidfetch.pb.FetchRequest
563
- * @static
564
- * @param {Object.<string,*>} message Plain object to verify
565
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
566
- */
567
- FetchRequest.verify = function verify(message) {
568
- if (typeof message !== "object" || message === null)
569
- return "object expected";
570
- if (message.cid != null && message.hasOwnProperty("cid"))
571
- if (!(message.cid && typeof message.cid.length === "number" || $util.isString(message.cid)))
572
- return "cid: buffer expected";
573
- return null;
574
- };
575
-
576
- /**
577
- * Creates a FetchRequest message from a plain object. Also converts values to their respective internal types.
578
- * @function fromObject
579
- * @memberof oidfetch.pb.FetchRequest
580
- * @static
581
- * @param {Object.<string,*>} object Plain object
582
- * @returns {oidfetch.pb.FetchRequest} FetchRequest
583
- */
584
- FetchRequest.fromObject = function fromObject(object) {
585
- if (object instanceof $root.oidfetch.pb.FetchRequest)
586
- return object;
587
- let message = new $root.oidfetch.pb.FetchRequest();
588
- if (object.cid != null)
589
- if (typeof object.cid === "string")
590
- $util.base64.decode(object.cid, message.cid = $util.newBuffer($util.base64.length(object.cid)), 0);
591
- else if (object.cid.length >= 0)
592
- message.cid = object.cid;
593
- return message;
594
- };
595
-
596
- /**
597
- * Creates a plain object from a FetchRequest message. Also converts values to other types if specified.
598
- * @function toObject
599
- * @memberof oidfetch.pb.FetchRequest
600
- * @static
601
- * @param {oidfetch.pb.FetchRequest} message FetchRequest
602
- * @param {$protobuf.IConversionOptions} [options] Conversion options
603
- * @returns {Object.<string,*>} Plain object
604
- */
605
- FetchRequest.toObject = function toObject(message, options) {
606
- if (!options)
607
- options = {};
608
- let object = {};
609
- if (options.defaults)
610
- if (options.bytes === String)
611
- object.cid = "";
612
- else {
613
- object.cid = [];
614
- if (options.bytes !== Array)
615
- object.cid = $util.newBuffer(object.cid);
616
- }
617
- if (message.cid != null && message.hasOwnProperty("cid"))
618
- object.cid = options.bytes === String ? $util.base64.encode(message.cid, 0, message.cid.length) : options.bytes === Array ? Array.prototype.slice.call(message.cid) : message.cid;
619
- return object;
620
- };
621
-
622
- /**
623
- * Converts this FetchRequest to JSON.
624
- * @function toJSON
625
- * @memberof oidfetch.pb.FetchRequest
626
- * @instance
627
- * @returns {Object.<string,*>} JSON object
628
- */
629
- FetchRequest.prototype.toJSON = function toJSON() {
630
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
631
- };
632
-
633
- /**
634
- * Gets the default type url for FetchRequest
635
- * @function getTypeUrl
636
- * @memberof oidfetch.pb.FetchRequest
637
- * @static
638
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
639
- * @returns {string} The default type url
640
- */
641
- FetchRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
642
- if (typeUrlPrefix === undefined) {
643
- typeUrlPrefix = "type.googleapis.com";
644
- }
645
- return typeUrlPrefix + "/oidfetch.pb.FetchRequest";
646
- };
647
-
648
- return FetchRequest;
649
- })();
650
-
651
- pb.FetchReply = (function() {
652
-
653
- /**
654
- * Properties of a FetchReply.
655
- * @memberof oidfetch.pb
656
- * @interface IFetchReply
657
- * @property {Uint8Array|null} [data] FetchReply data
658
- */
659
-
660
- /**
661
- * Constructs a new FetchReply.
662
- * @memberof oidfetch.pb
663
- * @classdesc Represents a FetchReply.
664
- * @implements IFetchReply
665
- * @constructor
666
- * @param {oidfetch.pb.IFetchReply=} [properties] Properties to set
667
- */
668
- function FetchReply(properties) {
669
- if (properties)
670
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
671
- if (properties[keys[i]] != null)
672
- this[keys[i]] = properties[keys[i]];
673
- }
674
-
675
- /**
676
- * FetchReply data.
677
- * @member {Uint8Array} data
678
- * @memberof oidfetch.pb.FetchReply
679
- * @instance
680
- */
681
- FetchReply.prototype.data = $util.newBuffer([]);
682
-
683
- /**
684
- * Creates a new FetchReply instance using the specified properties.
685
- * @function create
686
- * @memberof oidfetch.pb.FetchReply
687
- * @static
688
- * @param {oidfetch.pb.IFetchReply=} [properties] Properties to set
689
- * @returns {oidfetch.pb.FetchReply} FetchReply instance
690
- */
691
- FetchReply.create = function create(properties) {
692
- return new FetchReply(properties);
693
- };
694
-
695
- /**
696
- * Encodes the specified FetchReply message. Does not implicitly {@link oidfetch.pb.FetchReply.verify|verify} messages.
697
- * @function encode
698
- * @memberof oidfetch.pb.FetchReply
699
- * @static
700
- * @param {oidfetch.pb.IFetchReply} message FetchReply message or plain object to encode
701
- * @param {$protobuf.Writer} [writer] Writer to encode to
702
- * @returns {$protobuf.Writer} Writer
703
- */
704
- FetchReply.encode = function encode(message, writer) {
705
- if (!writer)
706
- writer = $Writer.create();
707
- if (message.data != null && Object.hasOwnProperty.call(message, "data"))
708
- writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data);
709
- return writer;
710
- };
711
-
712
- /**
713
- * Encodes the specified FetchReply message, length delimited. Does not implicitly {@link oidfetch.pb.FetchReply.verify|verify} messages.
714
- * @function encodeDelimited
715
- * @memberof oidfetch.pb.FetchReply
716
- * @static
717
- * @param {oidfetch.pb.IFetchReply} message FetchReply message or plain object to encode
718
- * @param {$protobuf.Writer} [writer] Writer to encode to
719
- * @returns {$protobuf.Writer} Writer
720
- */
721
- FetchReply.encodeDelimited = function encodeDelimited(message, writer) {
722
- return this.encode(message, writer).ldelim();
723
- };
724
-
725
- /**
726
- * Decodes a FetchReply message from the specified reader or buffer.
727
- * @function decode
728
- * @memberof oidfetch.pb.FetchReply
729
- * @static
730
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
731
- * @param {number} [length] Message length if known beforehand
732
- * @returns {oidfetch.pb.FetchReply} FetchReply
733
- * @throws {Error} If the payload is not a reader or valid buffer
734
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
735
- */
736
- FetchReply.decode = function decode(reader, length) {
737
- if (!(reader instanceof $Reader))
738
- reader = $Reader.create(reader);
739
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.oidfetch.pb.FetchReply();
740
- while (reader.pos < end) {
741
- let tag = reader.uint32();
742
- switch (tag >>> 3) {
743
- case 1: {
744
- message.data = reader.bytes();
745
- break;
746
- }
747
- default:
748
- reader.skipType(tag & 7);
749
- break;
750
- }
751
- }
752
- return message;
753
- };
754
-
755
- /**
756
- * Decodes a FetchReply message from the specified reader or buffer, length delimited.
757
- * @function decodeDelimited
758
- * @memberof oidfetch.pb.FetchReply
759
- * @static
760
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
761
- * @returns {oidfetch.pb.FetchReply} FetchReply
762
- * @throws {Error} If the payload is not a reader or valid buffer
763
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
764
- */
765
- FetchReply.decodeDelimited = function decodeDelimited(reader) {
766
- if (!(reader instanceof $Reader))
767
- reader = new $Reader(reader);
768
- return this.decode(reader, reader.uint32());
769
- };
770
-
771
- /**
772
- * Verifies a FetchReply message.
773
- * @function verify
774
- * @memberof oidfetch.pb.FetchReply
775
- * @static
776
- * @param {Object.<string,*>} message Plain object to verify
777
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
778
- */
779
- FetchReply.verify = function verify(message) {
780
- if (typeof message !== "object" || message === null)
781
- return "object expected";
782
- if (message.data != null && message.hasOwnProperty("data"))
783
- if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data)))
784
- return "data: buffer expected";
785
- return null;
786
- };
787
-
788
- /**
789
- * Creates a FetchReply message from a plain object. Also converts values to their respective internal types.
790
- * @function fromObject
791
- * @memberof oidfetch.pb.FetchReply
792
- * @static
793
- * @param {Object.<string,*>} object Plain object
794
- * @returns {oidfetch.pb.FetchReply} FetchReply
795
- */
796
- FetchReply.fromObject = function fromObject(object) {
797
- if (object instanceof $root.oidfetch.pb.FetchReply)
798
- return object;
799
- let message = new $root.oidfetch.pb.FetchReply();
800
- if (object.data != null)
801
- if (typeof object.data === "string")
802
- $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0);
803
- else if (object.data.length >= 0)
804
- message.data = object.data;
805
- return message;
806
- };
807
-
808
- /**
809
- * Creates a plain object from a FetchReply message. Also converts values to other types if specified.
810
- * @function toObject
811
- * @memberof oidfetch.pb.FetchReply
812
- * @static
813
- * @param {oidfetch.pb.FetchReply} message FetchReply
814
- * @param {$protobuf.IConversionOptions} [options] Conversion options
815
- * @returns {Object.<string,*>} Plain object
816
- */
817
- FetchReply.toObject = function toObject(message, options) {
818
- if (!options)
819
- options = {};
820
- let object = {};
821
- if (options.defaults)
822
- if (options.bytes === String)
823
- object.data = "";
824
- else {
825
- object.data = [];
826
- if (options.bytes !== Array)
827
- object.data = $util.newBuffer(object.data);
828
- }
829
- if (message.data != null && message.hasOwnProperty("data"))
830
- object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data;
831
- return object;
832
- };
833
-
834
- /**
835
- * Converts this FetchReply to JSON.
836
- * @function toJSON
837
- * @memberof oidfetch.pb.FetchReply
838
- * @instance
839
- * @returns {Object.<string,*>} JSON object
840
- */
841
- FetchReply.prototype.toJSON = function toJSON() {
842
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
843
- };
844
-
845
- /**
846
- * Gets the default type url for FetchReply
847
- * @function getTypeUrl
848
- * @memberof oidfetch.pb.FetchReply
849
- * @static
850
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
851
- * @returns {string} The default type url
852
- */
853
- FetchReply.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
854
- if (typeUrlPrefix === undefined) {
855
- typeUrlPrefix = "type.googleapis.com";
856
- }
857
- return typeUrlPrefix + "/oidfetch.pb.FetchReply";
858
- };
859
-
860
- return FetchReply;
861
- })();
862
-
863
- pb.ErrorInformRequest = (function() {
864
-
865
- /**
866
- * Properties of an ErrorInformRequest.
867
- * @memberof oidfetch.pb
868
- * @interface IErrorInformRequest
869
- * @property {string|null} [error] ErrorInformRequest error
870
- */
871
-
872
- /**
873
- * Constructs a new ErrorInformRequest.
874
- * @memberof oidfetch.pb
875
- * @classdesc Represents an ErrorInformRequest.
876
- * @implements IErrorInformRequest
877
- * @constructor
878
- * @param {oidfetch.pb.IErrorInformRequest=} [properties] Properties to set
879
- */
880
- function ErrorInformRequest(properties) {
881
- if (properties)
882
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
883
- if (properties[keys[i]] != null)
884
- this[keys[i]] = properties[keys[i]];
885
- }
886
-
887
- /**
888
- * ErrorInformRequest error.
889
- * @member {string} error
890
- * @memberof oidfetch.pb.ErrorInformRequest
891
- * @instance
892
- */
893
- ErrorInformRequest.prototype.error = "";
894
-
895
- /**
896
- * Creates a new ErrorInformRequest instance using the specified properties.
897
- * @function create
898
- * @memberof oidfetch.pb.ErrorInformRequest
899
- * @static
900
- * @param {oidfetch.pb.IErrorInformRequest=} [properties] Properties to set
901
- * @returns {oidfetch.pb.ErrorInformRequest} ErrorInformRequest instance
902
- */
903
- ErrorInformRequest.create = function create(properties) {
904
- return new ErrorInformRequest(properties);
905
- };
906
-
907
- /**
908
- * Encodes the specified ErrorInformRequest message. Does not implicitly {@link oidfetch.pb.ErrorInformRequest.verify|verify} messages.
909
- * @function encode
910
- * @memberof oidfetch.pb.ErrorInformRequest
911
- * @static
912
- * @param {oidfetch.pb.IErrorInformRequest} message ErrorInformRequest message or plain object to encode
913
- * @param {$protobuf.Writer} [writer] Writer to encode to
914
- * @returns {$protobuf.Writer} Writer
915
- */
916
- ErrorInformRequest.encode = function encode(message, writer) {
917
- if (!writer)
918
- writer = $Writer.create();
919
- if (message.error != null && Object.hasOwnProperty.call(message, "error"))
920
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.error);
921
- return writer;
922
- };
923
-
924
- /**
925
- * Encodes the specified ErrorInformRequest message, length delimited. Does not implicitly {@link oidfetch.pb.ErrorInformRequest.verify|verify} messages.
926
- * @function encodeDelimited
927
- * @memberof oidfetch.pb.ErrorInformRequest
928
- * @static
929
- * @param {oidfetch.pb.IErrorInformRequest} message ErrorInformRequest message or plain object to encode
930
- * @param {$protobuf.Writer} [writer] Writer to encode to
931
- * @returns {$protobuf.Writer} Writer
932
- */
933
- ErrorInformRequest.encodeDelimited = function encodeDelimited(message, writer) {
934
- return this.encode(message, writer).ldelim();
935
- };
936
-
937
- /**
938
- * Decodes an ErrorInformRequest message from the specified reader or buffer.
939
- * @function decode
940
- * @memberof oidfetch.pb.ErrorInformRequest
941
- * @static
942
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
943
- * @param {number} [length] Message length if known beforehand
944
- * @returns {oidfetch.pb.ErrorInformRequest} ErrorInformRequest
945
- * @throws {Error} If the payload is not a reader or valid buffer
946
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
947
- */
948
- ErrorInformRequest.decode = function decode(reader, length) {
949
- if (!(reader instanceof $Reader))
950
- reader = $Reader.create(reader);
951
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.oidfetch.pb.ErrorInformRequest();
952
- while (reader.pos < end) {
953
- let tag = reader.uint32();
954
- switch (tag >>> 3) {
955
- case 1: {
956
- message.error = reader.string();
957
- break;
958
- }
959
- default:
960
- reader.skipType(tag & 7);
961
- break;
962
- }
963
- }
964
- return message;
965
- };
966
-
967
- /**
968
- * Decodes an ErrorInformRequest message from the specified reader or buffer, length delimited.
969
- * @function decodeDelimited
970
- * @memberof oidfetch.pb.ErrorInformRequest
971
- * @static
972
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
973
- * @returns {oidfetch.pb.ErrorInformRequest} ErrorInformRequest
974
- * @throws {Error} If the payload is not a reader or valid buffer
975
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
976
- */
977
- ErrorInformRequest.decodeDelimited = function decodeDelimited(reader) {
978
- if (!(reader instanceof $Reader))
979
- reader = new $Reader(reader);
980
- return this.decode(reader, reader.uint32());
981
- };
982
-
983
- /**
984
- * Verifies an ErrorInformRequest message.
985
- * @function verify
986
- * @memberof oidfetch.pb.ErrorInformRequest
987
- * @static
988
- * @param {Object.<string,*>} message Plain object to verify
989
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
990
- */
991
- ErrorInformRequest.verify = function verify(message) {
992
- if (typeof message !== "object" || message === null)
993
- return "object expected";
994
- if (message.error != null && message.hasOwnProperty("error"))
995
- if (!$util.isString(message.error))
996
- return "error: string expected";
997
- return null;
998
- };
999
-
1000
- /**
1001
- * Creates an ErrorInformRequest message from a plain object. Also converts values to their respective internal types.
1002
- * @function fromObject
1003
- * @memberof oidfetch.pb.ErrorInformRequest
1004
- * @static
1005
- * @param {Object.<string,*>} object Plain object
1006
- * @returns {oidfetch.pb.ErrorInformRequest} ErrorInformRequest
1007
- */
1008
- ErrorInformRequest.fromObject = function fromObject(object) {
1009
- if (object instanceof $root.oidfetch.pb.ErrorInformRequest)
1010
- return object;
1011
- let message = new $root.oidfetch.pb.ErrorInformRequest();
1012
- if (object.error != null)
1013
- message.error = String(object.error);
1014
- return message;
1015
- };
1016
-
1017
- /**
1018
- * Creates a plain object from an ErrorInformRequest message. Also converts values to other types if specified.
1019
- * @function toObject
1020
- * @memberof oidfetch.pb.ErrorInformRequest
1021
- * @static
1022
- * @param {oidfetch.pb.ErrorInformRequest} message ErrorInformRequest
1023
- * @param {$protobuf.IConversionOptions} [options] Conversion options
1024
- * @returns {Object.<string,*>} Plain object
1025
- */
1026
- ErrorInformRequest.toObject = function toObject(message, options) {
1027
- if (!options)
1028
- options = {};
1029
- let object = {};
1030
- if (options.defaults)
1031
- object.error = "";
1032
- if (message.error != null && message.hasOwnProperty("error"))
1033
- object.error = message.error;
1034
- return object;
1035
- };
1036
-
1037
- /**
1038
- * Converts this ErrorInformRequest to JSON.
1039
- * @function toJSON
1040
- * @memberof oidfetch.pb.ErrorInformRequest
1041
- * @instance
1042
- * @returns {Object.<string,*>} JSON object
1043
- */
1044
- ErrorInformRequest.prototype.toJSON = function toJSON() {
1045
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1046
- };
1047
-
1048
- /**
1049
- * Gets the default type url for ErrorInformRequest
1050
- * @function getTypeUrl
1051
- * @memberof oidfetch.pb.ErrorInformRequest
1052
- * @static
1053
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1054
- * @returns {string} The default type url
1055
- */
1056
- ErrorInformRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1057
- if (typeUrlPrefix === undefined) {
1058
- typeUrlPrefix = "type.googleapis.com";
1059
- }
1060
- return typeUrlPrefix + "/oidfetch.pb.ErrorInformRequest";
1061
- };
1062
-
1063
- return ErrorInformRequest;
1064
- })();
1065
-
1066
- pb.ErrorInformReply = (function() {
1067
-
1068
- /**
1069
- * Properties of an ErrorInformReply.
1070
- * @memberof oidfetch.pb
1071
- * @interface IErrorInformReply
1072
- */
1073
-
1074
- /**
1075
- * Constructs a new ErrorInformReply.
1076
- * @memberof oidfetch.pb
1077
- * @classdesc Represents an ErrorInformReply.
1078
- * @implements IErrorInformReply
1079
- * @constructor
1080
- * @param {oidfetch.pb.IErrorInformReply=} [properties] Properties to set
1081
- */
1082
- function ErrorInformReply(properties) {
1083
- if (properties)
1084
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1085
- if (properties[keys[i]] != null)
1086
- this[keys[i]] = properties[keys[i]];
1087
- }
1088
-
1089
- /**
1090
- * Creates a new ErrorInformReply instance using the specified properties.
1091
- * @function create
1092
- * @memberof oidfetch.pb.ErrorInformReply
1093
- * @static
1094
- * @param {oidfetch.pb.IErrorInformReply=} [properties] Properties to set
1095
- * @returns {oidfetch.pb.ErrorInformReply} ErrorInformReply instance
1096
- */
1097
- ErrorInformReply.create = function create(properties) {
1098
- return new ErrorInformReply(properties);
1099
- };
1100
-
1101
- /**
1102
- * Encodes the specified ErrorInformReply message. Does not implicitly {@link oidfetch.pb.ErrorInformReply.verify|verify} messages.
1103
- * @function encode
1104
- * @memberof oidfetch.pb.ErrorInformReply
1105
- * @static
1106
- * @param {oidfetch.pb.IErrorInformReply} message ErrorInformReply message or plain object to encode
1107
- * @param {$protobuf.Writer} [writer] Writer to encode to
1108
- * @returns {$protobuf.Writer} Writer
1109
- */
1110
- ErrorInformReply.encode = function encode(message, writer) {
1111
- if (!writer)
1112
- writer = $Writer.create();
1113
- return writer;
1114
- };
1115
-
1116
- /**
1117
- * Encodes the specified ErrorInformReply message, length delimited. Does not implicitly {@link oidfetch.pb.ErrorInformReply.verify|verify} messages.
1118
- * @function encodeDelimited
1119
- * @memberof oidfetch.pb.ErrorInformReply
1120
- * @static
1121
- * @param {oidfetch.pb.IErrorInformReply} message ErrorInformReply message or plain object to encode
1122
- * @param {$protobuf.Writer} [writer] Writer to encode to
1123
- * @returns {$protobuf.Writer} Writer
1124
- */
1125
- ErrorInformReply.encodeDelimited = function encodeDelimited(message, writer) {
1126
- return this.encode(message, writer).ldelim();
1127
- };
1128
-
1129
- /**
1130
- * Decodes an ErrorInformReply message from the specified reader or buffer.
1131
- * @function decode
1132
- * @memberof oidfetch.pb.ErrorInformReply
1133
- * @static
1134
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1135
- * @param {number} [length] Message length if known beforehand
1136
- * @returns {oidfetch.pb.ErrorInformReply} ErrorInformReply
1137
- * @throws {Error} If the payload is not a reader or valid buffer
1138
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
1139
- */
1140
- ErrorInformReply.decode = function decode(reader, length) {
1141
- if (!(reader instanceof $Reader))
1142
- reader = $Reader.create(reader);
1143
- let end = length === undefined ? reader.len : reader.pos + length, message = new $root.oidfetch.pb.ErrorInformReply();
1144
- while (reader.pos < end) {
1145
- let tag = reader.uint32();
1146
- switch (tag >>> 3) {
1147
- default:
1148
- reader.skipType(tag & 7);
1149
- break;
1150
- }
1151
- }
1152
- return message;
1153
- };
1154
-
1155
- /**
1156
- * Decodes an ErrorInformReply message from the specified reader or buffer, length delimited.
1157
- * @function decodeDelimited
1158
- * @memberof oidfetch.pb.ErrorInformReply
1159
- * @static
1160
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1161
- * @returns {oidfetch.pb.ErrorInformReply} ErrorInformReply
1162
- * @throws {Error} If the payload is not a reader or valid buffer
1163
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
1164
- */
1165
- ErrorInformReply.decodeDelimited = function decodeDelimited(reader) {
1166
- if (!(reader instanceof $Reader))
1167
- reader = new $Reader(reader);
1168
- return this.decode(reader, reader.uint32());
1169
- };
1170
-
1171
- /**
1172
- * Verifies an ErrorInformReply message.
1173
- * @function verify
1174
- * @memberof oidfetch.pb.ErrorInformReply
1175
- * @static
1176
- * @param {Object.<string,*>} message Plain object to verify
1177
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
1178
- */
1179
- ErrorInformReply.verify = function verify(message) {
1180
- if (typeof message !== "object" || message === null)
1181
- return "object expected";
1182
- return null;
1183
- };
1184
-
1185
- /**
1186
- * Creates an ErrorInformReply message from a plain object. Also converts values to their respective internal types.
1187
- * @function fromObject
1188
- * @memberof oidfetch.pb.ErrorInformReply
1189
- * @static
1190
- * @param {Object.<string,*>} object Plain object
1191
- * @returns {oidfetch.pb.ErrorInformReply} ErrorInformReply
1192
- */
1193
- ErrorInformReply.fromObject = function fromObject(object) {
1194
- if (object instanceof $root.oidfetch.pb.ErrorInformReply)
1195
- return object;
1196
- return new $root.oidfetch.pb.ErrorInformReply();
1197
- };
1198
-
1199
- /**
1200
- * Creates a plain object from an ErrorInformReply message. Also converts values to other types if specified.
1201
- * @function toObject
1202
- * @memberof oidfetch.pb.ErrorInformReply
1203
- * @static
1204
- * @param {oidfetch.pb.ErrorInformReply} message ErrorInformReply
1205
- * @param {$protobuf.IConversionOptions} [options] Conversion options
1206
- * @returns {Object.<string,*>} Plain object
1207
- */
1208
- ErrorInformReply.toObject = function toObject() {
1209
- return {};
1210
- };
1211
-
1212
- /**
1213
- * Converts this ErrorInformReply to JSON.
1214
- * @function toJSON
1215
- * @memberof oidfetch.pb.ErrorInformReply
1216
- * @instance
1217
- * @returns {Object.<string,*>} JSON object
1218
- */
1219
- ErrorInformReply.prototype.toJSON = function toJSON() {
1220
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1221
- };
1222
-
1223
- /**
1224
- * Gets the default type url for ErrorInformReply
1225
- * @function getTypeUrl
1226
- * @memberof oidfetch.pb.ErrorInformReply
1227
- * @static
1228
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1229
- * @returns {string} The default type url
1230
- */
1231
- ErrorInformReply.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1232
- if (typeUrlPrefix === undefined) {
1233
- typeUrlPrefix = "type.googleapis.com";
1234
- }
1235
- return typeUrlPrefix + "/oidfetch.pb.ErrorInformReply";
1236
- };
1237
-
1238
- return ErrorInformReply;
1239
- })();
1240
-
1241
- return pb;
1242
- })();
1243
-
1244
- return oidfetch;
1245
- })();
1246
-
1247
- export { $root as default };