@opexa/portal-sdk 0.59.73 → 0.59.75
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/README.md +1634 -1634
- package/dist/{chunk-7APXFZ5G.js → chunk-5WRVWQBT.js} +3 -3
- package/dist/chunk-5WRVWQBT.js.map +1 -0
- package/dist/{chunk-WVFSGB7Y.js → chunk-ROBGEUSE.js} +2 -2
- package/dist/chunk-ROBGEUSE.js.map +1 -0
- package/dist/{chunk-2KACCSX3.js → chunk-UT6VBXJ4.js} +35 -9
- package/dist/chunk-UT6VBXJ4.js.map +1 -0
- package/dist/index.cjs +46 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +32 -6
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +4 -3
- package/dist/services/index.d.ts +4 -3
- package/dist/services/index.js +2 -2
- package/dist/{types-C2Mdipgs.d.ts → types-Cmawo0zW.d.ts} +19 -1
- package/dist/{types-DXuCcBxY.d.cts → types-Dz4J_rhs.d.cts} +19 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-2KACCSX3.js.map +0 -1
- package/dist/chunk-7APXFZ5G.js.map +0 -1
- package/dist/chunk-WVFSGB7Y.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2763,6 +2763,7 @@ var REFERRAL_FRAGMENT = gql`
|
|
|
2763
2763
|
id
|
|
2764
2764
|
name
|
|
2765
2765
|
realName
|
|
2766
|
+
mobileNumber
|
|
2766
2767
|
}
|
|
2767
2768
|
level
|
|
2768
2769
|
turnover
|
|
@@ -2794,6 +2795,22 @@ var REFERRALS_QUERY = gql`
|
|
|
2794
2795
|
|
|
2795
2796
|
${REFERRAL_FRAGMENT}
|
|
2796
2797
|
`;
|
|
2798
|
+
var QUALIFIED_REFERRALS_QUERY = gql`
|
|
2799
|
+
query QualifiedReferrals($first: Int, $after: Cursor, $filter: ReferralFilterInput) {
|
|
2800
|
+
member {
|
|
2801
|
+
referrals(first: $first, after: $after, filter: $filter) {
|
|
2802
|
+
edges {
|
|
2803
|
+
node {
|
|
2804
|
+
... on Referral {
|
|
2805
|
+
id
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
2808
|
+
}
|
|
2809
|
+
totalCount
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
`;
|
|
2797
2814
|
var UPLINES_BY_NAME_QUERY = gql`
|
|
2798
2815
|
query UplinesByName($search: String!, $first: Int) {
|
|
2799
2816
|
uplinesByName(search: $search, first: $first) {
|
|
@@ -4521,11 +4538,14 @@ var AuthService = class {
|
|
|
4521
4538
|
headers.set("test-pass", input.testPass);
|
|
4522
4539
|
}
|
|
4523
4540
|
try {
|
|
4524
|
-
const res = await fetch(
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4541
|
+
const res = await fetch(
|
|
4542
|
+
`${this.url}${version === 3 ? "/v3/sessions" : "/sessions"}`,
|
|
4543
|
+
{
|
|
4544
|
+
method: "POST",
|
|
4545
|
+
headers,
|
|
4546
|
+
body: JSON.stringify(input)
|
|
4547
|
+
}
|
|
4548
|
+
);
|
|
4529
4549
|
const data = await res.json();
|
|
4530
4550
|
if (res.ok) {
|
|
4531
4551
|
return {
|
|
@@ -5294,6 +5314,10 @@ var ReportService = class {
|
|
|
5294
5314
|
const res = await this.client.request(REFERRALS_QUERY, variables);
|
|
5295
5315
|
return res.ok ? { ok: res.ok, data: res.data.member.referrals } : res;
|
|
5296
5316
|
}
|
|
5317
|
+
async qualifiedReferrals(variables) {
|
|
5318
|
+
const res = await this.client.request(QUALIFIED_REFERRALS_QUERY, variables);
|
|
5319
|
+
return res.ok ? { ok: res.ok, data: res.data.member.referrals } : res;
|
|
5320
|
+
}
|
|
5297
5321
|
async referralCommission() {
|
|
5298
5322
|
const res = await this.client.request(
|
|
5299
5323
|
REFERRAL_COMMISSION_QUERY
|
|
@@ -6527,7 +6551,9 @@ var ExtensionService = class {
|
|
|
6527
6551
|
};
|
|
6528
6552
|
}
|
|
6529
6553
|
async memberCabinetSiteMachine() {
|
|
6530
|
-
const res = await this.client.request(
|
|
6554
|
+
const res = await this.client.request(
|
|
6555
|
+
MEMBER_CABINET_SITE_MACHINE_QUERY
|
|
6556
|
+
);
|
|
6531
6557
|
return res.ok ? { ok: res.ok, data: res.data.memberCabinetSiteMachine } : res;
|
|
6532
6558
|
}
|
|
6533
6559
|
};
|
|
@@ -11858,6 +11884,20 @@ var Sdk = class {
|
|
|
11858
11884
|
}
|
|
11859
11885
|
};
|
|
11860
11886
|
}
|
|
11887
|
+
async qualifiedReferrals(input) {
|
|
11888
|
+
const res = await this.reportService.qualifiedReferrals({
|
|
11889
|
+
...input,
|
|
11890
|
+
filter: {
|
|
11891
|
+
...input?.filter,
|
|
11892
|
+
qualified: { equal: true }
|
|
11893
|
+
}
|
|
11894
|
+
});
|
|
11895
|
+
if (!res.ok) return res;
|
|
11896
|
+
return {
|
|
11897
|
+
ok: true,
|
|
11898
|
+
data: res.data.totalCount
|
|
11899
|
+
};
|
|
11900
|
+
}
|
|
11861
11901
|
async referralCommission() {
|
|
11862
11902
|
const res = await this.reportService.referralCommission();
|
|
11863
11903
|
if (!res.ok) return res;
|