@milaboratories/pl-client 2.18.4 → 3.0.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 (52) hide show
  1. package/dist/core/ll_client.cjs +11 -5
  2. package/dist/core/ll_client.cjs.map +1 -1
  3. package/dist/core/ll_client.js +12 -6
  4. package/dist/core/ll_client.js.map +1 -1
  5. package/dist/core/transaction.cjs +2 -2
  6. package/dist/core/transaction.cjs.map +1 -1
  7. package/dist/core/transaction.js +2 -2
  8. package/dist/core/transaction.js.map +1 -1
  9. package/dist/core/type_conversion.cjs +1 -1
  10. package/dist/core/type_conversion.cjs.map +1 -1
  11. package/dist/core/type_conversion.js +1 -1
  12. package/dist/core/type_conversion.js.map +1 -1
  13. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs +1957 -256
  14. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs.map +1 -1
  15. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.cjs +59 -9
  16. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.cjs.map +1 -1
  17. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts +74 -4
  18. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.js +59 -9
  19. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.js.map +1 -1
  20. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +658 -51
  21. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js +1957 -257
  22. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js.map +1 -1
  23. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.cjs +247 -17
  24. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.cjs.map +1 -1
  25. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts +104 -10
  26. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.js +247 -17
  27. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.js.map +1 -1
  28. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.cjs +26 -12
  29. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.cjs.map +1 -1
  30. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts +4 -0
  31. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.js +26 -12
  32. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.js.map +1 -1
  33. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.cjs +11 -0
  34. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.cjs.map +1 -1
  35. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts +4 -0
  36. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.js +11 -0
  37. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.js.map +1 -1
  38. package/dist/proto-rest/plapi.d.ts +281 -28
  39. package/package.json +4 -4
  40. package/src/core/ll_client.ts +9 -2
  41. package/src/core/transaction.ts +33 -8
  42. package/src/core/type_conversion.ts +1 -1
  43. package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +119 -15
  44. package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts +2270 -322
  45. package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types.ts +276 -20
  46. package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types.ts +11 -0
  47. package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/import.ts +2 -2
  48. package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/resource_types.ts +11 -0
  49. package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/ws-test.ts +3 -3
  50. package/src/proto-grpc/google/protobuf/descriptor.ts +2 -5
  51. package/src/proto-grpc/google/protobuf/struct.ts +1 -1
  52. package/src/proto-rest/plapi.ts +293 -22
