@posx/core 5.5.15 → 5.5.17
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 +6 -11
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/package.publish.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -301,7 +301,7 @@ declare module '@posx/core/services/abstract.service' {
|
|
|
301
301
|
import { AxiosInstance } from 'axios';
|
|
302
302
|
import Dexie, { Observable } from 'dexie';
|
|
303
303
|
import { IServiceOptions } from '@posx/core/types/misc.type';
|
|
304
|
-
export type
|
|
304
|
+
export type GetManyResult<T> = {
|
|
305
305
|
list: T[];
|
|
306
306
|
count: number;
|
|
307
307
|
page: number;
|
|
@@ -341,9 +341,9 @@ declare module '@posx/core/services/abstract.service' {
|
|
|
341
341
|
/**
|
|
342
342
|
* Retrieves a single entity by its unique identifier.
|
|
343
343
|
* @param id - Unique identifier of the entity to retrieve.
|
|
344
|
-
* @returns A Promise that resolves to the retrieved entity
|
|
344
|
+
* @returns A Promise that resolves to the retrieved entity.
|
|
345
345
|
*/
|
|
346
|
-
getOne(id: string): Promise<T
|
|
346
|
+
getOne(id: string): Promise<T>;
|
|
347
347
|
/**
|
|
348
348
|
* Retrieves a single entity by its unique identifier.
|
|
349
349
|
* @param params - Filtering parameters.
|
|
@@ -372,12 +372,7 @@ declare module '@posx/core/services/abstract.service' {
|
|
|
372
372
|
getMany(params: Partial<T>, options: {
|
|
373
373
|
page?: number;
|
|
374
374
|
pageSize?: number;
|
|
375
|
-
}): Promise<
|
|
376
|
-
list: T[];
|
|
377
|
-
count: number;
|
|
378
|
-
page: number;
|
|
379
|
-
pageSize: number;
|
|
380
|
-
}>;
|
|
375
|
+
}): Promise<GetManyResult<T>>;
|
|
381
376
|
}
|
|
382
377
|
export abstract class AppCoreService<T extends IAppCoreModel> implements IAppCoreService<T> {
|
|
383
378
|
db: Dexie;
|
|
@@ -391,11 +386,11 @@ declare module '@posx/core/services/abstract.service' {
|
|
|
391
386
|
* get one by uid
|
|
392
387
|
* @param uid Primary nano id
|
|
393
388
|
*/
|
|
394
|
-
getOne(uid: string): Promise<T
|
|
389
|
+
getOne(uid: string): Promise<T>;
|
|
395
390
|
getOneByParams(params: Partial<T>): Promise<T | null>;
|
|
396
391
|
getDefaultOne(): Promise<T | undefined>;
|
|
397
392
|
getAll(): Promise<T[]>;
|
|
398
|
-
getMany(params?: Partial<T>, options?: any): Promise<
|
|
393
|
+
getMany(params?: Partial<T>, options?: any): Promise<GetManyResult<T>>;
|
|
399
394
|
}
|
|
400
395
|
export interface IAppLocalService<T extends IAppCoreModel> extends IAppCoreService<T> {
|
|
401
396
|
updateOne(id: string, item: Partial<T>): Promise<T>;
|