@posx/core 5.3.80 → 5.3.82
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/build/index.d.ts +14 -1
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/package.publish.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -435,7 +435,7 @@ declare module '@posx/core/services/app.service' {
|
|
|
435
435
|
import { ISection, ISectionItem } from '@posx/core/types/section.type';
|
|
436
436
|
import { Category, ICategory, ICoreItem, IItem, ISubcategory } from '@posx/core/types/product.type';
|
|
437
437
|
import { AxiosInstance } from 'axios';
|
|
438
|
-
import { IServiceOptions } from '@posx/core/types/misc.type';
|
|
438
|
+
import { IFileUploadResponse, IServiceOptions } from '@posx/core/types/misc.type';
|
|
439
439
|
import Dexie from 'dexie';
|
|
440
440
|
import { ICoreCategory } from '@posx/core/types/product.type';
|
|
441
441
|
import { IShift, ITill } from '@posx/core/types/shift.type';
|
|
@@ -679,6 +679,12 @@ declare module '@posx/core/services/app.service' {
|
|
|
679
679
|
* @param options the value to update the config category with
|
|
680
680
|
*/
|
|
681
681
|
updateConfig(configKey: keyof IConfig, options: Partial<IConfig[typeof configKey]>): Promise<IAppConfig>;
|
|
682
|
+
/**
|
|
683
|
+
* Uploads an image to the server.
|
|
684
|
+
* @param file - The file to upload.
|
|
685
|
+
* @returns A promise that resolves with the uploaded file.
|
|
686
|
+
*/
|
|
687
|
+
uploadFile(file: File): Promise<IFileUploadResponse>;
|
|
682
688
|
}
|
|
683
689
|
export class ConfigService extends AppRemoteService<IAppConfig> implements IConfigService {
|
|
684
690
|
readonly http: AxiosInstance;
|
|
@@ -691,6 +697,7 @@ declare module '@posx/core/services/app.service' {
|
|
|
691
697
|
updateConfig<T extends keyof IConfig>(configKey: T, options: Partial<IConfig[T]>): Promise<IAppConfig>;
|
|
692
698
|
updateGeneralConfig(options: UpdateGeneralConfigOptions): Promise<IAppConfig>;
|
|
693
699
|
updateCache(partialCache: Partial<ICache>): Promise<IAppConfig>;
|
|
700
|
+
uploadFile(file: File): Promise<IFileUploadResponse>;
|
|
694
701
|
}
|
|
695
702
|
export class SectionService extends AppRemoteService<ISection> implements ISectionService {
|
|
696
703
|
readonly http: AxiosInstance;
|
|
@@ -1493,6 +1500,8 @@ declare module '@posx/core/services/invoice.service' {
|
|
|
1493
1500
|
}
|
|
1494
1501
|
declare module '@posx/core/services/misc.service' {
|
|
1495
1502
|
export function preciseRound(num: any, decimalPlaces?: number): number;
|
|
1503
|
+
export function getFileExtension(file: File): string;
|
|
1504
|
+
export function convertFileToBase64(file: File): Promise<string>;
|
|
1496
1505
|
|
|
1497
1506
|
}
|
|
1498
1507
|
declare module '@posx/core/services/ods.service' {
|
|
@@ -2960,6 +2969,10 @@ declare module '@posx/core/types/misc.type' {
|
|
|
2960
2969
|
outdatedSourceSectionItem = "outdated source section item",
|
|
2961
2970
|
outdatedTargetSectionItem = "outdated target section item"
|
|
2962
2971
|
}
|
|
2972
|
+
export interface IFileUploadResponse {
|
|
2973
|
+
file_url: string;
|
|
2974
|
+
thumbnail_url: string;
|
|
2975
|
+
}
|
|
2963
2976
|
|
|
2964
2977
|
}
|
|
2965
2978
|
declare module '@posx/core/types/note.type' {
|