@wujies/api-client 0.0.0-stage → 5.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,68 @@
1
+ import type { DictDataOption, DictDataVO, OssQuery, OssVO, UserInfoVO, UserQuery, UserVO, WujiesOperationResult, WujiesResult, WujiesTableData } from './types';
2
+ export type { DictDataOption, DictDataVO, OssQuery, OssVO, UserInfoVO, UserQuery, UserVO, WujiesOperationResult, WujiesResult, WujiesTableData } from './types';
3
+ /** 按字典类型取原始字典数据。GET /system/dict/data/type/{dictType} */
4
+ export declare function getDicts(dictType: string): Promise<WujiesResult<DictDataVO[]>>;
5
+ /** 清空客户端字典缓存(字典被后台改动后可手动调用) */
6
+ export declare function resetDictCache(dictType?: string): void;
7
+ /**
8
+ * 取字典选项,语义与宿主 `useDict` 对齐。
9
+ *
10
+ * 返回一个**响应式对象**:`{ [dictType]: DictDataOption[] }`。未命中缓存时异步回填,
11
+ * 调用方照常 `const { sys_normal_disable } = toRefs(useDict('sys_normal_disable'))`。
12
+ */
13
+ export declare function useDict(...dictTypes: string[]): Record<string, DictDataOption[]>;
14
+ export declare const dictApi: {
15
+ getDicts: typeof getDicts;
16
+ useDict: typeof useDict;
17
+ resetDictCache: typeof resetDictCache;
18
+ };
19
+ /** 用户详情(含部门 / 角色可选项)。GET /system/user/{userId} */
20
+ export declare function getUser(userId?: string | number): Promise<WujiesResult<UserInfoVO>>;
21
+ /** 用户分页列表。GET /system/user/list */
22
+ export declare function listUser(query?: UserQuery): Promise<WujiesTableData<UserVO>>;
23
+ /** 按 id 批量取用户(下拉回填)。GET /system/user/optionselect?userIds=1,2 */
24
+ export declare function optionSelectUsers(userIds: Array<string | number>): Promise<WujiesResult<UserVO[]>>;
25
+ export declare const userApi: {
26
+ getUser: typeof getUser;
27
+ listUser: typeof listUser;
28
+ optionSelectUsers: typeof optionSelectUsers;
29
+ };
30
+ /** OSS 分页列表。GET /resource/oss/list */
31
+ export declare function listOss(query?: OssQuery): Promise<WujiesTableData<OssVO>>;
32
+ /** 按 ossId(逗号分隔)批量取文件。GET /resource/oss/listByIds/{ossId} */
33
+ export declare function listOssByIds(ossId: string | number | Array<string | number>): Promise<WujiesResult<OssVO[]>>;
34
+ /** 删除 OSS 文件。DELETE /resource/oss/{ossId} */
35
+ export declare function deleteOss(ossId: string | number | Array<string | number>): Promise<WujiesOperationResult>;
36
+ export declare const ossApi: {
37
+ listOss: typeof listOss;
38
+ listOssByIds: typeof listOssByIds;
39
+ deleteOss: typeof deleteOss;
40
+ };
41
+ /** 按键名取系统配置值。GET /system/config/configKey/{configKey} */
42
+ export declare function getConfigByKey(configKey: string): Promise<WujiesResult<string>>;
43
+ export declare const configApi: {
44
+ getConfigByKey: typeof getConfigByKey;
45
+ };
46
+ /** 分组聚合对象,用法同 Halo 的 `haloApiClient` */
47
+ export declare const platformApi: {
48
+ dict: {
49
+ getDicts: typeof getDicts;
50
+ useDict: typeof useDict;
51
+ resetDictCache: typeof resetDictCache;
52
+ };
53
+ user: {
54
+ getUser: typeof getUser;
55
+ listUser: typeof listUser;
56
+ optionSelectUsers: typeof optionSelectUsers;
57
+ };
58
+ oss: {
59
+ listOss: typeof listOss;
60
+ listOssByIds: typeof listOssByIds;
61
+ deleteOss: typeof deleteOss;
62
+ };
63
+ config: {
64
+ getConfigByKey: typeof getConfigByKey;
65
+ };
66
+ };
67
+ export default platformApi;
68
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,QAAQ,EACR,KAAK,EACL,UAAU,EACV,SAAS,EACT,MAAM,EACN,qBAAqB,EACrB,YAAY,EACZ,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,cAAc,EACd,UAAU,EACV,QAAQ,EACR,KAAK,EACL,UAAU,EACV,SAAS,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KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAGzG;AAED,eAAO,MAAM,MAAM;;;;CAAuC,CAAC;AAI3D,yDAAyD;AACzD,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAE/E;AAED,eAAO,MAAM,SAAS;;CAAqB,CAAC;AAE5C,wCAAwC;AACxC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;CAKvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,107 @@
1
+ /**
2
+ * 无界平台「薄平台公共 API 客户端」。
3
+ *
4
+ * 定位(与 Halo `@halo-dev/api-client` 对应,但刻意更薄):
5
+ * - 只封**跨 app 反复调用**的平台公共接口(字典 / 用户 / OSS / 配置);
6
+ * - 各 app 自己的业务接口仍留在 app 工程里(照 hello 的 `src/api/**` 抄),
7
+ * 因为 Wujies 没有像 Halo 那样统一的内容 API,能生成的只有这几个公共端点。
8
+ *
9
+ * 运行期:本包**打进每个 app**,不靠宿主 import map 注入。它内部只调用
10
+ * `@wujies/ui-shared` 的 `request`(那是宿主那个带登录态与统一错误处理的 axios 实例,
11
+ * 已 external),所以数据仍走同一份宿主通道,不产生第二套请求实现。
12
+ */
13
+ import { ref } from 'vue';
14
+ import { request } from '@wujies/ui-shared';
15
+ /* ---------------- 字典 ---------------- */
16
+ /** 按字典类型取原始字典数据。GET /system/dict/data/type/{dictType} */
17
+ export function getDicts(dictType) {
18
+ return request({ url: `/system/dict/data/type/${dictType}`, method: 'get' });
19
+ }
20
+ function toOption(item) {
21
+ return {
22
+ label: item.dictLabel,
23
+ value: item.dictValue,
24
+ elTagType: item.listClass,
25
+ elTagClass: item.cssClass
26
+ };
27
+ }
28
+ /**
29
+ * 客户端级字典缓存。
30
+ *
31
+ * 每个 app 各有一份(不与宿主 dict store 共享),命中即复用、避免同一 app 内
32
+ * 反复拉同一字典;代价是跨 app 会各自拉一次。数据以后端为准,一致。
33
+ */
34
+ const dictCache = new Map();
35
+ /** 清空客户端字典缓存(字典被后台改动后可手动调用) */
36
+ export function resetDictCache(dictType) {
37
+ if (dictType)
38
+ dictCache.delete(dictType);
39
+ else
40
+ dictCache.clear();
41
+ }
42
+ /**
43
+ * 取字典选项,语义与宿主 `useDict` 对齐。
44
+ *
45
+ * 返回一个**响应式对象**:`{ [dictType]: DictDataOption[] }`。未命中缓存时异步回填,
46
+ * 调用方照常 `const { sys_normal_disable } = toRefs(useDict('sys_normal_disable'))`。
47
+ */
48
+ export function useDict(...dictTypes) {
49
+ const res = ref({});
50
+ dictTypes.forEach((dictType) => {
51
+ res.value[dictType] = dictCache.get(dictType) ?? [];
52
+ if (dictCache.has(dictType))
53
+ return;
54
+ void getDicts(dictType).then(({ data }) => {
55
+ const options = data.map(toOption);
56
+ dictCache.set(dictType, options);
57
+ res.value[dictType] = options;
58
+ });
59
+ });
60
+ return res.value;
61
+ }
62
+ export const dictApi = { getDicts, useDict, resetDictCache };
63
+ /* ---------------- 用户 ---------------- */
64
+ /** 用户详情(含部门 / 角色可选项)。GET /system/user/{userId} */
65
+ export function getUser(userId) {
66
+ return request({ url: `/system/user/${userId ?? ''}`, method: 'get' });
67
+ }
68
+ /** 用户分页列表。GET /system/user/list */
69
+ export function listUser(query) {
70
+ return request({ url: '/system/user/list', method: 'get', params: query });
71
+ }
72
+ /** 按 id 批量取用户(下拉回填)。GET /system/user/optionselect?userIds=1,2 */
73
+ export function optionSelectUsers(userIds) {
74
+ return request({ url: `/system/user/optionselect?userIds=${userIds.join(',')}`, method: 'get' });
75
+ }
76
+ export const userApi = { getUser, listUser, optionSelectUsers };
77
+ /* ---------------- OSS ---------------- */
78
+ /** OSS 分页列表。GET /resource/oss/list */
79
+ export function listOss(query) {
80
+ return request({ url: '/resource/oss/list', method: 'get', params: query });
81
+ }
82
+ /** 按 ossId(逗号分隔)批量取文件。GET /resource/oss/listByIds/{ossId} */
83
+ export function listOssByIds(ossId) {
84
+ const ids = Array.isArray(ossId) ? ossId.join(',') : ossId;
85
+ return request({ url: `/resource/oss/listByIds/${ids}`, method: 'get' });
86
+ }
87
+ /** 删除 OSS 文件。DELETE /resource/oss/{ossId} */
88
+ export function deleteOss(ossId) {
89
+ const ids = Array.isArray(ossId) ? ossId.join(',') : ossId;
90
+ return request({ url: `/resource/oss/${ids}`, method: 'delete' });
91
+ }
92
+ export const ossApi = { listOss, listOssByIds, deleteOss };
93
+ /* ---------------- 配置 ---------------- */
94
+ /** 按键名取系统配置值。GET /system/config/configKey/{configKey} */
95
+ export function getConfigByKey(configKey) {
96
+ return request({ url: `/system/config/configKey/${configKey}`, method: 'get' });
97
+ }
98
+ export const configApi = { getConfigByKey };
99
+ /** 分组聚合对象,用法同 Halo 的 `haloApiClient` */
100
+ export const platformApi = {
101
+ dict: dictApi,
102
+ user: userApi,
103
+ oss: ossApi,
104
+ config: configApi
105
+ };
106
+ export default platformApi;
107
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AA2B5C,0CAA0C;AAE1C,yDAAyD;AACzD,MAAM,UAAU,QAAQ,CAAC,QAAgB;IACvC,OAAO,OAAO,CAAC,EAAE,GAAG,EAAE,0BAA0B,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAC/E,CAAC;AAED,SAAS,QAAQ,CAAC,IAAgB;IAChC,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,SAAS;QACrB,KAAK,EAAE,IAAI,CAAC,SAAS;QACrB,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,U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AAC;IAC3D,OAAO,OAAO,CAAC,EAAE,GAAG,EAAE,iBAAiB,GAAG,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AAE3D,0CAA0C;AAE1C,yDAAyD;AACzD,MAAM,UAAU,cAAc,CAAC,SAAiB;IAC9C,OAAO,OAAO,CAAC,EAAE,GAAG,EAAE,4BAA4B,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;AAClF,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,cAAc,EAAE,CAAC;AAE5C,wCAAwC;AACxC,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,MAAM;IACX,MAAM,EAAE,SAAS;CAClB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * 平台公共 API 的最小类型面。
3
+ *
4
+ * 这里只声明**跨 app 共用**的少量字段,刻意不引宿主 api 目录下的 types ——
5
+ * 那些类型属于宿主源码,插件工程不该依赖。字段与后端 VO 对齐即可,
6
+ * 多余字段用索引签名兜住,避免宿主新增字段时这里就得跟着发版。
7
+ */
8
+ /** 单对象响应封装:宿主 request 拦截器已把 axios response 收敛到这一层 */
9
+ export interface WujiesResult<T> {
10
+ code: number;
11
+ msg: string;
12
+ data: T;
13
+ }
14
+ /** 分页列表响应封装 */
15
+ export interface WujiesTableData<T> {
16
+ code: number;
17
+ msg: string;
18
+ rows: T[];
19
+ total: number;
20
+ }
21
+ /** 操作结果(新增 / 修改 / 删除) */
22
+ export interface WujiesOperationResult {
23
+ code: number;
24
+ msg: string;
25
+ }
26
+ /** `/system/dict/data/type/{dictType}` 返回的原始字典项 */
27
+ export interface DictDataVO {
28
+ dictCode?: string | number;
29
+ dictSort?: number;
30
+ dictLabel: string;
31
+ dictValue: string;
32
+ dictType?: string;
33
+ cssClass?: string;
34
+ /** Element Plus 标签类型:success / info / warning / danger / primary */
35
+ listClass?: string;
36
+ remark?: string;
37
+ [key: string]: unknown;
38
+ }
39
+ /** useDict 规整后的下拉/标签选项,字段与宿主 useDict 输出口径一致 */
40
+ export interface DictDataOption {
41
+ label: string;
42
+ value: string;
43
+ elTagType?: string;
44
+ elTagClass?: string;
45
+ }
46
+ export interface UserVO {
47
+ userId: string | number;
48
+ deptId?: string | number;
49
+ userName: string;
50
+ nickName: string;
51
+ email?: string;
52
+ phonenumber?: string;
53
+ sex?: string;
54
+ status?: string;
55
+ [key: string]: unknown;
56
+ }
57
+ export interface UserQuery {
58
+ pageNum?: number;
59
+ pageSize?: number;
60
+ userName?: string;
61
+ nickName?: string;
62
+ phonenumber?: string;
63
+ status?: string;
64
+ deptId?: string | number;
65
+ userIds?: string | number | Array<string | number>;
66
+ [key: string]: unknown;
67
+ }
68
+ /** 当前登录用户信息(含角色、权限) */
69
+ export interface UserInfoVO {
70
+ user?: UserVO;
71
+ roles?: string[];
72
+ permissions?: string[];
73
+ [key: string]: unknown;
74
+ }
75
+ export interface OssVO {
76
+ ossId: string | number;
77
+ fileName: string;
78
+ originalName: string;
79
+ url: string;
80
+ service?: string;
81
+ [key: string]: unknown;
82
+ }
83
+ export interface OssQuery {
84
+ pageNum?: number;
85
+ pageSize?: number;
86
+ fileName?: string;
87
+ originalName?: string;
88
+ [key: string]: unknown;
89
+ }
90
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,qDAAqD;AACrD,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,CAAC,CAAC;CACT;AAED,e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AAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACnD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,uBAAuB;AACvB,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAID,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
package/dist/types.js ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 平台公共 API 的最小类型面。
3
+ *
4
+ * 这里只声明**跨 app 共用**的少量字段,刻意不引宿主 api 目录下的 types ——
5
+ * 那些类型属于宿主源码,插件工程不该依赖。字段与后端 VO 对齐即可,
6
+ * 多余字段用索引签名兜住,避免宿主新增字段时这里就得跟着发版。
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
package/package.json CHANGED
@@ -1,6 +1,45 @@
1
1
  {
2
2
  "name": "@wujies/api-client",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "5.6.6",
4
+ "description": "无界平台远程应用的薄平台公共 API 客户端:字典 / 用户 / OSS / 配置,构建在各 app 内部,运行期复用宿主 request 单实例",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "sideEffects": false,
20
+ "publishConfig": {
21
+ "access": "public",
22
+ "registry": "https://registry.npmjs.org/"
23
+ },
24
+ "license": "MIT",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://gitee.com/impressivel/wujies-plugins.git",
28
+ "directory": "frontend/packages/api-client"
29
+ },
30
+ "dependencies": {
31
+ "@wujies/ui-shared": "^5.6.6"
32
+ },
33
+ "peerDependencies": {
34
+ "vue": "^3.5.0"
35
+ },
36
+ "devDependencies": {
37
+ "typescript": "~5.8.3",
38
+ "vue": "3.5.13"
39
+ },
40
+ "scripts": {
41
+ "build": "tsc -p tsconfig.json",
42
+ "typecheck": "tsc -p tsconfig.json --noEmit",
43
+ "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\""
44
+ }
6
45
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.