mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 02:10:45 -06:00
7111c52e4c
* App events: Add info notification type * Revert state * Use info alert * Nav: Enable saving items * Use local state * Use RTK query * Revert go.work * Revert * User-specific queries * Add memo * Fix base URL * Switch to ids * Fix memo * Add codeowners * Generate API * Separate user prefs API * Remove tag * Update export * Use feature toggle
42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
// Generates Redux Toolkit API slices for certain APIs from the OpenAPI spec
|
|
import type { ConfigFile } from '@rtk-query/codegen-openapi';
|
|
|
|
const config: ConfigFile = {
|
|
schemaFile: '../public/openapi3.json',
|
|
apiFile: '', // leave this empty, and instead populate the outputFiles object below
|
|
hooks: true,
|
|
exportName: 'generatedAPI',
|
|
|
|
outputFiles: {
|
|
'../public/app/features/migrate-to-cloud/api/endpoints.gen.ts': {
|
|
apiFile: '../public/app/features/migrate-to-cloud/api/baseAPI.ts',
|
|
apiImport: 'baseAPI',
|
|
filterEndpoints: [
|
|
'getSessionList',
|
|
'getSession',
|
|
'deleteSession',
|
|
'createSession',
|
|
|
|
'getShapshotList',
|
|
'getSnapshot',
|
|
'uploadSnapshot',
|
|
'createSnapshot',
|
|
'cancelSnapshot',
|
|
|
|
'createCloudMigrationToken',
|
|
'deleteCloudMigrationToken',
|
|
'getCloudMigrationToken',
|
|
|
|
'getDashboardByUid',
|
|
],
|
|
},
|
|
'../public/app/features/preferences/api/user/endpoints.gen.ts': {
|
|
apiFile: '../public/app/features/preferences/api/user/baseAPI.ts',
|
|
apiImport: 'baseAPI',
|
|
filterEndpoints: ['getUserPreferences', 'updateUserPreferences', 'patchUserPreferences'],
|
|
},
|
|
},
|
|
};
|
|
|
|
export default config;
|