@prezly/sdk 18.0.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 = "17.1.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 = "17.1.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})`;
@@ -1 +1,9 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Category = void 0;
7
+ let Category;
8
+ exports.Category = Category;
9
+ (function (_Category) {})(Category || (exports.Category = Category = {}));
@@ -1,15 +1,10 @@
1
- import type { CultureRef } from './Culture';
1
+ import type { Culture, CultureRef } from './Culture';
2
2
  export interface CategoryRef {
3
3
  id: number;
4
4
  display_name: string;
5
5
  display_description: string | null;
6
6
  i18n: {
7
- [localeCode: CultureRef['code']]: {
8
- description: string | null;
9
- locale: CultureRef;
10
- name: string;
11
- slug: string | null;
12
- };
7
+ [localeCode: Culture.Code]: Category.Translation;
13
8
  };
14
9
  stories_number: number;
15
10
  }
@@ -17,3 +12,11 @@ export interface Category extends CategoryRef {
17
12
  stories_number: number;
18
13
  public_stories_number: number;
19
14
  }
15
+ export declare namespace Category {
16
+ interface Translation {
17
+ locale: CultureRef;
18
+ slug: string | null;
19
+ name: string;
20
+ description: string | null;
21
+ }
22
+ }
@@ -1 +1,2 @@
1
- export {};
1
+ export let Category;
2
+ (function (_Category) {})(Category || (Category = {}));
@@ -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.0.0",
3
+ "version": "18.1.1",
4
4
  "description": "Prezly API SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",