@milaboratories/pl-client 3.15.0 → 3.16.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 (34) hide show
  1. package/dist/core/ll_client.cjs +35 -18
  2. package/dist/core/ll_client.cjs.map +1 -1
  3. package/dist/core/ll_client.d.ts +12 -5
  4. package/dist/core/ll_client.d.ts.map +1 -1
  5. package/dist/core/ll_client.js +35 -18
  6. package/dist/core/ll_client.js.map +1 -1
  7. package/dist/core/transaction.cjs +2 -1
  8. package/dist/core/transaction.cjs.map +1 -1
  9. package/dist/core/transaction.d.ts.map +1 -1
  10. package/dist/core/transaction.js +2 -1
  11. package/dist/core/transaction.js.map +1 -1
  12. package/dist/core/unauth_client.cjs +79 -32
  13. package/dist/core/unauth_client.cjs.map +1 -1
  14. package/dist/core/unauth_client.d.ts +49 -14
  15. package/dist/core/unauth_client.d.ts.map +1 -1
  16. package/dist/core/unauth_client.js +79 -32
  17. package/dist/core/unauth_client.js.map +1 -1
  18. package/dist/index.d.ts +2 -2
  19. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs +150 -18
  20. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs.map +1 -1
  21. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +127 -9
  22. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +1 -1
  23. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js +150 -18
  24. package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js.map +1 -1
  25. package/dist/proto-rest/plapi.d.ts +8 -2
  26. package/dist/proto-rest/plapi.d.ts.map +1 -1
  27. package/package.json +2 -2
  28. package/src/core/ll_client.ts +25 -13
  29. package/src/core/transaction.ts +2 -0
  30. package/src/core/unauth_client.test.ts +69 -1
  31. package/src/core/unauth_client.ts +108 -34
  32. package/src/core/unauth_client_branch.test.ts +416 -5
  33. package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts +225 -15
  34. package/src/proto-rest/plapi.ts +8 -2
@@ -1025,6 +1025,26 @@ export interface TxAPI_Open_Response {
1025
1025
  * @generated from protobuf field: MiLaboratories.PL.API.Tx tx = 1
1026
1026
  */
1027
1027
  tx?: Tx;
1028
+ /**
1029
+ * The token to store and send back as changed_since_token on any later Tree
1030
+ * request. Everything the token denotes has finished committing, and it is
1031
+ * sampled as this transaction opens, so a write that had not committed by
1032
+ * then sits above it while one that had is visible to this transaction's
1033
+ * reads. One token per transaction, however many tree reads it issues.
1034
+ *
1035
+ * Absent on a WRITABLE open, which is issued no token: the walk would see
1036
+ * that transaction's own uncommitted writes (see changed_since_token).
1037
+ *
1038
+ * Store it only after a whole tree response has been applied successfully. A
1039
+ * client that keeps it after a partial apply will never be sent the
1040
+ * resources it dropped. Clear it on tree rebuild, on a root-set change, and
1041
+ * whenever the seed array is invalidated - the server no longer refuses a
1042
+ * token presented against a differently shaped request, so that is the
1043
+ * client's to enforce.
1044
+ *
1045
+ * @generated from protobuf field: bytes next_since_token = 2
1046
+ */
1047
+ nextSinceToken: Uint8Array;
1028
1048
  }
1029
1049
  /**
1030
1050
  * @generated from protobuf message MiLaboratories.PL.API.TxAPI.Commit
@@ -1826,6 +1846,37 @@ export interface ResourceAPI_Tree_Request {
1826
1846
  * @generated from protobuf field: bool show_soft_deletes = 9
1827
1847
  */
1828
1848
  showSoftDeletes: boolean;
