@etsoo/appscript 1.4.69 → 1.4.71

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.
Files changed (64) hide show
  1. package/lib/cjs/app/CoreApp.d.ts +1 -2
  2. package/lib/cjs/app/IApp.d.ts +1 -2
  3. package/lib/cjs/business/BusinessUtils.d.ts +2 -2
  4. package/lib/cjs/business/ShoppingCart.d.ts +2 -2
  5. package/lib/cjs/erp/AuthApi.d.ts +1 -1
  6. package/lib/cjs/erp/EntityApi.d.ts +11 -12
  7. package/lib/cjs/erp/OrgApi.d.ts +2 -2
  8. package/lib/cjs/erp/dto/IdLabelPrimaryDto.d.ts +2 -2
  9. package/lib/cjs/erp/dto/PublicProductDto.d.ts +2 -2
  10. package/lib/cjs/erp/dto/ResultPayload.d.ts +1 -1
  11. package/lib/cjs/erp/rq/LoginRQ.d.ts +2 -2
  12. package/lib/cjs/erp/rq/MergeRQ.d.ts +2 -2
  13. package/lib/cjs/erp/rq/QueryRQ.d.ts +2 -2
  14. package/lib/cjs/erp/rq/TiplistRQ.d.ts +2 -2
  15. package/lib/cjs/erp/rq/UpdateStatusRQ.d.ts +2 -2
  16. package/lib/cjs/index.d.ts +0 -1
  17. package/lib/cjs/index.js +0 -1
  18. package/lib/cjs/result/ActionResult.d.ts +1 -1
  19. package/lib/cjs/result/ActionResultError.d.ts +1 -1
  20. package/lib/cjs/result/InitCallResult.d.ts +1 -1
  21. package/lib/mjs/app/CoreApp.d.ts +1 -2
  22. package/lib/mjs/app/IApp.d.ts +1 -2
  23. package/lib/mjs/business/BusinessUtils.d.ts +2 -2
  24. package/lib/mjs/business/ShoppingCart.d.ts +2 -2
  25. package/lib/mjs/erp/AuthApi.d.ts +1 -1
  26. package/lib/mjs/erp/EntityApi.d.ts +11 -12
  27. package/lib/mjs/erp/OrgApi.d.ts +2 -2
  28. package/lib/mjs/erp/dto/IdLabelPrimaryDto.d.ts +2 -2
  29. package/lib/mjs/erp/dto/PublicProductDto.d.ts +2 -2
  30. package/lib/mjs/erp/dto/ResultPayload.d.ts +1 -1
  31. package/lib/mjs/erp/rq/LoginRQ.d.ts +2 -2
  32. package/lib/mjs/erp/rq/MergeRQ.d.ts +2 -2
  33. package/lib/mjs/erp/rq/QueryRQ.d.ts +2 -2
  34. package/lib/mjs/erp/rq/TiplistRQ.d.ts +2 -2
  35. package/lib/mjs/erp/rq/UpdateStatusRQ.d.ts +2 -2
  36. package/lib/mjs/index.d.ts +0 -1
  37. package/lib/mjs/index.js +0 -1
  38. package/lib/mjs/result/ActionResult.d.ts +1 -1
  39. package/lib/mjs/result/ActionResultError.d.ts +1 -1
  40. package/lib/mjs/result/InitCallResult.d.ts +1 -1
  41. package/package.json +4 -4
  42. package/src/app/CoreApp.ts +1 -1
  43. package/src/app/IApp.ts +1 -1
  44. package/src/business/BusinessUtils.ts +2 -2
  45. package/src/business/ShoppingCart.ts +8 -2
  46. package/src/erp/AuthApi.ts +1 -1
  47. package/src/erp/EntityApi.ts +14 -18
  48. package/src/erp/dto/IdLabelPrimaryDto.ts +2 -2
  49. package/src/erp/dto/PublicProductDto.ts +2 -2
  50. package/src/erp/dto/ResultPayload.ts +1 -1
  51. package/src/erp/rq/LoginRQ.ts +2 -2
  52. package/src/erp/rq/MergeRQ.ts +2 -2
  53. package/src/erp/rq/QueryRQ.ts +2 -2
  54. package/src/erp/rq/TiplistRQ.ts +2 -2
  55. package/src/erp/rq/UpdateStatusRQ.ts +2 -2
  56. package/src/index.ts +0 -1
  57. package/src/result/ActionResult.ts +1 -1
  58. package/src/result/ActionResultError.ts +1 -1
  59. package/src/result/InitCallResult.ts +1 -1
  60. package/lib/cjs/result/IActionResult.d.ts +0 -59
  61. package/lib/cjs/result/IActionResult.js +0 -2
  62. package/lib/mjs/result/IActionResult.d.ts +0 -59
  63. package/lib/mjs/result/IActionResult.js +0 -1
  64. package/src/result/IActionResult.ts +0 -72
@@ -1,10 +1,9 @@
1
1
  import { INotifier, NotificationAlign, NotificationCallProps, NotificationContent, NotificationReturn } from '@etsoo/notificationbase';
2
2
  import { ApiDataError, IApi, IPData } from '@etsoo/restclient';
3
- import { DataTypes, DateUtils, IStorage, ListType, ListType1 } from '@etsoo/shared';
3
+ import { DataTypes, DateUtils, IActionResult, IStorage, ListType, ListType1 } from '@etsoo/shared';
4
4
  import { AddressRegion } from '../address/AddressRegion';
5
5
  import { EntityStatus } from '../business/EntityStatus';
6
6
  import { InitCallDto } from '../erp/dto/InitCallDto';
7
- import { IActionResult } from '../result/IActionResult';
8
7
  import { InitCallResult, InitCallResultData } from '../result/InitCallResult';
9
8
  import { IUser } from '../state/User';
10
9
  import { IAppSettings } from './AppSettings';
@@ -1,8 +1,7 @@
1
1
  import { INotifier, NotificationAlign, NotificationCallProps, NotificationContent, NotificationReturn } from '@etsoo/notificationbase';
2
2
  import { ApiDataError, IApi, IPData } from '@etsoo/restclient';
3
- import { DataTypes, DateUtils, IStorage, ListType, ListType1 } from '@etsoo/shared';
3
+ import { DataTypes, DateUtils, IActionResult, IStorage, ListType, ListType1 } from '@etsoo/shared';
4
4
  import { AddressRegion } from '../address/AddressRegion';
