@hlw-uni-mp/request 1.0.3 → 1.0.5

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.
package/dist/index.d.mts CHANGED
@@ -106,18 +106,6 @@ interface InterceptorHandler<T> {
106
106
  rejected?: (error: unknown) => unknown
107
107
  }
108
108
 
109
- /**
110
- * 模态弹窗配置
111
- */
112
- interface ModalOptions {
113
- title?: string
114
- content?: string
115
- confirmText?: string
116
- cancelText?: string
117
- showCancel?: boolean
118
- [key: string]: unknown
119
- }
120
-
121
109
  /**
122
110
  * 接口业务数据扩展标记(供各业务项目通过声明合并自由扩展)
123
111
  */
@@ -125,7 +113,7 @@ interface ApiResData {
125
113
  /**
126
114
  * 模态弹窗配置
127
115
  */
128
- modal?: ModalOptions
116
+ modal?: UniApp.ShowModalOptions
129
117
  }
130
118
 
131
119
  /**
@@ -151,7 +139,7 @@ interface ApiRes<T = unknown> {
151
139
  /**
152
140
  * 模态弹窗配置
153
141
  */
154
- modalOptions?: ModalOptions
142
+ modalOptions?: UniApp.ShowModalOptions
155
143
  }
156
144
 
157
145
  /**
@@ -213,7 +201,7 @@ interface AliossUploadSign extends UploadSignBase {
213
201
  OSSAccessKeyId: string
214
202
  policy: string
215
203
  Signature: string
216
- success_action_status?: string
204
+ successActionStatus?: string
217
205
  }
218
206
 
219
207
  /**
@@ -265,6 +253,8 @@ interface OssConfig {
265
253
  url?: string
266
254
  /** 目标文件名 */
267
255
  filename?: string
256
+ /** 成功响应状态码 */
257
+ successActionStatus?: string
268
258
  [key: string]: unknown
269
259
  }
270
260
 
@@ -406,4 +396,4 @@ declare function getHttpOptions(): HttpOptions;
406
396
  declare const client: UniHttpClient;
407
397
  declare const http: UniHttpClient;
408
398
 
409
- export { type AliossUploadSign, type ApiRes, type ApiResData, type AxiosResponse, type DeviceInfo, HttpError, type HttpMethod, type HttpOptions, type InterceptorHandler, InterceptorManager, type LocalUploadSign, type ModalOptions, type OssConfig, type QiniuUploadSign, type RequestConfig, type SignOptions, UniHttpClient, type UploadFileParams, type UploadSign, type UploadSignBase, calculateSign, client, request as default, del, doUpload, encryptRsa, get, getClient, getDevice, getHttpOptions, http, post, postUploadSign, put, request, setupHttp, sha256, sortString, uploadFile, uploadOss };
399
+ export { type AliossUploadSign, type ApiRes, type ApiResData, type AxiosResponse, type DeviceInfo, HttpError, type HttpMethod, type HttpOptions, type InterceptorHandler, InterceptorManager, type LocalUploadSign, type OssConfig, type QiniuUploadSign, type RequestConfig, type SignOptions, UniHttpClient, type UploadFileParams, type UploadSign, type UploadSignBase, calculateSign, client, request as default, del, doUpload, encryptRsa, get, getClient, getDevice, getHttpOptions, http, post, postUploadSign, put, request, setupHttp, sha256, sortString, uploadFile, uploadOss };
package/dist/index.d.ts CHANGED
@@ -106,18 +106,6 @@ interface InterceptorHandler<T> {
106
106
  rejected?: (error: unknown) => unknown
107
107
  }
108
108
 
109
- /**
110
- * 模态弹窗配置
111
- */
112
- interface ModalOptions {
113
- title?: string
114
- content?: string
115
- confirmText?: string
116
- cancelText?: string
117
- showCancel?: boolean
118
- [key: string]: unknown
119
- }
120
-
121
109
  /**
122
110
  * 接口业务数据扩展标记(供各业务项目通过声明合并自由扩展)
123
111
  */
@@ -125,7 +113,7 @@ interface ApiResData {
125
113
  /**
126
114
  * 模态弹窗配置
127
115
  */
128
- modal?: ModalOptions
116
+ modal?: UniApp.ShowModalOptions
129
117
  }
130
118
 
