weave-typescript 0.35.0 → 0.37.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.
@@ -5,7 +5,7 @@
5
5
  // protoc unknown
6
6
  // source: weaveapi/auth/v1/auth.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.SupportAccessSession = exports.ScimGroupMapping = exports.ScimTokenRotation = exports.ScimConnection = exports.SsoConnection = exports.RbacPermission = exports.RbacRole = exports.RbacResource = exports.RbacPolicySummary = exports.OrganizationMember = exports.OrganizationAuthSettings = exports.UserProfile = exports.InviteOnboardingState = exports.DiscoveryOrganization = exports.AuthOrganization = exports.AuthUser = exports.AuthSession = exports.InviteRecoveryStatus = exports.InviteRecoveryReason = exports.InviteOnboardingStatus = exports.AuthProvider = exports.ScimConnectionStatus = exports.SsoConnectionStatus = exports.SsoConnectionType = exports.OrganizationKind = exports.MembershipStatus = exports.DiscoveryOrganizationStatus = exports.AuthMethod = exports.protobufPackage = void 0;
8
+ exports.SupportAccessSession = exports.ScimGroupMapping = exports.ScimTokenRotation = exports.ScimConnection = exports.SsoConnection = exports.RbacPermission = exports.RbacRole = exports.RbacResource = exports.RbacPolicySummary = exports.OrganizationTeamMember = exports.OrganizationTeam = exports.OrganizationMember = exports.OrganizationAuthSettings = exports.UserPreferences_OrganizationPagePositionsEntry = exports.UserPreferences = exports.UserOrganizationPagePosition = exports.UserProfile = exports.InviteOnboardingState = exports.DiscoveryOrganization = exports.AuthOrganization = exports.AuthUser_OrganizationPagePositionsEntry = exports.AuthUser = exports.AuthSession = exports.InviteRecoveryStatus = exports.InviteRecoveryReason = exports.InviteOnboardingStatus = exports.AuthProvider = exports.ScimConnectionStatus = exports.SsoConnectionStatus = exports.SsoConnectionType = exports.OrganizationKind = exports.MembershipStatus = exports.DiscoveryOrganizationStatus = exports.AuthMethod = exports.protobufPackage = void 0;
9
9
  exports.authMethodFromJSON = authMethodFromJSON;
10
10
  exports.authMethodToJSON = authMethodToJSON;
11
11
  exports.discoveryOrganizationStatusFromJSON = discoveryOrganizationStatusFromJSON;
@@ -753,7 +753,19 @@ exports.AuthSession = {
753
753
  },
754
754
  };
755
755
  function createBaseAuthUser() {
756
- return { id: "", displayName: "", email: "", avatarUrl: "", jobTitle: "", theme: "" };
756
+ return {
757
+ id: "",
758
+ displayName: "",
759
+ email: "",
760
+ avatarUrl: "",
761
+ jobTitle: "",
762
+ theme: "",
763
+ defaultOrganizationId: "",
764
+ defaultOrganizationSlug: "",
765
+ lastOrganizationId: "",
766
+ lastOrganizationSlug: "",
767
+ organizationPagePositions: {},
768
+ };
757
769
  }
