@milaboratories/pl-client 3.4.1 → 3.5.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 (67) hide show
  1. package/dist/core/final.cjs.map +1 -1
  2. package/dist/core/final.js.map +1 -1
  3. package/dist/core/ll_client.cjs +7 -1
  4. package/dist/core/ll_client.cjs.map +1 -1
  5. package/dist/core/ll_client.d.ts.map +1 -1
  6. package/dist/core/ll_client.js +7 -1
  7. package/dist/core/ll_client.js.map +1 -1
  8. package/dist/core/ll_transaction.cjs +151 -26
  9. package/dist/core/ll_transaction.cjs.map +1 -1
  10. package/dist/core/ll_transaction.d.ts +1 -0
  11. package/dist/core/ll_transaction.d.ts.map +1 -1
  12. package/dist/core/ll_transaction.js +151 -26
  13. package/dist/core/ll_transaction.js.map +1 -1
  14. package/dist/core/transaction.cjs +89 -0
  15. package/dist/core/transaction.cjs.map +1 -1
  16. package/dist/core/transaction.d.ts +47 -1
  17. package/dist/core/transaction.d.ts.map +1 -1
  18. package/dist/core/transaction.js +90 -1
  19. package/dist/core/transaction.js.map +1 -1
  20. package/dist/core/tree_filter.cjs +106 -0
  21. package/dist/core/tree_filter.cjs.map +1 -0
  22. package/dist/core/tree_filter.d.ts +85 -0
  23. package/dist/core/tree_filter.d.ts.map +1 -0
  24. package/dist/core/tree_filter.js +106 -0
  25. package/dist/core/tree_filter.js.map +1 -0
  26. package/dist/core/type_conversion.cjs +1 -0
  27. package/dist/core/type_conversion.cjs.map +1 -1
  28. package/dist/core/type_conversion.js +1 -1
  29. package/dist/core/type_conversion.js.map +1 -1
  30. package/dist/index.cjs +5 -0
  31. package/dist/index.d.ts +4 -2
  32. package/dist/index.js +3 -1
  33. package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.cjs.map +1 -1
  34. package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.js.map +1 -1
  35. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs +450 -4
  36. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs.map +1 -1
  37. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +328 -2
  38. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +1 -1
  39. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js +449 -5
  40. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js.map +1 -1
  41. package/dist/proto-grpc/google/protobuf/timestamp.cjs.map +1 -1
  42. package/dist/proto-grpc/google/protobuf/timestamp.d.ts +9 -8
  43. package/dist/proto-grpc/google/protobuf/timestamp.d.ts.map +1 -1
  44. package/dist/proto-grpc/google/protobuf/timestamp.js.map +1 -1
  45. package/dist/proto-grpc/google/rpc/code.cjs.map +1 -1
  46. package/dist/proto-grpc/google/rpc/code.js.map +1 -1
  47. package/package.json +5 -5
  48. package/src/core/final.ts +1 -1
  49. package/src/core/ll_client.ts +11 -1
  50. package/src/core/ll_transaction.test.ts +13 -18
  51. package/src/core/ll_transaction.ts +237 -60
  52. package/src/core/transaction.test.ts +38 -0
  53. package/src/core/transaction.ts +136 -1
  54. package/src/core/tree_filter.test.ts +217 -0
  55. package/src/core/tree_filter.ts +182 -0
  56. package/src/core/type_conversion.ts +1 -1
  57. package/src/index.ts +1 -0
  58. package/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts +1 -1
  59. package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts +604 -6
  60. package/src/proto-grpc/google/api/http.ts +1 -1
  61. package/src/proto-grpc/google/protobuf/descriptor.ts +242 -12
  62. package/src/proto-grpc/google/protobuf/timestamp.ts +9 -8
  63. package/src/proto-grpc/google/protobuf/wrappers.ts +38 -4
  64. package/src/proto-grpc/google/rpc/code.ts +1 -1
  65. package/src/proto-grpc/google/rpc/error_details.ts +5 -5
  66. package/src/proto-grpc/google/rpc/http.ts +1 -1
  67. package/src/proto-grpc/google/rpc/status.ts +1 -1
