szpt-driver-api 1.0.1
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/_request.d.ts +7 -0
- package/accident.d.ts +2539 -0
- package/accident.js +2 -0
- package/accident.js.map +1 -0
- package/auth.d.ts +4301 -0
- package/auth.js +2 -0
- package/auth.js.map +1 -0
- package/authBpmn.d.ts +2350 -0
- package/authBpmn.js +2 -0
- package/authBpmn.js.map +1 -0
- package/authBpmnQuery.d.ts +2873 -0
- package/authBpmnQuery.js +2 -0
- package/authBpmnQuery.js.map +1 -0
- package/common.d.ts +1205 -0
- package/common.js +2 -0
- package/common.js.map +1 -0
- package/index.d.ts +7 -0
- package/index.js +2 -0
- package/index.js.map +1 -0
- package/oss.d.ts +313 -0
- package/oss.js +2 -0
- package/oss.js.map +1 -0
- package/package.json +17 -0
package/oss.d.ts
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
export declare class Base64File {
|
|
2
|
+
/** base64 */
|
|
3
|
+
"base64"?: string;
|
|
4
|
+
/** bucket */
|
|
5
|
+
bucket?: string;
|
|
6
|
+
/** 文件类型。例子:image/jpeg、image/png */
|
|
7
|
+
contentType?: string;
|
|
8
|
+
/** endpoint */
|
|
9
|
+
endpoint?: string;
|
|
10
|
+
/** 文件名 */
|
|
11
|
+
fileName?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class FileObjectEntity {
|
|
14
|
+
bucket: string;
|
|
15
|
+
contentType: string;
|
|
16
|
+
deleted: boolean;
|
|
17
|
+
endpoint: string;
|
|
18
|
+
fileName: string;
|
|
19
|
+
id: string;
|
|
20
|
+
path: string;
|
|
21
|
+
/** @format int64 */
|
|
22
|
+
size: number;
|
|
23
|
+
/** @format date-time */
|
|
24
|
+
time: string;
|
|
25
|
+
user: string;
|
|
26
|
+
}
|
|
27
|
+
export declare class FileObjectMeta {
|
|
28
|
+
contentType: string;
|
|
29
|
+
deleted: boolean;
|
|
30
|
+
fileName: string;
|
|
31
|
+
id: string;
|
|
32
|
+
/** @format int64 */
|
|
33
|
+
size: number;
|
|
34
|
+
}
|
|
35
|
+
export declare class PageResultFileObjectEntity {
|
|
36
|
+
list: FileObjectEntity[];
|
|
37
|
+
/** @format int64 */
|
|
38
|
+
total: number;
|
|
39
|
+
}
|
|
40
|
+
export declare type StreamingResponseBody = any;
|
|
41
|
+
/**
|
|
42
|
+
* @format binary
|
|
43
|
+
*/
|
|
44
|
+
export declare type UploadPayload = File;
|
|
45
|
+
export declare class UploadParams {
|
|
46
|
+
/** bucket */
|
|
47
|
+
bucket?: string;
|
|
48
|
+
/** endpoint */
|
|
49
|
+
endpoint?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare class ByIdParams {
|
|
52
|
+
/** format */
|
|
53
|
+
format?: string;
|
|
54
|
+
/** withMimeType */
|
|
55
|
+
withMimeType?: boolean;
|
|
56
|
+
/** id */
|
|
57
|
+
id: string;
|
|
58
|
+
}
|
|
59
|
+
export declare class ThumbnailByIdParams {
|
|
60
|
+
/**
|
|
61
|
+
* h
|
|
62
|
+
* @format int32
|
|
63
|
+
*/
|
|
64
|
+
h?: number;
|
|
65
|
+
/**
|
|
66
|
+
* w
|
|
67
|
+
* @format int32
|
|
68
|
+
*/
|
|
69
|
+
w?: number;
|
|
70
|
+
/**
|
|
71
|
+
* q
|
|
72
|
+
* @format int32
|
|
73
|
+
*/
|
|
74
|
+
q?: number;
|
|
75
|
+
/** id */
|
|
76
|
+
id: string;
|
|
77
|
+
}
|
|
78
|
+
export declare class CreateBucketParams {
|
|
79
|
+
/** endpoint */
|
|
80
|
+
endpoint: string;
|
|
81
|
+
/** bucket */
|
|
82
|
+
bucket: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @format binary
|
|
86
|
+
*/
|
|
87
|
+
export declare type ResourceUploadPayload = File;
|
|
88
|
+
export declare class ResourceUploadParams {
|
|
89
|
+
/** user */
|
|
90
|
+
user?: string;
|
|
91
|
+
/** bucket */
|
|
92
|
+
bucket?: string;
|
|
93
|
+
/** endpoint */
|
|
94
|
+
endpoint?: string;
|
|
95
|
+
/** objectId */
|
|
96
|
+
objectId?: string;
|
|
97
|
+
/** overwrite */
|
|
98
|
+
overwrite?: boolean;
|
|
99
|
+
}
|
|
100
|
+
export declare class ResourceParams {
|
|
101
|
+
bucket?: string;
|
|
102
|
+
contentTypeLike?: string;
|
|
103
|
+
deleted?: boolean;
|
|
104
|
+
endpoint?: string;
|
|
105
|
+
id?: string;
|
|
106
|
+
orderBy?: string[];
|
|
107
|
+
/** @format int32 */
|
|
108
|
+
pageIndex?: number;
|
|
109
|
+
/** @format int32 */
|
|
110
|
+
pageSize?: number;
|
|
111
|
+
pathLike?: string;
|
|
112
|
+
/** @format date-time */
|
|
113
|
+
timeBegin?: string;
|
|
114
|
+
/** @format date-time */
|
|
115
|
+
timeEnd?: string;
|
|
116
|
+
user?: string;
|
|
117
|
+
}
|
|
118
|
+
import { AxiosRequestConfig, ResponseType } from "axios";
|
|
119
|
+
export declare type QueryParamsType = Record<string | number, any>;
|
|
120
|
+
export interface FullRequestParams extends Omit<AxiosRequestConfig, "data" | "params" | "url" | "responseType"> {
|
|
121
|
+
/** set parameter to `true` for call `securityWorker` for this request */
|
|
122
|
+
secure?: boolean;
|
|
123
|
+
/** request path */
|
|
124
|
+
url: string;
|
|
125
|
+
/** content type of request body */
|
|
126
|
+
type?: ContentType;
|
|
127
|
+
/** query params */
|
|
128
|
+
params?: QueryParamsType;
|
|
129
|
+
/** format of response (i.e. response.json() -> format: "json") */
|
|
130
|
+
ResponseType?: ResponseType;
|
|
131
|
+
/** request body */
|
|
132
|
+
body?: unknown;
|
|
133
|
+
}
|
|
134
|
+
export declare type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
|
|
135
|
+
export interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, "data" | "cancelToken"> {
|
|
136
|
+
securityWorker?: (securityData: SecurityDataType | null) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
|
|
137
|
+
secure?: boolean;
|
|
138
|
+
ResponseType?: ResponseType;
|
|
139
|
+
}
|
|
140
|
+
export declare enum ContentType {
|
|
141
|
+
Json = "application/json",
|
|
142
|
+
FormData = "multipart/form-data",
|
|
143
|
+
UrlEncoded = "application/x-www-form-urlencoded"
|
|
144
|
+
}
|
|
145
|
+
interface HttpClient {
|
|
146
|
+
request: <T = any, _E = any>(config: AxiosRequestConfig) => Promise<T>;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @title OSS
|
|
150
|
+
* @version 1.0
|
|
151
|
+
* @baseUrl http://192.168.200.12:5000
|
|
152
|
+
*
|
|
153
|
+
* OSS
|
|
154
|
+
*/
|
|
155
|
+
declare class Api {
|
|
156
|
+
private http;
|
|
157
|
+
constructor(http: HttpClient);
|
|
158
|
+
resource: {
|
|
159
|
+
/**
|
|
160
|
+
* No description
|
|
161
|
+
*
|
|
162
|
+
* @tags resource
|
|
163
|
+
* @name Upload
|
|
164
|
+
* @summary 文件上传
|
|
165
|
+
* @request POST:/oss/resource/upload
|
|
166
|
+
* @response `200` `string` OK
|
|
167
|
+
* @response `201` `void` Created
|
|
168
|
+
* @response `401` `void` Unauthorized
|
|
169
|
+
* @response `403` `void` Forbidden
|
|
170
|
+
* @response `404` `void` Not Found
|
|
171
|
+
*/
|
|
172
|
+
upload: (query: UploadParams, data: UploadPayload, axiosConfig?: AxiosRequestConfig) => Promise<string>;
|
|
173
|
+
/**
|
|
174
|
+
* No description
|
|
175
|
+
*
|
|
176
|
+
* @tags resource
|
|
177
|
+
* @name UploadBase64
|
|
178
|
+
* @summary 文件上传 - base64形式
|
|
179
|
+
* @request POST:/oss/resource/upload-base64
|
|
180
|
+
* @response `200` `string` OK
|
|
181
|
+
* @response `201` `void` Created
|
|
182
|
+
* @response `401` `void` Unauthorized
|
|
183
|
+
* @response `403` `void` Forbidden
|
|
184
|
+
* @response `404` `void` Not Found
|
|
185
|
+
*/
|
|
186
|
+
uploadBase64: (data: Base64File, axiosConfig?: AxiosRequestConfig) => Promise<string>;
|
|
187
|
+
/**
|
|
188
|
+
* @description format: base64/redirect-url
|
|
189
|
+
*
|
|
190
|
+
* @tags resource
|
|
191
|
+
* @name ById
|
|
192
|
+
* @summary 文件下载
|
|
193
|
+
* @request GET:/oss/resource/{id}
|
|
194
|
+
* @response `200` `StreamingResponseBody` OK
|
|
195
|
+
* @response `401` `void` Unauthorized
|
|
196
|
+
* @response `403` `void` Forbidden
|
|
197
|
+
* @response `404` `void` Not Found
|
|
198
|
+
*/
|
|
199
|
+
byId: ({ id, ...query }: ByIdParams, axiosConfig?: AxiosRequestConfig) => Promise<any>;
|
|
200
|
+
/**
|
|
201
|
+
* No description
|
|
202
|
+
*
|
|
203
|
+
* @tags resource
|
|
204
|
+
* @name MetaById
|
|
205
|
+
* @summary 文件元信息
|
|
206
|
+
* @request GET:/oss/resource/{id}/meta
|
|
207
|
+
* @response `200` `FileObjectMeta` OK
|
|
208
|
+
* @response `401` `void` Unauthorized
|
|
209
|
+
* @response `403` `void` Forbidden
|
|
210
|
+
* @response `404` `void` Not Found
|
|
211
|
+
*/
|
|
212
|
+
metaById: (id: string, axiosConfig?: AxiosRequestConfig) => Promise<FileObjectMeta>;
|
|
213
|
+
/**
|
|
214
|
+
* No description
|
|
215
|
+
*
|
|
216
|
+
* @tags resource
|
|
217
|
+
* @name ThumbnailById
|
|
218
|
+
* @summary 图片缩略图
|
|
219
|
+
* @request GET:/oss/resource/{id}/thumbnail
|
|
220
|
+
* @response `200` `StreamingResponseBody` OK
|
|
221
|
+
* @response `401` `void` Unauthorized
|
|
222
|
+
* @response `403` `void` Forbidden
|
|
223
|
+
* @response `404` `void` Not Found
|
|
224
|
+
*/
|
|
225
|
+
thumbnailById: ({ id, ...query }: ThumbnailByIdParams, axiosConfig?: AxiosRequestConfig) => Promise<any>;
|
|
226
|
+
};
|
|
227
|
+
inner: {
|
|
228
|
+
/**
|
|
229
|
+
* No description
|
|
230
|
+
*
|
|
231
|
+
* @tags inner
|
|
232
|
+
* @name CreateBucket
|
|
233
|
+
* @summary 创建bucket
|
|
234
|
+
* @request POST:/oss/inner/create-bucket
|
|
235
|
+
* @response `200` `void` OK
|
|
236
|
+
* @response `201` `void` Created
|
|
237
|
+
* @response `401` `void` Unauthorized
|
|
238
|
+
* @response `403` `void` Forbidden
|
|
239
|
+
* @response `404` `void` Not Found
|
|
240
|
+
*/
|
|
241
|
+
createBucket: (query: CreateBucketParams, axiosConfig?: AxiosRequestConfig) => Promise<void>;
|
|
242
|
+
/**
|
|
243
|
+
* No description
|
|
244
|
+
*
|
|
245
|
+
* @tags inner
|
|
246
|
+
* @name DeleteResourceRemoveById
|
|
247
|
+
* @summary 删除文件
|
|
248
|
+
* @request DELETE:/oss/inner/resource/remove/{id}
|
|
249
|
+
* @response `200` `void` OK
|
|
250
|
+
* @response `204` `void` No Content
|
|
251
|
+
* @response `401` `void` Unauthorized
|
|
252
|
+
* @response `403` `void` Forbidden
|
|
253
|
+
*/
|
|
254
|
+
deleteResourceRemoveById: (id: string, axiosConfig?: AxiosRequestConfig) => Promise<void>;
|
|
255
|
+
/**
|
|
256
|
+
* No description
|
|
257
|
+
*
|
|
258
|
+
* @tags inner
|
|
259
|
+
* @name ResourceUpload
|
|
260
|
+
* @summary 文件上传
|
|
261
|
+
* @request POST:/oss/inner/resource/upload
|
|
262
|
+
* @response `200` `string` OK
|
|
263
|
+
* @response `201` `void` Created
|
|
264
|
+
* @response `401` `void` Unauthorized
|
|
265
|
+
* @response `403` `void` Forbidden
|
|
266
|
+
* @response `404` `void` Not Found
|
|
267
|
+
*/
|
|
268
|
+
resourceUpload: (query: ResourceUploadParams, data: ResourceUploadPayload, axiosConfig?: AxiosRequestConfig) => Promise<string>;
|
|
269
|
+
/**
|
|
270
|
+
* No description
|
|
271
|
+
*
|
|
272
|
+
* @tags inner
|
|
273
|
+
* @name ResourceMetaById
|
|
274
|
+
* @summary 文件元信息
|
|
275
|
+
* @request GET:/oss/inner/resource/{id}/meta
|
|
276
|
+
* @response `200` `FileObjectMeta` OK
|
|
277
|
+
* @response `401` `void` Unauthorized
|
|
278
|
+
* @response `403` `void` Forbidden
|
|
279
|
+
* @response `404` `void` Not Found
|
|
280
|
+
*/
|
|
281
|
+
resourceMetaById: (id: string, axiosConfig?: AxiosRequestConfig) => Promise<FileObjectMeta>;
|
|
282
|
+
};
|
|
283
|
+
manage: {
|
|
284
|
+
/**
|
|
285
|
+
* No description
|
|
286
|
+
*
|
|
287
|
+
* @tags manage
|
|
288
|
+
* @name Resource
|
|
289
|
+
* @summary 列出资源
|
|
290
|
+
* @request GET:/oss/manage/resource
|
|
291
|
+
* @response `200` `PageResultFileObjectEntity` OK
|
|
292
|
+
* @response `401` `void` Unauthorized
|
|
293
|
+
* @response `403` `void` Forbidden
|
|
294
|
+
* @response `404` `void` Not Found
|
|
295
|
+
*/
|
|
296
|
+
resource: (query: ResourceParams, axiosConfig?: AxiosRequestConfig) => Promise<PageResultFileObjectEntity>;
|
|
297
|
+
/**
|
|
298
|
+
* No description
|
|
299
|
+
*
|
|
300
|
+
* @tags manage
|
|
301
|
+
* @name DeleteResourceById
|
|
302
|
+
* @summary 删除文件
|
|
303
|
+
* @request DELETE:/oss/manage/resource/{id}
|
|
304
|
+
* @response `200` `void` OK
|
|
305
|
+
* @response `204` `void` No Content
|
|
306
|
+
* @response `401` `void` Unauthorized
|
|
307
|
+
* @response `403` `void` Forbidden
|
|
308
|
+
*/
|
|
309
|
+
deleteResourceById: (id: string, axiosConfig?: AxiosRequestConfig) => Promise<void>;
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
export declare const ossApi: Api;
|
|
313
|
+
export {};
|
package/oss.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(()=>{"use strict";var e={289:(e,t,s)=>{s.d(t,{M:()=>r});const r={request(e){throw new Error("please setup http client first")}}}},t={};function s(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,s),o.exports}s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{s.r(r),s.d(r,{Base64File:()=>o,ByIdParams:()=>l,ContentType:()=>e,CreateBucketParams:()=>p,FileObjectEntity:()=>u,FileObjectMeta:()=>n,PageResultFileObjectEntity:()=>c,ResourceParams:()=>m,ResourceUploadParams:()=>h,ThumbnailByIdParams:()=>d,UploadParams:()=>i,ossApi:()=>b});var e,t=s(289),a=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(s[r[a]]=e[r[a]])}return s};class o{}class u{}class n{}class c{}class i{}class l{}class d{}class p{}class h{}class m{}!function(e){e.Json="application/json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded"}(e||(e={}));const b=new class{constructor(e){this.resource={upload:(e,t,s={})=>this.http.request(Object.assign({url:"/oss/resource/upload",method:"POST",params:e,data:t},s)),uploadBase64:(e,t={})=>this.http.request(Object.assign({url:"/oss/resource/upload-base64",method:"POST",data:e},t)),byId:(e,t)=>{var{id:s}=e,r=a(e,["id"]);return void 0===t&&(t={}),this.http.request(Object.assign({url:`/oss/resource/${s}`,method:"GET",params:r},t))},metaById:(e,t={})=>this.http.request(Object.assign({url:`/oss/resource/${e}/meta`,method:"GET"},t)),thumbnailById:(e,t)=>{var{id:s}=e,r=a(e,["id"]);return void 0===t&&(t={}),this.http.request(Object.assign({url:`/oss/resource/${s}/thumbnail`,method:"GET",params:r},t))}},this.inner={createBucket:(e,t={})=>this.http.request(Object.assign({url:"/oss/inner/create-bucket",method:"POST",params:e},t)),deleteResourceRemoveById:(e,t={})=>this.http.request(Object.assign({url:`/oss/inner/resource/remove/${e}`,method:"DELETE"},t)),resourceUpload:(e,t,s={})=>this.http.request(Object.assign({url:"/oss/inner/resource/upload",method:"POST",params:e,data:t},s)),resourceMetaById:(e,t={})=>this.http.request(Object.assign({url:`/oss/inner/resource/${e}/meta`,method:"GET"},t))},this.manage={resource:(e,t={})=>this.http.request(Object.assign({url:"/oss/manage/resource",method:"GET",params:e},t)),deleteResourceById:(e,t={})=>this.http.request(Object.assign({url:`/oss/manage/resource/${e}`,method:"DELETE"},t))},this.http=e}}(t.M)})();var a=exports;for(var o in r)a[o]=r[o];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
|
|
2
|
+
//# sourceMappingURL=oss.js.map
|
package/oss.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oss.js","mappings":"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","sources":["webpack://nestjs-vue3-ssr/./dist/modules/api/_request.ts","webpack://nestjs-vue3-ssr/webpack/bootstrap","webpack://nestjs-vue3-ssr/webpack/runtime/define property getters","webpack://nestjs-vue3-ssr/webpack/runtime/hasOwnProperty shorthand","webpack://nestjs-vue3-ssr/webpack/runtime/make namespace object","webpack://nestjs-vue3-ssr/./dist/modules/api/oss.ts"],"sourcesContent":["\nimport { AxiosRequestConfig, AxiosResponse } from 'axios'\n\nlet isSetup = false\n\ninterface HttpClient {\n\trequest: <T = any, _E = any>(config: AxiosRequestConfig) => Promise<T>\n}\n\n//@ts-ignore\nexport const httpClient: HttpClient = {\n\trequest(config: AxiosRequestConfig):any {\n\t\tif (!isSetup) {\n\t\t\tthrow new Error('please setup http client first')\n\t\t}\n\t},\n}\n\nexport const setupApi = (request: HttpClient['request']) => {\n\thttpClient.request = request\n\tisSetup = true\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export class Base64File {\n /** base64 */\n \"base64\"?: string;\n\n /** bucket */\n bucket?: string;\n\n /** 文件类型。例子:image/jpeg、image/png */\n contentType?: string;\n\n /** endpoint */\n endpoint?: string;\n\n /** 文件名 */\n fileName?: string;\n}\n\nexport class FileObjectEntity {\n bucket: string;\n contentType: string;\n deleted: boolean;\n endpoint: string;\n fileName: string;\n id: string;\n path: string;\n\n /** @format int64 */\n size: number;\n\n /** @format date-time */\n time: string;\n user: string;\n}\n\nexport class FileObjectMeta {\n contentType: string;\n deleted: boolean;\n fileName: string;\n id: string;\n\n /** @format int64 */\n size: number;\n}\n\nexport class PageResultFileObjectEntity {\n list: FileObjectEntity[];\n\n /** @format int64 */\n total: number;\n}\n\nexport type StreamingResponseBody = any;\n\n/**\n * @format binary\n */\nexport type UploadPayload = File;\n\nexport class UploadParams {\n /** bucket */\n bucket?: string;\n\n /** endpoint */\n endpoint?: string;\n}\n\nexport class ByIdParams {\n /** format */\n format?: string;\n\n /** withMimeType */\n withMimeType?: boolean;\n\n /** id */\n id: string;\n}\n\nexport class ThumbnailByIdParams {\n /**\n * h\n * @format int32\n */\n h?: number;\n\n /**\n * w\n * @format int32\n */\n w?: number;\n\n /**\n * q\n * @format int32\n */\n q?: number;\n\n /** id */\n id: string;\n}\n\nexport class CreateBucketParams {\n /** endpoint */\n endpoint: string;\n\n /** bucket */\n bucket: string;\n}\n\n/**\n * @format binary\n */\nexport type ResourceUploadPayload = File;\n\nexport class ResourceUploadParams {\n /** user */\n user?: string;\n\n /** bucket */\n bucket?: string;\n\n /** endpoint */\n endpoint?: string;\n\n /** objectId */\n objectId?: string;\n\n /** overwrite */\n overwrite?: boolean;\n}\n\nexport class ResourceParams {\n bucket?: string;\n contentTypeLike?: string;\n deleted?: boolean;\n endpoint?: string;\n id?: string;\n orderBy?: string[];\n\n /** @format int32 */\n pageIndex?: number;\n\n /** @format int32 */\n pageSize?: number;\n pathLike?: string;\n\n /** @format date-time */\n timeBegin?: string;\n\n /** @format date-time */\n timeEnd?: string;\n user?: string;\n}\n\nimport { AxiosRequestConfig, ResponseType } from \"axios\";\n\nexport type QueryParamsType = Record<string | number, any>;\n\nexport interface FullRequestParams extends Omit<AxiosRequestConfig, \"data\" | \"params\" | \"url\" | \"responseType\"> {\n /** set parameter to `true` for call `securityWorker` for this request */\n secure?: boolean;\n /** request path */\n url: string;\n /** content type of request body */\n type?: ContentType;\n /** query params */\n params?: QueryParamsType;\n /** format of response (i.e. response.json() -> format: \"json\") */\n ResponseType?: ResponseType;\n /** request body */\n body?: unknown;\n}\n\nexport type RequestParams = Omit<FullRequestParams, \"body\" | \"method\" | \"query\" | \"path\">;\n\nexport interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, \"data\" | \"cancelToken\"> {\n securityWorker?: (\n securityData: SecurityDataType | null,\n ) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;\n secure?: boolean;\n ResponseType?: ResponseType;\n}\n\nexport enum ContentType {\n Json = \"application/json\",\n FormData = \"multipart/form-data\",\n UrlEncoded = \"application/x-www-form-urlencoded\",\n}\n\ninterface HttpClient {\n request: <T = any, _E = any>(config: AxiosRequestConfig) => Promise<T>;\n}\n\n/**\n * @title OSS\n * @version 1.0\n * @baseUrl http://192.168.200.12:5000\n *\n * OSS\n */\nclass Api {\n private http: HttpClient;\n\n constructor(http: HttpClient) {\n this.http = http;\n }\n\n resource = {\n /**\n * No description\n *\n * @tags resource\n * @name Upload\n * @summary 文件上传\n * @request POST:/oss/resource/upload\n * @response `200` `string` OK\n * @response `201` `void` Created\n * @response `401` `void` Unauthorized\n * @response `403` `void` Forbidden\n * @response `404` `void` Not Found\n */\n upload: (query: UploadParams, data: UploadPayload, axiosConfig: AxiosRequestConfig = {}) =>\n this.http.request<string, void>({\n url: `/oss/resource/upload`,\n method: \"POST\",\n params: query,\n data: data,\n ...axiosConfig,\n }),\n\n /**\n * No description\n *\n * @tags resource\n * @name UploadBase64\n * @summary 文件上传 - base64形式\n * @request POST:/oss/resource/upload-base64\n * @response `200` `string` OK\n * @response `201` `void` Created\n * @response `401` `void` Unauthorized\n * @response `403` `void` Forbidden\n * @response `404` `void` Not Found\n */\n uploadBase64: (data: Base64File, axiosConfig: AxiosRequestConfig = {}) =>\n this.http.request<string, void>({\n url: `/oss/resource/upload-base64`,\n method: \"POST\",\n data: data,\n ...axiosConfig,\n }),\n\n /**\n * @description format: base64/redirect-url\n *\n * @tags resource\n * @name ById\n * @summary 文件下载\n * @request GET:/oss/resource/{id}\n * @response `200` `StreamingResponseBody` OK\n * @response `401` `void` Unauthorized\n * @response `403` `void` Forbidden\n * @response `404` `void` Not Found\n */\n byId: ({ id, ...query }: ByIdParams, axiosConfig: AxiosRequestConfig = {}) =>\n this.http.request<StreamingResponseBody, void>({\n url: `/oss/resource/${id}`,\n method: \"GET\",\n params: query,\n ...axiosConfig,\n }),\n\n /**\n * No description\n *\n * @tags resource\n * @name MetaById\n * @summary 文件元信息\n * @request GET:/oss/resource/{id}/meta\n * @response `200` `FileObjectMeta` OK\n * @response `401` `void` Unauthorized\n * @response `403` `void` Forbidden\n * @response `404` `void` Not Found\n */\n metaById: (id: string, axiosConfig: AxiosRequestConfig = {}) =>\n this.http.request<FileObjectMeta, void>({\n url: `/oss/resource/${id}/meta`,\n method: \"GET\",\n ...axiosConfig,\n }),\n\n /**\n * No description\n *\n * @tags resource\n * @name ThumbnailById\n * @summary 图片缩略图\n * @request GET:/oss/resource/{id}/thumbnail\n * @response `200` `StreamingResponseBody` OK\n * @response `401` `void` Unauthorized\n * @response `403` `void` Forbidden\n * @response `404` `void` Not Found\n */\n thumbnailById: ({ id, ...query }: ThumbnailByIdParams, axiosConfig: AxiosRequestConfig = {}) =>\n this.http.request<StreamingResponseBody, void>({\n url: `/oss/resource/${id}/thumbnail`,\n method: \"GET\",\n params: query,\n ...axiosConfig,\n }),\n };\n inner = {\n /**\n * No description\n *\n * @tags inner\n * @name CreateBucket\n * @summary 创建bucket\n * @request POST:/oss/inner/create-bucket\n * @response `200` `void` OK\n * @response `201` `void` Created\n * @response `401` `void` Unauthorized\n * @response `403` `void` Forbidden\n * @response `404` `void` Not Found\n */\n createBucket: (query: CreateBucketParams, axiosConfig: AxiosRequestConfig = {}) =>\n this.http.request<void, void>({\n url: `/oss/inner/create-bucket`,\n method: \"POST\",\n params: query,\n ...axiosConfig,\n }),\n\n /**\n * No description\n *\n * @tags inner\n * @name DeleteResourceRemoveById\n * @summary 删除文件\n * @request DELETE:/oss/inner/resource/remove/{id}\n * @response `200` `void` OK\n * @response `204` `void` No Content\n * @response `401` `void` Unauthorized\n * @response `403` `void` Forbidden\n */\n deleteResourceRemoveById: (id: string, axiosConfig: AxiosRequestConfig = {}) =>\n this.http.request<void, void>({\n url: `/oss/inner/resource/remove/${id}`,\n method: \"DELETE\",\n ...axiosConfig,\n }),\n\n /**\n * No description\n *\n * @tags inner\n * @name ResourceUpload\n * @summary 文件上传\n * @request POST:/oss/inner/resource/upload\n * @response `200` `string` OK\n * @response `201` `void` Created\n * @response `401` `void` Unauthorized\n * @response `403` `void` Forbidden\n * @response `404` `void` Not Found\n */\n resourceUpload: (query: ResourceUploadParams, data: ResourceUploadPayload, axiosConfig: AxiosRequestConfig = {}) =>\n this.http.request<string, void>({\n url: `/oss/inner/resource/upload`,\n method: \"POST\",\n params: query,\n data: data,\n ...axiosConfig,\n }),\n\n /**\n * No description\n *\n * @tags inner\n * @name ResourceMetaById\n * @summary 文件元信息\n * @request GET:/oss/inner/resource/{id}/meta\n * @response `200` `FileObjectMeta` OK\n * @response `401` `void` Unauthorized\n * @response `403` `void` Forbidden\n * @response `404` `void` Not Found\n */\n resourceMetaById: (id: string, axiosConfig: AxiosRequestConfig = {}) =>\n this.http.request<FileObjectMeta, void>({\n url: `/oss/inner/resource/${id}/meta`,\n method: \"GET\",\n ...axiosConfig,\n }),\n };\n manage = {\n /**\n * No description\n *\n * @tags manage\n * @name Resource\n * @summary 列出资源\n * @request GET:/oss/manage/resource\n * @response `200` `PageResultFileObjectEntity` OK\n * @response `401` `void` Unauthorized\n * @response `403` `void` Forbidden\n * @response `404` `void` Not Found\n */\n resource: (query: ResourceParams, axiosConfig: AxiosRequestConfig = {}) =>\n this.http.request<PageResultFileObjectEntity, void>({\n url: `/oss/manage/resource`,\n method: \"GET\",\n params: query,\n ...axiosConfig,\n }),\n\n /**\n * No description\n *\n * @tags manage\n * @name DeleteResourceById\n * @summary 删除文件\n * @request DELETE:/oss/manage/resource/{id}\n * @response `200` `void` OK\n * @response `204` `void` No Content\n * @response `401` `void` Unauthorized\n * @response `403` `void` Forbidden\n */\n deleteResourceById: (id: string, axiosConfig: AxiosRequestConfig = {}) =>\n this.http.request<void, void>({\n url: `/oss/manage/resource/${id}`,\n method: \"DELETE\",\n ...axiosConfig,\n }),\n };\n}\n\nimport { httpClient } from \"./_request\";\n\nexport const ossApi = new Api(httpClient);\n"],"names":["httpClient","request","config","Error","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","ContentType","Base64File","FileObjectEntity","FileObjectMeta","PageResultFileObjectEntity","UploadParams","ByIdParams","ThumbnailByIdParams","CreateBucketParams","ResourceUploadParams","ResourceParams","ossApi","constructor","http","resource","upload","query","data","axiosConfig","this","url","method","params","uploadBase64","byId","id","metaById","thumbnailById","inner","createBucket","deleteResourceRemoveById","resourceUpload","resourceMetaById","manage","deleteResourceById"],"sourceRoot":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "szpt-driver-api",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"license": "private",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"axios": "0.27.2"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"registry": "https://registry.npmjs.org/"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"*.js",
|
|
14
|
+
"*.d.ts",
|
|
15
|
+
"*.js.map"
|
|
16
|
+
]
|
|
17
|
+
}
|