1849
+ /**
1850
+ * An opaque continuation token, taken verbatim from a previous response's
1851
+ * next_since_token. The server returns bodies only for resources that
1852
+ * changed after the point this token denotes; every other visited resource
1853
+ * gets a body-less frame with resource_unchanged set. Empty or absent (the
1854
+ * default) requests the full tree.
1855
+ *
1856
+ * Clients must not parse, construct or compare this value: its encoding is
1857
+ * server-private and may change without a wire version bump. Store the
1858
+ * token only after applying a whole response successfully.
1859
+ *
1860
+ * A token the server cannot use is answered with the full tree, never with
1861
+ * an error, so it is always safe to send back whatever was last received.
1862
+ * The server detects and ignores a token that does not fit the request it
1863
+ * arrives on - the token is bound to the traversal-shaping parameters
1864
+ * (resource_id, seeds, max_depth, include_kv, show_soft_deletes,
1865
+ * field_filter, traverse_stop_rules), so changing any of them costs one
1866
+ * full tree instead of silently reporting never-sent resources as held.
1867
+ *
1868
+ * Ignored on a WRITABLE transaction, which also receives no
1869
+ * next_since_token: the walk sees that transaction's uncommitted writes, so
1870
+ * delta skipping there could pin a body describing state that never
1871
+ * committed. Poll from a read-only transaction.
1872
+ *
1873
+ * Servers advertise support via "treeChangedSince:v1" in
1874
+ * MaintenanceAPI.Ping.Response.capabilities; old servers ignore this field
1875
+ * and always send the full tree.
1876
+ *
1877
+ * @generated from protobuf field: bytes changed_since_token = 10
1878
+ */
1879
+ changedSinceToken: Uint8Array;
1829
1880
  }
1830
1881
  /**
1831
1882
  * A single entry point for multi-root tree traversal.
@@ -2021,8 +2072,9 @@ export interface ResourceAPI_Tree_KV {
2021
2072
  export interface ResourceAPI_Tree_Response {
2022
2073
  /**
2023
2074
  * Full resource payload. Absent on stop-marker frames (when the server
2024
- * advertises `treeStopMarker:v1` and traverse_was_stopped is true).
2025
- * Always populated on normal frames.
2075
+ * advertises `treeStopMarker:v1` and traverse_was_stopped is true) and on
2076
+ * unchanged frames (when resource_unchanged is true). Populated on every
2077
+ * other frame.
2026
2078
  *
2027
2079
  * @generated from protobuf field: optional MiLaboratories.PL.API.Resource resource = 1
2028
2080
  */
@@ -2048,8 +2100,9 @@ export interface ResourceAPI_Tree_Response {
2048
2100
  */
2049
2101
  traverseWasStopped: boolean;
2050
2102
  /**
2051
- * Populated only on stop-marker frames (resource is unset).
2052
- * Zero / empty on normal frames; use resource.resource_id instead.
2103
+ * Populated on frames where resource is unset - stop-marker and unchanged
2104
+ * frames. Zero / empty on frames carrying a resource; use
2105
+ * resource.resource_id instead.
2053
2106
  *
2054
2107
  * @generated from protobuf field: uint64 resource_id = 4
2055
2108
  */
@@ -2058,6 +2111,23 @@ export interface ResourceAPI_Tree_Response {
2058
2111
  * @generated from protobuf field: bytes resource_signature = 5
2059
2112
  */
2060
2113
  resourceSignature: Uint8Array;
2114
+ /**
2115
+ * True on a body-less frame emitted for a resource the client already holds:
2116
+ * resource is unset, and resource_id and resource_signature carry the
2117
+ * identity instead. The client keeps everything it holds for that resource,
2118
+ * fields and kv alike, and the traversal still descends into it - an
2119
+ * unchanged parent routinely has changed children.
2120
+ *
2121
+ * Orthogonal to traverse_was_stopped; a frame may set both.
2122
+ *
2123
+ * A resource may appear twice in one response: an unchanged frame, then a
2124
+ * body frame later in the same response. The later frame supersedes the
2125
+ * earlier one, so apply frames in arrival order and treat an unchanged
2126
+ * frame for an unknown resource as benign rather than fatal.
2127
+ *
2128
+ * @generated from protobuf field: bool resource_unchanged = 6
2129
+ */
2130
+ resourceUnchanged: boolean;
2061
2131
  }
2062
2132
  /**
2063
2133
  * @generated from protobuf message MiLaboratories.PL.API.ResourceAPI.TreeSize
@@ -3631,11 +3701,19 @@ export interface AuthAPI_ListMethods_MethodInfo {
3631
3701
  */
3632
3702
  id: string;
3633
3703
  /**
3634
- * description is the human-readable label in case we'd like to render it in UI.
3704
+ * description is the long-form human-readable text a client may render
3705
+ * alongside the title, for example in a tooltip or under the button.
3635
3706
  *
3636
3707
  * @generated from protobuf field: string description = 7
3637
3708
  */
3638
3709
  description: string;
3710
+ /**
3711
+ * title is the short human-readable label a client renders for this
3712
+ * method, for example on the sign-in button. Always set.
3713
+ *
3714
+ * @generated from protobuf field: string title = 9
3715
+ */
3716
+ title: string;
3639
3717
  /**
3640
3718
  * @generated from protobuf oneof: method
3641
3719
  */
@@ -3675,6 +3753,10 @@ export interface AuthAPI_BeginSSOLogin {
3675
3753
  * @generated from protobuf message MiLaboratories.PL.API.AuthAPI.BeginSSOLogin.Request
3676
3754
  */
3677
3755
  export interface AuthAPI_BeginSSOLogin_Request {
3756
+ /**
3757
+ * @generated from protobuf field: optional string idp = 1
3758
+ */
3759
+ idp?: string;
3678
3760
  }
3679
3761
  /**
3680
3762
  * @generated from protobuf message MiLaboratories.PL.API.AuthAPI.BeginSSOLogin.PublicPKCE
@@ -3773,6 +3855,10 @@ export interface AuthAPI_Login_BasicCredentials {
3773
3855
  * @generated from protobuf field: string password = 2
3774
3856
  */
3775
3857
  password: string;
3858
+ /**
3859
+ * @generated from protobuf field: optional string idp = 3
3860
+ */
3861
+ idp?: string;
3776
3862
  }
3777
3863
  /**
3778
3864
  * TokenCredentials accepts any opaque bearer-style string: a controller
@@ -3797,6 +3883,10 @@ export interface AuthAPI_Login_SSOCredentials {
3797
3883
  * @generated from protobuf field: bytes token_response = 1
3798
3884
  */
3799
3885
  tokenResponse: Uint8Array;
3886
+ /**
3887
+ * @generated from protobuf field: optional string idp = 2
3888
+ */
3889
+ idp?: string;
3800
3890
  }