@@ -1742,6 +1742,242 @@ export interface ResourceAPI_Tree_Request {
1742
1742
  * @generated from protobuf field: optional uint32 max_depth = 2
1743
1743
  */
1744
1744
  maxDepth?: number;
1745
+ /**
1746
+ * Optional per-(resource, field) filter. Unset / nil means
1747
+ * "keep all fields" (current Tree behavior). Servers advertise
1748
+ * support via "treeFilter:v1" in
1749
+ * MaintenanceAPI.Ping.Response.capabilities; old servers ignore this
1750
+ * field.
1751
+ *
1752
+ * If a field matches the predicate, the traversal does not descend
1753
+ * into that field's value.
1754
+ *
1755
+ * Only one filter is accepted. Compose multiple rules into a single
1756
+ * predicate via AND/OR/NOT groups.
1757
+ *
1758
+ * @generated from protobuf field: optional MiLaboratories.PL.API.ResourceAPI.Tree.Filter field_filter = 5
1759
+ */
1760
+ fieldFilter?: ResourceAPI_Tree_Filter;
1761
+ /**
1762
+ * If true, the response carries per-resource key-values alongside
1763
+ * each visited resource. Defaults to false. Old servers ignore this
1764
+ * field and never populate Response.kv.
1765
+ *
1766
+ * @generated from protobuf field: bool include_kv = 6
1767
+ */
1768
+ includeKv: boolean;
1769
+ /**
1770
+ * Optional predicate evaluated at the resource (not field) level.
1771
+ * When set, the traversal does not descend into child resources that do not
1772
+ * satisfy the predicate but resource still returns in the response.
1773
+ *
1774
+ * Each Tree.Response carries traverse_was_stopped=true if this
1775
+ * resource satisfies the predicate.
1776
+ *
1777
+ * Available properties: resource_type (string), is_final (bool),
1778
+ * resource_ready (bool), has_errors (bool), inputs_locked (bool),
1779
+ * outputs_locked (bool). Old servers ignore this field and never
1780
+ * set traverse_was_stopped.
1781
+ *
1782
+ * @generated from protobuf field: optional MiLaboratories.PL.API.ResourceAPI.Tree.Filter traverse_stop_rules = 7
1783
+ */
1784
+ traverseStopRules?: ResourceAPI_Tree_Filter;
1785
+ /**
1786
+ * Optional alternative entry points for multi-root traversal.
1787
+ * When non-empty, the traversal starts from each listed seed instead
1788
+ * of resource_id. Servers advertise support via "treeSeeds:v1" in
1789
+ * MaintenanceAPI.Ping.Response.capabilities; old servers ignore this
1790
+ * field. resource_id is used as the sole root when seeds is empty.
1791
+ *
1792
+ * @generated from protobuf field: repeated MiLaboratories.PL.API.ResourceAPI.Tree.SeedResource seeds = 8
1793
+ */
1794
+ seeds: ResourceAPI_Tree_SeedResource[];
1795
+ }
1796
+ /**
1797
+ * A single entry point for multi-root tree traversal.
1798
+ *
1799
+ * @generated from protobuf message MiLaboratories.PL.API.ResourceAPI.Tree.SeedResource
1800
+ */
1801
+ export interface ResourceAPI_Tree_SeedResource {
1802
+ /**
1803
+ * @generated from protobuf field: uint64 resource_id = 1
1804
+ */
1805
+ resourceId: bigint;
1806
+ /**
1807
+ * @generated from protobuf field: bytes resource_signature = 2
1808
+ */
1809
+ resourceSignature: Uint8Array;
1810
+ }
1811
+ /**
1812
+ * Filter applied to each visited resource's fields during the walk.
1813
+ * The filter is evaluated per (resource, field) pair. If the property
1814
+ * specified by `key` matches the `value` according to the `operator`,
1815
+ * the field is kept; otherwise, it is dropped. A dropped field is not
1816
+ * descended into. Resources are always emitted; when all of a resource's
1817
+ * fields are dropped, descent stops naturally.
1818
+ * Filter evaluated per (resource, field) pair.
1819
+ *
1820
+ * Leaf filter (EQUAL/NOT_EQUAL/MATCH/NOT_MATCH): key is required and
1821
+ * selects which property to test; value carries the expected scalar.
1822
+ *
1823
+ * Composite filter (OR/AND/NOT): key is absent, filters_value carries
1824
+ * sub-filters combined with the chosen operator. OR/AND/NOT may be nested
1825
+ * arbitrarily. Top-level filters (in Tree.Request.filters) are AND-combined.
1826
+ * NOT requires exactly one sub-filter. Dropped fields are not descended into.
1827
+ *
1828
+ * @generated from protobuf message MiLaboratories.PL.API.ResourceAPI.Tree.Filter
1829
+ */
1830
+ export interface ResourceAPI_Tree_Filter {
1831
+ /**
1832
+ * Required for leaf operators (EQUAL/MATCH).
1833
+ * Absent when operator == OR, AND, or NOT.
1834
+ *
1835
+ * @generated from protobuf field: optional MiLaboratories.PL.API.ResourceAPI.Tree.Filter.Property key = 1
1836
+ */
1837
+ key?: ResourceAPI_Tree_Filter_Property;
1838
+ /**
1839
+ * @generated from protobuf field: MiLaboratories.PL.API.ResourceAPI.Tree.Filter.OperatorType operator = 2
1840
+ */
1841
+ operator: ResourceAPI_Tree_Filter_OperatorType;
1842
+ /**
1843
+ * @generated from protobuf oneof: value
1844
+ */
1845
+ value: {
1846
+ oneofKind: "boolValue";
1847
+ /**
1848
+ * @generated from protobuf field: bool bool_value = 3
1849
+ */
1850
+ boolValue: boolean;
1851
+ } | {
1852
+ oneofKind: "stringValue";
1853
+ /**
1854
+ * @generated from protobuf field: string string_value = 4
1855
+ */
1856
+ stringValue: string;
1857
+ } | {
1858
+ oneofKind: "filtersValue";
1859
+ /**
1860
+ * Used when operator == OR, AND, or NOT.
1861
+ *
1862
+ * @generated from protobuf field: MiLaboratories.PL.API.ResourceAPI.Tree.Filter.FilterGroup filters_value = 5
1863
+ */
1864
+ filtersValue: ResourceAPI_Tree_Filter_FilterGroup;
1865
+ } | {
1866
+ oneofKind: undefined;
1867
+ };
1868
+ }
1869
+ /**
1870
+ * Wrapper for repeated Filter (oneof cannot contain repeated fields directly).
1871
+ *
1872
+ * @generated from protobuf message MiLaboratories.PL.API.ResourceAPI.Tree.Filter.FilterGroup
1873
+ */
1874
+ export interface ResourceAPI_Tree_Filter_FilterGroup {
1875
+ /**
1876
+ * @generated from protobuf field: repeated MiLaboratories.PL.API.ResourceAPI.Tree.Filter filters = 1
1877
+ */
1878
+ filters: ResourceAPI_Tree_Filter[];
1879
+ }
1880
+ /**
1881
+ * @generated from protobuf enum MiLaboratories.PL.API.ResourceAPI.Tree.Filter.OperatorType
1882
+ */
1883
+ export enum ResourceAPI_Tree_Filter_OperatorType {
1884
+ /**
1885
+ * @generated from protobuf enum value: UNSPECIFIED = 0;
1886
+ */
1887
+ UNSPECIFIED = 0,
1888
+ /**
1889
+ * @generated from protobuf enum value: EQUAL = 1;
1890
+ */
1891
+ EQUAL = 1,
1892
+ /**
1893
+ * @generated from protobuf enum value: MATCH = 2;
1894
+ */
1895
+ MATCH = 2,
1896
+ /**
1897
+ * @generated from protobuf enum value: OR = 3;
1898
+ */
1899
+ OR = 3,
1900
+ /**
1901
+ * @generated from protobuf enum value: AND = 4;
1902
+ */
1903
+ AND = 4,
1904
+ /**
1905
+ * @generated from protobuf enum value: NOT = 5;
1906
+ */
1907
+ NOT = 5
1908
+ }
1909
+ /**
1910
+ * @generated from protobuf enum MiLaboratories.PL.API.ResourceAPI.Tree.Filter.Property
1911
+ */
1912
+ export enum ResourceAPI_Tree_Filter_Property {
1913
+ /**
1914
+ * @generated from protobuf enum value: FIELD_NAME = 0;
1915
+ */
1916
+ FIELD_NAME = 0,
1917
+ /**
1918
+ * @generated from protobuf enum value: RESOURCE_TYPE = 1;
1919
+ */
1920
+ RESOURCE_TYPE = 1,
1921
+ /**
1922
+ * Status().IsFinal(): true when status is Original, Duplicate, or Error.
1923
+ * Does NOT require AllInputsFinal — a resource with unresolved input fields
1924
+ * can still report IS_FINAL=true if its own status is terminal. Use
1925
+ * RESOURCE_READY_FOR_CALCULATION + IS_DUPLICATE + HAS_ERRORS to mirror the
1926
+ * client-side readyOrDuplicateOrError predicate precisely.
1927
+ *
1928
+ * @generated from protobuf enum value: IS_FINAL = 2;
1929
+ */
1930
+ IS_FINAL = 2,
1931
+ /**
1932
+ * Evaluated per resource node (traverse_stop_rules only). True when every non-error
1933
+ * output field has a final value. Matches the TypeScript readyAndHasAllOutputsFilled check.
1934
+ *
1935
+ * @generated from protobuf enum value: ALL_OUTPUTS_FINAL = 3;
1936
+ */
1937
+ ALL_OUTPUTS_FINAL = 3,
1938
+ /**
1939
+ * IsReadyForCalculation(): Status==Original AND AllInputsFinal AND no input errors AND IO feature.
1940
+ * Mirrors the client-side r.resourceReady property used in readyOrDuplicateOrError.
1941
+ *
1942
+ * @generated from protobuf enum value: RESOURCE_READY_FOR_CALCULATION = 4;
1943
+ */
1944
+ RESOURCE_READY_FOR_CALCULATION = 4,
1945
+ /**
1946
+ * True when status is Duplicate (original_resource_id != 0). Mirrors the
1947
+ * isNotNullSignedResourceId(r.originalResourceId) branch of readyOrDuplicateOrError.
1948
+ *
1949
+ * @generated from protobuf enum value: IS_DUPLICATE = 5;
1950
+ */
1951
+ IS_DUPLICATE = 5,
1952
+ /**
1953
+ * True when the resource has at least one field carrying an error
1954
+ * (aggregated has-error flag). Mirrors the isNotNullSignedResourceId(r.error)
1955
+ * branch of readyOrDuplicateOrError. Note: this can be true even when the
1956
+ * resource's own status is not Error (e.g., an Original resource with a
1957
+ * failed input field).
1958
+ *
1959
+ * @generated from protobuf enum value: HAS_ERRORS = 6;
1960
+ */
1961
+ HAS_ERRORS = 6,
1962
+ /**
1963
+ * True when no further output fields can be added to the resource.
1964
+ *
1965
+ * @generated from protobuf enum value: OUTPUTS_LOCKED = 7;
1966
+ */
1967
+ OUTPUTS_LOCKED = 7
1968
+ }
1969
+ /**
1970
+ * @generated from protobuf message MiLaboratories.PL.API.ResourceAPI.Tree.KV
1971
+ */
1972
+ export interface ResourceAPI_Tree_KV {
1973
+ /**
1974
+ * @generated from protobuf field: string key = 1
1975
+ */
1976
+ key: string;
1977
+ /**
1978
+ * @generated from protobuf field: bytes value = 2
1979
+ */
1980
+ value: Uint8Array;
1745
1981
  }
