attlaz-client 1.10.2 → 1.10.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.
@@ -1,4 +1,4 @@
1
- import { ChannelData } from './ChannelData';
1
+ import { ChannelData } from './ChannelData.js';
2
2
  export declare class EmailChannelData extends ChannelData {
3
3
  email: string;
4
4
  constructor(email: string);
@@ -1,4 +1,4 @@
1
- import { ChannelData } from './ChannelData';
1
+ import { ChannelData } from './ChannelData.js';
2
2
  import { ChannelType } from './ChannelType.js';
3
3
  export class EmailChannelData extends ChannelData {
4
4
  email;
@@ -80,6 +80,9 @@ export class Endpoint {
80
80
  /**
81
81
  * Parse data
82
82
  */
83
+ if (!requestResponse === null || requestResponse === undefined) {
84
+ throw new Error('Unable to parse collection: response is empty');
85
+ }
83
86
  if (!requestResponse.hasOwnProperty('data') || requestResponse.data === undefined) {
84
87
  throw new Error('Unable to parse collection: data is not defined');
85
88
  }
package/package.json CHANGED
@@ -1,69 +1,69 @@
1
- {
2
- "name": "attlaz-client",
3
- "version": "1.10.2",
4
- "description": "Javascript Client to access Attlaz API",
5
- "types": "./dist/index.d.ts",
6
- "main": "./dist/index.js",
7
- "type": "module",
8
- "./package.json": {
9
- "default": "./package.json"
10
- },
11
- ".": {
12
- "types": "./dist/src/index.d.ts",
13
- "default": "./dist/src/index.js"
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": "git+https://bitbucket.org/attlaz/javascript-client.git"
18
- },
19
- "homepage": "https://attlaz.com",
20
- "keywords": [
21
- "attlaz",
22
- "client",
23
- "http",
24
- "api"
25
- ],
26
- "files": [
27
- "dist/*"
28
- ],
29
- "author": "Stijn Duynslaeger <stijn@attlaz.com> (stijn@attlaz.com)",
30
- "license": "MIT",
31
- "scripts": {
32
- "prebuild": "node -p \"'export const VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
33
- "prepare": "npm run clean && tsc --project tsconfig.production.json",
34
- "build": "npm run clean && tsc",
35
- "clean": "rimraf dist",
36
- "test": "jest"
37
- },
38
- "publishConfig": {
39
- "cache": "~/.npm",
40
- "registry": "https://registry.npmjs.org"
41
- },
42
- "dependencies": {
43
- "client-oauth2": "^4.3.3",
44
- "popsicle": "^12.1.0"
45
- },
46
- "devDependencies": {
47
- "@types/jest": "^29.5.2",
48
- "@types/node": "^18.16.18",
49
- "dotenv": "^16.3.1",
50
- "jest": "^29.5.0",
51
- "rimraf": "^5.0.1",
52
- "rollup-plugin-commonjs": "^10.1.0",
53
- "rollup-plugin-node-resolve": "^5.2.0",
54
- "rollup-plugin-typescript": "^1.0.1",
55
- "@typescript-eslint/eslint-plugin": "^5.59.9",
56
- "@typescript-eslint/parser": "^5.59.9",
57
- "eslint": "^8.42.0",
58
- "eslint-config-airbnb-base": "^15.0.0",
59
- "eslint-plugin-import": "^2.27.5",
60
- "eslint-plugin-jsdoc": "^46.2.6",
61
- "eslint-plugin-prefer-arrow": "^1.2.3",
62
- "eslint-plugin-promise": "^6.1.1",
63
- "ts-jest": "^29.1.0",
64
- "typescript": "^5.1.3"
65
- },
66
- "directories": {
67
- "test": "test"
68
- }
69
- }
1
+ {
2
+ "name": "attlaz-client",
3
+ "version": "1.10.4",
4
+ "description": "Javascript Client to access Attlaz API",
5
+ "types": "./dist/index.d.ts",
6
+ "main": "./dist/index.js",
7
+ "type": "module",
8
+ "./package.json": {
9
+ "default": "./package.json"
10
+ },
11
+ ".": {
12
+ "types": "./dist/src/index.d.ts",
13
+ "default": "./dist/src/index.js"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://bitbucket.org/attlaz/javascript-client.git"
18
+ },
19
+ "homepage": "https://attlaz.com",
20
+ "keywords": [
21
+ "attlaz",
22
+ "client",
23
+ "http",
24
+ "api"
25
+ ],
26
+ "files": [
27
+ "dist/*"
28
+ ],
29
+ "author": "Stijn Duynslaeger <stijn@attlaz.com> (stijn@attlaz.com)",
30
+ "license": "MIT",
31
+ "scripts": {
32
+ "prebuild": "node -p \"'export const VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
33
+ "prepare": "npm run clean && tsc --project tsconfig.production.json",
34
+ "build": "npm run clean && tsc",
35
+ "clean": "rimraf dist",
36
+ "test": "jest"
37
+ },
38
+ "publishConfig": {
39
+ "cache": "~/.npm",
40
+ "registry": "https://registry.npmjs.org"
41
+ },
42
+ "dependencies": {
43
+ "client-oauth2": "^4.3.3",
44
+ "popsicle": "^12.1.0"
45
+ },
46
+ "devDependencies": {
47
+ "@types/jest": "^29.5.2",
48
+ "@types/node": "^18.16.18",
49
+ "dotenv": "^16.3.1",
50
+ "jest": "^29.5.0",
51
+ "rimraf": "^5.0.1",
52
+ "rollup-plugin-commonjs": "^10.1.0",
53
+ "rollup-plugin-node-resolve": "^5.2.0",
54
+ "rollup-plugin-typescript": "^1.0.1",
55
+ "@typescript-eslint/eslint-plugin": "^5.59.9",
56
+ "@typescript-eslint/parser": "^5.59.9",
57
+ "eslint": "^8.42.0",
58
+ "eslint-config-airbnb-base": "^15.0.0",
59
+ "eslint-plugin-import": "^2.27.5",
60
+ "eslint-plugin-jsdoc": "^46.2.6",
61
+ "eslint-plugin-prefer-arrow": "^1.2.3",
62
+ "eslint-plugin-promise": "^6.1.1",
63
+ "ts-jest": "^29.1.0",
64
+ "typescript": "^5.1.3"
65
+ },
66
+ "directories": {
67
+ "test": "test"
68
+ }
69
+ }