@milaboratories/pl-client 3.0.0 → 3.1.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 (198) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +12 -22
  2. package/dist/_virtual/_rolldown/runtime.js +6 -11
  3. package/dist/core/PromiseTracker.cjs +2 -3
  4. package/dist/core/PromiseTracker.cjs.map +1 -1
  5. package/dist/core/PromiseTracker.d.ts.map +1 -0
  6. package/dist/core/PromiseTracker.js +1 -2
  7. package/dist/core/PromiseTracker.js.map +1 -1
  8. package/dist/core/StatefulPromise.cjs +1 -2
  9. package/dist/core/StatefulPromise.cjs.map +1 -1
  10. package/dist/core/StatefulPromise.js +1 -1
  11. package/dist/core/StatefulPromise.js.map +1 -1
  12. package/dist/core/abstract_stream.d.ts.map +1 -0
  13. package/dist/core/advisory_locks.cjs +1 -2
  14. package/dist/core/advisory_locks.cjs.map +1 -1
  15. package/dist/core/advisory_locks.js +1 -1
  16. package/dist/core/advisory_locks.js.map +1 -1
  17. package/dist/core/auth.cjs +2 -3
  18. package/dist/core/auth.cjs.map +1 -1
  19. package/dist/core/auth.d.ts.map +1 -0
  20. package/dist/core/auth.js +1 -2
  21. package/dist/core/auth.js.map +1 -1
  22. package/dist/core/cache.d.ts.map +1 -0
  23. package/dist/core/client.cjs +63 -36
  24. package/dist/core/client.cjs.map +1 -1
  25. package/dist/core/client.d.ts +3 -1
  26. package/dist/core/client.d.ts.map +1 -0
  27. package/dist/core/client.js +54 -27
  28. package/dist/core/client.js.map +1 -1
  29. package/dist/core/config.cjs +16 -17
  30. package/dist/core/config.cjs.map +1 -1
  31. package/dist/core/config.d.ts.map +1 -0
  32. package/dist/core/config.js +16 -16
  33. package/dist/core/config.js.map +1 -1
  34. package/dist/core/default_client.cjs +6 -7
  35. package/dist/core/default_client.cjs.map +1 -1
  36. package/dist/core/default_client.d.ts.map +1 -0
  37. package/dist/core/default_client.js +1 -2
  38. package/dist/core/default_client.js.map +1 -1
  39. package/dist/core/driver.cjs +1 -2
  40. package/dist/core/driver.cjs.map +1 -1
  41. package/dist/core/driver.d.ts.map +1 -0
  42. package/dist/core/driver.js +1 -1
  43. package/dist/core/error_resource.cjs +1 -2
  44. package/dist/core/error_resource.cjs.map +1 -1
  45. package/dist/core/error_resource.js +1 -1
  46. package/dist/core/errors.cjs +11 -4
  47. package/dist/core/errors.cjs.map +1 -1
  48. package/dist/core/errors.d.ts +2 -1
  49. package/dist/core/errors.d.ts.map +1 -0
  50. package/dist/core/errors.js +9 -3
  51. package/dist/core/errors.js.map +1 -1
  52. package/dist/core/final.cjs +3 -4
  53. package/dist/core/final.cjs.map +1 -1
  54. package/dist/core/final.d.ts.map +1 -0
  55. package/dist/core/final.js +1 -2
  56. package/dist/core/final.js.map +1 -1
  57. package/dist/core/ll_client.cjs +24 -13
  58. package/dist/core/ll_client.cjs.map +1 -1
  59. package/dist/core/ll_client.d.ts +6 -1
  60. package/dist/core/ll_client.d.ts.map +1 -0
  61. package/dist/core/ll_client.js +13 -2
  62. package/dist/core/ll_client.js.map +1 -1
  63. package/dist/core/ll_transaction.cjs +4 -5
  64. package/dist/core/ll_transaction.cjs.map +1 -1
  65. package/dist/core/ll_transaction.d.ts.map +1 -0
  66. package/dist/core/ll_transaction.js +1 -2
  67. package/dist/core/ll_transaction.js.map +1 -1
  68. package/dist/core/stat.cjs +1 -2
  69. package/dist/core/stat.cjs.map +1 -1
  70. package/dist/core/stat.d.ts.map +1 -0
  71. package/dist/core/stat.js +1 -1
  72. package/dist/core/transaction.cjs +30 -19
  73. package/dist/core/transaction.cjs.map +1 -1
  74. package/dist/core/transaction.d.ts.map +1 -0
  75. package/dist/core/transaction.js +21 -10
  76. package/dist/core/transaction.js.map +1 -1
  77. package/dist/core/type_conversion.cjs +7 -8
  78. package/dist/core/type_conversion.cjs.map +1 -1
  79. package/dist/core/type_conversion.js +3 -4
  80. package/dist/core/type_conversion.js.map +1 -1
  81. package/dist/core/types.cjs +3 -4
  82. package/dist/core/types.cjs.map +1 -1
  83. package/dist/core/types.d.ts.map +1 -0
  84. package/dist/core/types.js +2 -3
  85. package/dist/core/types.js.map +1 -1
  86. package/dist/core/unauth_client.cjs +4 -5
  87. package/dist/core/unauth_client.cjs.map +1 -1
  88. package/dist/core/unauth_client.d.ts.map +1 -0
  89. package/dist/core/unauth_client.js +1 -2
  90. package/dist/core/unauth_client.js.map +1 -1
  91. package/dist/core/websocket_stream.cjs +4 -5
  92. package/dist/core/websocket_stream.cjs.map +1 -1
  93. package/dist/core/websocket_stream.js +1 -2
  94. package/dist/core/websocket_stream.js.map +1 -1
  95. package/dist/core/wire.d.ts.map +1 -0
  96. package/dist/helpers/pl.cjs +12 -14
  97. package/dist/helpers/pl.cjs.map +1 -1
  98. package/dist/helpers/pl.d.ts.map +1 -0
  99. package/dist/helpers/pl.js +5 -7
  100. package/dist/helpers/pl.js.map +1 -1
  101. package/dist/helpers/poll.cjs +3 -4
  102. package/dist/helpers/poll.cjs.map +1 -1
  103. package/dist/helpers/poll.d.ts.map +1 -0
  104. package/dist/helpers/poll.js +1 -2
  105. package/dist/helpers/poll.js.map +1 -1
  106. package/dist/helpers/retry_strategy.cjs +1 -2
  107. package/dist/helpers/retry_strategy.cjs.map +1 -1
  108. package/dist/helpers/retry_strategy.js +1 -1
  109. package/dist/helpers/retry_strategy.js.map +1 -1
  110. package/dist/helpers/tx_helpers.cjs +3 -4
  111. package/dist/helpers/tx_helpers.cjs.map +1 -1
  112. package/dist/helpers/tx_helpers.d.ts.map +1 -0
  113. package/dist/helpers/tx_helpers.js +1 -2
  114. package/dist/helpers/tx_helpers.js.map +1 -1
  115. package/dist/index.cjs +34 -34
  116. package/dist/index.d.ts +2 -2
  117. package/dist/index.js +2 -3
  118. package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.cjs +3 -4
  119. package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.cjs.map +1 -1
  120. package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.d.ts.map +1 -0
  121. package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.js +1 -2
  122. package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.js.map +1 -1
  123. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs +115 -421
  124. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs.map +1 -1
  125. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.cjs +3 -4
  126. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.cjs.map +1 -1
  127. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts +4 -4
  128. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts.map +1 -0
  129. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.js +1 -2
  130. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.js.map +1 -1
  131. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +1 -0
  132. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js +108 -414
  133. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js.map +1 -1
  134. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.cjs +5 -6
  135. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.cjs.map +1 -1
  136. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts.map +1 -0
  137. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.js +1 -2
  138. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.js.map +1 -1
  139. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.cjs +2 -3
  140. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.cjs.map +1 -1
  141. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts.map +1 -0
  142. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.js +1 -2
  143. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.js.map +1 -1
  144. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.cjs +6 -16
  145. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.cjs.map +1 -1
  146. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts.map +1 -0
  147. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.js +4 -14
  148. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.js.map +1 -1
  149. package/dist/proto-grpc/google/protobuf/any.cjs +2 -3
  150. package/dist/proto-grpc/google/protobuf/any.cjs.map +1 -1
  151. package/dist/proto-grpc/google/protobuf/any.d.ts.map +1 -0
  152. package/dist/proto-grpc/google/protobuf/any.js +1 -2
  153. package/dist/proto-grpc/google/protobuf/any.js.map +1 -1
  154. package/dist/proto-grpc/google/protobuf/duration.cjs +2 -3
  155. package/dist/proto-grpc/google/protobuf/duration.cjs.map +1 -1
  156. package/dist/proto-grpc/google/protobuf/duration.d.ts.map +1 -0
  157. package/dist/proto-grpc/google/protobuf/duration.js +1 -2
  158. package/dist/proto-grpc/google/protobuf/duration.js.map +1 -1
  159. package/dist/proto-grpc/google/protobuf/timestamp.cjs +2 -3
  160. package/dist/proto-grpc/google/protobuf/timestamp.cjs.map +1 -1
  161. package/dist/proto-grpc/google/protobuf/timestamp.d.ts.map +1 -0
  162. package/dist/proto-grpc/google/protobuf/timestamp.js +1 -2
  163. package/dist/proto-grpc/google/protobuf/timestamp.js.map +1 -1
  164. package/dist/proto-grpc/google/rpc/code.cjs +1 -2
  165. package/dist/proto-grpc/google/rpc/code.cjs.map +1 -1
  166. package/dist/proto-grpc/google/rpc/code.d.ts.map +1 -0
  167. package/dist/proto-grpc/google/rpc/code.js +1 -1
  168. package/dist/proto-grpc/google/rpc/code.js.map +1 -1
  169. package/dist/proto-rest/index.cjs +8 -9
  170. package/dist/proto-rest/index.cjs.map +1 -1
  171. package/dist/proto-rest/index.d.ts.map +1 -0
  172. package/dist/proto-rest/index.js +1 -2
  173. package/dist/proto-rest/index.js.map +1 -1
  174. package/dist/proto-rest/plapi.d.ts.map +1 -0
  175. package/dist/test/tcp-proxy.cjs +2 -3
  176. package/dist/test/tcp-proxy.cjs.map +1 -1
  177. package/dist/test/tcp-proxy.d.ts.map +1 -0
  178. package/dist/test/tcp-proxy.js +1 -2
  179. package/dist/test/tcp-proxy.js.map +1 -1
  180. package/dist/test/test_config.cjs +16 -19
  181. package/dist/test/test_config.cjs.map +1 -1
  182. package/dist/test/test_config.d.ts.map +1 -0
  183. package/dist/test/test_config.js +3 -6
  184. package/dist/test/test_config.js.map +1 -1
  185. package/dist/util/pl.cjs +1 -2
  186. package/dist/util/pl.cjs.map +1 -1
  187. package/dist/util/pl.js +1 -1
  188. package/dist/util/util.cjs +1 -2
  189. package/dist/util/util.cjs.map +1 -1
  190. package/dist/util/util.js +1 -1
  191. package/package.json +8 -8
  192. package/src/core/client.ts +80 -30
  193. package/src/core/errors.ts +11 -0
  194. package/src/core/ll_client.test.ts +8 -0
  195. package/src/core/ll_client.ts +22 -1
  196. package/src/core/ll_transaction.test.ts +12 -2
  197. package/src/core/transaction.ts +8 -2
  198. package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts +4 -0
