@fctc/interface-logic 1.3.2 → 1.3.3

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/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({
@@ -1,4 +1,4 @@
1
- import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, G as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, b as GetSelectionType } from './api-type-cZ3zwGsZ.mjs';
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, c as GetSelectionType } from './api-type-DOC6jjy_.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;
@@ -1,4 +1,4 @@
1
- import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, G as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, b as GetSelectionType } from './api-type-cZ3zwGsZ.js';
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, c as GetSelectionType } from './api-type-DOC6jjy_.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;
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({
@@ -0,0 +1,10 @@
1
+ export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, V as ViewData, u as updatePasswordBody } from './api-type-DOC6jjy_.mjs';
2
+
3
+ interface Config {
4
+ baseUrl: string;
5
+ grantType: string;
6
+ clientId: string;
7
+ clientSecret: string;
8
+ }
9
+
10
+ export type { Config };
@@ -0,0 +1,10 @@
1
+ export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, V as ViewData, u as updatePasswordBody } from './api-type-DOC6jjy_.js';
2
+
3
+ interface Config {
4
+ baseUrl: string;
5
+ grantType: string;
6
+ clientId: string;
7
+ clientSecret: string;
8
+ }
9
+
10
+ export type { Config };
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -49,6 +49,16 @@
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"
57
+ },
58
+ "./models": {
59
+ "types": "./dist/models.d.ts",
60
+ "import": "./dist/models.mjs",
61
+ "require": "./dist/models.cjs"
52
62
  }
53
63
  },
54
64
  "files": [