5
- import { IActionResult } from '../result/IActionResult';
6
5
  import { IUser } from '../state/User';
7
6
  import { IAppSettings } from './AppSettings';
8
7
  import { UserRole } from './UserRole';
@@ -1,4 +1,4 @@
1
- import { DataTypes, ListType, ListType1 } from '@etsoo/shared';
1
+ import { IdType, ListType, ListType1 } from '@etsoo/shared';
2
2
  import { CultureGridItem } from './CultureItem';
3
3
  /**
4
4
  * Business utils
@@ -35,5 +35,5 @@ export declare namespace BusinessUtils {
35
35
  function setIdValue<T extends {
36
36
  id?: number;
37
37
  sid?: string;
38
- }>(item: T, id?: DataTypes.IdType): void;
38
+ }>(item: T, id?: IdType): void;
39
39
  }
@@ -1,4 +1,4 @@
1
- import { DataTypes, IStorage } from '@etsoo/shared';
1
+ import { DataTypes, IStorage, IdType } from '@etsoo/shared';
2
2
  import { Currency } from './Currency';
3
3
  /**
4
4
  * Shopping cart owner
@@ -51,7 +51,7 @@ export type ShoppingCartItemBase = {
51
51
  * Product id
52
52
  * 产品编号
53
53
  */
54
- id: DataTypes.IdType;
54
+ id: IdType;
55
55
  /**
56
56
  * Product title, default is name
57
57
  * 产品标题,默认为name
@@ -1,10 +1,10 @@
1
1
  import { IApiPayload } from '@etsoo/restclient';
2
- import { IActionResult } from '../result/IActionResult';
3
2
  import { IUser } from '../state/User';
4
3
  import { BaseApi } from './BaseApi';
5
4
  import { ResultPayload } from './dto/ResultPayload';
6
5
  import { LoginRQ } from './rq/LoginRQ';
7
6
  import { ResetPasswordRQ } from './rq/ResetPasswordRQ';
7
+ import { IActionResult } from '@etsoo/shared';
8
8
  /**
9
9
  * Authentication API
10
10
  */
@@ -1,7 +1,6 @@
1
1
  import { IApi, IApiPayload } from '@etsoo/restclient';
2
- import { DataTypes } from '@etsoo/shared';
2
+ import { IActionResult, IdType } from '@etsoo/shared';
3
3
  import { IApp } from '../app/IApp';
4
- import { IActionResult } from '../result/IActionResult';
5
4
  import { BaseApi } from './BaseApi';
6
5
  import { AuditLinePayload } from './dto/AuditLineDto';
7
6
  import { ResultPayload } from './dto/ResultPayload';
@@ -33,22 +32,22 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
33
32
  * @param id Id or ids
34
33
  * @param payload Payload
35
34
  */