@@ -1 +1 @@
1
- {"version":3,"file":"duration.js","names":[],"sources":["../../../../src/proto-grpc/google/protobuf/duration.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"google/protobuf/duration.proto\" (package \"google.protobuf\", syntax proto3)\n// tslint:disable\n//\n// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\nimport type { BinaryWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryWriter } from \"@protobuf-ts/runtime\";\nimport { WireType } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryReader } from \"@protobuf-ts/runtime\";\nimport { UnknownFieldHandler } from \"@protobuf-ts/runtime\";\nimport type { PartialMessage } from \"@protobuf-ts/runtime\";\nimport { reflectionMergePartial } from \"@protobuf-ts/runtime\";\nimport { typeofJsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonReadOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport { PbLong } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * A Duration represents a signed, fixed-length span of time represented\n * as a count of seconds and fractions of seconds at nanosecond\n * resolution. It is independent of any calendar and concepts like \"day\"\n * or \"month\". It is related to Timestamp in that the difference between\n * two Timestamp values is a Duration and it can be added or subtracted\n * from a Timestamp. Range is approximately +-10,000 years.\n *\n * # Examples\n *\n * Example 1: Compute Duration from two Timestamps in pseudo code.\n *\n * Timestamp start = ...;\n * Timestamp end = ...;\n * Duration duration = ...;\n *\n * duration.seconds = end.seconds - start.seconds;\n * duration.nanos = end.nanos - start.nanos;\n *\n * if (duration.seconds < 0 && duration.nanos > 0) {\n * duration.seconds += 1;\n * duration.nanos -= 1000000000;\n * } else if (duration.seconds > 0 && duration.nanos < 0) {\n * duration.seconds -= 1;\n * duration.nanos += 1000000000;\n * }\n *\n * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n *\n * Timestamp start = ...;\n * Duration duration = ...;\n * Timestamp end = ...;\n *\n * end.seconds = start.seconds + duration.seconds;\n * end.nanos = start.nanos + duration.nanos;\n *\n * if (end.nanos < 0) {\n * end.seconds -= 1;\n * end.nanos += 1000000000;\n * } else if (end.nanos >= 1000000000) {\n * end.seconds += 1;\n * end.nanos -= 1000000000;\n * }\n *\n * Example 3: Compute Duration from datetime.timedelta in Python.\n *\n * td = datetime.timedelta(days=3, minutes=10)\n * duration = Duration()\n * duration.FromTimedelta(td)\n *\n * # JSON Mapping\n *\n * In JSON format, the Duration type is encoded as a string rather than an\n * object, where the string ends in the suffix \"s\" (indicating seconds) and\n * is preceded by the number of seconds, with nanoseconds expressed as\n * fractional seconds. For example, 3 seconds with 0 nanoseconds should be\n * encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should\n * be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1\n * microsecond should be expressed in JSON format as \"3.000001s\".\n *\n *\n * @generated from protobuf message google.protobuf.Duration\n */\nexport interface Duration {\n /**\n * Signed seconds of the span of time. Must be from -315,576,000,000\n * to +315,576,000,000 inclusive. Note: these bounds are computed from:\n * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years\n *\n * @generated from protobuf field: int64 seconds = 1\n */\n seconds: bigint;\n /**\n * Signed fractions of a second at nanosecond resolution of the span\n * of time. Durations less than one second are represented with a 0\n * `seconds` field and a positive or negative `nanos` field. For durations\n * of one second or more, a non-zero value for the `nanos` field must be\n * of the same sign as the `seconds` field. Must be from -999,999,999\n * to +999,999,999 inclusive.\n *\n * @generated from protobuf field: int32 nanos = 2\n */\n nanos: number;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Duration$Type extends MessageType<Duration> {\n constructor() {\n super(\"google.protobuf.Duration\", [\n { no: 1, name: \"seconds\", kind: \"scalar\", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },\n { no: 2, name: \"nanos\", kind: \"scalar\", T: 5 /*ScalarType.INT32*/ }\n ]);\n }\n /**\n * Encode `Duration` to JSON string like \"3.000001s\".\n */\n internalJsonWrite(message: Duration, options: JsonWriteOptions): JsonValue {\n let s = PbLong.from(message.seconds).toNumber();\n if (s > 315576000000 || s < -315576000000)\n throw new Error(\"Duration value out of range.\");\n let text = message.seconds.toString();\n if (s === 0 && message.nanos < 0)\n text = \"-\" + text;\n if (message.nanos !== 0) {\n let nanosStr = Math.abs(message.nanos).toString();\n nanosStr = \"0\".repeat(9 - nanosStr.length) + nanosStr;\n if (nanosStr.substring(3) === \"000000\")\n nanosStr = nanosStr.substring(0, 3);\n else if (nanosStr.substring(6) === \"000\")\n nanosStr = nanosStr.substring(0, 6);\n text += \".\" + nanosStr;\n }\n return text + \"s\";\n }\n /**\n * Decode `Duration` from JSON string like \"3.000001s\"\n */\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Duration): Duration {\n if (typeof json !== \"string\")\n throw new Error(\"Unable to parse Duration from JSON \" + typeofJsonValue(json) + \". Expected string.\");\n let match = json.match(/^(-?)([0-9]+)(?:\\.([0-9]+))?s/);\n if (match === null)\n throw new Error(\"Unable to parse Duration from JSON string. Invalid format.\");\n if (!target)\n target = this.create();\n let [, sign, secs, nanos] = match;\n let longSeconds = PbLong.from(sign + secs);\n if (longSeconds.toNumber() > 315576000000 || longSeconds.toNumber() < -315576000000)\n throw new Error(\"Unable to parse Duration from JSON string. Value out of range.\");\n target.seconds = longSeconds.toBigInt();\n if (typeof nanos == \"string\") {\n let nanosStr = sign + nanos + \"0\".repeat(9 - nanos.length);\n target.nanos = parseInt(nanosStr);\n }\n return target;\n }\n create(value?: PartialMessage<Duration>): Duration {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.seconds = 0n;\n message.nanos = 0;\n if (value !== undefined)\n reflectionMergePartial<Duration>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Duration): Duration {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* int64 seconds */ 1:\n message.seconds = reader.int64().toBigInt();\n break;\n case /* int32 nanos */ 2:\n message.nanos = reader.int32();\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: Duration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* int64 seconds = 1; */\n if (message.seconds !== 0n)\n writer.tag(1, WireType.Varint).int64(message.seconds);\n /* int32 nanos = 2; */\n if (message.nanos !== 0)\n writer.tag(2, WireType.Varint).int32(message.nanos);\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Duration\n */\nexport const Duration = new Duration$Type();\n"],"mappings":";;;AAqIA,IAAM,gBAAN,cAA4B,YAAsB;CAC9C,cAAc;AACV,QAAM,4BAA4B,CAC9B;GAAE,IAAI;GAAG,MAAM;GAAW,MAAM;GAAU,GAAG;GAAwB,GAAG;GAAuB,EAC/F;GAAE,IAAI;GAAG,MAAM;GAAS,MAAM;GAAU,GAAG;GAAwB,CACtE,CAAC;;;;;CAKN,kBAAkB,SAAmB,SAAsC;EACvE,IAAI,IAAI,OAAO,KAAK,QAAQ,QAAQ,CAAC,UAAU;AAC/C,MAAI,IAAI,YAAgB,IAAI,UACxB,OAAM,IAAI,MAAM,+BAA+B;EACnD,IAAI,OAAO,QAAQ,QAAQ,UAAU;AACrC,MAAI,MAAM,KAAK,QAAQ,QAAQ,EAC3B,QAAO,MAAM;AACjB,MAAI,QAAQ,UAAU,GAAG;GACrB,IAAI,WAAW,KAAK,IAAI,QAAQ,MAAM,CAAC,UAAU;AACjD,cAAW,IAAI,OAAO,IAAI,SAAS,OAAO,GAAG;AAC7C,OAAI,SAAS,UAAU,EAAE,KAAK,SAC1B,YAAW,SAAS,UAAU,GAAG,EAAE;YAC9B,SAAS,UAAU,EAAE,KAAK,MAC/B,YAAW,SAAS,UAAU,GAAG,EAAE;AACvC,WAAQ,MAAM;;AAElB,SAAO,OAAO;;;;;CAKlB,iBAAiB,MAAiB,SAA0B,QAA6B;AACrF,MAAI,OAAO,SAAS,SAChB,OAAM,IAAI,MAAM,wCAAwC,gBAAgB,KAAK,GAAG,qBAAqB;EACzG,IAAI,QAAQ,KAAK,MAAM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B,SAA4C;AAEtG,MAAI,QAAQ,YAAY,GACpB,QAAO,IAAI,GAAG,SAAS,OAAO,CAAC,MAAM,QAAQ,QAAQ;AAEzD,MAAI,QAAQ,UAAU,EAClB,QAAO,IAAI,GAAG,SAAS,OAAO,CAAC,MAAM,QAAQ,MAAM;EACvD,IAAI,IAAI,QAAQ;AAChB,MAAI,MAAM,MACN,EAAC,KAAK,OAAO,oBAAoB,UAAU,GAAG,KAAK,UAAU,SAAS,OAAO;AACjF,SAAO;;;;;;AAMf,MAAa,WAAW,IAAI,eAAe"}
1
+ {"version":3,"file":"duration.js","names":[],"sources":["../../../../src/proto-grpc/google/protobuf/duration.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"google/protobuf/duration.proto\" (package \"google.protobuf\", syntax proto3)\n// tslint:disable\n//\n// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\nimport type { BinaryWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryWriter } from \"@protobuf-ts/runtime\";\nimport { WireType } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryReader } from \"@protobuf-ts/runtime\";\nimport { UnknownFieldHandler } from \"@protobuf-ts/runtime\";\nimport type { PartialMessage } from \"@protobuf-ts/runtime\";\nimport { reflectionMergePartial } from \"@protobuf-ts/runtime\";\nimport { typeofJsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonReadOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport { PbLong } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * A Duration represents a signed, fixed-length span of time represented\n * as a count of seconds and fractions of seconds at nanosecond\n * resolution. It is independent of any calendar and concepts like \"day\"\n * or \"month\". It is related to Timestamp in that the difference between\n * two Timestamp values is a Duration and it can be added or subtracted\n * from a Timestamp. Range is approximately +-10,000 years.\n *\n * # Examples\n *\n * Example 1: Compute Duration from two Timestamps in pseudo code.\n *\n * Timestamp start = ...;\n * Timestamp end = ...;\n * Duration duration = ...;\n *\n * duration.seconds = end.seconds - start.seconds;\n * duration.nanos = end.nanos - start.nanos;\n *\n * if (duration.seconds < 0 && duration.nanos > 0) {\n * duration.seconds += 1;\n * duration.nanos -= 1000000000;\n * } else if (duration.seconds > 0 && duration.nanos < 0) {\n * duration.seconds -= 1;\n * duration.nanos += 1000000000;\n * }\n *\n * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n *\n * Timestamp start = ...;\n * Duration duration = ...;\n * Timestamp end = ...;\n *\n * end.seconds = start.seconds + duration.seconds;\n * end.nanos = start.nanos + duration.nanos;\n *\n * if (end.nanos < 0) {\n * end.seconds -= 1;\n * end.nanos += 1000000000;\n * } else if (end.nanos >= 1000000000) {\n * end.seconds += 1;\n * end.nanos -= 1000000000;\n * }\n *\n * Example 3: Compute Duration from datetime.timedelta in Python.\n *\n * td = datetime.timedelta(days=3, minutes=10)\n * duration = Duration()\n * duration.FromTimedelta(td)\n *\n * # JSON Mapping\n *\n * In JSON format, the Duration type is encoded as a string rather than an\n * object, where the string ends in the suffix \"s\" (indicating seconds) and\n * is preceded by the number of seconds, with nanoseconds expressed as\n * fractional seconds. For example, 3 seconds with 0 nanoseconds should be\n * encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should\n * be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1\n * microsecond should be expressed in JSON format as \"3.000001s\".\n *\n *\n * @generated from protobuf message google.protobuf.Duration\n */\nexport interface Duration {\n /**\n * Signed seconds of the span of time. Must be from -315,576,000,000\n * to +315,576,000,000 inclusive. Note: these bounds are computed from:\n * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years\n *\n * @generated from protobuf field: int64 seconds = 1\n */\n seconds: bigint;\n /**\n * Signed fractions of a second at nanosecond resolution of the span\n * of time. Durations less than one second are represented with a 0\n * `seconds` field and a positive or negative `nanos` field. For durations\n * of one second or more, a non-zero value for the `nanos` field must be\n * of the same sign as the `seconds` field. Must be from -999,999,999\n * to +999,999,999 inclusive.\n *\n * @generated from protobuf field: int32 nanos = 2\n */\n nanos: number;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Duration$Type extends MessageType<Duration> {\n constructor() {\n super(\"google.protobuf.Duration\", [\n { no: 1, name: \"seconds\", kind: \"scalar\", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },\n { no: 2, name: \"nanos\", kind: \"scalar\", T: 5 /*ScalarType.INT32*/ }\n ]);\n }\n /**\n * Encode `Duration` to JSON string like \"3.000001s\".\n */\n internalJsonWrite(message: Duration, options: JsonWriteOptions): JsonValue {\n let s = PbLong.from(message.seconds).toNumber();\n if (s > 315576000000 || s < -315576000000)\n throw new Error(\"Duration value out of range.\");\n let text = message.seconds.toString();\n if (s === 0 && message.nanos < 0)\n text = \"-\" + text;\n if (message.nanos !== 0) {\n let nanosStr = Math.abs(message.nanos).toString();\n nanosStr = \"0\".repeat(9 - nanosStr.length) + nanosStr;\n if (nanosStr.substring(3) === \"000000\")\n nanosStr = nanosStr.substring(0, 3);\n else if (nanosStr.substring(6) === \"000\")\n nanosStr = nanosStr.substring(0, 6);\n text += \".\" + nanosStr;\n }\n return text + \"s\";\n }\n /**\n * Decode `Duration` from JSON string like \"3.000001s\"\n */\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Duration): Duration {\n if (typeof json !== \"string\")\n throw new Error(\"Unable to parse Duration from JSON \" + typeofJsonValue(json) + \". Expected string.\");\n let match = json.match(/^(-?)([0-9]+)(?:\\.([0-9]+))?s/);\n if (match === null)\n throw new Error(\"Unable to parse Duration from JSON string. Invalid format.\");\n if (!target)\n target = this.create();\n let [, sign, secs, nanos] = match;\n let longSeconds = PbLong.from(sign + secs);\n if (longSeconds.toNumber() > 315576000000 || longSeconds.toNumber() < -315576000000)\n throw new Error(\"Unable to parse Duration from JSON string. Value out of range.\");\n target.seconds = longSeconds.toBigInt();\n if (typeof nanos == \"string\") {\n let nanosStr = sign + nanos + \"0\".repeat(9 - nanos.length);\n target.nanos = parseInt(nanosStr);\n }\n return target;\n }\n create(value?: PartialMessage<Duration>): Duration {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.seconds = 0n;\n message.nanos = 0;\n if (value !== undefined)\n reflectionMergePartial<Duration>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Duration): Duration {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* int64 seconds */ 1:\n message.seconds = reader.int64().toBigInt();\n break;\n case /* int32 nanos */ 2:\n message.nanos = reader.int32();\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: Duration, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* int64 seconds = 1; */\n if (message.seconds !== 0n)\n writer.tag(1, WireType.Varint).int64(message.seconds);\n /* int32 nanos = 2; */\n if (message.nanos !== 0)\n writer.tag(2, WireType.Varint).int32(message.nanos);\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Duration\n */\nexport const Duration = new Duration$Type();\n"],"mappings":";;AAqIA,IAAM,gBAAN,cAA4B,YAAsB;CAC9C,cAAc;AACV,QAAM,4BAA4B,CAC9B;GAAE,IAAI;GAAG,MAAM;GAAW,MAAM;GAAU,GAAG;GAAwB,GAAG;GAAuB,EAC/F;GAAE,IAAI;GAAG,MAAM;GAAS,MAAM;GAAU,GAAG;GAAwB,CACtE,CAAC;;;;;CAKN,kBAAkB,SAAmB,SAAsC;EACvE,IAAI,IAAI,OAAO,KAAK,QAAQ,QAAQ,CAAC,UAAU;AAC/C,MAAI,IAAI,YAAgB,IAAI,UACxB,OAAM,IAAI,MAAM,+BAA+B;EACnD,I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/G,IAAI,UAAU,UAAU,KAAK,QAAQ,EAAE,MAAM,OAAO,MAAM;AAC1D,SAAO,OAAO,MAAM,KAAK;GACrB,IAAI,CAAC,SAAS,YAAY,OAAO,KAAK;AACtC,WAAQ,SAAR;IACI,KAAyB;AACrB,aAAQ,UAAU,OAAO,OAAO,CAAC,UAAU;AAC3C;IACJ,KAAuB;AACnB,aAAQ,QAAQ,OAAO,OAAO;AAC9B;IACJ;KACI,IAAI,IAAI,QAAQ;AAChB,SAAI,MAAM,QACN,OAAM,IAAI,WAAW,MAAM,iBAAiB,QAAQ,cAAc,SAAS,QAAQ,KAAK,WAAW;KACvG,IAAI,IAAI,OAAO,KAAK,SAAS;AAC7B,SAAI,MAAM,MACN,EAAC,MAAM,OAAO,oBAAoB,SAAS,GAAG,KAAK,UAAU,SAAS,SAAS,UAAU,EAAE;;;AAG3G,SAAO;;CAEX,oBAAoB,SAAmB,QAAuB,SAA4C;AAEtG,MAAI,QAAQ,YAAY,GACpB,QAAO,IAAI,GAAG,SAAS,OAAO,CAAC,MAAM,QAAQ,QAAQ;AAEzD,MAAI,QAAQ,UAAU,EAClB,QAAO,IAAI,GAAG,SAAS,OAAO,CAAC,MAAM,QAAQ,MAAM;EACvD,IAAI,IAAI,QAAQ;AAChB,MAAI,MAAM,MACN,EAAC,KAAK,OAAO,oBAAoB,UAAU,GAAG,KAAK,UAAU,SAAS,OAAO;AACjF,SAAO;;;;;;AAMf,MAAa,WAAW,IAAI,eAAe"}
@@ -1,6 +1,5 @@
1
- const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
1
+ require("../../../_virtual/_rolldown/runtime.cjs");
2
2
  let _protobuf_ts_runtime = require("@protobuf-ts/runtime");
3
-
4
3
  //#region src/proto-grpc/google/protobuf/timestamp.ts