131
119
  /**
@@ -151,7 +139,7 @@ interface ApiRes<T = unknown> {
151
139
  /**
152
140
  * 模态弹窗配置
153
141
  */
154
- modalOptions?: ModalOptions
142
+ modalOptions?: UniApp.ShowModalOptions
155
143
  }
156
144
 
157
145
  /**
@@ -213,7 +201,7 @@ interface AliossUploadSign extends UploadSignBase {
213
201
  OSSAccessKeyId: string
214
202
  policy: string
215
203
  Signature: string
216
- success_action_status?: string
204
+ successActionStatus?: string
217
205
  }
218
206
 
219
207
  /**
@@ -265,6 +253,8 @@ interface OssConfig {
265
253
  url?: string
266
254
  /** 目标文件名 */
267
255
  filename?: string
256
+ /** 成功响应状态码 */
257
+ successActionStatus?: string
268
258
  [key: string]: unknown
269
259
  }
270
260
 
@@ -406,4 +396,4 @@ declare function getHttpOptions(): HttpOptions;
406
396
  declare const client: UniHttpClient;
407
397
  declare const http: UniHttpClient;
408
398
 
409
- export { type AliossUploadSign, type ApiRes, type ApiResData, type AxiosResponse, type DeviceInfo, HttpError, type HttpMethod, type HttpOptions, type InterceptorHandler, InterceptorManager, type LocalUploadSign, type ModalOptions, type OssConfig, type QiniuUploadSign, type RequestConfig, type SignOptions, UniHttpClient, type UploadFileParams, type UploadSign, type UploadSignBase, calculateSign, client, request as default, del, doUpload, encryptRsa, get, getClient, getDevice, getHttpOptions, http, post, postUploadSign, put, request, setupHttp, sha256, sortString, uploadFile, uploadOss };
399
+ export { type AliossUploadSign, type ApiRes, type ApiResData, type AxiosResponse, type DeviceInfo, HttpError, type HttpMethod, type HttpOptions, type InterceptorHandler, InterceptorManager, type LocalUploadSign, type OssConfig, type QiniuUploadSign, type RequestConfig, type SignOptions, UniHttpClient, type UploadFileParams, type UploadSign, type UploadSignBase, calculateSign, client, request as default, del, doUpload, encryptRsa, get, getClient, getDevice, getHttpOptions, http, post, postUploadSign, put, request, setupHttp, sha256, sortString, uploadFile, uploadOss };
package/dist/index.js CHANGED
@@ -326,7 +326,7 @@ async function uploadOss(oss, source) {
326
326
  const name = oss.filename || filePath.split("/").pop() || "file";
327
327
  const formData = {
328
328
  key: oss.key || "",
329
- success_action_status: "200"
329
+ success_action_status: oss.successActionStatus || "200"
330
330
  };
331
331
  if (oss.policy) formData.policy = oss.policy;
332
332
  if (oss.OSSAccessKeyId) formData.OSSAccessKeyId = oss.OSSAccessKeyId;
@@ -369,7 +369,7 @@ function buildFormData(cred) {
369
369
  policy: cred.policy,
370
370
  OSSAccessKeyId: cred.OSSAccessKeyId,
371
371
  Signature: cred.Signature,
372
- success_action_status: cred.success_action_status || "200"
372
+ success_action_status: cred.successActionStatus || "200"
373
373
  };
374
374
  }
375
375
  return {
package/dist/index.mjs CHANGED
@@ -268,7 +268,7 @@ async function uploadOss(oss, source) {
268
268
  const name = oss.filename || filePath.split("/").pop() || "file";
269
269
  const formData = {
270
270
  key: oss.key || "",
271
- success_action_status: "200"
271
+ success_action_status: oss.successActionStatus || "200"
272
272
  };
273
273
  if (oss.policy) formData.policy = oss.policy;
274
274
  if (oss.OSSAccessKeyId) formData.OSSAccessKeyId = oss.OSSAccessKeyId;
@@ -311,7 +311,7 @@ function buildFormData(cred) {
311
311
  policy: cred.policy,
312
312
  OSSAccessKeyId: cred.OSSAccessKeyId,
313
313
  Signature: cred.Signature,
314
- success_action_status: cred.success_action_status || "200"
314
+ success_action_status: cred.successActionStatus || "200"
315
315
  };
316
316
  }
317
317
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni-mp/request",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Universal Uni-App HTTP and upload client with RSA encryption & sign verification",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",