@gct-paas/api 0.1.4-dev.0 → 0.1.4-dev.2

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.
@@ -36,62 +36,6 @@ export interface APIDatasetConfigDTO {
36
36
  */
37
37
  taskFreqValue?: number;
38
38
  }
39
- export interface AcLicense {
40
- /**
41
- *
42
- *
43
- * @type string
44
- */
45
- appId?: string;
46
- /**
47
- *
48
- *
49
- * @type string
50
- */
51
- category?: string;
52
- /**
53
- *
54
- *
55
- * @type string
56
- */
57
- customerName?: string;
58
- /**
59
- *
60
- *
61
- * @type string
62
- */
63
- effectiveDate?: string;
64
- /**
65
- *
66
- *
67
- * @type string
68
- */
69
- env?: string;
70
- /**
71
- *
72
- *
73
- * @type string
74
- */
75
- expirationDate?: string;
76
- /**
77
- *
78
- *
79
- * @type string
80
- */
81
- id?: string;
82
- /**
83
- *
84
- *
85
- * @type string
86
- */
87
- productName?: string;
88
- /**
89
- *
90
- *
91
- * @type number
92
- */
93
- state?: number;
94
- }
95
39
  export interface AcLicenseResponse {
96
40
  /**
97
41
  * 授权类别 系统授权:system 增购:additional
@@ -1184,9 +1128,9 @@ export interface AppEffectiveLicense {
1184
1128
  /**
1185
1129
  * license列表
1186
1130
  *
1187
- * @type AcLicense[]
1131
+ * @type LicenseDTO[]
1188
1132
  */
1189
- licenseList?: AcLicense[];
1133
+ licenseList?: LicenseDTO[];
1190
1134
  }
1191
1135
  export interface AppGrantedStatisticDTO {
1192
1136
  /**
@@ -2901,6 +2845,12 @@ export interface BIChartConditionDTO {
2901
2845
  * @type string
2902
2846
  */
2903
2847
  datasetKey?: string;
2848
+ /**
2849
+ *
2850
+ *
2851
+ * @type boolean
2852
+ */
2853
+ dateFieldStatistics?: boolean;
2904
2854
  /**
2905
2855
  *
2906
2856
  *
@@ -2975,6 +2925,12 @@ export interface BIChartExportDTO {
2975
2925
  * @type string
2976
2926
  */
2977
2927
  datasetKey?: string;
2928
+ /**
2929
+ *
2930
+ *
2931
+ * @type boolean
2932
+ */
2933
+ dateFieldStatistics?: boolean;
2978
2934
  /**
2979
2935
  *
2980
2936
  *
@@ -3061,6 +3017,12 @@ export interface BICrossReportDTO {
3061
3017
  * @type string
3062
3018
  */
3063
3019
  datasetKey?: string;
3020
+ /**
3021
+ *
3022
+ *
3023
+ * @type boolean
3024
+ */
3025
+ dateFieldStatistics?: boolean;
3064
3026
  /**
3065
3027
  *
3066
3028
  *
@@ -4827,6 +4789,12 @@ export interface DataSourceMainResponse {
4827
4789
  type?: string;
4828
4790
  }
4829
4791
  export interface DataSourcePageRequest {
4792
+ /**
4793
+ * 是否启用
4794
+ *
4795
+ * @type number
4796
+ */
4797
+ enabled?: number;
4830
4798
  /**
4831
4799
  * 应用环境 dev:开发 test:测试 prod:生产
4832
4800
  *
@@ -6871,6 +6839,12 @@ export interface FilePreviewDTO {
6871
6839
  * @type string
6872
6840
  */
6873
6841
  datasetKey?: string;
6842
+ /**
6843
+ *
6844
+ *
6845
+ * @type boolean
6846
+ */
6847
+ dateFieldStatistics?: boolean;
6874
6848
  /**
6875
6849
  * 完整的sql
6876
6850
  *
@@ -8338,6 +8312,68 @@ export interface LicenseAuthRequest {
8338
8312
  */
8339
8313
  version?: string;
8340
8314
  }