@@ -33,13 +33,17 @@ export interface Tx {
33
33
  */
34
34
  export interface Resource {
35
35
  /**
36
- * @generated from protobuf field: uint64 id = 2
36
+ * @generated from protobuf field: uint64 resource_id = 2
37
37
  */
38
- id: bigint;
38
+ resourceId: bigint;
39
+ /**
40
+ * @generated from protobuf field: optional bytes resource_signature = 18
41
+ */
42
+ resourceSignature?: Uint8Array;
39
43
  /**
40
44
  * @generated from protobuf field: bytes canonical_id = 17
41
45
  */
42
- canonicalId: Uint8Array; // could be empty, it depends on resource lifecycle state
46
+ canonicalId: Uint8Array; // could be empty; it depends on the resource lifecycle state
43
47
  /**
44
48
  * @generated from protobuf field: MiLaboratories.PL.API.Resource.Kind kind = 3
45
49
  */
@@ -144,17 +148,24 @@ export interface Field {
144
148
  */
145
149
  features?: Resource_Features;
146
150
  /**
147
- * _resolved_ value of field or _assigned_ if the field was assigned to a resource.
148
- * If field refers to another field, it will get
149
- * value only when this chain of references ends up with direct resource
150
- * reference. At that moment all fields in the chain will get their values
151
+ * _resolved_ value of a field or _assigned_ if the field was assigned to a resource.
152
+ * If a field refers to another field, it will get
153
+ * a value only when this chain of references ends up with a direct resource
154
+ * reference. At that moment, all fields in the chain will get their values
151
155
  * resolved and will start to refer to the same resource directly.
152
156
  *
153
157
  * @generated from protobuf field: uint64 value = 5
154
158
  */
155
159
  value: bigint;
156
160
  /**
157
- * If the value was empty, assigned or finally resolved.
161
+ * Signature for value resource ID, inheriting the parent resource's color.
162
+ * Populated server-side when the parent resource has a known color in the current TX.
163
+ *
164
+ * @generated from protobuf field: optional bytes value_signature = 10
165
+ */
166
+ valueSignature?: Uint8Array;
167
+ /**
168
+ * Whether the value is empty, assigned, or finally resolved.
158
169
  *
159
170
  * @generated from protobuf field: MiLaboratories.PL.API.Field.ValueStatus value_status = 7
160
171
  */
@@ -166,12 +177,18 @@ export interface Field {
166
177
  */
167
178
  valueIsFinal: boolean;
168
179
  /**
169
- * Resource error resource id if any.
170
- * Is intended to report problems _from_ platform to client.
180
+ * Error resource ID, if any.
181
+ * Is intended to report problems _from_ the platform to the client.
171
182
  *
172
183
  * @generated from protobuf field: uint64 error = 6
173
184
  */
174
185
  error: bigint;
186
+ /**
187
+ * Signature for error resource ID, inheriting the parent resource's color.
188
+ *
189
+ * @generated from protobuf field: optional bytes error_signature = 11
190
+ */
191
+ errorSignature?: Uint8Array;
175
192
  }
176
193
  /**
177
194
  * @generated from protobuf enum MiLaboratories.PL.API.Field.ValueStatus
@@ -301,6 +318,10 @@ export interface Notification_Events {
301
318
  * @generated from protobuf field: bool dynamic_changed = 10
302
319
  */
303
320
  dynamicChanged: boolean;
321
+ /**
322
+ * @generated from protobuf field: bool resource_recovered = 17
323
+ */
324
+ resourceRecovered: boolean;
304
325
  }
305
326
  /**
306
327
  * @generated from protobuf message MiLaboratories.PL.API.Notification.FieldChange
@@ -372,6 +393,67 @@ export interface ResourceSchema {
372
393
  * @generated from protobuf field: repeated MiLaboratories.PL.API.FieldSchema fields = 2
373
394
  */
374
395
  fields: FieldSchema[];
396
+ /**
397
+ * Access restriction flags for non-controller roles
398
+ *
399
+ * @generated from protobuf field: optional MiLaboratories.PL.API.ResourceSchema.AccessFlags access_flags = 3
400
+ */
401
+ accessFlags?: ResourceSchema_AccessFlags;
402
+ /**
403
+ * @generated from protobuf field: bool free_inputs = 4
404
+ */
405
+ freeInputs: boolean; // if true, skip automatic input locking on creation
406
+ /**
407
+ * @generated from protobuf field: bool free_outputs = 5
408
+ */
409
+ freeOutputs: boolean; // if true, skip automatic output locking on creation
410
+ }
411
+ /**
412
+ * @generated from protobuf message MiLaboratories.PL.API.ResourceSchema.AccessFlags
413
+ */
414
+ export interface ResourceSchema_AccessFlags {
415
+ /**
416
+ * Deny-list approach: default = allowed (true)
417
+ * Controllers set these to false to restrict non-controller roles (role='u', role='w')
418
+ *
419
+ * @generated from protobuf field: optional bool create_resource = 1
420
+ */
421
+ createResource?: boolean; // default: true (creation allowed)
422
+ /**
423
+ * IMPORTANT: read_fields=false with write_fields=true is a forbidden combination
424
+ *
425
+ * @generated from protobuf field: optional bool read_fields = 2
426
+ */
427
+ readFields?: boolean; // default: true (reads allowed)
428
+ /**
429
+ * @generated from protobuf field: optional bool write_fields = 3
430
+ */
431
+ writeFields?: boolean; // default: true (writes allowed)
432
+ /**
433
+ * IMPORTANT: read_kv=false with write_kv=true is a forbidden combination
434
+ *
435
+ * @generated from protobuf field: optional bool read_kv = 4
436
+ */
437
+ readKv?: boolean; // if unset, falls back to read_fields
438
+ /**
439
+ * @generated from protobuf field: optional bool write_kv = 5
440
+ */
441
+ writeKv?: boolean; // if unset, falls back to write_fields
442
+ /**
443
+ * Per-field-type overrides (map: field_type → bool)
444
+ * When defined for a field type, overrides resource-level flags
445
+ *
446
+ * @generated from protobuf field: map<uint32, bool> read_by_field_type = 6
447
+ */
448
+ readByFieldType: {
449
+ [key: number]: boolean;
450
+ };
451
+ /**
452
+ * @generated from protobuf field: map<uint32, bool> write_by_field_type = 7
453
+ */
454
+ writeByFieldType: {
455
+ [key: number]: boolean;
456
+ };
375
457
  }
376
458
  /**
377
459
  * @generated from protobuf message MiLaboratories.PL.API.FieldSchema
@@ -466,7 +548,8 @@ export const Tx = new Tx$Type();
466
548
  class Resource$Type extends MessageType<Resource> {
467
549
  constructor() {
468
550
  super("MiLaboratories.PL.API.Resource", [
469
- { no: 2, name: "id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
551
+ { no: 2, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
552
+ { no: 18, name: "resource_signature", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
470
553
  { no: 17, name: "canonical_id", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
471
554
  { no: 3, name: "kind", kind: "enum", T: () => ["MiLaboratories.PL.API.Resource.Kind", Resource_Kind, "KIND_"] },
472
555
  { no: 4, name: "type", kind: "message", T: () => ResourceType },
@@ -486,7 +569,7 @@ class Resource$Type extends MessageType<Resource> {
486
569
  }
487
570
  create(value?: PartialMessage<Resource>): Resource {
488
571
  const message = globalThis.Object.create((this.messagePrototype!));
489
- message.id = 0n;
572
+ message.resourceId = 0n;
490
573
  message.canonicalId = new Uint8Array(0);
491
574
  message.kind = 0;
492
575
  message.data = new Uint8Array(0);
@@ -507,8 +590,11 @@ class Resource$Type extends MessageType<Resource> {
507
590
  while (reader.pos < end) {
508
591
  let [fieldNo, wireType] = reader.tag();
509
592
  switch (fieldNo) {
510
- case /* uint64 id */ 2:
511
- message.id = reader.uint64().toBigInt();
593
+ case /* uint64 resource_id */ 2:
594
+ message.resourceId = reader.uint64().toBigInt();
595
+ break;
596
+ case /* optional bytes resource_signature */ 18:
597
+ message.resourceSignature = reader.bytes();
512
598
  break;
513
599
  case /* bytes canonical_id */ 17:
514
600
  message.canonicalId = reader.bytes();
@@ -567,9 +653,9 @@ class Resource$Type extends MessageType<Resource> {
567
653
  return message;
568
654
  }
569
655
  internalBinaryWrite(message: Resource, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
570
- /* uint64 id = 2; */
571
- if (message.id !== 0n)
572
- writer.tag(2, WireType.Varint).uint64(message.id);
656
+ /* uint64 resource_id = 2; */
657
+ if (message.resourceId !== 0n)
658
+ writer.tag(2, WireType.Varint).uint64(message.resourceId);
573
659
  /* MiLaboratories.PL.API.Resource.Kind kind = 3; */
574
660
  if (message.kind !== 0)
575
661
  writer.tag(3, WireType.Varint).int32(message.kind);
@@ -615,6 +701,9 @@ class Resource$Type extends MessageType<Resource> {
615
701
  /* bytes canonical_id = 17; */
616
702
  if (message.canonicalId.length)
617
703
  writer.tag(17, WireType.LengthDelimited).bytes(message.canonicalId);
704
+ /* optional bytes resource_signature = 18; */
705
+ if (message.resourceSignature !== undefined)
706
+ writer.tag(18, WireType.LengthDelimited).bytes(message.resourceSignature);
618
707
  let u = options.writeUnknownFields;
619
708
  if (u !== false)
620
709
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -680,9 +769,11 @@ class Field$Type extends MessageType<Field> {
680
769
  { no: 2, name: "type", kind: "enum", T: () => ["MiLaboratories.PL.Base.FieldType", FieldType] },
681
770
  { no: 3, name: "features", kind: "message", T: () => Resource_Features },
682
771
  { no: 5, name: "value", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
772
+ { no: 10, name: "value_signature", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
683
773
  { no: 7, name: "value_status", kind: "enum", T: () => ["MiLaboratories.PL.API.Field.ValueStatus", Field_ValueStatus] },
684
774
  { no: 8, name: "value_is_final", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
685
- { no: 6, name: "error", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
775
+ { no: 6, name: "error", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
776
+ { no: 11, name: "error_signature", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ }
686
777
  ]);
687
778
  }
688
779
  create(value?: PartialMessage<Field>): Field {
@@ -713,6 +804,9 @@ class Field$Type extends MessageType<Field> {
713
804
  case /* uint64 value */ 5:
714
805
  message.value = reader.uint64().toBigInt();
715
806
  break;
807
+ case /* optional bytes value_signature */ 10:
808
+ message.valueSignature = reader.bytes();
809
+ break;
716
810
  case /* MiLaboratories.PL.API.Field.ValueStatus value_status */ 7:
717
811
  message.valueStatus = reader.int32();
718
812
  break;
@@ -722,6 +816,9 @@ class Field$Type extends MessageType<Field> {
722
816
  case /* uint64 error */ 6:
723
817
  message.error = reader.uint64().toBigInt();
724
818
  break;
819
+ case /* optional bytes error_signature */ 11:
820
+ message.errorSignature = reader.bytes();
821
+ break;
725
822
  default:
726
823
  let u = options.readUnknownField;
727
824
  if (u === "throw")
@@ -755,6 +852,12 @@ class Field$Type extends MessageType<Field> {
755
852
  /* bool value_is_final = 8; */
756
853
  if (message.valueIsFinal !== false)
757
854
  writer.tag(8, WireType.Varint).bool(message.valueIsFinal);
855
+ /* optional bytes value_signature = 10; */
856
+ if (message.valueSignature !== undefined)
857
+ writer.tag(10, WireType.LengthDelimited).bytes(message.valueSignature);
858
+ /* optional bytes error_signature = 11; */
859
+ if (message.errorSignature !== undefined)
860
+ writer.tag(11, WireType.LengthDelimited).bytes(message.errorSignature);
758
861
  let u = options.writeUnknownFields;
759
862
  if (u !== false)
760
863
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -910,7 +1013,8 @@ class Notification_Events$Type extends MessageType<Notification_Events> {
910
1013
  { no: 8, name: "output_set", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
911
1014
  { no: 9, name: "all_outputs_set", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
912
1015
  { no: 14, name: "generic_otw_set", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
913
- { no: 10, name: "dynamic_changed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
1016
+ { no: 10, name: "dynamic_changed", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
1017
+ { no: 17, name: "resource_recovered", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
914
1018
  ]);
915
1019
  }
916
1020
  create(value?: PartialMessage<Notification_Events>): Notification_Events {
@@ -930,6 +1034,7 @@ class Notification_Events$Type extends MessageType<Notification_Events> {
930
1034
  message.allOutputsSet = false;
931
1035
  message.genericOtwSet = false;
932
1036
  message.dynamicChanged = false;
1037
+ message.resourceRecovered = false;
933
1038
  if (value !== undefined)
934
1039
  reflectionMergePartial<Notification_Events>(this, message, value);
935
1040
  return message;
@@ -984,6 +1089,9 @@ class Notification_Events$Type extends MessageType<Notification_Events> {
984
1089
  case /* bool dynamic_changed */ 10:
985
1090
  message.dynamicChanged = reader.bool();
986
1091
  break;
1092
+ case /* bool resource_recovered */ 17:
1093
+ message.resourceRecovered = reader.bool();
1094
+ break;
987
1095
  default:
988
1096
  let u = options.readUnknownField;
989
1097
  if (u === "throw")
@@ -1041,6 +1149,9 @@ class Notification_Events$Type extends MessageType<Notification_Events> {
1041
1149
  /* bool field_got_error = 16; */
1042
1150
  if (message.fieldGotError !== false)
1043
1151
  writer.tag(16, WireType.Varint).bool(message.fieldGotError);
1152
+ /* bool resource_recovered = 17; */
1153
+ if (message.resourceRecovered !== false)
1154
+ writer.tag(17, WireType.Varint).bool(message.resourceRecovered);
1044
1155
  let u = options.writeUnknownFields;
1045
1156
  if (u !== false)
1046
1157
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1298,12 +1409,17 @@ class ResourceSchema$Type extends MessageType<ResourceSchema> {
1298
1409
  constructor() {
1299
1410
  super("MiLaboratories.PL.API.ResourceSchema", [
1300
1411
  { no: 1, name: "type", kind: "message", T: () => ResourceType },
1301
- { no: 2, name: "fields", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldSchema }
1412
+ { no: 2, name: "fields", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => FieldSchema },
1413
+ { no: 3, name: "access_flags", kind: "message", T: () => ResourceSchema_AccessFlags },
1414
+ { no: 4, name: "free_inputs", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
1415
+ { no: 5, name: "free_outputs", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
1302
1416
  ]);
1303
1417
  }
1304
1418
  create(value?: PartialMessage<ResourceSchema>): ResourceSchema {
1305
1419
  const message = globalThis.Object.create((this.messagePrototype!));
1306
1420
  message.fields = [];
1421
+ message.freeInputs = false;
1422
+ message.freeOutputs = false;
1307
1423
  if (value !== undefined)
1308
1424
  reflectionMergePartial<ResourceSchema>(this, message, value);
1309
1425
  return message;
@@ -1319,6 +1435,15 @@ class ResourceSchema$Type extends MessageType<ResourceSchema> {
1319
1435
  case /* repeated MiLaboratories.PL.API.FieldSchema fields */ 2:
1320
1436
  message.fields.push(FieldSchema.internalBinaryRead(reader, reader.uint32(), options));
1321
1437
  break;
1438
+ case /* optional MiLaboratories.PL.API.ResourceSchema.AccessFlags access_flags */ 3:
1439
+ message.accessFlags = ResourceSchema_AccessFlags.internalBinaryRead(reader, reader.uint32(), options, message.accessFlags);
1440
+ break;
1441
+ case /* bool free_inputs */ 4:
1442
+ message.freeInputs = reader.bool();
1443
+ break;
1444
+ case /* bool free_outputs */ 5:
1445
+ message.freeOutputs = reader.bool();
1446
+ break;
1322
1447
  default:
1323
1448
  let u = options.readUnknownField;
1324
1449
  if (u === "throw")
@@ -1337,6 +1462,15 @@ class ResourceSchema$Type extends MessageType<ResourceSchema> {
1337
1462
  /* repeated MiLaboratories.PL.API.FieldSchema fields = 2; */
1338
1463
  for (let i = 0; i < message.fields.length; i++)
1339
1464
  FieldSchema.internalBinaryWrite(message.fields[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1465
+ /* optional MiLaboratories.PL.API.ResourceSchema.AccessFlags access_flags = 3; */
1466
+ if (message.accessFlags)
1467
+ ResourceSchema_AccessFlags.internalBinaryWrite(message.accessFlags, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
1468
+ /* bool free_inputs = 4; */
1469
+ if (message.freeInputs !== false)
1470
+ writer.tag(4, WireType.Varint).bool(message.freeInputs);
1471
+ /* bool free_outputs = 5; */
1472
+ if (message.freeOutputs !== false)
1473
+ writer.tag(5, WireType.Varint).bool(message.freeOutputs);
1340
1474
  let u = options.writeUnknownFields;
1341
1475
  if (u !== false)
1342
1476
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -1348,6 +1482,128 @@ class ResourceSchema$Type extends MessageType<ResourceSchema> {
1348
1482
  */
1349
1483
  export const ResourceSchema = new ResourceSchema$Type();
1350
1484
  // @generated message type with reflection information, may provide speed optimized methods
1485
+ class ResourceSchema_AccessFlags$Type extends MessageType<ResourceSchema_AccessFlags> {
1486
+ constructor() {
1487
+ super("MiLaboratories.PL.API.ResourceSchema.AccessFlags", [
1488
+ { no: 1, name: "create_resource", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
1489
+ { no: 2, name: "read_fields", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
1490
+ { no: 3, name: "write_fields", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
1491
+ { no: 4, name: "read_kv", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
1492
+ { no: 5, name: "write_kv", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
1493
+ { no: 6, name: "read_by_field_type", kind: "map", K: 13 /*ScalarType.UINT32*/, V: { kind: "scalar", T: 8 /*ScalarType.BOOL*/ } },
1494
+ { no: 7, name: "write_by_field_type", kind: "map", K: 13 /*ScalarType.UINT32*/, V: { kind: "scalar", T: 8 /*ScalarType.BOOL*/ } }
1495
+ ]);
1496
+ }
1497
+ create(value?: PartialMessage<ResourceSchema_AccessFlags>): ResourceSchema_AccessFlags {
1498
+ const message = globalThis.Object.create((this.messagePrototype!));
1499
+ message.readByFieldType = {};
1500
+ message.writeByFieldType = {};
1501
+ if (value !== undefined)
1502
+ reflectionMergePartial<ResourceSchema_AccessFlags>(this, message, value);
1503
+ return message;
1504
+ }
1505
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ResourceSchema_AccessFlags): ResourceSchema_AccessFlags {
1506
+ let message = target ?? this.create(), end = reader.pos + length;
1507
+ while (reader.pos < end) {
1508
+ let [fieldNo, wireType] = reader.tag();
1509
+ switch (fieldNo) {
1510
+ case /* optional bool create_resource */ 1:
1511
+ message.createResource = reader.bool();
1512
+ break;
1513
+ case /* optional bool read_fields */ 2:
1514
+ message.readFields = reader.bool();
1515
+ break;
1516
+ case /* optional bool write_fields */ 3:
1517
+ message.writeFields = reader.bool();
1518
+ break;
1519
+ case /* optional bool read_kv */ 4:
1520
+ message.readKv = reader.bool();
1521
+ break;
1522
+ case /* optional bool write_kv */ 5:
1523
+ message.writeKv = reader.bool();
1524
+ break;
1525
+ case /* map<uint32, bool> read_by_field_type */ 6:
1526
+ this.binaryReadMap6(message.readByFieldType, reader, options);
1527
+ break;
1528
+ case /* map<uint32, bool> write_by_field_type */ 7:
1529
+ this.binaryReadMap7(message.writeByFieldType, reader, options);
1530
+ break;
1531
+ default:
1532
+ let u = options.readUnknownField;
1533
+ if (u === "throw")
1534
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1535
+ let d = reader.skip(wireType);
1536
+ if (u !== false)
1537
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1538
+ }
1539
+ }
1540
+ return message;
1541
+ }
1542
+ private binaryReadMap6(map: ResourceSchema_AccessFlags["readByFieldType"], reader: IBinaryReader, options: BinaryReadOptions): void {
1543
+ let len = reader.uint32(), end = reader.pos + len, key: keyof ResourceSchema_AccessFlags["readByFieldType"] | undefined, val: ResourceSchema_AccessFlags["readByFieldType"][any] | undefined;
1544
+ while (reader.pos < end) {
1545
+ let [fieldNo, wireType] = reader.tag();
1546
+ switch (fieldNo) {
1547
+ case 1:
1548
+ key = reader.uint32();
1549
+ break;
1550
+ case 2:
1551
+ val = reader.bool();
1552
+ break;
1553
+ default: throw new globalThis.Error("unknown map entry field for MiLaboratories.PL.API.ResourceSchema.AccessFlags.read_by_field_type");
1554
+ }
1555
+ }
1556
+ map[key ?? 0] = val ?? false;
1557
+ }
1558
+ private binaryReadMap7(map: ResourceSchema_AccessFlags["writeByFieldType"], reader: IBinaryReader, options: BinaryReadOptions): void {
1559
+ let len = reader.uint32(), end = reader.pos + len, key: keyof ResourceSchema_AccessFlags["writeByFieldType"] | undefined, val: ResourceSchema_AccessFlags["writeByFieldType"][any] | undefined;
1560
+ while (reader.pos < end) {
1561
+ let [fieldNo, wireType] = reader.tag();
1562
+ switch (fieldNo) {
1563
+ case 1:
1564
+ key = reader.uint32();
1565
+ break;
1566
+ case 2:
1567
+ val = reader.bool();
1568
+ break;
1569
+ default: throw new globalThis.Error("unknown map entry field for MiLaboratories.PL.API.ResourceSchema.AccessFlags.write_by_field_type");
1570
+ }
1571
+ }
1572
+ map[key ?? 0] = val ?? false;
1573
+ }
1574
+ internalBinaryWrite(message: ResourceSchema_AccessFlags, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1575
+ /* optional bool create_resource = 1; */
1576
+ if (message.createResource !== undefined)
1577
+ writer.tag(1, WireType.Varint).bool(message.createResource);
1578
+ /* optional bool read_fields = 2; */
1579
+ if (message.readFields !== undefined)
1580
+ writer.tag(2, WireType.Varint).bool(message.readFields);
1581
+ /* optional bool write_fields = 3; */
1582
+ if (message.writeFields !== undefined)
1583
+ writer.tag(3, WireType.Varint).bool(message.writeFields);
1584
+ /* optional bool read_kv = 4; */
1585
+ if (message.readKv !== undefined)
1586
+ writer.tag(4, WireType.Varint).bool(message.readKv);
1587
+ /* optional bool write_kv = 5; */
1588
+ if (message.writeKv !== undefined)
1589
+ writer.tag(5, WireType.Varint).bool(message.writeKv);
1590
+ /* map<uint32, bool> read_by_field_type = 6; */
1591
+ for (let k of globalThis.Object.keys(message.readByFieldType))
1592
+ writer.tag(6, WireType.LengthDelimited).fork().tag(1, WireType.Varint).uint32(parseInt(k)).tag(2, WireType.Varint).bool(message.readByFieldType[k as any]).join();
1593
+ /* map<uint32, bool> write_by_field_type = 7; */
1594
+ for (let k of globalThis.Object.keys(message.writeByFieldType))
1595
+ writer.tag(7, WireType.LengthDelimited).fork().tag(1, WireType.Varint).uint32(parseInt(k)).tag(2, WireType.Varint).bool(message.writeByFieldType[k as any]).join();
1596
+ let u = options.writeUnknownFields;
1597
+ if (u !== false)
1598
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1599
+ return writer;
1600
+ }
1601
+ }
1602
+ /**
1603
+ * @generated MessageType for protobuf message MiLaboratories.PL.API.ResourceSchema.AccessFlags
1604
+ */
1605
+ export const ResourceSchema_AccessFlags = new ResourceSchema_AccessFlags$Type();
1606
+ // @generated message type with reflection information, may provide speed optimized methods
1351
1607
  class FieldSchema$Type extends MessageType<FieldSchema> {
1352
1608
  constructor() {
1353
1609
  super("MiLaboratories.PL.API.FieldSchema", [
@@ -31,6 +31,10 @@ export interface FieldRef {
31
31
  * @generated from protobuf field: uint64 resource_id = 2
32
32
  */
33
33
  resourceId: bigint;
34
+ /**
35
+ * @generated from protobuf field: optional bytes resource_signature = 4
36
+ */
37
+ resourceSignature?: Uint8Array;
34
38
  /**
35
39
  * @generated from protobuf field: string field_name = 3
36
40
  */
@@ -129,6 +133,7 @@ class FieldRef$Type extends MessageType<FieldRef> {
129
133
  constructor() {
130
134
  super("MiLaboratories.PL.Base.FieldRef", [
131
135
  { no: 2, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
136
+ { no: 4, name: "resource_signature", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ },
132
137
  { no: 3, name: "field_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
133
138
  ]);
134
139
  }
@@ -148,6 +153,9 @@ class FieldRef$Type extends MessageType<FieldRef> {
148
153
  case /* uint64 resource_id */ 2:
149
154
  message.resourceId = reader.uint64().toBigInt();
150
155
  break;
156
+ case /* optional bytes resource_signature */ 4:
157
+ message.resourceSignature = reader.bytes();
158
+ break;
151
159
  case /* string field_name */ 3:
152
160
  message.fieldName = reader.string();
153
161
  break;
@@ -169,6 +177,9 @@ class FieldRef$Type extends MessageType<FieldRef> {
169
177
  /* string field_name = 3; */
170
178
  if (message.fieldName !== "")
171
179
  writer.tag(3, WireType.LengthDelimited).string(message.fieldName);
180
+ /* optional bytes resource_signature = 4; */
181
+ if (message.resourceSignature !== undefined)
182
+ writer.tag(4, WireType.LengthDelimited).bytes(message.resourceSignature);
172
183
  let u = options.writeUnknownFields;
173
184
  if (u !== false)
174
185
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -27,8 +27,8 @@ import { BytesValue } from "../../../../../google/protobuf/wrappers";
27
27
  import { Any } from "../../../../../google/protobuf/any";
28
28
  import { Empty } from "../../../../../google/protobuf/empty";
29
29
  /**
30
- * Makes protobuf to forcefully compile all well-known types into code (for TS)
31
- * or just add dependencies on them (for go)
30
+ * Forces protobuf to compile all well-known types into code (for TS)
31
+ * or just adds dependencies on them (for go)
32
32
  *
33
33
  * @generated from protobuf message MiLaboratories.PL._Stub._ImportWellKnown
34
34
  */
@@ -137,6 +137,10 @@ export interface NotificationFilter_EventFilter {
137
137
  * @generated from protobuf field: optional bool resource_ready = 5
138
138
  */
139
139
  resourceReady?: boolean;
140
+ /**
141
+ * @generated from protobuf field: optional bool resource_recovered = 18
142
+ */
143
+ resourceRecovered?: boolean;
140
144
  /**
141
145
  * @generated from protobuf field: optional bool resource_duplicate = 6
142
146
  */
@@ -485,6 +489,7 @@ class NotificationFilter_EventFilter$Type extends MessageType<NotificationFilter
485
489
  { no: 2, name: "resource_created", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
486
490
  { no: 3, name: "resource_deleted", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
487
491
  { no: 5, name: "resource_ready", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
492
+ { no: 18, name: "resource_recovered", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
488
493
  { no: 6, name: "resource_duplicate", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
489
494
  { no: 16, name: "resource_error", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
490
495
  { no: 13, name: "inputs_locked", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ },
@@ -522,6 +527,9 @@ class NotificationFilter_EventFilter$Type extends MessageType<NotificationFilter
522
527
  case /* optional bool resource_ready */ 5:
523
528
  message.resourceReady = reader.bool();
524
529
  break;
530
+ case /* optional bool resource_recovered */ 18:
531
+ message.resourceRecovered = reader.bool();
532
+ break;
525
533
  case /* optional bool resource_duplicate */ 6:
526
534
  message.resourceDuplicate = reader.bool();
527
535
  break;
@@ -618,6 +626,9 @@ class NotificationFilter_EventFilter$Type extends MessageType<NotificationFilter
618
626
  /* optional bool field_got_error = 17; */
619
627
  if (message.fieldGotError !== undefined)
620
628
  writer.tag(17, WireType.Varint).bool(message.fieldGotError);
629
+ /* optional bool resource_recovered = 18; */
630
+ if (message.resourceRecovered !== undefined)
631
+ writer.tag(18, WireType.Varint).bool(message.resourceRecovered);
621
632
  let u = options.writeUnknownFields;
622
633
  if (u !== false)
623
634
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -3,7 +3,7 @@
3
3
  // tslint:disable
4
4
  //
5
5
  //
6
- // This is dirty implementation of custom protocol for fast WebSocket support testing in
6
+ // This is a dirty implementation of a custom protocol for fast WebSocket support testing in
7
7
  // environments with ZScaler or other similar MITM corporate proxies.
8
8
  //
9
9
  //
@@ -32,11 +32,11 @@ export interface PingWS_Request {
32
32
  /**
33
33
  * @generated from protobuf field: int32 replies_count = 2
34
34
  */
35
- repliesCount: number; // amount of Response messages to send (0 - send nothing)
35
+ repliesCount: number; // number of Response messages to send (0 - send nothing)
36
36
  /**
37
37
  * @generated from protobuf field: bool close = 3
38
38
  */
39
- close: boolean; // make server to close connection after sending responses
39
+ close: boolean; // make the server close connection after sending responses
40
40
  }
41
41
  /**
42
42
  * @generated from protobuf message MiLaboratories.PL.WSTest.PingWS.Response
@@ -1260,8 +1260,6 @@ export enum FieldOptions_JSType {
1260
1260
  }
1261
1261
  /**
1262
1262
  * If set to RETENTION_SOURCE, the option will be omitted from the binary.
1263
- * Note: as of January 2023, support for this is in progress and does not yet
1264
- * have an effect (b/264593489).
1265
1263
  *
1266
1264
  * @generated from protobuf enum google.protobuf.FieldOptions.OptionRetention
1267
1265
  */
@@ -1282,8 +1280,7 @@ export enum FieldOptions_OptionRetention {
1282
1280
  /**
1283
1281
  * This indicates the types of entities that the field may apply to when used
1284
1282
  * as an option. If it is unset, then the field may be freely used as an
1285
- * option on any kind of entity. Note: as of January 2023, support for this is
1286
- * in progress and does not yet have an effect (b/264593489).
1283
+ * option on any kind of entity.
1287
1284
  *
1288
1285
  * @generated from protobuf enum google.protobuf.FieldOptions.OptionTargetType
1289
1286
  */
@@ -2070,7 +2067,7 @@ export enum Edition {
2070
2067
  EDITION_2024 = 1001,
2071
2068
  /**
2072
2069
  * Placeholder editions for testing feature resolution. These should not be
2073
- * used or relyed on outside of tests.
2070
+ * used or relied on outside of tests.
2074
2071
  *
2075
2072
  * @generated from protobuf enum value: EDITION_1_TEST_ONLY = 1;
2076
2073
  */
@@ -178,7 +178,7 @@ class Struct$Type extends MessageType<Struct> {
178
178
  /**
179
179
  * Encode `Struct` to JSON object.
180
180
  */
181
- internalJsonWrite(message: Struct, _options: JsonWriteOptions): JsonValue {
181
+ internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue {
182
182
  let json: JsonObject = {};
183
183
  for (let [k, v] of Object.entries(message.fields)) {
184
184
  json[k] = Value.toJson(v);