griddo-sdk 1.0.0 → 1.0.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.
package/api/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const axios = require('axios');
1
+ import axios from 'axios';
2
2
 
3
3
  const api = (env, method, endpoint, body = null, headers = {}) => {
4
4
  const {
@@ -20,6 +20,6 @@ const api = (env, method, endpoint, body = null, headers = {}) => {
20
20
  .then(response => response.data);
21
21
  };
22
22
 
23
- module.exports={
23
+ export default{
24
24
  api,
25
25
  };
package/index.js CHANGED
@@ -1,9 +1,9 @@
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');
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';
7
7
 
8
8
  class SDK {
9
9
  constructor() {
@@ -134,4 +134,4 @@ class SDK {
134
134
  };
135
135
  };
136
136
 
137
- module.exports = SDK;
137
+ export default SDK;
package/models/auth.js CHANGED
@@ -1,4 +1,4 @@
1
- const api = require('../api');
1
+ import api from '../api';
2
2
 
3
3
  const getToken = async (params) => {
4
4
  const {
@@ -1,8 +1,8 @@
1
- const api = require('../api');
1
+ import api from '../api';
2
2
 
3
3
  const getLanguages = env => api(env, 'get', '/languages')
4
4
  .then(data => data.items);
5
5
 
6
- module.exports = {
6
+ export default {
7
7
  getLanguages,
8
8
  };
@@ -1,4 +1,4 @@
1
- const api = require('../api');
1
+ import api from '../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
- const api = require('../api');
1
+ import api from '../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
- const api = require('../api');
1
+ import api from '../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.0",
3
+ "version": "1.0.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,6 +17,6 @@
17
17
  },
18
18
  "homepage": "https://github.com/griddo/griddo-sdk#readme",
19
19
  "dependencies": {
20
- "axios": "^0.26.0"
20
+ "axios": "0.26.0"
21
21
  }
22
22
  }