jourycms-sdk 1.0.5 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,7 @@ export default class UtilsClient extends BaseClient {
9
9
  height?: number;
10
10
  ratio?: "square" | "4/3" | "16/9" | "21/9";
11
11
  }): string;
12
+ getImageBlurredUrl(id: string, format?: 'jpg' | 'webp'): string;
12
13
  getFileUrl(id: string): string;
13
14
  getStoredFileContent(id: string, config?: SDK.TRequestConfig, responseType?: ResponseType): Promise<any>;
14
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.client.d.ts","sourceRoot":"","sources":["../../../../src/containers/storage/clients/utils.client.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAIhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;gBACrC,SAAS,EAAE,GAAG,CAAC,iBAAiB;IAK5C,cAAc,CAAC,IAAI,EAAE,GAAG;IASjB,WAAW,CAChB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;KAC5C,GACA,MAAM;IASF,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAKxB,oBAAoB,CAC/B,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,EAC3B,YAAY,GAAE,YAAqB,GAClC,OAAO,CAAC,GAAG,CAAC;CAYhB"}
1
+ {"version":3,"file":"utils.client.d.ts","sourceRoot":"","sources":["../../../../src/containers/storage/clients/utils.client.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAIhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;gBACrC,SAAS,EAAE,GAAG,CAAC,iBAAiB;IAK5C,cAAc,CAAC,IAAI,EAAE,GAAG;IASjB,WAAW,CAChB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;KAC5C,GACA,MAAM;IAQF,kBAAkB,CACvB,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GACtB,MAAM;IAMF,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAKxB,oBAAoB,CAC/B,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,EAC3B,YAAY,GAAE,YAAqB,GAClC,OAAO,CAAC,GAAG,CAAC;CAYhB"}
@@ -24,7 +24,12 @@ class UtilsClient extends base_client_1.default {
24
24
  url += `/${options?.height}`;
25
25
  if (options?.ratio)
26
26
  url += `/?ratio=${options?.ratio}`;
27
- // console.log('STORAGE IMAGE URL', url)
27
+ return url;
28
+ }
29
+ getImageBlurredUrl(id, format) {
30
+ let url = `${this.container.sdk.config.baseURL}${this.container.prefix}/images/${id}/blurred`;
31
+ if (format)
32
+ url += `/${format}`;
28
33
  return url;
29
34
  }
30
35
  getFileUrl(id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jourycms-sdk",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Sdk for Joury CMS",
5
5
  "main": "dist/index.js",
6
6
  "files": [