@colijnit/articleapi 1.0.25 → 1.0.27

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.
@@ -96,6 +96,6 @@ export declare class Articles {
96
96
  getDeliveryDate2(goodId: number): Promise<DataServiceResponseData>;
97
97
  getJsonConfiguredArticles(configuratorStatistics?: ConfiguratorStatisticsEnvironment, showLoader?: boolean, instanceId?: number): Promise<DataServiceResponseData>;
98
98
  getJsonArticleFlatTree(goodId: number, goodType: string, quantity: number, showLoader?: boolean, instanceId?: number, configuratorStatistics?: ConfiguratorStatisticsEnvironment): Promise<string>;
99
- static createConnector(options: Options): IoneApiArticles;
99
+ static createConnector(options: Options, sessionExists: boolean): IoneApiArticles;
100
100
  private _handleConnectionReset;
101
101
  }
package/build/articles.js CHANGED
@@ -32,7 +32,7 @@ export class Articles {
32
32
  this.useLoginEncryption = options.hasOwnProperty('useLoginEncryption') ? options.useLoginEncryption === true : false;
33
33
  }
34
34
  this._connector = new Connector(options);
35
- this.articles = Articles.createConnector(options);
35
+ this.articles = Articles.createConnector(options, this._connector.hasSession());
36
36
  this.articles.connector = this._connector;
37
37
  this.articles.languageCode = this.languageCode;
38
38
  this.articles.branchNr = this.branch;
@@ -275,8 +275,8 @@ export class Articles {
275
275
  resolve(JSON.stringify(returnObject));
276
276
  }));
277
277
  }
278
- static createConnector(options) {
279
- if (options.username && options.password) {
278
+ static createConnector(options, sessionExists) {
279
+ if ((options.username && options.password) || sessionExists) {
280
280
  return new ArticlesAuth();
281
281
  }
282
282
  return new ArticlesPublic();
@@ -33,7 +33,6 @@ const remoteOptions = {
33
33
  };
34
34
  const publicOptions = {
35
35
  url: "http://130.62.7.180:8082/ione",
36
- ajaxUrl: "http://130.62.7.180:8082/ione",
37
36
  schema: "815",
38
37
  version: "252",
39
38
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/articleapi",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "scripts": {
5
5
  "build": "grunt clean && tsc",
6
6
  "browserify": "browserify build/connector.js --s colijn -o dist/out-tsc/bundle.js",
@@ -23,12 +23,12 @@
23
23
  "rxjs": "6.6.3"
24
24
  },
25
25
  "peerDependencies": {
26
- "@colijnit/ioneconnector": ">=3.1.0",
27
- "@colijnit/mainapi": ">=1.0.13"
26
+ "@colijnit/ioneconnector": ">=3.1.5",
27
+ "@colijnit/mainapi": ">=1.0.23"
28
28
  },
29
29
  "devDependencies": {
30
- "@colijnit/ioneconnector": "file:D:/develop/workspaces/develop/Javascript/Ioneconnector_V2/colijnit-ioneconnector-3.1.0.tgz",
31
- "@colijnit/mainapi": "1.0.13",
30
+ "@colijnit/ioneconnector": "3.1.5",
31
+ "@colijnit/mainapi": "1.0.23",
32
32
  "@types/jest": "^24.0.13",
33
33
  "grunt": "^1.0.3",
34
34
  "grunt-clean": "^0.4.0",