@zennify/sdk-js 1.0.0-beta.22 → 1.0.0-beta.24
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
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())
|
|
@@ -14,8 +14,8 @@ export interface Product {
|
|
|
14
14
|
created_at: string,
|
|
15
15
|
store_id: number,
|
|
16
16
|
owner_id: number,
|
|
17
|
-
icon_id
|
|
18
|
-
banner_id
|
|
17
|
+
icon_id?: null | number,
|
|
18
|
+
banner_id?: null | number,
|
|
19
19
|
value: number,
|
|
20
20
|
description: {
|
|
21
21
|
short: null | string,
|
|
@@ -25,11 +25,5 @@ export interface Product {
|
|
|
25
25
|
stock: {
|
|
26
26
|
size: number,
|
|
27
27
|
locked: boolean
|
|
28
|
-
},
|
|
29
|
-
statistics: {
|
|
30
|
-
revenue_total: number,
|
|
31
|
-
revenue_daily: number,
|
|
32
|
-
revenue_weekly: number,
|
|
33
|
-
revenue_monthly: number
|
|
34
28
|
}
|
|
35
29
|
}
|
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):
|
|
8
|
+
export declare function GetImageURL<Source extends keyof ImageSources>(source: Source, store_id?: number | null, id?: number | null): ImageSources[Source] | string;
|
|
9
9
|
export {};
|
|
@@ -13,8 +13,8 @@ export interface Product {
|
|
|
13
13
|
created_at: string;
|
|
14
14
|
store_id: number;
|
|
15
15
|
owner_id: number;
|
|
16
|
-
icon_id
|
|
17
|
-
banner_id
|
|
16
|
+
icon_id?: null | number;
|
|
17
|
+
banner_id?: null | number;
|
|
18
18
|
value: number;
|
|
19
19
|
description: {
|
|
20
20
|
short: null | string;
|
|
@@ -25,10 +25,4 @@ export interface Product {
|
|
|
25
25
|
size: number;
|
|
26
26
|
locked: boolean;
|
|
27
27
|
};
|
|
28
|
-
statistics: {
|
|
29
|
-
revenue_total: number;
|
|
30
|
-
revenue_daily: number;
|
|
31
|
-
revenue_weekly: number;
|
|
32
|
-
revenue_monthly: number;
|
|
33
|
-
};
|
|
34
28
|
}
|