758
770
  exports.AuthUser = {
759
771
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -775,6 +787,21 @@ exports.AuthUser = {
775
787
  if (message.theme !== "") {
776
788
  writer.uint32(50).string(message.theme);
777
789
  }
790
+ if (message.defaultOrganizationId !== "") {
791
+ writer.uint32(58).string(message.defaultOrganizationId);
792
+ }
793
+ if (message.defaultOrganizationSlug !== "") {
794
+ writer.uint32(66).string(message.defaultOrganizationSlug);
795
+ }
796
+ if (message.lastOrganizationId !== "") {
797
+ writer.uint32(74).string(message.lastOrganizationId);
798
+ }
799
+ if (message.lastOrganizationSlug !== "") {
800
+ writer.uint32(82).string(message.lastOrganizationSlug);
801
+ }
802
+ globalThis.Object.entries(message.organizationPagePositions).forEach(([key, value]) => {
803
+ exports.AuthUser_OrganizationPagePositionsEntry.encode({ key: key, value }, writer.uint32(90).fork()).join();
804
+ });
778
805
  return writer;
779
806
  },
780
807
  decode(input, length) {
@@ -826,6 +853,44 @@ exports.AuthUser = {
826
853
  message.theme = reader.string();
827
854
  continue;
828
855
  }
856
+ case 7: {
857
+ if (tag !== 58) {
858
+ break;
859
+ }
860
+ message.defaultOrganizationId = reader.string();
861
+ continue;
862
+ }
863
+ case 8: {
864
+ if (tag !== 66) {
865
+ break;
866
+ }
867
+ message.defaultOrganizationSlug = reader.string();
868
+ continue;
869
+ }
870
+ case 9: {
871
+ if (tag !== 74) {
872
+ break;
873
+ }
874
+ message.lastOrganizationId = reader.string();
875
+ continue;
876
+ }
877
+ case 10: {
878
+ if (tag !== 82) {
879
+ break;
880
+ }
881
+ message.lastOrganizationSlug = reader.string();
882
+ continue;
883
+ }
884
+ case 11: {
885
+ if (tag !== 90) {
886
+ break;
887
+ }
888
+ const entry11 = exports.AuthUser_OrganizationPagePositionsEntry.decode(reader, reader.uint32());
889
+ if (entry11.value !== undefined) {
890
+ message.organizationPagePositions[entry11.key] = entry11.value;
891
+ }
892
+ continue;
893
+ }
829
894
  }
830
895
  if ((tag & 7) === 4 || tag === 0) {
831
896
  break;
@@ -854,6 +919,37 @@ exports.AuthUser = {
854
919
  ? globalThis.String(object.job_title)
855
920
  : "",
856
921
  theme: isSet(object.theme) ? globalThis.String(object.theme) : "",
922
+ defaultOrganizationId: isSet(object.defaultOrganizationId)
923
+ ? globalThis.String(object.defaultOrganizationId)
924
+ : isSet(object.default_organization_id)
925
+ ? globalThis.String(object.default_organization_id)
926
+ : "",
927
+ defaultOrganizationSlug: isSet(object.defaultOrganizationSlug)
928
+ ? globalThis.String(object.defaultOrganizationSlug)
929
+ : isSet(object.default_organization_slug)
930
+ ? globalThis.String(object.default_organization_slug)
931
+ : "",
932
+ lastOrganizationId: isSet(object.lastOrganizationId)
933
+ ? globalThis.String(object.lastOrganizationId)
934
+ : isSet(object.last_organization_id)
935
+ ? globalThis.String(object.last_organization_id)
936
+ : "",
937
+ lastOrganizationSlug: isSet(object.lastOrganizationSlug)
938
+ ? globalThis.String(object.lastOrganizationSlug)
939
+ : isSet(object.last_organization_slug)
940
+ ? globalThis.String(object.last_organization_slug)
941
+ : "",
942
+ organizationPagePositions: isObject(object.organizationPagePositions)
943
+ ? globalThis.Object.entries(object.organizationPagePositions).reduce((acc, [key, value]) => {
944
+ acc[key] = globalThis.String(value);
945
+ return acc;
946
+ }, {})
947
+ : isObject(object.organization_page_positions)
948
+ ? globalThis.Object.entries(object.organization_page_positions).reduce((acc, [key, value]) => {
949
+ acc[key] = globalThis.String(value);
950
+ return acc;
951
+ }, {})
952
+ : {},
857
953
  };
858
954
  },
859
955
  toJSON(message) {
@@ -876,13 +972,34 @@ exports.AuthUser = {
876
972
  if (message.theme !== "") {
877
973
  obj.theme = message.theme;
878
974
  }
975
+ if (message.defaultOrganizationId !== "") {
976
+ obj.defaultOrganizationId = message.defaultOrganizationId;
977
+ }
978
+ if (message.defaultOrganizationSlug !== "") {
979
+ obj.defaultOrganizationSlug = message.defaultOrganizationSlug;
980
+ }
981
+ if (message.lastOrganizationId !== "") {
982
+ obj.lastOrganizationId = message.lastOrganizationId;
983
+ }
984
+ if (message.lastOrganizationSlug !== "") {
985
+ obj.lastOrganizationSlug = message.lastOrganizationSlug;
986
+ }
987
+ if (message.organizationPagePositions) {
988
+ const entries = globalThis.Object.entries(message.organizationPagePositions);
989
+ if (entries.length > 0) {
990
+ obj.organizationPagePositions = {};
991
+ entries.forEach(([k, v]) => {
992
+ obj.organizationPagePositions[k] = v;
993
+ });
994
+ }
995
+ }
879
996
  return obj;
880
997
  },
881
998
  create(base) {
882
999
  return exports.AuthUser.fromPartial(base !== null && base !== void 0 ? base : {});
883
1000
  },
884
1001
  fromPartial(object) {
885
- var _a, _b, _c, _d, _e, _f;
1002
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
886
1003
  const message = createBaseAuthUser();
887
1004
  message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
888
1005
  message.displayName = (_b = object.displayName) !== null && _b !== void 0 ? _b : "";
@@ -890,6 +1007,86 @@ exports.AuthUser = {
890
1007
  message.avatarUrl = (_d = object.avatarUrl) !== null && _d !== void 0 ? _d : "";
891
1008
  message.jobTitle = (_e = object.jobTitle) !== null && _e !== void 0 ? _e : "";
892
1009
  message.theme = (_f = object.theme) !== null && _f !== void 0 ? _f : "";
1010
+ message.defaultOrganizationId = (_g = object.defaultOrganizationId) !== null && _g !== void 0 ? _g : "";
1011
+ message.defaultOrganizationSlug = (_h = object.defaultOrganizationSlug) !== null && _h !== void 0 ? _h : "";
1012
+ message.lastOrganizationId = (_j = object.lastOrganizationId) !== null && _j !== void 0 ? _j : "";
1013
+ message.lastOrganizationSlug = (_k = object.lastOrganizationSlug) !== null && _k !== void 0 ? _k : "";
1014
+ message.organizationPagePositions =
1015
+ globalThis.Object.entries((_l = object.organizationPagePositions) !== null && _l !== void 0 ? _l : {}).reduce((acc, [key, value]) => {
1016
+ if (value !== undefined) {
1017
+ acc[key] = globalThis.String(value);
1018
+ }
1019
+ return acc;
1020
+ }, {});
1021
+ return message;
1022
+ },
1023
+ };
1024
+ function createBaseAuthUser_OrganizationPagePositionsEntry() {
1025
+ return { key: "", value: "" };
1026
+ }
1027
+ exports.AuthUser_OrganizationPagePositionsEntry = {
1028
+ encode(message, writer = new wire_1.BinaryWriter()) {
1029
+ if (message.key !== "") {
1030
+ writer.uint32(10).string(message.key);
1031
+ }
1032
+ if (message.value !== "") {
1033
+ writer.uint32(18).string(message.value);
1034
+ }
1035
+ return writer;
1036
+ },
1037
+ decode(input, length) {
1038
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1039
+ const end = length === undefined ? reader.len : reader.pos + length;
1040
+ const message = createBaseAuthUser_OrganizationPagePositionsEntry();
1041
+ while (reader.pos < end) {
1042
+ const tag = reader.uint32();
1043
+ switch (tag >>> 3) {
1044
+ case 1: {
1045
+ if (tag !== 10) {
1046
+ break;
1047
+ }
1048
+ message.key = reader.string();
1049
+ continue;
1050
+ }
1051
+ case 2: {
1052
+ if (tag !== 18) {
1053
+ break;
1054
+ }
1055
+ message.value = reader.string();
1056
+ continue;
1057
+ }
1058
+ }
1059
+ if ((tag & 7) === 4 || tag === 0) {
1060
+ break;
1061
+ }
1062
+ reader.skip(tag & 7);
1063
+ }
1064
+ return message;
1065
+ },
1066
+ fromJSON(object) {
1067
+ return {
1068
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
1069
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
1070
+ };
1071
+ },
1072
+ toJSON(message) {
1073
+ const obj = {};
1074
+ if (message.key !== "") {
1075
+ obj.key = message.key;
1076
+ }
1077
+ if (message.value !== "") {
1078
+ obj.value = message.value;
1079
+ }
1080
+ return obj;
1081
+ },
1082
+ create(base) {
1083
+ return exports.AuthUser_OrganizationPagePositionsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
1084
+ },
1085
+ fromPartial(object) {
1086
+ var _a, _b;
1087
+ const message = createBaseAuthUser_OrganizationPagePositionsEntry();
1088
+ message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
1089
+ message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
893
1090
  return message;
894
1091
  },
895
1092
  };
@@ -1931,80 +2128,116 @@ exports.UserProfile = {
1931
2128
  return message;
1932
2129
  },
1933
2130
  };
1934
- function createBaseOrganizationAuthSettings() {
1935
- return {
1936
- organizationId: "",
1937
- organizationSlug: "",
1938
- stytchOrganizationId: "",
1939
- stytchOrganizationSlug: "",
1940
- organizationKind: 0,
1941
- allowedAuthMethods: [],
1942
- allowedDomains: [],
1943
- jitProvisioningEnabled: false,
1944
- passwordAuthEnabled: false,
1945
- googleOauthEnabled: false,
1946
- microsoftOauthEnabled: false,
1947
- ssoRequired: false,
1948
- scimEnabled: false,
1949
- rbacPolicySummary: undefined,
1950
- authPolicySummary: undefined,
1951
- };
2131
+ function createBaseUserOrganizationPagePosition() {
2132
+ return { organizationSlug: "", href: "" };
1952
2133
  }
1953
- exports.OrganizationAuthSettings = {
2134
+ exports.UserOrganizationPagePosition = {
1954
2135
  encode(message, writer = new wire_1.BinaryWriter()) {
1955
- if (message.organizationId !== "") {
1956
- writer.uint32(10).string(message.organizationId);
1957
- }
1958
2136
  if (message.organizationSlug !== "") {
1959
- writer.uint32(18).string(message.organizationSlug);
1960
- }
1961
- if (message.stytchOrganizationId !== "") {
1962
- writer.uint32(26).string(message.stytchOrganizationId);
1963
- }
1964
- if (message.stytchOrganizationSlug !== "") {
1965
- writer.uint32(34).string(message.stytchOrganizationSlug);
1966
- }
1967
- if (message.organizationKind !== 0) {
1968
- writer.uint32(40).int32(message.organizationKind);
1969
- }
1970
- writer.uint32(50).fork();
1971
- for (const v of message.allowedAuthMethods) {
1972
- writer.int32(v);
2137
+ writer.uint32(10).string(message.organizationSlug);
1973
2138
  }
1974
- writer.join();
1975
- for (const v of message.allowedDomains) {
1976
- writer.uint32(58).string(v);
2139
+ if (message.href !== "") {
2140
+ writer.uint32(18).string(message.href);
1977
2141
  }
1978
- if (message.jitProvisioningEnabled !== false) {
1979
- writer.uint32(64).bool(message.jitProvisioningEnabled);
2142
+ return writer;
2143
+ },
2144
+ decode(input, length) {
2145
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2146
+ const end = length === undefined ? reader.len : reader.pos + length;
2147
+ const message = createBaseUserOrganizationPagePosition();
2148
+ while (reader.pos < end) {
2149
+ const tag = reader.uint32();
2150
+ switch (tag >>> 3) {
2151
+ case 1: {
2152
+ if (tag !== 10) {
2153
+ break;
2154
+ }
2155
+ message.organizationSlug = reader.string();
2156
+ continue;
2157
+ }
2158
+ case 2: {
2159
+ if (tag !== 18) {
2160
+ break;
2161
+ }
2162
+ message.href = reader.string();
2163
+ continue;
2164
+ }
2165
+ }
2166
+ if ((tag & 7) === 4 || tag === 0) {
2167
+ break;
2168
+ }
2169
+ reader.skip(tag & 7);
1980
2170
  }
1981
- if (message.passwordAuthEnabled !== false) {
1982
- writer.uint32(72).bool(message.passwordAuthEnabled);
2171
+ return message;
2172
+ },
2173
+ fromJSON(object) {
2174
+ return {
2175
+ organizationSlug: isSet(object.organizationSlug)
2176
+ ? globalThis.String(object.organizationSlug)
2177
+ : isSet(object.organization_slug)
2178
+ ? globalThis.String(object.organization_slug)
2179
+ : "",
2180
+ href: isSet(object.href) ? globalThis.String(object.href) : "",
2181
+ };
2182
+ },
2183
+ toJSON(message) {
2184
+ const obj = {};
2185
+ if (message.organizationSlug !== "") {
2186
+ obj.organizationSlug = message.organizationSlug;
1983
2187
  }
1984
- if (message.googleOauthEnabled !== false) {
1985
- writer.uint32(80).bool(message.googleOauthEnabled);
2188
+ if (message.href !== "") {
2189
+ obj.href = message.href;
1986
2190
  }
1987
- if (message.microsoftOauthEnabled !== false) {
1988
- writer.uint32(88).bool(message.microsoftOauthEnabled);
2191
+ return obj;
2192
+ },
2193
+ create(base) {
2194
+ return exports.UserOrganizationPagePosition.fromPartial(base !== null && base !== void 0 ? base : {});
2195
+ },
2196
+ fromPartial(object) {
2197
+ var _a, _b;
2198
+ const message = createBaseUserOrganizationPagePosition();
2199
+ message.organizationSlug = (_a = object.organizationSlug) !== null && _a !== void 0 ? _a : "";
2200
+ message.href = (_b = object.href) !== null && _b !== void 0 ? _b : "";
2201
+ return message;
2202
+ },
2203
+ };
2204
+ function createBaseUserPreferences() {
2205
+ return {
2206
+ theme: "",
2207
+ defaultOrganizationId: "",
2208
+ defaultOrganizationSlug: "",
2209
+ lastOrganizationId: "",
2210
+ lastOrganizationSlug: "",
2211
+ organizationPagePositions: {},
2212
+ };
2213
+ }
2214
+ exports.UserPreferences = {
2215
+ encode(message, writer = new wire_1.BinaryWriter()) {
2216
+ if (message.theme !== "") {
2217
+ writer.uint32(10).string(message.theme);
1989
2218
  }
1990
- if (message.ssoRequired !== false) {
1991
- writer.uint32(96).bool(message.ssoRequired);
2219
+ if (message.defaultOrganizationId !== "") {
2220
+ writer.uint32(18).string(message.defaultOrganizationId);
1992
2221
  }
1993
- if (message.scimEnabled !== false) {
1994
- writer.uint32(104).bool(message.scimEnabled);
2222
+ if (message.defaultOrganizationSlug !== "") {
2223
+ writer.uint32(26).string(message.defaultOrganizationSlug);
1995
2224
  }
1996
- if (message.rbacPolicySummary !== undefined) {
1997
- exports.RbacPolicySummary.encode(message.rbacPolicySummary, writer.uint32(114).fork()).join();
2225
+ if (message.lastOrganizationId !== "") {
2226
+ writer.uint32(34).string(message.lastOrganizationId);
1998
2227
  }
1999
- if (message.authPolicySummary !== undefined) {
2000
- struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.authPolicySummary), writer.uint32(122).fork()).join();
2228
+ if (message.lastOrganizationSlug !== "") {
2229
+ writer.uint32(42).string(message.lastOrganizationSlug);
2001
2230
  }
2231
+ globalThis.Object.entries(message.organizationPagePositions).forEach(([key, value]) => {
2232
+ exports.UserPreferences_OrganizationPagePositionsEntry.encode({ key: key, value }, writer.uint32(50).fork())
2233
+ .join();
2234
+ });
2002
2235
  return writer;
2003
2236
  },
2004
2237
  decode(input, length) {
2005
2238
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2006
2239
  const end = length === undefined ? reader.len : reader.pos + length;
2007
- const message = createBaseOrganizationAuthSettings();
2240
+ const message = createBaseUserPreferences();
2008
2241
  while (reader.pos < end) {
2009
2242
  const tag = reader.uint32();
2010
2243
  switch (tag >>> 3) {
@@ -2012,75 +2245,359 @@ exports.OrganizationAuthSettings = {
2012
2245
  if (tag !== 10) {
2013
2246
  break;
2014
2247
  }
2015
- message.organizationId = reader.string();
2248
+ message.theme = reader.string();
2016
2249
  continue;
2017
2250
  }
2018
2251
  case 2: {
2019
2252
  if (tag !== 18) {
2020
2253
  break;
2021
2254
  }
2022
- message.organizationSlug = reader.string();
2255
+ message.defaultOrganizationId = reader.string();
2023
2256
  continue;
2024
2257
  }
2025
2258
  case 3: {
2026
2259
  if (tag !== 26) {
2027
2260
  break;
2028
2261
  }
2029
- message.stytchOrganizationId = reader.string();
2262
+ message.defaultOrganizationSlug = reader.string();
2030
2263
  continue;
2031
2264
  }
2032
2265
  case 4: {
2033
2266
  if (tag !== 34) {
2034
2267
  break;
2035
2268
  }
2036
- message.stytchOrganizationSlug = reader.string();
2269
+ message.lastOrganizationId = reader.string();
2037
2270
  continue;
2038
2271
  }
2039
2272
  case 5: {
2040
- if (tag !== 40) {
2273
+ if (tag !== 42) {
2041
2274
  break;
2042
2275
  }
2043
- message.organizationKind = reader.int32();
2276
+ message.lastOrganizationSlug = reader.string();
2044
2277
  continue;
2045
2278
  }
2046
2279
  case 6: {
2047
- if (tag === 48) {
2048
- message.allowedAuthMethods.push(reader.int32());
2049
- continue;
2050
- }
2051
- if (tag === 50) {
2052
- const end2 = reader.uint32() + reader.pos;
2053
- while (reader.pos < end2) {
2054
- message.allowedAuthMethods.push(reader.int32());
2055
- }
2056
- continue;
2057
- }
2058
- break;
2059
- }
2060
- case 7: {
2061
- if (tag !== 58) {
2062
- break;
2063
- }
2064
- message.allowedDomains.push(reader.string());
2065
- continue;
2066
- }
2067
- case 8: {
2068
- if (tag !== 64) {
2280
+ if (tag !== 50) {
2069
2281
  break;
2070
2282
  }
2071
- message.jitProvisioningEnabled = reader.bool();
2072
- continue;
2073
- }
2074
- case 9: {
2075
- if (tag !== 72) {
2076
- break;
2283
+ const entry6 = exports.UserPreferences_OrganizationPagePositionsEntry.decode(reader, reader.uint32());
2284
+ if (entry6.value !== undefined) {
2285
+ message.organizationPagePositions[entry6.key] = entry6.value;
2077
2286
  }
2078
- message.passwordAuthEnabled = reader.bool();
2079
2287
  continue;
2080
2288
  }
2081
- case 10: {
2082
- if (tag !== 80) {
2083
- break;
2289
+ }
2290
+ if ((tag & 7) === 4 || tag === 0) {
2291
+ break;
2292
+ }
2293
+ reader.skip(tag & 7);
2294
+ }
2295
+ return message;
2296
+ },
2297
+ fromJSON(object) {
2298
+ return {
2299
+ theme: isSet(object.theme) ? globalThis.String(object.theme) : "",
2300
+ defaultOrganizationId: isSet(object.defaultOrganizationId)
2301
+ ? globalThis.String(object.defaultOrganizationId)
2302
+ : isSet(object.default_organization_id)
2303
+ ? globalThis.String(object.default_organization_id)
2304
+ : "",
2305
+ defaultOrganizationSlug: isSet(object.defaultOrganizationSlug)
2306
+ ? globalThis.String(object.defaultOrganizationSlug)
2307
+ : isSet(object.default_organization_slug)
2308
+ ? globalThis.String(object.default_organization_slug)
2309
+ : "",
2310
+ lastOrganizationId: isSet(object.lastOrganizationId)
2311
+ ? globalThis.String(object.lastOrganizationId)
2312
+ : isSet(object.last_organization_id)
2313
+ ? globalThis.String(object.last_organization_id)
2314
+ : "",
2315
+ lastOrganizationSlug: isSet(object.lastOrganizationSlug)
2316
+ ? globalThis.String(object.lastOrganizationSlug)
2317
+ : isSet(object.last_organization_slug)
2318
+ ? globalThis.String(object.last_organization_slug)
2319
+ : "",
2320
+ organizationPagePositions: isObject(object.organizationPagePositions)
2321
+ ? globalThis.Object.entries(object.organizationPagePositions).reduce((acc, [key, value]) => {
2322
+ acc[key] = globalThis.String(value);
2323
+ return acc;
2324
+ }, {})
2325
+ : isObject(object.organization_page_positions)
2326
+ ? globalThis.Object.entries(object.organization_page_positions).reduce((acc, [key, value]) => {
2327
+ acc[key] = globalThis.String(value);
2328
+ return acc;
2329
+ }, {})
2330
+ : {},
2331
+ };
2332
+ },
2333
+ toJSON(message) {
2334
+ const obj = {};
2335
+ if (message.theme !== "") {
2336
+ obj.theme = message.theme;
2337
+ }
2338
+ if (message.defaultOrganizationId !== "") {
2339
+ obj.defaultOrganizationId = message.defaultOrganizationId;
2340
+ }
2341
+ if (message.defaultOrganizationSlug !== "") {
2342
+ obj.defaultOrganizationSlug = message.defaultOrganizationSlug;
2343
+ }
2344
+ if (message.lastOrganizationId !== "") {
2345
+ obj.lastOrganizationId = message.lastOrganizationId;
2346
+ }
2347
+ if (message.lastOrganizationSlug !== "") {
2348
+ obj.lastOrganizationSlug = message.lastOrganizationSlug;
2349
+ }
2350
+ if (message.organizationPagePositions) {
2351
+ const entries = globalThis.Object.entries(message.organizationPagePositions);
2352
+ if (entries.length > 0) {
2353
+ obj.organizationPagePositions = {};
2354
+ entries.forEach(([k, v]) => {
2355
+ obj.organizationPagePositions[k] = v;
2356
+ });
2357
+ }
2358
+ }
2359
+ return obj;
2360
+ },
2361
+ create(base) {
2362
+ return exports.UserPreferences.fromPartial(base !== null && base !== void 0 ? base : {});
2363
+ },
2364
+ fromPartial(object) {
2365
+ var _a, _b, _c, _d, _e, _f;
2366
+ const message = createBaseUserPreferences();
2367
+ message.theme = (_a = object.theme) !== null && _a !== void 0 ? _a : "";
2368
+ message.defaultOrganizationId = (_b = object.defaultOrganizationId) !== null && _b !== void 0 ? _b : "";
2369
+ message.defaultOrganizationSlug = (_c = object.defaultOrganizationSlug) !== null && _c !== void 0 ? _c : "";
2370
+ message.lastOrganizationId = (_d = object.lastOrganizationId) !== null && _d !== void 0 ? _d : "";
2371
+ message.lastOrganizationSlug = (_e = object.lastOrganizationSlug) !== null && _e !== void 0 ? _e : "";
2372
+ message.organizationPagePositions =
2373
+ globalThis.Object.entries((_f = object.organizationPagePositions) !== null && _f !== void 0 ? _f : {}).reduce((acc, [key, value]) => {
2374
+ if (value !== undefined) {
2375
+ acc[key] = globalThis.String(value);
2376
+ }
2377
+ return acc;
2378
+ }, {});
2379
+ return message;
2380
+ },
2381
+ };
2382
+ function createBaseUserPreferences_OrganizationPagePositionsEntry() {
2383
+ return { key: "", value: "" };
2384
+ }
2385
+ exports.UserPreferences_OrganizationPagePositionsEntry = {
2386
+ encode(message, writer = new wire_1.BinaryWriter()) {
2387
+ if (message.key !== "") {
2388
+ writer.uint32(10).string(message.key);
2389
+ }
2390
+ if (message.value !== "") {
2391
+ writer.uint32(18).string(message.value);
2392
+ }
2393
+ return writer;
2394
+ },
2395
+ decode(input, length) {
2396
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2397
+ const end = length === undefined ? reader.len : reader.pos + length;
2398
+ const message = createBaseUserPreferences_OrganizationPagePositionsEntry();
2399
+ while (reader.pos < end) {
2400
+ const tag = reader.uint32();
2401
+ switch (tag >>> 3) {
2402
+ case 1: {
2403
+ if (tag !== 10) {
2404
+ break;
2405
+ }
2406
+ message.key = reader.string();
2407
+ continue;
2408
+ }
2409
+ case 2: {
2410
+ if (tag !== 18) {
2411
+ break;
2412
+ }
2413
+ message.value = reader.string();
2414
+ continue;
2415
+ }
2416
+ }
2417
+ if ((tag & 7) === 4 || tag === 0) {
2418
+ break;
2419
+ }
2420
+ reader.skip(tag & 7);
2421
+ }
2422
+ return message;
2423
+ },
2424
+ fromJSON(object) {
2425
+ return {
2426
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
2427
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
2428
+ };
2429
+ },
2430
+ toJSON(message) {
2431
+ const obj = {};
2432
+ if (message.key !== "") {
2433
+ obj.key = message.key;
2434
+ }
2435
+ if (message.value !== "") {
2436
+ obj.value = message.value;
2437
+ }
2438
+ return obj;
2439
+ },
2440
+ create(base) {
2441
+ return exports.UserPreferences_OrganizationPagePositionsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
2442
+ },
2443
+ fromPartial(object) {
2444
+ var _a, _b;
2445
+ const message = createBaseUserPreferences_OrganizationPagePositionsEntry();
2446
+ message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
2447
+ message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
2448
+ return message;
2449
+ },
2450
+ };
2451
+ function createBaseOrganizationAuthSettings() {
2452
+ return {
2453
+ organizationId: "",
2454
+ organizationSlug: "",
2455
+ stytchOrganizationId: "",
2456
+ stytchOrganizationSlug: "",
2457
+ organizationKind: 0,
2458
+ allowedAuthMethods: [],
2459
+ allowedDomains: [],
2460
+ jitProvisioningEnabled: false,
2461
+ passwordAuthEnabled: false,
2462
+ googleOauthEnabled: false,
2463
+ microsoftOauthEnabled: false,
2464
+ ssoRequired: false,
2465
+ scimEnabled: false,
2466
+ rbacPolicySummary: undefined,
2467
+ authPolicySummary: undefined,
2468
+ };
2469
+ }
2470
+ exports.OrganizationAuthSettings = {
2471
+ encode(message, writer = new wire_1.BinaryWriter()) {
2472
+ if (message.organizationId !== "") {
2473
+ writer.uint32(10).string(message.organizationId);
2474
+ }
2475
+ if (message.organizationSlug !== "") {
2476
+ writer.uint32(18).string(message.organizationSlug);
2477
+ }
2478
+ if (message.stytchOrganizationId !== "") {
2479
+ writer.uint32(26).string(message.stytchOrganizationId);
2480
+ }
2481
+ if (message.stytchOrganizationSlug !== "") {
2482
+ writer.uint32(34).string(message.stytchOrganizationSlug);
2483
+ }
2484
+ if (message.organizationKind !== 0) {
2485
+ writer.uint32(40).int32(message.organizationKind);
2486
+ }
2487
+ writer.uint32(50).fork();
2488
+ for (const v of message.allowedAuthMethods) {
2489
+ writer.int32(v);
2490
+ }
2491
+ writer.join();
2492
+ for (const v of message.allowedDomains) {
2493
+ writer.uint32(58).string(v);
2494
+ }
2495
+ if (message.jitProvisioningEnabled !== false) {
2496
+ writer.uint32(64).bool(message.jitProvisioningEnabled);
2497
+ }
2498
+ if (message.passwordAuthEnabled !== false) {
2499
+ writer.uint32(72).bool(message.passwordAuthEnabled);
2500
+ }
2501
+ if (message.googleOauthEnabled !== false) {
2502
+ writer.uint32(80).bool(message.googleOauthEnabled);
2503
+ }
2504
+ if (message.microsoftOauthEnabled !== false) {
2505
+ writer.uint32(88).bool(message.microsoftOauthEnabled);
2506
+ }
2507
+ if (message.ssoRequired !== false) {
2508
+ writer.uint32(96).bool(message.ssoRequired);
2509
+ }
2510
+ if (message.scimEnabled !== false) {
2511
+ writer.uint32(104).bool(message.scimEnabled);
2512
+ }
2513
+ if (message.rbacPolicySummary !== undefined) {
2514
+ exports.RbacPolicySummary.encode(message.rbacPolicySummary, writer.uint32(114).fork()).join();
2515
+ }
2516
+ if (message.authPolicySummary !== undefined) {
2517
+ struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.authPolicySummary), writer.uint32(122).fork()).join();
2518
+ }
2519
+ return writer;
2520
+ },
2521
+ decode(input, length) {
2522
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2523
+ const end = length === undefined ? reader.len : reader.pos + length;
2524
+ const message = createBaseOrganizationAuthSettings();
2525
+ while (reader.pos < end) {
2526
+ const tag = reader.uint32();
2527
+ switch (tag >>> 3) {
2528
+ case 1: {
2529
+ if (tag !== 10) {
2530
+ break;
2531
+ }
2532
+ message.organizationId = reader.string();
2533
+ continue;
2534
+ }
2535
+ case 2: {
2536
+ if (tag !== 18) {
2537
+ break;
2538
+ }
2539
+ message.organizationSlug = reader.string();
2540
+ continue;
2541
+ }
2542
+ case 3: {
2543
+ if (tag !== 26) {
2544
+ break;
2545
+ }
2546
+ message.stytchOrganizationId = reader.string();
2547
+ continue;
2548
+ }
2549
+ case 4: {
2550
+ if (tag !== 34) {
2551
+ break;
2552
+ }
2553
+ message.stytchOrganizationSlug = reader.string();
2554
+ continue;
2555
+ }
2556
+ case 5: {
2557
+ if (tag !== 40) {
2558
+ break;
2559
+ }
2560
+ message.organizationKind = reader.int32();
2561
+ continue;
2562
+ }
2563
+ case 6: {
2564
+ if (tag === 48) {
2565
+ message.allowedAuthMethods.push(reader.int32());
2566
+ continue;
2567
+ }
2568
+ if (tag === 50) {
2569
+ const end2 = reader.uint32() + reader.pos;
2570
+ while (reader.pos < end2) {
2571
+ message.allowedAuthMethods.push(reader.int32());
2572
+ }
2573
+ continue;
2574
+ }
2575
+ break;
2576
+ }
2577
+ case 7: {
2578
+ if (tag !== 58) {
2579
+ break;
2580
+ }
2581
+ message.allowedDomains.push(reader.string());
2582
+ continue;
2583
+ }
2584
+ case 8: {
2585
+ if (tag !== 64) {
2586
+ break;
2587
+ }
2588
+ message.jitProvisioningEnabled = reader.bool();
2589
+ continue;
2590
+ }
2591
+ case 9: {
2592
+ if (tag !== 72) {
2593
+ break;
2594
+ }
2595
+ message.passwordAuthEnabled = reader.bool();
2596
+ continue;
2597
+ }
2598
+ case 10: {
2599
+ if (tag !== 80) {
2600
+ break;
2084
2601
  }
2085
2602
  message.googleOauthEnabled = reader.bool();
2086
2603
  continue;
@@ -2534,6 +3051,355 @@ exports.OrganizationMember = {
2534
3051
  return message;
2535
3052
  },
2536
3053
  };
3054
+ function createBaseOrganizationTeam() {
3055
+ return {
3056
+ id: "",
3057
+ organizationId: "",
3058
+ slug: "",
3059
+ name: "",
3060
+ description: "",
3061
+ roleIds: [],
3062
+ members: [],
3063
+ createdAt: undefined,
3064
+ updatedAt: undefined,
3065
+ };
3066
+ }
3067
+ exports.OrganizationTeam = {
3068
+ encode(message, writer = new wire_1.BinaryWriter()) {
3069
+ if (message.id !== "") {
3070
+ writer.uint32(10).string(message.id);
3071
+ }
3072
+ if (message.organizationId !== "") {
3073
+ writer.uint32(18).string(message.organizationId);
3074
+ }
3075
+ if (message.slug !== "") {
3076
+ writer.uint32(26).string(message.slug);
3077
+ }
3078
+ if (message.name !== "") {
3079
+ writer.uint32(34).string(message.name);
3080
+ }
3081
+ if (message.description !== "") {
3082
+ writer.uint32(42).string(message.description);
3083
+ }
3084
+ for (const v of message.roleIds) {
3085
+ writer.uint32(50).string(v);
3086
+ }
3087
+ for (const v of message.members) {
3088
+ exports.OrganizationTeamMember.encode(v, writer.uint32(58).fork()).join();
3089
+ }
3090
+ if (message.createdAt !== undefined) {
3091
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(66).fork()).join();
3092
+ }
3093
+ if (message.updatedAt !== undefined) {
3094
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(74).fork()).join();
3095
+ }
3096
+ return writer;
3097
+ },
3098
+ decode(input, length) {
3099
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3100
+ const end = length === undefined ? reader.len : reader.pos + length;
3101
+ const message = createBaseOrganizationTeam();
3102
+ while (reader.pos < end) {
3103
+ const tag = reader.uint32();
3104
+ switch (tag >>> 3) {
3105
+ case 1: {
3106
+ if (tag !== 10) {
3107
+ break;
3108
+ }
3109
+ message.id = reader.string();
3110
+ continue;
3111
+ }
3112
+ case 2: {
3113
+ if (tag !== 18) {
3114
+ break;
3115
+ }
3116
+ message.organizationId = reader.string();
3117
+ continue;
3118
+ }
3119
+ case 3: {
3120
+ if (tag !== 26) {
3121
+ break;
3122
+ }
3123
+ message.slug = reader.string();
3124
+ continue;
3125
+ }
3126
+ case 4: {
3127
+ if (tag !== 34) {
3128
+ break;
3129
+ }
3130
+ message.name = reader.string();
3131
+ continue;
3132
+ }
3133
+ case 5: {
3134
+ if (tag !== 42) {
3135
+ break;
3136
+ }
3137
+ message.description = reader.string();
3138
+ continue;
3139
+ }
3140
+ case 6: {
3141
+ if (tag !== 50) {
3142
+ break;
3143
+ }
3144
+ message.roleIds.push(reader.string());
3145
+ continue;
3146
+ }
3147
+ case 7: {
3148
+ if (tag !== 58) {
3149
+ break;
3150
+ }
3151
+ message.members.push(exports.OrganizationTeamMember.decode(reader, reader.uint32()));
3152
+ continue;
3153
+ }
3154
+ case 8: {
3155
+ if (tag !== 66) {
3156
+ break;
3157
+ }
3158
+ message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
3159
+ continue;
3160
+ }
3161
+ case 9: {
3162
+ if (tag !== 74) {
3163
+ break;
3164
+ }
3165
+ message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
3166
+ continue;
3167
+ }
3168
+ }
3169
+ if ((tag & 7) === 4 || tag === 0) {
3170
+ break;
3171
+ }
3172
+ reader.skip(tag & 7);
3173
+ }
3174
+ return message;
3175
+ },
3176
+ fromJSON(object) {
3177
+ return {
3178
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
3179
+ organizationId: isSet(object.organizationId)
3180
+ ? globalThis.String(object.organizationId)
3181
+ : isSet(object.organization_id)
3182
+ ? globalThis.String(object.organization_id)
3183
+ : "",
3184
+ slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
3185
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
3186
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
3187
+ roleIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.roleIds)
3188
+ ? object.roleIds.map((e) => globalThis.String(e))
3189
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.role_ids)
3190
+ ? object.role_ids.map((e) => globalThis.String(e))
3191
+ : [],
3192
+ members: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.members)
3193
+ ? object.members.map((e) => exports.OrganizationTeamMember.fromJSON(e))
3194
+ : [],
3195
+ createdAt: isSet(object.createdAt)
3196
+ ? fromJsonTimestamp(object.createdAt)
3197
+ : isSet(object.created_at)
3198
+ ? fromJsonTimestamp(object.created_at)
3199
+ : undefined,
3200
+ updatedAt: isSet(object.updatedAt)
3201
+ ? fromJsonTimestamp(object.updatedAt)
3202
+ : isSet(object.updated_at)
3203
+ ? fromJsonTimestamp(object.updated_at)
3204
+ : undefined,
3205
+ };
3206
+ },
3207
+ toJSON(message) {
3208
+ var _a, _b;
3209
+ const obj = {};
3210
+ if (message.id !== "") {
3211
+ obj.id = message.id;
3212
+ }
3213
+ if (message.organizationId !== "") {
3214
+ obj.organizationId = message.organizationId;
3215
+ }
3216
+ if (message.slug !== "") {
3217
+ obj.slug = message.slug;
3218
+ }
3219
+ if (message.name !== "") {
3220
+ obj.name = message.name;
3221
+ }
3222
+ if (message.description !== "") {
3223
+ obj.description = message.description;
3224
+ }
3225
+ if ((_a = message.roleIds) === null || _a === void 0 ? void 0 : _a.length) {
3226
+ obj.roleIds = message.roleIds;
3227
+ }
3228
+ if ((_b = message.members) === null || _b === void 0 ? void 0 : _b.length) {
3229
+ obj.members = message.members.map((e) => exports.OrganizationTeamMember.toJSON(e));
3230
+ }
3231
+ if (message.createdAt !== undefined) {
3232
+ obj.createdAt = message.createdAt.toISOString();
3233
+ }
3234
+ if (message.updatedAt !== undefined) {
3235
+ obj.updatedAt = message.updatedAt.toISOString();
3236
+ }
3237
+ return obj;
3238
+ },
3239
+ create(base) {
3240
+ return exports.OrganizationTeam.fromPartial(base !== null && base !== void 0 ? base : {});
3241
+ },
3242
+ fromPartial(object) {
3243
+ var _a, _b;
3244
+ var _c, _d, _e, _f, _g, _h, _j;
3245
+ const message = createBaseOrganizationTeam();
3246
+ message.id = (_c = object.id) !== null && _c !== void 0 ? _c : "";
3247
+ message.organizationId = (_d = object.organizationId) !== null && _d !== void 0 ? _d : "";
3248
+ message.slug = (_e = object.slug) !== null && _e !== void 0 ? _e : "";
3249
+ message.name = (_f = object.name) !== null && _f !== void 0 ? _f : "";
3250
+ message.description = (_g = object.description) !== null && _g !== void 0 ? _g : "";
3251
+ message.roleIds = ((_a = object.roleIds) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
3252
+ message.members = ((_b = object.members) === null || _b === void 0 ? void 0 : _b.map((e) => exports.OrganizationTeamMember.fromPartial(e))) || [];
3253
+ message.createdAt = (_h = object.createdAt) !== null && _h !== void 0 ? _h : undefined;
3254
+ message.updatedAt = (_j = object.updatedAt) !== null && _j !== void 0 ? _j : undefined;
3255
+ return message;
3256
+ },
3257
+ };
3258
+ function createBaseOrganizationTeamMember() {
3259
+ return { organizationMembershipId: "", userId: "", email: "", displayName: "", avatarUrl: "", status: 0 };
3260
+ }
3261
+ exports.OrganizationTeamMember = {
3262
+ encode(message, writer = new wire_1.BinaryWriter()) {
3263
+ if (message.organizationMembershipId !== "") {
3264
+ writer.uint32(10).string(message.organizationMembershipId);
3265
+ }
3266
+ if (message.userId !== "") {
3267
+ writer.uint32(18).string(message.userId);
3268
+ }
3269
+ if (message.email !== "") {
3270
+ writer.uint32(26).string(message.email);
3271
+ }
3272
+ if (message.displayName !== "") {
3273
+ writer.uint32(34).string(message.displayName);
3274
+ }
3275
+ if (message.avatarUrl !== "") {
3276
+ writer.uint32(42).string(message.avatarUrl);
3277
+ }
3278
+ if (message.status !== 0) {
3279
+ writer.uint32(48).int32(message.status);
3280
+ }
3281
+ return writer;
3282
+ },
3283
+ decode(input, length) {
3284
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
3285
+ const end = length === undefined ? reader.len : reader.pos + length;
3286
+ const message = createBaseOrganizationTeamMember();
3287
+ while (reader.pos < end) {
3288
+ const tag = reader.uint32();
3289
+ switch (tag >>> 3) {
3290
+ case 1: {
3291
+ if (tag !== 10) {
3292
+ break;
3293
+ }
3294
+ message.organizationMembershipId = reader.string();
3295
+ continue;
3296
+ }
3297
+ case 2: {
3298
+ if (tag !== 18) {
3299
+ break;
3300
+ }
3301
+ message.userId = reader.string();
3302
+ continue;
3303
+ }
3304
+ case 3: {
3305
+ if (tag !== 26) {
3306
+ break;
3307
+ }
3308
+ message.email = reader.string();
3309
+ continue;
3310
+ }
3311
+ case 4: {
3312
+ if (tag !== 34) {
3313
+ break;
3314
+ }
3315
+ message.displayName = reader.string();
3316
+ continue;
3317
+ }
3318
+ case 5: {
3319
+ if (tag !== 42) {
3320
+ break;
3321
+ }
3322
+ message.avatarUrl = reader.string();
3323
+ continue;
3324
+ }
3325
+ case 6: {
3326
+ if (tag !== 48) {
3327
+ break;
3328
+ }
3329
+ message.status = reader.int32();
3330
+ continue;
3331
+ }
3332
+ }
3333
+ if ((tag & 7) === 4 || tag === 0) {
3334
+ break;
3335
+ }
3336
+ reader.skip(tag & 7);
3337
+ }
3338
+ return message;
3339
+ },
3340
+ fromJSON(object) {
3341
+ return {
3342
+ organizationMembershipId: isSet(object.organizationMembershipId)
3343
+ ? globalThis.String(object.organizationMembershipId)
3344
+ : isSet(object.organization_membership_id)
3345
+ ? globalThis.String(object.organization_membership_id)
3346
+ : "",
3347
+ userId: isSet(object.userId)
3348
+ ? globalThis.String(object.userId)
3349
+ : isSet(object.user_id)
3350
+ ? globalThis.String(object.user_id)
3351
+ : "",
3352
+ email: isSet(object.email) ? globalThis.String(object.email) : "",
3353
+ displayName: isSet(object.displayName)
3354
+ ? globalThis.String(object.displayName)
3355
+ : isSet(object.display_name)
3356
+ ? globalThis.String(object.display_name)
3357
+ : "",
3358
+ avatarUrl: isSet(object.avatarUrl)
3359
+ ? globalThis.String(object.avatarUrl)
3360
+ : isSet(object.avatar_url)
3361
+ ? globalThis.String(object.avatar_url)
3362
+ : "",
3363
+ status: isSet(object.status) ? membershipStatusFromJSON(object.status) : 0,
3364
+ };
3365
+ },
3366
+ toJSON(message) {
3367
+ const obj = {};
3368
+ if (message.organizationMembershipId !== "") {
3369
+ obj.organizationMembershipId = message.organizationMembershipId;
3370
+ }
3371
+ if (message.userId !== "") {
3372
+ obj.userId = message.userId;
3373
+ }
3374
+ if (message.email !== "") {
3375
+ obj.email = message.email;
3376
+ }
3377
+ if (message.displayName !== "") {
3378
+ obj.displayName = message.displayName;
3379
+ }
3380
+ if (message.avatarUrl !== "") {
3381
+ obj.avatarUrl = message.avatarUrl;
3382
+ }
3383
+ if (message.status !== 0) {
3384
+ obj.status = membershipStatusToJSON(message.status);
3385
+ }
3386
+ return obj;
3387
+ },
3388
+ create(base) {
3389
+ return exports.OrganizationTeamMember.fromPartial(base !== null && base !== void 0 ? base : {});
3390
+ },
3391
+ fromPartial(object) {
3392
+ var _a, _b, _c, _d, _e, _f;
3393
+ const message = createBaseOrganizationTeamMember();
3394
+ message.organizationMembershipId = (_a = object.organizationMembershipId) !== null && _a !== void 0 ? _a : "";
3395
+ message.userId = (_b = object.userId) !== null && _b !== void 0 ? _b : "";
3396
+ message.email = (_c = object.email) !== null && _c !== void 0 ? _c : "";
3397
+ message.displayName = (_d = object.displayName) !== null && _d !== void 0 ? _d : "";
3398
+ message.avatarUrl = (_e = object.avatarUrl) !== null && _e !== void 0 ? _e : "";
3399
+ message.status = (_f = object.status) !== null && _f !== void 0 ? _f : 0;
3400
+ return message;
3401
+ },
3402
+ };
2537
3403
  function createBaseRbacPolicySummary() {
2538
3404
  return { resources: [], roles: [], updatedAt: undefined };
2539
3405
  }