5
4
  var Timestamp$Type = class extends _protobuf_ts_runtime.MessageType {
6
5
  constructor() {
@@ -116,7 +115,7 @@ var Timestamp$Type = class extends _protobuf_ts_runtime.MessageType {
116
115
  * @generated MessageType for protobuf message google.protobuf.Timestamp
117
116
  */
118
117
  const Timestamp = new Timestamp$Type();
119
-
120
118
  //#endregion
121
119
  exports.Timestamp = Timestamp;
120
+
122
121
  //# sourceMappingURL=timestamp.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"timestamp.cjs","names":["MessageType","PbLong","UnknownFieldHandler","WireType"],"sources":["../../../../src/proto-grpc/google/protobuf/timestamp.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"google/protobuf/timestamp.proto\" (package \"google.protobuf\", syntax proto3)\n// tslint:disable\n//\n// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\nimport type { BinaryWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryWriter } from \"@protobuf-ts/runtime\";\nimport { WireType } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryReader } from \"@protobuf-ts/runtime\";\nimport { UnknownFieldHandler } from \"@protobuf-ts/runtime\";\nimport type { PartialMessage } from \"@protobuf-ts/runtime\";\nimport { reflectionMergePartial } from \"@protobuf-ts/runtime\";\nimport { typeofJsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonReadOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport { PbLong } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * A Timestamp represents a point in time independent of any time zone or local\n * calendar, encoded as a count of seconds and fractions of seconds at\n * nanosecond resolution. The count is relative to an epoch at UTC midnight on\n * January 1, 1970, in the proleptic Gregorian calendar which extends the\n * Gregorian calendar backwards to year one.\n *\n * All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n * second table is needed for interpretation, using a [24-hour linear\n * smear](https://developers.google.com/time/smear).\n *\n * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n * restricting to that range, we ensure that we can convert to and from [RFC\n * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n *\n * # Examples\n *\n * Example 1: Compute Timestamp from POSIX `time()`.\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(time(NULL));\n * timestamp.set_nanos(0);\n *\n * Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n *\n * struct timeval tv;\n * gettimeofday(&tv, NULL);\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(tv.tv_sec);\n * timestamp.set_nanos(tv.tv_usec * 1000);\n *\n * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n *\n * FILETIME ft;\n * GetSystemTimeAsFileTime(&ft);\n * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n *\n * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n * Timestamp timestamp;\n * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n *\n * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n *\n * long millis = System.currentTimeMillis();\n *\n * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n * .setNanos((int) ((millis % 1000) * 1000000)).build();\n *\n * Example 5: Compute Timestamp from Java `Instant.now()`.\n *\n * Instant now = Instant.now();\n *\n * Timestamp timestamp =\n * Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n * .setNanos(now.getNano()).build();\n *\n * Example 6: Compute Timestamp from current time in Python.\n *\n * timestamp = Timestamp()\n * timestamp.GetCurrentTime()\n *\n * # JSON Mapping\n *\n * In JSON format, the Timestamp type is encoded as a string in the\n * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n * format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n * where {year} is always expressed using four digits while {month}, {day},\n * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n * are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n * is required. A proto3 JSON serializer should always use UTC (as indicated by\n * \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n * able to accept both UTC and other timezones (as indicated by an offset).\n *\n * For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n * 01:30 UTC on January 15, 2017.\n *\n * In JavaScript, one can convert a Date object to this format using the\n * standard\n * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n * method. In Python, a standard `datetime.datetime` object can be converted\n * to this format using\n * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n * the Joda Time's [`ISODateTimeFormat.dateTime()`](\n * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n * ) to obtain a formatter capable of generating timestamps in this format.\n *\n *\n * @generated from protobuf message google.protobuf.Timestamp\n */\nexport interface Timestamp {\n /**\n * Represents seconds of UTC time since Unix epoch\n * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n * 9999-12-31T23:59:59Z inclusive.\n *\n * @generated from protobuf field: int64 seconds = 1\n */\n seconds: bigint;\n /**\n * Non-negative fractions of a second at nanosecond resolution. Negative\n * second values with fractions must still have non-negative nanos values\n * that count forward in time. Must be from 0 to 999,999,999\n * inclusive.\n *\n * @generated from protobuf field: int32 nanos = 2\n */\n nanos: number;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Timestamp$Type extends MessageType<Timestamp> {\n constructor() {\n super(\"google.protobuf.Timestamp\", [\n { no: 1, name: \"seconds\", kind: \"scalar\", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },\n { no: 2, name: \"nanos\", kind: \"scalar\", T: 5 /*ScalarType.INT32*/ }\n ]);\n }\n /**\n * Creates a new `Timestamp` for the current time.\n */\n now(): Timestamp {\n const msg = this.create();\n const ms = Date.now();\n msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n msg.nanos = (ms % 1000) * 1000000;\n return msg;\n }\n /**\n * Converts a `Timestamp` to a JavaScript Date.\n */\n toDate(message: Timestamp): Date {\n return new Date(PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000));\n }\n /**\n * Converts a JavaScript Date to a `Timestamp`.\n */\n fromDate(date: Date): Timestamp {\n const msg = this.create();\n const ms = date.getTime();\n msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n msg.nanos = ((ms % 1000) + (ms < 0 && ms % 1000 !== 0 ? 1000 : 0)) * 1000000;\n return msg;\n }\n /**\n * In JSON format, the `Timestamp` type is encoded as a string\n * in the RFC 3339 format.\n */\n internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue {\n let ms = PbLong.from(message.seconds).toNumber() * 1000;\n if (ms < Date.parse(\"0001-01-01T00:00:00Z\") || ms > Date.parse(\"9999-12-31T23:59:59Z\"))\n throw new Error(\"Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\");\n if (message.nanos < 0)\n throw new Error(\"Unable to encode invalid Timestamp to JSON. Nanos must not be negative.\");\n let z = \"Z\";\n if (message.nanos > 0) {\n let nanosStr = (message.nanos + 1000000000).toString().substring(1);\n if (nanosStr.substring(3) === \"000000\")\n z = \".\" + nanosStr.substring(0, 3) + \"Z\";\n else if (nanosStr.substring(6) === \"000\")\n z = \".\" + nanosStr.substring(0, 6) + \"Z\";\n else\n z = \".\" + nanosStr + \"Z\";\n }\n return new Date(ms).toISOString().replace(\".000Z\", z);\n }\n /**\n * In JSON format, the `Timestamp` type is encoded as a string\n * in the RFC 3339 format.\n */\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp {\n if (typeof json !== \"string\")\n throw new Error(\"Unable to parse Timestamp from JSON \" + typeofJsonValue(json) + \".\");\n let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);\n if (!matches)\n throw new Error(\"Unable to parse Timestamp from JSON. Invalid format.\");\n let ms = Date.parse(matches[1] + \"-\" + matches[2] + \"-\" + matches[3] + \"T\" + matches[4] + \":\" + matches[5] + \":\" + matches[6] + (matches[8] ? matches[8] : \"Z\"));\n if (Number.isNaN(ms))\n throw new Error(\"Unable to parse Timestamp from JSON. Invalid value.\");\n if (ms < Date.parse(\"0001-01-01T00:00:00Z\") || ms > Date.parse(\"9999-12-31T23:59:59Z\"))\n throw new globalThis.Error(\"Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\");\n if (!target)\n target = this.create();\n target.seconds = PbLong.from(ms / 1000).toBigInt();\n target.nanos = 0;\n if (matches[7])\n target.nanos = (parseInt(\"1\" + matches[7] + \"0\".repeat(9 - matches[7].length)) - 1000000000);\n return target;\n }\n create(value?: PartialMessage<Timestamp>): Timestamp {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.seconds = 0n;\n message.nanos = 0;\n if (value !== undefined)\n reflectionMergePartial<Timestamp>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* int64 seconds */ 1:\n message.seconds = reader.int64().toBigInt();\n break;\n case /* int32 nanos */ 2:\n message.nanos = reader.int32();\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* int64 seconds = 1; */\n if (message.seconds !== 0n)\n writer.tag(1, WireType.Varint).int64(message.seconds);\n /* int32 nanos = 2; */\n if (message.nanos !== 0)\n writer.tag(2, WireType.Varint).int32(message.nanos);\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Timestamp\n */\nexport const Timestamp = new Timestamp$Type();\n"],"mappings":";;;;AAkKA,IAAM,iBAAN,cAA6BA,iCAAuB;CAChD,cAAc;AACV,QAAM,6BAA6B,CAC/B;GAAE,IAAI;GAAG,MAAM;GAAW,MAAM;GAAU,GAAG;GAAwB,GAAG;GAAuB,EAC/F;GAAE,IAAI;GAAG,MAAM;GAAS,MAAM;GAAU,GAAG;GAAwB,CACtE,CAAC;;;;;CAKN,MAAiB;EACb,MAAM,MAAM,KAAK,QAAQ;EACzB,MAAM,KAAK,KAAK,KAAK;AACrB,MAAI,UAAUC,4BAAO,KAAK,KAAK,MAAM,KAAK,IAAK,CAAC,CAAC,UAAU;AAC3D,MAAI,QAAS,KAAK,MAAQ;AAC1B,SAAO;;;;;CAKX,OAAO,SAA0B;AAC7B,SAAO,IAAI,KAAKA,4BAAO,KAAK,QAAQ,QAAQ,CAAC,UAAU,GAAG,MAAO,KAAK,KAAK,QAAQ,QAAQ,IAAQ,CAAC;;;;;CAKxG,SAAS,MAAuB;EAC5B,MAAM,MAAM,KAAK,QAAQ;EACzB,MAAM,KAAK,KAAK,SAAS;AACzB,MAAI,UAAUA,4BAAO,KAAK,KAAK,MAAM,KAAK,IAAK,CAAC,CAAC,UAAU;AAC3D,MAAI,SAAU,KAAK,OAAS,KAAK,KAAK,KAAK,QAAS,IAAI,MAAO,MAAM;AACrE,SAAO;;;;;;CAMX,kBAAkB,SAAoB,SAAsC;EACxE,IAAI,KAAKA,4BAAO,KAAK,QAAQ,QAAQ,CAAC,UAAU,GAAG;AACnD,MAAI,KAAK,KAAK,MAAM,uBAAuB,IAAI,KAAK,KAAK,MAAM,uBAAuB,CAClF,OAAM,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../../../../src/proto-grpc/google/protobuf/timestamp.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"google/protobuf/timestamp.proto\" (package \"google.protobuf\", syntax proto3)\n// tslint:disable\n//\n// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\nimport type { BinaryWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryWriter } from \"@protobuf-ts/runtime\";\nimport { WireType } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryReader } from \"@protobuf-ts/runtime\";\nimport { UnknownFieldHandler } from \"@protobuf-ts/runtime\";\nimport type { PartialMessage } from \"@protobuf-ts/runtime\";\nimport { reflectionMergePartial } from \"@protobuf-ts/runtime\";\nimport { typeofJsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonReadOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport { PbLong } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * A Timestamp represents a point in time independent of any time zone or local\n * calendar, encoded as a count of seconds and fractions of seconds at\n * nanosecond resolution. The count is relative to an epoch at UTC midnight on\n * January 1, 1970, in the proleptic Gregorian calendar which extends the\n * Gregorian calendar backwards to year one.\n *\n * All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n * second table is needed for interpretation, using a [24-hour linear\n * smear](https://developers.google.com/time/smear).\n *\n * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n * restricting to that range, we ensure that we can convert to and from [RFC\n * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n *\n * # Examples\n *\n * Example 1: Compute Timestamp from POSIX `time()`.\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(time(NULL));\n * timestamp.set_nanos(0);\n *\n * Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n *\n * struct timeval tv;\n * gettimeofday(&tv, NULL);\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(tv.tv_sec);\n * timestamp.set_nanos(tv.tv_usec * 1000);\n *\n * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n *\n * FILETIME ft;\n * GetSystemTimeAsFileTime(&ft);\n * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n *\n * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n * Timestamp timestamp;\n * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n *\n * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n *\n * long millis = System.currentTimeMillis();\n *\n * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n * .setNanos((int) ((millis % 1000) * 1000000)).build();\n *\n * Example 5: Compute Timestamp from Java `Instant.now()`.\n *\n * Instant now = Instant.now();\n *\n * Timestamp timestamp =\n * Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n * .setNanos(now.getNano()).build();\n *\n * Example 6: Compute Timestamp from current time in Python.\n *\n * timestamp = Timestamp()\n * timestamp.GetCurrentTime()\n *\n * # JSON Mapping\n *\n * In JSON format, the Timestamp type is encoded as a string in the\n * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n * format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n * where {year} is always expressed using four digits while {month}, {day},\n * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n * are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n * is required. A proto3 JSON serializer should always use UTC (as indicated by\n * \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n * able to accept both UTC and other timezones (as indicated by an offset).\n *\n * For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n * 01:30 UTC on January 15, 2017.\n *\n * In JavaScript, one can convert a Date object to this format using the\n * standard\n * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n * method. In Python, a standard `datetime.datetime` object can be converted\n * to this format using\n * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n * the Joda Time's [`ISODateTimeFormat.dateTime()`](\n * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n * ) to obtain a formatter capable of generating timestamps in this format.\n *\n *\n * @generated from protobuf message google.protobuf.Timestamp\n */\nexport interface Timestamp {\n /**\n * Represents seconds of UTC time since Unix epoch\n * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n * 9999-12-31T23:59:59Z inclusive.\n *\n * @generated from protobuf field: int64 seconds = 1\n */\n seconds: bigint;\n /**\n * Non-negative fractions of a second at nanosecond resolution. Negative\n * second values with fractions must still have non-negative nanos values\n * that count forward in time. Must be from 0 to 999,999,999\n * inclusive.\n *\n * @generated from protobuf field: int32 nanos = 2\n */\n nanos: number;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Timestamp$Type extends MessageType<Timestamp> {\n constructor() {\n super(\"google.protobuf.Timestamp\", [\n { no: 1, name: \"seconds\", kind: \"scalar\", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },\n { no: 2, name: \"nanos\", kind: \"scalar\", T: 5 /*ScalarType.INT32*/ }\n ]);\n }\n /**\n * Creates a new `Timestamp` for the current time.\n */\n now(): Timestamp {\n const msg = this.create();\n const ms = Date.now();\n msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n msg.nanos = (ms % 1000) * 1000000;\n return msg;\n }\n /**\n * Converts a `Timestamp` to a JavaScript Date.\n */\n toDate(message: Timestamp): Date {\n return new Date(PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000));\n }\n /**\n * Converts a JavaScript Date to a `Timestamp`.\n */\n fromDate(date: Date): Timestamp {\n const msg = this.create();\n const ms = date.getTime();\n msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n msg.nanos = ((ms % 1000) + (ms < 0 && ms % 1000 !== 0 ? 1000 : 0)) * 1000000;\n return msg;\n }\n /**\n * In JSON format, the `Timestamp` type is encoded as a string\n * in the RFC 3339 format.\n */\n internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue {\n let ms = PbLong.from(message.seconds).toNumber() * 1000;\n if (ms < Date.parse(\"0001-01-01T00:00:00Z\") || ms > Date.parse(\"9999-12-31T23:59:59Z\"))\n throw new Error(\"Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\");\n if (message.nanos < 0)\n throw new Error(\"Unable to encode invalid Timestamp to JSON. Nanos must not be negative.\");\n let z = \"Z\";\n if (message.nanos > 0) {\n let nanosStr = (message.nanos + 1000000000).toString().substring(1);\n if (nanosStr.substring(3) === \"000000\")\n z = \".\" + nanosStr.substring(0, 3) + \"Z\";\n else if (nanosStr.substring(6) === \"000\")\n z = \".\" + nanosStr.substring(0, 6) + \"Z\";\n else\n z = \".\" + nanosStr + \"Z\";\n }\n return new Date(ms).toISOString().replace(\".000Z\", z);\n }\n /**\n * In JSON format, the `Timestamp` type is encoded as a string\n * in the RFC 3339 format.\n */\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp {\n if (typeof json !== \"string\")\n throw new Error(\"Unable to parse Timestamp from JSON \" + typeofJsonValue(json) + \".\");\n let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);\n if (!matches)\n throw new Error(\"Unable to parse Timestamp from JSON. Invalid format.\");\n let ms = Date.parse(matches[1] + \"-\" + matches[2] + \"-\" + matches[3] + \"T\" + matches[4] + \":\" + matches[5] + \":\" + matches[6] + (matches[8] ? matches[8] : \"Z\"));\n if (Number.isNaN(ms))\n throw new Error(\"Unable to parse Timestamp from JSON. Invalid value.\");\n if (ms < Date.parse(\"0001-01-01T00:00:00Z\") || ms > Date.parse(\"9999-12-31T23:59:59Z\"))\n throw new globalThis.Error(\"Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\");\n if (!target)\n target = this.create();\n target.seconds = PbLong.from(ms / 1000).toBigInt();\n target.nanos = 0;\n if (matches[7])\n target.nanos = (parseInt(\"1\" + matches[7] + \"0\".repeat(9 - matches[7].length)) - 1000000000);\n return target;\n }\n create(value?: PartialMessage<Timestamp>): Timestamp {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.seconds = 0n;\n message.nanos = 0;\n if (value !== undefined)\n reflectionMergePartial<Timestamp>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* int64 seconds */ 1:\n message.seconds = reader.int64().toBigInt();\n break;\n case /* int32 nanos */ 2:\n message.nanos = reader.int32();\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* int64 seconds = 1; */\n if (message.seconds !== 0n)\n writer.tag(1, WireType.Varint).int64(message.seconds);\n /* int32 nanos = 2; */\n if (message.nanos !== 0)\n writer.tag(2, WireType.Varint).int32(message.nanos);\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Timestamp\n */\nexport const Timestamp = new Timest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;;;;;;;;;;;;;;;;;;;;;;;;AA8RA;;;;;;;;;;;;;;UAhJiB,SAAA;;;;;;;;EAQb,OAAA;;;;;;;;;EASA,KAAA;AAAA;AAAA,cAGE,cAAA,SAAuB,WAAA,CAAY,SAAA;;;;;EAUrC,GAAA,CAAA,GAAO,SAAA;;;;EAUP,MAAA,CAAO,OAAA,EAAS,SAAA,GAAY,IAAA;;;;EAM5B,QAAA,CAAS,IAAA,EAAM,IAAA,GAAO,SAAA;;;;;EAWtB,iBAAA,CAAkB,OAAA,EAAS,SAAA,EAAW,OAAA,EAAS,gBAAA,GAAmB,SAAA;;;;;EAsBlE,gBAAA,CAAiB,IAAA,EAAM,SAAA,EAAW,OAAA,EAAS,eAAA,EAAiB,MAAA,GAAS,SAAA,GAAY,SAAA;EAmBjF,MAAA,CAAO,KAAA,GAAQ,cAAA,CAAe,SAAA,IAAa,SAAA;EAQ3C,kBAAA,CAAmB,MAAA,EAAQ,aAAA,EAAe,MAAA,UAAgB,OAAA,EAAS,iBAAA,EAAmB,MAAA,GAAS,SAAA,GAAY,SAAA;EAsB3G,mBAAA,CAAoB,OAAA,EAAS,SAAA,EAAW,MAAA,EAAQ,aAAA,EAAe,OAAA,EAAS,kBAAA,GAAqB,aAAA;AAAA;;;;cAgBpF,SAAA,EAAS,cAAA"}
@@ -1,5 +1,4 @@
1
1
  import { MessageType, PbLong, UnknownFieldHandler, WireType, reflectionMergePartial, typeofJsonValue } from "@protobuf-ts/runtime";
2
-
3
2
  //#region src/proto-grpc/google/protobuf/timestamp.ts
4
3
  var Timestamp$Type = class extends MessageType {
5
4
  constructor() {
@@ -115,7 +114,7 @@ var Timestamp$Type = class extends MessageType {
115
114
  * @generated MessageType for protobuf message google.protobuf.Timestamp
116
115
  */
117
116
  const Timestamp = new Timestamp$Type();
118
-
119
117
  //#endregion
120
118
  export { Timestamp };
119
+
121
120
  //# sourceMappingURL=timestamp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"timestamp.js","names":[],"sources":["../../../../src/proto-grpc/google/protobuf/timestamp.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"google/protobuf/timestamp.proto\" (package \"google.protobuf\", syntax proto3)\n// tslint:disable\n//\n// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\nimport type { BinaryWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryWriter } from \"@protobuf-ts/runtime\";\nimport { WireType } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryReader } from \"@protobuf-ts/runtime\";\nimport { UnknownFieldHandler } from \"@protobuf-ts/runtime\";\nimport type { PartialMessage } from \"@protobuf-ts/runtime\";\nimport { reflectionMergePartial } from \"@protobuf-ts/runtime\";\nimport { typeofJsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonReadOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport { PbLong } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * A Timestamp represents a point in time independent of any time zone or local\n * calendar, encoded as a count of seconds and fractions of seconds at\n * nanosecond resolution. The count is relative to an epoch at UTC midnight on\n * January 1, 1970, in the proleptic Gregorian calendar which extends the\n * Gregorian calendar backwards to year one.\n *\n * All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n * second table is needed for interpretation, using a [24-hour linear\n * smear](https://developers.google.com/time/smear).\n *\n * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n * restricting to that range, we ensure that we can convert to and from [RFC\n * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n *\n * # Examples\n *\n * Example 1: Compute Timestamp from POSIX `time()`.\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(time(NULL));\n * timestamp.set_nanos(0);\n *\n * Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n *\n * struct timeval tv;\n * gettimeofday(&tv, NULL);\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(tv.tv_sec);\n * timestamp.set_nanos(tv.tv_usec * 1000);\n *\n * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n *\n * FILETIME ft;\n * GetSystemTimeAsFileTime(&ft);\n * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n *\n * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n * Timestamp timestamp;\n * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n *\n * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n *\n * long millis = System.currentTimeMillis();\n *\n * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n * .setNanos((int) ((millis % 1000) * 1000000)).build();\n *\n * Example 5: Compute Timestamp from Java `Instant.now()`.\n *\n * Instant now = Instant.now();\n *\n * Timestamp timestamp =\n * Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n * .setNanos(now.getNano()).build();\n *\n * Example 6: Compute Timestamp from current time in Python.\n *\n * timestamp = Timestamp()\n * timestamp.GetCurrentTime()\n *\n * # JSON Mapping\n *\n * In JSON format, the Timestamp type is encoded as a string in the\n * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n * format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n * where {year} is always expressed using four digits while {month}, {day},\n * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n * are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n * is required. A proto3 JSON serializer should always use UTC (as indicated by\n * \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n * able to accept both UTC and other timezones (as indicated by an offset).\n *\n * For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n * 01:30 UTC on January 15, 2017.\n *\n * In JavaScript, one can convert a Date object to this format using the\n * standard\n * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n * method. In Python, a standard `datetime.datetime` object can be converted\n * to this format using\n * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n * the Joda Time's [`ISODateTimeFormat.dateTime()`](\n * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n * ) to obtain a formatter capable of generating timestamps in this format.\n *\n *\n * @generated from protobuf message google.protobuf.Timestamp\n */\nexport interface Timestamp {\n /**\n * Represents seconds of UTC time since Unix epoch\n * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n * 9999-12-31T23:59:59Z inclusive.\n *\n * @generated from protobuf field: int64 seconds = 1\n */\n seconds: bigint;\n /**\n * Non-negative fractions of a second at nanosecond resolution. Negative\n * second values with fractions must still have non-negative nanos values\n * that count forward in time. Must be from 0 to 999,999,999\n * inclusive.\n *\n * @generated from protobuf field: int32 nanos = 2\n */\n nanos: number;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Timestamp$Type extends MessageType<Timestamp> {\n constructor() {\n super(\"google.protobuf.Timestamp\", [\n { no: 1, name: \"seconds\", kind: \"scalar\", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },\n { no: 2, name: \"nanos\", kind: \"scalar\", T: 5 /*ScalarType.INT32*/ }\n ]);\n }\n /**\n * Creates a new `Timestamp` for the current time.\n */\n now(): Timestamp {\n const msg = this.create();\n const ms = Date.now();\n msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n msg.nanos = (ms % 1000) * 1000000;\n return msg;\n }\n /**\n * Converts a `Timestamp` to a JavaScript Date.\n */\n toDate(message: Timestamp): Date {\n return new Date(PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000));\n }\n /**\n * Converts a JavaScript Date to a `Timestamp`.\n */\n fromDate(date: Date): Timestamp {\n const msg = this.create();\n const ms = date.getTime();\n msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n msg.nanos = ((ms % 1000) + (ms < 0 && ms % 1000 !== 0 ? 1000 : 0)) * 1000000;\n return msg;\n }\n /**\n * In JSON format, the `Timestamp` type is encoded as a string\n * in the RFC 3339 format.\n */\n internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue {\n let ms = PbLong.from(message.seconds).toNumber() * 1000;\n if (ms < Date.parse(\"0001-01-01T00:00:00Z\") || ms > Date.parse(\"9999-12-31T23:59:59Z\"))\n throw new Error(\"Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\");\n if (message.nanos < 0)\n throw new Error(\"Unable to encode invalid Timestamp to JSON. Nanos must not be negative.\");\n let z = \"Z\";\n if (message.nanos > 0) {\n let nanosStr = (message.nanos + 1000000000).toString().substring(1);\n if (nanosStr.substring(3) === \"000000\")\n z = \".\" + nanosStr.substring(0, 3) + \"Z\";\n else if (nanosStr.substring(6) === \"000\")\n z = \".\" + nanosStr.substring(0, 6) + \"Z\";\n else\n z = \".\" + nanosStr + \"Z\";\n }\n return new Date(ms).toISOString().replace(\".000Z\", z);\n }\n /**\n * In JSON format, the `Timestamp` type is encoded as a string\n * in the RFC 3339 format.\n */\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp {\n if (typeof json !== \"string\")\n throw new Error(\"Unable to parse Timestamp from JSON \" + typeofJsonValue(json) + \".\");\n let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);\n if (!matches)\n throw new Error(\"Unable to parse Timestamp from JSON. Invalid format.\");\n let ms = Date.parse(matches[1] + \"-\" + matches[2] + \"-\" + matches[3] + \"T\" + matches[4] + \":\" + matches[5] + \":\" + matches[6] + (matches[8] ? matches[8] : \"Z\"));\n if (Number.isNaN(ms))\n throw new Error(\"Unable to parse Timestamp from JSON. Invalid value.\");\n if (ms < Date.parse(\"0001-01-01T00:00:00Z\") || ms > Date.parse(\"9999-12-31T23:59:59Z\"))\n throw new globalThis.Error(\"Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\");\n if (!target)\n target = this.create();\n target.seconds = PbLong.from(ms / 1000).toBigInt();\n target.nanos = 0;\n if (matches[7])\n target.nanos = (parseInt(\"1\" + matches[7] + \"0\".repeat(9 - matches[7].length)) - 1000000000);\n return target;\n }\n create(value?: PartialMessage<Timestamp>): Timestamp {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.seconds = 0n;\n message.nanos = 0;\n if (value !== undefined)\n reflectionMergePartial<Timestamp>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* int64 seconds */ 1:\n message.seconds = reader.int64().toBigInt();\n break;\n case /* int32 nanos */ 2:\n message.nanos = reader.int32();\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* int64 seconds = 1; */\n if (message.seconds !== 0n)\n writer.tag(1, WireType.Varint).int64(message.seconds);\n /* int32 nanos = 2; */\n if (message.nanos !== 0)\n writer.tag(2, WireType.Varint).int32(message.nanos);\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Timestamp\n */\nexport const Timestamp = new Tim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B,QAA+B;EACjH,IAAI,UAAU,UAAU,KAAK,QAAQ,EAAE,MAAM,OAAO,MAAM;AAC1D,SAAO,OAAO,MAAM,KAAK;GACrB,IAAI,CAAC,SAAS,YAAY,OAAO,KAAK;AACtC,WAAQ,SAAR;IACI,KAAyB;AACrB,aAAQ,UAAU,OAAO,OAAO,CAAC,UAAU;AAC3C;IACJ,KAAuB;AACnB,aAAQ,QAAQ,OAAO,OAAO;AAC9B;IACJ;KACI,IAAI,IAAI,QAAQ;AAChB,SAAI,MAAM,QACN,OAAM,IAAI,WAAW,MAAM,iBAAiB,QAAQ,cAAc,SAAS,QAAQ,KAAK,WAAW;KACvG,IAAI,IAAI,OAAO,KAAK,SAAS;AAC7B,SAAI,MAAM,MACN,EAAC,MAAM,OAAO,oBAAoB,SAAS,GAAG,KAAK,UAAU,SAAS,SAAS,UAAU,EAAE;;;AAG3G,SAAO;;CAEX,oBAAoB,SAAoB,QAAuB,SAA4C;AAEvG,MAAI,QAAQ,YAAY,GACpB,QAAO,IAAI,GAAG,SAAS,OAAO,CAAC,MAAM,QAAQ,QAAQ;AAEzD,MAAI,QAAQ,UAAU,EAClB,QAAO,IAAI,GAAG,SAAS,OAAO,CAAC,MAAM,QAAQ,MAAM;EACvD,IAAI,IAAI,QAAQ;AAChB,MAAI,MAAM,MACN,EAAC,KAAK,OAAO,oBAAoB,UAAU,GAAG,KAAK,UAAU,SAAS,OAAO;AACjF,SAAO;;;;;;AAMf,MAAa,YAAY,IAAI,gBAAgB"}
1
+ {"version":3,"file":"timestamp.js","names":[],"sources":["../../../../src/proto-grpc/google/protobuf/timestamp.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"google/protobuf/timestamp.proto\" (package \"google.protobuf\", syntax proto3)\n// tslint:disable\n//\n// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\nimport type { BinaryWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryWriter } from \"@protobuf-ts/runtime\";\nimport { WireType } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryReader } from \"@protobuf-ts/runtime\";\nimport { UnknownFieldHandler } from \"@protobuf-ts/runtime\";\nimport type { PartialMessage } from \"@protobuf-ts/runtime\";\nimport { reflectionMergePartial } from \"@protobuf-ts/runtime\";\nimport { typeofJsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonReadOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport { PbLong } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * A Timestamp represents a point in time independent of any time zone or local\n * calendar, encoded as a count of seconds and fractions of seconds at\n * nanosecond resolution. The count is relative to an epoch at UTC midnight on\n * January 1, 1970, in the proleptic Gregorian calendar which extends the\n * Gregorian calendar backwards to year one.\n *\n * All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap\n * second table is needed for interpretation, using a [24-hour linear\n * smear](https://developers.google.com/time/smear).\n *\n * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By\n * restricting to that range, we ensure that we can convert to and from [RFC\n * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.\n *\n * # Examples\n *\n * Example 1: Compute Timestamp from POSIX `time()`.\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(time(NULL));\n * timestamp.set_nanos(0);\n *\n * Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n *\n * struct timeval tv;\n * gettimeofday(&tv, NULL);\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(tv.tv_sec);\n * timestamp.set_nanos(tv.tv_usec * 1000);\n *\n * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n *\n * FILETIME ft;\n * GetSystemTimeAsFileTime(&ft);\n * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n *\n * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n * Timestamp timestamp;\n * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n *\n * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n *\n * long millis = System.currentTimeMillis();\n *\n * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n * .setNanos((int) ((millis % 1000) * 1000000)).build();\n *\n * Example 5: Compute Timestamp from Java `Instant.now()`.\n *\n * Instant now = Instant.now();\n *\n * Timestamp timestamp =\n * Timestamp.newBuilder().setSeconds(now.getEpochSecond())\n * .setNanos(now.getNano()).build();\n *\n * Example 6: Compute Timestamp from current time in Python.\n *\n * timestamp = Timestamp()\n * timestamp.GetCurrentTime()\n *\n * # JSON Mapping\n *\n * In JSON format, the Timestamp type is encoded as a string in the\n * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n * format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\n * where {year} is always expressed using four digits while {month}, {day},\n * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\n * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\n * are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n * is required. A proto3 JSON serializer should always use UTC (as indicated by\n * \"Z\") when printing the Timestamp type and a proto3 JSON parser should be\n * able to accept both UTC and other timezones (as indicated by an offset).\n *\n * For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n * 01:30 UTC on January 15, 2017.\n *\n * In JavaScript, one can convert a Date object to this format using the\n * standard\n * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n * method. In Python, a standard `datetime.datetime` object can be converted\n * to this format using\n * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with\n * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use\n * the Joda Time's [`ISODateTimeFormat.dateTime()`](\n * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()\n * ) to obtain a formatter capable of generating timestamps in this format.\n *\n *\n * @generated from protobuf message google.protobuf.Timestamp\n */\nexport interface Timestamp {\n /**\n * Represents seconds of UTC time since Unix epoch\n * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n * 9999-12-31T23:59:59Z inclusive.\n *\n * @generated from protobuf field: int64 seconds = 1\n */\n seconds: bigint;\n /**\n * Non-negative fractions of a second at nanosecond resolution. Negative\n * second values with fractions must still have non-negative nanos values\n * that count forward in time. Must be from 0 to 999,999,999\n * inclusive.\n *\n * @generated from protobuf field: int32 nanos = 2\n */\n nanos: number;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Timestamp$Type extends MessageType<Timestamp> {\n constructor() {\n super(\"google.protobuf.Timestamp\", [\n { no: 1, name: \"seconds\", kind: \"scalar\", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },\n { no: 2, name: \"nanos\", kind: \"scalar\", T: 5 /*ScalarType.INT32*/ }\n ]);\n }\n /**\n * Creates a new `Timestamp` for the current time.\n */\n now(): Timestamp {\n const msg = this.create();\n const ms = Date.now();\n msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n msg.nanos = (ms % 1000) * 1000000;\n return msg;\n }\n /**\n * Converts a `Timestamp` to a JavaScript Date.\n */\n toDate(message: Timestamp): Date {\n return new Date(PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000));\n }\n /**\n * Converts a JavaScript Date to a `Timestamp`.\n */\n fromDate(date: Date): Timestamp {\n const msg = this.create();\n const ms = date.getTime();\n msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n msg.nanos = ((ms % 1000) + (ms < 0 && ms % 1000 !== 0 ? 1000 : 0)) * 1000000;\n return msg;\n }\n /**\n * In JSON format, the `Timestamp` type is encoded as a string\n * in the RFC 3339 format.\n */\n internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue {\n let ms = PbLong.from(message.seconds).toNumber() * 1000;\n if (ms < Date.parse(\"0001-01-01T00:00:00Z\") || ms > Date.parse(\"9999-12-31T23:59:59Z\"))\n throw new Error(\"Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\");\n if (message.nanos < 0)\n throw new Error(\"Unable to encode invalid Timestamp to JSON. Nanos must not be negative.\");\n let z = \"Z\";\n if (message.nanos > 0) {\n let nanosStr = (message.nanos + 1000000000).toString().substring(1);\n if (nanosStr.substring(3) === \"000000\")\n z = \".\" + nanosStr.substring(0, 3) + \"Z\";\n else if (nanosStr.substring(6) === \"000\")\n z = \".\" + nanosStr.substring(0, 6) + \"Z\";\n else\n z = \".\" + nanosStr + \"Z\";\n }\n return new Date(ms).toISOString().replace(\".000Z\", z);\n }\n /**\n * In JSON format, the `Timestamp` type is encoded as a string\n * in the RFC 3339 format.\n */\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp {\n if (typeof json !== \"string\")\n throw new Error(\"Unable to parse Timestamp from JSON \" + typeofJsonValue(json) + \".\");\n let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);\n if (!matches)\n throw new Error(\"Unable to parse Timestamp from JSON. Invalid format.\");\n let ms = Date.parse(matches[1] + \"-\" + matches[2] + \"-\" + matches[3] + \"T\" + matches[4] + \":\" + matches[5] + \":\" + matches[6] + (matches[8] ? matches[8] : \"Z\"));\n if (Number.isNaN(ms))\n throw new Error(\"Unable to parse Timestamp from JSON. Invalid value.\");\n if (ms < Date.parse(\"0001-01-01T00:00:00Z\") || ms > Date.parse(\"9999-12-31T23:59:59Z\"))\n throw new globalThis.Error(\"Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\");\n if (!target)\n target = this.create();\n target.seconds = PbLong.from(ms / 1000).toBigInt();\n target.nanos = 0;\n if (matches[7])\n target.nanos = (parseInt(\"1\" + matches[7] + \"0\".repeat(9 - matches[7].length)) - 1000000000);\n return target;\n }\n create(value?: PartialMessage<Timestamp>): Timestamp {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.seconds = 0n;\n message.nanos = 0;\n if (value !== undefined)\n reflectionMergePartial<Timestamp>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Timestamp): Timestamp {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* int64 seconds */ 1:\n message.seconds = reader.int64().toBigInt();\n break;\n case /* int32 nanos */ 2:\n message.nanos = reader.int32();\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: Timestamp, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* int64 seconds = 1; */\n if (message.seconds !== 0n)\n writer.tag(1, WireType.Varint).int64(message.seconds);\n /* int32 nanos = 2; */\n if (message.nanos !== 0)\n writer.tag(2, WireType.Varint).int32(message.nanos);\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Timestamp\n */\nexport const Timestamp = new Timestamp$Type();\n"],"mappings":";;AAkKA,IAAM,iBAAN,cAA6B,YAAuB;CAChD,cAAc;AACV,QAAM,6BAA6B,CAC/B;GAAE,IAAI;GAAG,MAAM;GAAW,MAAM;GAAU,GAAG;GAAwB,GAAG;GAAuB,EAC/F;GAAE,IAAI;GAAG,MAAM;GAAS,MAAM;GAAU,GAAG;GAAwB,CACtE,CAAC;;;;;CAKN,MAAiB;EACb,MAAM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AAO,OAAO;AAC9B;IACJ;KACI,IAAI,IAAI,QAAQ;AAChB,SAAI,MAAM,QACN,OAAM,IAAI,WAAW,MAAM,iBAAiB,QAAQ,cAAc,SAAS,QAAQ,KAAK,WAAW;KACvG,IAAI,IAAI,OAAO,KAAK,SAAS;AAC7B,SAAI,MAAM,MACN,EAAC,MAAM,OAAO,oBAAoB,SAAS,GAAG,KAAK,UAAU,SAAS,SAAS,UAAU,EAAE;;;AAG3G,SAAO;;CAEX,oBAAoB,SAAoB,QAAuB,SAA4C;AAEvG,MAAI,QAAQ,YAAY,GACpB,QAAO,IAAI,GAAG,SAAS,OAAO,CAAC,MAAM,QAAQ,QAAQ;AAEzD,MAAI,QAAQ,UAAU,EAClB,QAAO,IAAI,GAAG,SAAS,OAAO,CAAC,MAAM,QAAQ,MAAM;EACvD,IAAI,IAAI,QAAQ;AAChB,MAAI,MAAM,MACN,EAAC,KAAK,OAAO,oBAAoB,UAAU,GAAG,KAAK,UAAU,SAAS,OAAO;AACjF,SAAO;;;;;;AAMf,MAAa,YAAY,IAAI,gBAAgB"}
@@ -1,4 +1,3 @@
1
-
2
1
  //#region src/proto-grpc/google/rpc/code.ts
3
2
  /**
4
3
  * The canonical error codes for gRPC APIs.
@@ -219,7 +218,7 @@ let Code = /* @__PURE__ */ function(Code) {
219
218
  Code[Code["DATA_LOSS"] = 15] = "DATA_LOSS";
220
219
  return Code;
221
220
  }({});
222
-
223
221
  //#endregion
224
222
  exports.Code = Code;
223
+
225
224
  //# sourceMappingURL=code.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"code.cjs","names":[],"sources":["../../../../src/proto-grpc/google/rpc/code.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"google/rpc/code.proto\" (package \"google.rpc\", syntax proto3)\n// tslint:disable\n//\n// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n/**\n * The canonical error codes for gRPC APIs.\n *\n *\n * Sometimes multiple error codes may apply. Services should return\n * the most specific error code that applies. For example, prefer\n * `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.\n * Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.\n *\n * @generated from protobuf enum google.rpc.Code\n */\nexport enum Code {\n /**\n * Not an error; returned on success.\n *\n * HTTP Mapping: 200 OK\n *\n * @generated from protobuf enum value: OK = 0;\n */\n OK = 0,\n /**\n * The operation was cancelled, typically by the caller.\n *\n * HTTP Mapping: 499 Client Closed Request\n *\n * @generated from protobuf enum value: CANCELLED = 1;\n */\n CANCELLED = 1,\n /**\n * Unknown error. For example, this error may be returned when\n * a `Status` value received from another address space belongs to\n * an error space that is not known in this address space. Also\n * errors raised by APIs that do not return enough error information\n * may be converted to this error.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: UNKNOWN = 2;\n */\n UNKNOWN = 2,\n /**\n * The client specified an invalid argument. Note that this differs\n * from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments\n * that are problematic regardless of the state of the system\n * (e.g., a malformed file name).\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: INVALID_ARGUMENT = 3;\n */\n INVALID_ARGUMENT = 3,\n /**\n * The deadline expired before the operation could complete. For operations\n * that change the state of the system, this error may be returned\n * even if the operation has completed successfully. For example, a\n * successful response from a server could have been delayed long\n * enough for the deadline to expire.\n *\n * HTTP Mapping: 504 Gateway Timeout\n *\n * @generated from protobuf enum value: DEADLINE_EXCEEDED = 4;\n */\n DEADLINE_EXCEEDED = 4,\n /**\n * Some requested entity (e.g., file or directory) was not found.\n *\n * Note to server developers: if a request is denied for an entire class\n * of users, such as gradual feature rollout or undocumented allowlist,\n * `NOT_FOUND` may be used. If a request is denied for some users within\n * a class of users, such as user-based access control, `PERMISSION_DENIED`\n * must be used.\n *\n * HTTP Mapping: 404 Not Found\n *\n * @generated from protobuf enum value: NOT_FOUND = 5;\n */\n NOT_FOUND = 5,\n /**\n * The entity that a client attempted to create (e.g., file or directory)\n * already exists.\n *\n * HTTP Mapping: 409 Conflict\n *\n * @generated from protobuf enum value: ALREADY_EXISTS = 6;\n */\n ALREADY_EXISTS = 6,\n /**\n * The caller does not have permission to execute the specified\n * operation. `PERMISSION_DENIED` must not be used for rejections\n * caused by exhausting some resource (use `RESOURCE_EXHAUSTED`\n * instead for those errors). `PERMISSION_DENIED` must not be\n * used if the caller can not be identified (use `UNAUTHENTICATED`\n * instead for those errors). This error code does not imply the\n * request is valid or the requested entity exists or satisfies\n * other pre-conditions.\n *\n * HTTP Mapping: 403 Forbidden\n *\n * @generated from protobuf enum value: PERMISSION_DENIED = 7;\n */\n PERMISSION_DENIED = 7,\n /**\n * The request does not have valid authentication credentials for the\n * operation.\n *\n * HTTP Mapping: 401 Unauthorized\n *\n * @generated from protobuf enum value: UNAUTHENTICATED = 16;\n */\n UNAUTHENTICATED = 16,\n /**\n * Some resource has been exhausted, perhaps a per-user quota, or\n * perhaps the entire file system is out of space.\n *\n * HTTP Mapping: 429 Too Many Requests\n *\n * @generated from protobuf enum value: RESOURCE_EXHAUSTED = 8;\n */\n RESOURCE_EXHAUSTED = 8,\n /**\n * The operation was rejected because the system is not in a state\n * required for the operation's execution. For example, the directory\n * to be deleted is non-empty, an rmdir operation is applied to\n * a non-directory, etc.\n *\n * Service implementors can use the following guidelines to decide\n * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:\n * (a) Use `UNAVAILABLE` if the client can retry just the failing call.\n * (b) Use `ABORTED` if the client should retry at a higher level. For\n * example, when a client-specified test-and-set fails, indicating the\n * client should restart a read-modify-write sequence.\n * (c) Use `FAILED_PRECONDITION` if the client should not retry until\n * the system state has been explicitly fixed. For example, if an \"rmdir\"\n * fails because the directory is non-empty, `FAILED_PRECONDITION`\n * should be returned since the client should not retry unless\n * the files are deleted from the directory.\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: FAILED_PRECONDITION = 9;\n */\n FAILED_PRECONDITION = 9,\n /**\n * The operation was aborted, typically due to a concurrency issue such as\n * a sequencer check failure or transaction abort.\n *\n * See the guidelines above for deciding between `FAILED_PRECONDITION`,\n * `ABORTED`, and `UNAVAILABLE`.\n *\n * HTTP Mapping: 409 Conflict\n *\n * @generated from protobuf enum value: ABORTED = 10;\n */\n ABORTED = 10,\n /**\n * The operation was attempted past the valid range. E.g., seeking or\n * reading past end-of-file.\n *\n * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may\n * be fixed if the system state changes. For example, a 32-bit file\n * system will generate `INVALID_ARGUMENT` if asked to read at an\n * offset that is not in the range [0,2^32-1], but it will generate\n * `OUT_OF_RANGE` if asked to read from an offset past the current\n * file size.\n *\n * There is a fair bit of overlap between `FAILED_PRECONDITION` and\n * `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific\n * error) when it applies so that callers who are iterating through\n * a space can easily look for an `OUT_OF_RANGE` error to detect when\n * they are done.\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: OUT_OF_RANGE = 11;\n */\n OUT_OF_RANGE = 11,\n /**\n * The operation is not implemented or is not supported/enabled in this\n * service.\n *\n * HTTP Mapping: 501 Not Implemented\n *\n * @generated from protobuf enum value: UNIMPLEMENTED = 12;\n */\n UNIMPLEMENTED = 12,\n /**\n * Internal errors. This means that some invariants expected by the\n * underlying system have been broken. This error code is reserved\n * for serious errors.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: INTERNAL = 13;\n */\n INTERNAL = 13,\n /**\n * The service is currently unavailable. This is most likely a\n * transient condition, which can be corrected by retrying with\n * a backoff. Note that it is not always safe to retry\n * non-idempotent operations.\n *\n * See the guidelines above for deciding between `FAILED_PRECONDITION`,\n * `ABORTED`, and `UNAVAILABLE`.\n *\n * HTTP Mapping: 503 Service Unavailable\n *\n * @generated from protobuf enum value: UNAVAILABLE = 14;\n */\n UNAVAILABLE = 14,\n /**\n * Unrecoverable data loss or corruption.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: DATA_LOSS = 15;\n */\n DATA_LOSS = 15\n}\n"],"mappings":";;;;;;;;;;;;;AA6BA,IAAY,OAAL;;;;;;;;AAQH;;;;;;;;AAQA;;;;;;;;;;;;AAYA;;;;;;;;;;;AAWA;;;;;;;;;;;;AAYA;;;;;;;;;;;;;;AAcA;;;;;;;;;AASA;;;;;;;;;;;;;;;AAeA;;;;;;;;;AASA;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;AAuBA;;;;;;;;;;;;AAYA;;;;;;;;;;;;;;;;;;;;;;AAsBA;;;;;;;;;AASA;;;;;;;;;;AAUA;;;;;;;;;;;;;;AAcA;;;;;;;;AAQA;;KACH"}
1
+ {"version":3,"file":"code.cjs","names":[],"sources":["../../../../src/proto-grpc/google/rpc/code.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"google/rpc/code.proto\" (package \"google.rpc\", syntax proto3)\n// tslint:disable\n//\n// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n/**\n * The canonical error codes for gRPC APIs.\n *\n *\n * Sometimes multiple error codes may apply. Services should return\n * the most specific error code that applies. For example, prefer\n * `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.\n * Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.\n *\n * @generated from protobuf enum google.rpc.Code\n */\nexport enum Code {\n /**\n * Not an error; returned on success.\n *\n * HTTP Mapping: 200 OK\n *\n * @generated from protobuf enum value: OK = 0;\n */\n OK = 0,\n /**\n * The operation was cancelled, typically by the caller.\n *\n * HTTP Mapping: 499 Client Closed Request\n *\n * @generated from protobuf enum value: CANCELLED = 1;\n */\n CANCELLED = 1,\n /**\n * Unknown error. For example, this error may be returned when\n * a `Status` value received from another address space belongs to\n * an error space that is not known in this address space. Also\n * errors raised by APIs that do not return enough error information\n * may be converted to this error.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: UNKNOWN = 2;\n */\n UNKNOWN = 2,\n /**\n * The client specified an invalid argument. Note that this differs\n * from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments\n * that are problematic regardless of the state of the system\n * (e.g., a malformed file name).\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: INVALID_ARGUMENT = 3;\n */\n INVALID_ARGUMENT = 3,\n /**\n * The deadline expired before the operation could complete. For operations\n * that change the state of the system, this error may be returned\n * even if the operation has completed successfully. For example, a\n * successful response from a server could have been delayed long\n * enough for the deadline to expire.\n *\n * HTTP Mapping: 504 Gateway Timeout\n *\n * @generated from protobuf enum value: DEADLINE_EXCEEDED = 4;\n */\n DEADLINE_EXCEEDED = 4,\n /**\n * Some requested entity (e.g., file or directory) was not found.\n *\n * Note to server developers: if a request is denied for an entire class\n * of users, such as gradual feature rollout or undocumented allowlist,\n * `NOT_FOUND` may be used. If a request is denied for some users within\n * a class of users, such as user-based access control, `PERMISSION_DENIED`\n * must be used.\n *\n * HTTP Mapping: 404 Not Found\n *\n * @generated from protobuf enum value: NOT_FOUND = 5;\n */\n NOT_FOUND = 5,\n /**\n * The entity that a client attempted to create (e.g., file or directory)\n * already exists.\n *\n * HTTP Mapping: 409 Conflict\n *\n * @generated from protobuf enum value: ALREADY_EXISTS = 6;\n */\n ALREADY_EXISTS = 6,\n /**\n * The caller does not have permission to execute the specified\n * operation. `PERMISSION_DENIED` must not be used for rejections\n * caused by exhausting some resource (use `RESOURCE_EXHAUSTED`\n * instead for those errors). `PERMISSION_DENIED` must not be\n * used if the caller can not be identified (use `UNAUTHENTICATED`\n * instead for those errors). This error code does not imply the\n * request is valid or the requested entity exists or satisfies\n * other pre-conditions.\n *\n * HTTP Mapping: 403 Forbidden\n *\n * @generated from protobuf enum value: PERMISSION_DENIED = 7;\n */\n PERMISSION_DENIED = 7,\n /**\n * The request does not have valid authentication credentials for the\n * operation.\n *\n * HTTP Mapping: 401 Unauthorized\n *\n * @generated from protobuf enum value: UNAUTHENTICATED = 16;\n */\n UNAUTHENTICATED = 16,\n /**\n * Some resource has been exhausted, perhaps a per-user quota, or\n * perhaps the entire file system is out of space.\n *\n * HTTP Mapping: 429 Too Many Requests\n *\n * @generated from protobuf enum value: RESOURCE_EXHAUSTED = 8;\n */\n RESOURCE_EXHAUSTED = 8,\n /**\n * The operation was rejected because the system is not in a state\n * required for the operation's execution. For example, the directory\n * to be deleted is non-empty, an rmdir operation is applied to\n * a non-directory, etc.\n *\n * Service implementors can use the following guidelines to decide\n * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:\n * (a) Use `UNAVAILABLE` if the client can retry just the failing call.\n * (b) Use `ABORTED` if the client should retry at a higher level. For\n * example, when a client-specified test-and-set fails, indicating the\n * client should restart a read-modify-write sequence.\n * (c) Use `FAILED_PRECONDITION` if the client should not retry until\n * the system state has been explicitly fixed. For example, if an \"rmdir\"\n * fails because the directory is non-empty, `FAILED_PRECONDITION`\n * should be returned since the client should not retry unless\n * the files are deleted from the directory.\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: FAILED_PRECONDITION = 9;\n */\n FAILED_PRECONDITION = 9,\n /**\n * The operation was aborted, typically due to a concurrency issue such as\n * a sequencer check failure or transaction abort.\n *\n * See the guidelines above for deciding between `FAILED_PRECONDITION`,\n * `ABORTED`, and `UNAVAILABLE`.\n *\n * HTTP Mapping: 409 Conflict\n *\n * @generated from protobuf enum value: ABORTED = 10;\n */\n ABORTED = 10,\n /**\n * The operation was attempted past the valid range. E.g., seeking or\n * reading past end-of-file.\n *\n * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may\n * be fixed if the system state changes. For example, a 32-bit file\n * system will generate `INVALID_ARGUMENT` if asked to read at an\n * offset that is not in the range [0,2^32-1], but it will generate\n * `OUT_OF_RANGE` if asked to read from an offset past the current\n * file size.\n *\n * There is a fair bit of overlap between `FAILED_PRECONDITION` and\n * `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific\n * error) when it applies so that callers who are iterating through\n * a space can easily look for an `OUT_OF_RANGE` error to detect when\n * they are done.\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: OUT_OF_RANGE = 11;\n */\n OUT_OF_RANGE = 11,\n /**\n * The operation is not implemented or is not supported/enabled in this\n * service.\n *\n * HTTP Mapping: 501 Not Implemented\n *\n * @generated from protobuf enum value: UNIMPLEMENTED = 12;\n */\n UNIMPLEMENTED = 12,\n /**\n * Internal errors. This means that some invariants expected by the\n * underlying system have been broken. This error code is reserved\n * for serious errors.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: INTERNAL = 13;\n */\n INTERNAL = 13,\n /**\n * The service is currently unavailable. This is most likely a\n * transient condition, which can be corrected by retrying with\n * a backoff. Note that it is not always safe to retry\n * non-idempotent operations.\n *\n * See the guidelines above for deciding between `FAILED_PRECONDITION`,\n * `ABORTED`, and `UNAVAILABLE`.\n *\n * HTTP Mapping: 503 Service Unavailable\n *\n * @generated from protobuf enum value: UNAVAILABLE = 14;\n */\n UNAVAILABLE = 14,\n /**\n * Unrecoverable data loss or corruption.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: DATA_LOSS = 15;\n */\n DATA_LOSS = 15\n}\n"],"mappings":";;;;;;;;;;;;AA6BA,IAAY,OAAL,yBAAA,MAAA;;;;;;;;AAQH,MAAA,KAAA,QAAA,KAAA;;;;;;;;AAQA,MAAA,KAAA,eAAA,KAAA;;;;;;;;;;;;AAYA,MAAA,KAAA,aAAA,KAAA;;;;;;;;;;;AAWA,MAAA,KAAA,sBAAA,KAAA;;;;;;;;;;;;AAYA,MAAA,KAAA,uBAAA,KAAA;;;;;;;;;;;;;;AAcA,MAAA,KAAA,eAAA,KAAA;;;;;;;;;AASA,MAAA,KAAA,oBAAA,KAAA;;;;;;;;;;;;;;;AAeA,MAAA,KAAA,uBAAA,KAAA;;;;;;;;;AASA,MAAA,KAAA,qBAAA,MAAA;;;;;;;;;AASA,MAAA,KAAA,wBAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAA,KAAA,yBAAA,KAAA;;;;;;;;;;;;AAYA,MAAA,KAAA,aAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAA,KAAA,kBAAA,MAAA;;;;;;;;;AASA,MAAA,KAAA,mBAAA,MAAA;;;;;;;;;;AAUA,MAAA,KAAA,cAAA,MAAA;;;;;;;;;;;;;;AAcA,MAAA,KAAA,iBAAA,MAAA;;;;;;;;AAQA,MAAA,KAAA,eAAA,MAAA;;KACH"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code.d.ts","names":[],"sources":["../../../../src/proto-grpc/google/rpc/code.ts"],"mappings":";;AA6BA;;;;;;;;;;aAAY,IAAA;EAyFR;;;;;;;EAjFA,EAAA;EA6LA;;;;;;;EArLA,SAAA;;;;;;;;;;;;EAYA,OAAA;;;;;;;;;;;EAWA,gBAAA;;;;;;;;;;;;EAYA,iBAAA;;;;;;;;;;;;;;EAcA,SAAA;;;;;;;;;EASA,cAAA;;;;;;;;;;;;;;;EAeA,iBAAA;;;;;;;;;EASA,eAAA;;;;;;;;;EASA,kBAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBA,mBAAA;;;;;;;;;;;;EAYA,OAAA;;;;;;;;;;;;;;;;;;;;;;EAsBA,YAAA;;;;;;;;;EASA,aAAA;;;;;;;;;;EAUA,QAAA;;;;;;;;;;;;;;EAcA,WAAA;;;;;;;;EAQA,SAAA;AAAA"}
@@ -218,7 +218,7 @@ let Code = /* @__PURE__ */ function(Code) {
218
218
  Code[Code["DATA_LOSS"] = 15] = "DATA_LOSS";
219
219
  return Code;
220
220
  }({});
221
-
222
221
  //#endregion
223
222
  export { Code };
223
+
224
224
  //# sourceMappingURL=code.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"code.js","names":[],"sources":["../../../../src/proto-grpc/google/rpc/code.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"google/rpc/code.proto\" (package \"google.rpc\", syntax proto3)\n// tslint:disable\n//\n// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n/**\n * The canonical error codes for gRPC APIs.\n *\n *\n * Sometimes multiple error codes may apply. Services should return\n * the most specific error code that applies. For example, prefer\n * `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.\n * Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.\n *\n * @generated from protobuf enum google.rpc.Code\n */\nexport enum Code {\n /**\n * Not an error; returned on success.\n *\n * HTTP Mapping: 200 OK\n *\n * @generated from protobuf enum value: OK = 0;\n */\n OK = 0,\n /**\n * The operation was cancelled, typically by the caller.\n *\n * HTTP Mapping: 499 Client Closed Request\n *\n * @generated from protobuf enum value: CANCELLED = 1;\n */\n CANCELLED = 1,\n /**\n * Unknown error. For example, this error may be returned when\n * a `Status` value received from another address space belongs to\n * an error space that is not known in this address space. Also\n * errors raised by APIs that do not return enough error information\n * may be converted to this error.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: UNKNOWN = 2;\n */\n UNKNOWN = 2,\n /**\n * The client specified an invalid argument. Note that this differs\n * from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments\n * that are problematic regardless of the state of the system\n * (e.g., a malformed file name).\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: INVALID_ARGUMENT = 3;\n */\n INVALID_ARGUMENT = 3,\n /**\n * The deadline expired before the operation could complete. For operations\n * that change the state of the system, this error may be returned\n * even if the operation has completed successfully. For example, a\n * successful response from a server could have been delayed long\n * enough for the deadline to expire.\n *\n * HTTP Mapping: 504 Gateway Timeout\n *\n * @generated from protobuf enum value: DEADLINE_EXCEEDED = 4;\n */\n DEADLINE_EXCEEDED = 4,\n /**\n * Some requested entity (e.g., file or directory) was not found.\n *\n * Note to server developers: if a request is denied for an entire class\n * of users, such as gradual feature rollout or undocumented allowlist,\n * `NOT_FOUND` may be used. If a request is denied for some users within\n * a class of users, such as user-based access control, `PERMISSION_DENIED`\n * must be used.\n *\n * HTTP Mapping: 404 Not Found\n *\n * @generated from protobuf enum value: NOT_FOUND = 5;\n */\n NOT_FOUND = 5,\n /**\n * The entity that a client attempted to create (e.g., file or directory)\n * already exists.\n *\n * HTTP Mapping: 409 Conflict\n *\n * @generated from protobuf enum value: ALREADY_EXISTS = 6;\n */\n ALREADY_EXISTS = 6,\n /**\n * The caller does not have permission to execute the specified\n * operation. `PERMISSION_DENIED` must not be used for rejections\n * caused by exhausting some resource (use `RESOURCE_EXHAUSTED`\n * instead for those errors). `PERMISSION_DENIED` must not be\n * used if the caller can not be identified (use `UNAUTHENTICATED`\n * instead for those errors). This error code does not imply the\n * request is valid or the requested entity exists or satisfies\n * other pre-conditions.\n *\n * HTTP Mapping: 403 Forbidden\n *\n * @generated from protobuf enum value: PERMISSION_DENIED = 7;\n */\n PERMISSION_DENIED = 7,\n /**\n * The request does not have valid authentication credentials for the\n * operation.\n *\n * HTTP Mapping: 401 Unauthorized\n *\n * @generated from protobuf enum value: UNAUTHENTICATED = 16;\n */\n UNAUTHENTICATED = 16,\n /**\n * Some resource has been exhausted, perhaps a per-user quota, or\n * perhaps the entire file system is out of space.\n *\n * HTTP Mapping: 429 Too Many Requests\n *\n * @generated from protobuf enum value: RESOURCE_EXHAUSTED = 8;\n */\n RESOURCE_EXHAUSTED = 8,\n /**\n * The operation was rejected because the system is not in a state\n * required for the operation's execution. For example, the directory\n * to be deleted is non-empty, an rmdir operation is applied to\n * a non-directory, etc.\n *\n * Service implementors can use the following guidelines to decide\n * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:\n * (a) Use `UNAVAILABLE` if the client can retry just the failing call.\n * (b) Use `ABORTED` if the client should retry at a higher level. For\n * example, when a client-specified test-and-set fails, indicating the\n * client should restart a read-modify-write sequence.\n * (c) Use `FAILED_PRECONDITION` if the client should not retry until\n * the system state has been explicitly fixed. For example, if an \"rmdir\"\n * fails because the directory is non-empty, `FAILED_PRECONDITION`\n * should be returned since the client should not retry unless\n * the files are deleted from the directory.\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: FAILED_PRECONDITION = 9;\n */\n FAILED_PRECONDITION = 9,\n /**\n * The operation was aborted, typically due to a concurrency issue such as\n * a sequencer check failure or transaction abort.\n *\n * See the guidelines above for deciding between `FAILED_PRECONDITION`,\n * `ABORTED`, and `UNAVAILABLE`.\n *\n * HTTP Mapping: 409 Conflict\n *\n * @generated from protobuf enum value: ABORTED = 10;\n */\n ABORTED = 10,\n /**\n * The operation was attempted past the valid range. E.g., seeking or\n * reading past end-of-file.\n *\n * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may\n * be fixed if the system state changes. For example, a 32-bit file\n * system will generate `INVALID_ARGUMENT` if asked to read at an\n * offset that is not in the range [0,2^32-1], but it will generate\n * `OUT_OF_RANGE` if asked to read from an offset past the current\n * file size.\n *\n * There is a fair bit of overlap between `FAILED_PRECONDITION` and\n * `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific\n * error) when it applies so that callers who are iterating through\n * a space can easily look for an `OUT_OF_RANGE` error to detect when\n * they are done.\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: OUT_OF_RANGE = 11;\n */\n OUT_OF_RANGE = 11,\n /**\n * The operation is not implemented or is not supported/enabled in this\n * service.\n *\n * HTTP Mapping: 501 Not Implemented\n *\n * @generated from protobuf enum value: UNIMPLEMENTED = 12;\n */\n UNIMPLEMENTED = 12,\n /**\n * Internal errors. This means that some invariants expected by the\n * underlying system have been broken. This error code is reserved\n * for serious errors.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: INTERNAL = 13;\n */\n INTERNAL = 13,\n /**\n * The service is currently unavailable. This is most likely a\n * transient condition, which can be corrected by retrying with\n * a backoff. Note that it is not always safe to retry\n * non-idempotent operations.\n *\n * See the guidelines above for deciding between `FAILED_PRECONDITION`,\n * `ABORTED`, and `UNAVAILABLE`.\n *\n * HTTP Mapping: 503 Service Unavailable\n *\n * @generated from protobuf enum value: UNAVAILABLE = 14;\n */\n UNAVAILABLE = 14,\n /**\n * Unrecoverable data loss or corruption.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: DATA_LOSS = 15;\n */\n DATA_LOSS = 15\n}\n"],"mappings":";;;;;;;;;;;;AA6BA,IAAY,OAAL;;;;;;;;AAQH;;;;;;;;AAQA;;;;;;;;;;;;AAYA;;;;;;;;;;;AAWA;;;;;;;;;;;;AAYA;;;;;;;;;;;;;;AAcA;;;;;;;;;AASA;;;;;;;;;;;;;;;AAeA;;;;;;;;;AASA;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;AAuBA;;;;;;;;;;;;AAYA;;;;;;;;;;;;;;;;;;;;;;AAsBA;;;;;;;;;AASA;;;;;;;;;;AAUA;;;;;;;;;;;;;;AAcA;;;;;;;;AAQA;;KACH"}
1
+ {"version":3,"file":"code.js","names":[],"sources":["../../../../src/proto-grpc/google/rpc/code.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"google/rpc/code.proto\" (package \"google.rpc\", syntax proto3)\n// tslint:disable\n//\n// Copyright 2025 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n/**\n * The canonical error codes for gRPC APIs.\n *\n *\n * Sometimes multiple error codes may apply. Services should return\n * the most specific error code that applies. For example, prefer\n * `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.\n * Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.\n *\n * @generated from protobuf enum google.rpc.Code\n */\nexport enum Code {\n /**\n * Not an error; returned on success.\n *\n * HTTP Mapping: 200 OK\n *\n * @generated from protobuf enum value: OK = 0;\n */\n OK = 0,\n /**\n * The operation was cancelled, typically by the caller.\n *\n * HTTP Mapping: 499 Client Closed Request\n *\n * @generated from protobuf enum value: CANCELLED = 1;\n */\n CANCELLED = 1,\n /**\n * Unknown error. For example, this error may be returned when\n * a `Status` value received from another address space belongs to\n * an error space that is not known in this address space. Also\n * errors raised by APIs that do not return enough error information\n * may be converted to this error.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: UNKNOWN = 2;\n */\n UNKNOWN = 2,\n /**\n * The client specified an invalid argument. Note that this differs\n * from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments\n * that are problematic regardless of the state of the system\n * (e.g., a malformed file name).\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: INVALID_ARGUMENT = 3;\n */\n INVALID_ARGUMENT = 3,\n /**\n * The deadline expired before the operation could complete. For operations\n * that change the state of the system, this error may be returned\n * even if the operation has completed successfully. For example, a\n * successful response from a server could have been delayed long\n * enough for the deadline to expire.\n *\n * HTTP Mapping: 504 Gateway Timeout\n *\n * @generated from protobuf enum value: DEADLINE_EXCEEDED = 4;\n */\n DEADLINE_EXCEEDED = 4,\n /**\n * Some requested entity (e.g., file or directory) was not found.\n *\n * Note to server developers: if a request is denied for an entire class\n * of users, such as gradual feature rollout or undocumented allowlist,\n * `NOT_FOUND` may be used. If a request is denied for some users within\n * a class of users, such as user-based access control, `PERMISSION_DENIED`\n * must be used.\n *\n * HTTP Mapping: 404 Not Found\n *\n * @generated from protobuf enum value: NOT_FOUND = 5;\n */\n NOT_FOUND = 5,\n /**\n * The entity that a client attempted to create (e.g., file or directory)\n * already exists.\n *\n * HTTP Mapping: 409 Conflict\n *\n * @generated from protobuf enum value: ALREADY_EXISTS = 6;\n */\n ALREADY_EXISTS = 6,\n /**\n * The caller does not have permission to execute the specified\n * operation. `PERMISSION_DENIED` must not be used for rejections\n * caused by exhausting some resource (use `RESOURCE_EXHAUSTED`\n * instead for those errors). `PERMISSION_DENIED` must not be\n * used if the caller can not be identified (use `UNAUTHENTICATED`\n * instead for those errors). This error code does not imply the\n * request is valid or the requested entity exists or satisfies\n * other pre-conditions.\n *\n * HTTP Mapping: 403 Forbidden\n *\n * @generated from protobuf enum value: PERMISSION_DENIED = 7;\n */\n PERMISSION_DENIED = 7,\n /**\n * The request does not have valid authentication credentials for the\n * operation.\n *\n * HTTP Mapping: 401 Unauthorized\n *\n * @generated from protobuf enum value: UNAUTHENTICATED = 16;\n */\n UNAUTHENTICATED = 16,\n /**\n * Some resource has been exhausted, perhaps a per-user quota, or\n * perhaps the entire file system is out of space.\n *\n * HTTP Mapping: 429 Too Many Requests\n *\n * @generated from protobuf enum value: RESOURCE_EXHAUSTED = 8;\n */\n RESOURCE_EXHAUSTED = 8,\n /**\n * The operation was rejected because the system is not in a state\n * required for the operation's execution. For example, the directory\n * to be deleted is non-empty, an rmdir operation is applied to\n * a non-directory, etc.\n *\n * Service implementors can use the following guidelines to decide\n * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:\n * (a) Use `UNAVAILABLE` if the client can retry just the failing call.\n * (b) Use `ABORTED` if the client should retry at a higher level. For\n * example, when a client-specified test-and-set fails, indicating the\n * client should restart a read-modify-write sequence.\n * (c) Use `FAILED_PRECONDITION` if the client should not retry until\n * the system state has been explicitly fixed. For example, if an \"rmdir\"\n * fails because the directory is non-empty, `FAILED_PRECONDITION`\n * should be returned since the client should not retry unless\n * the files are deleted from the directory.\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: FAILED_PRECONDITION = 9;\n */\n FAILED_PRECONDITION = 9,\n /**\n * The operation was aborted, typically due to a concurrency issue such as\n * a sequencer check failure or transaction abort.\n *\n * See the guidelines above for deciding between `FAILED_PRECONDITION`,\n * `ABORTED`, and `UNAVAILABLE`.\n *\n * HTTP Mapping: 409 Conflict\n *\n * @generated from protobuf enum value: ABORTED = 10;\n */\n ABORTED = 10,\n /**\n * The operation was attempted past the valid range. E.g., seeking or\n * reading past end-of-file.\n *\n * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may\n * be fixed if the system state changes. For example, a 32-bit file\n * system will generate `INVALID_ARGUMENT` if asked to read at an\n * offset that is not in the range [0,2^32-1], but it will generate\n * `OUT_OF_RANGE` if asked to read from an offset past the current\n * file size.\n *\n * There is a fair bit of overlap between `FAILED_PRECONDITION` and\n * `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific\n * error) when it applies so that callers who are iterating through\n * a space can easily look for an `OUT_OF_RANGE` error to detect when\n * they are done.\n *\n * HTTP Mapping: 400 Bad Request\n *\n * @generated from protobuf enum value: OUT_OF_RANGE = 11;\n */\n OUT_OF_RANGE = 11,\n /**\n * The operation is not implemented or is not supported/enabled in this\n * service.\n *\n * HTTP Mapping: 501 Not Implemented\n *\n * @generated from protobuf enum value: UNIMPLEMENTED = 12;\n */\n UNIMPLEMENTED = 12,\n /**\n * Internal errors. This means that some invariants expected by the\n * underlying system have been broken. This error code is reserved\n * for serious errors.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: INTERNAL = 13;\n */\n INTERNAL = 13,\n /**\n * The service is currently unavailable. This is most likely a\n * transient condition, which can be corrected by retrying with\n * a backoff. Note that it is not always safe to retry\n * non-idempotent operations.\n *\n * See the guidelines above for deciding between `FAILED_PRECONDITION`,\n * `ABORTED`, and `UNAVAILABLE`.\n *\n * HTTP Mapping: 503 Service Unavailable\n *\n * @generated from protobuf enum value: UNAVAILABLE = 14;\n */\n UNAVAILABLE = 14,\n /**\n * Unrecoverable data loss or corruption.\n *\n * HTTP Mapping: 500 Internal Server Error\n *\n * @generated from protobuf enum value: DATA_LOSS = 15;\n */\n DATA_LOSS = 15\n}\n"],"mappings":";;;;;;;;;;;;AA6BA,IAAY,OAAL,yBAAA,MAAA;;;;;;;;AAQH,MAAA,KAAA,QAAA,KAAA;;;;;;;;AAQA,MAAA,KAAA,eAAA,KAAA;;;;;;;;;;;;AAYA,MAAA,KAAA,aAAA,KAAA;;;;;;;;;;;AAWA,MAAA,KAAA,sBAAA,KAAA;;;;;;;;;;;;AAYA,MAAA,KAAA,uBAAA,KAAA;;;;;;;;;;;;;;AAcA,MAAA,KAAA,eAAA,KAAA;;;;;;;;;AASA,MAAA,KAAA,oBAAA,KAAA;;;;;;;;;;;;;;;AAeA,MAAA,KAAA,uBAAA,KAAA;;;;;;;;;AASA,MAAA,KAAA,qBAAA,MAAA;;;;;;;;;AASA,MAAA,KAAA,wBAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAA,KAAA,yBAAA,KAAA;;;;;;;;;;;;AAYA,MAAA,KAAA,aAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAA,KAAA,kBAAA,MAAA;;;;;;;;;AASA,MAAA,KAAA,mBAAA,MAAA;;;;;;;;;;AAUA,MAAA,KAAA,cAAA,MAAA;;;;;;;;;;;;;;AAcA,MAAA,KAAA,iBAAA,MAAA;;;;;;;;AAQA,MAAA,KAAA,eAAA,MAAA;;KACH"}
@@ -1,9 +1,8 @@
1
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
- const require_errors = require('../core/errors.cjs');
1
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
2
+ const require_errors = require("../core/errors.cjs");
3
3
  let undici = require("undici");
4
4
  let openapi_fetch = require("openapi-fetch");
5
5
  openapi_fetch = require_runtime.__toESM(openapi_fetch);
6
-
7
6
  //#region src/proto-rest/index.ts
8
7
  var proto_rest_exports = /* @__PURE__ */ require_runtime.__exportAll({
9
8
  createClient: () => createClient,
@@ -65,14 +64,14 @@ function errorHandlerMiddleware() {
65
64
  require_errors.rethrowMeaningfulError(new require_errors.RESTError(respErr.error));
66
65
  } };
67
66
  }
68
-
69
67
  //#endregion
70
68
  exports.createClient = createClient;
71
69
  exports.parseResponseError = parseResponseError;
72
- Object.defineProperty(exports, 'proto_rest_exports', {
73
- enumerable: true,
74
- get: function () {
75
- return proto_rest_exports;
76
- }
70
+ Object.defineProperty(exports, "proto_rest_exports", {
71
+ enumerable: true,
72
+ get: function() {
73
+ return proto_rest_exports;
74
+ }
77
75
  });
76
+
78
77
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["RESTError"],"sources":["../../src/proto-rest/index.ts"],"sourcesContent":["//\n// This file is NOT autogenerated!\n//\n// After generating new clients from openapi specifications, add client types here.\n//\n\nimport type { paths as PlApiPaths } from \"./plapi\";\nimport { default as createOpenApiClient, type Middleware, type Client } from \"openapi-fetch\";\nimport { Dispatcher, fetch as undiciFetch } from \"undici\";\nimport { RESTError, rethrowMeaningfulError } from \"../core/errors\";\nimport { Code } from \"../proto-grpc/google/rpc/code\";\n\nexport { PlApiPaths };\nexport type PlRestClientType = Client<PlApiPaths>;\n\nexport type RestClientConfig = {\n hostAndPort: string;\n ssl: boolean;\n dispatcher: Dispatcher;\n middlewares: Middleware[];\n};\n\nexport function createClient<Paths extends {}>(opts: RestClientConfig): Client<Paths> {\n const scheme = opts.ssl ? \"https://\" : \"http://\";\n const client = createOpenApiClient<Paths>({\n baseUrl: `${scheme}${opts.hostAndPort}`,\n fetch: (input: Request): Promise<Response> => {\n // If body has already been consumed, clone the request\n const request = input.bodyUsed ? input.clone() : input;\n\n return undiciFetch(request.url, {\n body: request.body,\n cache: request.cache,\n credentials: request.credentials,\n dispatcher: opts.dispatcher,\n duplex: request.duplex,\n headers: request.headers,\n integrity: request.integrity,\n keepalive: request.keepalive,\n method: request.method,\n mode: request.mode,\n redirect: request.redirect,\n referrer: request.referrer,\n referrerPolicy: request.referrerPolicy,\n signal: request.signal,\n });\n },\n });\n client.use(errorHandlerMiddleware(), ...opts.middlewares);\n return client;\n}\n\nexport type ErrorResponse = {\n code: Code;\n message: string;\n details: any[];\n};\nexport async function parseResponseError(response: Response): Promise<{\n error?: ErrorResponse | string;\n origBody?: string;\n}> {\n if (response.status < 400) {\n return {};\n }\n\n let error: any = await response.clone().text();\n const origBody = error;\n try {\n error = JSON.parse(error) as ErrorResponse;\n } catch {}\n return {\n error: error,\n origBody,\n };\n}\n\n/**\n * Parses all API responses and thrown error in case of error response.\n * Allows all callers to not bother about .error response field checking.\n */\nfunction errorHandlerMiddleware(): Middleware {\n return {\n onResponse: async ({ request: _request, response, options: _options }) => {\n const respErr = await parseResponseError(response);\n if (!respErr.error) {\n const { body, ...resOptions } = response;\n return new Response(body, { ...resOptions, status: response.status });\n }\n\n if (typeof respErr.error === \"string\") {\n throw new Error(respErr.error);\n }\n\n rethrowMeaningfulError(new RESTError(respErr.error));\n },\n };\n}\n"],"mappings":";;;;;;;;;;;AAsBA,SAAgB,aAA+B,MAAuC;CAEpF,MAAM,oCAAoC;EACxC,SAAS,GAFI,KAAK,MAAM,aAAa,YAEhB,KAAK;EAC1B,QAAQ,UAAsC;GAE5C,MAAM,UAAU,MAAM,WAAW,MAAM,OAAO,GAAG;AAEjD,4BAAmB,QAAQ,KAAK;IAC9B,MAAM,QAAQ;IACd,OAAO,QAAQ;IACf,aAAa,QAAQ;IACrB,YAAY,KAAK;IACjB,QAAQ,QAAQ;IAChB,SAAS,QAAQ;IACjB,WAAW,QAAQ;IACnB,WAAW,QAAQ;IACnB,QAAQ,QAAQ;IAChB,MAAM,QAAQ;IACd,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,gBAAgB,QAAQ;IACxB,QAAQ,QAAQ;IACjB,CAAC;;EAEL,CAAC;AACF,QAAO,IAAI,wBAAwB,EAAE,GAAG,KAAK,YAAY;AACzD,QAAO;;AAQT,eAAsB,mBAAmB,UAGtC;AACD,KAAI,SAAS,SAAS,IACpB,QAAO,EAAE;CAGX,IAAI,QAAa,MAAM,SAAS,OAAO,CAAC,MAAM;CAC9C,MAAM,WAAW;AACjB,KAAI;AACF,UAAQ,KAAK,MAAM,MAAM;SACnB;AACR,QAAO;EACE;EACP;EACD;;;;;;AAOH,SAAS,yBAAqC;AAC5C,QAAO,EACL,YAAY,OAAO,EAAE,SAAS,UAAU,UAAU,SAAS,eAAe;EACxE,MAAM,UAAU,MAAM,mBAAmB,SAAS;AAClD,MAAI,CAAC,QAAQ,OAAO;GAClB,MAAM,EAAE,MAAM,GAAG,eAAe;AAChC,UAAO,IAAI,SAAS,MAAM;IAAE,GAAG;IAAY,QAAQ,SAAS;IAAQ,CAAC;;AAGvE,MAAI,OAAO,QAAQ,UAAU,SAC3B,OAAM,IAAI,MAAM,QAAQ,MAAM;AAGhC,wCAAuB,IAAIA,yBAAU,QAAQ,MAAM,CAAC;IAEvD"}
1
+ {"version":3,"file":"index.cjs","names":["RESTError"],"sources":["../../src/proto-rest/index.ts"],"sourcesContent":["//\n// This file is NOT autogenerated!\n//\n// After generating new clients from openapi specifications, add client types here.\n//\n\nimport type { paths as PlApiPaths } from \"./plapi\";\nimport { default as createOpenApiClient, type Middleware, type Client } from \"openapi-fetch\";\nimport { Dispatcher, fetch as undiciFetch } from \"undici\";\nimport { RESTError, rethrowMeaningfulError } from \"../core/errors\";\nimport { Code } from \"../proto-grpc/google/rpc/code\";\n\nexport { PlApiPaths };\nexport type PlRestClientType = Client<PlApiPaths>;\n\nexport type RestClientConfig = {\n hostAndPort: string;\n ssl: boolean;\n dispatcher: Dispatcher;\n middlewares: Middleware[];\n};\n\nexport function createClient<Paths extends {}>(opts: RestClientConfig): Client<Paths> {\n const scheme = opts.ssl ? \"https://\" : \"http://\";\n const client = createOpenApiClient<Paths>({\n baseUrl: `${scheme}${opts.hostAndPort}`,\n fetch: (input: Request): Promise<Response> => {\n // If body has already been consumed, clone the request\n const request = input.bodyUsed ? input.clone() : input;\n\n return undiciFetch(request.url, {\n body: request.body,\n cache: request.cache,\n credentials: request.credentials,\n dispatcher: opts.dispatcher,\n duplex: request.duplex,\n headers: request.headers,\n integrity: request.integrity,\n keepalive: request.keepalive,\n method: request.method,\n mode: request.mode,\n redirect: request.redirect,\n referrer: request.referrer,\n referrerPolicy: request.referrerPolicy,\n signal: request.signal,\n });\n },\n });\n client.use(errorHandlerMiddleware(), ...opts.middlewares);\n return client;\n}\n\nexport type ErrorResponse = {\n code: Code;\n message: string;\n details: any[];\n};\nexport async function parseResponseError(response: Response): Promise<{\n error?: ErrorResponse | string;\n origBody?: string;\n}> {\n if (response.status < 400) {\n return {};\n }\n\n let error: any = await response.clone().text();\n const origBody = error;\n try {\n error = JSON.parse(error) as ErrorResponse;\n } catch {}\n return {\n error: error,\n origBody,\n };\n}\n\n/**\n * Parses all API responses and thrown error in case of error response.\n * Allows all callers to not bother about .error response field checking.\n */\nfunction errorHandlerMiddleware(): Middleware {\n return {\n onResponse: async ({ request: _request, response, options: _options }) => {\n const respErr = await parseResponseError(response);\n if (!respErr.error) {\n const { body, ...resOptions } = response;\n return new Response(body, { ...resOptions, status: response.status });\n }\n\n if (typeof respErr.error === \"string\") {\n throw new Error(respErr.error);\n }\n\n rethrowMeaningfulError(new RESTError(respErr.error));\n },\n };\n}\n"],"mappings":";;;;;;;;;;AAsBA,SAAgB,aAA+B,MAAuC;CAEpF,MAAM,UAAA,GAAA,cAAA,SAAoC;EACxC,SAAS,GAFI,KAAK,MAAM,aAAa,YAEhB,KAAK;EAC1B,QAAQ,UAAsC;GAE5C,MAAM,UAAU,MAAM,WAAW,MAAM,OAAO,GAAG;AAEjD,WAAA,GAAA,OAAA,OAAmB,QAAQ,KAAK;IAC9B,MAAM,QAAQ;IACd,OAAO,QAAQ;IACf,aAAa,QAAQ;IACrB,YAAY,KAAK;IACjB,QAAQ,QAAQ;IAChB,SAAS,QAAQ;IACjB,WAAW,QAAQ;IACnB,WAAW,QAAQ;IACnB,QAAQ,QAAQ;IAChB,MAAM,QAAQ;IACd,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,gBAAgB,QAAQ;IACxB,QAAQ,QAAQ;IACjB,CAAC;;EAEL,CAAC;AACF,QAAO,IAAI,wBAAwB,EAAE,GAAG,KAAK,YAAY;AACzD,QAAO;;AAQT,eAAsB,mBAAmB,UAGtC;AACD,KAAI,SAAS,SAAS,IACpB,QAAO,EAAE;CAGX,IAAI,QAAa,MAAM,SAAS,OAAO,CAAC,MAAM;CAC9C,MAAM,WAAW;AACjB,KAAI;AACF,UAAQ,KAAK,MAAM,MAAM;SACnB;AACR,QAAO;EACE;EACP;EACD;;;;;;AAOH,SAAS,yBAAqC;AAC5C,QAAO,EACL,YAAY,OAAO,EAAE,SAAS,UAAU,UAAU,SAAS,eAAe;EACxE,MAAM,UAAU,MAAM,mBAAmB,SAAS;AAClD,MAAI,CAAC,QAAQ,OAAO;GAClB,MAAM,EAAE,MAAM,GAAG,eAAe;AAChC,UAAO,IAAI,SAAS,MAAM;IAAE,GAAG;IAAY,QAAQ,SAAS;IAAQ,CAAC;;AAGvE,MAAI,OAAO,QAAQ,UAAU,SAC3B,OAAM,IAAI,MAAM,QAAQ,MAAM;AAGhC,iBAAA,uBAAuB,IAAIA,eAAAA,UAAU,QAAQ,MAAM,CAAC;IAEvD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/proto-rest/index.ts"],"mappings":";;;;;;;;;KAaY,gBAAA,GAAmB,MAAA,CAAO,KAAA;AAAA,KAE1B,gBAAA;EACV,WAAA;EACA,GAAA;EACA,UAAA,EAAY,UAAA;EACZ,WAAA,EAAa,UAAA;AAAA;AAAA,iBAGC,YAAA,kBAAA,CAA+B,IAAA,EAAM,gBAAA,GAAmB,MAAA,CAAO,KAAA;AAAA,KA8BnE,aAAA;EACV,IAAA,EAAM,IAAA;EACN,OAAA;EACA,OAAA;AAAA;AAAA,iBAEoB,kBAAA,CAAmB,QAAA,EAAU,QAAA,GAAW,OAAA;EAC5D,KAAA,GAAQ,aAAA;EACR,QAAA;AAAA"}
@@ -2,7 +2,6 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { RESTError, rethrowMeaningfulError } from "../core/errors.js";
3
3
  import { fetch } from "undici";
4
4
  import createOpenApiClient from "openapi-fetch";
5
-
6
5
  //#region src/proto-rest/index.ts
7
6
  var proto_rest_exports = /* @__PURE__ */ __exportAll({
8
7
  createClient: () => createClient,
@@ -64,7 +63,7 @@ function errorHandlerMiddleware() {
64
63
  rethrowMeaningfulError(new RESTError(respErr.error));
65
64
  } };
66
65
  }
67
-
68
66
  //#endregion
69
67
  export { createClient, parseResponseError, proto_rest_exports };
68
+
70
69
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["undiciFetch"],"sources":["../../src/proto-rest/index.ts"],"sourcesContent":["//\n// This file is NOT autogenerated!\n//\n// After generating new clients from openapi specifications, add client types here.\n//\n\nimport type { paths as PlApiPaths } from \"./plapi\";\nimport { default as createOpenApiClient, type Middleware, type Client } from \"openapi-fetch\";\nimport { Dispatcher, fetch as undiciFetch } from \"undici\";\nimport { RESTError, rethrowMeaningfulError } from \"../core/errors\";\nimport { Code } from \"../proto-grpc/google/rpc/code\";\n\nexport { PlApiPaths };\nexport type PlRestClientType = Client<PlApiPaths>;\n\nexport type RestClientConfig = {\n hostAndPort: string;\n ssl: boolean;\n dispatcher: Dispatcher;\n middlewares: Middleware[];\n};\n\nexport function createClient<Paths extends {}>(opts: RestClientConfig): Client<Paths> {\n const scheme = opts.ssl ? \"https://\" : \"http://\";\n const client = createOpenApiClient<Paths>({\n baseUrl: `${scheme}${opts.hostAndPort}`,\n fetch: (input: Request): Promise<Response> => {\n // If body has already been consumed, clone the request\n const request = input.bodyUsed ? input.clone() : input;\n\n return undiciFetch(request.url, {\n body: request.body,\n cache: request.cache,\n credentials: request.credentials,\n dispatcher: opts.dispatcher,\n duplex: request.duplex,\n headers: request.headers,\n integrity: request.integrity,\n keepalive: request.keepalive,\n method: request.method,\n mode: request.mode,\n redirect: request.redirect,\n referrer: request.referrer,\n referrerPolicy: request.referrerPolicy,\n signal: request.signal,\n });\n },\n });\n client.use(errorHandlerMiddleware(), ...opts.middlewares);\n return client;\n}\n\nexport type ErrorResponse = {\n code: Code;\n message: string;\n details: any[];\n};\nexport async function parseResponseError(response: Response): Promise<{\n error?: ErrorResponse | string;\n origBody?: string;\n}> {\n if (response.status < 400) {\n return {};\n }\n\n let error: any = await response.clone().text();\n const origBody = error;\n try {\n error = JSON.parse(error) as ErrorResponse;\n } catch {}\n return {\n error: error,\n origBody,\n };\n}\n\n/**\n * Parses all API responses and thrown error in case of error response.\n * Allows all callers to not bother about .error response field checking.\n */\nfunction errorHandlerMiddleware(): Middleware {\n return {\n onResponse: async ({ request: _request, response, options: _options }) => {\n const respErr = await parseResponseError(response);\n if (!respErr.error) {\n const { body, ...resOptions } = response;\n return new Response(body, { ...resOptions, status: response.status });\n }\n\n if (typeof respErr.error === \"string\") {\n throw new Error(respErr.error);\n }\n\n rethrowMeaningfulError(new RESTError(respErr.error));\n },\n };\n}\n"],"mappings":";;;;;;;;;;AAsBA,SAAgB,aAA+B,MAAuC;CAEpF,MAAM,SAAS,oBAA2B;EACxC,SAAS,GAFI,KAAK,MAAM,aAAa,YAEhB,KAAK;EAC1B,QAAQ,UAAsC;GAE5C,MAAM,UAAU,MAAM,WAAW,MAAM,OAAO,GAAG;AAEjD,UAAOA,MAAY,QAAQ,KAAK;IAC9B,MAAM,QAAQ;IACd,OAAO,QAAQ;IACf,aAAa,QAAQ;IACrB,YAAY,KAAK;IACjB,QAAQ,QAAQ;IAChB,SAAS,QAAQ;IACjB,WAAW,QAAQ;IACnB,WAAW,QAAQ;IACnB,QAAQ,QAAQ;IAChB,MAAM,QAAQ;IACd,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,gBAAgB,QAAQ;IACxB,QAAQ,QAAQ;IACjB,CAAC;;EAEL,CAAC;AACF,QAAO,IAAI,wBAAwB,EAAE,GAAG,KAAK,YAAY;AACzD,QAAO;;AAQT,eAAsB,mBAAmB,UAGtC;AACD,KAAI,SAAS,SAAS,IACpB,QAAO,EAAE;CAGX,IAAI,QAAa,MAAM,SAAS,OAAO,CAAC,MAAM;CAC9C,MAAM,WAAW;AACjB,KAAI;AACF,UAAQ,KAAK,MAAM,MAAM;SACnB;AACR,QAAO;EACE;EACP;EACD;;;;;;AAOH,SAAS,yBAAqC;AAC5C,QAAO,EACL,YAAY,OAAO,EAAE,SAAS,UAAU,UAAU,SAAS,eAAe;EACxE,MAAM,UAAU,MAAM,mBAAmB,SAAS;AAClD,MAAI,CAAC,QAAQ,OAAO;GAClB,MAAM,EAAE,MAAM,GAAG,eAAe;AAChC,UAAO,IAAI,SAAS,MAAM;IAAE,GAAG;IAAY,QAAQ,SAAS;IAAQ,CAAC;;AAGvE,MAAI,OAAO,QAAQ,UAAU,SAC3B,OAAM,IAAI,MAAM,QAAQ,MAAM;AAGhC,yBAAuB,IAAI,UAAU,QAAQ,MAAM,CAAC;IAEvD"}
1
+ {"version":3,"file":"index.js","names":["undiciFetch"],"sources":["../../src/proto-rest/index.ts"],"sourcesContent":["//\n// This file is NOT autogenerated!\n//\n// After generating new clients from openapi specifications, add client types here.\n//\n\nimport type { paths as PlApiPaths } from \"./plapi\";\nimport { default as createOpenApiClient, type Middleware, type Client } from \"openapi-fetch\";\nimport { Dispatcher, fetch as undiciFetch } from \"undici\";\nimport { RESTError, rethrowMeaningfulError } from \"../core/errors\";\nimport { Code } from \"../proto-grpc/google/rpc/code\";\n\nexport { PlApiPaths };\nexport type PlRestClientType = Client<PlApiPaths>;\n\nexport type RestClientConfig = {\n hostAndPort: string;\n ssl: boolean;\n dispatcher: Dispatcher;\n middlewares: Middleware[];\n};\n\nexport function createClient<Paths extends {}>(opts: RestClientConfig): Client<Paths> {\n const scheme = opts.ssl ? \"https://\" : \"http://\";\n const client = createOpenApiClient<Paths>({\n baseUrl: `${scheme}${opts.hostAndPort}`,\n fetch: (input: Request): Promise<Response> => {\n // If body has already been consumed, clone the request\n const request = input.bodyUsed ? input.clone() : input;\n\n return undiciFetch(request.url, {\n body: request.body,\n cache: request.cache,\n credentials: request.credentials,\n dispatcher: opts.dispatcher,\n duplex: request.duplex,\n headers: request.headers,\n integrity: request.integrity,\n keepalive: request.keepalive,\n method: request.method,\n mode: request.mode,\n redirect: request.redirect,\n referrer: request.referrer,\n referrerPolicy: request.referrerPolicy,\n signal: request.signal,\n });\n },\n });\n client.use(errorHandlerMiddleware(), ...opts.middlewares);\n return client;\n}\n\nexport type ErrorResponse = {\n code: Code;\n message: string;\n details: any[];\n};\nexport async function parseResponseError(response: Response): Promise<{\n error?: ErrorResponse | string;\n origBody?: string;\n}> {\n if (response.status < 400) {\n return {};\n }\n\n let error: any = await response.clone().text();\n const origBody = error;\n try {\n error = JSON.parse(error) as ErrorResponse;\n } catch {}\n return {\n error: error,\n origBody,\n };\n}\n\n/**\n * Parses all API responses and thrown error in case of error response.\n * Allows all callers to not bother about .error response field checking.\n */\nfunction errorHandlerMiddleware(): Middleware {\n return {\n onResponse: async ({ request: _request, response, options: _options }) => {\n const respErr = await parseResponseError(response);\n if (!respErr.error) {\n const { body, ...resOptions } = response;\n return new Response(body, { ...resOptions, status: response.status });\n }\n\n if (typeof respErr.error === \"string\") {\n throw new Error(respErr.error);\n }\n\n rethrowMeaningfulError(new RESTError(respErr.error));\n },\n };\n}\n"],"mappings":";;;;;;;;;AAsBA,SAAgB,aAA+B,MAAuC;CAEpF,MAAM,SAAS,oBAA2B;EACxC,SAAS,GAFI,KAAK,MAAM,aAAa,YAEhB,KAAK;EAC1B,QAAQ,UAAsC;GAE5C,MAAM,UAAU,MAAM,WAAW,MAAM,OAAO,GAAG;AAEjD,UAAOA,MAAY,QAAQ,KAAK;IAC9B,MAAM,QAAQ;IACd,OAAO,QAAQ;IACf,aAAa,QAAQ;IACrB,YAAY,KAAK;IACjB,QAAQ,QAAQ;IAChB,SAAS,QAAQ;IACjB,WAAW,QAAQ;IACnB,WAAW,QAAQ;IACnB,QAAQ,QAAQ;IAChB,MAAM,QAAQ;IACd,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,gBAAgB,QAAQ;IACxB,QAAQ,QAAQ;IACjB,CAAC;;EAEL,CAAC;AACF,QAAO,IAAI,wBAAwB,EAAE,GAAG,KAAK,YAAY;AACzD,QAAO;;AAQT,eAAsB,mBAAmB,UAGtC;AACD,KAAI,SAAS,SAAS,IACpB,QAAO,EAAE;CAGX,IAAI,QAAa,MAAM,SAAS,OAAO,CAAC,MAAM;CAC9C,MAAM,WAAW;AACjB,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ACG,IAAA;QAAA;QAEH,OAAA;UACE,kBAAA,EAAoB,UAAA;QAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1,11 +1,10 @@
1
- const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
1
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
2
2
  let node_timers_promises = require("node:timers/promises");
3
3
  node_timers_promises = require_runtime.__toESM(node_timers_promises);
4
4
  let node_net = require("node:net");
5
5
  node_net = require_runtime.__toESM(node_net);
6
6
  let node_stream = require("node:stream");
7
7
  let node_stream_promises = require("node:stream/promises");
8
-
9
8
  //#region src/test/tcp-proxy.ts
10
9
  async function startTcpProxy(options) {
11
10
  const { port, targetPort } = options;
@@ -99,7 +98,7 @@ async function startTcpProxy(options) {
99
98
  }
100
99
  };
101
100
  }
102
-
103
101
  //#endregion
104
102
  exports.startTcpProxy = startTcpProxy;
103
+
105
104
  //# sourceMappingURL=tcp-proxy.cjs.map