@opexa/portal-sdk 0.59.47 → 0.59.48
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/{chunk-LRFLE5E6.js → chunk-TFG2D5CR.js} +27 -2
- package/dist/chunk-TFG2D5CR.js.map +1 -0
- package/dist/index.cjs +37 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -3
- package/dist/index.d.ts +48 -3
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +25 -0
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +6 -2
- package/dist/services/index.d.ts +6 -2
- package/dist/services/index.js +1 -1
- package/dist/{types-DaaT487t.d.cts → types-DF4cppjz.d.cts} +10 -1
- package/dist/{types-DaaT487t.d.ts → types-DF4cppjz.d.ts} +10 -1
- package/package.json +15 -1
- package/dist/chunk-LRFLE5E6.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1618,6 +1618,19 @@ var CASHBACKS_QUERY = gql`
|
|
|
1618
1618
|
}
|
|
1619
1619
|
}
|
|
1620
1620
|
`;
|
|
1621
|
+
var PROMOS_AND_CASHBACKS_QUERY = gql`
|
|
1622
|
+
${CASHBACK_FRAGMENT}
|
|
1623
|
+
${PROMO_FRAGMENT}
|
|
1624
|
+
|
|
1625
|
+
query PromosAndCashbacks {
|
|
1626
|
+
cashbacks {
|
|
1627
|
+
...CashbackFragment
|
|
1628
|
+
}
|
|
1629
|
+
promos {
|
|
1630
|
+
...PromoFragment
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
`;
|
|
1621
1634
|
var BONUS_QUERY = gql`
|
|
1622
1635
|
${PROMO_FRAGMENT}
|
|
1623
1636
|
|
|
@@ -5309,6 +5322,18 @@ var WalletService = class {
|
|
|
5309
5322
|
const res = await this.client.request(CASHBACKS_QUERY);
|
|
5310
5323
|
return res.ok ? { ok: res.ok, data: res.data.cashbacks } : res;
|
|
5311
5324
|
}
|
|
5325
|
+
async promosAndCashbacks() {
|
|
5326
|
+
const res = await this.client.request(
|
|
5327
|
+
PROMOS_AND_CASHBACKS_QUERY
|
|
5328
|
+
);
|
|
5329
|
+
return res.ok ? {
|
|
5330
|
+
ok: res.ok,
|
|
5331
|
+
data: {
|
|
5332
|
+
promos: res.data.promos,
|
|
5333
|
+
cashbacks: res.data.cashbacks
|
|
5334
|
+
}
|
|
5335
|
+
} : res;
|
|
5336
|
+
}
|
|
5312
5337
|
async availablePromos(variables) {
|
|
5313
5338
|
const res = await this.client.request(AVAILABLE_PROMOS_QUERY, variables);
|
|
5314
5339
|
return res.ok ? { ok: res.ok, data: res.data.availablePromos } : res;
|
|
@@ -10950,6 +10975,17 @@ var Sdk = class {
|
|
|
10950
10975
|
data: res.data.map(this.transformer.transform.cashback)
|
|
10951
10976
|
};
|
|
10952
10977
|
}
|
|
10978
|
+
async promosAndCashbacks() {
|
|
10979
|
+
const res = await this.walletService.promosAndCashbacks();
|
|
10980
|
+
if (!res.ok) return res;
|
|
10981
|
+
return {
|
|
10982
|
+
ok: true,
|
|
10983
|
+
data: {
|
|
10984
|
+
promos: res.data.promos.map(this.transformer.transform.promo),
|
|
10985
|
+
cashbacks: res.data.cashbacks.map(this.transformer.transform.cashback)
|
|
10986
|
+
}
|
|
10987
|
+
};
|
|
10988
|
+
}
|
|
10953
10989
|
/** @deprecated */
|
|
10954
10990
|
async bonus() {
|
|
10955
10991
|
console.warn("'bonus' is deprecated. Please use 'bonuses' instead.");
|
|
@@ -11859,6 +11895,7 @@ Object.defineProperty(exports, "ObjectId", {
|
|
|
11859
11895
|
enumerable: true,
|
|
11860
11896
|
get: function () { return objectId.ObjectId; }
|
|
11861
11897
|
});
|
|
11898
|
+
exports.ENDPOINTS = ENDPOINTS;
|
|
11862
11899
|
exports.ObjectType = ObjectType;
|
|
11863
11900
|
exports.Sdk = Sdk;
|
|
11864
11901
|
exports.Transformer = Transformer;
|