3801
3891
  /**
3802
3892
  * @generated from protobuf message MiLaboratories.PL.API.AuthAPI.Login.Request
@@ -4229,13 +4319,39 @@ export interface AuthAPI_ListUserResources_SharedResource {
4229
4319
  */
4230
4320
  export interface AuthAPI_User {
4231
4321
  /**
4232
- * login is the stable identifier of the user — the grant target and the
4233
- * GetUserRoot key. Further fields (e.g. first name, last name, email) may
4234
- * be added later without breaking compatibility.
4322
+ * login is the user's provider-facing login identifier and the value clients
4323
+ * pass as a grant target / impersonation subject. It is the only identity a
4324
+ * client needs: the backend resolves it to an internal id that is never
4325
+ * exposed over the API.
4235
4326
  *
4236
4327
  * @generated from protobuf field: string login = 1
4237
4328
  */
4238
4329
  login: string;
4330
+ /**
4331
+ * display_name is the user's human-readable name, mapped from the provider on
4332
+ * login. May be empty for migrated users who have not logged in since upgrade.
4333
+ *
4334
+ * @generated from protobuf field: string display_name = 2
4335
+ */
4336
+ displayName: string;
4337
+ /**
4338
+ * email is the user's email, mapped from the provider on login. May be empty
4339
+ * when the provider does not supply it or the mapping is disabled.
4340
+ *
4341
+ * @generated from protobuf field: string email = 3
4342
+ */
4343
+ email: string;
4344
+ /**
4345
+ * attributes carries the remaining provider-mapped attributes the client
4346
+ * configured (e.g. full_name, external_id, custom fields), keyed by attribute
4347
+ * name. The default attributes (login, display_name, email) are promoted to
4348
+ * their own fields above and are not repeated here.
4349
+ *
4350
+ * @generated from protobuf field: map<string, string> attributes = 4
4351
+ */
4352
+ attributes: {
4353
+ [key: string]: string;
4354
+ };
4239
4355
  }