1746
1982
  /**
1747
1983
  * Multi-message
@@ -1750,9 +1986,44 @@ export interface ResourceAPI_Tree_Request {
1750
1986
  */
1751
1987
  export interface ResourceAPI_Tree_Response {
1752
1988
  /**
1753
- * @generated from protobuf field: MiLaboratories.PL.API.Resource resource = 1
1989
+ * Full resource payload. Absent on stop-marker frames (when the server
1990
+ * advertises `treeStopMarker:v1` and traverse_was_stopped is true).
1991
+ * Always populated on normal frames.
1992
+ *
1993
+ * @generated from protobuf field: optional MiLaboratories.PL.API.Resource resource = 1
1754
1994
  */
1755
1995
  resource?: Resource;
1996
+ /**
1997
+ * Populated only when include_kv=true in the request.
1998
+ *
1999
+ * @generated from protobuf field: repeated MiLaboratories.PL.API.ResourceAPI.Tree.KV kv = 2
2000
+ */
2001
+ kv: ResourceAPI_Tree_KV[];
2002
+ /**
2003
+ * True when the request specified a traverse_stop_rules and this resource
2004
+ * satisfied it. Always false when traverse_stop_rules was absent.
2005
+ *
2006
+ * When the server advertises `treeStopMarker:v1`, a stop-marker frame has
2007
+ * traverse_was_stopped=true with resource unset; resource_id and
2008
+ * resource_signature carry the identity of the stopped node instead.
2009
+ * On normal frames (traverse_was_stopped=false or server without the
2010
+ * capability) resource is always populated and resource_id/resource_signature
2011
+ * are zero/empty.
2012
+ *
2013
+ * @generated from protobuf field: bool traverse_was_stopped = 3
2014
+ */
2015
+ traverseWasStopped: boolean;
2016
+ /**
2017
+ * Populated only on stop-marker frames (resource is unset).
2018
+ * Zero / empty on normal frames; use resource.resource_id instead.
2019
+ *
2020
+ * @generated from protobuf field: uint64 resource_id = 4
2021
+ */
2022
+ resourceId: bigint;
2023
+ /**
2024
+ * @generated from protobuf field: bytes resource_signature = 5
2025
+ */
2026
+ resourceSignature: Uint8Array;
1756
2027
  }
