@juhuu/sdk-ts 1.0.4 → 1.0.6
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -13
- package/dist/index.mjs +14 -13
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -176,7 +176,7 @@ interface Party extends Person {
|
|
176
176
|
type VeloBrushDeviceDocumentUserManualStep = "prepareBike1" | "prepareBike2" | "chooseCycleType" | "openDoors1" | "extendBikeDrawer1" | "unfoldRamp1" | "placeBike1" | "fixBike1" | "fixBike2" | "retractBikeDrawer1" | "closeDoors1" | "selectWashProgram" | "waitForWashProgram" | "openDoors2" | "extendBikeDrawer2" | "dryBike1" | "dryBike2" | "releaseBike" | "unloadBike" | "retractBikeDrawer2" | "closeDoors2" | "lockDoors" | "error" | "emergencyStop" | "waitingForSession";
|
177
177
|
type PaymentStatus = "waitingForConfirmation" | "waitingForAmountFinalization" | "waitingForCapture" | "waitingForTransitConfirmation" | "inTransitToProvider" | "captured" | "inTransitToProperty" | "payedOut";
|
178
178
|
type PaymentServiceProvider = "stripe";
|
179
|
-
type PayoutStatus = "
|
179
|
+
type PayoutStatus = "waitingForApproval" | "inTransitToProperty" | "payedOut";
|
180
180
|
type BusinessType = "individual" | "company" | "non_profit" | "government_entity";
|
181
181
|
declare const ReadonlySectorArray: readonly ["tourism", "mobility", "sport"];
|
182
182
|
type Sector = (typeof ReadonlySectorArray)[number];
|
package/dist/index.d.ts
CHANGED
@@ -176,7 +176,7 @@ interface Party extends Person {
|
|
176
176
|
type VeloBrushDeviceDocumentUserManualStep = "prepareBike1" | "prepareBike2" | "chooseCycleType" | "openDoors1" | "extendBikeDrawer1" | "unfoldRamp1" | "placeBike1" | "fixBike1" | "fixBike2" | "retractBikeDrawer1" | "closeDoors1" | "selectWashProgram" | "waitForWashProgram" | "openDoors2" | "extendBikeDrawer2" | "dryBike1" | "dryBike2" | "releaseBike" | "unloadBike" | "retractBikeDrawer2" | "closeDoors2" | "lockDoors" | "error" | "emergencyStop" | "waitingForSession";
|
177
177
|
type PaymentStatus = "waitingForConfirmation" | "waitingForAmountFinalization" | "waitingForCapture" | "waitingForTransitConfirmation" | "inTransitToProvider" | "captured" | "inTransitToProperty" | "payedOut";
|
178
178
|
type PaymentServiceProvider = "stripe";
|
179
|
-
type PayoutStatus = "
|
179
|
+
type PayoutStatus = "waitingForApproval" | "inTransitToProperty" | "payedOut";
|
180
180
|
type BusinessType = "individual" | "company" | "non_profit" | "government_entity";
|
181
181
|
declare const ReadonlySectorArray: readonly ["tourism", "mobility", "sport"];
|
182
182
|
type Sector = (typeof ReadonlySectorArray)[number];
|
package/dist/index.js
CHANGED
@@ -88,22 +88,23 @@ var Service = class {
|
|
88
88
|
options.refreshTokensIfNecessary = true;
|
89
89
|
}
|
90
90
|
let token = null;
|
91
|
-
if (
|
91
|
+
if (options.accessToken === void 0) {
|
92
92
|
token = await this.getAccessToken();
|
93
|
-
|
94
|
-
console.error(
|
95
|
-
"endpoint",
|
96
|
-
url,
|
97
|
-
"should use authentication but no token was found"
|
98
|
-
);
|
99
|
-
return {
|
100
|
-
ok: false,
|
101
|
-
data: null
|
102
|
-
};
|
103
|
-
}
|
104
|
-
} else if (useAuthentication === true && options.accessToken !== void 0) {
|
93
|
+
} else {
|
105
94
|
token = options.accessToken;
|
106
95
|
}
|
96
|
+
console.log("token", token);
|
97
|
+
if (token === null || void 0) {
|
98
|
+
console.error(
|
99
|
+
"endpoint",
|
100
|
+
url,
|
101
|
+
"should use authentication but no token was found"
|
102
|
+
);
|
103
|
+
return {
|
104
|
+
ok: false,
|
105
|
+
data: null
|
106
|
+
};
|
107
|
+
}
|
107
108
|
const uri = this.httpBaseUrl + url;
|
108
109
|
let response = null;
|
109
110
|
let responseObject = null;
|
package/dist/index.mjs
CHANGED
@@ -43,22 +43,23 @@ var Service = class {
|
|
43
43
|
options.refreshTokensIfNecessary = true;
|
44
44
|
}
|
45
45
|
let token = null;
|
46
|
-
if (
|
46
|
+
if (options.accessToken === void 0) {
|
47
47
|
token = await this.getAccessToken();
|
48
|
-
|
49
|
-
console.error(
|
50
|
-
"endpoint",
|
51
|
-
url,
|
52
|
-
"should use authentication but no token was found"
|
53
|
-
);
|
54
|
-
return {
|
55
|
-
ok: false,
|
56
|
-
data: null
|
57
|
-
};
|
58
|
-
}
|
59
|
-
} else if (useAuthentication === true && options.accessToken !== void 0) {
|
48
|
+
} else {
|
60
49
|
token = options.accessToken;
|
61
50
|
}
|
51
|
+
console.log("token", token);
|
52
|
+
if (token === null || void 0) {
|
53
|
+
console.error(
|
54
|
+
"endpoint",
|
55
|
+
url,
|
56
|
+
"should use authentication but no token was found"
|
57
|
+
);
|
58
|
+
return {
|
59
|
+
ok: false,
|
60
|
+
data: null
|
61
|
+
};
|
62
|
+
}
|
62
63
|
const uri = this.httpBaseUrl + url;
|
63
64
|
let response = null;
|
64
65
|
let responseObject = null;
|