@opexa/portal-sdk 0.51.8 → 0.52.1
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 +71 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +71 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -389,6 +389,19 @@ var WITHDRAWAL_RECORDS_QUERY = gql`
|
|
|
389
389
|
dateTimeCreated
|
|
390
390
|
dateTimeLastUpdated
|
|
391
391
|
}
|
|
392
|
+
... on CabinetWithdrawalRecord {
|
|
393
|
+
id
|
|
394
|
+
type
|
|
395
|
+
fee
|
|
396
|
+
netAmount
|
|
397
|
+
reference
|
|
398
|
+
amount
|
|
399
|
+
status
|
|
400
|
+
error
|
|
401
|
+
serialCode
|
|
402
|
+
dateTimeCreated
|
|
403
|
+
dateTimeLastUpdated
|
|
404
|
+
}
|
|
392
405
|
}
|
|
393
406
|
}
|
|
394
407
|
totalCount
|
|
@@ -660,6 +673,20 @@ var CREATE_MANUAL_BANK_WITHDRAWAL_MUTATION = gql`
|
|
|
660
673
|
}
|
|
661
674
|
}
|
|
662
675
|
`;
|
|
676
|
+
var CREATE_CABINET_WITHDRAWAL_MUTATION = gql`
|
|
677
|
+
mutation CreateCabinetWithdrawal($input: CreateCabinetWithdrawalInput!) {
|
|
678
|
+
createCabinetWithdrawal(input: $input) {
|
|
679
|
+
... on InsufficientFundsError {
|
|
680
|
+
__typename
|
|
681
|
+
message
|
|
682
|
+
}
|
|
683
|
+
... on PlatformDoesNotExistError {
|
|
684
|
+
__typename
|
|
685
|
+
message
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
`;
|
|
663
690
|
var INSTAPAY_BANK_LIST_QUERY = gql`
|
|
664
691
|
query InstapayBankList {
|
|
665
692
|
instapayBankList {
|
|
@@ -5030,6 +5057,32 @@ var WalletService = class {
|
|
|
5030
5057
|
}
|
|
5031
5058
|
};
|
|
5032
5059
|
|
|
5060
|
+
// src/services/extension.service.ts
|
|
5061
|
+
var ExtensionService = class {
|
|
5062
|
+
client;
|
|
5063
|
+
constructor(client) {
|
|
5064
|
+
this.client = client;
|
|
5065
|
+
}
|
|
5066
|
+
async createCabinetWithdrawal(variables) {
|
|
5067
|
+
const { ...others } = variables;
|
|
5068
|
+
const res = await this.client.request(CREATE_CABINET_WITHDRAWAL_MUTATION, others, {
|
|
5069
|
+
headers: {}
|
|
5070
|
+
});
|
|
5071
|
+
if (!res.ok) return res;
|
|
5072
|
+
if (res.data.createCabinetWithdrawal) {
|
|
5073
|
+
return {
|
|
5074
|
+
ok: false,
|
|
5075
|
+
error: createOperationError(
|
|
5076
|
+
res.data.createCabinetWithdrawal.__typename
|
|
5077
|
+
)
|
|
5078
|
+
};
|
|
5079
|
+
}
|
|
5080
|
+
return {
|
|
5081
|
+
ok: true
|
|
5082
|
+
};
|
|
5083
|
+
}
|
|
5084
|
+
};
|
|
5085
|
+
|
|
5033
5086
|
// src/utils/clone-date.ts
|
|
5034
5087
|
function cloneDate(date) {
|
|
5035
5088
|
return new Date(date.getTime());
|
|
@@ -7770,6 +7823,7 @@ var Sdk = class {
|
|
|
7770
7823
|
gameService;
|
|
7771
7824
|
fileService;
|
|
7772
7825
|
walletService;
|
|
7826
|
+
extensionService;
|
|
7773
7827
|
accountService;
|
|
7774
7828
|
reportService;
|
|
7775
7829
|
portalService;
|
|
@@ -7803,6 +7857,7 @@ var Sdk = class {
|
|
|
7803
7857
|
const transformer = new Transformer();
|
|
7804
7858
|
const authUrl = ENDPOINTS[environment].auth;
|
|
7805
7859
|
const walletUrl = ENDPOINTS[environment].wallet;
|
|
7860
|
+
const extensionUrl = ENDPOINTS[environment].extension;
|
|
7806
7861
|
const reportUrl = ENDPOINTS[environment].report;
|
|
7807
7862
|
const accountUrl = ENDPOINTS[environment].account;
|
|
7808
7863
|
const portalUrl = ENDPOINTS[environment].portal;
|
|
@@ -7837,6 +7892,9 @@ var Sdk = class {
|
|
|
7837
7892
|
const gameService = new GameService(
|
|
7838
7893
|
new GraphQLClient(gameUrl, graphqlClientConfig)
|
|
7839
7894
|
);
|
|
7895
|
+
const extensionService = new ExtensionService(
|
|
7896
|
+
new GraphQLClient(extensionUrl, graphqlClientConfig)
|
|
7897
|
+
);
|
|
7840
7898
|
const fileService = new FileService(
|
|
7841
7899
|
new GraphQLClient(fileUrl, graphqlClientConfig)
|
|
7842
7900
|
);
|
|
@@ -7882,6 +7940,7 @@ var Sdk = class {
|
|
|
7882
7940
|
this.transformer = transformer;
|
|
7883
7941
|
this.authService = authService;
|
|
7884
7942
|
this.gameService = gameService;
|
|
7943
|
+
this.extensionService = extensionService;
|
|
7885
7944
|
this.fileService = fileService;
|
|
7886
7945
|
this.walletService = walletService;
|
|
7887
7946
|
this.accountService = accountService;
|
|
@@ -8545,6 +8604,15 @@ var Sdk = class {
|
|
|
8545
8604
|
});
|
|
8546
8605
|
if (!res.ok) return res;
|
|
8547
8606
|
}
|
|
8607
|
+
if (input.type === "CABINET") {
|
|
8608
|
+
const res = await this.extensionService.createCabinetWithdrawal({
|
|
8609
|
+
input: {
|
|
8610
|
+
id,
|
|
8611
|
+
amount: input.amount.toString()
|
|
8612
|
+
}
|
|
8613
|
+
});
|
|
8614
|
+
if (!res.ok) return res;
|
|
8615
|
+
}
|
|
8548
8616
|
if (input.type === "GCASH") {
|
|
8549
8617
|
const res = await this.walletService.createGCashWithdrawal({
|
|
8550
8618
|
input: {
|
|
@@ -9726,6 +9794,7 @@ var ENDPOINTS = {
|
|
|
9726
9794
|
development: {
|
|
9727
9795
|
auth: "https://auth.development.opexa.io",
|
|
9728
9796
|
game: "https://game.development.opexa.io/graphql",
|
|
9797
|
+
extension: "https://extension.development.opexa.io/graphql",
|
|
9729
9798
|
file: "https://file.development.opexa.io/graphql",
|
|
9730
9799
|
report: "https://report.development.opexa.io/graphql",
|
|
9731
9800
|
wallet: "https://wallet.development.opexa.io/graphql",
|
|
@@ -9739,6 +9808,7 @@ var ENDPOINTS = {
|
|
|
9739
9808
|
production: {
|
|
9740
9809
|
auth: "https://auth.opexa.io",
|
|
9741
9810
|
game: "https://game.opexa.io/graphql",
|
|
9811
|
+
extension: "https://extension.opexa.io/graphql",
|
|
9742
9812
|
file: "https://file.opexa.io/graphql",
|
|
9743
9813
|
report: "https://report.opexa.io/graphql",
|
|
9744
9814
|
wallet: "https://wallet.opexa.io/graphql",
|
|
@@ -9752,6 +9822,7 @@ var ENDPOINTS = {
|
|
|
9752
9822
|
staging: {
|
|
9753
9823
|
auth: "https://auth.staging.atalos.io",
|
|
9754
9824
|
game: "https://game.staging.atalos.io/graphql",
|
|
9825
|
+
extension: "https://extension.staging.atalos.io/graphql",
|
|
9755
9826
|
file: "https://file.staging.atalos.io/graphql",
|
|
9756
9827
|
report: "https://report.staging.atalos.io/graphql",
|
|
9757
9828
|
wallet: "https://wallet.staging.atalos.io/graphql",
|