@opexa/portal-sdk 0.52.8 → 0.53.0
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 +45 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +45 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2940,6 +2940,21 @@ var MEMBER_CABINET_SITE_MACHINE_QUERY = gql`
|
|
|
2940
2940
|
}
|
|
2941
2941
|
}
|
|
2942
2942
|
`;
|
|
2943
|
+
var CABINET_WITHDRAWAL_QUERY = gql`
|
|
2944
|
+
query CabinetWithdrawal($id: ObjectId!) {
|
|
2945
|
+
node(id: $id) {
|
|
2946
|
+
id
|
|
2947
|
+
... on CabinetWithdrawal {
|
|
2948
|
+
account
|
|
2949
|
+
type
|
|
2950
|
+
reference
|
|
2951
|
+
amount
|
|
2952
|
+
status
|
|
2953
|
+
dateTimeCreated
|
|
2954
|
+
}
|
|
2955
|
+
}
|
|
2956
|
+
}
|
|
2957
|
+
`;
|
|
2943
2958
|
|
|
2944
2959
|
// src/services/utils.ts
|
|
2945
2960
|
function createOperationError(code) {
|
|
@@ -5109,6 +5124,13 @@ var WalletService = class {
|
|
|
5109
5124
|
data: res.data.games
|
|
5110
5125
|
};
|
|
5111
5126
|
}
|
|
5127
|
+
async cabinetWithdrawal(variables) {
|
|
5128
|
+
const res = await this.client.request(
|
|
5129
|
+
CABINET_WITHDRAWAL_QUERY,
|
|
5130
|
+
variables
|
|
5131
|
+
);
|
|
5132
|
+
return res.ok ? { ok: res.ok, data: res.data.node } : res;
|
|
5133
|
+
}
|
|
5112
5134
|
};
|
|
5113
5135
|
|
|
5114
5136
|
// src/services/extension.service.ts
|
|
@@ -6403,6 +6425,7 @@ var Transformer = class {
|
|
|
6403
6425
|
announcement: this.announcement.bind(this),
|
|
6404
6426
|
withdrawalRecord: this.withdrawalRecord.bind(this),
|
|
6405
6427
|
deposit: this.deposit.bind(this),
|
|
6428
|
+
cabinetWithdrawal: this.cabinetWithdrawal.bind(this),
|
|
6406
6429
|
depositRecord: this.depositRecord.bind(this),
|
|
6407
6430
|
betRecord: this.betRecord.bind(this),
|
|
6408
6431
|
latestBetRecord: this.latestBetRecord.bind(this),
|
|
@@ -7869,6 +7892,19 @@ var Transformer = class {
|
|
|
7869
7892
|
}
|
|
7870
7893
|
};
|
|
7871
7894
|
}
|
|
7895
|
+
cabinetWithdrawal(data) {
|
|
7896
|
+
const o = {
|
|
7897
|
+
id: data.id,
|
|
7898
|
+
type: data.type,
|
|
7899
|
+
status: data.status,
|
|
7900
|
+
amount: data.amount,
|
|
7901
|
+
reference: data.reference,
|
|
7902
|
+
accountName: data.accountName,
|
|
7903
|
+
dateTimeCreated: data.dateTimeCreated,
|
|
7904
|
+
error: data.error ?? void 0
|
|
7905
|
+
};
|
|
7906
|
+
return compact(o);
|
|
7907
|
+
}
|
|
7872
7908
|
};
|
|
7873
7909
|
|
|
7874
7910
|
// src/sdk/sdk.ts
|
|
@@ -8318,7 +8354,7 @@ var Sdk = class {
|
|
|
8318
8354
|
}
|
|
8319
8355
|
/*
|
|
8320
8356
|
*=============================================
|
|
8321
|
-
*
|
|
8357
|
+
* EXTENSION
|
|
8322
8358
|
*=============================================
|
|
8323
8359
|
*/
|
|
8324
8360
|
async memberCabinetSiteMachine() {
|
|
@@ -8329,6 +8365,14 @@ var Sdk = class {
|
|
|
8329
8365
|
data: res.data ? this.transformer.transform.memberCabinetSiteMachine(res.data) : null
|
|
8330
8366
|
};
|
|
8331
8367
|
}
|
|
8368
|
+
async cabinetWithdrawalRecord(id) {
|
|
8369
|
+
const res = await this.walletService.cabinetWithdrawal({ id });
|
|
8370
|
+
if (!res.ok) return res;
|
|
8371
|
+
return {
|
|
8372
|
+
ok: true,
|
|
8373
|
+
data: res.data ? this.transformer.transform.cabinetWithdrawal(res.data) : null
|
|
8374
|
+
};
|
|
8375
|
+
}
|
|
8332
8376
|
/*
|
|
8333
8377
|
*=============================================
|
|
8334
8378
|
* PLATFORM
|