1757
2028
  /**
1758
2029
  * @generated from protobuf message MiLaboratories.PL.API.ResourceAPI.TreeSize
@@ -3728,6 +3999,21 @@ export interface MaintenanceAPI_Ping_Response {
3728
3999
  * @generated from protobuf field: string arch = 8
3729
4000
  */
3730
4001
  arch: string; // x64 / aarch64
4002
+ /**
4003
+ * Opt-in capabilities advertised by this server instance, used by
4004
+ * clients to pick between fast and fallback code paths without waiting
4005
+ * for a failed RPC.
4006
+ *
4007
+ * Each entry is an opaque token "<feature>:<version>" (e.g.
4008
+ * "loadSubtree:v1"). Unrecognized tokens are ignored by the client.
4009
+ * The field is unset on servers predating this mechanism, which the
4010
+ * client treats as "no optional capabilities advertised".
4011
+ *
4012
+ * All list see pl/platform/api/plapiserver/server_capabilities.go
4013
+ *
4014
+ * @generated from protobuf field: repeated string capabilities = 9
4015
+ */
4016
+ capabilities: string[];
3731
4017
  }
3732
4018
  /**
3733
4019
  * @generated from protobuf enum MiLaboratories.PL.API.MaintenanceAPI.Ping.Response.Compression
@@ -8889,13 +9175,19 @@ class ResourceAPI_Tree_Request$Type extends MessageType<ResourceAPI_Tree_Request
8889
9175
  super("MiLaboratories.PL.API.ResourceAPI.Tree.Request", [
8890
9176
  { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
8891
9177
  { no: 3, name: "resource_signature", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
8892
- { no: 2, name: "max_depth", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }
9178
+ { no: 2, name: "max_depth", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ },
9179
+ { no: 5, name: "field_filter", kind: "message", T: () => ResourceAPI_Tree_Filter },
9180
+ { no: 6, name: "include_kv", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
9181
+ { no: 7, name: "traverse_stop_rules", kind: "message", T: () => ResourceAPI_Tree_Filter },
9182
+ { no: 8, name: "seeds", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ResourceAPI_Tree_SeedResource }
8893
9183
  ]);
8894
9184
  }
8895
9185
  create(value?: PartialMessage<ResourceAPI_Tree_Request>): ResourceAPI_Tree_Request {
8896
9186
  const message = globalThis.Object.create((this.messagePrototype!));
8897
9187
  message.resourceId = 0n;
8898
9188
  message.resourceSignature = new Uint8Array(0);
9189
+ message.includeKv = false;
9190
+ message.seeds = [];
8899
9191
  if (value !== undefined)
8900
9192
  reflectionMergePartial<ResourceAPI_Tree_Request>(this, message, value);
8901
9193
  return message;
@@ -8914,6 +9206,18 @@ class ResourceAPI_Tree_Request$Type extends MessageType<ResourceAPI_Tree_Request
8914
9206
  case /* optional uint32 max_depth */ 2:
8915
9207
  message.maxDepth = reader.uint32();
8916
9208
  break;
9209
+ case /* optional MiLaboratories.PL.API.ResourceAPI.Tree.Filter field_filter */ 5:
9210
+ message.fieldFilter = ResourceAPI_Tree_Filter.internalBinaryRead(reader, reader.uint32(), options, message.fieldFilter);
9211
+ break;
9212
+ case /* bool include_kv */ 6:
9213
+ message.includeKv = reader.bool();
9214
+ break;
9215
+ case /* optional MiLaboratories.PL.API.ResourceAPI.Tree.Filter traverse_stop_rules */ 7:
9216
+ message.traverseStopRules = ResourceAPI_Tree_Filter.internalBinaryRead(reader, reader.uint32(), options, message.traverseStopRules);
9217
+ break;
9218
+ case /* repeated MiLaboratories.PL.API.ResourceAPI.Tree.SeedResource seeds */ 8:
9219
+ message.seeds.push(ResourceAPI_Tree_SeedResource.internalBinaryRead(reader, reader.uint32(), options));
9220
+ break;
8917
9221
  default:
