@prezly/sdk 18.1.0 → 18.1.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.
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_USER_AGENT = void 0;
7
- const VERSION = "18.0.0";
7
+ const VERSION = "18.1.0";
8
8
  const URL = 'https://github.com/prezly/javascript-sdk';
9
9
  const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
10
10
  exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
@@ -1,3 +1,3 @@
1
- const VERSION = "18.0.0";
1
+ const VERSION = "18.1.0";
2
2
  const URL = 'https://github.com/prezly/javascript-sdk';
3
3
  export const DEFAULT_USER_AGENT = `prezly-javascript-sdk/${VERSION} (+${URL})`;
@@ -3,9 +3,9 @@ export interface CategoryRef {
3
3
  id: number;
4
4
  display_name: string;
5
5
  display_description: string | null;
6
- i18n: Partial<{
6
+ i18n: {
7
7
  [localeCode: Culture.Code]: Category.Translation;
8
- }>;
8
+ };
9
9
  stories_number: number;
10
10
  }
11
11
  export interface Category extends CategoryRef {
@@ -91,7 +91,7 @@ function toObject(sortOrder) {
91
91
  }
92
92
  function parseColumn(column) {
93
93
  if (column.startsWith('+')) {
94
- const [, name] = column.split('+');
94
+ const [, name = ''] = column.split('+');
95
95
  validateColumnName(name);
96
96
  return {
97
97
  name,
@@ -99,7 +99,7 @@ function parseColumn(column) {
99
99
  };
100
100
  }
101
101
  if (column.startsWith('-')) {
102
- const [, name] = column.split('-');
102
+ const [, name = ''] = column.split('-');
103
103
  validateColumnName(name);
104
104
  return {
105
105
  name,
@@ -84,7 +84,7 @@ function toObject(sortOrder) {
84
84
  }
85
85
  function parseColumn(column) {
86
86
  if (column.startsWith('+')) {
87
- const [, name] = column.split('+');
87
+ const [, name = ''] = column.split('+');
88
88
  validateColumnName(name);
89
89
  return {
90
90
  name,
@@ -92,7 +92,7 @@ function parseColumn(column) {
92
92
  };
93
93
  }
94
94
  if (column.startsWith('-')) {
95
- const [, name] = column.split('-');
95
+ const [, name = ''] = column.split('-');
96
96
  validateColumnName(name);
97
97
  return {
98
98
  name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prezly/sdk",
3
- "version": "18.1.0",
3
+ "version": "18.1.1",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",