@zennify/sdk-js 1.31.0 → 1.32.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/dist/images.js CHANGED
@@ -8,9 +8,9 @@ const sources = {
8
8
  'null': null,
9
9
  'empty': ""
10
10
  };
11
- function GetImageURL(source, hash, domain = "zennify.app") {
11
+ function GetImageURL(source, hash, domain = "zennify.app", extension = ".webp") {
12
12
  if (!hash)
13
13
  return sources[source];
14
14
  else
15
- return `https://cdn.${domain}/media/${hash}`;
15
+ return `https://cdn.${domain}/media/${hash}${extension}`;
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zennify/sdk-js",
3
- "version": "1.31.0",
3
+ "version": "1.32.1",
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
@@ -17,8 +17,9 @@ const sources: Record<keyof ImageSources, ImageSources[keyof ImageSources]> = {
17
17
  export function GetImageURL<Source extends keyof ImageSources>(
18
18
  source: Source,
19
19
  hash?: string | null,
20
- domain: string = "zennify.app"
20
+ domain: string = "zennify.app",
21
+ extension = ".webp"
21
22
  ): ImageSources[Source] | string {
22
23
  if (!hash) return sources[source] as ImageSources[Source];
23
- else return `https://cdn.${domain}/media/${hash}`;
24
+ else return `https://cdn.${domain}/media/${hash}${extension}`;
24
25
  }
@@ -32,9 +32,9 @@ export interface FullStore {
32
32
  >
33
33
  >,
34
34
  discord_bot: {
35
- id: string,
36
- app_id: string | null,
35
+ id: string
37
36
  token: string | null
37
+ cluster: string | null
38
38
  },
39
39
  discord_bot_guilds: Record<string, DiscordGuild>
40
40
  }
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, hash?: string | null, domain?: string): ImageSources[Source] | string;
8
+ export declare function GetImageURL<Source extends keyof ImageSources>(source: Source, hash?: string | null, domain?: string, extension?: string): ImageSources[Source] | string;
9
9
  export {};
@@ -24,8 +24,8 @@ export interface FullStore {
24
24
  discord_channels: Record<string /** guild id */, Record<'sale' | 'voice' | 'feedback' | 'carts', string | null | void /** channel id */>>;
25
25
  discord_bot: {
26
26
  id: string;
27
- app_id: string | null;
28
27
  token: string | null;
28
+ cluster: string | null;
29
29
  };
30
30
  discord_bot_guilds: Record<string, DiscordGuild>;
31
31
  }