@legalplace/wizardx-core 4.36.22 → 4.37.1

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.
@@ -13,7 +13,7 @@ import { IntputsInitiator } from "../../libs/InputsInitiator";
13
13
  import { initUserAction, setUserStatusAction } from "../actions/user";
14
14
  import { OvcConverter } from "../../libs/OvcConverter";
15
15
  import Globals from "../../Globals";
16
- import { getFetchModelArguments, getCreateInstanceArguments, getClientConfigArguments, getWizardConfigArguments, getModelInformationArguments, } from "../../service/api.manager";
16
+ import { getFetchModelArguments, getCreateInstanceArguments, getClientConfigArguments, getWizardConfigArguments, getModelInformationArguments, checkInstanceModel, } from "../../service/api.manager";
17
17
  import { loadTheme, setWizardTheme } from "../../ThemeLoader";
18
18
  import { loadPlugins } from "../../PluginLoader";
19
19
  import { enableSmartscriptAction } from "../actions/smartscript";
@@ -39,6 +39,9 @@ function* setFetchModelToNonBlocking(firstCurrentAppState) {
39
39
  }
40
40
  function* getClientConfig(permalink, uniqid) {
41
41
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
42
+ if (uniqid) {
43
+ yield call(fetch, ...checkInstanceModel(uniqid));
44
+ }
42
45
  let clientConfigResponse = yield call(fetch, ...getClientConfigArguments(permalink, uniqid));
43
46
  if (clientConfigResponse === undefined) {
44
47
  throw new Error("Unable to fetch client config, we did not receive any response");
@@ -122,6 +122,6 @@ describe('Fetch model saga', () => {
122
122
  }));
123
123
  store.dispatch(fetchModelPrerequisitesAction(permalink));
124
124
  expect(fetchMock.mock.calls.length).toEqual(1);
125
- expect(fetchMock.mock.calls[0][0]).toEqual(`${mockApiEndpoint}client-config?permalink=${permalink}&disableOnBoarding=true`);
125
+ expect(fetchMock.mock.calls[0][0]).toEqual(`${mockApiEndpoint}contract/instance/${uniqid}/refresh-model`);
126
126
  });
127
127
  });
@@ -5,6 +5,7 @@ export declare const getModelInformationArguments: (modelUuid: string, queryPara
5
5
  export declare const getFetchModelArguments: (permalink: string, uniqidParam: string, prefix: string, queryParams: URLSearchParams) => (RequestInfo | RequestInit)[];
6
6
  export declare const getCreateInstanceArguments: (permalink: string, searchParams: string, modelVersion: string) => (RequestInfo | RequestInit)[];
7
7
  export declare const getClientConfigArguments: (permalink?: string | undefined, uniqid?: string | undefined) => [RequestInfo, RequestInit?];
8
+ export declare const checkInstanceModel: (uniqid: string) => [RequestInfo, RequestInit?];
8
9
  export declare const getUserProfileArguments: () => [RequestInfo, RequestInit?];
9
10
  export declare const updateInstanceArguments: (permalink: string, uniqid: string | undefined, ovc: OvcType, draft: number, additionalProperties?: Record<string, string | number> | undefined) => [RequestInfo, RequestInit?];
10
11
  export declare const updateProofModule: (uniqid: string) => [RequestInfo, RequestInit?];
@@ -122,6 +122,20 @@ export const getClientConfigArguments = (permalink, uniqid) => {
122
122
  },
123
123
  ];
124
124
  };
125
+ export const checkInstanceModel = (uniqid) => {
126
+ const apiEndpoint = getConfig().apiEndpoint + (/\/$/.test(getConfig().apiEndpoint) ? "" : "/");
127
+ const route = `${apiEndpoint}contract/instance/${uniqid}/refresh-model`;
128
+ return [
129
+ route,
130
+ {
131
+ method: "PUT",
132
+ headers: {
133
+ "Content-Type": "application/json",
134
+ },
135
+ credentials: "include",
136
+ },
137
+ ];
138
+ };
125
139
  export const getUserProfileArguments = () => {
126
140
  const apiEndpoint = getConfig().apiEndpoint + (/\/$/.test(getConfig().apiEndpoint) ? "" : "/");
127
141
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/wizardx-core",
3
- "version": "4.36.22",
3
+ "version": "4.37.1",
4
4
  "author": "Moncef Hammou (moncef@legalplace.fr)",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -21,14 +21,14 @@
21
21
  "dependencies": {
22
22
  "@appnest/masonry-layout": "^2.0.8",
23
23
  "@cryptography/sha1": "^0.2.0",
24
- "@legalplace/data-gouv": "^1.6.49",
24
+ "@legalplace/data-gouv": "^1.6.50",
25
25
  "@legalplace/lp-events": "1.14.0",
26
26
  "@legalplace/lplogic": "2.3.1",
27
27
  "@legalplace/model-healthcheck": "^1.1.5",
28
28
  "@legalplace/pappers": "^1.2.4",
29
- "@legalplace/referencesparser": "^3.1.49",
29
+ "@legalplace/referencesparser": "^3.1.50",
30
30
  "@legalplace/storybook": "2.356.7",
31
- "@legalplace/typeorm-constants": "^3.64.2",
31
+ "@legalplace/typeorm-constants": "^3.65.0",
32
32
  "@loadable/component": "^5.15.0",
33
33
  "@redux-saga/core": "^1.1.3",
34
34
  "axios": "^0.24.0",
@@ -60,9 +60,9 @@
60
60
  "devDependencies": {
61
61
  "@legalplace/data-gouv": "^1.6.30",
62
62
  "@legalplace/eslint-config": "^2.3.0",
63
- "@legalplace/models-v3-types": "^5.13.33",
63
+ "@legalplace/models-v3-types": "^5.13.34",
64
64
  "@legalplace/prettier-config": "^2.1.3",
65
- "@legalplace/typeorm-entities": "^5.61.6",
65
+ "@legalplace/typeorm-entities": "^5.61.7",
66
66
  "@swc-node/jest": "^1.3.2",
67
67
  "@swc/core": "^1.2.93",
68
68
  "@swc/jest": "^0.2.4",
@@ -100,5 +100,5 @@
100
100
  "*.test.ts",
101
101
  "*.test.tsx"
102
102
  ],
103
- "gitHead": "5283e343b6744674e0193c8fa09a510483ed61ae"
103
+ "gitHead": "a2046ae687512e301996cf3b04c99333ec8ae545"
104
104
  }