@juhuu/sdk-ts 1.2.142 → 1.2.143

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/dist/index.d.mts CHANGED
@@ -892,9 +892,14 @@ declare namespace JUHUU {
892
892
  }
893
893
  interface HttpResponse<T> {
894
894
  ok: boolean;
895
- data: T;
895
+ data: (T & {
896
+ /**
897
+ * Might be defined if the request failed
898
+ */
899
+ message?: string | LocaleString;
900
+ }) | null;
896
901
  statusText?: string;
897
- status: number;
902
+ status?: number;
898
903
  }
899
904
  type RequestOptions = {
900
905
  /**
package/dist/index.d.ts CHANGED
@@ -892,9 +892,14 @@ declare namespace JUHUU {
892
892
  }
893
893
  interface HttpResponse<T> {
894
894
  ok: boolean;
895
- data: T;
895
+ data: (T & {
896
+ /**
897
+ * Might be defined if the request failed
898
+ */
899
+ message?: string | LocaleString;
900
+ }) | null;
896
901
  statusText?: string;
897
- status: number;
902
+ status?: number;
898
903
  }
899
904
  type RequestOptions = {
900
905
  /**
package/dist/index.js CHANGED
@@ -170,6 +170,10 @@ var Service = class {
170
170
  if (query.ok === false) {
171
171
  return responseObject;
172
172
  }
173
+ if (query.data === null) {
174
+ console.log("no data in query");
175
+ return responseObject;
176
+ }
173
177
  const accessToken = query.data.accessToken;
174
178
  const refreshToken = query.data.refreshToken;
175
179
  await Promise.all([
package/dist/index.mjs CHANGED
@@ -126,6 +126,10 @@ var Service = class {
126
126
  if (query.ok === false) {
127
127
  return responseObject;
128
128
  }
129
+ if (query.data === null) {
130
+ console.log("no data in query");
131
+ return responseObject;
132
+ }
129
133
  const accessToken = query.data.accessToken;
130
134
  const refreshToken = query.data.refreshToken;
131
135
  await Promise.all([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juhuu/sdk-ts",
3
- "version": "1.2.142",
3
+ "version": "1.2.143",
4
4
  "description": "Typescript wrapper for JUHUU services",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",