@smartico/public-api 0.0.240 → 0.0.241

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.
@@ -604,7 +604,17 @@ export interface TTournamentRegistrationResult {
604
604
  err_message: string;
605
605
  }
606
606
  export interface TBuyStoreItemResult {
607
- /** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0 */
607
+ /** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0
608
+ *
609
+ * Example for error handling:
610
+ * ```javascript
611
+ * SmarticoAPI.buyStoreItem(item_id).then(res => {
612
+ * if (res.err_code !== 0) {
613
+ * // YOUR LOGIC HERE, you can use res.err_message, but it's optional and not always present
614
+ * }
615
+ * });
616
+ * ```
617
+ */
608
618
  err_code: BuyStoreItemErrorCode;
609
619
  /** Optional error message */
610
620
  err_message: string;
@@ -6,7 +6,16 @@
6
6
 
7
7
  • **err\_code**: [`BuyStoreItemErrorCode`](../enums/BuyStoreItemErrorCode.md)
8
8
 
9
- Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0
9
+ Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0
10
+
11
+ Example for error handling:
12
+ ```javascript
13
+ SmarticoAPI.buyStoreItem(item_id).then(res => {
14
+ if (res.err_code !== 0) {
15
+ // YOUR LOGIC HERE, you can use res.err_message, but it's optional and not always present
16
+ }
17
+ });
18
+ ```
10
19
 
11
20
  ___
12
21
 
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## Properties
4
4
 
5
+ ### id
6
+
7
+ • **id**: `number`
8
+
9
+ The ID of the custom section
10
+
11
+ ___
12
+
5
13
  ### body
6
14
 
7
15
  • `Optional` **body**: `string`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.240",
3
+ "version": "0.0.241",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -670,7 +670,17 @@ export interface TTournamentRegistrationResult {
670
670
  }
671
671
 
672
672
  export interface TBuyStoreItemResult {
673
- /** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0 */
673
+ /** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0
674
+ *
675
+ * Example for error handling:
676
+ * ```javascript
677
+ * SmarticoAPI.buyStoreItem(item_id).then(res => {
678
+ * if (res.err_code !== 0) {
679
+ * // YOUR LOGIC HERE, you can use res.err_message, but it's optional and not always present
680
+ * }
681
+ * });
682
+ * ```
683
+ */
674
684
  err_code: BuyStoreItemErrorCode;
675
685
  /** Optional error message */
676
686
  err_message: string;