@dotbots-boutique/auth-sdk 1.0.11 → 1.0.13
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/cjs/index.js +5 -5
- package/dist/esm/index.js +5 -5
- package/dist/types/DotBotsAuth.d.ts +1 -1
- package/dist/types/index.js +5 -5
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -352,11 +352,11 @@ class DotBotsAuth {
|
|
|
352
352
|
console.error(`[DotBotsAuth] charge() failed — HTTP ${response.status}`);
|
|
353
353
|
throw new DotBotsAuthError('NETWORK_ERROR', 'Payment request failed');
|
|
354
354
|
}
|
|
355
|
-
const
|
|
356
|
-
console.warn(`[DotBotsAuth] charge() success — transactionId: ${
|
|
357
|
-
this.postMessageHandler.sendCharge(this.config.appId, featureCode,
|
|
355
|
+
const data = await response.json();
|
|
356
|
+
console.warn(`[DotBotsAuth] charge() success — transactionId: ${data.transactionId}, amount: ${data.amount}`);
|
|
357
|
+
this.postMessageHandler.sendCharge(this.config.appId, featureCode, data.amount, data.transactionId);
|
|
358
358
|
this.emit('charged');
|
|
359
|
-
return
|
|
359
|
+
return data;
|
|
360
360
|
}
|
|
361
361
|
async logout() {
|
|
362
362
|
this.assertInitialized();
|
|
@@ -448,7 +448,7 @@ class DotBotsAuth {
|
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
DotBotsAuth.SDK_VERSION = '1.0.
|
|
451
|
+
DotBotsAuth.SDK_VERSION = '1.0.13';
|
|
452
452
|
|
|
453
453
|
exports.DotBotsAuth = DotBotsAuth;
|
|
454
454
|
exports.DotBotsAuthError = DotBotsAuthError;
|
package/dist/esm/index.js
CHANGED
|
@@ -350,11 +350,11 @@ class DotBotsAuth {
|
|
|
350
350
|
console.error(`[DotBotsAuth] charge() failed — HTTP ${response.status}`);
|
|
351
351
|
throw new DotBotsAuthError('NETWORK_ERROR', 'Payment request failed');
|
|
352
352
|
}
|
|
353
|
-
const
|
|
354
|
-
console.warn(`[DotBotsAuth] charge() success — transactionId: ${
|
|
355
|
-
this.postMessageHandler.sendCharge(this.config.appId, featureCode,
|
|
353
|
+
const data = await response.json();
|
|
354
|
+
console.warn(`[DotBotsAuth] charge() success — transactionId: ${data.transactionId}, amount: ${data.amount}`);
|
|
355
|
+
this.postMessageHandler.sendCharge(this.config.appId, featureCode, data.amount, data.transactionId);
|
|
356
356
|
this.emit('charged');
|
|
357
|
-
return
|
|
357
|
+
return data;
|
|
358
358
|
}
|
|
359
359
|
async logout() {
|
|
360
360
|
this.assertInitialized();
|
|
@@ -446,6 +446,6 @@ class DotBotsAuth {
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
DotBotsAuth.SDK_VERSION = '1.0.
|
|
449
|
+
DotBotsAuth.SDK_VERSION = '1.0.13';
|
|
450
450
|
|
|
451
451
|
export { DotBotsAuth, DotBotsAuthError };
|
|
@@ -8,7 +8,7 @@ export declare class DotBotsAuth {
|
|
|
8
8
|
private readonly listeners;
|
|
9
9
|
private cachedUser;
|
|
10
10
|
private initialized;
|
|
11
|
-
static readonly SDK_VERSION = "1.0.
|
|
11
|
+
static readonly SDK_VERSION = "1.0.13";
|
|
12
12
|
constructor(config: DotBotsConfig);
|
|
13
13
|
initialize(): Promise<void>;
|
|
14
14
|
getUser(): Promise<DotBotsUser>;
|
package/dist/types/index.js
CHANGED
|
@@ -350,11 +350,11 @@ class DotBotsAuth {
|
|
|
350
350
|
console.error(`[DotBotsAuth] charge() failed — HTTP ${response.status}`);
|
|
351
351
|
throw new DotBotsAuthError('NETWORK_ERROR', 'Payment request failed');
|
|
352
352
|
}
|
|
353
|
-
const
|
|
354
|
-
console.warn(`[DotBotsAuth] charge() success — transactionId: ${
|
|
355
|
-
this.postMessageHandler.sendCharge(this.config.appId, featureCode,
|
|
353
|
+
const data = await response.json();
|
|
354
|
+
console.warn(`[DotBotsAuth] charge() success — transactionId: ${data.transactionId}, amount: ${data.amount}`);
|
|
355
|
+
this.postMessageHandler.sendCharge(this.config.appId, featureCode, data.amount, data.transactionId);
|
|
356
356
|
this.emit('charged');
|
|
357
|
-
return
|
|
357
|
+
return data;
|
|
358
358
|
}
|
|
359
359
|
async logout() {
|
|
360
360
|
this.assertInitialized();
|
|
@@ -446,6 +446,6 @@ class DotBotsAuth {
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
DotBotsAuth.SDK_VERSION = '1.0.
|
|
449
|
+
DotBotsAuth.SDK_VERSION = '1.0.13';
|
|
450
450
|
|
|
451
451
|
export { DotBotsAuth, DotBotsAuthError };
|