@opexa/portal-sdk 0.59.43 → 0.59.45
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-IX2MIQGU.js +6232 -0
- package/dist/chunk-IX2MIQGU.js.map +1 -0
- package/dist/index.cjs +89 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +113 -2233
- package/dist/index.d.ts +113 -2233
- package/dist/index.js +52 -6195
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +6243 -0
- package/dist/services/index.cjs.map +1 -0
- package/dist/services/index.d.cts +315 -0
- package/dist/services/index.d.ts +315 -0
- package/dist/services/index.js +3 -0
- package/dist/services/index.js.map +1 -0
- package/dist/types-DvDyLFZr.d.cts +4538 -0
- package/dist/types-DvDyLFZr.d.ts +4538 -0
- package/package.json +17 -1
package/dist/index.cjs
CHANGED
|
@@ -190,6 +190,50 @@ var MEMBER_REBATES_QUERY = gql`
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
`;
|
|
193
|
+
var MEMBER_REBATE_CONTRIBUTION_QUERY = gql`
|
|
194
|
+
query MemberRebateContribution(
|
|
195
|
+
$first: Int
|
|
196
|
+
$after: Cursor
|
|
197
|
+
$filter: RebateFilterInput
|
|
198
|
+
$sort: RebateSortInput
|
|
199
|
+
) {
|
|
200
|
+
member {
|
|
201
|
+
rebates(first: $first, after: $after, filter: $filter, sort: $sort) {
|
|
202
|
+
edges {
|
|
203
|
+
cursor
|
|
204
|
+
node {
|
|
205
|
+
... on Rebate {
|
|
206
|
+
id
|
|
207
|
+
rebatesPerGameCategory {
|
|
208
|
+
gameProvider
|
|
209
|
+
gameType
|
|
210
|
+
percentage
|
|
211
|
+
loss
|
|
212
|
+
turnover
|
|
213
|
+
rebate
|
|
214
|
+
}
|
|
215
|
+
rebatesPerGame {
|
|
216
|
+
game {
|
|
217
|
+
id
|
|
218
|
+
name
|
|
219
|
+
}
|
|
220
|
+
percentage
|
|
221
|
+
loss
|
|
222
|
+
turnover
|
|
223
|
+
rebate
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
totalCount
|
|
229
|
+
pageInfo {
|
|
230
|
+
hasNextPage
|
|
231
|
+
endCursor
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
`;
|
|
193
237
|
var ACHIEVEMENT_POINTS_HISTORY_RECORD_QUERY = gql`
|
|
194
238
|
query AchievementPointsHistoryRecords(
|
|
195
239
|
$first: Int
|
|
@@ -4992,6 +5036,10 @@ var ReportService = class {
|
|
|
4992
5036
|
const res = await this.client.request(MEMBER_REBATES_QUERY, variables);
|
|
4993
5037
|
return res.ok ? { ok: res.ok, data: res.data.member.rebates } : res;
|
|
4994
5038
|
}
|
|
5039
|
+
async memberRebateContribution(variables) {
|
|
5040
|
+
const res = await this.client.request(MEMBER_REBATE_CONTRIBUTION_QUERY, variables);
|
|
5041
|
+
return res.ok ? { ok: res.ok, data: res.data.member.rebates } : res;
|
|
5042
|
+
}
|
|
4995
5043
|
async achievementPointsHistoryRecord(variables) {
|
|
4996
5044
|
const res = await this.client.request(ACHIEVEMENT_POINTS_HISTORY_RECORD_QUERY, variables);
|
|
4997
5045
|
return res.ok ? { ok: res.ok, data: res.data.achievementPointsHistoryRecords } : res;
|
|
@@ -7526,7 +7574,7 @@ function parseDecimal(value, fallback) {
|
|
|
7526
7574
|
}
|
|
7527
7575
|
|
|
7528
7576
|
// src/sdk/transformer.ts
|
|
7529
|
-
var IMAGE_CACHE_ID = "
|
|
7577
|
+
var IMAGE_CACHE_ID = "5".padStart(8, "0");
|
|
7530
7578
|
var Transformer = class {
|
|
7531
7579
|
get transform() {
|
|
7532
7580
|
return {
|
|
@@ -7555,6 +7603,7 @@ var Transformer = class {
|
|
|
7555
7603
|
pointsWallet: this.pointsWallet.bind(this),
|
|
7556
7604
|
pointsWalletTransaction: this.pointsWalletTransaction.bind(this),
|
|
7557
7605
|
rebate: this.rebate.bind(this),
|
|
7606
|
+
memberRebateContribution: this.memberRebateContribution.bind(this),
|
|
7558
7607
|
activityRecord: this.activityRecord.bind(this),
|
|
7559
7608
|
referral: this.referral.bind(this),
|
|
7560
7609
|
referralCommission: this.referralCommission.bind(this),
|
|
@@ -9196,6 +9245,28 @@ var Transformer = class {
|
|
|
9196
9245
|
}
|
|
9197
9246
|
};
|
|
9198
9247
|
}
|
|
9248
|
+
memberRebateContribution(data) {
|
|
9249
|
+
return {
|
|
9250
|
+
id: data.id,
|
|
9251
|
+
rebatesPerGameCategory: data.rebatesPerGameCategory.map((item) => ({
|
|
9252
|
+
gameProvider: item.gameProvider,
|
|
9253
|
+
gameType: item.gameType,
|
|
9254
|
+
percentage: parseDecimal(item.percentage, 0),
|
|
9255
|
+
loss: parseDecimal(item.loss),
|
|
9256
|
+
turnover: parseDecimal(item.turnover),
|
|
9257
|
+
rebate: parseDecimal(item.rebate, 0)
|
|
9258
|
+
})),
|
|
9259
|
+
rebatesPerGame: data.rebatesPerGame.map(
|
|
9260
|
+
(item) => compact({
|
|
9261
|
+
game: item.game,
|
|
9262
|
+
percentage: parseDecimal(item.percentage, 0),
|
|
9263
|
+
loss: parseDecimal(item.loss),
|
|
9264
|
+
turnover: parseDecimal(item.turnover),
|
|
9265
|
+
rebate: parseDecimal(item.rebate, 0)
|
|
9266
|
+
})
|
|
9267
|
+
)
|
|
9268
|
+
};
|
|
9269
|
+
}
|
|
9199
9270
|
cabinetWithdrawal(data) {
|
|
9200
9271
|
const o = {
|
|
9201
9272
|
id: data.id,
|
|
@@ -11298,6 +11369,22 @@ var Sdk = class {
|
|
|
11298
11369
|
}
|
|
11299
11370
|
};
|
|
11300
11371
|
}
|
|
11372
|
+
async memberRebateContribution(input) {
|
|
11373
|
+
const res = await this.reportService.memberRebateContribution(input);
|
|
11374
|
+
if (!res.ok) return res;
|
|
11375
|
+
return {
|
|
11376
|
+
ok: true,
|
|
11377
|
+
data: {
|
|
11378
|
+
rebates: res.data.edges.map(({ cursor, node }) => ({
|
|
11379
|
+
...this.transformer.transform.memberRebateContribution(node),
|
|
11380
|
+
cursor
|
|
11381
|
+
})),
|
|
11382
|
+
totalCount: res.data.totalCount,
|
|
11383
|
+
endCursor: res.data.pageInfo.endCursor ?? void 0,
|
|
11384
|
+
hasNextPage: res.data.pageInfo.hasNextPage
|
|
11385
|
+
}
|
|
11386
|
+
};
|
|
11387
|
+
}
|
|
11301
11388
|
/*
|
|
11302
11389
|
*=============================================
|
|
11303
11390
|
* ACTIVITY RECORD
|
|
@@ -11801,5 +11888,6 @@ Object.defineProperty(exports, "ObjectId", {
|
|
|
11801
11888
|
});
|
|
11802
11889
|
exports.ObjectType = ObjectType;
|
|
11803
11890
|
exports.Sdk = Sdk;
|
|
11891
|
+
exports.Transformer = Transformer;
|
|
11804
11892
|
//# sourceMappingURL=index.cjs.map
|
|
11805
11893
|
//# sourceMappingURL=index.cjs.map
|