4240
4356
  /**
4241
4357
  * @generated from protobuf message MiLaboratories.PL.API.AuthAPI.DeleteUser
@@ -6047,11 +6163,13 @@ export const TxAPI_Open_Request = new TxAPI_Open_Request$Type();
6047
6163
  class TxAPI_Open_Response$Type extends MessageType<TxAPI_Open_Response> {
6048
6164
  constructor() {
6049
6165
  super("MiLaboratories.PL.API.TxAPI.Open.Response", [
6050
- { no: 1, name: "tx", kind: "message", T: () => Tx }
6166
+ { no: 1, name: "tx", kind: "message", T: () => Tx },
6167
+ { no: 2, name: "next_since_token", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
6051
6168
  ]);
6052
6169
  }
6053
6170
  create(value?: PartialMessage<TxAPI_Open_Response>): TxAPI_Open_Response {
6054
6171
  const message = globalThis.Object.create((this.messagePrototype!));
6172
+ message.nextSinceToken = new Uint8Array(0);
6055
6173
  if (value !== undefined)
6056
6174
  reflectionMergePartial<TxAPI_Open_Response>(this, message, value);
6057
6175
  return message;
@@ -6064,6 +6182,9 @@ class TxAPI_Open_Response$Type extends MessageType<TxAPI_Open_Response> {
6064
6182
  case /* MiLaboratories.PL.API.Tx tx */ 1:
6065
6183
  message.tx = Tx.internalBinaryRead(reader, reader.uint32(), options, message.tx);
6066
6184
  break;
6185
+ case /* bytes next_since_token */ 2:
6186
+ message.nextSinceToken = reader.bytes();
6187
+ break;
6067
6188
  default:
6068
6189
  let u = options.readUnknownField;
6069
6190
  if (u === "throw")
