@fctc/interface-logic 1.3.2 → 1.3.4
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/hooks.d.mts +4 -15
- package/dist/hooks.d.ts +4 -15
- package/dist/hooks.js +12 -10
- package/dist/hooks.mjs +12 -10
- package/dist/provider.js +2 -2
- package/dist/provider.mjs +2 -2
- package/dist/services.d.mts +3 -16
- package/dist/services.d.ts +3 -16
- package/dist/services.js +7 -6
- package/dist/services.mjs +7 -6
- package/dist/types.d.mts +17 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.js +18 -0
- package/dist/types.mjs +0 -0
- package/dist/{api-type-cZ3zwGsZ.d.mts → view-type-BGJfDe73.d.mts} +28 -1
- package/dist/{api-type-cZ3zwGsZ.d.ts → view-type-BGJfDe73.d.ts} +28 -1
- package/package.json +6 -1
package/dist/hooks.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { L as LoginCredentialBody,
|
|
2
|
+
import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType, f as GetViewParams } from './view-type-BGJfDe73.mjs';
|
|
3
3
|
|
|
4
4
|
declare const useForgotPassword: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
|
|
5
5
|
|
|
@@ -166,6 +166,7 @@ interface BaseModelInit {
|
|
|
166
166
|
actContext?: Record<string, any>;
|
|
167
167
|
fields?: any;
|
|
168
168
|
}
|
|
169
|
+
|
|
169
170
|
declare class BaseModel {
|
|
170
171
|
name: string;
|
|
171
172
|
view: Record<string, any>;
|
|
@@ -202,9 +203,10 @@ declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error,
|
|
|
202
203
|
data: any;
|
|
203
204
|
specification?: any;
|
|
204
205
|
context: any;
|
|
206
|
+
path?: string;
|
|
205
207
|
}, unknown>;
|
|
206
208
|
|
|
207
|
-
declare const useGetProfile: () => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
209
|
+
declare const useGetProfile: (path?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
208
210
|
|
|
209
211
|
declare const useGetUser: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
210
212
|
id: any;
|
|
@@ -269,19 +271,6 @@ declare const useGetSelection: ({ data, queryKey, enabled, }: {
|
|
|
269
271
|
enabled?: boolean;
|
|
270
272
|
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
271
273
|
|
|
272
|
-
type View = [number | boolean, string];
|
|
273
|
-
type Option = {
|
|
274
|
-
action_id?: number;
|
|
275
|
-
load_filters?: boolean;
|
|
276
|
-
toolbar?: boolean;
|
|
277
|
-
};
|
|
278
|
-
interface GetViewParams {
|
|
279
|
-
model?: string;
|
|
280
|
-
views?: View[];
|
|
281
|
-
context?: Record<string, any>;
|
|
282
|
-
options?: Option;
|
|
283
|
-
aid?: number | string | null | boolean;
|
|
284
|
-
}
|
|
285
274
|
declare const useGetView: (viewParams: GetViewParams, actData?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
286
275
|
|
|
287
276
|
declare const useLoadAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { L as LoginCredentialBody,
|
|
2
|
+
import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType, f as GetViewParams } from './view-type-BGJfDe73.js';
|
|
3
3
|
|
|
4
4
|
declare const useForgotPassword: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
|
|
5
5
|
|
|
@@ -166,6 +166,7 @@ interface BaseModelInit {
|
|
|
166
166
|
actContext?: Record<string, any>;
|
|
167
167
|
fields?: any;
|
|
168
168
|
}
|
|
169
|
+
|
|
169
170
|
declare class BaseModel {
|
|
170
171
|
name: string;
|
|
171
172
|
view: Record<string, any>;
|
|
@@ -202,9 +203,10 @@ declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error,
|
|
|
202
203
|
data: any;
|
|
203
204
|
specification?: any;
|
|
204
205
|
context: any;
|
|
206
|
+
path?: string;
|
|
205
207
|
}, unknown>;
|
|
206
208
|
|
|
207
|
-
declare const useGetProfile: () => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
209
|
+
declare const useGetProfile: (path?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
208
210
|
|
|
209
211
|
declare const useGetUser: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
210
212
|
id: any;
|
|
@@ -269,19 +271,6 @@ declare const useGetSelection: ({ data, queryKey, enabled, }: {
|
|
|
269
271
|
enabled?: boolean;
|
|
270
272
|
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
271
273
|
|
|
272
|
-
type View = [number | boolean, string];
|
|
273
|
-
type Option = {
|
|
274
|
-
action_id?: number;
|
|
275
|
-
load_filters?: boolean;
|
|
276
|
-
toolbar?: boolean;
|
|
277
|
-
};
|
|
278
|
-
interface GetViewParams {
|
|
279
|
-
model?: string;
|
|
280
|
-
views?: View[];
|
|
281
|
-
context?: Record<string, any>;
|
|
282
|
-
options?: Option;
|
|
283
|
-
aid?: number | string | null | boolean;
|
|
284
|
-
}
|
|
285
274
|
declare const useGetView: (viewParams: GetViewParams, actData?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
286
275
|
|
|
287
276
|
declare const useLoadAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
package/dist/hooks.js
CHANGED
|
@@ -4095,7 +4095,8 @@ var ModelService = {
|
|
|
4095
4095
|
ids = [],
|
|
4096
4096
|
data = {},
|
|
4097
4097
|
specification = {},
|
|
4098
|
-
context = {}
|
|
4098
|
+
context = {},
|
|
4099
|
+
path
|
|
4099
4100
|
}) {
|
|
4100
4101
|
const env2 = getEnv();
|
|
4101
4102
|
const jsonData = {
|
|
@@ -4108,7 +4109,7 @@ var ModelService = {
|
|
|
4108
4109
|
specification
|
|
4109
4110
|
}
|
|
4110
4111
|
};
|
|
4111
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4112
|
+
return env2?.requests?.post(path ?? "/call" /* CALL_PATH */, jsonData, {
|
|
4112
4113
|
headers: {
|
|
4113
4114
|
"Content-Type": "application/json"
|
|
4114
4115
|
}
|
|
@@ -4226,9 +4227,9 @@ var model_service_default = ModelService;
|
|
|
4226
4227
|
|
|
4227
4228
|
// src/services/user-service/index.ts
|
|
4228
4229
|
var UserService = {
|
|
4229
|
-
async getProfile() {
|
|
4230
|
+
async getProfile(path) {
|
|
4230
4231
|
const env2 = getEnv();
|
|
4231
|
-
return env2.requests.get("/userinfo" /* PROFILE_PATH */, {
|
|
4232
|
+
return env2.requests.get(path ?? "/userinfo" /* PROFILE_PATH */, {
|
|
4232
4233
|
headers: {
|
|
4233
4234
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
4234
4235
|
}
|
|
@@ -4610,10 +4611,10 @@ var ViewService = {
|
|
|
4610
4611
|
});
|
|
4611
4612
|
const url = `${path}?${params.toString()}`;
|
|
4612
4613
|
return env2?.requests.get(url, {
|
|
4613
|
-
credentials: "include",
|
|
4614
4614
|
headers: {
|
|
4615
4615
|
"Content-Type": "application/json"
|
|
4616
|
-
}
|
|
4616
|
+
},
|
|
4617
|
+
withCredentials: true
|
|
4617
4618
|
});
|
|
4618
4619
|
},
|
|
4619
4620
|
async grantAccess({
|
|
@@ -5427,17 +5428,18 @@ var useSave = () => {
|
|
|
5427
5428
|
model,
|
|
5428
5429
|
data,
|
|
5429
5430
|
specification,
|
|
5430
|
-
context
|
|
5431
|
-
|
|
5431
|
+
context,
|
|
5432
|
+
path
|
|
5433
|
+
}) => model_service_default.save({ ids, model, data, specification, context, path })
|
|
5432
5434
|
});
|
|
5433
5435
|
};
|
|
5434
5436
|
var use_save_default = useSave;
|
|
5435
5437
|
|
|
5436
5438
|
// src/hooks/user/use-get-profile.ts
|
|
5437
5439
|
var import_react_query38 = require("@tanstack/react-query");
|
|
5438
|
-
var useGetProfile = () => {
|
|
5440
|
+
var useGetProfile = (path) => {
|
|
5439
5441
|
return (0, import_react_query38.useMutation)({
|
|
5440
|
-
mutationFn: () => user_service_default.getProfile()
|
|
5442
|
+
mutationFn: () => user_service_default.getProfile(path)
|
|
5441
5443
|
});
|
|
5442
5444
|
};
|
|
5443
5445
|
var use_get_profile_default = useGetProfile;
|
package/dist/hooks.mjs
CHANGED
|
@@ -3992,7 +3992,8 @@ var ModelService = {
|
|
|
3992
3992
|
ids = [],
|
|
3993
3993
|
data = {},
|
|
3994
3994
|
specification = {},
|
|
3995
|
-
context = {}
|
|
3995
|
+
context = {},
|
|
3996
|
+
path
|
|
3996
3997
|
}) {
|
|
3997
3998
|
const env2 = getEnv();
|
|
3998
3999
|
const jsonData = {
|
|
@@ -4005,7 +4006,7 @@ var ModelService = {
|
|
|
4005
4006
|
specification
|
|
4006
4007
|
}
|
|
4007
4008
|
};
|
|
4008
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4009
|
+
return env2?.requests?.post(path ?? "/call" /* CALL_PATH */, jsonData, {
|
|
4009
4010
|
headers: {
|
|
4010
4011
|
"Content-Type": "application/json"
|
|
4011
4012
|
}
|
|
@@ -4123,9 +4124,9 @@ var model_service_default = ModelService;
|
|
|
4123
4124
|
|
|
4124
4125
|
// src/services/user-service/index.ts
|
|
4125
4126
|
var UserService = {
|
|
4126
|
-
async getProfile() {
|
|
4127
|
+
async getProfile(path) {
|
|
4127
4128
|
const env2 = getEnv();
|
|
4128
|
-
return env2.requests.get("/userinfo" /* PROFILE_PATH */, {
|
|
4129
|
+
return env2.requests.get(path ?? "/userinfo" /* PROFILE_PATH */, {
|
|
4129
4130
|
headers: {
|
|
4130
4131
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
4131
4132
|
}
|
|
@@ -4507,10 +4508,10 @@ var ViewService = {
|
|
|
4507
4508
|
});
|
|
4508
4509
|
const url = `${path}?${params.toString()}`;
|
|
4509
4510
|
return env2?.requests.get(url, {
|
|
4510
|
-
credentials: "include",
|
|
4511
4511
|
headers: {
|
|
4512
4512
|
"Content-Type": "application/json"
|
|
4513
|
-
}
|
|
4513
|
+
},
|
|
4514
|
+
withCredentials: true
|
|
4514
4515
|
});
|
|
4515
4516
|
},
|
|
4516
4517
|
async grantAccess({
|
|
@@ -5324,17 +5325,18 @@ var useSave = () => {
|
|
|
5324
5325
|
model,
|
|
5325
5326
|
data,
|
|
5326
5327
|
specification,
|
|
5327
|
-
context
|
|
5328
|
-
|
|
5328
|
+
context,
|
|
5329
|
+
path
|
|
5330
|
+
}) => model_service_default.save({ ids, model, data, specification, context, path })
|
|
5329
5331
|
});
|
|
5330
5332
|
};
|
|
5331
5333
|
var use_save_default = useSave;
|
|
5332
5334
|
|
|
5333
5335
|
// src/hooks/user/use-get-profile.ts
|
|
5334
5336
|
import { useMutation as useMutation28 } from "@tanstack/react-query";
|
|
5335
|
-
var useGetProfile = () => {
|
|
5337
|
+
var useGetProfile = (path) => {
|
|
5336
5338
|
return useMutation28({
|
|
5337
|
-
mutationFn: () => user_service_default.getProfile()
|
|
5339
|
+
mutationFn: () => user_service_default.getProfile(path)
|
|
5338
5340
|
});
|
|
5339
5341
|
};
|
|
5340
5342
|
var use_get_profile_default = useGetProfile;
|
package/dist/provider.js
CHANGED
|
@@ -3439,10 +3439,10 @@ var ViewService = {
|
|
|
3439
3439
|
});
|
|
3440
3440
|
const url = `${path}?${params.toString()}`;
|
|
3441
3441
|
return env2?.requests.get(url, {
|
|
3442
|
-
credentials: "include",
|
|
3443
3442
|
headers: {
|
|
3444
3443
|
"Content-Type": "application/json"
|
|
3445
|
-
}
|
|
3444
|
+
},
|
|
3445
|
+
withCredentials: true
|
|
3446
3446
|
});
|
|
3447
3447
|
},
|
|
3448
3448
|
async grantAccess({
|
package/dist/provider.mjs
CHANGED
|
@@ -3401,10 +3401,10 @@ var ViewService = {
|
|
|
3401
3401
|
});
|
|
3402
3402
|
const url = `${path}?${params.toString()}`;
|
|
3403
3403
|
return env2?.requests.get(url, {
|
|
3404
|
-
credentials: "include",
|
|
3405
3404
|
headers: {
|
|
3406
3405
|
"Content-Type": "application/json"
|
|
3407
|
-
}
|
|
3406
|
+
},
|
|
3407
|
+
withCredentials: true
|
|
3408
3408
|
});
|
|
3409
3409
|
},
|
|
3410
3410
|
async grantAccess({
|
package/dist/services.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest,
|
|
1
|
+
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-BGJfDe73.mjs';
|
|
2
2
|
|
|
3
3
|
declare const ActionService: {
|
|
4
4
|
loadAction({ idAction, context, }: {
|
|
@@ -168,7 +168,7 @@ declare const ModelService: {
|
|
|
168
168
|
}): Promise<any>;
|
|
169
169
|
getList({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams): Promise<any>;
|
|
170
170
|
getDetail({ ids, model, specification, context, }: GetDetailParams): Promise<any>;
|
|
171
|
-
save({ model, ids, data, specification, context, }: SaveParams): Promise<any>;
|
|
171
|
+
save({ model, ids, data, specification, context, path, }: SaveParams): Promise<any>;
|
|
172
172
|
delete({ ids, model }: DeleteParams): Promise<any>;
|
|
173
173
|
onChange({ ids, model, object, specification, context, fieldChange, }: OnChangeParams): Promise<any>;
|
|
174
174
|
getListFieldsOnchange({ model }: {
|
|
@@ -179,7 +179,7 @@ declare const ModelService: {
|
|
|
179
179
|
};
|
|
180
180
|
|
|
181
181
|
declare const UserService: {
|
|
182
|
-
getProfile(): Promise<any>;
|
|
182
|
+
getProfile(path?: string): Promise<any>;
|
|
183
183
|
getUser({ context, id }: {
|
|
184
184
|
context: any;
|
|
185
185
|
id: any;
|
|
@@ -187,19 +187,6 @@ declare const UserService: {
|
|
|
187
187
|
switchUserLocale: ({ id, values }: any) => Promise<any>;
|
|
188
188
|
};
|
|
189
189
|
|
|
190
|
-
type View = [number | boolean, string];
|
|
191
|
-
type Option = {
|
|
192
|
-
action_id?: number;
|
|
193
|
-
load_filters?: boolean;
|
|
194
|
-
toolbar?: boolean;
|
|
195
|
-
};
|
|
196
|
-
interface GetViewParams {
|
|
197
|
-
model?: string;
|
|
198
|
-
views?: View[];
|
|
199
|
-
context?: Record<string, any>;
|
|
200
|
-
options?: Option;
|
|
201
|
-
aid?: number | string | null | boolean;
|
|
202
|
-
}
|
|
203
190
|
declare const ViewService: {
|
|
204
191
|
getView({ model, views, context, options, aid, }: GetViewParams): Promise<any>;
|
|
205
192
|
getMenu(context: any): Promise<any>;
|
package/dist/services.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest,
|
|
1
|
+
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-BGJfDe73.js';
|
|
2
2
|
|
|
3
3
|
declare const ActionService: {
|
|
4
4
|
loadAction({ idAction, context, }: {
|
|
@@ -168,7 +168,7 @@ declare const ModelService: {
|
|
|
168
168
|
}): Promise<any>;
|
|
169
169
|
getList({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams): Promise<any>;
|
|
170
170
|
getDetail({ ids, model, specification, context, }: GetDetailParams): Promise<any>;
|
|
171
|
-
save({ model, ids, data, specification, context, }: SaveParams): Promise<any>;
|
|
171
|
+
save({ model, ids, data, specification, context, path, }: SaveParams): Promise<any>;
|
|
172
172
|
delete({ ids, model }: DeleteParams): Promise<any>;
|
|
173
173
|
onChange({ ids, model, object, specification, context, fieldChange, }: OnChangeParams): Promise<any>;
|
|
174
174
|
getListFieldsOnchange({ model }: {
|
|
@@ -179,7 +179,7 @@ declare const ModelService: {
|
|
|
179
179
|
};
|
|
180
180
|
|
|
181
181
|
declare const UserService: {
|
|
182
|
-
getProfile(): Promise<any>;
|
|
182
|
+
getProfile(path?: string): Promise<any>;
|
|
183
183
|
getUser({ context, id }: {
|
|
184
184
|
context: any;
|
|
185
185
|
id: any;
|
|
@@ -187,19 +187,6 @@ declare const UserService: {
|
|
|
187
187
|
switchUserLocale: ({ id, values }: any) => Promise<any>;
|
|
188
188
|
};
|
|
189
189
|
|
|
190
|
-
type View = [number | boolean, string];
|
|
191
|
-
type Option = {
|
|
192
|
-
action_id?: number;
|
|
193
|
-
load_filters?: boolean;
|
|
194
|
-
toolbar?: boolean;
|
|
195
|
-
};
|
|
196
|
-
interface GetViewParams {
|
|
197
|
-
model?: string;
|
|
198
|
-
views?: View[];
|
|
199
|
-
context?: Record<string, any>;
|
|
200
|
-
options?: Option;
|
|
201
|
-
aid?: number | string | null | boolean;
|
|
202
|
-
}
|
|
203
190
|
declare const ViewService: {
|
|
204
191
|
getView({ model, views, context, options, aid, }: GetViewParams): Promise<any>;
|
|
205
192
|
getMenu(context: any): Promise<any>;
|
package/dist/services.js
CHANGED
|
@@ -4011,7 +4011,8 @@ var ModelService = {
|
|
|
4011
4011
|
ids = [],
|
|
4012
4012
|
data = {},
|
|
4013
4013
|
specification = {},
|
|
4014
|
-
context = {}
|
|
4014
|
+
context = {},
|
|
4015
|
+
path
|
|
4015
4016
|
}) {
|
|
4016
4017
|
const env2 = getEnv();
|
|
4017
4018
|
const jsonData = {
|
|
@@ -4024,7 +4025,7 @@ var ModelService = {
|
|
|
4024
4025
|
specification
|
|
4025
4026
|
}
|
|
4026
4027
|
};
|
|
4027
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
4028
|
+
return env2?.requests?.post(path ?? "/call" /* CALL_PATH */, jsonData, {
|
|
4028
4029
|
headers: {
|
|
4029
4030
|
"Content-Type": "application/json"
|
|
4030
4031
|
}
|
|
@@ -4142,9 +4143,9 @@ var model_service_default = ModelService;
|
|
|
4142
4143
|
|
|
4143
4144
|
// src/services/user-service/index.ts
|
|
4144
4145
|
var UserService = {
|
|
4145
|
-
async getProfile() {
|
|
4146
|
+
async getProfile(path) {
|
|
4146
4147
|
const env2 = getEnv();
|
|
4147
|
-
return env2.requests.get("/userinfo" /* PROFILE_PATH */, {
|
|
4148
|
+
return env2.requests.get(path ?? "/userinfo" /* PROFILE_PATH */, {
|
|
4148
4149
|
headers: {
|
|
4149
4150
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
4150
4151
|
}
|
|
@@ -4526,10 +4527,10 @@ var ViewService = {
|
|
|
4526
4527
|
});
|
|
4527
4528
|
const url = `${path}?${params.toString()}`;
|
|
4528
4529
|
return env2?.requests.get(url, {
|
|
4529
|
-
credentials: "include",
|
|
4530
4530
|
headers: {
|
|
4531
4531
|
"Content-Type": "application/json"
|
|
4532
|
-
}
|
|
4532
|
+
},
|
|
4533
|
+
withCredentials: true
|
|
4533
4534
|
});
|
|
4534
4535
|
},
|
|
4535
4536
|
async grantAccess({
|
package/dist/services.mjs
CHANGED
|
@@ -3967,7 +3967,8 @@ var ModelService = {
|
|
|
3967
3967
|
ids = [],
|
|
3968
3968
|
data = {},
|
|
3969
3969
|
specification = {},
|
|
3970
|
-
context = {}
|
|
3970
|
+
context = {},
|
|
3971
|
+
path
|
|
3971
3972
|
}) {
|
|
3972
3973
|
const env2 = getEnv();
|
|
3973
3974
|
const jsonData = {
|
|
@@ -3980,7 +3981,7 @@ var ModelService = {
|
|
|
3980
3981
|
specification
|
|
3981
3982
|
}
|
|
3982
3983
|
};
|
|
3983
|
-
return env2?.requests?.post("/call" /* CALL_PATH */, jsonData, {
|
|
3984
|
+
return env2?.requests?.post(path ?? "/call" /* CALL_PATH */, jsonData, {
|
|
3984
3985
|
headers: {
|
|
3985
3986
|
"Content-Type": "application/json"
|
|
3986
3987
|
}
|
|
@@ -4098,9 +4099,9 @@ var model_service_default = ModelService;
|
|
|
4098
4099
|
|
|
4099
4100
|
// src/services/user-service/index.ts
|
|
4100
4101
|
var UserService = {
|
|
4101
|
-
async getProfile() {
|
|
4102
|
+
async getProfile(path) {
|
|
4102
4103
|
const env2 = getEnv();
|
|
4103
|
-
return env2.requests.get("/userinfo" /* PROFILE_PATH */, {
|
|
4104
|
+
return env2.requests.get(path ?? "/userinfo" /* PROFILE_PATH */, {
|
|
4104
4105
|
headers: {
|
|
4105
4106
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
4106
4107
|
}
|
|
@@ -4482,10 +4483,10 @@ var ViewService = {
|
|
|
4482
4483
|
});
|
|
4483
4484
|
const url = `${path}?${params.toString()}`;
|
|
4484
4485
|
return env2?.requests.get(url, {
|
|
4485
|
-
credentials: "include",
|
|
4486
4486
|
headers: {
|
|
4487
4487
|
"Content-Type": "application/json"
|
|
4488
|
-
}
|
|
4488
|
+
},
|
|
4489
|
+
withCredentials: true
|
|
4489
4490
|
});
|
|
4490
4491
|
},
|
|
4491
4492
|
async grantAccess({
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-BGJfDe73.mjs';
|
|
2
|
+
|
|
3
|
+
interface Config {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
grantType: string;
|
|
6
|
+
clientId: string;
|
|
7
|
+
clientSecret: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Context {
|
|
11
|
+
uid: number;
|
|
12
|
+
lang: string;
|
|
13
|
+
allowCompanys: number[];
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type { Config, Context };
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-BGJfDe73.js';
|
|
2
|
+
|
|
3
|
+
interface Config {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
grantType: string;
|
|
6
|
+
clientId: string;
|
|
7
|
+
clientSecret: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Context {
|
|
11
|
+
uid: number;
|
|
12
|
+
lang: string;
|
|
13
|
+
allowCompanys: number[];
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type { Config, Context };
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/types.ts
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
package/dist/types.mjs
ADDED
|
File without changes
|
|
@@ -31,6 +31,18 @@ interface Specification {
|
|
|
31
31
|
interface ContextApi {
|
|
32
32
|
[key: string]: any;
|
|
33
33
|
}
|
|
34
|
+
interface GetAllParams {
|
|
35
|
+
model?: string;
|
|
36
|
+
ids?: number[];
|
|
37
|
+
specification: Specification;
|
|
38
|
+
domain?: any[];
|
|
39
|
+
offset?: number;
|
|
40
|
+
sort: any;
|
|
41
|
+
fields: any;
|
|
42
|
+
groupby: any;
|
|
43
|
+
context?: ContextApi;
|
|
44
|
+
limit?: number;
|
|
45
|
+
}
|
|
34
46
|
interface GetListParams {
|
|
35
47
|
model: string;
|
|
36
48
|
ids?: number[];
|
|
@@ -53,6 +65,7 @@ interface SaveParams {
|
|
|
53
65
|
data?: Record<string, any>;
|
|
54
66
|
specification?: Specification;
|
|
55
67
|
context?: ContextApi;
|
|
68
|
+
path?: string;
|
|
56
69
|
}
|
|
57
70
|
interface DeleteParams {
|
|
58
71
|
ids?: number[];
|
|
@@ -83,4 +96,18 @@ type GetSelectionType = {
|
|
|
83
96
|
specification?: any;
|
|
84
97
|
};
|
|
85
98
|
|
|
86
|
-
|
|
99
|
+
type View = [number | boolean, string];
|
|
100
|
+
type Option = {
|
|
101
|
+
action_id?: number;
|
|
102
|
+
load_filters?: boolean;
|
|
103
|
+
toolbar?: boolean;
|
|
104
|
+
};
|
|
105
|
+
interface GetViewParams {
|
|
106
|
+
model?: string;
|
|
107
|
+
views?: View[];
|
|
108
|
+
context?: Record<string, any>;
|
|
109
|
+
options?: Option;
|
|
110
|
+
aid?: number | string | null | boolean;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetAllParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetListParams as b, GetSelectionType as c, SocialTokenBody as d, Specification as e, GetViewParams as f, View as g, updatePasswordBody as u };
|
|
@@ -31,6 +31,18 @@ interface Specification {
|
|
|
31
31
|
interface ContextApi {
|
|
32
32
|
[key: string]: any;
|
|
33
33
|
}
|
|
34
|
+
interface GetAllParams {
|
|
35
|
+
model?: string;
|
|
36
|
+
ids?: number[];
|
|
37
|
+
specification: Specification;
|
|
38
|
+
domain?: any[];
|
|
39
|
+
offset?: number;
|
|
40
|
+
sort: any;
|
|
41
|
+
fields: any;
|
|
42
|
+
groupby: any;
|
|
43
|
+
context?: ContextApi;
|
|
44
|
+
limit?: number;
|
|
45
|
+
}
|
|
34
46
|
interface GetListParams {
|
|
35
47
|
model: string;
|
|
36
48
|
ids?: number[];
|
|
@@ -53,6 +65,7 @@ interface SaveParams {
|
|
|
53
65
|
data?: Record<string, any>;
|
|
54
66
|
specification?: Specification;
|
|
55
67
|
context?: ContextApi;
|
|
68
|
+
path?: string;
|
|
56
69
|
}
|
|
57
70
|
interface DeleteParams {
|
|
58
71
|
ids?: number[];
|
|
@@ -83,4 +96,18 @@ type GetSelectionType = {
|
|
|
83
96
|
specification?: any;
|
|
84
97
|
};
|
|
85
98
|
|
|
86
|
-
|
|
99
|
+
type View = [number | boolean, string];
|
|
100
|
+
type Option = {
|
|
101
|
+
action_id?: number;
|
|
102
|
+
load_filters?: boolean;
|
|
103
|
+
toolbar?: boolean;
|
|
104
|
+
};
|
|
105
|
+
interface GetViewParams {
|
|
106
|
+
model?: string;
|
|
107
|
+
views?: View[];
|
|
108
|
+
context?: Record<string, any>;
|
|
109
|
+
options?: Option;
|
|
110
|
+
aid?: number | string | null | boolean;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetAllParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetListParams as b, GetSelectionType as c, SocialTokenBody as d, Specification as e, GetViewParams as f, View as g, updatePasswordBody as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fctc/interface-logic",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"types": "dist/index.d.ts",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -49,6 +49,11 @@
|
|
|
49
49
|
"types": "./dist/utils.d.ts",
|
|
50
50
|
"import": "./dist/utils.mjs",
|
|
51
51
|
"require": "./dist/utils.cjs"
|
|
52
|
+
},
|
|
53
|
+
"./types": {
|
|
54
|
+
"types": "./dist/types.d.ts",
|
|
55
|
+
"import": "./dist/types.mjs",
|
|
56
|
+
"require": "./dist/types.cjs"
|
|
52
57
|
}
|
|
53
58
|
},
|
|
54
59
|
"files": [
|