@zennify/sdk-js 1.0.0-beta.22 → 1.0.0-beta.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zennify/sdk-js",
3
- "version": "1.0.0-beta.22",
3
+ "version": "1.0.0-beta.23",
4
4
  "description": "A simple package to work with https://api.zennify.app",
5
5
  "main": "dist/main.js",
6
6
  "keywords": [],
package/src/images.ts CHANGED
@@ -19,7 +19,7 @@ export function GetImageURL<Source extends keyof ImageSources>(
19
19
  source: Source,
20
20
  store_id?: number | null,
21
21
  id?: number | null
22
- ) {
22
+ ): ImageSources[Source] | string {
23
23
  if (!store_id || !id) return sources[source] as ImageSources[Source];
24
24
  else return template
25
25
  .replace("{store_id}", store_id.toString())
package/types/images.d.ts CHANGED
@@ -5,5 +5,5 @@ interface ImageSources {
5
5
  product_icon: string;
6
6
  general: string;
7
7
  }
8
- export declare function GetImageURL<Source extends keyof ImageSources>(source: Source, store_id?: number | null, id?: number | null): string | ImageSources[Source];
8
+ export declare function GetImageURL<Source extends keyof ImageSources>(source: Source, store_id?: number | null, id?: number | null): ImageSources[Source] | string;
9
9
  export {};