@micromag/data 0.4.55 → 0.4.63

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/es/index.d.ts CHANGED
@@ -10,10 +10,7 @@ declare const useContributionCreate: ({ screenId, visitorId: providedVisitorId,
10
10
  creating: boolean;
11
11
  };
12
12
 
13
- declare const useContributions: ({ screenId, storyId: providedStoryId, opts }?: {
14
- storyId?: any;
15
- opts?: {};
16
- }) => {
13
+ declare const useContributions: (options?: any) => {
17
14
  load?: (...args: any[]) => any;
18
15
  loading?: boolean;
19
16
  error?: boolean;
@@ -130,31 +127,24 @@ declare const useMediaDelete: () => {
130
127
  deleting: boolean;
131
128
  };
132
129
 
133
- declare const useQuiz: ({ screenId, storyId: providedStoryId, opts }?: {
134
- storyId?: any;
135
- opts?: {};
136
- }) => {
130
+ declare const useQuiz: (options?: any) => {
137
131
  load?: (...args: any[]) => any;
138
132
  loading?: boolean;
139
133
  error?: boolean;
140
134
  quiz: any;
141
135
  };
142
136
 
143
- declare const useQuizCreate: ({ screenId, visitorId: providedVisitorId, storyId: providedStoryId, onSuccess, }?: {
144
- visitorId?: any;
145
- storyId?: any;
146
- onSuccess?: any;
147
- }) => {
137
+ declare const useQuizCreate: (options?: any) => {
148
138
  create: (data: any) => any;
149
139
  creating: boolean;
150
140
  };
151
141
 
152
142
  declare class Base {
153
143
  constructor(opts?: {});
154
- requestGet(path: any, query?: any): any;
155
- requestPost(path: any, data: any): any;
156
- requestPut(path: any, data: any): any;
157
- requestDelete(path: any): any;
144
+ requestGet(path: any, query?: any): Promise<unknown>;
145
+ requestPost(path: any, data: any): Promise<unknown>;
146
+ requestPut(path: any, data: any): Promise<unknown>;
147
+ requestDelete(path: any): Promise<unknown>;
158
148
  route(route: any, params: any): string;
159
149
  getFullUrl(path: any): string;
160
150
  }
package/es/index.js CHANGED
@@ -382,7 +382,8 @@ var useData = function useData(loadData) {
382
382
 
383
383
  var _excluded$3 = ["data"];
384
384
  var useContributions = function useContributions() {
385
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
385
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
386
+ var _ref = options || {},
386
387
  screenId = _ref.screenId,
387
388
  _ref$storyId = _ref.storyId,
388
389
  providedStoryId = _ref$storyId === void 0 ? null : _ref$storyId,
@@ -988,8 +989,10 @@ var useMediaDelete = function useMediaDelete() {
988
989
 
989
990
  var _excluded = ["data"];
990
991
  var useQuiz = function useQuiz() {
991
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
992
- screenId = _ref.screenId,
992
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
993
+ var _ref = options || {},
994
+ _ref$screenId = _ref.screenId,
995
+ screenId = _ref$screenId === void 0 ? null : _ref$screenId,
993
996
  _ref$storyId = _ref.storyId,
994
997
  providedStoryId = _ref$storyId === void 0 ? null : _ref$storyId,
995
998
  _ref$opts = _ref.opts,
@@ -1014,8 +1017,10 @@ var useQuiz = function useQuiz() {
1014
1017
  };
1015
1018
 
1016
1019
  var useQuizCreate = function useQuizCreate() {
1017
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
1018
- screenId = _ref.screenId,
1020
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
1021
+ var _ref = options || {},
1022
+ _ref$screenId = _ref.screenId,
1023
+ screenId = _ref$screenId === void 0 ? null : _ref$screenId,
1019
1024
  _ref$visitorId = _ref.visitorId,
1020
1025
  providedVisitorId = _ref$visitorId === void 0 ? null : _ref$visitorId,
1021
1026
  _ref$storyId = _ref.storyId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/data",
3
- "version": "0.4.55",
3
+ "version": "0.4.63",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -60,7 +60,7 @@
60
60
  "@babel/runtime": "^7.28.6",
61
61
  "@folklore/fetch": "^0.1.17",
62
62
  "@folklore/routes": "^0.2.36",
63
- "@micromag/core": "^0.4.55",
63
+ "@micromag/core": "^0.4.63",
64
64
  "lodash": "^4.17.23",
65
65
  "query-string": "^9.0.0"
66
66
  },
@@ -68,6 +68,6 @@
68
68
  "access": "public",
69
69
  "registry": "https://registry.npmjs.org/"
70
70
  },
71
- "gitHead": "9708f0016de0cf18dcd6a6aa5bc70d7f00b86d9f",
71
+ "gitHead": "0a6df1a5352c067c3296377d26fadb9b71244345",
72
72
  "types": "es/index.d.ts"
73
73
  }