@smartico/public-api 0.0.397 → 0.0.398

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.
@@ -334,8 +334,9 @@ export declare class WSAPIMiniGames extends WSAPIRaffles {
334
334
  * }
335
335
  * ```
336
336
  */
337
- playMiniGame(template_id: number, { onUpdate }?: {
337
+ playMiniGame(template_id: number, { onUpdate, acknowledge }?: {
338
338
  onUpdate?: (data: TMiniGameTemplate[]) => void;
339
+ acknowledge?: boolean;
339
340
  }): Promise<TMiniGamePlayResult>;
340
341
  /**
341
342
  * Manually acknowledges a mini-game spin — marks the spin as
package/dist/index.js CHANGED
@@ -7457,21 +7457,31 @@ var WSAPIMiniGames = /*#__PURE__*/function (_WSAPIRaffles) {
7457
7457
  * ```
7458
7458
  */
7459
7459
  ;
7460
- _proto.playMiniGame = function playMiniGame(template_id, _temp2) {
7461
- var _ref3 = _temp2 === void 0 ? {} : _temp2,
7462
- onUpdate = _ref3.onUpdate;
7460
+ _proto.playMiniGame = function playMiniGame(template_id, _temp4) {
7461
+ var _ref3 = _temp4 === void 0 ? {} : _temp4,
7462
+ onUpdate = _ref3.onUpdate,
7463
+ _ref3$acknowledge = _ref3.acknowledge,
7464
+ acknowledge = _ref3$acknowledge === void 0 ? true : _ref3$acknowledge;
7463
7465
  try {
7464
7466
  var _this3 = this;
7465
7467
  if (typeof onUpdate === 'function') {
7466
7468
  _this3.onUpdateCallback.set(onUpdateContextKey.Saw, onUpdate);
7467
7469
  }
7468
7470
  return Promise.resolve(_this3.api.sawSpinRequest(_this3.userExtId, template_id)).then(function (r) {
7469
- var o = {
7470
- err_code: r.errCode,
7471
- err_message: r.errMsg,
7472
- prize_id: r.saw_prize_id
7473
- };
7474
- return o;
7471
+ function _temp3() {
7472
+ var o = {
7473
+ err_code: r.errCode,
7474
+ err_message: r.errMsg,
7475
+ prize_id: r.saw_prize_id
7476
+ };
7477
+ return o;
7478
+ }
7479
+ var _temp2 = function () {
7480
+ if (acknowledge) {
7481
+ return Promise.resolve(_this3.api.doAcknowledgeRequest(_this3.userExtId, r.request_id)).then(function () {});
7482
+ }
7483
+ }();
7484
+ return _temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2);
7475
7485
  });
7476
7486
  } catch (e) {
7477
7487
  return Promise.reject(e);
@@ -7651,8 +7661,8 @@ var WSAPIMiniGames = /*#__PURE__*/function (_WSAPIRaffles) {
7651
7661
  * ```
7652
7662
  */
7653
7663
  ;
7654
- _proto.playMiniGameBatch = function playMiniGameBatch(template_id, spin_count, _temp3) {
7655
- var _ref4 = _temp3 === void 0 ? {} : _temp3,
7664
+ _proto.playMiniGameBatch = function playMiniGameBatch(template_id, spin_count, _temp5) {
7665
+ var _ref4 = _temp5 === void 0 ? {} : _temp5,
7656
7666
  onUpdate = _ref4.onUpdate;
7657
7667
  try {
7658
7668
  var _this5 = this;