فهرست منبع

fix: update import paths for Scope from local interfaces to '@growi/core/dist/interfaces'

Shun Miyazawa 10 ماه پیش
والد
کامیت
5bbceb3edb

+ 1 - 1
apps/app/src/client/components/Me/AccessTokenScopeList.tsx

@@ -1,11 +1,11 @@
 import React from 'react';
 
+import type { Scope } from '@growi/core/dist/interfaces';
 import { useTranslation } from 'next-i18next';
 import type { UseFormRegisterReturn } from 'react-hook-form';
 
 import { useIsDeviceLargerThanMd } from '~/stores/ui';
 
-import type { Scope } from '../../../interfaces/scope';
 
 import styles from './AccessTokenScopeList.module.scss';
 

+ 2 - 3
apps/app/src/client/components/Me/AccessTokenScopeSelect.tsx

@@ -1,13 +1,12 @@
 import React, { useEffect, useState, useMemo } from 'react';
 
+import type { Scope } from '@growi/core/dist/interfaces';
+import { SCOPE } from '@growi/core/dist/interfaces';
 import type { UseFormRegisterReturn } from 'react-hook-form';
 
 import { extractScopes, getDisabledScopes, parseScopes } from '~/client/util/scope-util';
 import { useIsAdmin } from '~/stores-universal/context';
 
-import type { Scope } from '../../../interfaces/scope';
-import { SCOPE } from '../../../interfaces/scope';
-
 import { AccessTokenScopeList } from './AccessTokenScopeList';
 
 /**

+ 1 - 1
apps/app/src/features/openai/server/routes/message/post-message.ts

@@ -1,4 +1,5 @@
 import type { IUserHasId } from '@growi/core/dist/interfaces';
+import { SCOPE } from '@growi/core/dist/interfaces';
 import { ErrorV3 } from '@growi/core/dist/models';
 import type { Request, RequestHandler, Response } from 'express';
 import type { ValidationChain } from 'express-validator';
@@ -7,7 +8,6 @@ import type { AssistantStream } from 'openai/lib/AssistantStream';
 import type { MessageDelta } from 'openai/resources/beta/threads/messages.mjs';
 
 import { getOrCreateChatAssistant } from '~/features/openai/server/services/assistant';
-import { SCOPE } from '@growi/core/dist/interfaces';
 import type Crowi from '~/server/crowi';
 import { accessTokenParser } from '~/server/middlewares/access-token-parser';
 import { apiV3FormValidator } from '~/server/middlewares/apiv3-form-validator';

+ 1 - 1
apps/app/src/interfaces/access-token.ts

@@ -1,4 +1,4 @@
-import type { Scope } from './scope';
+import type { Scope } from '@growi/core/dist/interfaces';
 
 export type IAccessTokenInfo = {
   expiredAt: Date,

+ 1 - 1
apps/app/src/server/util/scope-util.spec.ts

@@ -1,6 +1,6 @@
+import { SCOPE } from '@growi/core/dist/interfaces';
 import { describe, it, expect } from 'vitest';
 
-import { SCOPE } from '../../interfaces/scope';
 
 import {
   isValidScope, hasAllScope, extractAllScope, extractScopes,