Просмотр исходного кода

Rename AiAssistantSharingScope to AiAssistantShareScope for consistency

Shun Miyazawa 1 год назад
Родитель
Сommit
f661d11638
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      apps/app/src/features/openai/server/models/ai-assistant.ts

+ 5 - 5
apps/app/src/features/openai/server/models/ai-assistant.ts

@@ -16,7 +16,7 @@ const AiAssistantType = {
   // LEARNING: 'learning',
   // LEARNING: 'learning',
 } as const;
 } as const;
 
 
-const AiAssistantSharingScope = {
+const AiAssistantShareScope = {
   PUBLIC: 'public',
   PUBLIC: 'public',
   ONLY_ME: 'onlyMe',
   ONLY_ME: 'onlyMe',
   USER_GROUP: 'userGroup',
   USER_GROUP: 'userGroup',
@@ -33,7 +33,7 @@ const AiAssistantOwnerAccessScope = {
 *  Interfaces
 *  Interfaces
 */
 */
 type AiAssistantType = typeof AiAssistantType[keyof typeof AiAssistantType];
 type AiAssistantType = typeof AiAssistantType[keyof typeof AiAssistantType];
-type AiAssistantSharingScope = typeof AiAssistantSharingScope[keyof typeof AiAssistantSharingScope];
+type AiAssistantShareScope = typeof AiAssistantShareScope[keyof typeof AiAssistantShareScope];
 type AiAssistantOwnerAccessScope = typeof AiAssistantOwnerAccessScope[keyof typeof AiAssistantOwnerAccessScope];
 type AiAssistantOwnerAccessScope = typeof AiAssistantOwnerAccessScope[keyof typeof AiAssistantOwnerAccessScope];
 
 
 interface AiAssistant {
 interface AiAssistant {
@@ -45,7 +45,7 @@ interface AiAssistant {
   owner: Ref<IUser>
   owner: Ref<IUser>
   grantedUsers?: IUser[]
   grantedUsers?: IUser[]
   grantedGroups?: IGrantedGroup[]
   grantedGroups?: IGrantedGroup[]
-  sharingScope: AiAssistantSharingScope
+  shareScope: AiAssistantShareScope
   ownerAccessScope: AiAssistantOwnerAccessScope
   ownerAccessScope: AiAssistantOwnerAccessScope
 }
 }
 
 
@@ -117,9 +117,9 @@ const schema = new Schema<AiAssistantDocument>(
       }, 'grantedGroups contains non unique item'],
       }, 'grantedGroups contains non unique item'],
       default: [],
       default: [],
     },
     },
-    sharingScope: {
+    shareScope: {
       type: String,
       type: String,
-      enum: Object.values(AiAssistantSharingScope),
+      enum: Object.values(AiAssistantOwnerAccessScope),
       required: true,
       required: true,
     },
     },
     ownerAccessScope: {
     ownerAccessScope: {