@opexa/portal-sdk 0.56.2 → 0.56.4
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/index.cjs +119 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -1
- package/dist/index.d.ts +59 -1
- package/dist/index.js +119 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1575,9 +1575,10 @@ var CLAIM_CASHBACK_BONUS_MUTATION = gql`
|
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
1577
1577
|
`;
|
|
1578
|
-
gql`
|
|
1578
|
+
var MEMBER_QUERY = gql`
|
|
1579
1579
|
query Member {
|
|
1580
1580
|
member {
|
|
1581
|
+
level
|
|
1581
1582
|
dateTimeLastActive
|
|
1582
1583
|
}
|
|
1583
1584
|
}
|
|
@@ -3229,6 +3230,53 @@ var MEMBER_VERIFICATION_REQUEST_AUTOMATIC_APPROVAL_ENABLED_QUERY = gql`
|
|
|
3229
3230
|
memberVerificationRequestAutomaticApprovalEnabled
|
|
3230
3231
|
}
|
|
3231
3232
|
`;
|
|
3233
|
+
var FREE_BET_DROPS_QUERY = gql`
|
|
3234
|
+
query FreeBetDrops($first: Int, $after: Cursor, $filter: FreeBetDropFilterInput, $sort: FreeBetDropSortInput) {
|
|
3235
|
+
freeBetDrops(first: $first, after: $after, filter: $filter, sort: $sort) {
|
|
3236
|
+
edges {
|
|
3237
|
+
cursor
|
|
3238
|
+
node {
|
|
3239
|
+
... on FreeBetDrop {
|
|
3240
|
+
id
|
|
3241
|
+
name
|
|
3242
|
+
description
|
|
3243
|
+
member {
|
|
3244
|
+
id
|
|
3245
|
+
name
|
|
3246
|
+
}
|
|
3247
|
+
promo {
|
|
3248
|
+
type
|
|
3249
|
+
name
|
|
3250
|
+
}
|
|
3251
|
+
gameProvider
|
|
3252
|
+
games {
|
|
3253
|
+
id
|
|
3254
|
+
name
|
|
3255
|
+
provider
|
|
3256
|
+
}
|
|
3257
|
+
payout
|
|
3258
|
+
bets
|
|
3259
|
+
betValue
|
|
3260
|
+
bonusMaximumAmount
|
|
3261
|
+
bonusAmountPercentage
|
|
3262
|
+
bonusTurnoverRequirementMultiplier
|
|
3263
|
+
status
|
|
3264
|
+
activationDateTime
|
|
3265
|
+
expirationDateTime
|
|
3266
|
+
dateTimeCreated
|
|
3267
|
+
dateTimeCompleted
|
|
3268
|
+
dateTimeLastUpdated
|
|
3269
|
+
}
|
|
3270
|
+
}
|
|
3271
|
+
|
|
3272
|
+
}
|
|
3273
|
+
pageInfo {
|
|
3274
|
+
hasNextPage
|
|
3275
|
+
endCursor
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
}
|
|
3279
|
+
`;
|
|
3232
3280
|
|
|
3233
3281
|
// src/services/utils.ts
|
|
3234
3282
|
function createOperationError(code) {
|
|
@@ -4636,6 +4684,14 @@ var ReportService = class {
|
|
|
4636
4684
|
);
|
|
4637
4685
|
return res.ok ? { ok: res.ok, data: res.data } : res;
|
|
4638
4686
|
}
|
|
4687
|
+
async freeBetDrops(input) {
|
|
4688
|
+
const res = await this.client.request(FREE_BET_DROPS_QUERY, input);
|
|
4689
|
+
return res.ok ? { ok: res.ok, data: res.data.freeBetDrops } : res;
|
|
4690
|
+
}
|
|
4691
|
+
async member() {
|
|
4692
|
+
const res = await this.client.request(MEMBER_QUERY);
|
|
4693
|
+
return res.ok ? { ok: res.ok, data: res.data.member } : res;
|
|
4694
|
+
}
|
|
4639
4695
|
};
|
|
4640
4696
|
|
|
4641
4697
|
// src/services/trigger.service.ts
|
|
@@ -6982,7 +7038,8 @@ var Transformer = class {
|
|
|
6982
7038
|
achievementSettings: this.achievementSettings.bind(this),
|
|
6983
7039
|
achievementPointsHistoryRecord: this.achievementPointsHistoryRecord.bind(this),
|
|
6984
7040
|
memberAchievements: this.memberAchievements.bind(this),
|
|
6985
|
-
memberVerificationRequest: this.memberVerificationRequest.bind(this)
|
|
7041
|
+
memberVerificationRequest: this.memberVerificationRequest.bind(this),
|
|
7042
|
+
freeBetDrops: this.freeBetDrops.bind(this)
|
|
6986
7043
|
};
|
|
6987
7044
|
}
|
|
6988
7045
|
site(data) {
|
|
@@ -7804,7 +7861,9 @@ var Transformer = class {
|
|
|
7804
7861
|
googleId: data.googleId,
|
|
7805
7862
|
domain: data.domain ?? null,
|
|
7806
7863
|
branchCode: data.branchCode ?? void 0,
|
|
7807
|
-
agent: data.agent ?? null
|
|
7864
|
+
agent: data.agent ?? null,
|
|
7865
|
+
level: data.level ?? 0,
|
|
7866
|
+
dateTimeLastActive: data.dateTimeLastActive ? new Date(data.dateTimeLastActive) : void 0
|
|
7808
7867
|
};
|
|
7809
7868
|
return compact(o);
|
|
7810
7869
|
}
|
|
@@ -7933,6 +7992,32 @@ var Transformer = class {
|
|
|
7933
7992
|
};
|
|
7934
7993
|
return compact(o);
|
|
7935
7994
|
}
|
|
7995
|
+
freeBetDrops(data) {
|
|
7996
|
+
const o = {
|
|
7997
|
+
id: data.id,
|
|
7998
|
+
bets: parseDecimal(data.bets, 0),
|
|
7999
|
+
payout: data.payout,
|
|
8000
|
+
activationDateTime: new Date(data.activationDateTime),
|
|
8001
|
+
expirationDateTime: new Date(data.expirationDateTime),
|
|
8002
|
+
betValue: data.betValue,
|
|
8003
|
+
bonus: data.bonus,
|
|
8004
|
+
remainingBets: parseDecimal(data.remainingBets, 0),
|
|
8005
|
+
member: data.member,
|
|
8006
|
+
name: data.name,
|
|
8007
|
+
promo: data.promo,
|
|
8008
|
+
bonusMaximumAmount: data.bonusMaximumAmount,
|
|
8009
|
+
bonusAmountPercentage: data.bonusAmountPercentage,
|
|
8010
|
+
bonusTurnoverRequirementMultiplier: data.bonusTurnoverRequirementMultiplier,
|
|
8011
|
+
description: data.description,
|
|
8012
|
+
gameProvider: data.gameProvider,
|
|
8013
|
+
games: data.games,
|
|
8014
|
+
status: data.status,
|
|
8015
|
+
dateTimeCompleted: data.dateTimeCompleted ? new Date(data.dateTimeCompleted) : void 0,
|
|
8016
|
+
dateTimeCreated: new Date(data.dateTimeCreated),
|
|
8017
|
+
dateTimeLastUpdated: new Date(data.dateTimeLastUpdated)
|
|
8018
|
+
};
|
|
8019
|
+
return compact(o);
|
|
8020
|
+
}
|
|
7936
8021
|
latestBetRecord(data) {
|
|
7937
8022
|
const o = {
|
|
7938
8023
|
id: data.id,
|
|
@@ -8476,7 +8561,10 @@ var Sdk = class {
|
|
|
8476
8561
|
async init() {
|
|
8477
8562
|
const res = await this.accountService.memberAccount();
|
|
8478
8563
|
if (res.ok) {
|
|
8479
|
-
const accountData = this.transformer.transform.account(
|
|
8564
|
+
const accountData = this.transformer.transform.account({
|
|
8565
|
+
...res.data,
|
|
8566
|
+
level: 0
|
|
8567
|
+
});
|
|
8480
8568
|
this.memberDomain = accountData?.domain ?? null;
|
|
8481
8569
|
}
|
|
8482
8570
|
}
|
|
@@ -9011,11 +9099,18 @@ var Sdk = class {
|
|
|
9011
9099
|
*=============================================
|
|
9012
9100
|
*/
|
|
9013
9101
|
async account() {
|
|
9014
|
-
const
|
|
9015
|
-
|
|
9102
|
+
const [a, b] = await Promise.all([
|
|
9103
|
+
this.accountService.memberAccount(),
|
|
9104
|
+
this.reportService.member()
|
|
9105
|
+
]);
|
|
9106
|
+
if (!a.ok) return a;
|
|
9107
|
+
if (!b.ok) return b;
|
|
9016
9108
|
return {
|
|
9017
9109
|
ok: true,
|
|
9018
|
-
data: this.transformer.transform.account(
|
|
9110
|
+
data: this.transformer.transform.account({
|
|
9111
|
+
...a.data,
|
|
9112
|
+
...b.data
|
|
9113
|
+
})
|
|
9019
9114
|
};
|
|
9020
9115
|
}
|
|
9021
9116
|
/**
|
|
@@ -9113,6 +9208,7 @@ var Sdk = class {
|
|
|
9113
9208
|
input: {
|
|
9114
9209
|
id,
|
|
9115
9210
|
mobileNumber: addAreaCode(input.mobileNumber, await this.locale),
|
|
9211
|
+
mobileNumberVerificationCode: input.mobileNumberVerificationCode,
|
|
9116
9212
|
emailAddress: input.emailAddress,
|
|
9117
9213
|
branchCode: input.branchCode
|
|
9118
9214
|
},
|
|
@@ -9902,6 +9998,22 @@ var Sdk = class {
|
|
|
9902
9998
|
})
|
|
9903
9999
|
};
|
|
9904
10000
|
}
|
|
10001
|
+
async freeBetDrops(input) {
|
|
10002
|
+
const res = await this.reportService.freeBetDrops(input);
|
|
10003
|
+
if (!res.ok) return res;
|
|
10004
|
+
return {
|
|
10005
|
+
ok: true,
|
|
10006
|
+
data: {
|
|
10007
|
+
freeBetDrops: res.data.edges.map(({ cursor, node }) => ({
|
|
10008
|
+
...this.transformer.transform.freeBetDrops(node),
|
|
10009
|
+
cursor
|
|
10010
|
+
})),
|
|
10011
|
+
totalCount: res.data.totalCount,
|
|
10012
|
+
endCursor: res.data.pageInfo.endCursor ?? void 0,
|
|
10013
|
+
hasNextPage: res.data.pageInfo.hasNextPage
|
|
10014
|
+
}
|
|
10015
|
+
};
|
|
10016
|
+
}
|
|
9905
10017
|
/*
|
|
9906
10018
|
*=============================================
|
|
9907
10019
|
* TRANSACTION
|