@freelog/tools-lib 0.1.85 → 0.1.86

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.
@@ -133,16 +133,17 @@ interface CreateVersionParamsType {
133
133
  }[];
134
134
  }
135
135
  export declare function createVersion({ resourceId, ...params }: CreateVersionParamsType): Promise<any>;
136
- interface ResourceVersionInfoParamsType1 {
136
+ interface ResourceVersionInfo1ParamsType {
137
137
  resourceId: string;
138
138
  version: string;
139
139
  projection?: string;
140
140
  }
141
- interface ResourceVersionInfoParamsType2 {
141
+ interface ResourceVersionInfo2ParamsType {
142
142
  versionId: string;
143
143
  projection?: string;
144
144
  }
145
- export declare function resourceVersionInfo(params: ResourceVersionInfoParamsType1 | ResourceVersionInfoParamsType2): Promise<any>;
145
+ export declare function resourceVersionInfo1({ resourceId, version, ...params }: ResourceVersionInfo1ParamsType): Promise<any>;
146
+ export declare function resourceVersionInfo2(params: ResourceVersionInfo2ParamsType): Promise<any>;
146
147
  interface GetResourceVersionBySha1ParamsType {
147
148
  fileSha1: string;
148
149
  projection?: string;
@@ -2082,13 +2082,14 @@ var _excluded$3 = ["resourceIdOrName"],
2082
2082
  _excluded2$3 = ["resourceId"],
2083
2083
  _excluded3$2 = ["resourceId"],
2084
2084
  _excluded4$2 = ["resourceId"],
2085
- _excluded5$2 = ["fileSha1"],
2085
+ _excluded5$2 = ["resourceId", "version"],
2086
2086
  _excluded6$1 = ["fileSha1"],
2087
- _excluded7$1 = ["resourceId"],
2087
+ _excluded7$1 = ["fileSha1"],
2088
2088
  _excluded8$1 = ["resourceId"],
2089
2089
  _excluded9$1 = ["resourceId"],
2090
2090
  _excluded10$1 = ["resourceId"],
2091
- _excluded11 = ["resourceId"];
2091
+ _excluded11 = ["resourceId"],
2092
+ _excluded12 = ["resourceId"];
2092
2093
  function create$1(params) {
2093
2094
  return FUtil.Request({
2094
2095
  method: 'POST',
@@ -2158,24 +2159,27 @@ function createVersion(_ref4) {
2158
2159
  data: params
2159
2160
  });
2160
2161
  }
2161
- function resourceVersionInfo(params) {
2162
- if (params.version) {
2163
- return FUtil.Request({
2164
- method: 'GET',
2165
- url: "/v2/resources/" + params.resourceId + "/versions/" + params.version,
2166
- params: params
2167
- });
2168
- }
2162
+ function resourceVersionInfo1(_ref5) {
2163
+ var resourceId = _ref5.resourceId,
2164
+ version = _ref5.version,
2165
+ params = _objectWithoutPropertiesLoose(_ref5, _excluded5$2);
2169
2166
 
2167
+ return FUtil.Request({
2168
+ method: 'GET',
2169
+ url: "/v2/resources/" + resourceId + "/versions/" + version,
2170
+ params: params
2171
+ });
2172
+ }
2173
+ function resourceVersionInfo2(params) {
2170
2174
  return FUtil.Request({
2171
2175
  method: 'GET',
2172
2176
  url: "/v2/resources/versions/detail",
2173
2177
  params: params
2174
2178
  });
2175
2179
  }
2176
- function getResourceVersionBySha1(_ref5) {
2177
- var fileSha1 = _ref5.fileSha1,
2178
- params = _objectWithoutPropertiesLoose(_ref5, _excluded5$2);
2180
+ function getResourceVersionBySha1(_ref6) {
2181
+ var fileSha1 = _ref6.fileSha1,
2182
+ params = _objectWithoutPropertiesLoose(_ref6, _excluded6$1);
2179
2183
 
2180
2184
  // return FUtil.Axios.get(`/v2/resources/files/${fileSha1}/versions`, {
2181
2185
  // params,
@@ -2186,9 +2190,9 @@ function getResourceVersionBySha1(_ref5) {
2186
2190
  params: params
2187
2191
  });
2188
2192
  }
2189
- function getResourceBySha1(_ref6) {
2190
- var fileSha1 = _ref6.fileSha1,
2191
- params = _objectWithoutPropertiesLoose(_ref6, _excluded6$1);
2193
+ function getResourceBySha1(_ref7) {
2194
+ var fileSha1 = _ref7.fileSha1,
2195
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
2192
2196
 
2193
2197
  // return FUtil.Axios.get(`/v2/resources/files/${fileSha1}`, {
2194
2198
  // params,
@@ -2238,9 +2242,9 @@ function resourcesDownload(params) {
2238
2242
  // responseType: 'arraybuffer',
2239
2243
  // });
2240
2244
  }
2241
- function batchGetCoverageVersions(_ref7) {
2242
- var resourceId = _ref7.resourceId,
2243
- params = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
2245
+ function batchGetCoverageVersions(_ref8) {
2246
+ var resourceId = _ref8.resourceId,
2247
+ params = _objectWithoutPropertiesLoose(_ref8, _excluded8$1);
2244
2248
 
2245
2249
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/contracts/coverageVersions`, {
2246
2250
  // params,
@@ -2258,9 +2262,9 @@ function resolveResources(params) {
2258
2262
  url: "/v2/resources/" + params.resourceId + "/resolveResources"
2259
2263
  });
2260
2264
  }
2261
- function batchSetContracts(_ref8) {
2262
- var resourceId = _ref8.resourceId,
2263
- params = _objectWithoutPropertiesLoose(_ref8, _excluded8$1);
2265
+ function batchSetContracts(_ref9) {
2266
+ var resourceId = _ref9.resourceId,
2267
+ params = _objectWithoutPropertiesLoose(_ref9, _excluded9$1);
2264
2268
 
2265
2269
  // return FUtil.Axios.put(`/v2/resources/${resourceId}/versions/batchSetContracts`, params);
2266
2270
  return FUtil.Request({
@@ -2269,9 +2273,9 @@ function batchSetContracts(_ref8) {
2269
2273
  data: params
2270
2274
  });
2271
2275
  }
2272
- function cycleDependencyCheck$1(_ref9) {
2273
- var resourceId = _ref9.resourceId,
2274
- params = _objectWithoutPropertiesLoose(_ref9, _excluded9$1);
2276
+ function cycleDependencyCheck$1(_ref10) {
2277
+ var resourceId = _ref10.resourceId,
2278
+ params = _objectWithoutPropertiesLoose(_ref10, _excluded10$1);
2275
2279
 
2276
2280
  // return FUtil.Axios.post(`/v2/resources/${resourceId}/versions/cycleDependencyCheck`, params);
2277
2281
  return FUtil.Request({
@@ -2280,9 +2284,9 @@ function cycleDependencyCheck$1(_ref9) {
2280
2284
  data: params
2281
2285
  });
2282
2286
  }
2283
- function relationTree$1(_ref10) {
2284
- var resourceId = _ref10.resourceId,
2285
- params = _objectWithoutPropertiesLoose(_ref10, _excluded10$1);
2287
+ function relationTree$1(_ref11) {
2288
+ var resourceId = _ref11.resourceId,
2289
+ params = _objectWithoutPropertiesLoose(_ref11, _excluded11);
2286
2290
 
2287
2291
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/relationTree`, {
2288
2292
  // params,
@@ -2293,9 +2297,9 @@ function relationTree$1(_ref10) {
2293
2297
  params: params
2294
2298
  });
2295
2299
  }
2296
- function relationTreeAuth(_ref11) {
2297
- var resourceId = _ref11.resourceId,
2298
- params = _objectWithoutPropertiesLoose(_ref11, _excluded11);
2300
+ function relationTreeAuth(_ref12) {
2301
+ var resourceId = _ref12.resourceId,
2302
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded12);
2299
2303
 
2300
2304
  return FUtil.Request({
2301
2305
  method: 'GET',
@@ -2303,8 +2307,8 @@ function relationTreeAuth(_ref11) {
2303
2307
  params: params
2304
2308
  });
2305
2309
  }
2306
- function batchAuth$1(_ref12) {
2307
- var params = _extends({}, _ref12);
2310
+ function batchAuth$1(_ref13) {
2311
+ var params = _extends({}, _ref13);
2308
2312
 
2309
2313
  return FUtil.Request({
2310
2314
  method: 'GET',
@@ -2323,7 +2327,8 @@ var Resource = {
2323
2327
  dependencyTree: dependencyTree$1,
2324
2328
  authTree: authTree$1,
2325
2329
  createVersion: createVersion,
2326
- resourceVersionInfo: resourceVersionInfo,
2330
+ resourceVersionInfo1: resourceVersionInfo1,
2331
+ resourceVersionInfo2: resourceVersionInfo2,
2327
2332
  getResourceVersionBySha1: getResourceVersionBySha1,
2328
2333
  getResourceBySha1: getResourceBySha1,
2329
2334
  updateResourceVersionInfo: updateResourceVersionInfo,