weave-typescript 0.34.0 → 0.36.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.
@@ -126,6 +126,17 @@ export interface AuthUser {
126
126
  avatarUrl: string;
127
127
  jobTitle: string;
128
128
  theme: string;
129
+ defaultOrganizationId: string;
130
+ defaultOrganizationSlug: string;
131
+ lastOrganizationId: string;
132
+ lastOrganizationSlug: string;
133
+ organizationPagePositions: {
134
+ [key: string]: string;
135
+ };
136
+ }
137
+ export interface AuthUser_OrganizationPagePositionsEntry {
138
+ key: string;
139
+ value: string;
129
140
  }
130
141
  export interface AuthOrganization {
131
142
  id: string;
@@ -180,6 +191,24 @@ export interface UserProfile {
180
191
  createdAt: Date | undefined;
181
192
  updatedAt: Date | undefined;
182
193
  }
194
+ export interface UserOrganizationPagePosition {
195
+ organizationSlug: string;
196
+ href: string;
197
+ }
198
+ export interface UserPreferences {
199
+ theme: string;
200
+ defaultOrganizationId: string;
201
+ defaultOrganizationSlug: string;
202
+ lastOrganizationId: string;
203
+ lastOrganizationSlug: string;
204
+ organizationPagePositions: {
205
+ [key: string]: string;
206
+ };
207
+ }
208
+ export interface UserPreferences_OrganizationPagePositionsEntry {
209
+ key: string;
210
+ value: string;
211
+ }
183
212
  export interface OrganizationAuthSettings {
184
213
  organizationId: string;
185
214
  organizationSlug: string;
@@ -280,10 +309,14 @@ export interface SupportAccessSession {
280
309
  }
281
310
  export declare const AuthSession: MessageFns<AuthSession>;
282
311
  export declare const AuthUser: MessageFns<AuthUser>;
312
+ export declare const AuthUser_OrganizationPagePositionsEntry: MessageFns<AuthUser_OrganizationPagePositionsEntry>;
283
313
  export declare const AuthOrganization: MessageFns<AuthOrganization>;
284
314
  export declare const DiscoveryOrganization: MessageFns<DiscoveryOrganization>;
285
315
  export declare const InviteOnboardingState: MessageFns<InviteOnboardingState>;
286
316
  export declare const UserProfile: MessageFns<UserProfile>;
317
+ export declare const UserOrganizationPagePosition: MessageFns<UserOrganizationPagePosition>;
318
+ export declare const UserPreferences: MessageFns<UserPreferences>;
319
+ export declare const UserPreferences_OrganizationPagePositionsEntry: MessageFns<UserPreferences_OrganizationPagePositionsEntry>;
287
320
  export declare const OrganizationAuthSettings: MessageFns<OrganizationAuthSettings>;
288
321
  export declare const OrganizationMember: MessageFns<OrganizationMember>;
289
322
  export declare const RbacPolicySummary: MessageFns<RbacPolicySummary>;
@@ -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.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,6 +2128,326 @@ exports.UserProfile = {
1931
2128
  return message;
1932
2129
  },
1933
2130
  };
2131
+ function createBaseUserOrganizationPagePosition() {
2132
+ return { organizationSlug: "", href: "" };
2133
+ }
2134
+ exports.UserOrganizationPagePosition = {
2135
+ encode(message, writer = new wire_1.BinaryWriter()) {
2136
+ if (message.organizationSlug !== "") {
2137
+ writer.uint32(10).string(message.organizationSlug);
2138
+ }
2139
+ if (message.href !== "") {
2140
+ writer.uint32(18).string(message.href);
2141
+ }
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);
2170
+ }
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;
2187
+ }
2188
+ if (message.href !== "") {
2189
+ obj.href = message.href;
2190
+ }
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);
2218
+ }
2219
+ if (message.defaultOrganizationId !== "") {
2220
+ writer.uint32(18).string(message.defaultOrganizationId);
2221
+ }
2222
+ if (message.defaultOrganizationSlug !== "") {
2223
+ writer.uint32(26).string(message.defaultOrganizationSlug);
2224
+ }
2225
+ if (message.lastOrganizationId !== "") {
2226
+ writer.uint32(34).string(message.lastOrganizationId);
2227
+ }
2228
+ if (message.lastOrganizationSlug !== "") {
2229
+ writer.uint32(42).string(message.lastOrganizationSlug);
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
+ });
2235
+ return writer;
2236
+ },
2237
+ decode(input, length) {
2238
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
2239
+ const end = length === undefined ? reader.len : reader.pos + length;
2240
+ const message = createBaseUserPreferences();
2241
+ while (reader.pos < end) {
2242
+ const tag = reader.uint32();
2243
+ switch (tag >>> 3) {
2244
+ case 1: {
2245
+ if (tag !== 10) {
2246
+ break;
2247
+ }
2248
+ message.theme = reader.string();
2249
+ continue;
2250
+ }
2251
+ case 2: {
2252
+ if (tag !== 18) {
2253
+ break;
2254
+ }
2255
+ message.defaultOrganizationId = reader.string();
2256
+ continue;
2257
+ }
2258
+ case 3: {
2259
+ if (tag !== 26) {
2260
+ break;
2261
+ }
2262
+ message.defaultOrganizationSlug = reader.string();
2263
+ continue;
2264
+ }
2265
+ case 4: {
2266
+ if (tag !== 34) {
2267
+ break;
2268
+ }
2269
+ message.lastOrganizationId = reader.string();
2270
+ continue;
2271
+ }
2272
+ case 5: {
2273
+ if (tag !== 42) {
2274
+ break;
2275
+ }
2276
+ message.lastOrganizationSlug = reader.string();
2277
+ continue;
2278
+ }
2279
+ case 6: {
2280
+ if (tag !== 50) {
2281
+ break;
2282
+ }
2283
+ const entry6 = exports.UserPreferences_OrganizationPagePositionsEntry.decode(reader, reader.uint32());
2284
+ if (entry6.value !== undefined) {
2285
+ message.organizationPagePositions[entry6.key] = entry6.value;
2286
+ }
2287
+ continue;
2288
+ }
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
+ };
1934
2451
  function createBaseOrganizationAuthSettings() {
1935
2452
  return {
1936
2453
  organizationId: "",