@@ -6079,6 +6200,9 @@ class TxAPI_Open_Response$Type extends MessageType<TxAPI_Open_Response> {
6079
6200
  /* MiLaboratories.PL.API.Tx tx = 1; */
6080
6201
  if (message.tx)
6081
6202
  Tx.internalBinaryWrite(message.tx, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
6203
+ /* bytes next_since_token = 2; */
6204
+ if (message.nextSinceToken.length)
6205
+ writer.tag(2, WireType.LengthDelimited).bytes(message.nextSinceToken);
6082
6206
  let u = options.writeUnknownFields;
6083
6207
  if (u !== false)
6084
6208
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -9640,7 +9764,8 @@ class ResourceAPI_Tree_Request$Type extends MessageType<ResourceAPI_Tree_Request
9640
9764
  { no: 6, name: "include_kv", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
9641
9765
  { no: 7, name: "traverse_stop_rules", kind: "message", T: () => ResourceAPI_Tree_Filter },
9642
9766
  { no: 8, name: "seeds", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ResourceAPI_Tree_SeedResource },
9643
- { no: 9, name: "show_soft_deletes", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
9767
+ { no: 9, name: "show_soft_deletes", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
9768
+ { no: 10, name: "changed_since_token", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
9644
9769
  ]);
9645
9770
  }
9646
9771
  create(value?: PartialMessage<ResourceAPI_Tree_Request>): ResourceAPI_Tree_Request {
@@ -9650,6 +9775,7 @@ class ResourceAPI_Tree_Request$Type extends MessageType<ResourceAPI_Tree_Request
9650
9775
  message.includeKv = false;
9651
9776
  message.seeds = [];
9652
9777
  message.showSoftDeletes = false;
9778
+ message.changedSinceToken = new Uint8Array(0);
9653
9779
  if (value !== undefined)
9654
9780
  reflectionMergePartial<ResourceAPI_Tree_Request>(this, message, value);
9655
9781
  return message;
@@ -9683,6 +9809,9 @@ class ResourceAPI_Tree_Request$Type extends MessageType<ResourceAPI_Tree_Request
9683
9809
  case /* bool show_soft_deletes */ 9:
9684
9810
  message.showSoftDeletes = reader.bool();
9685
9811
  break;
9812
+ case /* bytes changed_since_token */ 10:
9813
+ message.changedSinceToken = reader.bytes();
9814
+ break;
9686
9815
  default:
9687
9816
  let u = options.readUnknownField;
9688
9817
  if (u === "throw")
@@ -9719,6 +9848,9 @@ class ResourceAPI_Tree_Request$Type extends MessageType<ResourceAPI_Tree_Request
9719
9848
  /* bool show_soft_deletes = 9; */
9720
9849
  if (message.showSoftDeletes !== false)
9721
9850
  writer.tag(9, WireType.Varint).bool(message.showSoftDeletes);
9851
+ /* bytes changed_since_token = 10; */
9852
+ if (message.changedSinceToken.length)
9853
+ writer.tag(10, WireType.LengthDelimited).bytes(message.changedSinceToken);
9722
9854
  let u = options.writeUnknownFields;
9723
9855
  if (u !== false)
9724
9856
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -9979,7 +10111,8 @@ class ResourceAPI_Tree_Response$Type extends MessageType<ResourceAPI_Tree_Respon
9979
10111
  { no: 2, name: "kv", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ResourceAPI_Tree_KV },
9980
10112
  { no: 3, name: "traverse_was_stopped", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
9981
10113
  { no: 4, name: "resource_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
9982
- { no: 5, name: "resource_signature", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
10114
+ { no: 5, name: "resource_signature", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
10115
+ { no: 6, name: "resource_unchanged", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
9983
10116
  ]);
9984
10117
  }
9985
10118
  create(value?: PartialMessage<ResourceAPI_Tree_Response>): ResourceAPI_Tree_Response {
@@ -9988,6 +10121,7 @@ class ResourceAPI_Tree_Response$Type extends MessageType<ResourceAPI_Tree_Respon
9988
10121
  message.traverseWasStopped = false;
9989
10122
  message.resourceId = 0n;
9990
10123
  message.resourceSignature = new Uint8Array(0);
10124
+ message.resourceUnchanged = false;
9991
10125
  if (value !== undefined)
9992
10126
  reflectionMergePartial<ResourceAPI_Tree_Response>(this, message, value);
9993
10127
  return message;
@@ -10012,6 +10146,9 @@ class ResourceAPI_Tree_Response$Type extends MessageType<ResourceAPI_Tree_Respon
10012
10146
  case /* bytes resource_signature */ 5:
10013
10147
  message.resourceSignature = reader.bytes();
10014
10148
  break;
10149
+ case /* bool resource_unchanged */ 6:
10150
+ message.resourceUnchanged = reader.bool();
10151
+ break;
10015
10152
  default:
10016
10153
  let u = options.readUnknownField;
10017
10154
  if (u === "throw")
@@ -10039,6 +10176,9 @@ class ResourceAPI_Tree_Response$Type extends MessageType<ResourceAPI_Tree_Respon
10039
10176
  /* bytes resource_signature = 5; */
10040
10177
  if (message.resourceSignature.length)
10041
10178
  writer.tag(5, WireType.LengthDelimited).bytes(message.resourceSignature);
10179
+ /* bool resource_unchanged = 6; */
10180
+ if (message.resourceUnchanged !== false)
10181
+ writer.tag(6, WireType.Varint).bool(message.resourceUnchanged);
10042
10182
  let u = options.writeUnknownFields;
10043
10183
  if (u !== false)
10044
10184
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -17743,6 +17883,7 @@ class AuthAPI_ListMethods_MethodInfo$Type extends MessageType<AuthAPI_ListMethod
17743
17883
  super("MiLaboratories.PL.API.AuthAPI.ListMethods.MethodInfo", [
17744
17884
  { no: 6, name: "id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
17745
17885
  { no: 7, name: "description", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
17886
+ { no: 9, name: "title", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
17746
17887
  { no: 4, name: "basic", kind: "message", oneof: "method", T: () => AuthAPI_ListMethods_BasicAuthMethod },
17747
17888
  { no: 5, name: "token", kind: "message", oneof: "method", T: () => AuthAPI_ListMethods_TokenAuthMethod },
17748
17889
  { no: 8, name: "sso", kind: "message", oneof: "method", T: () => AuthAPI_ListMethods_SSOAuthMethod }
@@ -17752,6 +17893,7 @@ class AuthAPI_ListMethods_MethodInfo$Type extends MessageType<AuthAPI_ListMethod
17752
17893
  const message = globalThis.Object.create((this.messagePrototype!));
17753
17894
  message.id = "";
17754
17895
  message.description = "";
17896
+ message.title = "";
17755
17897
  message.method = { oneofKind: undefined };
17756
17898
  if (value !== undefined)
17757
17899
  reflectionMergePartial<AuthAPI_ListMethods_MethodInfo>(this, message, value);
@@ -17768,6 +17910,9 @@ class AuthAPI_ListMethods_MethodInfo$Type extends MessageType<AuthAPI_ListMethod
17768
17910
  case /* string description */ 7:
17769
17911
  message.description = reader.string();
17770
17912
  break;
17913
+ case /* string title */ 9:
17914
+ message.title = reader.string();
17915
+ break;
17771
17916
  case /* MiLaboratories.PL.API.AuthAPI.ListMethods.BasicAuthMethod basic */ 4:
17772
17917
  message.method = {
17773
17918
  oneofKind: "basic",
@@ -17813,6 +17958,9 @@ class AuthAPI_ListMethods_MethodInfo$Type extends MessageType<AuthAPI_ListMethod
17813
17958
  /* MiLaboratories.PL.API.AuthAPI.ListMethods.SSOAuthMethod sso = 8; */
17814
17959
  if (message.method.oneofKind === "sso")
17815
17960
  AuthAPI_ListMethods_SSOAuthMethod.internalBinaryWrite(message.method.sso, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
17961
+ /* string title = 9; */
17962
+ if (message.title !== "")
17963
+ writer.tag(9, WireType.LengthDelimited).string(message.title);
17816
17964
  let u = options.writeUnknownFields;
17817
17965
  if (u !== false)
17818
17966
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -17864,7 +18012,9 @@ export const AuthAPI_BeginSSOLogin = new AuthAPI_BeginSSOLogin$Type();
17864
18012
  // @generated message type with reflection information, may provide speed optimized methods
17865
18013
  class AuthAPI_BeginSSOLogin_Request$Type extends MessageType<AuthAPI_BeginSSOLogin_Request> {
17866
18014
  constructor() {
17867
- super("MiLaboratories.PL.API.AuthAPI.BeginSSOLogin.Request", []);
18015
+ super("MiLaboratories.PL.API.AuthAPI.BeginSSOLogin.Request", [
18016
+ { no: 1, name: "idp", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
18017
+ ]);
17868
18018
  }
17869
18019
  create(value?: PartialMessage<AuthAPI_BeginSSOLogin_Request>): AuthAPI_BeginSSOLogin_Request {
17870
18020
  const message = globalThis.Object.create((this.messagePrototype!));
@@ -17877,6 +18027,9 @@ class AuthAPI_BeginSSOLogin_Request$Type extends MessageType<AuthAPI_BeginSSOLog
17877
18027
  while (reader.pos < end) {
17878
18028
  let [fieldNo, wireType] = reader.tag();
17879
18029
  switch (fieldNo) {
18030
+ case /* optional string idp */ 1:
18031
+ message.idp = reader.string();
18032
+ break;
17880
18033
  default:
17881
18034
  let u = options.readUnknownField;
17882
18035
  if (u === "throw")
@@ -17889,6 +18042,9 @@ class AuthAPI_BeginSSOLogin_Request$Type extends MessageType<AuthAPI_BeginSSOLog
17889
18042
  return message;
17890
18043
  }
17891
18044
  internalBinaryWrite(message: AuthAPI_BeginSSOLogin_Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
18045
+ /* optional string idp = 1; */
18046
+ if (message.idp !== undefined)
18047
+ writer.tag(1, WireType.LengthDelimited).string(message.idp);
17892
18048
  let u = options.writeUnknownFields;
17893
18049
  if (u !== false)
17894
18050
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -18207,7 +18363,8 @@ class AuthAPI_Login_BasicCredentials$Type extends MessageType<AuthAPI_Login_Basi
18207
18363
  constructor() {
18208
18364
  super("MiLaboratories.PL.API.AuthAPI.Login.BasicCredentials", [
18209
18365
  { no: 1, name: "login", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
18210
- { no: 2, name: "password", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
18366
+ { no: 2, name: "password", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
18367
+ { no: 3, name: "idp", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
18211
18368
  ]);
18212
18369
  }
18213
18370
  create(value?: PartialMessage<AuthAPI_Login_BasicCredentials>): AuthAPI_Login_BasicCredentials {
@@ -18229,6 +18386,9 @@ class AuthAPI_Login_BasicCredentials$Type extends MessageType<AuthAPI_Login_Basi
18229
18386
  case /* string password */ 2:
18230
18387
  message.password = reader.string();
18231
18388
  break;
18389
+ case /* optional string idp */ 3:
18390
+ message.idp = reader.string();
18391
+ break;
18232
18392
  default:
18233
18393
  let u = options.readUnknownField;
18234
18394
  if (u === "throw")
@@ -18247,6 +18407,9 @@ class AuthAPI_Login_BasicCredentials$Type extends MessageType<AuthAPI_Login_Basi
18247
18407
  /* string password = 2; */
18248
18408
  if (message.password !== "")
18249
18409
  writer.tag(2, WireType.LengthDelimited).string(message.password);
18410
+ /* optional string idp = 3; */
18411
+ if (message.idp !== undefined)
18412
+ writer.tag(3, WireType.LengthDelimited).string(message.idp);
18250
18413
  let u = options.writeUnknownFields;
18251
18414
  if (u !== false)
18252
18415
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -18308,7 +18471,8 @@ export const AuthAPI_Login_TokenCredentials = new AuthAPI_Login_TokenCredentials
18308
18471
  class AuthAPI_Login_SSOCredentials$Type extends MessageType<AuthAPI_Login_SSOCredentials> {
18309
18472
  constructor() {
18310
18473
  super("MiLaboratories.PL.API.AuthAPI.Login.SSOCredentials", [
18311
- { no: 1, name: "token_response", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
18474
+ { no: 1, name: "token_response", kind: "scalar", T: 12 /*ScalarType.BYTES*/ },
18475
+ { no: 2, name: "idp", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
18312
18476
  ]);
18313
18477
  }
18314
18478
  create(value?: PartialMessage<AuthAPI_Login_SSOCredentials>): AuthAPI_Login_SSOCredentials {
@@ -18326,6 +18490,9 @@ class AuthAPI_Login_SSOCredentials$Type extends MessageType<AuthAPI_Login_SSOCre
18326
18490
  case /* bytes token_response */ 1:
18327
18491
  message.tokenResponse = reader.bytes();
18328
18492
  break;
18493
+ case /* optional string idp */ 2:
18494
+ message.idp = reader.string();
18495
+ break;
18329
18496
  default:
18330
18497
  let u = options.readUnknownField;
18331
18498
  if (u === "throw")
@@ -18341,6 +18508,9 @@ class AuthAPI_Login_SSOCredentials$Type extends MessageType<AuthAPI_Login_SSOCre
18341
18508
  /* bytes token_response = 1; */
18342
18509
  if (message.tokenResponse.length)
18343
18510
  writer.tag(1, WireType.LengthDelimited).bytes(message.tokenResponse);
18511
+ /* optional string idp = 2; */
18512
+ if (message.idp !== undefined)
18513
+ writer.tag(2, WireType.LengthDelimited).string(message.idp);
18344
18514
  let u = options.writeUnknownFields;
18345
18515
  if (u !== false)
18346
18516
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -19979,12 +20149,18 @@ export const AuthAPI_ListUserResources_SharedResource = new AuthAPI_ListUserReso
19979
20149
  class AuthAPI_User$Type extends MessageType<AuthAPI_User> {
19980
20150
  constructor() {
19981
20151
  super("MiLaboratories.PL.API.AuthAPI.User", [
19982
- { no: 1, name: "login", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
20152
+ { no: 1, name: "login", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
20153
+ { no: 2, name: "display_name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
20154
+ { no: 3, name: "email", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
20155
+ { no: 4, name: "attributes", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "scalar", T: 9 /*ScalarType.STRING*/ } }
19983
20156
  ]);
19984
20157
  }
19985
20158
  create(value?: PartialMessage<AuthAPI_User>): AuthAPI_User {
19986
20159
  const message = globalThis.Object.create((this.messagePrototype!));
19987
20160
  message.login = "";
20161
+ message.displayName = "";
20162
+ message.email = "";
20163
+ message.attributes = {};
19988
20164
  if (value !== undefined)
19989
20165
  reflectionMergePartial<AuthAPI_User>(this, message, value);
19990
20166
  return message;
@@ -19997,6 +20173,15 @@ class AuthAPI_User$Type extends MessageType<AuthAPI_User> {
19997
20173
  case /* string login */ 1:
19998
20174
  message.login = reader.string();
19999
20175
  break;
20176
+ case /* string display_name */ 2:
20177
+ message.displayName = reader.string();
20178
+ break;
20179
+ case /* string email */ 3:
20180
+ message.email = reader.string();
20181
+ break;
20182
+ case /* map<string, string> attributes */ 4:
20183
+ this.binaryReadMap4(message.attributes, reader, options);
20184
+ break;
20000
20185
  default:
20001
20186
  let u = options.readUnknownField;
20002
20187
  if (u === "throw")
@@ -20008,10 +20193,35 @@ class AuthAPI_User$Type extends MessageType<AuthAPI_User> {
20008
20193
  }
20009
20194
  return message;
20010
20195
  }
20196
+ private binaryReadMap4(map: AuthAPI_User["attributes"], reader: IBinaryReader, options: BinaryReadOptions): void {
20197
+ let len = reader.uint32(), end = reader.pos + len, key: keyof AuthAPI_User["attributes"] | undefined, val: AuthAPI_User["attributes"][any] | undefined;
20198
+ while (reader.pos < end) {
20199
+ let [fieldNo, wireType] = reader.tag();
20200
+ switch (fieldNo) {
20201
+ case 1:
20202
+ key = reader.string();
20203
+ break;
20204
+ case 2:
20205
+ val = reader.string();
20206
+ break;
20207
+ default: throw new globalThis.Error("unknown map entry field for MiLaboratories.PL.API.AuthAPI.User.attributes");
20208
+ }
20209
+ }
20210
+ map[key ?? ""] = val ?? "";
20211
+ }
20011
20212
  internalBinaryWrite(message: AuthAPI_User, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
20012
20213
  /* string login = 1; */
20013
20214
  if (message.login !== "")
20014
20215
  writer.tag(1, WireType.LengthDelimited).string(message.login);
20216
+ /* string display_name = 2; */
20217
+ if (message.displayName !== "")
20218
+ writer.tag(2, WireType.LengthDelimited).string(message.displayName);
20219
+ /* string email = 3; */
20220
+ if (message.email !== "")
20221
+ writer.tag(3, WireType.LengthDelimited).string(message.email);
20222
+ /* map<string, string> attributes = 4; */
20223
+ for (let k of globalThis.Object.keys(message.attributes))
20224
+ writer.tag(4, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.attributes[k]).join();
20015
20225
  let u = options.writeUnknownFields;
20016
20226
  if (u !== false)
20017
20227
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -586,7 +586,9 @@ export interface components {
586
586
  */
587
587
  clientSecret: string;
588
588
  };
589
- AuthAPI_BeginSSOLogin_Request: Record<string, never>;
589
+ AuthAPI_BeginSSOLogin_Request: {
590
+ idp: string;
591
+ };
590
592
  AuthAPI_BeginSSOLogin_Response: {
591
593
  publicPkce: components["schemas"]["AuthAPI_BeginSSOLogin_PublicPKCE"];
592
594
  };
@@ -640,8 +642,10 @@ export interface components {
640
642
  * instance. Unique across the entire server.
641
643
  */
642
644
  id: string;
643
- /** @description description is the human-readable label in case we'd like to render it in UI. */
645
+ /** @description description is the long-form human-readable text a client may render alongside the title, for example in a tooltip or under the button. */
644
646
  description: string;
647
+ /** @description title is the short human-readable label a client renders for this method, for example on the sign-in button. Always set. */
648
+ title: string;
645
649
  basic: components["schemas"]["AuthAPI_ListMethods_BasicAuthMethod"];
646
650
  token: components["schemas"]["AuthAPI_ListMethods_TokenAuthMethod"];
647
651
  sso: components["schemas"]["AuthAPI_ListMethods_SSOAuthMethod"];
@@ -672,6 +676,7 @@ export interface components {
672
676
  AuthAPI_Login_BasicCredentials: {
673
677
  login: string;
674
678
  password: string;
679
+ idp: string;
675
680
  };
676
681
  AuthAPI_Login_Request: {
677
682
  basic: components["schemas"]["AuthAPI_Login_BasicCredentials"];
@@ -695,6 +700,7 @@ export interface components {
695
700
  AuthAPI_Login_SSOCredentials: {
696
701
  /** Format: bytes */
697
702
  tokenResponse: string;
703
+ idp: string;
698
704
  };
699
705
  /**
700
706
  * @description TokenCredentials accepts any opaque bearer-style string: a controller