8315
+ export interface LicenseDTO {
8316
+ /**
8317
+ *
8318
+ *
8319
+ * @type string
8320
+ */
8321
+ appId?: string;
8322
+ /**
8323
+ *
8324
+ *
8325
+ * @type string
8326
+ */
8327
+ category?: string;
8328
+ /**
8329
+ *
8330
+ *
8331
+ * @type string
8332
+ */
8333
+ customerName?: string;
8334
+ /**
8335
+ *
8336
+ *
8337
+ * @type string
8338
+ */
8339
+ effectiveDate?: string;
8340
+ /**
8341
+ *
8342
+ *
8343
+ * @type string
8344
+ */
8345
+ env?: string;
8346
+ /**
8347
+ *
8348
+ *
8349
+ * @type string
8350
+ */
8351
+ expirationDate?: string;
8352
+ /**
8353
+ *
8354
+ *
8355
+ * @type string
8356
+ */
8357
+ id?: string;
8358
+ /**
8359
+ *
8360
+ *
8361
+ * @type string
8362
+ */
8363
+ productName?: string;
8364
+ /**
8365
+ *
8366
+ *
8367
+ * @type string
8368
+ */
8369
+ productType?: string;
8370
+ /**
8371
+ *
8372
+ *
8373
+ * @type number
8374
+ */
8375
+ state?: number;
8376
+ }
8341
8377
  export interface LicenseExpireMsg {
8342
8378
  /**
8343
8379
  * 授权类别 系统授权:system 增购:additional
@@ -101,4 +101,17 @@ export declare class ApiService {
101
101
  * @returns {Promise<T>} 请求结果
102
102
  */
103
103
  protected _head<T = unknown>(method: string, pathParams?: IParams, query?: IParams, data?: IObject, config?: Partial<AxiosRequestConfig>): Promise<T>;
104
+ /**
105
+ * 文件上传方法
106
+ *
107
+ * @protected
108
+ * @template T
109
+ * @param {string} method 请求方法路径
110
+ * @param {IObject} [pathParams] 路径参数
111
+ * @param {IParams} [query] 查询参数
112
+ * @param {Partial<UploadFileData>} [data] 上传数据
113
+ * @param {Partial<AxiosRequestConfig>} [config] 请求配置
114
+ * @return {*} {Promise<T>} 请求结果
115
+ */
116
+ protected _upload<T = unknown>(method: string, pathParams?: IObject, query?: IParams, data?: Partial<UploadFileData>, config?: Partial<AxiosRequestConfig>): Promise<T>;
104
117
  }
@@ -98,6 +98,12 @@ export interface ApiItem {
98
98
  * @type {boolean}
99
99
  */
100
100
  hasData?: boolean;
101
+ /**
102
+ * 是否为文件上传
103
+ *
104
+ * @type {boolean}
105
+ */
106
+ hasUpload?: boolean;
101
107
  }
102
108
  /**
103
109
  * 接口配置项
@@ -16,7 +16,7 @@ export class ApiService {
16
16
  if (!(property in api)) {
17
17
  const cfg = config.apis.find((item) => item.method === property);
18
18
  if (cfg) {
19
- const modeFn = `_${cfg.mode}`;
19
+ const modeFn = cfg.hasUpload ? "_upload" : `_${cfg.mode}`;
20
20
  if (cfg.hasPathParams && cfg.hasData && cfg.hasQuery) {
21
21
  api[property] = (path, query, data, config2) => {
22
22
  return api[modeFn](cfg.path, path, query, data, config2);
@@ -74,6 +74,10 @@ export class ApiService {
74
74
  );
75
75
  };
76
76
  }
77
+ } else {
78
+ console.warn(
79
+ `API method ${property} is not defined in the configuration.`
80
+ );
77
81
  }
78
82
  }
79
83
  return api[property];
@@ -220,4 +224,25 @@ export class ApiService {
220
224
  config
221
225
  );
222
226
  }
227
+ /**
228
+ * 文件上传方法
229
+ *
230
+ * @protected
231
+ * @template T
232
+ * @param {string} method 请求方法路径
233
+ * @param {IObject} [pathParams] 路径参数
234
+ * @param {IParams} [query] 查询参数
235
+ * @param {Partial<UploadFileData>} [data] 上传数据
236
+ * @param {Partial<AxiosRequestConfig>} [config] 请求配置
237
+ * @return {*} {Promise<T>} 请求结果
238
+ */
239
+ _upload(method, pathParams, query, data, config) {
240
+ return HttpUtil.upload(
241
+ joinPath(this.url, method),
242
+ pathParams,
243
+ data,
244
+ query,
245
+ config
246
+ );
247
+ }
223
248
  }
@@ -164,7 +164,8 @@ export class HttpUtil {
164
164
  headers: {
165
165
  "Content-Type": ContentTypeEnum.FORM_DATA,
166
166
  ...config.headers
167
- }
167
+ },
168
+ nativeData: true
168
169
  });
169
170
  }
170
171
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/api",
3
- "version": "0.1.4-dev.0",
3
+ "version": "0.1.4-dev.2",
4
4
  "description": "paas 平台底包",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -79,8 +79,8 @@
79
79
  "devDependencies": {
80
80
  "@babel/preset-env": "^7.28.6",
81
81
  "@commitlint/cli": "^20.3.1",
82
- "@gct-paas/build": "^0.1.6-dev.6",
83
- "@gct-paas/cli": "^0.1.6-dev.6",
82
+ "@gct-paas/build": "^0.1.7",
83
+ "@gct-paas/cli": "^0.1.12",
84
84
  "@rollup/plugin-commonjs": "^29.0.0",
85
85
  "@rollup/plugin-json": "^6.1.0",
86
86
  "@rollup/plugin-node-resolve": "^16.0.3",