griddo-sdk 1.0.1 → 1.0.2

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.
package/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { api } from './api';
2
- import { getToken } from './models/auth';
3
- import { getPages, getPage, savePage, deletePage, restorePage } from './models/pages';
4
- import { getStructuredData, saveStructuredData } from './models/structuredData';
5
- import { getLanguages } from './models/languages';
6
- import { getStatus } from './models/liveStatus';
1
+ const { api } = require('./api');
2
+ const { getToken } = require('./models/auth');
3
+ const { getPages, getPage, savePage, deletePage, restorePage } = require('./models/pages');
4
+ const { getStructuredData, saveStructuredData } = require('./models/structuredData');
5
+ const { getLanguages } = require('./models/languages');
6
+ const { getStatus } = require('./models/liveStatus');
7
7
 
8
8
  class SDK {
9
9
  constructor() {
@@ -134,4 +134,4 @@ class SDK {
134
134
  };
135
135
  };
136
136
 
137
- export default SDK;
137
+ module.exports = SDK;
package/models/auth.js CHANGED
@@ -1,4 +1,4 @@
1
- import api from '../api';
1
+ const api = require('../api');
2
2
 
3
3
  const getToken = async (params) => {
4
4
  const {
@@ -1,8 +1,8 @@
1
- import api from '../api';
1
+ const api = require('../api');
2
2
 
3
3
  const getLanguages = env => api(env, 'get', '/languages')
4
4
  .then(data => data.items);
5
5
 
6
- export default {
6
+ module.exports = {
7
7
  getLanguages,
8
8
  };
@@ -1,4 +1,4 @@
1
- import api from '../api';
1
+ const api = require('../api');
2
2
 
3
3
  const getStatus = env => api(env, 'get', '/live-status');
4
4
 
package/models/pages.js CHANGED
@@ -1,4 +1,4 @@
1
- import api from '../api';
1
+ const api = require('../api');
2
2
 
3
3
  const getPages = (env, template = null) => api(env, 'get', `/pages/all/id/${template ? `?template=${template}` : ''}`);
4
4
 
@@ -1,4 +1,4 @@
1
- import api from '../api';
1
+ const api = require('../api');
2
2
 
3
3
  const getStructuredData = async (env, id, site = null, language = null) => {
4
4
  const headers = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "griddo-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {