chore: remove custom style

- Deleted the custom_style field from WorkspaceProfile and WorkspaceSetting messages in workspace_service.proto.
- Updated the corresponding Go files and gRPC service implementations to reflect the removal of custom_style.
- Removed references to custom_style in the API documentation and Swagger definitions.
- Adjusted the workspace setting migration logic to exclude custom_style.
- Updated README files to remove mentions of custom_style.
- Bumped protoc-gen-go and protoc-gen-go-grpc versions in generated files.
This commit is contained in:
Johnny
2025-12-21 21:32:01 +08:00
parent 73d83de323
commit ec5db24b2a
44 changed files with 306 additions and 241 deletions
-1
View File
@@ -68,7 +68,6 @@
},
"workspace": {
"self": "Workspace settings",
"custom-style": "Custom style",
"disallow-user-registration": {
"self": "Disallow user registration"
},
-1
View File
@@ -68,7 +68,6 @@
},
"workspace": {
"self": "Paramètres de l'espace de travail",
"custom-style": "Style personnalisé",
"enable-user-signup": {
"self": "Activer l'inscription des utilisateurs",
"description": "Une fois activé, d'autres utilisateurs peuvent s'inscrire."
-1
View File
@@ -69,7 +69,6 @@
},
"workspace": {
"self": "Munkaterület beállítások",
"custom-style": "Egyéni stílus",
"enable-user-signup": {
"self": "Felhasználói regisztráció engedélyezése",
"description": "Ha engedélyezve van, más felhasználók is regisztrálhatnak."
-1
View File
@@ -68,7 +68,6 @@
},
"workspace": {
"self": "ワークスペースの設定",
"custom-style": "カスタムスタイル",
"disallow-user-registration": {
"self": "ユーザーの登録を有効にする"
},
-1
View File
@@ -69,7 +69,6 @@
},
"workspace": {
"self": "Настройки команды",
"custom-style": "Пользовательский стиль",
"enable-user-signup": {
"self": "Разрешить регистрацию пользователей",
"description": "После включения, другие пользователи смогут зарегистрироваться."
-1
View File
@@ -68,7 +68,6 @@
},
"workspace": {
"self": "Çalışma alanı ayarları",
"custom-style": "Özel stil",
"enable-user-signup": {
"self": "Kullanıcı kaydını etkinleştir",
"description": "Etkinleştirildiğinde, diğer kullanıcılar kaydolabilir."
-1
View File
@@ -68,7 +68,6 @@
},
"workspace": {
"self": "Налаштування робочого простору",
"custom-style": "Індивідуальний стиль",
"disallow-user-registration": {
"self": "Заборонити реєстрацію користувача"
},
-1
View File
@@ -68,7 +68,6 @@
},
"workspace": {
"self": "系统设置",
"custom-style": "自定义样式",
"enable-user-signup": {
"self": "启用用户注册",
"description": "允许其他用户注册新账号"
-7
View File
@@ -19,13 +19,6 @@ function App() {
}
}, [workspaceStore.profile]);
useEffect(() => {
const styleEl = document.createElement("style");
styleEl.innerHTML = workspaceStore.setting.customStyle;
styleEl.setAttribute("type", "text/css");
document.body.insertAdjacentElement("beforeend", styleEl);
}, [workspaceStore.setting.customStyle]);
useEffect(() => {
const hasCustomBranding = workspaceStore.checkFeatureAvailable(FeatureType.CustomeBranding);
if (!hasCustomBranding || !workspaceStore.setting.branding) {
@@ -4,7 +4,6 @@ import { useTranslation } from "react-i18next";
import { toast } from "sonner";
import { Button } from "@/components/ui/button";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { Textarea } from "@/components/ui/textarea";
import { workspaceServiceClient } from "@/grpcweb";
import { useWorkspaceStore } from "@/stores";
import { FeatureType } from "@/stores/workspace";
@@ -59,13 +58,6 @@ const WorkspaceGeneralSettingSection = () => {
setWorkspaceSetting({ ...workspaceSetting, branding: new TextEncoder().encode(base64) });
};
const handleCustomStyleChange = async (value: string) => {
setWorkspaceSetting({
...workspaceSetting,
customStyle: value,
});
};
const handleDefaultVisibilityChange = async (value: Visibility) => {
setWorkspaceSetting({
...workspaceSetting,
@@ -78,9 +70,6 @@ const WorkspaceGeneralSettingSection = () => {
if (!isEqual(originalWorkspaceSetting.current.branding, workspaceSetting.branding)) {
updateMask.push("branding");
}
if (!isEqual(originalWorkspaceSetting.current.customStyle, workspaceSetting.customStyle)) {
updateMask.push("custom_style");
}
if (!isEqual(originalWorkspaceSetting.current.defaultVisibility, workspaceSetting.defaultVisibility)) {
updateMask.push("default_visibility");
}
@@ -155,15 +144,6 @@ const WorkspaceGeneralSettingSection = () => {
</SelectContent>
</Select>
</div>
<div className="w-full flex flex-col justify-start items-start">
<p className="mt-2 font-medium text-foreground">{t("settings.workspace.custom-style")}</p>
<Textarea
className="w-full mt-2 min-h-[80px]"
placeholder="* {font-family: ui-monospace Monaco Consolas;}"
value={workspaceSetting.customStyle}
onChange={(event) => handleCustomStyleChange(event.target.value)}
/>
</div>
<div>
<Button color="primary" disabled={!allowSave} onClick={handleSaveWorkspaceSetting}>
{t("common.save")}
@@ -26,8 +26,6 @@ export interface WorkspaceProfile {
subscription?:
| Subscription
| undefined;
/** The custom style. */
customStyle: string;
/** The workspace branding. */
branding: Uint8Array;
}
@@ -37,8 +35,6 @@ export interface WorkspaceSetting {
instanceUrl: string;
/** The workspace custome branding. */
branding: Uint8Array;
/** The custom style. */
customStyle: string;
/** The default visibility of shortcuts and collections. */
defaultVisibility: Visibility;
/** The identity providers. */
@@ -125,7 +121,7 @@ export interface UpdateWorkspaceSettingRequest {
}
function createBaseWorkspaceProfile(): WorkspaceProfile {
return { mode: "", version: "", owner: "", subscription: undefined, customStyle: "", branding: new Uint8Array(0) };
return { mode: "", version: "", owner: "", subscription: undefined, branding: new Uint8Array(0) };
}
export const WorkspaceProfile: MessageFns<WorkspaceProfile> = {
@@ -142,9 +138,6 @@ export const WorkspaceProfile: MessageFns<WorkspaceProfile> = {
if (message.subscription !== undefined) {
Subscription.encode(message.subscription, writer.uint32(34).fork()).join();
}
if (message.customStyle !== "") {
writer.uint32(42).string(message.customStyle);
}
if (message.branding.length !== 0) {
writer.uint32(50).bytes(message.branding);
}
@@ -190,14 +183,6 @@ export const WorkspaceProfile: MessageFns<WorkspaceProfile> = {
message.subscription = Subscription.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.customStyle = reader.string();
continue;
}
case 6: {
if (tag !== 50) {
break;
@@ -226,7 +211,6 @@ export const WorkspaceProfile: MessageFns<WorkspaceProfile> = {
message.subscription = (object.subscription !== undefined && object.subscription !== null)
? Subscription.fromPartial(object.subscription)
: undefined;
message.customStyle = object.customStyle ?? "";
message.branding = object.branding ?? new Uint8Array(0);
return message;
},
@@ -236,7 +220,6 @@ function createBaseWorkspaceSetting(): WorkspaceSetting {
return {
instanceUrl: "",
branding: new Uint8Array(0),
customStyle: "",
defaultVisibility: Visibility.VISIBILITY_UNSPECIFIED,
identityProviders: [],
disallowUserRegistration: false,
@@ -252,9 +235,6 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
if (message.branding.length !== 0) {
writer.uint32(18).bytes(message.branding);
}
if (message.customStyle !== "") {
writer.uint32(26).string(message.customStyle);
}
if (message.defaultVisibility !== Visibility.VISIBILITY_UNSPECIFIED) {
writer.uint32(32).int32(visibilityToNumber(message.defaultVisibility));
}
@@ -293,14 +273,6 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
message.branding = reader.bytes();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.customStyle = reader.string();
continue;
}
case 4: {
if (tag !== 32) {
break;
@@ -349,7 +321,6 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
const message = createBaseWorkspaceSetting();
message.instanceUrl = object.instanceUrl ?? "";
message.branding = object.branding ?? new Uint8Array(0);
message.customStyle = object.customStyle ?? "";
message.defaultVisibility = object.defaultVisibility ?? Visibility.VISIBILITY_UNSPECIFIED;
message.identityProviders = object.identityProviders?.map((e) => IdentityProvider.fromPartial(e)) || [];
message.disallowUserRegistration = object.disallowUserRegistration ?? false;
@@ -128,6 +128,52 @@ export function editionToNumber(object: Edition): number {
}
}
/**
* Describes the 'visibility' of a symbol with respect to the proto import
* system. Symbols can only be imported when the visibility rules do not prevent
* it (ex: local symbols cannot be imported). Visibility modifiers can only set
* on `message` and `enum` as they are the only types available to be referenced
* from other files.
*/
export enum SymbolVisibility {
VISIBILITY_UNSET = "VISIBILITY_UNSET",
VISIBILITY_LOCAL = "VISIBILITY_LOCAL",
VISIBILITY_EXPORT = "VISIBILITY_EXPORT",
UNRECOGNIZED = "UNRECOGNIZED",
}
export function symbolVisibilityFromJSON(object: any): SymbolVisibility {
switch (object) {
case 0:
case "VISIBILITY_UNSET":
return SymbolVisibility.VISIBILITY_UNSET;
case 1:
case "VISIBILITY_LOCAL":
return SymbolVisibility.VISIBILITY_LOCAL;
case 2:
case "VISIBILITY_EXPORT":
return SymbolVisibility.VISIBILITY_EXPORT;
case -1:
case "UNRECOGNIZED":
default:
return SymbolVisibility.UNRECOGNIZED;
}
}
export function symbolVisibilityToNumber(object: SymbolVisibility): number {
switch (object) {
case SymbolVisibility.VISIBILITY_UNSET:
return 0;
case SymbolVisibility.VISIBILITY_LOCAL:
return 1;
case SymbolVisibility.VISIBILITY_EXPORT:
return 2;
case SymbolVisibility.UNRECOGNIZED:
default:
return -1;
}
}
/**
* The protocol compiler can output a FileDescriptorSet containing the .proto
* files it parses.
@@ -155,6 +201,11 @@ export interface FileDescriptorProto {
* For Google-internal migration only. Do not use.
*/
weakDependency: number[];
/**
* Names of files imported by this file purely for the purpose of providing
* option extensions. These are excluded from the dependency list above.
*/
optionDependency: string[];
/** All top-level definitions in this file. */
messageType: DescriptorProto[];
enumType: EnumDescriptorProto[];
@@ -209,6 +260,8 @@ export interface DescriptorProto {
* A given name may only be reserved once.
*/
reservedName: string[];
/** Support for `export` and `local` keywords on enums. */
visibility?: SymbolVisibility | undefined;
}
export interface DescriptorProto_ExtensionRange {
@@ -632,6 +685,8 @@ export interface EnumDescriptorProto {
* be reserved once.
*/
reservedName: string[];
/** Support for `export` and `local` keywords on enums. */
visibility?: SymbolVisibility | undefined;
}
/**
@@ -1594,6 +1649,7 @@ export interface FeatureSet {
messageEncoding?: FeatureSet_MessageEncoding | undefined;
jsonFormat?: FeatureSet_JsonFormat | undefined;
enforceNamingStyle?: FeatureSet_EnforceNamingStyle | undefined;
defaultSymbolVisibility?: FeatureSet_VisibilityFeature_DefaultSymbolVisibility | undefined;
}
export enum FeatureSet_FieldPresence {
@@ -1875,6 +1931,72 @@ export function featureSet_EnforceNamingStyleToNumber(object: FeatureSet_Enforce
}
}
export interface FeatureSet_VisibilityFeature {
}
export enum FeatureSet_VisibilityFeature_DefaultSymbolVisibility {
DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN",
/** EXPORT_ALL - Default pre-EDITION_2024, all UNSET visibility are export. */
EXPORT_ALL = "EXPORT_ALL",
/** EXPORT_TOP_LEVEL - All top-level symbols default to export, nested default to local. */
EXPORT_TOP_LEVEL = "EXPORT_TOP_LEVEL",
/** LOCAL_ALL - All symbols default to local. */
LOCAL_ALL = "LOCAL_ALL",
/**
* STRICT - All symbols local by default. Nested types cannot be exported.
* With special case caveat for message { enum {} reserved 1 to max; }
* This is the recommended setting for new protos.
*/
STRICT = "STRICT",
UNRECOGNIZED = "UNRECOGNIZED",
}
export function featureSet_VisibilityFeature_DefaultSymbolVisibilityFromJSON(
object: any,
): FeatureSet_VisibilityFeature_DefaultSymbolVisibility {
switch (object) {
case 0:
case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN":
return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN;
case 1:
case "EXPORT_ALL":
return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_ALL;
case 2:
case "EXPORT_TOP_LEVEL":
return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_TOP_LEVEL;
case 3:
case "LOCAL_ALL":
return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.LOCAL_ALL;
case 4:
case "STRICT":
return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.STRICT;
case -1:
case "UNRECOGNIZED":
default:
return FeatureSet_VisibilityFeature_DefaultSymbolVisibility.UNRECOGNIZED;
}
}
export function featureSet_VisibilityFeature_DefaultSymbolVisibilityToNumber(
object: FeatureSet_VisibilityFeature_DefaultSymbolVisibility,
): number {
switch (object) {
case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN:
return 0;
case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_ALL:
return 1;
case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.EXPORT_TOP_LEVEL:
return 2;
case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.LOCAL_ALL:
return 3;
case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.STRICT:
return 4;
case FeatureSet_VisibilityFeature_DefaultSymbolVisibility.UNRECOGNIZED:
default:
return -1;
}
}
/**
* A compiled specification for the defaults of a set of features. These
* messages are generated from FeatureSet extensions and can be used to seed
@@ -2195,6 +2317,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {
dependency: [],
publicDependency: [],
weakDependency: [],
optionDependency: [],
messageType: [],
enumType: [],
service: [],
@@ -2227,6 +2350,9 @@ export const FileDescriptorProto: MessageFns<FileDescriptorProto> = {
writer.int32(v);
}
writer.join();
for (const v of message.optionDependency) {
writer.uint32(122).string(v!);
}
for (const v of message.messageType) {
DescriptorProto.encode(v!, writer.uint32(34).fork()).join();
}
@@ -2321,6 +2447,14 @@ export const FileDescriptorProto: MessageFns<FileDescriptorProto> = {
break;
}
case 15: {
if (tag !== 122) {
break;
}
message.optionDependency.push(reader.string());
continue;
}
case 4: {
if (tag !== 34) {
break;
@@ -2404,6 +2538,7 @@ export const FileDescriptorProto: MessageFns<FileDescriptorProto> = {
message.dependency = object.dependency?.map((e) => e) || [];
message.publicDependency = object.publicDependency?.map((e) => e) || [];
message.weakDependency = object.weakDependency?.map((e) => e) || [];
message.optionDependency = object.optionDependency?.map((e) => e) || [];
message.messageType = object.messageType?.map((e) => DescriptorProto.fromPartial(e)) || [];
message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || [];
message.service = object.service?.map((e) => ServiceDescriptorProto.fromPartial(e)) || [];
@@ -2432,6 +2567,7 @@ function createBaseDescriptorProto(): DescriptorProto {
options: undefined,
reservedRange: [],
reservedName: [],
visibility: SymbolVisibility.VISIBILITY_UNSET,
};
}
@@ -2467,6 +2603,9 @@ export const DescriptorProto: MessageFns<DescriptorProto> = {
for (const v of message.reservedName) {
writer.uint32(82).string(v!);
}
if (message.visibility !== undefined && message.visibility !== SymbolVisibility.VISIBILITY_UNSET) {
writer.uint32(88).int32(symbolVisibilityToNumber(message.visibility));
}
return writer;
},
@@ -2557,6 +2696,14 @@ export const DescriptorProto: MessageFns<DescriptorProto> = {
message.reservedName.push(reader.string());
continue;
}
case 11: {
if (tag !== 88) {
break;
}
message.visibility = symbolVisibilityFromJSON(reader.int32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -2583,6 +2730,7 @@ export const DescriptorProto: MessageFns<DescriptorProto> = {
: undefined;
message.reservedRange = object.reservedRange?.map((e) => DescriptorProto_ReservedRange.fromPartial(e)) || [];
message.reservedName = object.reservedName?.map((e) => e) || [];
message.visibility = object.visibility ?? SymbolVisibility.VISIBILITY_UNSET;
return message;
},
};
@@ -3143,7 +3291,14 @@ export const OneofDescriptorProto: MessageFns<OneofDescriptorProto> = {
};
function createBaseEnumDescriptorProto(): EnumDescriptorProto {
return { name: "", value: [], options: undefined, reservedRange: [], reservedName: [] };
return {
name: "",
value: [],
options: undefined,
reservedRange: [],
reservedName: [],
visibility: SymbolVisibility.VISIBILITY_UNSET,
};
}
export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = {
@@ -3163,6 +3318,9 @@ export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = {
for (const v of message.reservedName) {
writer.uint32(42).string(v!);
}
if (message.visibility !== undefined && message.visibility !== SymbolVisibility.VISIBILITY_UNSET) {
writer.uint32(48).int32(symbolVisibilityToNumber(message.visibility));
}
return writer;
},
@@ -3213,6 +3371,14 @@ export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = {
message.reservedName.push(reader.string());
continue;
}
case 6: {
if (tag !== 48) {
break;
}
message.visibility = symbolVisibilityFromJSON(reader.int32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -3235,6 +3401,7 @@ export const EnumDescriptorProto: MessageFns<EnumDescriptorProto> = {
message.reservedRange = object.reservedRange?.map((e) => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) ||
[];
message.reservedName = object.reservedName?.map((e) => e) || [];
message.visibility = object.visibility ?? SymbolVisibility.VISIBILITY_UNSET;
return message;
},
};
@@ -4999,6 +5166,7 @@ function createBaseFeatureSet(): FeatureSet {
messageEncoding: FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN,
jsonFormat: FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN,
enforceNamingStyle: FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN,
defaultSymbolVisibility: FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN,
};
}
@@ -5039,6 +5207,15 @@ export const FeatureSet: MessageFns<FeatureSet> = {
) {
writer.uint32(56).int32(featureSet_EnforceNamingStyleToNumber(message.enforceNamingStyle));
}
if (
message.defaultSymbolVisibility !== undefined &&
message.defaultSymbolVisibility !==
FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN
) {
writer.uint32(64).int32(
featureSet_VisibilityFeature_DefaultSymbolVisibilityToNumber(message.defaultSymbolVisibility),
);
}
return writer;
},
@@ -5105,6 +5282,16 @@ export const FeatureSet: MessageFns<FeatureSet> = {
message.enforceNamingStyle = featureSet_EnforceNamingStyleFromJSON(reader.int32());
continue;
}
case 8: {
if (tag !== 64) {
break;
}
message.defaultSymbolVisibility = featureSet_VisibilityFeature_DefaultSymbolVisibilityFromJSON(
reader.int32(),
);
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -5128,6 +5315,42 @@ export const FeatureSet: MessageFns<FeatureSet> = {
message.jsonFormat = object.jsonFormat ?? FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN;
message.enforceNamingStyle = object.enforceNamingStyle ??
FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN;
message.defaultSymbolVisibility = object.defaultSymbolVisibility ??
FeatureSet_VisibilityFeature_DefaultSymbolVisibility.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN;
return message;
},
};
function createBaseFeatureSet_VisibilityFeature(): FeatureSet_VisibilityFeature {
return {};
}
export const FeatureSet_VisibilityFeature: MessageFns<FeatureSet_VisibilityFeature> = {
encode(_: FeatureSet_VisibilityFeature, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): FeatureSet_VisibilityFeature {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseFeatureSet_VisibilityFeature();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
create(base?: DeepPartial<FeatureSet_VisibilityFeature>): FeatureSet_VisibilityFeature {
return FeatureSet_VisibilityFeature.fromPartial(base ?? {});
},
fromPartial(_: DeepPartial<FeatureSet_VisibilityFeature>): FeatureSet_VisibilityFeature {
const message = createBaseFeatureSet_VisibilityFeature();
return message;
},
};
@@ -28,8 +28,6 @@ export enum WorkspaceSettingKey {
WORKSPACE_SETTING_LICENSE_KEY = "WORKSPACE_SETTING_LICENSE_KEY",
/** WORKSPACE_SETTING_SECRET_SESSION - The secret session key used to encrypt session data. */
WORKSPACE_SETTING_SECRET_SESSION = "WORKSPACE_SETTING_SECRET_SESSION",
/** WORKSPACE_SETTING_CUSTOM_STYLE - The custom style. */
WORKSPACE_SETTING_CUSTOM_STYLE = "WORKSPACE_SETTING_CUSTOM_STYLE",
/** WORKSPACE_SETTING_DEFAULT_VISIBILITY - The default visibility of shortcuts and collections. */
WORKSPACE_SETTING_DEFAULT_VISIBILITY = "WORKSPACE_SETTING_DEFAULT_VISIBILITY",
UNRECOGNIZED = "UNRECOGNIZED",
@@ -58,9 +56,6 @@ export function workspaceSettingKeyFromJSON(object: any): WorkspaceSettingKey {
case 11:
case "WORKSPACE_SETTING_SECRET_SESSION":
return WorkspaceSettingKey.WORKSPACE_SETTING_SECRET_SESSION;
case 12:
case "WORKSPACE_SETTING_CUSTOM_STYLE":
return WorkspaceSettingKey.WORKSPACE_SETTING_CUSTOM_STYLE;
case 13:
case "WORKSPACE_SETTING_DEFAULT_VISIBILITY":
return WorkspaceSettingKey.WORKSPACE_SETTING_DEFAULT_VISIBILITY;
@@ -87,8 +82,6 @@ export function workspaceSettingKeyToNumber(object: WorkspaceSettingKey): number
return 10;
case WorkspaceSettingKey.WORKSPACE_SETTING_SECRET_SESSION:
return 11;
case WorkspaceSettingKey.WORKSPACE_SETTING_CUSTOM_STYLE:
return 12;
case WorkspaceSettingKey.WORKSPACE_SETTING_DEFAULT_VISIBILITY:
return 13;
case WorkspaceSettingKey.UNRECOGNIZED:
@@ -111,7 +104,6 @@ export interface WorkspaceSetting_GeneralSetting {
licenseKey: string;
instanceUrl: string;
branding: Uint8Array;
customStyle: string;
}
export interface WorkspaceSetting_SecuritySetting {
@@ -249,7 +241,7 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
};
function createBaseWorkspaceSetting_GeneralSetting(): WorkspaceSetting_GeneralSetting {
return { secretSession: "", licenseKey: "", instanceUrl: "", branding: new Uint8Array(0), customStyle: "" };
return { secretSession: "", licenseKey: "", instanceUrl: "", branding: new Uint8Array(0) };
}
export const WorkspaceSetting_GeneralSetting: MessageFns<WorkspaceSetting_GeneralSetting> = {
@@ -266,9 +258,6 @@ export const WorkspaceSetting_GeneralSetting: MessageFns<WorkspaceSetting_Genera
if (message.branding.length !== 0) {
writer.uint32(34).bytes(message.branding);
}
if (message.customStyle !== "") {
writer.uint32(42).string(message.customStyle);
}
return writer;
},
@@ -311,14 +300,6 @@ export const WorkspaceSetting_GeneralSetting: MessageFns<WorkspaceSetting_Genera
message.branding = reader.bytes();
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.customStyle = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -337,7 +318,6 @@ export const WorkspaceSetting_GeneralSetting: MessageFns<WorkspaceSetting_Genera
message.licenseKey = object.licenseKey ?? "";
message.instanceUrl = object.instanceUrl ?? "";
message.branding = object.branding ?? new Uint8Array(0);
message.customStyle = object.customStyle ?? "";
return message;
},
};
-4
View File
@@ -36,8 +36,6 @@ message WorkspaceProfile {
string owner = 3;
// The workspace subscription.
Subscription subscription = 4;
// The custom style.
string custom_style = 5;
// The workspace branding.
bytes branding = 6;
}
@@ -47,8 +45,6 @@ message WorkspaceSetting {
string instance_url = 1;
// The workspace custome branding.
bytes branding = 2;
// The custom style.
string custom_style = 3;
// The default visibility of shortcuts and collections.
Visibility default_visibility = 4;
// The identity providers.
-2
View File
@@ -1203,7 +1203,6 @@
| version | [string](#string) | | Current workspace version. |
| owner | [string](#string) | | The owner name. Format: &#34;users/{id}&#34; |
| subscription | [Subscription](#slash-api-v1-Subscription) | | The workspace subscription. |
| custom_style | [string](#string) | | The custom style. |
| branding | [bytes](#bytes) | | The workspace branding. |
@@ -1221,7 +1220,6 @@
| ----- | ---- | ----- | ----------- |
| instance_url | [string](#string) | | The url of instance. |
| branding | [bytes](#bytes) | | The workspace custome branding. |
| custom_style | [string](#string) | | The custom style. |
| default_visibility | [Visibility](#slash-api-v1-Visibility) | | The default visibility of shortcuts and collections. |
| identity_providers | [IdentityProvider](#slash-api-v1-IdentityProvider) | repeated | The identity providers. |
| disallow_user_registration | [bool](#bool) | | Whether to disallow user registration by email&amp;password. |
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: api/v1/auth_service.proto
+7 -7
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc-gen-go-grpc v1.6.0
// - protoc (unknown)
// source: api/v1/auth_service.proto
@@ -126,19 +126,19 @@ type AuthServiceServer interface {
type UnimplementedAuthServiceServer struct{}
func (UnimplementedAuthServiceServer) GetAuthStatus(context.Context, *GetAuthStatusRequest) (*User, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAuthStatus not implemented")
return nil, status.Error(codes.Unimplemented, "method GetAuthStatus not implemented")
}
func (UnimplementedAuthServiceServer) SignIn(context.Context, *SignInRequest) (*User, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignIn not implemented")
return nil, status.Error(codes.Unimplemented, "method SignIn not implemented")
}
func (UnimplementedAuthServiceServer) SignInWithSSO(context.Context, *SignInWithSSORequest) (*User, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignInWithSSO not implemented")
return nil, status.Error(codes.Unimplemented, "method SignInWithSSO not implemented")
}
func (UnimplementedAuthServiceServer) SignUp(context.Context, *SignUpRequest) (*User, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignUp not implemented")
return nil, status.Error(codes.Unimplemented, "method SignUp not implemented")
}
func (UnimplementedAuthServiceServer) SignOut(context.Context, *SignOutRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SignOut not implemented")
return nil, status.Error(codes.Unimplemented, "method SignOut not implemented")
}
func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {}
func (UnimplementedAuthServiceServer) testEmbeddedByValue() {}
@@ -151,7 +151,7 @@ type UnsafeAuthServiceServer interface {
}
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) {
// If the following call pancis, it indicates UnimplementedAuthServiceServer was
// If the following call panics, it indicates UnimplementedAuthServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: api/v1/collection_service.proto
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc-gen-go-grpc v1.6.0
// - protoc (unknown)
// source: api/v1/collection_service.proto
@@ -141,22 +141,22 @@ type CollectionServiceServer interface {
type UnimplementedCollectionServiceServer struct{}
func (UnimplementedCollectionServiceServer) ListCollections(context.Context, *ListCollectionsRequest) (*ListCollectionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListCollections not implemented")
return nil, status.Error(codes.Unimplemented, "method ListCollections not implemented")
}
func (UnimplementedCollectionServiceServer) GetCollection(context.Context, *GetCollectionRequest) (*Collection, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCollection not implemented")
return nil, status.Error(codes.Unimplemented, "method GetCollection not implemented")
}
func (UnimplementedCollectionServiceServer) GetCollectionByName(context.Context, *GetCollectionByNameRequest) (*Collection, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCollectionByName not implemented")
return nil, status.Error(codes.Unimplemented, "method GetCollectionByName not implemented")
}
func (UnimplementedCollectionServiceServer) CreateCollection(context.Context, *CreateCollectionRequest) (*Collection, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateCollection not implemented")
return nil, status.Error(codes.Unimplemented, "method CreateCollection not implemented")
}
func (UnimplementedCollectionServiceServer) UpdateCollection(context.Context, *UpdateCollectionRequest) (*Collection, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateCollection not implemented")
return nil, status.Error(codes.Unimplemented, "method UpdateCollection not implemented")
}
func (UnimplementedCollectionServiceServer) DeleteCollection(context.Context, *DeleteCollectionRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteCollection not implemented")
return nil, status.Error(codes.Unimplemented, "method DeleteCollection not implemented")
}
func (UnimplementedCollectionServiceServer) mustEmbedUnimplementedCollectionServiceServer() {}
func (UnimplementedCollectionServiceServer) testEmbeddedByValue() {}
@@ -169,7 +169,7 @@ type UnsafeCollectionServiceServer interface {
}
func RegisterCollectionServiceServer(s grpc.ServiceRegistrar, srv CollectionServiceServer) {
// If the following call pancis, it indicates UnimplementedCollectionServiceServer was
// If the following call panics, it indicates UnimplementedCollectionServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: api/v1/common.proto
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: api/v1/shortcut_service.proto
+9 -9
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc-gen-go-grpc v1.6.0
// - protoc (unknown)
// source: api/v1/shortcut_service.proto
@@ -156,25 +156,25 @@ type ShortcutServiceServer interface {
type UnimplementedShortcutServiceServer struct{}
func (UnimplementedShortcutServiceServer) ListShortcuts(context.Context, *ListShortcutsRequest) (*ListShortcutsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListShortcuts not implemented")
return nil, status.Error(codes.Unimplemented, "method ListShortcuts not implemented")
}
func (UnimplementedShortcutServiceServer) GetShortcut(context.Context, *GetShortcutRequest) (*Shortcut, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetShortcut not implemented")
return nil, status.Error(codes.Unimplemented, "method GetShortcut not implemented")
}
func (UnimplementedShortcutServiceServer) GetShortcutByName(context.Context, *GetShortcutByNameRequest) (*Shortcut, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetShortcutByName not implemented")
return nil, status.Error(codes.Unimplemented, "method GetShortcutByName not implemented")
}
func (UnimplementedShortcutServiceServer) CreateShortcut(context.Context, *CreateShortcutRequest) (*Shortcut, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateShortcut not implemented")
return nil, status.Error(codes.Unimplemented, "method CreateShortcut not implemented")
}
func (UnimplementedShortcutServiceServer) UpdateShortcut(context.Context, *UpdateShortcutRequest) (*Shortcut, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateShortcut not implemented")
return nil, status.Error(codes.Unimplemented, "method UpdateShortcut not implemented")
}
func (UnimplementedShortcutServiceServer) DeleteShortcut(context.Context, *DeleteShortcutRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteShortcut not implemented")
return nil, status.Error(codes.Unimplemented, "method DeleteShortcut not implemented")
}
func (UnimplementedShortcutServiceServer) GetShortcutAnalytics(context.Context, *GetShortcutAnalyticsRequest) (*GetShortcutAnalyticsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetShortcutAnalytics not implemented")
return nil, status.Error(codes.Unimplemented, "method GetShortcutAnalytics not implemented")
}
func (UnimplementedShortcutServiceServer) mustEmbedUnimplementedShortcutServiceServer() {}
func (UnimplementedShortcutServiceServer) testEmbeddedByValue() {}
@@ -187,7 +187,7 @@ type UnsafeShortcutServiceServer interface {
}
func RegisterShortcutServiceServer(s grpc.ServiceRegistrar, srv ShortcutServiceServer) {
// If the following call pancis, it indicates UnimplementedShortcutServiceServer was
// If the following call panics, it indicates UnimplementedShortcutServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: api/v1/subscription_service.proto
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc-gen-go-grpc v1.6.0
// - protoc (unknown)
// source: api/v1/subscription_service.proto
@@ -95,13 +95,13 @@ type SubscriptionServiceServer interface {
type UnimplementedSubscriptionServiceServer struct{}
func (UnimplementedSubscriptionServiceServer) GetSubscription(context.Context, *GetSubscriptionRequest) (*Subscription, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSubscription not implemented")
return nil, status.Error(codes.Unimplemented, "method GetSubscription not implemented")
}
func (UnimplementedSubscriptionServiceServer) UpdateSubscription(context.Context, *UpdateSubscriptionRequest) (*Subscription, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateSubscription not implemented")
return nil, status.Error(codes.Unimplemented, "method UpdateSubscription not implemented")
}
func (UnimplementedSubscriptionServiceServer) DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*Subscription, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteSubscription not implemented")
return nil, status.Error(codes.Unimplemented, "method DeleteSubscription not implemented")
}
func (UnimplementedSubscriptionServiceServer) mustEmbedUnimplementedSubscriptionServiceServer() {}
func (UnimplementedSubscriptionServiceServer) testEmbeddedByValue() {}
@@ -114,7 +114,7 @@ type UnsafeSubscriptionServiceServer interface {
}
func RegisterSubscriptionServiceServer(s grpc.ServiceRegistrar, srv SubscriptionServiceServer) {
// If the following call pancis, it indicates UnimplementedSubscriptionServiceServer was
// If the following call panics, it indicates UnimplementedSubscriptionServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: api/v1/user_service.proto
+10 -10
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc-gen-go-grpc v1.6.0
// - protoc (unknown)
// source: api/v1/user_service.proto
@@ -169,28 +169,28 @@ type UserServiceServer interface {
type UnimplementedUserServiceServer struct{}
func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented")
return nil, status.Error(codes.Unimplemented, "method ListUsers not implemented")
}
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*User, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
return nil, status.Error(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*User, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented")
return nil, status.Error(codes.Unimplemented, "method CreateUser not implemented")
}
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")
return nil, status.Error(codes.Unimplemented, "method UpdateUser not implemented")
}
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")
return nil, status.Error(codes.Unimplemented, "method DeleteUser not implemented")
}
func (UnimplementedUserServiceServer) ListUserAccessTokens(context.Context, *ListUserAccessTokensRequest) (*ListUserAccessTokensResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListUserAccessTokens not implemented")
return nil, status.Error(codes.Unimplemented, "method ListUserAccessTokens not implemented")
}
func (UnimplementedUserServiceServer) CreateUserAccessToken(context.Context, *CreateUserAccessTokenRequest) (*UserAccessToken, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateUserAccessToken not implemented")
return nil, status.Error(codes.Unimplemented, "method CreateUserAccessToken not implemented")
}
func (UnimplementedUserServiceServer) DeleteUserAccessToken(context.Context, *DeleteUserAccessTokenRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteUserAccessToken not implemented")
return nil, status.Error(codes.Unimplemented, "method DeleteUserAccessToken not implemented")
}
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
func (UnimplementedUserServiceServer) testEmbeddedByValue() {}
@@ -203,7 +203,7 @@ type UnsafeUserServiceServer interface {
}
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
// If the following call pancis, it indicates UnimplementedUserServiceServer was
// If the following call panics, it indicates UnimplementedUserServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: api/v1/user_setting_service.proto
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc-gen-go-grpc v1.6.0
// - protoc (unknown)
// source: api/v1/user_setting_service.proto
@@ -80,10 +80,10 @@ type UserSettingServiceServer interface {
type UnimplementedUserSettingServiceServer struct{}
func (UnimplementedUserSettingServiceServer) GetUserSetting(context.Context, *GetUserSettingRequest) (*UserSetting, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUserSetting not implemented")
return nil, status.Error(codes.Unimplemented, "method GetUserSetting not implemented")
}
func (UnimplementedUserSettingServiceServer) UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UserSetting, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserSetting not implemented")
return nil, status.Error(codes.Unimplemented, "method UpdateUserSetting not implemented")
}
func (UnimplementedUserSettingServiceServer) mustEmbedUnimplementedUserSettingServiceServer() {}
func (UnimplementedUserSettingServiceServer) testEmbeddedByValue() {}
@@ -96,7 +96,7 @@ type UnsafeUserSettingServiceServer interface {
}
func RegisterUserSettingServiceServer(s grpc.ServiceRegistrar, srv UserSettingServiceServer) {
// If the following call pancis, it indicates UnimplementedUserSettingServiceServer was
// If the following call panics, it indicates UnimplementedUserSettingServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
+5 -25
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: api/v1/workspace_service.proto
@@ -80,8 +80,6 @@ type WorkspaceProfile struct {
Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
// The workspace subscription.
Subscription *Subscription `protobuf:"bytes,4,opt,name=subscription,proto3" json:"subscription,omitempty"`
// The custom style.
CustomStyle string `protobuf:"bytes,5,opt,name=custom_style,json=customStyle,proto3" json:"custom_style,omitempty"`
// The workspace branding.
Branding []byte `protobuf:"bytes,6,opt,name=branding,proto3" json:"branding,omitempty"`
unknownFields protoimpl.UnknownFields
@@ -146,13 +144,6 @@ func (x *WorkspaceProfile) GetSubscription() *Subscription {
return nil
}
func (x *WorkspaceProfile) GetCustomStyle() string {
if x != nil {
return x.CustomStyle
}
return ""
}
func (x *WorkspaceProfile) GetBranding() []byte {
if x != nil {
return x.Branding
@@ -166,8 +157,6 @@ type WorkspaceSetting struct {
InstanceUrl string `protobuf:"bytes,1,opt,name=instance_url,json=instanceUrl,proto3" json:"instance_url,omitempty"`
// The workspace custome branding.
Branding []byte `protobuf:"bytes,2,opt,name=branding,proto3" json:"branding,omitempty"`
// The custom style.
CustomStyle string `protobuf:"bytes,3,opt,name=custom_style,json=customStyle,proto3" json:"custom_style,omitempty"`
// The default visibility of shortcuts and collections.
DefaultVisibility Visibility `protobuf:"varint,4,opt,name=default_visibility,json=defaultVisibility,proto3,enum=slash.api.v1.Visibility" json:"default_visibility,omitempty"`
// The identity providers.
@@ -224,13 +213,6 @@ func (x *WorkspaceSetting) GetBranding() []byte {
return nil
}
func (x *WorkspaceSetting) GetCustomStyle() string {
if x != nil {
return x.CustomStyle
}
return ""
}
func (x *WorkspaceSetting) GetDefaultVisibility() Visibility {
if x != nil {
return x.DefaultVisibility
@@ -668,18 +650,16 @@ var File_api_v1_workspace_service_proto protoreflect.FileDescriptor
const file_api_v1_workspace_service_proto_rawDesc = "" +
"\n" +
"\x1eapi/v1/workspace_service.proto\x12\fslash.api.v1\x1a\x13api/v1/common.proto\x1a!api/v1/subscription_service.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a google/protobuf/field_mask.proto\"\xd5\x01\n" +
"\x1eapi/v1/workspace_service.proto\x12\fslash.api.v1\x1a\x13api/v1/common.proto\x1a!api/v1/subscription_service.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a google/protobuf/field_mask.proto\"\xb2\x01\n" +
"\x10WorkspaceProfile\x12\x12\n" +
"\x04mode\x18\x01 \x01(\tR\x04mode\x12\x18\n" +
"\aversion\x18\x02 \x01(\tR\aversion\x12\x14\n" +
"\x05owner\x18\x03 \x01(\tR\x05owner\x12>\n" +
"\fsubscription\x18\x04 \x01(\v2\x1a.slash.api.v1.SubscriptionR\fsubscription\x12!\n" +
"\fcustom_style\x18\x05 \x01(\tR\vcustomStyle\x12\x1a\n" +
"\bbranding\x18\x06 \x01(\fR\bbranding\"\x80\x03\n" +
"\fsubscription\x18\x04 \x01(\v2\x1a.slash.api.v1.SubscriptionR\fsubscription\x12\x1a\n" +
"\bbranding\x18\x06 \x01(\fR\bbranding\"\xdd\x02\n" +
"\x10WorkspaceSetting\x12!\n" +
"\finstance_url\x18\x01 \x01(\tR\vinstanceUrl\x12\x1a\n" +
"\bbranding\x18\x02 \x01(\fR\bbranding\x12!\n" +
"\fcustom_style\x18\x03 \x01(\tR\vcustomStyle\x12G\n" +
"\bbranding\x18\x02 \x01(\fR\bbranding\x12G\n" +
"\x12default_visibility\x18\x04 \x01(\x0e2\x18.slash.api.v1.VisibilityR\x11defaultVisibility\x12M\n" +
"\x12identity_providers\x18\x05 \x03(\v2\x1e.slash.api.v1.IdentityProviderR\x11identityProviders\x12<\n" +
"\x1adisallow_user_registration\x18\x06 \x01(\bR\x18disallowUserRegistration\x124\n" +
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc-gen-go-grpc v1.6.0
// - protoc (unknown)
// source: api/v1/workspace_service.proto
@@ -89,13 +89,13 @@ type WorkspaceServiceServer interface {
type UnimplementedWorkspaceServiceServer struct{}
func (UnimplementedWorkspaceServiceServer) GetWorkspaceProfile(context.Context, *GetWorkspaceProfileRequest) (*WorkspaceProfile, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceProfile not implemented")
return nil, status.Error(codes.Unimplemented, "method GetWorkspaceProfile not implemented")
}
func (UnimplementedWorkspaceServiceServer) GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*WorkspaceSetting, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceSetting not implemented")
return nil, status.Error(codes.Unimplemented, "method GetWorkspaceSetting not implemented")
}
func (UnimplementedWorkspaceServiceServer) UpdateWorkspaceSetting(context.Context, *UpdateWorkspaceSettingRequest) (*WorkspaceSetting, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspaceSetting not implemented")
return nil, status.Error(codes.Unimplemented, "method UpdateWorkspaceSetting not implemented")
}
func (UnimplementedWorkspaceServiceServer) mustEmbedUnimplementedWorkspaceServiceServer() {}
func (UnimplementedWorkspaceServiceServer) testEmbeddedByValue() {}
@@ -108,7 +108,7 @@ type UnsafeWorkspaceServiceServer interface {
}
func RegisterWorkspaceServiceServer(s grpc.ServiceRegistrar, srv WorkspaceServiceServer) {
// If the following call pancis, it indicates UnimplementedWorkspaceServiceServer was
// If the following call panics, it indicates UnimplementedWorkspaceServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
-6
View File
@@ -941,9 +941,6 @@ definitions:
type: string
format: byte
description: The workspace custome branding.
customStyle:
type: string
description: The custom style.
defaultVisibility:
$ref: '#/definitions/apiv1Visibility'
description: The default visibility of shortcuts and collections.
@@ -1149,9 +1146,6 @@ definitions:
subscription:
$ref: '#/definitions/v1Subscription'
description: The workspace subscription.
customStyle:
type: string
description: The custom style.
branding:
type: string
format: byte
-2
View File
@@ -500,7 +500,6 @@
| license_key | [string](#string) | | |
| instance_url | [string](#string) | | |
| branding | [bytes](#bytes) | | |
| custom_style | [string](#string) | | |
@@ -569,7 +568,6 @@
| WORKSPACE_SETTING_IDENTITY_PROVIDER | 4 | Workspace identity provider settings. |
| WORKSPACE_SETTING_LICENSE_KEY | 10 | TODO: remove the following keys. The license key. |
| WORKSPACE_SETTING_SECRET_SESSION | 11 | The secret session key used to encrypt session data. |
| WORKSPACE_SETTING_CUSTOM_STYLE | 12 | The custom style. |
| WORKSPACE_SETTING_DEFAULT_VISIBILITY | 13 | The default visibility of shortcuts and collections. |
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: store/activity.proto
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: store/collection.proto
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: store/common.proto
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: store/idp.proto
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: store/shortcut.proto
+1 -1
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: store/user_setting.proto
+6 -20
View File
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc-gen-go v1.36.11
// protoc (unknown)
// source: store/workspace_setting.proto
@@ -38,8 +38,6 @@ const (
WorkspaceSettingKey_WORKSPACE_SETTING_LICENSE_KEY WorkspaceSettingKey = 10
// The secret session key used to encrypt session data.
WorkspaceSettingKey_WORKSPACE_SETTING_SECRET_SESSION WorkspaceSettingKey = 11
// The custom style.
WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_STYLE WorkspaceSettingKey = 12
// The default visibility of shortcuts and collections.
WorkspaceSettingKey_WORKSPACE_SETTING_DEFAULT_VISIBILITY WorkspaceSettingKey = 13
)
@@ -54,7 +52,6 @@ var (
4: "WORKSPACE_SETTING_IDENTITY_PROVIDER",
10: "WORKSPACE_SETTING_LICENSE_KEY",
11: "WORKSPACE_SETTING_SECRET_SESSION",
12: "WORKSPACE_SETTING_CUSTOM_STYLE",
13: "WORKSPACE_SETTING_DEFAULT_VISIBILITY",
}
WorkspaceSettingKey_value = map[string]int32{
@@ -65,7 +62,6 @@ var (
"WORKSPACE_SETTING_IDENTITY_PROVIDER": 4,
"WORKSPACE_SETTING_LICENSE_KEY": 10,
"WORKSPACE_SETTING_SECRET_SESSION": 11,
"WORKSPACE_SETTING_CUSTOM_STYLE": 12,
"WORKSPACE_SETTING_DEFAULT_VISIBILITY": 13,
}
)
@@ -233,7 +229,6 @@ type WorkspaceSetting_GeneralSetting struct {
LicenseKey string `protobuf:"bytes,2,opt,name=license_key,json=licenseKey,proto3" json:"license_key,omitempty"`
InstanceUrl string `protobuf:"bytes,3,opt,name=instance_url,json=instanceUrl,proto3" json:"instance_url,omitempty"`
Branding []byte `protobuf:"bytes,4,opt,name=branding,proto3" json:"branding,omitempty"`
CustomStyle string `protobuf:"bytes,5,opt,name=custom_style,json=customStyle,proto3" json:"custom_style,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -296,13 +291,6 @@ func (x *WorkspaceSetting_GeneralSetting) GetBranding() []byte {
return nil
}
func (x *WorkspaceSetting_GeneralSetting) GetCustomStyle() string {
if x != nil {
return x.CustomStyle
}
return ""
}
type WorkspaceSetting_SecuritySetting struct {
state protoimpl.MessageState `protogen:"open.v1"`
DisallowUserRegistration bool `protobuf:"varint,1,opt,name=disallow_user_registration,json=disallowUserRegistration,proto3" json:"disallow_user_registration,omitempty"`
@@ -447,21 +435,20 @@ var File_store_workspace_setting_proto protoreflect.FileDescriptor
const file_store_workspace_setting_proto_rawDesc = "" +
"\n" +
"\x1dstore/workspace_setting.proto\x12\vslash.store\x1a\x12store/common.proto\x1a\x0fstore/idp.proto\"\xd1\a\n" +
"\x1dstore/workspace_setting.proto\x12\vslash.store\x1a\x12store/common.proto\x1a\x0fstore/idp.proto\"\xae\a\n" +
"\x10WorkspaceSetting\x122\n" +
"\x03key\x18\x01 \x01(\x0e2 .slash.store.WorkspaceSettingKeyR\x03key\x12\x10\n" +
"\x03raw\x18\x02 \x01(\tR\x03raw\x12H\n" +
"\ageneral\x18\x03 \x01(\v2,.slash.store.WorkspaceSetting.GeneralSettingH\x00R\ageneral\x12K\n" +
"\bsecurity\x18\x04 \x01(\v2-.slash.store.WorkspaceSetting.SecuritySettingH\x00R\bsecurity\x12a\n" +
"\x10shortcut_related\x18\x05 \x01(\v24.slash.store.WorkspaceSetting.ShortcutRelatedSettingH\x00R\x0fshortcutRelated\x12d\n" +
"\x11identity_provider\x18\x06 \x01(\v25.slash.store.WorkspaceSetting.IdentityProviderSettingH\x00R\x10identityProvider\x1a\xba\x01\n" +
"\x11identity_provider\x18\x06 \x01(\v25.slash.store.WorkspaceSetting.IdentityProviderSettingH\x00R\x10identityProvider\x1a\x97\x01\n" +
"\x0eGeneralSetting\x12%\n" +
"\x0esecret_session\x18\x01 \x01(\tR\rsecretSession\x12\x1f\n" +
"\vlicense_key\x18\x02 \x01(\tR\n" +
"licenseKey\x12!\n" +
"\finstance_url\x18\x03 \x01(\tR\vinstanceUrl\x12\x1a\n" +
"\bbranding\x18\x04 \x01(\fR\bbranding\x12!\n" +
"\fcustom_style\x18\x05 \x01(\tR\vcustomStyle\x1a\x85\x01\n" +
"\bbranding\x18\x04 \x01(\fR\bbranding\x1a\x85\x01\n" +
"\x0fSecuritySetting\x12<\n" +
"\x1adisallow_user_registration\x18\x01 \x01(\bR\x18disallowUserRegistration\x124\n" +
"\x16disallow_password_auth\x18\x02 \x01(\bR\x14disallowPasswordAuth\x1a`\n" +
@@ -469,7 +456,7 @@ const file_store_workspace_setting_proto_rawDesc = "" +
"\x12default_visibility\x18\x01 \x01(\x0e2\x17.slash.store.VisibilityR\x11defaultVisibility\x1ag\n" +
"\x17IdentityProviderSetting\x12L\n" +
"\x12identity_providers\x18\x01 \x03(\v2\x1d.slash.store.IdentityProviderR\x11identityProvidersB\a\n" +
"\x05value*\xe3\x02\n" +
"\x05value*\xbf\x02\n" +
"\x13WorkspaceSettingKey\x12%\n" +
"!WORKSPACE_SETTING_KEY_UNSPECIFIED\x10\x00\x12\x1d\n" +
"\x19WORKSPACE_SETTING_GENERAL\x10\x01\x12\x1e\n" +
@@ -478,8 +465,7 @@ const file_store_workspace_setting_proto_rawDesc = "" +
"#WORKSPACE_SETTING_IDENTITY_PROVIDER\x10\x04\x12!\n" +
"\x1dWORKSPACE_SETTING_LICENSE_KEY\x10\n" +
"\x12$\n" +
" WORKSPACE_SETTING_SECRET_SESSION\x10\v\x12\"\n" +
"\x1eWORKSPACE_SETTING_CUSTOM_STYLE\x10\f\x12(\n" +
" WORKSPACE_SETTING_SECRET_SESSION\x10\v\x12(\n" +
"$WORKSPACE_SETTING_DEFAULT_VISIBILITY\x10\rB\xa6\x01\n" +
"\x0fcom.slash.storeB\x15WorkspaceSettingProtoP\x01Z/github.com/yourselfhosted/slash/proto/gen/store\xa2\x02\x03SSX\xaa\x02\vSlash.Store\xca\x02\vSlash\\Store\xe2\x02\x17Slash\\Store\\GPBMetadata\xea\x02\fSlash::Storeb\x06proto3"
-3
View File
@@ -23,7 +23,6 @@ message WorkspaceSetting {
string license_key = 2;
string instance_url = 3;
bytes branding = 4;
string custom_style = 5;
}
message SecuritySetting {
@@ -56,8 +55,6 @@ enum WorkspaceSettingKey {
WORKSPACE_SETTING_LICENSE_KEY = 10;
// The secret session key used to encrypt session data.
WORKSPACE_SETTING_SECRET_SESSION = 11;
// The custom style.
WORKSPACE_SETTING_CUSTOM_STYLE = 12;
// The default visibility of shortcuts and collections.
WORKSPACE_SETTING_DEFAULT_VISIBILITY = 13;
}
-15
View File
@@ -54,7 +54,6 @@ func (s *APIV1Service) GetWorkspaceSetting(ctx context.Context, _ *v1pb.GetWorks
if v.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL {
generalSetting := v.GetGeneral()
workspaceSetting.Branding = generalSetting.GetBranding()
workspaceSetting.CustomStyle = generalSetting.GetCustomStyle()
} else if v.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_SECURITY {
securitySetting := v.GetSecurity()
workspaceSetting.DisallowUserRegistration = securitySetting.GetDisallowUserRegistration()
@@ -100,20 +99,6 @@ func (s *APIV1Service) UpdateWorkspaceSetting(ctx context.Context, request *v1pb
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to update workspace setting: %v", err)
}
} else if path == "custom_style" {
generalSetting, err := s.Store.GetWorkspaceGeneralSetting(ctx)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get workspace setting: %v", err)
}
generalSetting.CustomStyle = request.Setting.CustomStyle
if _, err := s.Store.UpsertWorkspaceSetting(ctx, &storepb.WorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL,
Value: &storepb.WorkspaceSetting_General{
General: generalSetting,
},
}); err != nil {
return nil, status.Errorf(codes.Internal, "failed to update workspace setting: %v", err)
}
} else if path == "default_visibility" {
shortcutRelatedSetting, err := s.Store.GetWorkspaceSetting(ctx, &store.FindWorkspaceSetting{
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_SHORTCUT_RELATED,
-1
View File
@@ -125,7 +125,6 @@ func (d *DB) ListWorkspaceSettings(ctx context.Context, find *store.FindWorkspac
} else if slices.Contains([]storepb.WorkspaceSettingKey{
storepb.WorkspaceSettingKey_WORKSPACE_SETTING_LICENSE_KEY,
storepb.WorkspaceSettingKey_WORKSPACE_SETTING_SECRET_SESSION,
storepb.WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_STYLE,
storepb.WorkspaceSettingKey_WORKSPACE_SETTING_DEFAULT_VISIBILITY,
}, workspaceSetting.Key) {
workspaceSetting.Raw = valueString
-1
View File
@@ -125,7 +125,6 @@ func (d *DB) ListWorkspaceSettings(ctx context.Context, find *store.FindWorkspac
} else if slices.Contains([]storepb.WorkspaceSettingKey{
storepb.WorkspaceSettingKey_WORKSPACE_SETTING_LICENSE_KEY,
storepb.WorkspaceSettingKey_WORKSPACE_SETTING_SECRET_SESSION,
storepb.WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_STYLE,
storepb.WorkspaceSettingKey_WORKSPACE_SETTING_DEFAULT_VISIBILITY,
}, workspaceSetting.Key) {
workspaceSetting.Raw = valueString
-6
View File
@@ -342,12 +342,6 @@ func (s *Store) migrateWorkspaceSettings(ctx context.Context) error {
if err := s.DeleteWorkspaceSetting(ctx, storepb.WorkspaceSettingKey_WORKSPACE_SETTING_LICENSE_KEY); err != nil {
return err
}
} else if workspaceSetting.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_STYLE {
workspaceGeneralSetting.CustomStyle = workspaceSetting.Raw
updateWorkspaceSetting = true
if err := s.DeleteWorkspaceSetting(ctx, storepb.WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_STYLE); err != nil {
return err
}
} else if workspaceSetting.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_SECRET_SESSION {
workspaceGeneralSetting.SecretSession = workspaceSetting.Raw
updateWorkspaceSetting = true