8918
9222
  let u = options.readUnknownField;
8919
9223
  if (u === "throw")
@@ -8935,6 +9239,18 @@ class ResourceAPI_Tree_Request$Type extends MessageType<ResourceAPI_Tree_Request
8935
9239
  /* bytes resource_signature = 3; */
8936
9240
  if (message.resourceSignature.length)
8937
9241
  writer.tag(3, WireType.LengthDelimited).bytes(message.resourceSignature);
9242
+ /* optional MiLaboratories.PL.API.ResourceAPI.Tree.Filter field_filter = 5; */
9243
+ if (message.fieldFilter)
9244
+ ResourceAPI_Tree_Filter.internalBinaryWrite(message.fieldFilter, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
9245
+ /* bool include_kv = 6; */
9246
+ if (message.includeKv !== false)
9247
+ writer.tag(6, WireType.Varint).bool(message.includeKv);
9248
+ /* optional MiLaboratories.PL.API.ResourceAPI.Tree.Filter traverse_stop_rules = 7; */
9249
+ if (message.traverseStopRules)
9250
+ ResourceAPI_Tree_Filter.internalBinaryWrite(message.traverseStopRules, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
9251
+ /* repeated MiLaboratories.PL.API.ResourceAPI.Tree.SeedResource seeds = 8; */
9252
+ for (let i = 0; i < message.seeds.length; i++)
9253
+ ResourceAPI_Tree_SeedResource.internalBinaryWrite(message.seeds[i], writer.tag(8, WireType.LengthDelimited).fork(), options).join();
8938
9254
  let u = options.writeUnknownFields;
8939
9255
  if (u !== false)
8940
9256
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -8946,14 +9262,264 @@ class ResourceAPI_Tree_Request$Type extends MessageType<ResourceAPI_Tree_Request
8946
9262
  */
8947
9263
  export const ResourceAPI_Tree_Request = new ResourceAPI_Tree_Request$Type();
8948
9264
  // @generated message type with reflection information, may provide speed optimized methods
9265
+ class ResourceAPI_Tree_SeedResource$Type extends MessageType<ResourceAPI_Tree_SeedResource> {
9266
+ constructor() {
9267
+ super("MiLaboratories.PL.API.ResourceAPI.Tree.SeedResource", [
9268
+ { no: 1, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
9269
+ { no: 2, name: "resource_signature", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
9270
+ ]);
9271
+ }
9272
+ create(value?: PartialMessage<ResourceAPI_Tree_SeedResource>): ResourceAPI_Tree_SeedResource {
9273
+ const message = globalThis.Object.create((this.messagePrototype!));
9274
+ message.resourceId = 0n;
9275
+ message.resourceSignature = new Uint8Array(0);
9276
+ if (value !== undefined)
9277
+ reflectionMergePartial<ResourceAPI_Tree_SeedResource>(this, message, value);
9278
+ return message;
9279
+ }
9280
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceAPI_Tree_SeedResource): ResourceAPI_Tree_SeedResource {
9281
+ let message = target ?? this.create(), end = reader.pos + length;
9282
+ while (reader.pos < end) {
9283
+ let [fieldNo, wireType] = reader.tag();
9284
+ switch (fieldNo) {
9285
+ case /* uint64 resource_id */ 1:
9286
+ message.resourceId = reader.uint64().toBigInt();
9287
+ break;
9288
+ case /* bytes resource_signature */ 2:
9289
+ message.resourceSignature = reader.bytes();
9290
+ break;
9291
+ default:
9292
+ let u = options.readUnknownField;
9293
+ if (u === "throw")
9294
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
9295
+ let d = reader.skip(wireType);
9296
+ if (u !== false)
9297
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
9298
+ }
9299
+ }
9300
+ return message;
9301
+ }
9302
+ internalBinaryWrite(message: ResourceAPI_Tree_SeedResource, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
9303
+ /* uint64 resource_id = 1; */
9304
+ if (message.resourceId !== 0n)
9305
+ writer.tag(1, WireType.Varint).uint64(message.resourceId);
9306
+ /* bytes resource_signature = 2; */
9307
+ if (message.resourceSignature.length)
9308
+ writer.tag(2, WireType.LengthDelimited).bytes(message.resourceSignature);
9309
+ let u = options.writeUnknownFields;
9310
+ if (u !== false)
9311
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
9312
+ return writer;
9313
+ }
9314
+ }
9315
+ /**
9316
+ * @generated MessageType for protobuf message MiLaboratories.PL.API.ResourceAPI.Tree.SeedResource
9317
+ */
9318
+ export const ResourceAPI_Tree_SeedResource = new ResourceAPI_Tree_SeedResource$Type();
9319
+ // @generated message type with reflection information, may provide speed optimized methods
9320
+ class ResourceAPI_Tree_Filter$Type extends MessageType<ResourceAPI_Tree_Filter> {
9321
+ constructor() {
9322
+ super("MiLaboratories.PL.API.ResourceAPI.Tree.Filter", [
9323
+ { no: 1, name: "key", kind: "enum", opt: true, T: () => ["MiLaboratories.PL.API.ResourceAPI.Tree.Filter.Property", ResourceAPI_Tree_Filter_Property] },
9324
+ { no: 2, name: "operator", kind: "enum", T: () => ["MiLaboratories.PL.API.ResourceAPI.Tree.Filter.OperatorType", ResourceAPI_Tree_Filter_OperatorType] },
9325
+ { no: 3, name: "bool_value", kind: "scalar", oneof: "value", T: 8 /*ScalarType.BOOL*/ },
9326
+ { no: 4, name: "string_value", kind: "scalar", oneof: "value", T: 9 /*ScalarType.STRING*/ },
9327
+ { no: 5, name: "filters_value", kind: "message", oneof: "value", T: () => ResourceAPI_Tree_Filter_FilterGroup }
9328
+ ]);
9329
+ }
9330
+ create(value?: PartialMessage<ResourceAPI_Tree_Filter>): ResourceAPI_Tree_Filter {
9331
+ const message = globalThis.Object.create((this.messagePrototype!));
9332
+ message.operator = 0;
9333
+ message.value = { oneofKind: undefined };
9334
+ if (value !== undefined)
9335
+ reflectionMergePartial<ResourceAPI_Tree_Filter>(this, message, value);
9336
+ return message;
9337
+ }
9338
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceAPI_Tree_Filter): ResourceAPI_Tree_Filter {
9339
+ let message = target ?? this.create(), end = reader.pos + length;
9340
+ while (reader.pos < end) {
9341
+ let [fieldNo, wireType] = reader.tag();
9342
+ switch (fieldNo) {
9343
+ case /* optional MiLaboratories.PL.API.ResourceAPI.Tree.Filter.Property key */ 1:
9344
+ message.key = reader.int32();
9345
+ break;
9346
+ case /* MiLaboratories.PL.API.ResourceAPI.Tree.Filter.OperatorType operator */ 2:
9347
+ message.operator = reader.int32();
9348
+ break;
9349
+ case /* bool bool_value */ 3:
9350
+ message.value = {
9351
+ oneofKind: "boolValue",
9352
+ boolValue: reader.bool()
9353
+ };
9354
+ break;
9355
+ case /* string string_value */ 4:
9356
+ message.value = {
9357
+ oneofKind: "stringValue",
9358
+ stringValue: reader.string()
9359
+ };
9360
+ break;
9361
+ case /* MiLaboratories.PL.API.ResourceAPI.Tree.Filter.FilterGroup filters_value */ 5:
9362
+ message.value = {
9363
+ oneofKind: "filtersValue",
9364
+ filtersValue: ResourceAPI_Tree_Filter_FilterGroup.internalBinaryRead(reader, reader.uint32(), options, (message.value as any).filtersValue)
9365
+ };
9366
+ break;
9367
+ default:
9368
+ let u = options.readUnknownField;
9369
+ if (u === "throw")
9370
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
9371
+ let d = reader.skip(wireType);
9372
+ if (u !== false)
9373
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
9374
+ }
9375
+ }
9376
+ return message;
9377
+ }
9378
+ internalBinaryWrite(message: ResourceAPI_Tree_Filter, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
9379
+ /* optional MiLaboratories.PL.API.ResourceAPI.Tree.Filter.Property key = 1; */
9380
+ if (message.key !== undefined)
9381
+ writer.tag(1, WireType.Varint).int32(message.key);
9382
+ /* MiLaboratories.PL.API.ResourceAPI.Tree.Filter.OperatorType operator = 2; */
9383
+ if (message.operator !== 0)
9384
+ writer.tag(2, WireType.Varint).int32(message.operator);
9385
+ /* bool bool_value = 3; */
9386
+ if (message.value.oneofKind === "boolValue")
9387
+ writer.tag(3, WireType.Varint).bool(message.value.boolValue);
9388
+ /* string string_value = 4; */
9389
+ if (message.value.oneofKind === "stringValue")
9390
+ writer.tag(4, WireType.LengthDelimited).string(message.value.stringValue);
9391
+ /* MiLaboratories.PL.API.ResourceAPI.Tree.Filter.FilterGroup filters_value = 5; */
9392
+ if (message.value.oneofKind === "filtersValue")
9393
+ ResourceAPI_Tree_Filter_FilterGroup.internalBinaryWrite(message.value.filtersValue, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
9394
+ let u = options.writeUnknownFields;
9395
+ if (u !== false)
9396
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
9397
+ return writer;
9398
+ }
9399
+ }
9400
+ /**
9401
+ * @generated MessageType for protobuf message MiLaboratories.PL.API.ResourceAPI.Tree.Filter
9402
+ */
9403
+ export const ResourceAPI_Tree_Filter = new ResourceAPI_Tree_Filter$Type();
9404
+ // @generated message type with reflection information, may provide speed optimized methods
9405
+ class ResourceAPI_Tree_Filter_FilterGroup$Type extends MessageType<ResourceAPI_Tree_Filter_FilterGroup> {
9406
+ constructor() {
9407
+ super("MiLaboratories.PL.API.ResourceAPI.Tree.Filter.FilterGroup", [
9408
+ { no: 1, name: "filters", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ResourceAPI_Tree_Filter }
9409
+ ]);
9410
+ }
9411
+ create(value?: PartialMessage<ResourceAPI_Tree_Filter_FilterGroup>): ResourceAPI_Tree_Filter_FilterGroup {
9412
+ const message = globalThis.Object.create((this.messagePrototype!));
9413
+ message.filters = [];
9414
+ if (value !== undefined)
9415
+ reflectionMergePartial<ResourceAPI_Tree_Filter_FilterGroup>(this, message, value);
9416
+ return message;
9417
+ }
9418
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceAPI_Tree_Filter_FilterGroup): ResourceAPI_Tree_Filter_FilterGroup {
9419
+ let message = target ?? this.create(), end = reader.pos + length;
9420
+ while (reader.pos < end) {
9421
+ let [fieldNo, wireType] = reader.tag();
9422
+ switch (fieldNo) {
9423
+ case /* repeated MiLaboratories.PL.API.ResourceAPI.Tree.Filter filters */ 1:
9424
+ message.filters.push(ResourceAPI_Tree_Filter.internalBinaryRead(reader, reader.uint32(), options));
9425
+ break;
9426
+ default:
9427
+ let u = options.readUnknownField;
9428
+ if (u === "throw")
9429
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
9430
+ let d = reader.skip(wireType);
9431
+ if (u !== false)
9432
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
9433
+ }
9434
+ }
9435
+ return message;
9436
+ }
9437
+ internalBinaryWrite(message: ResourceAPI_Tree_Filter_FilterGroup, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
9438
+ /* repeated MiLaboratories.PL.API.ResourceAPI.Tree.Filter filters = 1; */
9439
+ for (let i = 0; i < message.filters.length; i++)
9440
+ ResourceAPI_Tree_Filter.internalBinaryWrite(message.filters[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
9441
+ let u = options.writeUnknownFields;
9442
+ if (u !== false)
9443
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
9444
+ return writer;
9445
+ }
9446
+ }
9447
+ /**
9448
+ * @generated MessageType for protobuf message MiLaboratories.PL.API.ResourceAPI.Tree.Filter.FilterGroup
9449
+ */
9450
+ export const ResourceAPI_Tree_Filter_FilterGroup = new ResourceAPI_Tree_Filter_FilterGroup$Type();
9451
+ // @generated message type with reflection information, may provide speed optimized methods
9452
+ class ResourceAPI_Tree_KV$Type extends MessageType<ResourceAPI_Tree_KV> {
9453
+ constructor() {
9454
+ super("MiLaboratories.PL.API.ResourceAPI.Tree.KV", [
9455
+ { no: 1, name: "key", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
9456
+ { no: 2, name: "value", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
9457
+ ]);
9458
+ }
9459
+ create(value?: PartialMessage<ResourceAPI_Tree_KV>): ResourceAPI_Tree_KV {
9460
+ const message = globalThis.Object.create((this.messagePrototype!));
9461
+ message.key = "";
9462
+ message.value = new Uint8Array(0);
9463
+ if (value !== undefined)
9464
+ reflectionMergePartial<ResourceAPI_Tree_KV>(this, message, value);
9465
+ return message;
9466
+ }
9467
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceAPI_Tree_KV): ResourceAPI_Tree_KV {
9468
+ let message = target ?? this.create(), end = reader.pos + length;
9469
+ while (reader.pos < end) {
9470
+ let [fieldNo, wireType] = reader.tag();
9471
+ switch (fieldNo) {
9472
+ case /* string key */ 1:
9473
+ message.key = reader.string();
9474
+ break;
9475
+ case /* bytes value */ 2:
9476
+ message.value = reader.bytes();
9477
+ break;
9478
+ default:
9479
+ let u = options.readUnknownField;
9480
+ if (u === "throw")
9481
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
9482
+ let d = reader.skip(wireType);
9483
+ if (u !== false)
9484
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
9485
+ }
9486
+ }
9487
+ return message;
9488
+ }
9489
+ internalBinaryWrite(message: ResourceAPI_Tree_KV, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
9490
+ /* string key = 1; */
9491
+ if (message.key !== "")
9492
+ writer.tag(1, WireType.LengthDelimited).string(message.key);
9493
+ /* bytes value = 2; */
9494
+ if (message.value.length)
9495
+ writer.tag(2, WireType.LengthDelimited).bytes(message.value);
9496
+ let u = options.writeUnknownFields;
9497
+ if (u !== false)
9498
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
9499
+ return writer;
9500
+ }
9501
+ }
9502
+ /**
9503
+ * @generated MessageType for protobuf message MiLaboratories.PL.API.ResourceAPI.Tree.KV
9504
+ */
9505
+ export const ResourceAPI_Tree_KV = new ResourceAPI_Tree_KV$Type();
9506
+ // @generated message type with reflection information, may provide speed optimized methods
8949
9507
  class ResourceAPI_Tree_Response$Type extends MessageType<ResourceAPI_Tree_Response> {
8950
9508
  constructor() {
8951
9509
  super("MiLaboratories.PL.API.ResourceAPI.Tree.Response", [
8952
- { no: 1, name: "resource", kind: "message", T: () => Resource }
9510
+ { no: 1, name: "resource", kind: "message", T: () => Resource },
9511
+ { no: 2, name: "kv", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ResourceAPI_Tree_KV },
9512
+ { no: 3, name: "traverse_was_stopped", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
9513
+ { no: 4, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
9514
+ { no: 5, name: "resource_signature", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
8953
9515
  ]);
8954
9516
  }
8955
9517
  create(value?: PartialMessage<ResourceAPI_Tree_Response>): ResourceAPI_Tree_Response {
8956
9518
  const message = globalThis.Object.create((this.messagePrototype!));
9519
+ message.kv = [];
9520
+ message.traverseWasStopped = false;
9521
+ message.resourceId = 0n;
9522
+ message.resourceSignature = new Uint8Array(0);
8957
9523
  if (value !== undefined)
8958
9524
  reflectionMergePartial<ResourceAPI_Tree_Response>(this, message, value);
8959
9525
  return message;
@@ -8963,9 +9529,21 @@ class ResourceAPI_Tree_Response$Type extends MessageType<ResourceAPI_Tree_Respon
8963
9529
  while (reader.pos < end) {
8964
9530
  let [fieldNo, wireType] = reader.tag();
8965
9531
  switch (fieldNo) {
8966
- case /* MiLaboratories.PL.API.Resource resource */ 1:
9532
+ case /* optional MiLaboratories.PL.API.Resource resource */ 1:
8967
9533
  message.resource = Resource.internalBinaryRead(reader, reader.uint32(), options, message.resource);
8968
9534
  break;
9535
+ case /* repeated MiLaboratories.PL.API.ResourceAPI.Tree.KV kv */ 2:
9536
+ message.kv.push(ResourceAPI_Tree_KV.internalBinaryRead(reader, reader.uint32(), options));
9537
+ break;
9538
+ case /* bool traverse_was_stopped */ 3:
9539
+ message.traverseWasStopped = reader.bool();
9540
+ break;
9541
+ case /* uint64 resource_id */ 4:
9542
+ message.resourceId = reader.uint64().toBigInt();
9543
+ break;
9544
+ case /* bytes resource_signature */ 5:
9545
+ message.resourceSignature = reader.bytes();
9546
+ break;
8969
9547
  default:
8970
9548
  let u = options.readUnknownField;
8971
9549
  if (u === "throw")
@@ -8978,9 +9556,21 @@ class ResourceAPI_Tree_Response$Type extends MessageType<ResourceAPI_Tree_Respon
8978
9556
  return message;
8979
9557
  }
8980
9558
  internalBinaryWrite(message: ResourceAPI_Tree_Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
8981
- /* MiLaboratories.PL.API.Resource resource = 1; */
9559
+ /* optional MiLaboratories.PL.API.Resource resource = 1; */
8982
9560
  if (message.resource)
8983
9561
  Resource.internalBinaryWrite(message.resource, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
9562
+ /* repeated MiLaboratories.PL.API.ResourceAPI.Tree.KV kv = 2; */
9563
+ for (let i = 0; i < message.kv.length; i++)
9564
+ ResourceAPI_Tree_KV.internalBinaryWrite(message.kv[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
9565
+ /* bool traverse_was_stopped = 3; */
9566
+ if (message.traverseWasStopped !== false)
9567
+ writer.tag(3, WireType.Varint).bool(message.traverseWasStopped);
9568
+ /* uint64 resource_id = 4; */
9569
+ if (message.resourceId !== 0n)
9570
+ writer.tag(4, WireType.Varint).uint64(message.resourceId);
9571
+ /* bytes resource_signature = 5; */
9572
+ if (message.resourceSignature.length)
9573
+ writer.tag(5, WireType.LengthDelimited).bytes(message.resourceSignature);
8984
9574
  let u = options.writeUnknownFields;
8985
9575
  if (u !== false)
8986
9576
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -18254,7 +18844,8 @@ class MaintenanceAPI_Ping_Response$Type extends MessageType<MaintenanceAPI_Ping_
18254
18844
  { no: 5, name: "instance_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
18255
18845
  { no: 6, name: "platform", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
18256
18846
  { no: 7, name: "os", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
18257
- { no: 8, name: "arch", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
18847
+ { no: 8, name: "arch", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
18848
+ { no: 9, name: "capabilities", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }
18258
18849
  ]);
18259
18850
  }
18260
18851
  create(value?: PartialMessage<MaintenanceAPI_Ping_Response>): MaintenanceAPI_Ping_Response {
@@ -18266,6 +18857,7 @@ class MaintenanceAPI_Ping_Response$Type extends MessageType<MaintenanceAPI_Ping_
18266
18857
  message.platform = "";
18267
18858
  message.os = "";
18268
18859
  message.arch = "";
18860
+ message.capabilities = [];
18269
18861
  if (value !== undefined)
18270
18862
  reflectionMergePartial<MaintenanceAPI_Ping_Response>(this, message, value);
18271
18863
  return message;
@@ -18296,6 +18888,9 @@ class MaintenanceAPI_Ping_Response$Type extends MessageType<MaintenanceAPI_Ping_
18296
18888
  case /* string arch */ 8:
18297
18889
  message.arch = reader.string();
18298
18890
  break;
18891
+ case /* repeated string capabilities */ 9:
18892
+ message.capabilities.push(reader.string());
18893
+ break;
18299
18894
  default:
18300
18895
  let u = options.readUnknownField;
18301
18896
  if (u === "throw")
@@ -18329,6 +18924,9 @@ class MaintenanceAPI_Ping_Response$Type extends MessageType<MaintenanceAPI_Ping_
18329
18924
  /* string arch = 8; */
18330
18925
  if (message.arch !== "")
18331
18926
  writer.tag(8, WireType.LengthDelimited).string(message.arch);
18927
+ /* repeated string capabilities = 9; */
18928
+ for (let i = 0; i < message.capabilities.length; i++)
18929
+ writer.tag(9, WireType.LengthDelimited).string(message.capabilities[i]);
18332
18930
  let u = options.writeUnknownFields;
18333
18931
  if (u !== false)
18334
18932
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);