@zennify/sdk-js 1.0.0-beta.20 → 1.0.0-beta.21

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/images.js CHANGED
@@ -4,7 +4,10 @@ exports.GetImageURL = GetImageURL;
4
4
  const template = `https://cdn.zennify.app/media/{store_id}/{id}.png`;
5
5
  const sources = {
6
6
  'product_icon': `https://zennify.app/assets/images/emojis/caixa.png`,
7
- 'general': `https://zennify.app/assets/images/icon.png`
7
+ 'general': `https://zennify.app/assets/images/icon.png`,
8
+ 'void': void 0,
9
+ 'null': null,
10
+ 'empty': ""
8
11
  };
9
12
  function GetImageURL(source, store_id, id) {
10
13
  if (!store_id || !id)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zennify/sdk-js",
3
- "version": "1.0.0-beta.20",
3
+ "version": "1.0.0-beta.21",
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
@@ -1,9 +1,12 @@
1
- type ImageSources = 'product_icon' | 'general'
1
+ type ImageSources = 'void' | 'null' | 'empty' | 'product_icon' | 'general'
2
2
 
3
3
  const template = `https://cdn.zennify.app/media/{store_id}/{id}.png`
4
- const sources: Record<ImageSources, string> = {
4
+ const sources: Record<ImageSources, string | void | null> = {
5
5
  'product_icon': `https://zennify.app/assets/images/emojis/caixa.png`,
6
- 'general': `https://zennify.app/assets/images/icon.png`
6
+ 'general': `https://zennify.app/assets/images/icon.png`,
7
+ 'void': void 0,
8
+ 'null': null,
9
+ 'empty': ""
7
10
  }
8
11
 
9
12
  export function GetImageURL(source: ImageSources, store_id?: number | null, id?: number | null) {
package/types/images.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- type ImageSources = 'product_icon' | 'general';
2
- export declare function GetImageURL(source: ImageSources, store_id?: number | null, id?: number | null): string;
1
+ type ImageSources = 'void' | 'null' | 'empty' | 'product_icon' | 'general';
2
+ export declare function GetImageURL(source: ImageSources, store_id?: number | null, id?: number | null): string | void | null;
3
3
  export {};