-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
2,792 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import http from './fetch'; | ||
import type { | ||
NewIdpsParams, | ||
PatchIdpsParams, | ||
PutIdpsParams, | ||
} from './types/authSourceFiles'; | ||
|
||
/** | ||
* 认证源列表 | ||
*/ | ||
export const getIdps = (keyword: string) => http.get(`/api/v1/web/idps/?keyword=${keyword}`); | ||
|
||
/** | ||
* 认证源插件列表 | ||
*/ | ||
export const getIdpsPlugins = () => http.get('/api/v1/web/idps/plugins/'); | ||
|
||
/** | ||
* 新建认证源 | ||
*/ | ||
export const postIdps = (params: NewIdpsParams) => http.post('/api/v1/web/idps/', params); | ||
|
||
/** | ||
* 认证源详情 | ||
*/ | ||
export const getIdpsDetails = (id: string) => http.get(`/api/v1/web/idps/${id}/`); | ||
|
||
/** | ||
* 更新认证源部分字段(local) | ||
*/ | ||
export const patchIdps = (params: PatchIdpsParams) => http.patch(`/api/v1/web/idps/${params.id}/`, params); | ||
|
||
/** | ||
* 更新认证源 | ||
*/ | ||
export const putIdps = (params: PutIdpsParams) => http.put(`/api/v1/web/idps/${params.id}/`, params); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* 新建认证源参数 | ||
*/ | ||
export interface NewIdpsParams { | ||
name: string, | ||
plugin_id: string, | ||
plugin_config: {}, | ||
data_source_match_rules?: { | ||
data_source_id: number, | ||
field_compare_rules: { | ||
source_field: string, | ||
target_field: string, | ||
}[], | ||
}[], | ||
} | ||
|
||
/** | ||
* 更新本地认证源部分字段参数 | ||
*/ | ||
export interface PatchIdpsParams { | ||
id: string, | ||
name: string, | ||
} | ||
|
||
/** | ||
* 更新认证源字段参数 | ||
*/ | ||
export interface PutIdpsParams { | ||
id: string, | ||
name: string, | ||
plugin_config: {}, | ||
data_source_match_rules?: { | ||
data_source_id: number, | ||
field_compare_rules: { | ||
source_field: string, | ||
target_field: string, | ||
}[], | ||
}[], | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.