36
- protected deleteBase<R extends IActionResult>(id: DataTypes.IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
37
- protected deleteBase<R extends IActionResult>(ids: DataTypes.IdType[], payload?: IApiPayload<R>): Promise<R | undefined>;
35
+ protected deleteBase<R extends IActionResult>(id: IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
36
+ protected deleteBase<R extends IActionResult>(ids: IdType[], payload?: IApiPayload<R>): Promise<R | undefined>;
38
37
  /**
39
38
  * List
40
39
  * @param rq Request data
41
40
  * @param payload Payload
42
41
  * @returns Result
43
42
  */
44
- protected listBase<T extends DataTypes.IdType, RQ extends TiplistRQ<T>, R extends object>(rq: RQ, payload?: IApiPayload<R[]>): Promise<R[] | undefined>;
43
+ protected listBase<T extends IdType, RQ extends TiplistRQ<T>, R extends object>(rq: RQ, payload?: IApiPayload<R[]>): Promise<R[] | undefined>;
45
44
  /**
46
45
  * Merge
47
46
  * @param rq Request data
48
47
  * @param payload Payload
49
48
  * @returns Result
50
49
  */
51
- protected mergeBase<T extends DataTypes.IdType = number>(rq: MergeRQ<T>, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
50
+ protected mergeBase<T extends IdType = number>(rq: MergeRQ<T>, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
52
51
  /**
53
52
  * Query
54
53
  * @param rq Request data
@@ -56,14 +55,14 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
56
55
  * @param queryKey Additional query key
57
56
  * @returns Result
58
57
  */
59
- protected queryBase<T extends DataTypes.IdType, RQ extends QueryRQ<T>, R extends object>(rq: RQ, payload?: IApiPayload<R[]>, queryKey?: string): Promise<R[] | undefined>;
58
+ protected queryBase<T extends IdType, RQ extends QueryRQ<T>, R extends object>(rq: RQ, payload?: IApiPayload<R[]>, queryKey?: string): Promise<R[] | undefined>;
60
59
  /**
61
60
  * Query audit history
62
61
  * @param rq Request data
63
62
  * @param payload Payload
64
63
  * @returns Result
65
64
  */
66
- protected queryAuditBase<T extends DataTypes.IdType, R extends QueryRQ<T>>(rq: R, payload?: AuditLinePayload): Promise<import("./dto/AuditLineDto").AuditLineDto[] | undefined>;
65
+ protected queryAuditBase<T extends IdType, R extends QueryRQ<T>>(rq: R, payload?: AuditLinePayload): Promise<import("./dto/AuditLineDto").AuditLineDto[] | undefined>;
67
66
  /**
68
67
  * Query favored country ids
69
68
  * @returns Result
@@ -75,7 +74,7 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
75
74
  * @param payload Payload
76
75
  * @returns Result
77
76
  */
78
- protected readBase<R extends object>(id: DataTypes.IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
77
+ protected readBase<R extends object>(id: IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
79
78
  /**
80
79
  * Sort
81
80
  * @param items Items to sort
@@ -83,7 +82,7 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
83
82
  * @returns Result
84
83
  */
85
84
  protected sortBase<RQ extends {
86
- id: DataTypes.IdType;
85
+ id: IdType;
87
86
  }>(items: RQ[], payload?: IApiPayload<number>): Promise<number | undefined>;
88
87
  /**
89
88
  * Sort with category
@@ -94,7 +93,7 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
94
93
  * @returns Result
95
94
  */
96
95
  protected sortWith<RQ extends {
97
- id: DataTypes.IdType;
96
+ id: IdType;
98
97
  }>(category: number, items: RQ[], method?: string, payload?: IApiPayload<number>): Promise<number | undefined>;
99
98
  /**
100
99
  * Update
@@ -109,7 +108,7 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
109
108
  * @param payload Payload
110
109
  * @returns Result
111
110
  */
112
- protected updateReadBase<R extends object>(id: DataTypes.IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
111
+ protected updateReadBase<R extends object>(id: IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
113
112
  /**
114
113
  * Update status
115
114
  * @param rq Request data
@@ -25,7 +25,7 @@ export declare class OrgApi extends EntityApi {
25
25
  * @param payload Payload
26
26
  * @returns Result
27
27
  */
28
- checkApiService(api: ApiService, payload?: StringIdResultPayload): Promise<import("..").IdActionResult<string> | undefined>;
28
+ checkApiService(api: ApiService, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
29
29
  /**
30
30
  * Get organization list
31
31
  * @param items Max items or request data
@@ -70,7 +70,7 @@ export declare class OrgApi extends EntityApi {
70
70
  * @param payload Payload
71
71
  * @returns Result
72
72
  */
73
- update(data: DataTypes.AddOrEditType<OrgDto, true>, payload?: IdResultPayload): Promise<import("..").IdActionResult | undefined>;
73
+ update(data: DataTypes.AddOrEditType<OrgDto, true>, payload?: IdResultPayload): Promise<import("@etsoo/shared").IdActionResult | undefined>;
74
74
  /**
75
75
  * Read for update
76
76
  * @param id Id
@@ -1,8 +1,8 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { DataTypes, IdType } from '@etsoo/shared';
2
2
  /**
3
3
  * Dto with id, label and primary field
4
4
  */
5
- export type IdLabelPrimaryDto<T extends DataTypes.IdType = number> = DataTypes.IdLabelItem<T> & {
5
+ export type IdLabelPrimaryDto<T extends IdType = number> = DataTypes.IdLabelItem<T> & {
6
6
  /**
7
7
  * Is primary
8
8
  */
@@ -1,4 +1,4 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  import { EntityStatus } from '../../business/EntityStatus';
3
3
  /**
4
4
  * Public product data
@@ -23,7 +23,7 @@ export type PublicProductDto = {
23
23
  /**
24
24
  * Query id for service Id / service Uid
25
25
  */
26
- queryId?: DataTypes.IdType;
26
+ queryId?: IdType;
27
27
  };
28
28
  /**
29
29
  * Public product with organization data
@@ -1,5 +1,5 @@
1
1
  import { IApiPayload } from '@etsoo/restclient';
2
- import { IActionResult, IdActionResult } from '../../result/IActionResult';
2
+ import { IActionResult, IdActionResult } from '@etsoo/shared';
3
3
  /**
4
4
  * Action result payload
5
5
  */
@@ -1,4 +1,4 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  import { LoginIdRQ } from './LoginIdRQ';
3
3
  /**
4
4
  * Login request data
@@ -19,5 +19,5 @@ export type LoginRQ = LoginIdRQ & {
19
19
  /**
20
20
  * Service id or uid
21
21
  */
22
- serviceId?: DataTypes.IdType;
22
+ serviceId?: IdType;
23
23
  };
@@ -1,8 +1,8 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  /**
3
3
  * Merge request data
4
4
  */
5
- export type MergeRQ<T extends DataTypes.IdType = number> = {
5
+ export type MergeRQ<T extends IdType = number> = {
6
6
  /**
7
7
  * Source id
8
8
  */
@@ -1,9 +1,9 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  /**
3
3
  * Query request data
4
4
  * com.etsoo.CoreFramework.Models.QueryRQ
5
5
  */
6
- export type QueryRQ<T extends DataTypes.IdType = number> = {
6
+ export type QueryRQ<T extends IdType = number> = {
7
7
  /**
8
8
  * Number id
9
9
  */
@@ -1,9 +1,9 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  /**
3
3
  * Tiplist request data
4
4
  * com.etsoo.CoreFramework.Models.TiplistRQ
5
5
  */
6
- export type TiplistRQ<T extends DataTypes.IdType = number> = {
6
+ export type TiplistRQ<T extends IdType = number> = {
7
7
  /**
8
8
  * number id
9
9
  */
@@ -1,4 +1,4 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  import { EntityStatus } from '../../business/EntityStatus';
3
3
  /**
4
4
  * Update status request data
@@ -7,7 +7,7 @@ export type UpdateStatusRQ = {
7
7
  /**
8
8
  * Id
9
9
  */
10
- id: DataTypes.IdType;
10
+ id: IdType;
11
11
  /**
12
12
  * New status
13
13
  */
@@ -71,7 +71,6 @@ export { ApiAuthorizationScheme, ApiMethod, ApiResponseType, createClient, creat
71
71
  export type { IApi, IApiPayload } from '@etsoo/restclient';
72
72
  export * from './result/ActionResult';
73
73
  export * from './result/ActionResultError';
74
- export * from './result/IActionResult';
75
74
  export * from './result/InitCallResult';
76
75
  export * from './state/Culture';
77
76
  export * from './state/State';
package/lib/cjs/index.js CHANGED
@@ -103,7 +103,6 @@ Object.defineProperty(exports, "createClientAsync", { enumerable: true, get: fun
103
103
  // result
104
104
  __exportStar(require("./result/ActionResult"), exports);
105
105
  __exportStar(require("./result/ActionResultError"), exports);
106
- __exportStar(require("./result/IActionResult"), exports);
107
106
  __exportStar(require("./result/InitCallResult"), exports);
108
107
  // state
109
108
  __exportStar(require("./state/Culture"), exports);
@@ -1,4 +1,4 @@
1
- import { IActionResult } from './IActionResult';
1
+ import { IActionResult } from '@etsoo/shared';
2
2
  /**
3
3
  * Action result
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IActionResult } from './IActionResult';
1
+ import { IActionResult } from '@etsoo/shared';
2
2
  /**
3
3
  * Action result error
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IActionResult } from './IActionResult';
1
+ import { IActionResult } from '@etsoo/shared';
2
2
  /**
3
3
  * Init call result data
4
4
  */
@@ -1,10 +1,9 @@
1
1
  import { INotifier, NotificationAlign, NotificationCallProps, NotificationContent, NotificationReturn } from '@etsoo/notificationbase';
2
2
  import { ApiDataError, IApi, IPData } from '@etsoo/restclient';
3
- import { DataTypes, DateUtils, IStorage, ListType, ListType1 } from '@etsoo/shared';
3
+ import { DataTypes, DateUtils, IActionResult, IStorage, ListType, ListType1 } from '@etsoo/shared';
4
4
  import { AddressRegion } from '../address/AddressRegion';
5
5
  import { EntityStatus } from '../business/EntityStatus';
6
6
  import { InitCallDto } from '../erp/dto/InitCallDto';
7
- import { IActionResult } from '../result/IActionResult';
8
7
  import { InitCallResult, InitCallResultData } from '../result/InitCallResult';
9
8
  import { IUser } from '../state/User';
10
9
  import { IAppSettings } from './AppSettings';
@@ -1,8 +1,7 @@
1
1
  import { INotifier, NotificationAlign, NotificationCallProps, NotificationContent, NotificationReturn } from '@etsoo/notificationbase';
2
2
  import { ApiDataError, IApi, IPData } from '@etsoo/restclient';
3
- import { DataTypes, DateUtils, IStorage, ListType, ListType1 } from '@etsoo/shared';
3
+ import { DataTypes, DateUtils, IActionResult, IStorage, ListType, ListType1 } from '@etsoo/shared';
4
4
  import { AddressRegion } from '../address/AddressRegion';
5
- import { IActionResult } from '../result/IActionResult';
6
5
  import { IUser } from '../state/User';
7
6
  import { IAppSettings } from './AppSettings';
8
7
  import { UserRole } from './UserRole';
@@ -1,4 +1,4 @@
1
- import { DataTypes, ListType, ListType1 } from '@etsoo/shared';
1
+ import { IdType, ListType, ListType1 } from '@etsoo/shared';
2
2
  import { CultureGridItem } from './CultureItem';
3
3
  /**
4
4
  * Business utils
@@ -35,5 +35,5 @@ export declare namespace BusinessUtils {
35
35
  function setIdValue<T extends {
36
36
  id?: number;
37
37
  sid?: string;
38
- }>(item: T, id?: DataTypes.IdType): void;
38
+ }>(item: T, id?: IdType): void;
39
39
  }
@@ -1,4 +1,4 @@
1
- import { DataTypes, IStorage } from '@etsoo/shared';
1
+ import { DataTypes, IStorage, IdType } from '@etsoo/shared';
2
2
  import { Currency } from './Currency';
3
3
  /**
4
4
  * Shopping cart owner
@@ -51,7 +51,7 @@ export type ShoppingCartItemBase = {
51
51
  * Product id
52
52
  * 产品编号
53
53
  */
54
- id: DataTypes.IdType;
54
+ id: IdType;
55
55
  /**
56
56
  * Product title, default is name
57
57
  * 产品标题,默认为name
@@ -1,10 +1,10 @@
1
1
  import { IApiPayload } from '@etsoo/restclient';
2
- import { IActionResult } from '../result/IActionResult';
3
2
  import { IUser } from '../state/User';
4
3
  import { BaseApi } from './BaseApi';
5
4
  import { ResultPayload } from './dto/ResultPayload';
6
5
  import { LoginRQ } from './rq/LoginRQ';
7
6
  import { ResetPasswordRQ } from './rq/ResetPasswordRQ';
7
+ import { IActionResult } from '@etsoo/shared';
8
8
  /**
9
9
  * Authentication API
10
10
  */
@@ -1,7 +1,6 @@
1
1
  import { IApi, IApiPayload } from '@etsoo/restclient';
2
- import { DataTypes } from '@etsoo/shared';
2
+ import { IActionResult, IdType } from '@etsoo/shared';
3
3
  import { IApp } from '../app/IApp';
4
- import { IActionResult } from '../result/IActionResult';
5
4
  import { BaseApi } from './BaseApi';
6
5
  import { AuditLinePayload } from './dto/AuditLineDto';
7
6
  import { ResultPayload } from './dto/ResultPayload';
@@ -33,22 +32,22 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
33
32
  * @param id Id or ids
34
33
  * @param payload Payload
35
34
  */
36
- protected deleteBase<R extends IActionResult>(id: DataTypes.IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
37
- protected deleteBase<R extends IActionResult>(ids: DataTypes.IdType[], payload?: IApiPayload<R>): Promise<R | undefined>;
35
+ protected deleteBase<R extends IActionResult>(id: IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
36
+ protected deleteBase<R extends IActionResult>(ids: IdType[], payload?: IApiPayload<R>): Promise<R | undefined>;
38
37
  /**
39
38
  * List
40
39
  * @param rq Request data
41
40
  * @param payload Payload
42
41
  * @returns Result
43
42
  */
44
- protected listBase<T extends DataTypes.IdType, RQ extends TiplistRQ<T>, R extends object>(rq: RQ, payload?: IApiPayload<R[]>): Promise<R[] | undefined>;
43
+ protected listBase<T extends IdType, RQ extends TiplistRQ<T>, R extends object>(rq: RQ, payload?: IApiPayload<R[]>): Promise<R[] | undefined>;
45
44
  /**
46
45
  * Merge
47
46
  * @param rq Request data
48
47
  * @param payload Payload
49
48
  * @returns Result
50
49
  */
51
- protected mergeBase<T extends DataTypes.IdType = number>(rq: MergeRQ<T>, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
50
+ protected mergeBase<T extends IdType = number>(rq: MergeRQ<T>, payload?: ResultPayload): Promise<IActionResult<{}> | undefined>;
52
51
  /**
53
52
  * Query
54
53
  * @param rq Request data
@@ -56,14 +55,14 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
56
55
  * @param queryKey Additional query key
57
56
  * @returns Result
58
57
  */
59
- protected queryBase<T extends DataTypes.IdType, RQ extends QueryRQ<T>, R extends object>(rq: RQ, payload?: IApiPayload<R[]>, queryKey?: string): Promise<R[] | undefined>;
58
+ protected queryBase<T extends IdType, RQ extends QueryRQ<T>, R extends object>(rq: RQ, payload?: IApiPayload<R[]>, queryKey?: string): Promise<R[] | undefined>;
60
59
  /**
61
60
  * Query audit history
62
61
  * @param rq Request data
63
62
  * @param payload Payload
64
63
  * @returns Result
65
64
  */
66
- protected queryAuditBase<T extends DataTypes.IdType, R extends QueryRQ<T>>(rq: R, payload?: AuditLinePayload): Promise<import("./dto/AuditLineDto").AuditLineDto[] | undefined>;
65
+ protected queryAuditBase<T extends IdType, R extends QueryRQ<T>>(rq: R, payload?: AuditLinePayload): Promise<import("./dto/AuditLineDto").AuditLineDto[] | undefined>;
67
66
  /**
68
67
  * Query favored country ids
69
68
  * @returns Result
@@ -75,7 +74,7 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
75
74
  * @param payload Payload
76
75
  * @returns Result
77
76
  */
78
- protected readBase<R extends object>(id: DataTypes.IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
77
+ protected readBase<R extends object>(id: IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
79
78
  /**
80
79
  * Sort
81
80
  * @param items Items to sort
@@ -83,7 +82,7 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
83
82
  * @returns Result
84
83
  */
85
84
  protected sortBase<RQ extends {
86
- id: DataTypes.IdType;
85
+ id: IdType;
87
86
  }>(items: RQ[], payload?: IApiPayload<number>): Promise<number | undefined>;
88
87
  /**
89
88
  * Sort with category
@@ -94,7 +93,7 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
94
93
  * @returns Result
95
94
  */
96
95
  protected sortWith<RQ extends {
97
- id: DataTypes.IdType;
96
+ id: IdType;
98
97
  }>(category: number, items: RQ[], method?: string, payload?: IApiPayload<number>): Promise<number | undefined>;
99
98
  /**
100
99
  * Update
@@ -109,7 +108,7 @@ export declare class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
109
108
  * @param payload Payload
110
109
  * @returns Result
111
110
  */
112
- protected updateReadBase<R extends object>(id: DataTypes.IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
111
+ protected updateReadBase<R extends object>(id: IdType, payload?: IApiPayload<R>): Promise<R | undefined>;
113
112
  /**
114
113
  * Update status
115
114
  * @param rq Request data
@@ -25,7 +25,7 @@ export declare class OrgApi extends EntityApi {
25
25
  * @param payload Payload
26
26
  * @returns Result
27
27
  */
28
- checkApiService(api: ApiService, payload?: StringIdResultPayload): Promise<import("..").IdActionResult<string> | undefined>;
28
+ checkApiService(api: ApiService, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
29
29
  /**
30
30
  * Get organization list
31
31
  * @param items Max items or request data
@@ -70,7 +70,7 @@ export declare class OrgApi extends EntityApi {
70
70
  * @param payload Payload
71
71
  * @returns Result
72
72
  */
73
- update(data: DataTypes.AddOrEditType<OrgDto, true>, payload?: IdResultPayload): Promise<import("..").IdActionResult | undefined>;
73
+ update(data: DataTypes.AddOrEditType<OrgDto, true>, payload?: IdResultPayload): Promise<import("@etsoo/shared").IdActionResult | undefined>;
74
74
  /**
75
75
  * Read for update
76
76
  * @param id Id
@@ -1,8 +1,8 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { DataTypes, IdType } from '@etsoo/shared';
2
2
  /**
3
3
  * Dto with id, label and primary field
4
4
  */
5
- export type IdLabelPrimaryDto<T extends DataTypes.IdType = number> = DataTypes.IdLabelItem<T> & {
5
+ export type IdLabelPrimaryDto<T extends IdType = number> = DataTypes.IdLabelItem<T> & {
6
6
  /**
7
7
  * Is primary
8
8
  */
@@ -1,4 +1,4 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  import { EntityStatus } from '../../business/EntityStatus';
3
3
  /**
4
4
  * Public product data
@@ -23,7 +23,7 @@ export type PublicProductDto = {
23
23
  /**
24
24
  * Query id for service Id / service Uid
25
25
  */
26
- queryId?: DataTypes.IdType;
26
+ queryId?: IdType;
27
27
  };
28
28
  /**
29
29
  * Public product with organization data
@@ -1,5 +1,5 @@
1
1
  import { IApiPayload } from '@etsoo/restclient';
2
- import { IActionResult, IdActionResult } from '../../result/IActionResult';
2
+ import { IActionResult, IdActionResult } from '@etsoo/shared';
3
3
  /**
4
4
  * Action result payload
5
5
  */
@@ -1,4 +1,4 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  import { LoginIdRQ } from './LoginIdRQ';
3
3
  /**
4
4
  * Login request data
@@ -19,5 +19,5 @@ export type LoginRQ = LoginIdRQ & {
19
19
  /**
20
20
  * Service id or uid
21
21
  */
22
- serviceId?: DataTypes.IdType;
22
+ serviceId?: IdType;
23
23
  };
@@ -1,8 +1,8 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  /**
3
3
  * Merge request data
4
4
  */
5
- export type MergeRQ<T extends DataTypes.IdType = number> = {
5
+ export type MergeRQ<T extends IdType = number> = {
6
6
  /**
7
7
  * Source id
8
8
  */
@@ -1,9 +1,9 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  /**
3
3
  * Query request data
4
4
  * com.etsoo.CoreFramework.Models.QueryRQ
5
5
  */
6
- export type QueryRQ<T extends DataTypes.IdType = number> = {
6
+ export type QueryRQ<T extends IdType = number> = {
7
7
  /**
8
8
  * Number id
9
9
  */
@@ -1,9 +1,9 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  /**
3
3
  * Tiplist request data
4
4
  * com.etsoo.CoreFramework.Models.TiplistRQ
5
5
  */
6
- export type TiplistRQ<T extends DataTypes.IdType = number> = {
6
+ export type TiplistRQ<T extends IdType = number> = {
7
7
  /**
8
8
  * number id
9
9
  */
@@ -1,4 +1,4 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  import { EntityStatus } from '../../business/EntityStatus';
3
3
  /**
4
4
  * Update status request data
@@ -7,7 +7,7 @@ export type UpdateStatusRQ = {
7
7
  /**
8
8
  * Id
9
9
  */
10
- id: DataTypes.IdType;
10
+ id: IdType;
11
11
  /**
12
12
  * New status
13
13
  */
@@ -71,7 +71,6 @@ export { ApiAuthorizationScheme, ApiMethod, ApiResponseType, createClient, creat
71
71
  export type { IApi, IApiPayload } from '@etsoo/restclient';
72
72
  export * from './result/ActionResult';
73
73
  export * from './result/ActionResultError';
74
- export * from './result/IActionResult';
75
74
  export * from './result/InitCallResult';
76
75
  export * from './state/Culture';
77
76
  export * from './state/State';
package/lib/mjs/index.js CHANGED
@@ -81,7 +81,6 @@ export { ApiAuthorizationScheme, ApiMethod, ApiResponseType, createClient, creat
81
81
  // result
82
82
  export * from './result/ActionResult';
83
83
  export * from './result/ActionResultError';
84
- export * from './result/IActionResult';
85
84
  export * from './result/InitCallResult';
86
85
  // state
87
86
  export * from './state/Culture';
@@ -1,4 +1,4 @@
1
- import { IActionResult } from './IActionResult';
1
+ import { IActionResult } from '@etsoo/shared';
2
2
  /**
3
3
  * Action result
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IActionResult } from './IActionResult';
1
+ import { IActionResult } from '@etsoo/shared';
2
2
  /**
3
3
  * Action result error
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IActionResult } from './IActionResult';
1
+ import { IActionResult } from '@etsoo/shared';
2
2
  /**
3
3
  * Init call result data
4
4
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.4.69",
3
+ "version": "1.4.71",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -52,9 +52,9 @@
52
52
  },
53
53
  "homepage": "https://github.com/ETSOO/AppScript#readme",
54
54
  "dependencies": {
55
- "@etsoo/notificationbase": "^1.1.30",
56
- "@etsoo/restclient": "^1.0.93",
57
- "@etsoo/shared": "^1.2.19",
55
+ "@etsoo/notificationbase": "^1.1.31",
56
+ "@etsoo/restclient": "^1.0.94",
57
+ "@etsoo/shared": "^1.2.21",
58
58
  "crypto-js": "^4.2.0"
59
59
  },
60
60
  "devDependencies": {
@@ -12,6 +12,7 @@ import {
12
12
  DataTypes,
13
13
  DateUtils,
14
14
  DomUtils,
15
+ IActionResult,
15
16
  IStorage,
16
17
  ListType,
17
18
  ListType1,
@@ -24,7 +25,6 @@ import { DataPrivacy } from '../business/DataPrivacy';
24
25
  import { EntityStatus } from '../business/EntityStatus';
25
26
  import { InitCallDto } from '../erp/dto/InitCallDto';
26
27
  import { ActionResultError } from '../result/ActionResultError';
27
- import { IActionResult } from '../result/IActionResult';
28
28
  import { InitCallResult, InitCallResultData } from '../result/InitCallResult';
29
29
  import { IUser } from '../state/User';
30
30
  import { IAppSettings } from './AppSettings';
package/src/app/IApp.ts CHANGED
@@ -9,12 +9,12 @@ import { ApiDataError, IApi, IPData } from '@etsoo/restclient';
9
9
  import {
10
10
  DataTypes,
11
11
  DateUtils,
12
+ IActionResult,
12
13
  IStorage,
13
14
  ListType,
14
15
  ListType1
15
16
  } from '@etsoo/shared';
16
17
  import { AddressRegion } from '../address/AddressRegion';
17
- import { IActionResult } from '../result/IActionResult';
18
18
  import { IUser } from '../state/User';
19
19
  import { IAppSettings } from './AppSettings';
20
20
  import { UserRole } from './UserRole';
@@ -1,4 +1,4 @@
1
- import { DataTypes, ListType, ListType1 } from '@etsoo/shared';
1
+ import { IdType, ListType, ListType1 } from '@etsoo/shared';
2
2
  import { CultureGridItem } from './CultureItem';
3
3
 
4
4
  /**
@@ -102,7 +102,7 @@ export namespace BusinessUtils {
102
102
  */
103
103
  export function setIdValue<T extends { id?: number; sid?: string }>(
104
104
  item: T,
105
- id?: DataTypes.IdType
105
+ id?: IdType
106
106
  ) {
107
107
  if (id == null) return;
108
108
  if (typeof id === 'number') item.id = id;
@@ -1,4 +1,10 @@
1
- import { DataTypes, IStorage, NumberUtils, WindowStorage } from '@etsoo/shared';
1
+ import {
2
+ DataTypes,
3
+ IStorage,
4
+ IdType,
5
+ NumberUtils,
6
+ WindowStorage
7
+ } from '@etsoo/shared';
2
8
  import { Currency } from './Currency';
3
9
 
4
10
  /**
@@ -57,7 +63,7 @@ export type ShoppingCartItemBase = {
57
63
  * Product id
58
64
  * 产品编号
59
65
  */
60
- id: DataTypes.IdType;
66
+ id: IdType;
61
67
 
62
68
  /**
63
69
  * Product title, default is name
@@ -1,11 +1,11 @@
1
1
  import { IApiPayload } from '@etsoo/restclient';
2
- import { IActionResult } from '../result/IActionResult';
3
2
  import { IUser } from '../state/User';
4
3
  import { BaseApi } from './BaseApi';
5
4
  import { ResultPayload } from './dto/ResultPayload';
6
5
  import { LoginIdRQ } from './rq/LoginIdRQ';
7
6
  import { LoginRQ } from './rq/LoginRQ';
8
7
  import { ResetPasswordRQ } from './rq/ResetPasswordRQ';
8
+ import { IActionResult } from '@etsoo/shared';
9
9
 
10
10
  /**
11
11
  * Authentication API
@@ -1,7 +1,6 @@
1
1
  import { IApi, IApiPayload } from '@etsoo/restclient';
2
- import { DataTypes } from '@etsoo/shared';
2
+ import { IActionResult, IdType } from '@etsoo/shared';
3
3
  import { IApp } from '../app/IApp';
4
- import { IActionResult } from '../result/IActionResult';
5
4
  import { BaseApi } from './BaseApi';
6
5
  import { AuditLinePayload } from './dto/AuditLineDto';
7
6
  import { ResultPayload } from './dto/ResultPayload';
@@ -43,15 +42,15 @@ export class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
43
42
  * @param payload Payload
44
43
  */
45
44
  protected deleteBase<R extends IActionResult>(
46
- id: DataTypes.IdType,
45
+ id: IdType,
47
46
  payload?: IApiPayload<R>
48
47
  ): Promise<R | undefined>;
49
48
  protected deleteBase<R extends IActionResult>(
50
- ids: DataTypes.IdType[],
49
+ ids: IdType[],
51
50
  payload?: IApiPayload<R>
52
51
  ): Promise<R | undefined>;
53
52
  protected deleteBase<R extends IActionResult>(
54
- id: DataTypes.IdType | DataTypes.IdType[],
53
+ id: IdType | IdType[],
55
54
  payload?: IApiPayload<R>
56
55
  ) {
57
56
  const query = Array.isArray(id)
@@ -71,7 +70,7 @@ export class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
71
70
  * @returns Result
72
71
  */
73
72
  protected listBase<
74
- T extends DataTypes.IdType,
73
+ T extends IdType,
75
74
  RQ extends TiplistRQ<T>,
76
75
  R extends object
77
76
  >(rq: RQ, payload?: IApiPayload<R[]>) {
@@ -84,7 +83,7 @@ export class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
84
83
  * @param payload Payload
85
84
  * @returns Result
86
85
  */
87
- protected mergeBase<T extends DataTypes.IdType = number>(
86
+ protected mergeBase<T extends IdType = number>(
88
87
  rq: MergeRQ<T>,
89
88
  payload?: ResultPayload
90
89
  ) {
@@ -99,7 +98,7 @@ export class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
99
98
  * @returns Result
100
99
  */
101
100
  protected queryBase<
102
- T extends DataTypes.IdType,
101
+ T extends IdType,
103
102
  RQ extends QueryRQ<T>,
104
103
  R extends object
105
104
  >(rq: RQ, payload?: IApiPayload<R[]>, queryKey: string = '') {
@@ -112,7 +111,7 @@ export class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
112
111
  * @param payload Payload
113
112
  * @returns Result
114
113
  */
115
- protected queryAuditBase<T extends DataTypes.IdType, R extends QueryRQ<T>>(
114
+ protected queryAuditBase<T extends IdType, R extends QueryRQ<T>>(
116
115
  rq: R,
117
116
  payload?: AuditLinePayload
118
117
  ) {
@@ -138,10 +137,7 @@ export class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
138
137
  * @param payload Payload
139
138
  * @returns Result
140
139
  */
141
- protected readBase<R extends object>(
142
- id: DataTypes.IdType,
143
- payload?: IApiPayload<R>
144
- ) {
140
+ protected readBase<R extends object>(id: IdType, payload?: IApiPayload<R>) {
145
141
  return this.api.get(`${this.flag}/Read/${id}`, undefined, payload);
146
142
  }
147
143
 
@@ -151,11 +147,11 @@ export class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
151
147
  * @param payload Payload
152
148
  * @returns Result
153
149
  */
154
- protected sortBase<RQ extends { id: DataTypes.IdType }>(
150
+ protected sortBase<RQ extends { id: IdType }>(
155
151
  items: RQ[],
156
152
  payload?: IApiPayload<number>
157
153
  ) {
158
- const rq: Record<DataTypes.IdType, number> = {};
154
+ const rq: Record<IdType, number> = {};
159
155
  items.forEach((item, index) => (rq[item.id] = index));
160
156
  return this.api.put(`${this.flag}/Sort`, rq, payload);
161
157
  }
@@ -168,13 +164,13 @@ export class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
168
164
  * @param payload Payload
169
165
  * @returns Result
170
166
  */
171
- protected sortWith<RQ extends { id: DataTypes.IdType }>(
167
+ protected sortWith<RQ extends { id: IdType }>(
172
168
  category: number,
173
169
  items: RQ[],
174
170
  method: string = 'Sort',
175
171
  payload?: IApiPayload<number>
176
172
  ) {
177
- const data: Record<DataTypes.IdType, number> = {};
173
+ const data: Record<IdType, number> = {};
178
174
  items.forEach((item, index) => (data[item.id] = index));
179
175
  return this.api.put(
180
176
  `${this.flag}/${method}`,
@@ -203,7 +199,7 @@ export class EntityApi<T extends IApp = IApp> extends BaseApi<T> {
203
199
  * @returns Result
204
200
  */
205
201
  protected updateReadBase<R extends object>(
206
- id: DataTypes.IdType,
202
+ id: IdType,
207
203
  payload?: IApiPayload<R>
208
204
  ) {
209
205
  return this.api.get(
@@ -1,9 +1,9 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { DataTypes, IdType } from '@etsoo/shared';
2
2
 
3
3
  /**
4
4
  * Dto with id, label and primary field
5
5
  */
6
- export type IdLabelPrimaryDto<T extends DataTypes.IdType = number> =
6
+ export type IdLabelPrimaryDto<T extends IdType = number> =
7
7
  DataTypes.IdLabelItem<T> & {
8
8
  /**
9
9
  * Is primary
@@ -1,4 +1,4 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  import { EntityStatus } from '../../business/EntityStatus';
3
3
 
4
4
  /**
@@ -28,7 +28,7 @@ export type PublicProductDto = {
28
28
  /**
29
29
  * Query id for service Id / service Uid
30
30
  */
31
- queryId?: DataTypes.IdType;
31
+ queryId?: IdType;
32
32
  };
33
33
 
34
34
  /**
@@ -1,5 +1,5 @@
1
1
  import { IApiPayload } from '@etsoo/restclient';
2
- import { IActionResult, IdActionResult } from '../../result/IActionResult';
2
+ import { IActionResult, IdActionResult } from '@etsoo/shared';
3
3
 
4
4
  /**
5
5
  * Action result payload
@@ -1,4 +1,4 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  import { LoginIdRQ } from './LoginIdRQ';
3
3
 
4
4
  /**
@@ -23,5 +23,5 @@ export type LoginRQ = LoginIdRQ & {
23
23
  /**
24
24
  * Service id or uid
25
25
  */
26
- serviceId?: DataTypes.IdType;
26
+ serviceId?: IdType;
27
27
  };
@@ -1,9 +1,9 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
 
3
3
  /**
4
4
  * Merge request data
5
5
  */
6
- export type MergeRQ<T extends DataTypes.IdType = number> = {
6
+ export type MergeRQ<T extends IdType = number> = {
7
7
  /**
8
8
  * Source id
9
9
  */
@@ -1,10 +1,10 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
 
3
3
  /**
4
4
  * Query request data
5
5
  * com.etsoo.CoreFramework.Models.QueryRQ
6
6
  */
7
- export type QueryRQ<T extends DataTypes.IdType = number> = {
7
+ export type QueryRQ<T extends IdType = number> = {
8
8
  /**
9
9
  * Number id
10
10
  */
@@ -1,10 +1,10 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
 
3
3
  /**
4
4
  * Tiplist request data
5
5
  * com.etsoo.CoreFramework.Models.TiplistRQ
6
6
  */
7
- export type TiplistRQ<T extends DataTypes.IdType = number> = {
7
+ export type TiplistRQ<T extends IdType = number> = {
8
8
  /**
9
9
  * number id
10
10
  */
@@ -1,4 +1,4 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { IdType } from '@etsoo/shared';
2
2
  import { EntityStatus } from '../../business/EntityStatus';
3
3
 
4
4
  /**
@@ -8,7 +8,7 @@ export type UpdateStatusRQ = {
8
8
  /**
9
9
  * Id
10
10
  */
11
- id: DataTypes.IdType;
11
+ id: IdType;
12
12
 
13
13
  /**
14
14
  * New status
package/src/index.ts CHANGED
@@ -98,7 +98,6 @@ export type { IApi, IApiPayload } from '@etsoo/restclient';
98
98
  // result
99
99
  export * from './result/ActionResult';
100
100
  export * from './result/ActionResultError';
101
- export * from './result/IActionResult';
102
101
  export * from './result/InitCallResult';
103
102
 
104
103
  // state
@@ -1,5 +1,5 @@
1
1
  import { ApiError } from '@etsoo/restclient';
2
- import { IActionResult } from './IActionResult';
2
+ import { IActionResult } from '@etsoo/shared';
3
3
 
4
4
  /**
5
5
  * Action result
@@ -1,4 +1,4 @@
1
- import { IActionResult } from './IActionResult';
1
+ import { IActionResult } from '@etsoo/shared';
2
2
 
3
3
  /**
4
4
  * Action result error
@@ -1,4 +1,4 @@
1
- import { IActionResult } from './IActionResult';
1
+ import { IActionResult } from '@etsoo/shared';
2
2
 
3
3
  /**
4
4
  * Init call result data
@@ -1,59 +0,0 @@
1
- import { DataTypes } from '@etsoo/shared';
2
- /**
3
- * Result errors
4
- * Indexable type
5
- */
6
- export interface IResultErrors {
7
- readonly [key: string]: string[];
8
- }
9
- /**
10
- * Operation result interface
11
- */
12
- export interface IActionResult<D extends object = {}> {
13
- /**
14
- * Status code
15
- */
16
- readonly status?: number;
17
- /**
18
- * Result data
19
- */
20
- readonly data?: D;
21
- /**
22
- * Result errors
23
- */
24
- readonly errors?: IResultErrors;
25
- /**
26
- * Title
27
- */
28
- title?: string;
29
- /**
30
- * Detail
31
- */
32
- detail?: string;
33
- /**
34
- * Trace id
35
- */
36
- traceId?: string;
37
- /**
38
- * Type
39
- */
40
- type?: string;
41
- /**
42
- * Field name
43
- */
44
- field?: string;
45
- /**
46
- * Success or not
47
- */
48
- readonly ok: boolean;
49
- }
50
- /**
51
- * Action result with id data
52
- */
53
- export type IdActionResult<T extends DataTypes.IdType = number> = IActionResult<{
54
- id: T;
55
- }>;
56
- /**
57
- * Action result with dynamic data
58
- */
59
- export type DynamicActionResult = IActionResult<Record<string, any>>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,59 +0,0 @@
1
- import { DataTypes } from '@etsoo/shared';
2
- /**
3
- * Result errors
4
- * Indexable type
5
- */
6
- export interface IResultErrors {
7
- readonly [key: string]: string[];
8
- }
9
- /**
10
- * Operation result interface
11
- */
12
- export interface IActionResult<D extends object = {}> {
13
- /**
14
- * Status code
15
- */
16
- readonly status?: number;
17
- /**
18
- * Result data
19
- */
20
- readonly data?: D;
21
- /**
22
- * Result errors
23
- */
24
- readonly errors?: IResultErrors;
25
- /**
26
- * Title
27
- */
28
- title?: string;
29
- /**
30
- * Detail
31
- */
32
- detail?: string;
33
- /**
34
- * Trace id
35
- */
36
- traceId?: string;
37
- /**
38
- * Type
39
- */
40
- type?: string;
41
- /**
42
- * Field name
43
- */
44
- field?: string;
45
- /**
46
- * Success or not
47
- */
48
- readonly ok: boolean;
49
- }
50
- /**
51
- * Action result with id data
52
- */
53
- export type IdActionResult<T extends DataTypes.IdType = number> = IActionResult<{
54
- id: T;
55
- }>;
56
- /**
57
- * Action result with dynamic data
58
- */
59
- export type DynamicActionResult = IActionResult<Record<string, any>>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,72 +0,0 @@
1
- import { DataTypes } from '@etsoo/shared';
2
-
3
- /**
4
- * Result errors
5
- * Indexable type
6
- */
7
- export interface IResultErrors {
8
- readonly [key: string]: string[];
9
- }
10
-
11
- /**
12
- * Operation result interface
13
- */
14
- export interface IActionResult<D extends object = {}> {
15
- /**
16
- * Status code
17
- */
18
- readonly status?: number;
19
-
20
- /**
21
- * Result data
22
- */
23
- readonly data?: D;
24
-
25
- /**
26
- * Result errors
27
- */
28
- readonly errors?: IResultErrors;
29
-
30
- /**
31
- * Title
32
- */
33
- title?: string;
34
-
35
- /**
36
- * Detail
37
- */
38
- detail?: string;
39
-
40
- /**
41
- * Trace id
42
- */
43
- traceId?: string;
44
-
45
- /**
46
- * Type
47
- */
48
- type?: string;
49
-
50
- /**
51
- * Field name
52
- */
53
- field?: string;
54
-
55
- /**
56
- * Success or not
57
- */
58
- readonly ok: boolean;
59
- }
60
-
61
- /**
62
- * Action result with id data
63
- */
64
- export type IdActionResult<T extends DataTypes.IdType = number> =
65
- IActionResult<{
66
- id: T;
67
- }>;
68
-
69
- /**
70
- * Action result with dynamic data
71
- */
72
- export type DynamicActionResult = IActionResult<Record<string, any>>;