@connect-plus-online/ogabai-integrations 0.0.67 → 0.0.69
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.js +2024 -1908
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +77 -8
- package/dist/index.d.ts +77 -8
- package/dist/index.esm.js +2021 -1909
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -555,454 +555,541 @@ var userAccountListIntegration = createListIntegration({
|
|
|
555
555
|
});
|
|
556
556
|
var userAccountDeleteIntegration = createDeleteIntegration(ENTITY);
|
|
557
557
|
|
|
558
|
-
// src/services/
|
|
559
|
-
var
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
"restockCounts",
|
|
575
|
-
"saleCounts",
|
|
576
|
-
"stockValue",
|
|
577
|
-
"transactionCounts"
|
|
578
|
-
];
|
|
579
|
-
var getUserDashStatsResponseNestedFields = {
|
|
580
|
-
productCounts: productCountsQuery,
|
|
581
|
-
restockCounts: restockCountsQuery,
|
|
582
|
-
saleCounts: saleCountsQuery,
|
|
583
|
-
transactionCounts: transactionCountsQuery
|
|
584
|
-
};
|
|
585
|
-
var getUserResponse = [
|
|
586
|
-
"user"
|
|
587
|
-
];
|
|
588
|
-
var _getUserResponseNestedFields = {
|
|
589
|
-
address: addressQuery
|
|
590
|
-
};
|
|
591
|
-
var getUserResponseNestedFields = {
|
|
592
|
-
user: userQuery,
|
|
593
|
-
..._getUserResponseNestedFields
|
|
594
|
-
};
|
|
595
|
-
var getUsersResponse = [
|
|
596
|
-
"users"
|
|
597
|
-
];
|
|
598
|
-
var getUsersResponseNestedFields = {
|
|
599
|
-
users: userQuery,
|
|
600
|
-
..._getUserResponseNestedFields
|
|
601
|
-
};
|
|
602
|
-
var updateUserResponse = [
|
|
603
|
-
"uploadImageResponse",
|
|
604
|
-
"user"
|
|
605
|
-
];
|
|
606
|
-
var updateUserResponseNestedFields = {
|
|
607
|
-
uploadImageResponse: ["fileUrl", "url"],
|
|
608
|
-
user: userQuery
|
|
558
|
+
// src/services/subscription/schemas/paystack.schema.ts
|
|
559
|
+
var paystackSchema = {
|
|
560
|
+
paystackInitializeSubscription: (query) => `
|
|
561
|
+
mutation paystackInitializeSubscription($userId: String!, $planId: String!, $subscriptionFrequencyType: SubscriptionFrequencyTypeEnum!) {
|
|
562
|
+
paystackInitializeSubscription(userId: $userId, planId: $planId, subscriptionFrequencyType: $subscriptionFrequencyType) {
|
|
563
|
+
${query}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
`,
|
|
567
|
+
paystackInitializePayment: (query) => `
|
|
568
|
+
mutation paystackInitializePayment($userId: String!) {
|
|
569
|
+
paystackInitializePayment(userId: $userId) {
|
|
570
|
+
${query}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
`
|
|
609
574
|
};
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
"
|
|
614
|
-
"
|
|
615
|
-
"
|
|
575
|
+
|
|
576
|
+
// src/services/subscription/types/paystack.ts
|
|
577
|
+
var paystackInitializePaymentResponse = [
|
|
578
|
+
"accessCode",
|
|
579
|
+
"authorizationUrl",
|
|
580
|
+
"reference"
|
|
616
581
|
];
|
|
617
|
-
var
|
|
618
|
-
stores: storeQuery,
|
|
619
|
-
userSetting: userSettingQuery,
|
|
620
|
-
...userAccountListIntegration.nestedFields,
|
|
621
|
-
...getUserResponseNestedFields,
|
|
622
|
-
...getAccountResponseNestedFields
|
|
623
|
-
};
|
|
582
|
+
var paystackInitializeSubscriptionResponse = paystackInitializePaymentResponse;
|
|
624
583
|
|
|
625
|
-
// src/services/
|
|
626
|
-
var
|
|
627
|
-
|
|
628
|
-
async getUserTypeCounts(fetchFields, option) {
|
|
629
|
-
var _a, _b, _c;
|
|
630
|
-
const res = await client.request(
|
|
631
|
-
user_schema_default.getUserTypeCounts(
|
|
632
|
-
gqlQueryStringBuilder(
|
|
633
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getUserTypeCountsResponse,
|
|
634
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUserTypeCountsResponseNestedFields
|
|
635
|
-
)
|
|
636
|
-
),
|
|
637
|
-
{},
|
|
638
|
-
option
|
|
639
|
-
);
|
|
640
|
-
return (_c = res.data) == null ? void 0 : _c.getUserTypeCounts;
|
|
641
|
-
},
|
|
642
|
-
async getMonthlyUserStatsByYear(input, fetchFields, option) {
|
|
643
|
-
var _a, _b, _c;
|
|
644
|
-
const res = await client.request(
|
|
645
|
-
user_schema_default.getMonthlyUserStatsByYear(
|
|
646
|
-
gqlQueryStringBuilder(
|
|
647
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getMonthlyUserStatsByYearResponse,
|
|
648
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getMonthlyUserStatsByYearResponseNestedFields
|
|
649
|
-
)
|
|
650
|
-
),
|
|
651
|
-
input,
|
|
652
|
-
option
|
|
653
|
-
);
|
|
654
|
-
return (_c = res.data) == null ? void 0 : _c.getMonthlyUserStatsByYear;
|
|
655
|
-
},
|
|
656
|
-
// user dashboard stats
|
|
657
|
-
async getUserDashStats(input, fetchFields, option) {
|
|
584
|
+
// src/services/subscription/paystack.service.ts
|
|
585
|
+
var createPaystackService = (client) => ({
|
|
586
|
+
async paystackInitializeSubscription(input, fetchFields, option) {
|
|
658
587
|
var _a, _b, _c;
|
|
659
588
|
const res = await client.request(
|
|
660
|
-
|
|
661
|
-
gqlQueryStringBuilder(
|
|
662
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getUserDashStatsResponse,
|
|
663
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUserDashStatsResponseNestedFields
|
|
664
|
-
)
|
|
665
|
-
),
|
|
666
|
-
input,
|
|
667
|
-
option
|
|
668
|
-
);
|
|
669
|
-
return (_c = res.data) == null ? void 0 : _c.getUserDashStats;
|
|
670
|
-
},
|
|
671
|
-
async me(fetchFields, option) {
|
|
672
|
-
var _a, _b;
|
|
673
|
-
return client.request(
|
|
674
|
-
user_schema_default.me(
|
|
675
|
-
gqlQueryStringBuilder(
|
|
676
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : meResponse,
|
|
677
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : meResponseNestedFields
|
|
678
|
-
)
|
|
679
|
-
),
|
|
680
|
-
{},
|
|
681
|
-
option
|
|
682
|
-
);
|
|
683
|
-
},
|
|
684
|
-
async getUser(input, fetchFields, option) {
|
|
685
|
-
var _a, _b;
|
|
686
|
-
return client.request(
|
|
687
|
-
user_schema_default.getUser(
|
|
688
|
-
gqlQueryStringBuilder(
|
|
689
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getUserResponse,
|
|
690
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUserResponseNestedFields
|
|
691
|
-
)
|
|
692
|
-
),
|
|
693
|
-
input,
|
|
694
|
-
option
|
|
695
|
-
);
|
|
696
|
-
},
|
|
697
|
-
async getUsers(input, fetchFields, option) {
|
|
698
|
-
var _a, _b;
|
|
699
|
-
return client.request(
|
|
700
|
-
user_schema_default.getUsers(
|
|
589
|
+
paystackSchema.paystackInitializeSubscription(
|
|
701
590
|
gqlQueryStringBuilder(
|
|
702
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
703
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUsersResponseNestedFields
|
|
591
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : paystackInitializeSubscriptionResponse
|
|
704
592
|
)
|
|
705
593
|
),
|
|
706
594
|
input,
|
|
707
595
|
option
|
|
708
596
|
);
|
|
597
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.paystackInitializeSubscription) != null ? _c : null;
|
|
709
598
|
},
|
|
710
|
-
async
|
|
599
|
+
async paystackInitializePayment(input, fetchFields, option) {
|
|
711
600
|
var _a, _b;
|
|
712
|
-
|
|
713
|
-
|
|
601
|
+
const res = await client.request(
|
|
602
|
+
paystackSchema.paystackInitializePayment(
|
|
714
603
|
gqlQueryStringBuilder(
|
|
715
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
716
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateUserResponseNestedFields
|
|
604
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : paystackInitializePaymentResponse
|
|
717
605
|
)
|
|
718
606
|
),
|
|
719
607
|
input,
|
|
720
608
|
option
|
|
721
609
|
);
|
|
610
|
+
return (_b = res.data) == null ? void 0 : _b.paystackInitializePayment;
|
|
722
611
|
}
|
|
723
612
|
});
|
|
724
613
|
|
|
725
|
-
// src/services/
|
|
726
|
-
var
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
`,
|
|
734
|
-
// change pin
|
|
735
|
-
changePin: (query) => `
|
|
736
|
-
mutation changePin($userId: String!, $oldPin: String!, $newPin: String!) {
|
|
737
|
-
changePin(userId: $userId, oldPin: $oldPin, newPin: $newPin) {
|
|
738
|
-
${query}
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
`,
|
|
742
|
-
checkRegistration: (query) => `
|
|
743
|
-
query checkRegistration($phone: String!) {
|
|
744
|
-
checkRegistration(phone: $phone) {
|
|
745
|
-
${query}
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
`,
|
|
749
|
-
login: (query) => `
|
|
750
|
-
mutation login($phone: String!, $pin: String!, $userType: UserTypeEnum) {
|
|
751
|
-
login(phone: $phone, pin: $pin, userType: $userType) {
|
|
752
|
-
${query}
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
`,
|
|
756
|
-
signUp: (query) => `
|
|
757
|
-
mutation signUp($firstName: String!, $lastName: String!, $phone: String!, $pin: String!, $storeName: String!, $storeLocation: String, $email: String, $userType: UserTypeEnum) {
|
|
758
|
-
signUp( firstName: $firstName, lastName: $lastName, phone: $phone, pin: $pin, storeName: $storeName, storeLocation: $storeLocation, email: $email, userType: $userType) {
|
|
759
|
-
${query}
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
`,
|
|
763
|
-
resetPin: (query) => `
|
|
764
|
-
mutation resetPin($phone: String!, $pin: String!) {
|
|
765
|
-
resetPin(phone: $phone, pin: $pin) {
|
|
766
|
-
${query}
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
`,
|
|
770
|
-
sendOTP: (query) => `
|
|
771
|
-
mutation sendOTP($phone: String!) {
|
|
772
|
-
sendOTP(phone: $phone) {
|
|
773
|
-
${query}
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
`,
|
|
777
|
-
verifyOTP: (query) => `
|
|
778
|
-
mutation verifyOTP($phone: String!, $otp: String!) {
|
|
779
|
-
verifyOTP(phone: $phone, otp: $otp) {
|
|
780
|
-
${query}
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
`,
|
|
784
|
-
updateTxPin: (mutation) => `
|
|
785
|
-
mutation updateTxPin($userId: String!, $pin: String!, $oldPin: String!) {
|
|
786
|
-
updateTxPin(userId: $userId, pin: $pin, oldPin: $oldPin) {
|
|
787
|
-
${mutation}
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
`
|
|
791
|
-
};
|
|
792
|
-
|
|
793
|
-
// src/services/user/types/auth.type.ts
|
|
794
|
-
var authenticateWithStoreResponse = [
|
|
795
|
-
"accessToken"
|
|
614
|
+
// src/services/subscription/subscription.entity.ts
|
|
615
|
+
var subscriptionPlanFeatureBehaviourQuery = [
|
|
616
|
+
"id",
|
|
617
|
+
"createdAt",
|
|
618
|
+
"description",
|
|
619
|
+
"shortname",
|
|
620
|
+
"subscriptionPlanFeatureKey",
|
|
621
|
+
"title"
|
|
796
622
|
];
|
|
797
|
-
var
|
|
798
|
-
"
|
|
623
|
+
var subscriptionQuery = [
|
|
624
|
+
"cancelAtPeriodEnd",
|
|
625
|
+
"canceledAt",
|
|
626
|
+
"createdAt",
|
|
627
|
+
"currency",
|
|
628
|
+
"currentPeriodEnd",
|
|
629
|
+
"currentPeriodStart",
|
|
630
|
+
"defaultPaymentMethodId",
|
|
631
|
+
"id",
|
|
632
|
+
"price",
|
|
633
|
+
"subscriptionPlanId",
|
|
634
|
+
"subscriptionStatus",
|
|
635
|
+
"trialEnd",
|
|
636
|
+
"updatedAt",
|
|
637
|
+
"userId",
|
|
638
|
+
"version"
|
|
799
639
|
];
|
|
800
|
-
var
|
|
801
|
-
"
|
|
640
|
+
var subscriptionPlanFeatureQuery = [
|
|
641
|
+
"id",
|
|
642
|
+
"title",
|
|
643
|
+
"description",
|
|
644
|
+
"createdAt",
|
|
645
|
+
"limitValue",
|
|
646
|
+
"accessValue",
|
|
647
|
+
"behaviourIds",
|
|
648
|
+
"subscriptionPlanFeatureKey",
|
|
649
|
+
"featureStatus",
|
|
650
|
+
"meta",
|
|
651
|
+
"planId"
|
|
802
652
|
];
|
|
803
|
-
var
|
|
804
|
-
"
|
|
653
|
+
var subscriptionPlanQuery = [
|
|
654
|
+
"id",
|
|
655
|
+
"code",
|
|
656
|
+
"title",
|
|
657
|
+
"description",
|
|
658
|
+
"currency",
|
|
659
|
+
"period",
|
|
660
|
+
"trialDays",
|
|
661
|
+
"subscriptionPlanStatus",
|
|
662
|
+
"createdAt",
|
|
663
|
+
"updatedAt",
|
|
664
|
+
"features",
|
|
665
|
+
"monthlyPlanPrice",
|
|
666
|
+
"annuallyPlanPrice"
|
|
805
667
|
];
|
|
806
|
-
|
|
807
|
-
|
|
668
|
+
|
|
669
|
+
// src/services/subscription/types/subscription-plan-feature.type.ts
|
|
670
|
+
var getSubscriptionPlanFeatureResponse = [
|
|
671
|
+
"subscriptionPlanFeature"
|
|
808
672
|
];
|
|
809
|
-
var
|
|
810
|
-
|
|
811
|
-
|
|
673
|
+
var _getSubscriptionPlanFeatureResponseNestedFields = {};
|
|
674
|
+
var getSubscriptionPlanFeatureResponseNestedFields = {
|
|
675
|
+
..._getSubscriptionPlanFeatureResponseNestedFields,
|
|
676
|
+
subscriptionPlanFeature: subscriptionPlanFeatureQuery
|
|
677
|
+
};
|
|
678
|
+
var getSubscriptionPlanFeaturesResponse = [
|
|
679
|
+
"subscriptionPlanFeatures",
|
|
680
|
+
"total"
|
|
812
681
|
];
|
|
813
|
-
var
|
|
814
|
-
|
|
682
|
+
var getSubscriptionPlanFeaturesResponseNestedFields = {
|
|
683
|
+
..._getSubscriptionPlanFeatureResponseNestedFields,
|
|
684
|
+
subscriptionPlanFeatures: subscriptionPlanFeatureQuery
|
|
685
|
+
};
|
|
686
|
+
var addSubscriptionPlanFeatureResponse = getSubscriptionPlanFeatureResponse;
|
|
687
|
+
var addSubscriptionPlanFeatureResponseNestedFields = getSubscriptionPlanFeatureResponseNestedFields;
|
|
688
|
+
var updateSubscriptionPlanFeatureResponse = getSubscriptionPlanFeatureResponse;
|
|
689
|
+
var updateSubscriptionPlanFeatureResponseNestedFields = getSubscriptionPlanFeatureResponseNestedFields;
|
|
690
|
+
var removeSubscriptionPlanFeatureResponse = [
|
|
691
|
+
"subscriptionPlanFeatureId"
|
|
815
692
|
];
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
693
|
+
|
|
694
|
+
// src/services/subscription/types/subscription-plan.type.ts
|
|
695
|
+
var getSubscriptionPlanResponse = [
|
|
696
|
+
"subscriptionPlan"
|
|
819
697
|
];
|
|
820
|
-
var
|
|
821
|
-
|
|
822
|
-
|
|
698
|
+
var _getSubscriptionPlanResponseNestedFields = {
|
|
699
|
+
features: subscriptionPlanFeatureQuery
|
|
700
|
+
};
|
|
701
|
+
var getSubscriptionPlanResponseNestedFields = {
|
|
702
|
+
..._getSubscriptionPlanResponseNestedFields,
|
|
703
|
+
subscriptionPlan: subscriptionPlanQuery
|
|
704
|
+
};
|
|
705
|
+
var getSubscriptionPlansResponse = [
|
|
706
|
+
"subscriptionPlans",
|
|
707
|
+
"total"
|
|
708
|
+
];
|
|
709
|
+
var getSubscriptionPlansResponseNestedFields = {
|
|
710
|
+
..._getSubscriptionPlanResponseNestedFields,
|
|
711
|
+
subscriptionPlans: subscriptionPlanQuery
|
|
712
|
+
};
|
|
713
|
+
var addSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
714
|
+
var addSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
715
|
+
var updateSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
716
|
+
var updateSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
717
|
+
var removeSubscriptionPlanResponse = [
|
|
718
|
+
"subscriptionPlanId"
|
|
823
719
|
];
|
|
824
720
|
|
|
825
|
-
// src/services/
|
|
826
|
-
var
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
721
|
+
// src/services/subscription/types/subscription.type.ts
|
|
722
|
+
var getSubscriptionResponse = [
|
|
723
|
+
"subscription"
|
|
724
|
+
];
|
|
725
|
+
var _getSubscriptionResponseNestedFields = {};
|
|
726
|
+
var getSubscriptionResponseNestedFields = {
|
|
727
|
+
..._getSubscriptionResponseNestedFields,
|
|
728
|
+
subscription: subscriptionQuery
|
|
729
|
+
};
|
|
730
|
+
var getSubscriptionsResponse = [
|
|
731
|
+
"subscriptions",
|
|
732
|
+
"total"
|
|
733
|
+
];
|
|
734
|
+
var getSubscriptionsResponseNestedFields = {
|
|
735
|
+
..._getSubscriptionResponseNestedFields,
|
|
736
|
+
subscriptions: subscriptionQuery
|
|
737
|
+
};
|
|
738
|
+
var addSubscriptionResponse = getSubscriptionResponse;
|
|
739
|
+
var addSubscriptionResponseNestedFields = getSubscriptionResponseNestedFields;
|
|
740
|
+
var updateSubscriptionResponse = getSubscriptionResponse;
|
|
741
|
+
var updateSubscriptionResponseNestedFields = getSubscriptionResponseNestedFields;
|
|
742
|
+
var removeSubscriptionResponse = [
|
|
743
|
+
"subscriptionId"
|
|
744
|
+
];
|
|
745
|
+
|
|
746
|
+
// src/services/subscription/types/subscription-plan-feature-behaviour.type.ts
|
|
747
|
+
var ENTITY2 = "subscriptionPlanFeatureBehaviour";
|
|
748
|
+
var subscriptionPlanFeatureBehaviourIntegration = createStandardEntityIntegration({
|
|
749
|
+
key: ENTITY2,
|
|
750
|
+
fields: subscriptionPlanFeatureBehaviourQuery
|
|
751
|
+
});
|
|
752
|
+
var subscriptionPlanFeatureBehaviourListIntegration = createListIntegration({
|
|
753
|
+
key: "subscriptionPlanFeatureBehaviours",
|
|
754
|
+
fields: subscriptionPlanFeatureBehaviourQuery
|
|
755
|
+
});
|
|
756
|
+
var subscriptionPlanFeatureBehaviourDeleteIntegration = createDeleteIntegration(ENTITY2);
|
|
757
|
+
|
|
758
|
+
// src/services/subscription/schemas/subscription-plan-feature.schema.ts
|
|
759
|
+
var subscriptionPlanFeatureSchema = {
|
|
760
|
+
getSubscriptionPlanFeature: (query) => `
|
|
761
|
+
query getSubscriptionPlanFeature($subscriptionPlanFeature: SubscriptionPlanFeatureInput!) {
|
|
762
|
+
getSubscriptionPlanFeature(subscriptionPlanFeature: $subscriptionPlanFeature) {
|
|
763
|
+
${query}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
`,
|
|
767
|
+
getSubscriptionPlanFeatures: (query) => `
|
|
768
|
+
query getSubscriptionPlanFeatures($search: String, $subscriptionPlanFeatureIds: [String], $subscriptionPlanFeature: SubscriptionPlanFeatureInput, $limit: Int!, $skip: Int!) {
|
|
769
|
+
getSubscriptionPlanFeatures(search: $search, subscriptionPlanFeatureIds: $subscriptionPlanFeatureIds, subscriptionPlanFeature: $subscriptionPlanFeature, limit: $limit, skip: $skip) {
|
|
770
|
+
${query}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
`,
|
|
774
|
+
addSubscriptionPlanFeature: (query) => `
|
|
775
|
+
mutation addSubscriptionPlanFeature($subscriptionPlanFeature: SubscriptionPlanFeatureInput!) {
|
|
776
|
+
addSubscriptionPlanFeature(subscriptionPlanFeature: $subscriptionPlanFeature) {
|
|
777
|
+
${query}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
`,
|
|
781
|
+
updateSubscriptionPlanFeature: (query) => `
|
|
782
|
+
mutation updateSubscriptionPlanFeature($subscriptionPlanFeatureId: String!, $subscriptionPlanFeature: SubscriptionPlanFeatureInput!) {
|
|
783
|
+
updateSubscriptionPlanFeature(subscriptionPlanFeatureId: $subcriptionPlanFeatureId, subscriptionPlanFeature: $subscriptionPlanFeature) {
|
|
784
|
+
${query}
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
`,
|
|
788
|
+
removeSubscriptionPlanFeature: (query) => `
|
|
789
|
+
mutation removeSubscriptionPlanFeature($subscriptionPlanFeatureId: String!) {
|
|
790
|
+
removeSubscriptionPlanFeature(subscriptionPlanFeatureId: $subcriptionPlanFeatureId) {
|
|
791
|
+
${query}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
`
|
|
795
|
+
};
|
|
796
|
+
|
|
797
|
+
// src/services/subscription/subscription-plan-feature.service.ts
|
|
798
|
+
var createSubscriptionPlanFeatureService = (client) => ({
|
|
799
|
+
async removeSubscriptionPlanFeature(input, fetchFields, option) {
|
|
800
|
+
var _a, _b, _c;
|
|
801
|
+
const res = await client.request(
|
|
802
|
+
subscriptionPlanFeatureSchema.removeSubscriptionPlanFeature(
|
|
855
803
|
gqlQueryStringBuilder(
|
|
856
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
804
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeSubscriptionPlanFeatureResponse
|
|
857
805
|
)
|
|
858
806
|
),
|
|
859
807
|
input,
|
|
860
808
|
option
|
|
861
809
|
);
|
|
810
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removeSubscriptionPlanFeature) != null ? _c : null;
|
|
862
811
|
},
|
|
863
|
-
async
|
|
864
|
-
var _a;
|
|
865
|
-
|
|
866
|
-
|
|
812
|
+
async updateSubscriptionPlanFeature(input, fetchFields, option) {
|
|
813
|
+
var _a, _b, _c, _d;
|
|
814
|
+
const res = await client.request(
|
|
815
|
+
subscriptionPlanFeatureSchema.updateSubscriptionPlanFeature(
|
|
867
816
|
gqlQueryStringBuilder(
|
|
868
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
817
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateSubscriptionPlanFeatureResponse,
|
|
818
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateSubscriptionPlanFeatureResponseNestedFields
|
|
869
819
|
)
|
|
870
820
|
),
|
|
871
821
|
input,
|
|
872
822
|
option
|
|
873
823
|
);
|
|
824
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateSubscriptionPlanFeature) != null ? _d : null;
|
|
874
825
|
},
|
|
875
|
-
async
|
|
876
|
-
var _a;
|
|
877
|
-
|
|
878
|
-
|
|
826
|
+
async addSubscriptionPlanFeature(input, fetchFields, option) {
|
|
827
|
+
var _a, _b, _c, _d;
|
|
828
|
+
const res = await client.request(
|
|
829
|
+
subscriptionPlanFeatureSchema.addSubscriptionPlanFeature(
|
|
879
830
|
gqlQueryStringBuilder(
|
|
880
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
831
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addSubscriptionPlanFeatureResponse,
|
|
832
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addSubscriptionPlanFeatureResponseNestedFields
|
|
881
833
|
)
|
|
882
834
|
),
|
|
883
835
|
input,
|
|
884
836
|
option
|
|
885
837
|
);
|
|
838
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addSubscriptionPlanFeature) != null ? _d : null;
|
|
886
839
|
},
|
|
887
|
-
async
|
|
888
|
-
var _a;
|
|
889
|
-
|
|
890
|
-
|
|
840
|
+
async getSubscriptionPlanFeature(input, fetchFields, option) {
|
|
841
|
+
var _a, _b, _c, _d;
|
|
842
|
+
const res = await client.request(
|
|
843
|
+
subscriptionPlanFeatureSchema.getSubscriptionPlanFeature(
|
|
891
844
|
gqlQueryStringBuilder(
|
|
892
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
845
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlanFeatureResponse,
|
|
846
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlanFeatureResponseNestedFields
|
|
893
847
|
)
|
|
894
848
|
),
|
|
895
849
|
input,
|
|
896
850
|
option
|
|
897
851
|
);
|
|
852
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlanFeature) != null ? _d : null;
|
|
898
853
|
},
|
|
899
|
-
async
|
|
900
|
-
var _a;
|
|
901
|
-
|
|
902
|
-
|
|
854
|
+
async getSubscriptionPlanFeatures(input, fetchFields, option) {
|
|
855
|
+
var _a, _b, _c, _d;
|
|
856
|
+
const res = await client.request(
|
|
857
|
+
subscriptionPlanFeatureSchema.getSubscriptionPlanFeatures(
|
|
903
858
|
gqlQueryStringBuilder(
|
|
904
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
859
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlanFeaturesResponse,
|
|
860
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlanFeaturesResponseNestedFields
|
|
905
861
|
)
|
|
906
862
|
),
|
|
907
863
|
input,
|
|
908
864
|
option
|
|
909
865
|
);
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
866
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlanFeatures) != null ? _d : null;
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
|
|
870
|
+
// src/services/subscription/schemas/subscription-plan.schema.ts
|
|
871
|
+
var subscriptionPlanSchema = {
|
|
872
|
+
getSubscriptionPlan: (query) => `
|
|
873
|
+
query getSubscriptionPlan($subscriptionPlan: SubscriptionPlanInput!) {
|
|
874
|
+
getSubscriptionPlan(subscriptionPlan: $subscriptionPlan) {
|
|
875
|
+
${query}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
`,
|
|
879
|
+
getSubscriptionPlans: (query) => `
|
|
880
|
+
query getSubscriptionPlans($search: String, $subscriptionPlanIds: [String], $subscriptionPlan: SubscriptionPlanInput, $limit: Int!, $skip: Int!) {
|
|
881
|
+
getSubscriptionPlans(search: $search, subscriptionPlanIds: $subscriptionPlanIds, subscriptionPlan: $subscriptionPlan, limit: $limit, skip: $skip) {
|
|
882
|
+
${query}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
`,
|
|
886
|
+
addSubscriptionPlan: (query) => `
|
|
887
|
+
mutation addSubscriptionPlan($subscriptionPlan: SubscriptionPlanInput!) {
|
|
888
|
+
addSubscriptionPlan(subscriptionPlan: $subscriptionPlan) {
|
|
889
|
+
${query}
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
`,
|
|
893
|
+
updateSubscriptionPlan: (query) => `
|
|
894
|
+
mutation updateSubscriptionPlan($subscriptionPlanId: String!, $subscriptionPlan: SubscriptionPlanInput!) {
|
|
895
|
+
updateSubscriptionPlan(subscriptionPlanId: $subscriptionPlanId, subscriptionPlan: $subscriptionPlan) {
|
|
896
|
+
${query}
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
`,
|
|
900
|
+
removeSubscriptionPlan: (query) => `
|
|
901
|
+
mutation removeSubscriptionPlan($subscriptionPlanId: String!) {
|
|
902
|
+
removeSubscriptionPlan(subscriptionPlanId: $subscriptionPlanId) {
|
|
903
|
+
${query}
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
`
|
|
907
|
+
};
|
|
908
|
+
|
|
909
|
+
// src/services/subscription/subscription-plan.service.ts
|
|
910
|
+
var createSubscriptionPlanService = (client) => ({
|
|
911
|
+
async removeSubscriptionPlan(input, fetchFields, option) {
|
|
912
|
+
var _a, _b, _c;
|
|
913
|
+
const res = await client.request(
|
|
914
|
+
subscriptionPlanSchema.removeSubscriptionPlan(
|
|
915
915
|
gqlQueryStringBuilder(
|
|
916
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
916
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeSubscriptionPlanResponse
|
|
917
917
|
)
|
|
918
918
|
),
|
|
919
919
|
input,
|
|
920
920
|
option
|
|
921
921
|
);
|
|
922
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removeSubscriptionPlan) != null ? _c : null;
|
|
922
923
|
},
|
|
923
|
-
async
|
|
924
|
-
var _a;
|
|
925
|
-
|
|
926
|
-
|
|
924
|
+
async updateSubscriptionPlan(input, fetchFields, option) {
|
|
925
|
+
var _a, _b, _c, _d;
|
|
926
|
+
const res = await client.request(
|
|
927
|
+
subscriptionPlanSchema.updateSubscriptionPlan(
|
|
927
928
|
gqlQueryStringBuilder(
|
|
928
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
929
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateSubscriptionPlanResponse,
|
|
930
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateSubscriptionPlanResponseNestedFields
|
|
931
|
+
)
|
|
932
|
+
),
|
|
933
|
+
input,
|
|
934
|
+
option
|
|
935
|
+
);
|
|
936
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateSubscriptionPlan) != null ? _d : null;
|
|
937
|
+
},
|
|
938
|
+
async addSubscriptionPlan(input, fetchFields, option) {
|
|
939
|
+
var _a, _b, _c, _d;
|
|
940
|
+
const res = await client.request(
|
|
941
|
+
subscriptionPlanSchema.addSubscriptionPlan(
|
|
942
|
+
gqlQueryStringBuilder(
|
|
943
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addSubscriptionPlanResponse,
|
|
944
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addSubscriptionPlanResponseNestedFields
|
|
945
|
+
)
|
|
946
|
+
),
|
|
947
|
+
input,
|
|
948
|
+
option
|
|
949
|
+
);
|
|
950
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addSubscriptionPlan) != null ? _d : null;
|
|
951
|
+
},
|
|
952
|
+
async getSubscriptionPlan(input, fetchFields, option) {
|
|
953
|
+
var _a, _b, _c, _d;
|
|
954
|
+
const res = await client.request(
|
|
955
|
+
subscriptionPlanSchema.getSubscriptionPlan(
|
|
956
|
+
gqlQueryStringBuilder(
|
|
957
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlanResponse,
|
|
958
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlanResponseNestedFields
|
|
959
|
+
)
|
|
960
|
+
),
|
|
961
|
+
input,
|
|
962
|
+
option
|
|
963
|
+
);
|
|
964
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlan) != null ? _d : null;
|
|
965
|
+
},
|
|
966
|
+
async getSubscriptionPlans(input, fetchFields, option) {
|
|
967
|
+
var _a, _b, _c, _d;
|
|
968
|
+
const res = await client.request(
|
|
969
|
+
subscriptionPlanSchema.getSubscriptionPlans(
|
|
970
|
+
gqlQueryStringBuilder(
|
|
971
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlansResponse,
|
|
972
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlansResponseNestedFields
|
|
929
973
|
)
|
|
930
974
|
),
|
|
931
975
|
input,
|
|
932
976
|
option
|
|
933
977
|
);
|
|
978
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlans) != null ? _d : null;
|
|
934
979
|
}
|
|
935
980
|
});
|
|
936
981
|
|
|
937
|
-
// src/services/
|
|
938
|
-
var
|
|
939
|
-
|
|
940
|
-
query
|
|
941
|
-
|
|
982
|
+
// src/services/subscription/schemas/subscription.schema.ts
|
|
983
|
+
var subscriptionSchema = {
|
|
984
|
+
getSubscription: (query) => `
|
|
985
|
+
query getSubscription($subscription: SubscriptionInput!) {
|
|
986
|
+
getSubscription(subscription: $subscription) {
|
|
987
|
+
${query}
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
`,
|
|
991
|
+
getSubscriptions: (query) => `
|
|
992
|
+
query getSubscriptions($search: String, $subscriptionIds: [String], $subscription: SubscriptionInput, $limit: Int!, $skip: Int!) {
|
|
993
|
+
getSubscriptions(search: $search, subscriptionIds: $subscriptionIds, subscription: $subscription, limit: $limit, skip: $skip) {
|
|
994
|
+
${query}
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
`,
|
|
998
|
+
addSubscription: (query) => `
|
|
999
|
+
mutation addSubscription($subscription: SubscriptionInput!) {
|
|
1000
|
+
addSubscription(subscription: $subscription) {
|
|
1001
|
+
${query}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
`,
|
|
1005
|
+
updateSubscription: (query) => `
|
|
1006
|
+
mutation updateSubscription($subscriptionId: String!, $subscription: SubscriptionInput!) {
|
|
1007
|
+
updateSubscription(subscriptionId: $subcriptionId, subscription: $subscription) {
|
|
1008
|
+
${query}
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
`,
|
|
1012
|
+
removeSubscription: (query) => `
|
|
1013
|
+
mutation removeSubscription($subscriptionId: String!) {
|
|
1014
|
+
removeSubscription(subscriptionId: $subcriptionId) {
|
|
942
1015
|
${query}
|
|
943
1016
|
}
|
|
944
1017
|
}
|
|
945
1018
|
`
|
|
946
1019
|
};
|
|
947
1020
|
|
|
948
|
-
// src/services/
|
|
949
|
-
var
|
|
950
|
-
|
|
951
|
-
notification: notificationQuery,
|
|
952
|
-
userNotifications: userNotificationQuery
|
|
953
|
-
};
|
|
954
|
-
|
|
955
|
-
// src/services/user/user-notification.service.ts
|
|
956
|
-
var createUserNotificationService = (client) => ({
|
|
957
|
-
async getUserNotifications(input, fetchFields, option) {
|
|
1021
|
+
// src/services/subscription/subscription.service.ts
|
|
1022
|
+
var createSubscriptionService = (client) => ({
|
|
1023
|
+
async removeSubscription(input, fetchFields, option) {
|
|
958
1024
|
var _a, _b, _c;
|
|
959
1025
|
const res = await client.request(
|
|
960
|
-
|
|
1026
|
+
subscriptionSchema.removeSubscription(
|
|
961
1027
|
gqlQueryStringBuilder(
|
|
962
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
963
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUserNotificationsResponseNestedFields
|
|
1028
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeSubscriptionResponse
|
|
964
1029
|
)
|
|
965
1030
|
),
|
|
966
1031
|
input,
|
|
967
1032
|
option
|
|
968
1033
|
);
|
|
969
|
-
return (_c = res.data) == null ? void 0 : _c
|
|
970
|
-
}
|
|
971
|
-
});
|
|
972
|
-
|
|
973
|
-
// src/services/user/schemas/user-account.schema.ts
|
|
974
|
-
var userAccountSchema = {
|
|
975
|
-
get: {
|
|
976
|
-
operation: "query",
|
|
977
|
-
name: "getUserAccount",
|
|
978
|
-
variables: "($userAccount: UserAccountInput!)",
|
|
979
|
-
field: "(userAccount: $userAccount)"
|
|
1034
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removeSubscription) != null ? _c : null;
|
|
980
1035
|
},
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1036
|
+
async updateSubscription(input, fetchFields, option) {
|
|
1037
|
+
var _a, _b, _c, _d;
|
|
1038
|
+
const res = await client.request(
|
|
1039
|
+
subscriptionSchema.updateSubscription(
|
|
1040
|
+
gqlQueryStringBuilder(
|
|
1041
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateSubscriptionResponse,
|
|
1042
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateSubscriptionResponseNestedFields
|
|
1043
|
+
)
|
|
1044
|
+
),
|
|
1045
|
+
input,
|
|
1046
|
+
option
|
|
1047
|
+
);
|
|
1048
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateSubscription) != null ? _d : null;
|
|
986
1049
|
},
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1050
|
+
async addSubscription(input, fetchFields, option) {
|
|
1051
|
+
var _a, _b, _c, _d;
|
|
1052
|
+
const res = await client.request(
|
|
1053
|
+
subscriptionSchema.addSubscription(
|
|
1054
|
+
gqlQueryStringBuilder(
|
|
1055
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addSubscriptionResponse,
|
|
1056
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addSubscriptionResponseNestedFields
|
|
1057
|
+
)
|
|
1058
|
+
),
|
|
1059
|
+
input,
|
|
1060
|
+
option
|
|
1061
|
+
);
|
|
1062
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addSubscription) != null ? _d : null;
|
|
992
1063
|
},
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1064
|
+
async getSubscription(input, fetchFields, option) {
|
|
1065
|
+
var _a, _b, _c, _d;
|
|
1066
|
+
const res = await client.request(
|
|
1067
|
+
subscriptionSchema.getSubscription(
|
|
1068
|
+
gqlQueryStringBuilder(
|
|
1069
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionResponse,
|
|
1070
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionResponseNestedFields
|
|
1071
|
+
)
|
|
1072
|
+
),
|
|
1073
|
+
input,
|
|
1074
|
+
option
|
|
1075
|
+
);
|
|
1076
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscription) != null ? _d : null;
|
|
998
1077
|
},
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1078
|
+
async getSubscriptions(input, fetchFields, option) {
|
|
1079
|
+
var _a, _b, _c, _d;
|
|
1080
|
+
const res = await client.request(
|
|
1081
|
+
subscriptionSchema.getSubscriptions(
|
|
1082
|
+
gqlQueryStringBuilder(
|
|
1083
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionsResponse,
|
|
1084
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionsResponseNestedFields
|
|
1085
|
+
)
|
|
1086
|
+
),
|
|
1087
|
+
input,
|
|
1088
|
+
option
|
|
1089
|
+
);
|
|
1090
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptions) != null ? _d : null;
|
|
1004
1091
|
}
|
|
1005
|
-
};
|
|
1092
|
+
});
|
|
1006
1093
|
|
|
1007
1094
|
// src/helpers/service.factory.ts
|
|
1008
1095
|
function createOperationExecutor(client, key, config) {
|
|
@@ -1039,2192 +1126,2217 @@ function buildSchema({
|
|
|
1039
1126
|
`.trim();
|
|
1040
1127
|
}
|
|
1041
1128
|
|
|
1042
|
-
// src/services/
|
|
1043
|
-
var
|
|
1044
|
-
createUserAccount: createOperationExecutor(
|
|
1045
|
-
client,
|
|
1046
|
-
"createUserAccount",
|
|
1047
|
-
{
|
|
1048
|
-
schema: buildSchema(userAccountSchema.create),
|
|
1049
|
-
defaultRootFields: [...userAccountIntegration.create.responseFields, "pin"],
|
|
1050
|
-
defaultNestedFields: userAccountIntegration.create.nestedFields
|
|
1051
|
-
}
|
|
1052
|
-
),
|
|
1053
|
-
updateUserAccount: createOperationExecutor(
|
|
1054
|
-
client,
|
|
1055
|
-
"updateUserAccount",
|
|
1056
|
-
{
|
|
1057
|
-
schema: buildSchema(userAccountSchema.update),
|
|
1058
|
-
defaultRootFields: userAccountIntegration.update.responseFields,
|
|
1059
|
-
defaultNestedFields: userAccountIntegration.update.nestedFields
|
|
1060
|
-
}
|
|
1061
|
-
),
|
|
1062
|
-
getUserAccount: createOperationExecutor(
|
|
1063
|
-
client,
|
|
1064
|
-
"getUserAccount",
|
|
1065
|
-
{
|
|
1066
|
-
schema: buildSchema(userAccountSchema.get),
|
|
1067
|
-
defaultRootFields: userAccountIntegration.get.responseFields,
|
|
1068
|
-
defaultNestedFields: userAccountIntegration.get.nestedFields
|
|
1069
|
-
}
|
|
1070
|
-
),
|
|
1071
|
-
removeUserAccount: createOperationExecutor(
|
|
1072
|
-
client,
|
|
1073
|
-
"removeUserAccount",
|
|
1074
|
-
{
|
|
1075
|
-
schema: buildSchema(userAccountSchema.delete),
|
|
1076
|
-
defaultRootFields: userAccountDeleteIntegration.responseFields,
|
|
1077
|
-
defaultNestedFields: {}
|
|
1078
|
-
}
|
|
1079
|
-
),
|
|
1080
|
-
getUserAccounts: createOperationExecutor(
|
|
1081
|
-
client,
|
|
1082
|
-
"getUserAccounts",
|
|
1083
|
-
{
|
|
1084
|
-
schema: buildSchema(userAccountSchema.list),
|
|
1085
|
-
defaultRootFields: [...userAccountListIntegration.responseFields],
|
|
1086
|
-
defaultNestedFields: userAccountListIntegration.nestedFields
|
|
1087
|
-
}
|
|
1088
|
-
)
|
|
1089
|
-
});
|
|
1090
|
-
|
|
1091
|
-
// src/services/user/types/user-role.type.ts
|
|
1092
|
-
var ENTITY2 = "userRole";
|
|
1093
|
-
var userRoleIntegration = createStandardEntityIntegration({
|
|
1094
|
-
key: ENTITY2,
|
|
1095
|
-
fields: userRoleQuery,
|
|
1096
|
-
nested: {
|
|
1097
|
-
privileges: privilegeQuery
|
|
1098
|
-
}
|
|
1099
|
-
});
|
|
1100
|
-
var userRoleListIntegration = createListIntegration({
|
|
1101
|
-
key: "userRoles",
|
|
1102
|
-
fields: userRoleQuery,
|
|
1103
|
-
nested: {
|
|
1104
|
-
privileges: privilegeQuery
|
|
1105
|
-
}
|
|
1106
|
-
});
|
|
1107
|
-
var userRoleDeleteIntegration = createDeleteIntegration(ENTITY2);
|
|
1108
|
-
|
|
1109
|
-
// src/services/user/schemas/user-role.schema.ts
|
|
1110
|
-
var userRoleSchema = {
|
|
1111
|
-
get: {
|
|
1112
|
-
operation: "query",
|
|
1113
|
-
name: "getUserRole",
|
|
1114
|
-
variables: "($userRole: UserRoleInput!)",
|
|
1115
|
-
field: "(userRole: $userRole)"
|
|
1116
|
-
},
|
|
1117
|
-
list: {
|
|
1118
|
-
operation: "query",
|
|
1119
|
-
name: "getUserRoles",
|
|
1120
|
-
variables: "($limit: Int!, $skip: Int!, $search: String, $userRole: UserRoleInput, $userRoleIds: [String])",
|
|
1121
|
-
field: "(limit: $limit, skip: $skip, search: $search, userRole: $userRole, userRoleIds: $userRoleIds)"
|
|
1122
|
-
},
|
|
1123
|
-
create: {
|
|
1124
|
-
operation: "mutation",
|
|
1125
|
-
name: "createUserRole",
|
|
1126
|
-
variables: "($userRole: UserRoleInput!)",
|
|
1127
|
-
field: "(userRole: $userRole)"
|
|
1128
|
-
},
|
|
1129
|
-
update: {
|
|
1130
|
-
operation: "mutation",
|
|
1131
|
-
name: "updateUserRole",
|
|
1132
|
-
variables: "($userRoleId: String!, $userRole: UserRoleInput!)",
|
|
1133
|
-
field: "(userRoleId: $userRoleId, userRole: $userRole)"
|
|
1134
|
-
},
|
|
1135
|
-
delete: {
|
|
1136
|
-
operation: "mutation",
|
|
1137
|
-
name: "removeUserRole",
|
|
1138
|
-
variables: "($userRoleId: String!)",
|
|
1139
|
-
field: "(userRoleId: $userRoleId)"
|
|
1140
|
-
}
|
|
1141
|
-
};
|
|
1142
|
-
|
|
1143
|
-
// src/services/user/user-role.service.ts
|
|
1144
|
-
var createUserRoleService = (client) => ({
|
|
1145
|
-
createUserRole: createOperationExecutor(
|
|
1146
|
-
client,
|
|
1147
|
-
"createUserRole",
|
|
1148
|
-
{
|
|
1149
|
-
schema: buildSchema(userRoleSchema.create),
|
|
1150
|
-
defaultRootFields: userRoleIntegration.create.responseFields,
|
|
1151
|
-
defaultNestedFields: userRoleIntegration.create.nestedFields
|
|
1152
|
-
}
|
|
1153
|
-
),
|
|
1154
|
-
updateUserRole: createOperationExecutor(
|
|
1155
|
-
client,
|
|
1156
|
-
"updateUserRole",
|
|
1157
|
-
{
|
|
1158
|
-
schema: buildSchema(userRoleSchema.update),
|
|
1159
|
-
defaultRootFields: userRoleIntegration.update.responseFields,
|
|
1160
|
-
defaultNestedFields: userRoleIntegration.update.nestedFields
|
|
1161
|
-
}
|
|
1162
|
-
),
|
|
1163
|
-
getUserRole: createOperationExecutor(
|
|
1164
|
-
client,
|
|
1165
|
-
"getUserRole",
|
|
1166
|
-
{
|
|
1167
|
-
schema: buildSchema(userRoleSchema.get),
|
|
1168
|
-
defaultRootFields: userRoleIntegration.get.responseFields,
|
|
1169
|
-
defaultNestedFields: userRoleIntegration.get.nestedFields
|
|
1170
|
-
}
|
|
1171
|
-
),
|
|
1172
|
-
removeUserRole: createOperationExecutor(
|
|
1173
|
-
client,
|
|
1174
|
-
"removeUserRole",
|
|
1175
|
-
{
|
|
1176
|
-
schema: buildSchema(userRoleSchema.delete),
|
|
1177
|
-
defaultRootFields: userRoleDeleteIntegration.responseFields,
|
|
1178
|
-
defaultNestedFields: {}
|
|
1179
|
-
}
|
|
1180
|
-
),
|
|
1181
|
-
getUserRoles: createOperationExecutor(
|
|
1182
|
-
client,
|
|
1183
|
-
"getUserRoles",
|
|
1184
|
-
{
|
|
1185
|
-
schema: buildSchema(userRoleSchema.list),
|
|
1186
|
-
defaultRootFields: [...userRoleListIntegration.responseFields],
|
|
1187
|
-
defaultNestedFields: userRoleListIntegration.nestedFields
|
|
1188
|
-
}
|
|
1189
|
-
)
|
|
1190
|
-
});
|
|
1191
|
-
|
|
1192
|
-
// src/services/user/types/application-feature.type.ts
|
|
1193
|
-
var ENTITY3 = "applicationFeature";
|
|
1194
|
-
var applicationFeatureIntegration = createStandardEntityIntegration({
|
|
1195
|
-
key: ENTITY3,
|
|
1196
|
-
fields: applicationFeatureQuery
|
|
1197
|
-
});
|
|
1198
|
-
var applicationFeatureListIntegration = createListIntegration({
|
|
1199
|
-
key: "applicationFeatures",
|
|
1200
|
-
fields: applicationFeatureQuery
|
|
1201
|
-
});
|
|
1202
|
-
var applicationFeatureDeleteIntegration = createDeleteIntegration(ENTITY3);
|
|
1203
|
-
|
|
1204
|
-
// src/services/user/schemas/application-feature.schema.ts
|
|
1205
|
-
var applicationFeatureSchema = {
|
|
1129
|
+
// src/services/subscription/schemas/subscription-plan-feature-behaviour.ts
|
|
1130
|
+
var subscriptionPlanFeatureBehaviourSchema = {
|
|
1206
1131
|
get: {
|
|
1207
1132
|
operation: "query",
|
|
1208
|
-
name: "
|
|
1209
|
-
variables: "($
|
|
1210
|
-
field: "(
|
|
1133
|
+
name: "getSubscriptionPlanFeatureBehaviour",
|
|
1134
|
+
variables: "($subscriptionPlanFeatureBehaviour: SubscriptionPlanFeatureBehaviourInput!)",
|
|
1135
|
+
field: "(subscriptionPlanFeatureBehaviour: $subscriptionPlanFeatureBehaviour)"
|
|
1211
1136
|
},
|
|
1212
1137
|
list: {
|
|
1213
1138
|
operation: "query",
|
|
1214
|
-
name: "
|
|
1215
|
-
variables: "($limit: Int!, $skip: Int!, $search: String, $
|
|
1216
|
-
field: "(limit: $limit, skip: $skip, search: $search,
|
|
1139
|
+
name: "getSubscriptionPlanFeatureBehaviours",
|
|
1140
|
+
variables: "($limit: Int!, $skip: Int!, $search: String, $subscriptionPlanFeatureBehaviour: SubscriptionPlanFeatureBehaviourInput, $subscriptionPlanFeatureBehaviourIds: [String])",
|
|
1141
|
+
field: "(limit: $limit, skip: $skip, search: $search, subscriptionPlanFeatureBehaviour: $subscriptionPlanFeatureBehaviour, subscriptionPlanFeatureBehaviourIds: $subscriptionPlanFeatureBehaviourIds)"
|
|
1217
1142
|
},
|
|
1218
1143
|
create: {
|
|
1219
1144
|
operation: "mutation",
|
|
1220
|
-
name: "
|
|
1221
|
-
variables: "($
|
|
1222
|
-
field: "(
|
|
1145
|
+
name: "createSubscriptionPlanFeatureBehaviour",
|
|
1146
|
+
variables: "($subscriptionPlanFeatureBehaviour: SubscriptionPlanFeatureBehaviourInput!)",
|
|
1147
|
+
field: "(subscriptionPlanFeatureBehaviour: $subscriptionPlanFeatureBehaviour)"
|
|
1223
1148
|
},
|
|
1224
1149
|
update: {
|
|
1225
1150
|
operation: "mutation",
|
|
1226
|
-
name: "
|
|
1227
|
-
variables: "($
|
|
1228
|
-
field: "(
|
|
1151
|
+
name: "updateSubscriptionPlanFeatureBehaviour",
|
|
1152
|
+
variables: "($subscriptionPlanFeatureBehaviourId: String!, $subscriptionPlanFeatureBehaviour: SubscriptionPlanFeatureBehaviourInput!)",
|
|
1153
|
+
field: "(subscriptionPlanFeatureBehaviourId: $subscriptionPlanFeatureBehaviourId, subscriptionPlanFeatureBehaviour: $subscriptionPlanFeatureBehaviour)"
|
|
1229
1154
|
},
|
|
1230
1155
|
delete: {
|
|
1231
1156
|
operation: "mutation",
|
|
1232
|
-
name: "
|
|
1233
|
-
variables: "($
|
|
1234
|
-
field: "(
|
|
1157
|
+
name: "removeSubscriptionPlanFeatureBehaviour",
|
|
1158
|
+
variables: "($subscriptionPlanFeatureBehaviourId: String!)",
|
|
1159
|
+
field: "(subscriptionPlanFeatureBehaviourId: $subscriptionPlanFeatureBehaviourId)"
|
|
1235
1160
|
}
|
|
1236
1161
|
};
|
|
1237
1162
|
|
|
1238
|
-
// src/services/
|
|
1239
|
-
var
|
|
1240
|
-
|
|
1163
|
+
// src/services/subscription/subscription-plan-feature-behaviour.service.ts
|
|
1164
|
+
var createSubscriptionPlanFeatureBehaviourService = (client) => ({
|
|
1165
|
+
createSubscriptionPlanFeatureBehaviour: createOperationExecutor(
|
|
1241
1166
|
client,
|
|
1242
|
-
"
|
|
1167
|
+
"createSubscriptionPlanFeatureBehaviour",
|
|
1243
1168
|
{
|
|
1244
|
-
schema: buildSchema(
|
|
1245
|
-
defaultRootFields:
|
|
1246
|
-
defaultNestedFields:
|
|
1169
|
+
schema: buildSchema(subscriptionPlanFeatureBehaviourSchema.create),
|
|
1170
|
+
defaultRootFields: subscriptionPlanFeatureBehaviourIntegration.create.responseFields,
|
|
1171
|
+
defaultNestedFields: subscriptionPlanFeatureBehaviourIntegration.create.nestedFields
|
|
1247
1172
|
}
|
|
1248
1173
|
),
|
|
1249
|
-
|
|
1174
|
+
updateSubscriptionPlanFeatureBehaviour: createOperationExecutor(
|
|
1250
1175
|
client,
|
|
1251
|
-
"
|
|
1176
|
+
"updateSubscriptionPlanFeatureBehaviour",
|
|
1252
1177
|
{
|
|
1253
|
-
schema: buildSchema(
|
|
1254
|
-
defaultRootFields:
|
|
1255
|
-
defaultNestedFields:
|
|
1178
|
+
schema: buildSchema(subscriptionPlanFeatureBehaviourSchema.update),
|
|
1179
|
+
defaultRootFields: subscriptionPlanFeatureBehaviourIntegration.update.responseFields,
|
|
1180
|
+
defaultNestedFields: subscriptionPlanFeatureBehaviourIntegration.update.nestedFields
|
|
1256
1181
|
}
|
|
1257
1182
|
),
|
|
1258
|
-
|
|
1183
|
+
getSubscriptionPlanFeatureBehaviour: createOperationExecutor(
|
|
1259
1184
|
client,
|
|
1260
|
-
"
|
|
1185
|
+
"getSubscriptionPlanFeatureBehaviour",
|
|
1261
1186
|
{
|
|
1262
|
-
schema: buildSchema(
|
|
1263
|
-
defaultRootFields:
|
|
1264
|
-
defaultNestedFields:
|
|
1187
|
+
schema: buildSchema(subscriptionPlanFeatureBehaviourSchema.get),
|
|
1188
|
+
defaultRootFields: subscriptionPlanFeatureBehaviourIntegration.get.responseFields,
|
|
1189
|
+
defaultNestedFields: subscriptionPlanFeatureBehaviourIntegration.get.nestedFields
|
|
1265
1190
|
}
|
|
1266
1191
|
),
|
|
1267
|
-
|
|
1192
|
+
removeSubscriptionPlanFeatureBehaviour: createOperationExecutor(
|
|
1268
1193
|
client,
|
|
1269
|
-
"
|
|
1194
|
+
"removeSubscriptionPlanFeatureBehaviour",
|
|
1270
1195
|
{
|
|
1271
|
-
schema: buildSchema(
|
|
1272
|
-
defaultRootFields:
|
|
1196
|
+
schema: buildSchema(subscriptionPlanFeatureBehaviourSchema.delete),
|
|
1197
|
+
defaultRootFields: subscriptionPlanFeatureBehaviourDeleteIntegration.responseFields,
|
|
1273
1198
|
defaultNestedFields: {}
|
|
1274
1199
|
}
|
|
1275
1200
|
),
|
|
1276
|
-
|
|
1201
|
+
getSubscriptionPlanFeatureBehaviours: createOperationExecutor(
|
|
1277
1202
|
client,
|
|
1278
|
-
"
|
|
1203
|
+
"getSubscriptionPlanFeatureBehaviours",
|
|
1279
1204
|
{
|
|
1280
|
-
schema: buildSchema(
|
|
1281
|
-
defaultRootFields: [...
|
|
1282
|
-
defaultNestedFields:
|
|
1205
|
+
schema: buildSchema(subscriptionPlanFeatureBehaviourSchema.list),
|
|
1206
|
+
defaultRootFields: [...subscriptionPlanFeatureBehaviourListIntegration.responseFields],
|
|
1207
|
+
defaultNestedFields: subscriptionPlanFeatureBehaviourListIntegration.nestedFields
|
|
1283
1208
|
}
|
|
1284
1209
|
)
|
|
1285
1210
|
});
|
|
1286
1211
|
|
|
1287
|
-
// src/services/
|
|
1288
|
-
var
|
|
1289
|
-
"
|
|
1212
|
+
// src/services/user/types/user.type.ts
|
|
1213
|
+
var getUserTypeCountsResponse = [
|
|
1214
|
+
"userTypeCounts"
|
|
1290
1215
|
];
|
|
1291
|
-
var
|
|
1292
|
-
|
|
1216
|
+
var getUserTypeCountsResponseNestedFields = {
|
|
1217
|
+
userTypeCounts: userTypeCountsQuery
|
|
1293
1218
|
};
|
|
1294
|
-
var
|
|
1295
|
-
"
|
|
1219
|
+
var getMonthlyUserStatsByYearResponse = [
|
|
1220
|
+
"monthlyUserStat"
|
|
1296
1221
|
];
|
|
1297
|
-
var
|
|
1298
|
-
|
|
1299
|
-
smallestPackage: packageQuery,
|
|
1300
|
-
category: categoryQuery,
|
|
1301
|
-
price: priceQuery,
|
|
1302
|
-
stocks: stockQuery,
|
|
1303
|
-
productAttributes: attributeQuery
|
|
1304
|
-
};
|
|
1305
|
-
var getProductResponseNestedFields = {
|
|
1306
|
-
product: productQuery,
|
|
1307
|
-
..._getProductResponseNestedFields
|
|
1222
|
+
var getMonthlyUserStatsByYearResponseNestedFields = {
|
|
1223
|
+
monthlyUserStat: monthlyUserStatQuery
|
|
1308
1224
|
};
|
|
1309
|
-
var
|
|
1310
|
-
"
|
|
1225
|
+
var getUserDashStatsResponse = [
|
|
1226
|
+
"outOfStockCount",
|
|
1227
|
+
"productCounts",
|
|
1228
|
+
"restockCounts",
|
|
1229
|
+
"saleCounts",
|
|
1230
|
+
"stockValue",
|
|
1231
|
+
"transactionCounts"
|
|
1311
1232
|
];
|
|
1312
|
-
var
|
|
1313
|
-
|
|
1314
|
-
|
|
1233
|
+
var getUserDashStatsResponseNestedFields = {
|
|
1234
|
+
productCounts: productCountsQuery,
|
|
1235
|
+
restockCounts: restockCountsQuery,
|
|
1236
|
+
saleCounts: saleCountsQuery,
|
|
1237
|
+
transactionCounts: transactionCountsQuery
|
|
1315
1238
|
};
|
|
1316
|
-
var
|
|
1317
|
-
"
|
|
1239
|
+
var getUserResponse = [
|
|
1240
|
+
"user"
|
|
1318
1241
|
];
|
|
1319
|
-
var
|
|
1320
|
-
|
|
1321
|
-
..._getProductResponseNestedFields
|
|
1242
|
+
var _getUserResponseNestedFields = {
|
|
1243
|
+
address: addressQuery
|
|
1322
1244
|
};
|
|
1323
|
-
var
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
var searchProductNamesResponseNestedFields = {
|
|
1327
|
-
productNames: productNameQuery
|
|
1245
|
+
var getUserResponseNestedFields = {
|
|
1246
|
+
user: userQuery,
|
|
1247
|
+
..._getUserResponseNestedFields
|
|
1328
1248
|
};
|
|
1329
|
-
var
|
|
1330
|
-
"
|
|
1331
|
-
];
|
|
1332
|
-
var addProductResponseNestedFields = {
|
|
1333
|
-
product: productQuery,
|
|
1334
|
-
uploadImageResponse: ["fileUrl", "url"],
|
|
1335
|
-
..._getProductResponseNestedFields
|
|
1336
|
-
};
|
|
1337
|
-
var updateProductResponseFields = getProductResponseFields;
|
|
1338
|
-
var updateProductResponseNestedFields = getProductResponseNestedFields;
|
|
1339
|
-
var removeProductResponseFields = [
|
|
1340
|
-
"productId"
|
|
1341
|
-
];
|
|
1342
|
-
var searchCategoriesAndTemplateResponse = [
|
|
1343
|
-
"productCategories"
|
|
1344
|
-
];
|
|
1345
|
-
var searchCategoriesAndTemplateResponseNestedFields = {
|
|
1346
|
-
productCategories: categoryQuery
|
|
1347
|
-
};
|
|
1348
|
-
|
|
1349
|
-
// src/services/inventory/types/package.type.ts
|
|
1350
|
-
var getPackageResponseFields = [
|
|
1351
|
-
"productPackage"
|
|
1352
|
-
];
|
|
1353
|
-
var _getPackageResponseNestedFields = {
|
|
1354
|
-
price: priceQuery,
|
|
1355
|
-
stocks: stockQuery
|
|
1356
|
-
};
|
|
1357
|
-
var getPackageResponseNestedFields = {
|
|
1358
|
-
productPackage: packageQuery,
|
|
1359
|
-
..._getPackageResponseNestedFields
|
|
1360
|
-
};
|
|
1361
|
-
var removePackageResponseFields = [
|
|
1362
|
-
"packageId"
|
|
1363
|
-
];
|
|
1364
|
-
var updatePackageResponseFields = getPackageResponseFields;
|
|
1365
|
-
var updatePackageResponseNestedFields = getPackageResponseNestedFields;
|
|
1366
|
-
var addPackagesResponseFields = [
|
|
1367
|
-
"productPackages"
|
|
1368
|
-
];
|
|
1369
|
-
var addPackagesResponseNestedFields = {
|
|
1370
|
-
productPackages: packageQuery,
|
|
1371
|
-
..._getPackageResponseNestedFields
|
|
1372
|
-
};
|
|
1373
|
-
var addPackageResponseFields = getPackageResponseFields;
|
|
1374
|
-
var addPackageResponseNestedFields = getPackageResponseNestedFields;
|
|
1375
|
-
var getPackagesResponseFields = [
|
|
1376
|
-
"productPackages",
|
|
1377
|
-
"uniqueProducts"
|
|
1378
|
-
];
|
|
1379
|
-
var getPackagesResponseNestedFields = {
|
|
1380
|
-
// productPackages: packageQuery, product already contained this
|
|
1381
|
-
uniqueProducts: productQuery,
|
|
1382
|
-
...getPackageResponseNestedFields,
|
|
1383
|
-
...getProductResponseNestedFields
|
|
1384
|
-
};
|
|
1385
|
-
|
|
1386
|
-
// src/services/inventory/types/price.type.ts
|
|
1387
|
-
var getPriceResponseFields = ["price"];
|
|
1388
|
-
var _getPriceResponseNestedFields = {};
|
|
1389
|
-
var getPriceResponseNestedFields = {
|
|
1390
|
-
price: priceQuery,
|
|
1391
|
-
..._getPriceResponseNestedFields
|
|
1392
|
-
};
|
|
1393
|
-
var getPricesResponseFields = ["prices"];
|
|
1394
|
-
var getPricesResponseNestedFields = {
|
|
1395
|
-
..._getPriceResponseNestedFields,
|
|
1396
|
-
prices: priceQuery
|
|
1397
|
-
};
|
|
1398
|
-
var addPriceResponseFields = getPriceResponseFields;
|
|
1399
|
-
var addPriceResponseNestedFields = getPriceResponseNestedFields;
|
|
1400
|
-
var updatePriceResponseFields = getPriceResponseFields;
|
|
1401
|
-
var updatePriceResponseNestedFields = getPriceResponseNestedFields;
|
|
1402
|
-
var removePriceResponseFields = [
|
|
1403
|
-
"priceId"
|
|
1404
|
-
];
|
|
1405
|
-
|
|
1406
|
-
// src/services/inventory/types/stock.type.ts
|
|
1407
|
-
var getStockResponse = [
|
|
1408
|
-
"stock"
|
|
1409
|
-
];
|
|
1410
|
-
var getStockResponseNestedFields = {
|
|
1411
|
-
stock: stockQuery
|
|
1412
|
-
};
|
|
1413
|
-
var getStocksResponse = [
|
|
1414
|
-
"stocks"
|
|
1249
|
+
var getUsersResponse = [
|
|
1250
|
+
"users"
|
|
1415
1251
|
];
|
|
1416
|
-
var
|
|
1417
|
-
|
|
1252
|
+
var getUsersResponseNestedFields = {
|
|
1253
|
+
users: userQuery,
|
|
1254
|
+
..._getUserResponseNestedFields
|
|
1418
1255
|
};
|
|
1419
|
-
var
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
var updateStockResponseNestedFields = getStockResponseNestedFields;
|
|
1423
|
-
var removeStockResponse = [
|
|
1424
|
-
"stockId"
|
|
1425
|
-
];
|
|
1426
|
-
|
|
1427
|
-
// src/services/inventory/types/store.type.ts
|
|
1428
|
-
var getStoreCountResponse = [
|
|
1429
|
-
"count"
|
|
1430
|
-
];
|
|
1431
|
-
var getStoreResponse = [
|
|
1432
|
-
"store"
|
|
1256
|
+
var updateUserResponse = [
|
|
1257
|
+
"uploadImageResponse",
|
|
1258
|
+
"user"
|
|
1433
1259
|
];
|
|
1434
|
-
var
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
var getStoreResponseNestedFields = {
|
|
1438
|
-
store: storeQuery,
|
|
1439
|
-
..._getStoreResponseNestedFields
|
|
1260
|
+
var updateUserResponseNestedFields = {
|
|
1261
|
+
uploadImageResponse: ["fileUrl", "url"],
|
|
1262
|
+
user: userQuery
|
|
1440
1263
|
};
|
|
1441
|
-
var
|
|
1442
|
-
"
|
|
1264
|
+
var meResponse = [
|
|
1265
|
+
"user",
|
|
1266
|
+
"account",
|
|
1267
|
+
"stores",
|
|
1268
|
+
"userSetting",
|
|
1269
|
+
"userAccounts",
|
|
1270
|
+
"subscription"
|
|
1443
1271
|
];
|
|
1444
|
-
var
|
|
1272
|
+
var meResponseNestedFields = {
|
|
1445
1273
|
stores: storeQuery,
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
var updateStoreResponseNestedFields = getStoreResponseNestedFields;
|
|
1452
|
-
var removeStoreResponse = [
|
|
1453
|
-
"storeId"
|
|
1454
|
-
];
|
|
1455
|
-
|
|
1456
|
-
// src/services/inventory/types/store-category-product.type.ts
|
|
1457
|
-
var getStoreCategoryProductResponseFields = [
|
|
1458
|
-
"storeCategoryProduct"
|
|
1459
|
-
];
|
|
1460
|
-
var getStoreCategoryProductResponseNestedFields = {
|
|
1461
|
-
storeCategoryProduct: storeCategoryProductQuery
|
|
1462
|
-
};
|
|
1463
|
-
var getStoreCategoryProductsResponseFields = [
|
|
1464
|
-
"storeCategoryProducts"
|
|
1465
|
-
];
|
|
1466
|
-
var getStoreCategoryProductsResponseNestedFields = {
|
|
1467
|
-
storeCategoryProducts: storeCategoryProductQuery
|
|
1468
|
-
};
|
|
1469
|
-
var createStoreCategoryProductResponseFields = getStoreCategoryProductResponseFields;
|
|
1470
|
-
var createStoreCategoryProductResponseNestedFields = getStoreCategoryProductResponseNestedFields;
|
|
1471
|
-
var updateStoreCategoryProductResponseFields = getStoreCategoryProductResponseFields;
|
|
1472
|
-
var updateStoreCategoryProductResponseNestedFields = getStoreCategoryProductResponseNestedFields;
|
|
1473
|
-
var removeStoreCategoryProductResponseFields = [
|
|
1474
|
-
"storeCategoryProductId"
|
|
1475
|
-
];
|
|
1476
|
-
|
|
1477
|
-
// src/services/inventory/types/store-category.type.ts
|
|
1478
|
-
var getStoreCategoryResponseFields = [
|
|
1479
|
-
"storeCategory"
|
|
1480
|
-
];
|
|
1481
|
-
var getStoreCategoryResponseNestedFields = {
|
|
1482
|
-
storeCategory: storeCategoryQuery
|
|
1483
|
-
};
|
|
1484
|
-
var getStoreCategoriesResponseFields = [
|
|
1485
|
-
"storeCategories"
|
|
1486
|
-
];
|
|
1487
|
-
var getStoreCategoriesResponseNestedFields = {
|
|
1488
|
-
storeCategories: storeCategoryQuery
|
|
1489
|
-
};
|
|
1490
|
-
var createStoreCategoryResponseFields = getStoreCategoryResponseFields;
|
|
1491
|
-
var createStoreCategoryResponseNestedFields = getStoreCategoryResponseNestedFields;
|
|
1492
|
-
var updateStoreCategoryResponseFields = getStoreCategoryResponseFields;
|
|
1493
|
-
var updateStoreCategoryResponseNestedFields = getStoreCategoryResponseNestedFields;
|
|
1494
|
-
var removeStoreCategoryResponseFields = [
|
|
1495
|
-
"storeCategoryId"
|
|
1496
|
-
];
|
|
1497
|
-
|
|
1498
|
-
// src/services/inventory/schema/package.schema.ts
|
|
1499
|
-
var packageSchema = {
|
|
1500
|
-
getPackage: (query) => `
|
|
1501
|
-
query getPackage($productPackage: ProductPackageInput!, $template: Boolean) {
|
|
1502
|
-
getPackage(productPackage: $productPackage, template: $template) {
|
|
1503
|
-
${query}
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
`,
|
|
1507
|
-
getPackages: (query) => `
|
|
1508
|
-
query getPackages($productPackage: ProductPackageInput, $packageIds: [String], $search: String, $template: Boolean, $shouldGetFromAllStores: Boolean, $limit: Int, $skip: Int) {
|
|
1509
|
-
getPackages(productPackage: $productPackage, packageIds: $packageIds, search: $search, template: $template, shouldGetFromAllStores: $shouldGetFromAllStores, limit: $limit, skip: $skip) {
|
|
1510
|
-
${query}
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
`,
|
|
1514
|
-
addPackage: (query) => `
|
|
1515
|
-
mutation addPackage($productPackage: ProductPackageInput!, $template: Boolean) {
|
|
1516
|
-
addPackage(productPackage: $productPackage, template: $template) {
|
|
1517
|
-
${query}
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1520
|
-
`,
|
|
1521
|
-
addPackages: (query) => `
|
|
1522
|
-
mutation addPackages($productPackages: [ProductPackagesInput]!, $template: Boolean) {
|
|
1523
|
-
addPackages(productPackages: $productPackages, template: $template) {
|
|
1524
|
-
${query}
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
`,
|
|
1528
|
-
updatePackage: (query) => `
|
|
1529
|
-
mutation updatePackage($packageId: String!, $productPackage: ProductPackageInput!, $template: Boolean) {
|
|
1530
|
-
updatePackage(packageId: $packageId, productPackage: $productPackage, template: $template) {
|
|
1531
|
-
${query}
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
`,
|
|
1535
|
-
updatePackages: (query) => `
|
|
1536
|
-
mutation updatePackages($packages: [PackagesInput]) {
|
|
1537
|
-
updatePackages(packages: $packages) {
|
|
1538
|
-
${query}
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
`,
|
|
1542
|
-
removePackage: (query) => `
|
|
1543
|
-
mutation removePackage($packageId: String!, $template: Boolean) {
|
|
1544
|
-
removePackage(packageId: $packageId, template: $template) {
|
|
1545
|
-
${query}
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
`
|
|
1274
|
+
userSetting: userSettingQuery,
|
|
1275
|
+
...userAccountListIntegration.nestedFields,
|
|
1276
|
+
...getSubscriptionResponseNestedFields,
|
|
1277
|
+
...getUserResponseNestedFields,
|
|
1278
|
+
...getAccountResponseNestedFields
|
|
1549
1279
|
};
|
|
1550
1280
|
|
|
1551
|
-
// src/services/
|
|
1552
|
-
var
|
|
1553
|
-
|
|
1554
|
-
|
|
1281
|
+
// src/services/user/user.service.ts
|
|
1282
|
+
var createUserService = (client) => ({
|
|
1283
|
+
// admin dashboard stats
|
|
1284
|
+
async getUserTypeCounts(fetchFields, option) {
|
|
1285
|
+
var _a, _b, _c;
|
|
1555
1286
|
const res = await client.request(
|
|
1556
|
-
|
|
1287
|
+
user_schema_default.getUserTypeCounts(
|
|
1557
1288
|
gqlQueryStringBuilder(
|
|
1558
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
1559
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
1289
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getUserTypeCountsResponse,
|
|
1290
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUserTypeCountsResponseNestedFields
|
|
1560
1291
|
)
|
|
1561
1292
|
),
|
|
1562
|
-
|
|
1293
|
+
{},
|
|
1563
1294
|
option
|
|
1564
1295
|
);
|
|
1565
|
-
return (
|
|
1296
|
+
return (_c = res.data) == null ? void 0 : _c.getUserTypeCounts;
|
|
1566
1297
|
},
|
|
1567
|
-
async
|
|
1298
|
+
async getMonthlyUserStatsByYear(input, fetchFields, option) {
|
|
1568
1299
|
var _a, _b, _c;
|
|
1569
1300
|
const res = await client.request(
|
|
1570
|
-
|
|
1301
|
+
user_schema_default.getMonthlyUserStatsByYear(
|
|
1571
1302
|
gqlQueryStringBuilder(
|
|
1572
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
1303
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getMonthlyUserStatsByYearResponse,
|
|
1304
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getMonthlyUserStatsByYearResponseNestedFields
|
|
1573
1305
|
)
|
|
1574
1306
|
),
|
|
1575
1307
|
input,
|
|
1576
1308
|
option
|
|
1577
1309
|
);
|
|
1578
|
-
return (_c =
|
|
1310
|
+
return (_c = res.data) == null ? void 0 : _c.getMonthlyUserStatsByYear;
|
|
1579
1311
|
},
|
|
1580
|
-
|
|
1581
|
-
|
|
1312
|
+
// user dashboard stats
|
|
1313
|
+
async getUserDashStats(input, fetchFields, option) {
|
|
1314
|
+
var _a, _b, _c;
|
|
1582
1315
|
const res = await client.request(
|
|
1583
|
-
|
|
1316
|
+
user_schema_default.getUserDashStats(
|
|
1584
1317
|
gqlQueryStringBuilder(
|
|
1585
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
1586
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
1318
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getUserDashStatsResponse,
|
|
1319
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUserDashStatsResponseNestedFields
|
|
1587
1320
|
)
|
|
1588
1321
|
),
|
|
1589
1322
|
input,
|
|
1590
1323
|
option
|
|
1591
1324
|
);
|
|
1592
|
-
return (
|
|
1325
|
+
return (_c = res.data) == null ? void 0 : _c.getUserDashStats;
|
|
1593
1326
|
},
|
|
1594
|
-
async
|
|
1595
|
-
var _a, _b
|
|
1596
|
-
|
|
1597
|
-
|
|
1327
|
+
async me(fetchFields, option) {
|
|
1328
|
+
var _a, _b;
|
|
1329
|
+
return client.request(
|
|
1330
|
+
user_schema_default.me(
|
|
1598
1331
|
gqlQueryStringBuilder(
|
|
1599
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
1600
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
1332
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : meResponse,
|
|
1333
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : meResponseNestedFields
|
|
1334
|
+
)
|
|
1335
|
+
),
|
|
1336
|
+
{},
|
|
1337
|
+
option
|
|
1338
|
+
);
|
|
1339
|
+
},
|
|
1340
|
+
async getUser(input, fetchFields, option) {
|
|
1341
|
+
var _a, _b;
|
|
1342
|
+
return client.request(
|
|
1343
|
+
user_schema_default.getUser(
|
|
1344
|
+
gqlQueryStringBuilder(
|
|
1345
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getUserResponse,
|
|
1346
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUserResponseNestedFields
|
|
1601
1347
|
)
|
|
1602
1348
|
),
|
|
1603
1349
|
input,
|
|
1604
1350
|
option
|
|
1605
1351
|
);
|
|
1606
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.addPackage) != null ? _d : null;
|
|
1607
1352
|
},
|
|
1608
|
-
async
|
|
1609
|
-
var _a, _b
|
|
1610
|
-
|
|
1611
|
-
|
|
1353
|
+
async getUsers(input, fetchFields, option) {
|
|
1354
|
+
var _a, _b;
|
|
1355
|
+
return client.request(
|
|
1356
|
+
user_schema_default.getUsers(
|
|
1612
1357
|
gqlQueryStringBuilder(
|
|
1613
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
1614
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
1358
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getUsersResponse,
|
|
1359
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUsersResponseNestedFields
|
|
1615
1360
|
)
|
|
1616
1361
|
),
|
|
1617
1362
|
input,
|
|
1618
1363
|
option
|
|
1619
1364
|
);
|
|
1620
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getPackage) != null ? _d : null;
|
|
1621
1365
|
},
|
|
1622
|
-
async
|
|
1623
|
-
var _a, _b
|
|
1624
|
-
|
|
1625
|
-
|
|
1366
|
+
async updateUser(input, fetchFields, option) {
|
|
1367
|
+
var _a, _b;
|
|
1368
|
+
return client.request(
|
|
1369
|
+
user_schema_default.updateUser(
|
|
1626
1370
|
gqlQueryStringBuilder(
|
|
1627
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
1628
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
1371
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateUserResponse,
|
|
1372
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateUserResponseNestedFields
|
|
1629
1373
|
)
|
|
1630
1374
|
),
|
|
1631
1375
|
input,
|
|
1632
1376
|
option
|
|
1633
1377
|
);
|
|
1634
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getPackages) != null ? _d : null;
|
|
1635
1378
|
}
|
|
1636
1379
|
});
|
|
1637
1380
|
|
|
1638
|
-
// src/services/
|
|
1639
|
-
var
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1381
|
+
// src/services/user/schemas/auth.schema.ts
|
|
1382
|
+
var authSchema = {
|
|
1383
|
+
authenticateWithStore: (query) => `
|
|
1384
|
+
mutation authenticateWithStore($storeId: String!, $roleId: String!) {
|
|
1385
|
+
authenticateWithStore(storeId: $storeId, roleId: $roleId) {
|
|
1386
|
+
${query}
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
`,
|
|
1390
|
+
// change pin
|
|
1391
|
+
changePin: (query) => `
|
|
1392
|
+
mutation changePin($userId: String!, $oldPin: String!, $newPin: String!) {
|
|
1393
|
+
changePin(userId: $userId, oldPin: $oldPin, newPin: $newPin) {
|
|
1643
1394
|
${query}
|
|
1644
1395
|
}
|
|
1645
1396
|
}
|
|
1646
1397
|
`,
|
|
1647
|
-
|
|
1648
|
-
query
|
|
1649
|
-
|
|
1398
|
+
checkRegistration: (query) => `
|
|
1399
|
+
query checkRegistration($phone: String!) {
|
|
1400
|
+
checkRegistration(phone: $phone) {
|
|
1650
1401
|
${query}
|
|
1651
1402
|
}
|
|
1652
1403
|
}
|
|
1653
1404
|
`,
|
|
1654
|
-
|
|
1655
|
-
mutation
|
|
1656
|
-
|
|
1657
|
-
${
|
|
1405
|
+
login: (query) => `
|
|
1406
|
+
mutation login($phone: String!, $pin: String!, $userType: UserTypeEnum) {
|
|
1407
|
+
login(phone: $phone, pin: $pin, userType: $userType) {
|
|
1408
|
+
${query}
|
|
1658
1409
|
}
|
|
1659
1410
|
}
|
|
1660
1411
|
`,
|
|
1661
|
-
|
|
1662
|
-
mutation
|
|
1663
|
-
|
|
1664
|
-
${
|
|
1412
|
+
signUp: (query) => `
|
|
1413
|
+
mutation signUp($firstName: String!, $lastName: String!, $phone: String!, $pin: String!, $storeName: String!, $storeLocation: String, $email: String, $userType: UserTypeEnum) {
|
|
1414
|
+
signUp( firstName: $firstName, lastName: $lastName, phone: $phone, pin: $pin, storeName: $storeName, storeLocation: $storeLocation, email: $email, userType: $userType) {
|
|
1415
|
+
${query}
|
|
1665
1416
|
}
|
|
1666
1417
|
}
|
|
1667
1418
|
`,
|
|
1668
|
-
|
|
1669
|
-
mutation
|
|
1670
|
-
|
|
1419
|
+
resetPin: (query) => `
|
|
1420
|
+
mutation resetPin($phone: String!, $pin: String!) {
|
|
1421
|
+
resetPin(phone: $phone, pin: $pin) {
|
|
1422
|
+
${query}
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
`,
|
|
1426
|
+
sendOTP: (query) => `
|
|
1427
|
+
mutation sendOTP($phone: String!) {
|
|
1428
|
+
sendOTP(phone: $phone) {
|
|
1429
|
+
${query}
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
`,
|
|
1433
|
+
verifyOTP: (query) => `
|
|
1434
|
+
mutation verifyOTP($phone: String!, $otp: String!) {
|
|
1435
|
+
verifyOTP(phone: $phone, otp: $otp) {
|
|
1436
|
+
${query}
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
`,
|
|
1440
|
+
updateTxPin: (mutation) => `
|
|
1441
|
+
mutation updateTxPin($userId: String!, $pin: String!, $oldPin: String!) {
|
|
1442
|
+
updateTxPin(userId: $userId, pin: $pin, oldPin: $oldPin) {
|
|
1671
1443
|
${mutation}
|
|
1672
1444
|
}
|
|
1673
1445
|
}
|
|
1674
1446
|
`
|
|
1675
1447
|
};
|
|
1676
1448
|
|
|
1677
|
-
// src/services/
|
|
1678
|
-
var
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1449
|
+
// src/services/user/types/auth.type.ts
|
|
1450
|
+
var authenticateWithStoreResponse = [
|
|
1451
|
+
"accessToken"
|
|
1452
|
+
];
|
|
1453
|
+
var checkRegistrationResponse = [
|
|
1454
|
+
"isRegistered"
|
|
1455
|
+
];
|
|
1456
|
+
var changePinResponse = [
|
|
1457
|
+
"success"
|
|
1458
|
+
];
|
|
1459
|
+
var updateTxPinResponse = [
|
|
1460
|
+
"success"
|
|
1461
|
+
];
|
|
1462
|
+
var resetPinResponse = [
|
|
1463
|
+
"success"
|
|
1464
|
+
];
|
|
1465
|
+
var sendOTPResponse = [
|
|
1466
|
+
"successful",
|
|
1467
|
+
"otp"
|
|
1468
|
+
];
|
|
1469
|
+
var verifyOTPResponse = [
|
|
1470
|
+
"otpVerifiedAccessToken"
|
|
1471
|
+
];
|
|
1472
|
+
var loginResponse = [
|
|
1473
|
+
"accessToken",
|
|
1474
|
+
"userId"
|
|
1475
|
+
];
|
|
1476
|
+
var signUpResponse = [
|
|
1477
|
+
"accessToken",
|
|
1478
|
+
"userId"
|
|
1479
|
+
];
|
|
1480
|
+
|
|
1481
|
+
// src/services/user/auth.service.ts
|
|
1482
|
+
var createAuthService = (client) => ({
|
|
1483
|
+
async authenticateWithStore(input, fetchFields, option) {
|
|
1484
|
+
var _a;
|
|
1485
|
+
return client.request(
|
|
1486
|
+
authSchema.authenticateWithStore(
|
|
1683
1487
|
gqlQueryStringBuilder(
|
|
1684
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
1685
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updatePriceResponseNestedFields
|
|
1488
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : authenticateWithStoreResponse
|
|
1686
1489
|
)
|
|
1687
1490
|
),
|
|
1688
1491
|
input,
|
|
1689
1492
|
option
|
|
1690
1493
|
);
|
|
1691
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.updatePrice) != null ? _d : null;
|
|
1692
1494
|
},
|
|
1693
|
-
async
|
|
1694
|
-
var _a
|
|
1695
|
-
|
|
1696
|
-
|
|
1495
|
+
async checkRegistration(input, fetchFields, option) {
|
|
1496
|
+
var _a;
|
|
1497
|
+
return client.request(
|
|
1498
|
+
authSchema.checkRegistration(
|
|
1697
1499
|
gqlQueryStringBuilder(
|
|
1698
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
1500
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : checkRegistrationResponse
|
|
1699
1501
|
)
|
|
1700
1502
|
),
|
|
1701
1503
|
input,
|
|
1702
1504
|
option
|
|
1703
1505
|
);
|
|
1704
|
-
return (_c = (_b = res.data) == null ? void 0 : _b.removePrice) != null ? _c : null;
|
|
1705
1506
|
},
|
|
1706
|
-
async
|
|
1707
|
-
var _a
|
|
1708
|
-
|
|
1709
|
-
|
|
1507
|
+
async changePin(input, fetchFields, option) {
|
|
1508
|
+
var _a;
|
|
1509
|
+
return client.request(
|
|
1510
|
+
authSchema.changePin(
|
|
1710
1511
|
gqlQueryStringBuilder(
|
|
1711
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
1712
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addPriceResponseNestedFields
|
|
1512
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : changePinResponse
|
|
1713
1513
|
)
|
|
1714
1514
|
),
|
|
1715
1515
|
input,
|
|
1716
1516
|
option
|
|
1717
1517
|
);
|
|
1718
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.addPrice) != null ? _d : null;
|
|
1719
1518
|
},
|
|
1720
|
-
async
|
|
1721
|
-
var _a
|
|
1722
|
-
|
|
1723
|
-
|
|
1519
|
+
async updateTxPin(input, fetchFields, option) {
|
|
1520
|
+
var _a;
|
|
1521
|
+
return client.request(
|
|
1522
|
+
authSchema.updateTxPin(
|
|
1724
1523
|
gqlQueryStringBuilder(
|
|
1725
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
1726
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getPriceResponseNestedFields
|
|
1524
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateTxPinResponse
|
|
1727
1525
|
)
|
|
1728
1526
|
),
|
|
1729
1527
|
input,
|
|
1730
1528
|
option
|
|
1731
1529
|
);
|
|
1732
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getPrice) != null ? _d : null;
|
|
1733
1530
|
},
|
|
1734
|
-
async
|
|
1735
|
-
var _a
|
|
1736
|
-
|
|
1737
|
-
|
|
1531
|
+
async verifyOTP(input, fetchFields, option) {
|
|
1532
|
+
var _a;
|
|
1533
|
+
return client.request(
|
|
1534
|
+
authSchema.verifyOTP(
|
|
1738
1535
|
gqlQueryStringBuilder(
|
|
1739
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
1740
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getPricesResponseNestedFields
|
|
1536
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : verifyOTPResponse
|
|
1741
1537
|
)
|
|
1742
1538
|
),
|
|
1743
1539
|
input,
|
|
1744
1540
|
option
|
|
1745
1541
|
);
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1542
|
+
},
|
|
1543
|
+
async sendOTP(input, fetchFields, option) {
|
|
1544
|
+
var _a;
|
|
1545
|
+
return client.request(
|
|
1546
|
+
authSchema.sendOTP(
|
|
1547
|
+
gqlQueryStringBuilder(
|
|
1548
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : sendOTPResponse
|
|
1549
|
+
)
|
|
1550
|
+
),
|
|
1551
|
+
input,
|
|
1552
|
+
option
|
|
1553
|
+
);
|
|
1554
|
+
},
|
|
1555
|
+
async resetPin(input, fetchFields, option) {
|
|
1556
|
+
var _a;
|
|
1557
|
+
return client.request(
|
|
1558
|
+
authSchema.resetPin(
|
|
1559
|
+
gqlQueryStringBuilder(
|
|
1560
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : resetPinResponse
|
|
1561
|
+
)
|
|
1562
|
+
),
|
|
1563
|
+
input,
|
|
1564
|
+
option
|
|
1565
|
+
);
|
|
1566
|
+
},
|
|
1567
|
+
async signUp(input, fetchFields, option) {
|
|
1568
|
+
var _a;
|
|
1569
|
+
return client.request(
|
|
1570
|
+
authSchema.signUp(
|
|
1571
|
+
gqlQueryStringBuilder(
|
|
1572
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : signUpResponse
|
|
1573
|
+
)
|
|
1574
|
+
),
|
|
1575
|
+
input,
|
|
1576
|
+
option
|
|
1577
|
+
);
|
|
1578
|
+
},
|
|
1579
|
+
async login(input, fetchFields, option) {
|
|
1580
|
+
var _a;
|
|
1581
|
+
return client.request(
|
|
1582
|
+
authSchema.login(
|
|
1583
|
+
gqlQueryStringBuilder(
|
|
1584
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : loginResponse
|
|
1585
|
+
)
|
|
1586
|
+
),
|
|
1587
|
+
input,
|
|
1588
|
+
option
|
|
1589
|
+
);
|
|
1590
|
+
}
|
|
1591
|
+
});
|
|
1592
|
+
|
|
1593
|
+
// src/services/user/schemas/user-notification.schema.ts
|
|
1594
|
+
var userNotificationSchema = {
|
|
1595
|
+
getUserNotifications: (query) => `
|
|
1596
|
+
query getUserNotifications($search: String, $userNotification: UserNotificationInput, $userNotificationIds: [String], $limit: Int!, $skip: Int!) {
|
|
1597
|
+
getUserNotifications(search: $search, userNotification: $userNotification, userNotificationIds: $userNotificationIds, limit: $limit, skip: $skip) {
|
|
1598
|
+
${query}
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
`
|
|
1602
|
+
};
|
|
1603
|
+
|
|
1604
|
+
// src/services/user/types/user-notification.type.ts
|
|
1605
|
+
var getUserNotificationsResponseFields = ["userNotifications"];
|
|
1606
|
+
var getUserNotificationsResponseNestedFields = {
|
|
1607
|
+
notification: notificationQuery,
|
|
1608
|
+
userNotifications: userNotificationQuery
|
|
1609
|
+
};
|
|
1610
|
+
|
|
1611
|
+
// src/services/user/user-notification.service.ts
|
|
1612
|
+
var createUserNotificationService = (client) => ({
|
|
1613
|
+
async getUserNotifications(input, fetchFields, option) {
|
|
1614
|
+
var _a, _b, _c;
|
|
1615
|
+
const res = await client.request(
|
|
1616
|
+
userNotificationSchema.getUserNotifications(
|
|
1617
|
+
gqlQueryStringBuilder(
|
|
1618
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getUserNotificationsResponseFields,
|
|
1619
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getUserNotificationsResponseNestedFields
|
|
1620
|
+
)
|
|
1621
|
+
),
|
|
1622
|
+
input,
|
|
1623
|
+
option
|
|
1624
|
+
);
|
|
1625
|
+
return (_c = res.data) == null ? void 0 : _c.getUserNotifications;
|
|
1626
|
+
}
|
|
1627
|
+
});
|
|
1628
|
+
|
|
1629
|
+
// src/services/user/schemas/user-account.schema.ts
|
|
1630
|
+
var userAccountSchema = {
|
|
1631
|
+
get: {
|
|
1632
|
+
operation: "query",
|
|
1633
|
+
name: "getUserAccount",
|
|
1634
|
+
variables: "($userAccount: UserAccountInput!)",
|
|
1635
|
+
field: "(userAccount: $userAccount)"
|
|
1636
|
+
},
|
|
1637
|
+
list: {
|
|
1638
|
+
operation: "query",
|
|
1639
|
+
name: "getUserAccounts",
|
|
1640
|
+
variables: "($limit: Int!, $skip: Int!, $search: String, $userAccount: UserAccountInput, $userAccountIds: [String])",
|
|
1641
|
+
field: "(limit: $limit, skip: $skip, search: $search, userAccount: $userAccount, userAccountIds: $userAccountIds)"
|
|
1642
|
+
},
|
|
1643
|
+
create: {
|
|
1644
|
+
operation: "mutation",
|
|
1645
|
+
name: "createUserAccount",
|
|
1646
|
+
variables: "($userAccount: UserAccountInput!)",
|
|
1647
|
+
field: "(userAccount: $userAccount)"
|
|
1648
|
+
},
|
|
1649
|
+
update: {
|
|
1650
|
+
operation: "mutation",
|
|
1651
|
+
name: "updateUserAccount",
|
|
1652
|
+
variables: "($userAccountId: String!, $userAccount: UserAccountInput!)",
|
|
1653
|
+
field: "(userAccountId: $userAccountId, userAccount: $userAccount)"
|
|
1654
|
+
},
|
|
1655
|
+
delete: {
|
|
1656
|
+
operation: "mutation",
|
|
1657
|
+
name: "removeUserAccount",
|
|
1658
|
+
variables: "($userAccountId: String!)",
|
|
1659
|
+
field: "(userAccountId: $userAccountId)"
|
|
1660
|
+
}
|
|
1661
|
+
};
|
|
1662
|
+
|
|
1663
|
+
// src/services/user/user-account.service.ts
|
|
1664
|
+
var createUserAccountService = (client) => ({
|
|
1665
|
+
createUserAccount: createOperationExecutor(
|
|
1666
|
+
client,
|
|
1667
|
+
"createUserAccount",
|
|
1668
|
+
{
|
|
1669
|
+
schema: buildSchema(userAccountSchema.create),
|
|
1670
|
+
defaultRootFields: [...userAccountIntegration.create.responseFields, "pin"],
|
|
1671
|
+
defaultNestedFields: userAccountIntegration.create.nestedFields
|
|
1672
|
+
}
|
|
1673
|
+
),
|
|
1674
|
+
updateUserAccount: createOperationExecutor(
|
|
1675
|
+
client,
|
|
1676
|
+
"updateUserAccount",
|
|
1677
|
+
{
|
|
1678
|
+
schema: buildSchema(userAccountSchema.update),
|
|
1679
|
+
defaultRootFields: userAccountIntegration.update.responseFields,
|
|
1680
|
+
defaultNestedFields: userAccountIntegration.update.nestedFields
|
|
1681
|
+
}
|
|
1682
|
+
),
|
|
1683
|
+
getUserAccount: createOperationExecutor(
|
|
1684
|
+
client,
|
|
1685
|
+
"getUserAccount",
|
|
1686
|
+
{
|
|
1687
|
+
schema: buildSchema(userAccountSchema.get),
|
|
1688
|
+
defaultRootFields: userAccountIntegration.get.responseFields,
|
|
1689
|
+
defaultNestedFields: userAccountIntegration.get.nestedFields
|
|
1690
|
+
}
|
|
1691
|
+
),
|
|
1692
|
+
removeUserAccount: createOperationExecutor(
|
|
1693
|
+
client,
|
|
1694
|
+
"removeUserAccount",
|
|
1695
|
+
{
|
|
1696
|
+
schema: buildSchema(userAccountSchema.delete),
|
|
1697
|
+
defaultRootFields: userAccountDeleteIntegration.responseFields,
|
|
1698
|
+
defaultNestedFields: {}
|
|
1699
|
+
}
|
|
1700
|
+
),
|
|
1701
|
+
getUserAccounts: createOperationExecutor(
|
|
1702
|
+
client,
|
|
1703
|
+
"getUserAccounts",
|
|
1704
|
+
{
|
|
1705
|
+
schema: buildSchema(userAccountSchema.list),
|
|
1706
|
+
defaultRootFields: [...userAccountListIntegration.responseFields],
|
|
1707
|
+
defaultNestedFields: userAccountListIntegration.nestedFields
|
|
1708
|
+
}
|
|
1709
|
+
)
|
|
1710
|
+
});
|
|
1711
|
+
|
|
1712
|
+
// src/services/user/types/user-role.type.ts
|
|
1713
|
+
var ENTITY3 = "userRole";
|
|
1714
|
+
var userRoleIntegration = createStandardEntityIntegration({
|
|
1715
|
+
key: ENTITY3,
|
|
1716
|
+
fields: userRoleQuery,
|
|
1717
|
+
nested: {
|
|
1718
|
+
privileges: privilegeQuery
|
|
1719
|
+
}
|
|
1720
|
+
});
|
|
1721
|
+
var userRoleListIntegration = createListIntegration({
|
|
1722
|
+
key: "userRoles",
|
|
1723
|
+
fields: userRoleQuery,
|
|
1724
|
+
nested: {
|
|
1725
|
+
privileges: privilegeQuery
|
|
1726
|
+
}
|
|
1727
|
+
});
|
|
1728
|
+
var userRoleDeleteIntegration = createDeleteIntegration(ENTITY3);
|
|
1729
|
+
|
|
1730
|
+
// src/services/user/schemas/user-role.schema.ts
|
|
1731
|
+
var userRoleSchema = {
|
|
1732
|
+
get: {
|
|
1733
|
+
operation: "query",
|
|
1734
|
+
name: "getUserRole",
|
|
1735
|
+
variables: "($userRole: UserRoleInput!)",
|
|
1736
|
+
field: "(userRole: $userRole)"
|
|
1737
|
+
},
|
|
1738
|
+
list: {
|
|
1739
|
+
operation: "query",
|
|
1740
|
+
name: "getUserRoles",
|
|
1741
|
+
variables: "($limit: Int!, $skip: Int!, $search: String, $userRole: UserRoleInput, $userRoleIds: [String])",
|
|
1742
|
+
field: "(limit: $limit, skip: $skip, search: $search, userRole: $userRole, userRoleIds: $userRoleIds)"
|
|
1743
|
+
},
|
|
1744
|
+
create: {
|
|
1745
|
+
operation: "mutation",
|
|
1746
|
+
name: "createUserRole",
|
|
1747
|
+
variables: "($userRole: UserRoleInput!)",
|
|
1748
|
+
field: "(userRole: $userRole)"
|
|
1749
|
+
},
|
|
1750
|
+
update: {
|
|
1751
|
+
operation: "mutation",
|
|
1752
|
+
name: "updateUserRole",
|
|
1753
|
+
variables: "($userRoleId: String!, $userRole: UserRoleInput!)",
|
|
1754
|
+
field: "(userRoleId: $userRoleId, userRole: $userRole)"
|
|
1755
|
+
},
|
|
1756
|
+
delete: {
|
|
1757
|
+
operation: "mutation",
|
|
1758
|
+
name: "removeUserRole",
|
|
1759
|
+
variables: "($userRoleId: String!)",
|
|
1760
|
+
field: "(userRoleId: $userRoleId)"
|
|
1761
|
+
}
|
|
1762
|
+
};
|
|
1763
|
+
|
|
1764
|
+
// src/services/user/user-role.service.ts
|
|
1765
|
+
var createUserRoleService = (client) => ({
|
|
1766
|
+
createUserRole: createOperationExecutor(
|
|
1767
|
+
client,
|
|
1768
|
+
"createUserRole",
|
|
1769
|
+
{
|
|
1770
|
+
schema: buildSchema(userRoleSchema.create),
|
|
1771
|
+
defaultRootFields: userRoleIntegration.create.responseFields,
|
|
1772
|
+
defaultNestedFields: userRoleIntegration.create.nestedFields
|
|
1773
|
+
}
|
|
1774
|
+
),
|
|
1775
|
+
updateUserRole: createOperationExecutor(
|
|
1776
|
+
client,
|
|
1777
|
+
"updateUserRole",
|
|
1778
|
+
{
|
|
1779
|
+
schema: buildSchema(userRoleSchema.update),
|
|
1780
|
+
defaultRootFields: userRoleIntegration.update.responseFields,
|
|
1781
|
+
defaultNestedFields: userRoleIntegration.update.nestedFields
|
|
1782
|
+
}
|
|
1783
|
+
),
|
|
1784
|
+
getUserRole: createOperationExecutor(
|
|
1785
|
+
client,
|
|
1786
|
+
"getUserRole",
|
|
1787
|
+
{
|
|
1788
|
+
schema: buildSchema(userRoleSchema.get),
|
|
1789
|
+
defaultRootFields: userRoleIntegration.get.responseFields,
|
|
1790
|
+
defaultNestedFields: userRoleIntegration.get.nestedFields
|
|
1791
|
+
}
|
|
1792
|
+
),
|
|
1793
|
+
removeUserRole: createOperationExecutor(
|
|
1794
|
+
client,
|
|
1795
|
+
"removeUserRole",
|
|
1796
|
+
{
|
|
1797
|
+
schema: buildSchema(userRoleSchema.delete),
|
|
1798
|
+
defaultRootFields: userRoleDeleteIntegration.responseFields,
|
|
1799
|
+
defaultNestedFields: {}
|
|
1800
|
+
}
|
|
1801
|
+
),
|
|
1802
|
+
getUserRoles: createOperationExecutor(
|
|
1803
|
+
client,
|
|
1804
|
+
"getUserRoles",
|
|
1805
|
+
{
|
|
1806
|
+
schema: buildSchema(userRoleSchema.list),
|
|
1807
|
+
defaultRootFields: [...userRoleListIntegration.responseFields],
|
|
1808
|
+
defaultNestedFields: userRoleListIntegration.nestedFields
|
|
1809
|
+
}
|
|
1810
|
+
)
|
|
1811
|
+
});
|
|
1812
|
+
|
|
1813
|
+
// src/services/user/types/application-feature.type.ts
|
|
1814
|
+
var ENTITY4 = "applicationFeature";
|
|
1815
|
+
var applicationFeatureIntegration = createStandardEntityIntegration({
|
|
1816
|
+
key: ENTITY4,
|
|
1817
|
+
fields: applicationFeatureQuery
|
|
1818
|
+
});
|
|
1819
|
+
var applicationFeatureListIntegration = createListIntegration({
|
|
1820
|
+
key: "applicationFeatures",
|
|
1821
|
+
fields: applicationFeatureQuery
|
|
1822
|
+
});
|
|
1823
|
+
var applicationFeatureDeleteIntegration = createDeleteIntegration(ENTITY4);
|
|
1824
|
+
|
|
1825
|
+
// src/services/user/schemas/application-feature.schema.ts
|
|
1826
|
+
var applicationFeatureSchema = {
|
|
1827
|
+
get: {
|
|
1828
|
+
operation: "query",
|
|
1829
|
+
name: "getApplicationFeature",
|
|
1830
|
+
variables: "($applicationFeature: ApplicationFeatureInput!)",
|
|
1831
|
+
field: "(applicationFeature: $applicationFeature)"
|
|
1832
|
+
},
|
|
1833
|
+
list: {
|
|
1834
|
+
operation: "query",
|
|
1835
|
+
name: "getApplicationFeatures",
|
|
1836
|
+
variables: "($limit: Int!, $skip: Int!, $search: String, $applicationFeature: ApplicationFeatureInput, $applicationFeatureIds: [String])",
|
|
1837
|
+
field: "(limit: $limit, skip: $skip, search: $search, applicationFeature: $applicationFeature, applicationFeatureIds: $applicationFeatureIds)"
|
|
1838
|
+
},
|
|
1839
|
+
create: {
|
|
1840
|
+
operation: "mutation",
|
|
1841
|
+
name: "createApplicationFeature",
|
|
1842
|
+
variables: "($applicationFeature: ApplicationFeatureInput!)",
|
|
1843
|
+
field: "(applicationFeature: $applicationFeature)"
|
|
1844
|
+
},
|
|
1845
|
+
update: {
|
|
1846
|
+
operation: "mutation",
|
|
1847
|
+
name: "updateApplicationFeature",
|
|
1848
|
+
variables: "($applicationFeatureId: String!, $applicationFeature: ApplicationFeatureInput!)",
|
|
1849
|
+
field: "(applicationFeatureId: $applicationFeatureId, applicationFeature: $applicationFeature)"
|
|
1850
|
+
},
|
|
1851
|
+
delete: {
|
|
1852
|
+
operation: "mutation",
|
|
1853
|
+
name: "removeApplicationFeature",
|
|
1854
|
+
variables: "($applicationFeatureId: String!)",
|
|
1855
|
+
field: "(applicationFeatureId: $applicationFeatureId)"
|
|
1856
|
+
}
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1859
|
+
// src/services/user/application-feature.service.ts
|
|
1860
|
+
var createApplicationFeatureService = (client) => ({
|
|
1861
|
+
createApplicationFeature: createOperationExecutor(
|
|
1862
|
+
client,
|
|
1863
|
+
"createApplicationFeature",
|
|
1864
|
+
{
|
|
1865
|
+
schema: buildSchema(applicationFeatureSchema.create),
|
|
1866
|
+
defaultRootFields: applicationFeatureIntegration.create.responseFields,
|
|
1867
|
+
defaultNestedFields: applicationFeatureIntegration.create.nestedFields
|
|
1868
|
+
}
|
|
1869
|
+
),
|
|
1870
|
+
updateApplicationFeature: createOperationExecutor(
|
|
1871
|
+
client,
|
|
1872
|
+
"updateApplicationFeature",
|
|
1873
|
+
{
|
|
1874
|
+
schema: buildSchema(applicationFeatureSchema.update),
|
|
1875
|
+
defaultRootFields: applicationFeatureIntegration.update.responseFields,
|
|
1876
|
+
defaultNestedFields: applicationFeatureIntegration.update.nestedFields
|
|
1877
|
+
}
|
|
1878
|
+
),
|
|
1879
|
+
getApplicationFeature: createOperationExecutor(
|
|
1880
|
+
client,
|
|
1881
|
+
"getApplicationFeature",
|
|
1882
|
+
{
|
|
1883
|
+
schema: buildSchema(applicationFeatureSchema.get),
|
|
1884
|
+
defaultRootFields: applicationFeatureIntegration.get.responseFields,
|
|
1885
|
+
defaultNestedFields: applicationFeatureIntegration.get.nestedFields
|
|
1886
|
+
}
|
|
1887
|
+
),
|
|
1888
|
+
removeApplicationFeature: createOperationExecutor(
|
|
1889
|
+
client,
|
|
1890
|
+
"removeApplicationFeature",
|
|
1891
|
+
{
|
|
1892
|
+
schema: buildSchema(applicationFeatureSchema.delete),
|
|
1893
|
+
defaultRootFields: applicationFeatureDeleteIntegration.responseFields,
|
|
1894
|
+
defaultNestedFields: {}
|
|
1895
|
+
}
|
|
1896
|
+
),
|
|
1897
|
+
getApplicationFeatures: createOperationExecutor(
|
|
1898
|
+
client,
|
|
1899
|
+
"getApplicationFeatures",
|
|
1900
|
+
{
|
|
1901
|
+
schema: buildSchema(applicationFeatureSchema.list),
|
|
1902
|
+
defaultRootFields: [...applicationFeatureListIntegration.responseFields],
|
|
1903
|
+
defaultNestedFields: applicationFeatureListIntegration.nestedFields
|
|
1904
|
+
}
|
|
1905
|
+
)
|
|
1906
|
+
});
|
|
1907
|
+
|
|
1908
|
+
// src/services/inventory/types/product.type.ts
|
|
1909
|
+
var getCustomerProductCountsByIdsResponse = [
|
|
1910
|
+
"customersProductCounts"
|
|
1911
|
+
];
|
|
1912
|
+
var getCustomerProductCountsByIdsResponseNestedFields = {
|
|
1913
|
+
customersProductCounts: customersProductCountQuery
|
|
1914
|
+
};
|
|
1915
|
+
var getProductResponseFields = [
|
|
1916
|
+
"product"
|
|
1917
|
+
];
|
|
1918
|
+
var _getProductResponseNestedFields = {
|
|
1919
|
+
productPackages: packageQuery,
|
|
1920
|
+
smallestPackage: packageQuery,
|
|
1921
|
+
category: categoryQuery,
|
|
1922
|
+
price: priceQuery,
|
|
1923
|
+
stocks: stockQuery,
|
|
1924
|
+
productAttributes: attributeQuery
|
|
1925
|
+
};
|
|
1926
|
+
var getProductResponseNestedFields = {
|
|
1927
|
+
product: productQuery,
|
|
1928
|
+
..._getProductResponseNestedFields
|
|
1929
|
+
};
|
|
1930
|
+
var getProductsResponseFields = [
|
|
1931
|
+
"products"
|
|
1932
|
+
];
|
|
1933
|
+
var getProductsResponseNestedFields = {
|
|
1934
|
+
products: productQuery,
|
|
1935
|
+
..._getProductResponseNestedFields
|
|
1936
|
+
};
|
|
1937
|
+
var getProductByBarcodeResponse = [
|
|
1938
|
+
"Product"
|
|
1939
|
+
];
|
|
1940
|
+
var getProductByBarcodeResponseNestedFields = {
|
|
1941
|
+
Product: productQuery,
|
|
1942
|
+
..._getProductResponseNestedFields
|
|
1943
|
+
};
|
|
1944
|
+
var searchProductNamesResponse = [
|
|
1945
|
+
"productNames"
|
|
1946
|
+
];
|
|
1947
|
+
var searchProductNamesResponseNestedFields = {
|
|
1948
|
+
productNames: productNameQuery
|
|
1949
|
+
};
|
|
1950
|
+
var addProductResponseFields = [
|
|
1951
|
+
"product"
|
|
1952
|
+
];
|
|
1953
|
+
var addProductResponseNestedFields = {
|
|
1954
|
+
product: productQuery,
|
|
1955
|
+
uploadImageResponse: ["fileUrl", "url"],
|
|
1956
|
+
..._getProductResponseNestedFields
|
|
1957
|
+
};
|
|
1958
|
+
var updateProductResponseFields = getProductResponseFields;
|
|
1959
|
+
var updateProductResponseNestedFields = getProductResponseNestedFields;
|
|
1960
|
+
var removeProductResponseFields = [
|
|
1961
|
+
"productId"
|
|
1962
|
+
];
|
|
1963
|
+
var searchCategoriesAndTemplateResponse = [
|
|
1964
|
+
"productCategories"
|
|
1965
|
+
];
|
|
1966
|
+
var searchCategoriesAndTemplateResponseNestedFields = {
|
|
1967
|
+
productCategories: categoryQuery
|
|
1968
|
+
};
|
|
1969
|
+
|
|
1970
|
+
// src/services/inventory/types/package.type.ts
|
|
1971
|
+
var getPackageResponseFields = [
|
|
1972
|
+
"productPackage"
|
|
1973
|
+
];
|
|
1974
|
+
var _getPackageResponseNestedFields = {
|
|
1975
|
+
price: priceQuery,
|
|
1976
|
+
stocks: stockQuery
|
|
1977
|
+
};
|
|
1978
|
+
var getPackageResponseNestedFields = {
|
|
1979
|
+
productPackage: packageQuery,
|
|
1980
|
+
..._getPackageResponseNestedFields
|
|
1981
|
+
};
|
|
1982
|
+
var removePackageResponseFields = [
|
|
1983
|
+
"packageId"
|
|
1984
|
+
];
|
|
1985
|
+
var updatePackageResponseFields = getPackageResponseFields;
|
|
1986
|
+
var updatePackageResponseNestedFields = getPackageResponseNestedFields;
|
|
1987
|
+
var addPackagesResponseFields = [
|
|
1988
|
+
"productPackages"
|
|
1989
|
+
];
|
|
1990
|
+
var addPackagesResponseNestedFields = {
|
|
1991
|
+
productPackages: packageQuery,
|
|
1992
|
+
..._getPackageResponseNestedFields
|
|
1993
|
+
};
|
|
1994
|
+
var addPackageResponseFields = getPackageResponseFields;
|
|
1995
|
+
var addPackageResponseNestedFields = getPackageResponseNestedFields;
|
|
1996
|
+
var getPackagesResponseFields = [
|
|
1997
|
+
"productPackages",
|
|
1998
|
+
"uniqueProducts"
|
|
1999
|
+
];
|
|
2000
|
+
var getPackagesResponseNestedFields = {
|
|
2001
|
+
// productPackages: packageQuery, product already contained this
|
|
2002
|
+
uniqueProducts: productQuery,
|
|
2003
|
+
...getPackageResponseNestedFields,
|
|
2004
|
+
...getProductResponseNestedFields
|
|
2005
|
+
};
|
|
2006
|
+
|
|
2007
|
+
// src/services/inventory/types/price.type.ts
|
|
2008
|
+
var getPriceResponseFields = ["price"];
|
|
2009
|
+
var _getPriceResponseNestedFields = {};
|
|
2010
|
+
var getPriceResponseNestedFields = {
|
|
2011
|
+
price: priceQuery,
|
|
2012
|
+
..._getPriceResponseNestedFields
|
|
2013
|
+
};
|
|
2014
|
+
var getPricesResponseFields = ["prices"];
|
|
2015
|
+
var getPricesResponseNestedFields = {
|
|
2016
|
+
..._getPriceResponseNestedFields,
|
|
2017
|
+
prices: priceQuery
|
|
2018
|
+
};
|
|
2019
|
+
var addPriceResponseFields = getPriceResponseFields;
|
|
2020
|
+
var addPriceResponseNestedFields = getPriceResponseNestedFields;
|
|
2021
|
+
var updatePriceResponseFields = getPriceResponseFields;
|
|
2022
|
+
var updatePriceResponseNestedFields = getPriceResponseNestedFields;
|
|
2023
|
+
var removePriceResponseFields = [
|
|
2024
|
+
"priceId"
|
|
2025
|
+
];
|
|
2026
|
+
|
|
2027
|
+
// src/services/inventory/types/stock.type.ts
|
|
2028
|
+
var getStockResponse = [
|
|
2029
|
+
"stock"
|
|
2030
|
+
];
|
|
2031
|
+
var getStockResponseNestedFields = {
|
|
2032
|
+
stock: stockQuery
|
|
2033
|
+
};
|
|
2034
|
+
var getStocksResponse = [
|
|
2035
|
+
"stocks"
|
|
2036
|
+
];
|
|
2037
|
+
var getStocksResponseNestedFields = {
|
|
2038
|
+
stocks: stockQuery
|
|
2039
|
+
};
|
|
2040
|
+
var addStockResponse = getStockResponse;
|
|
2041
|
+
var addStockResponseNestedFields = getStockResponseNestedFields;
|
|
2042
|
+
var updateStockResponse = getStockResponse;
|
|
2043
|
+
var updateStockResponseNestedFields = getStockResponseNestedFields;
|
|
2044
|
+
var removeStockResponse = [
|
|
2045
|
+
"stockId"
|
|
2046
|
+
];
|
|
2047
|
+
|
|
2048
|
+
// src/services/inventory/types/store.type.ts
|
|
2049
|
+
var getStoreCountResponse = [
|
|
2050
|
+
"count"
|
|
2051
|
+
];
|
|
2052
|
+
var getStoreResponse = [
|
|
2053
|
+
"store"
|
|
2054
|
+
];
|
|
2055
|
+
var _getStoreResponseNestedFields = {
|
|
2056
|
+
address: addressQuery
|
|
2057
|
+
};
|
|
2058
|
+
var getStoreResponseNestedFields = {
|
|
2059
|
+
store: storeQuery,
|
|
2060
|
+
..._getStoreResponseNestedFields
|
|
2061
|
+
};
|
|
2062
|
+
var getStoresResponse = [
|
|
2063
|
+
"stores"
|
|
2064
|
+
];
|
|
2065
|
+
var getStoresResponseNestedFields = {
|
|
2066
|
+
stores: storeQuery,
|
|
2067
|
+
address: addressQuery
|
|
2068
|
+
};
|
|
2069
|
+
var addStoreResponse = getStoreResponse;
|
|
2070
|
+
var addStoreResponseNestedFields = getStoreResponseNestedFields;
|
|
2071
|
+
var updateStoreResponse = getStoreResponse;
|
|
2072
|
+
var updateStoreResponseNestedFields = getStoreResponseNestedFields;
|
|
2073
|
+
var removeStoreResponse = [
|
|
2074
|
+
"storeId"
|
|
2075
|
+
];
|
|
2076
|
+
|
|
2077
|
+
// src/services/inventory/types/store-category-product.type.ts
|
|
2078
|
+
var getStoreCategoryProductResponseFields = [
|
|
2079
|
+
"storeCategoryProduct"
|
|
2080
|
+
];
|
|
2081
|
+
var getStoreCategoryProductResponseNestedFields = {
|
|
2082
|
+
storeCategoryProduct: storeCategoryProductQuery
|
|
2083
|
+
};
|
|
2084
|
+
var getStoreCategoryProductsResponseFields = [
|
|
2085
|
+
"storeCategoryProducts"
|
|
2086
|
+
];
|
|
2087
|
+
var getStoreCategoryProductsResponseNestedFields = {
|
|
2088
|
+
storeCategoryProducts: storeCategoryProductQuery
|
|
2089
|
+
};
|
|
2090
|
+
var createStoreCategoryProductResponseFields = getStoreCategoryProductResponseFields;
|
|
2091
|
+
var createStoreCategoryProductResponseNestedFields = getStoreCategoryProductResponseNestedFields;
|
|
2092
|
+
var updateStoreCategoryProductResponseFields = getStoreCategoryProductResponseFields;
|
|
2093
|
+
var updateStoreCategoryProductResponseNestedFields = getStoreCategoryProductResponseNestedFields;
|
|
2094
|
+
var removeStoreCategoryProductResponseFields = [
|
|
2095
|
+
"storeCategoryProductId"
|
|
2096
|
+
];
|
|
1749
2097
|
|
|
1750
|
-
// src/services/inventory/
|
|
1751
|
-
var
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
query
|
|
1775
|
-
|
|
1776
|
-
${query}
|
|
1777
|
-
}
|
|
1778
|
-
}
|
|
1779
|
-
`,
|
|
1780
|
-
getProductByBarcode: (query) => `
|
|
1781
|
-
query getProductByBarcode($barcode: String!, $fetchFromGS1IfNotFound: Boolean, $template: Boolean) {
|
|
1782
|
-
getProductByBarcode(barcode: $barcode, fetchFromGS1IfNotFound: $fetchFromGS1IfNotFound, template: $template) {
|
|
2098
|
+
// src/services/inventory/types/store-category.type.ts
|
|
2099
|
+
var getStoreCategoryResponseFields = [
|
|
2100
|
+
"storeCategory"
|
|
2101
|
+
];
|
|
2102
|
+
var getStoreCategoryResponseNestedFields = {
|
|
2103
|
+
storeCategory: storeCategoryQuery
|
|
2104
|
+
};
|
|
2105
|
+
var getStoreCategoriesResponseFields = [
|
|
2106
|
+
"storeCategories"
|
|
2107
|
+
];
|
|
2108
|
+
var getStoreCategoriesResponseNestedFields = {
|
|
2109
|
+
storeCategories: storeCategoryQuery
|
|
2110
|
+
};
|
|
2111
|
+
var createStoreCategoryResponseFields = getStoreCategoryResponseFields;
|
|
2112
|
+
var createStoreCategoryResponseNestedFields = getStoreCategoryResponseNestedFields;
|
|
2113
|
+
var updateStoreCategoryResponseFields = getStoreCategoryResponseFields;
|
|
2114
|
+
var updateStoreCategoryResponseNestedFields = getStoreCategoryResponseNestedFields;
|
|
2115
|
+
var removeStoreCategoryResponseFields = [
|
|
2116
|
+
"storeCategoryId"
|
|
2117
|
+
];
|
|
2118
|
+
|
|
2119
|
+
// src/services/inventory/schema/package.schema.ts
|
|
2120
|
+
var packageSchema = {
|
|
2121
|
+
getPackage: (query) => `
|
|
2122
|
+
query getPackage($productPackage: ProductPackageInput!, $template: Boolean) {
|
|
2123
|
+
getPackage(productPackage: $productPackage, template: $template) {
|
|
1783
2124
|
${query}
|
|
1784
2125
|
}
|
|
1785
2126
|
}
|
|
1786
2127
|
`,
|
|
1787
|
-
|
|
1788
|
-
query
|
|
1789
|
-
|
|
2128
|
+
getPackages: (query) => `
|
|
2129
|
+
query getPackages($productPackage: ProductPackageInput, $packageIds: [String], $search: String, $template: Boolean, $shouldGetFromAllStores: Boolean, $limit: Int, $skip: Int) {
|
|
2130
|
+
getPackages(productPackage: $productPackage, packageIds: $packageIds, search: $search, template: $template, shouldGetFromAllStores: $shouldGetFromAllStores, limit: $limit, skip: $skip) {
|
|
1790
2131
|
${query}
|
|
1791
2132
|
}
|
|
1792
2133
|
}
|
|
1793
2134
|
`,
|
|
1794
|
-
|
|
1795
|
-
mutation
|
|
1796
|
-
|
|
1797
|
-
${mutation}
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
`,
|
|
1801
|
-
updateProduct: (mutation) => `
|
|
1802
|
-
mutation updateProduct($productId: String!, $product: ProductInput!, $template: Boolean) {
|
|
1803
|
-
updateProduct(productId: $productId, product: $product, template: $template) {
|
|
1804
|
-
${mutation}
|
|
1805
|
-
}
|
|
1806
|
-
}
|
|
1807
|
-
`,
|
|
1808
|
-
removeProduct: (mutation) => `
|
|
1809
|
-
mutation removeProduct($productId: String!, $template: Boolean) {
|
|
1810
|
-
removeProduct(productId: $productId, template: $template) {
|
|
1811
|
-
${mutation}
|
|
1812
|
-
}
|
|
1813
|
-
}
|
|
1814
|
-
`
|
|
1815
|
-
};
|
|
1816
|
-
|
|
1817
|
-
// src/services/file/file.service.ts
|
|
1818
|
-
var createFileService = (client) => ({
|
|
1819
|
-
async uploadFile(formData) {
|
|
1820
|
-
const url = client["url"].replace("/graphql", "") + "/api/upload";
|
|
1821
|
-
const token = await client["tokenProvider"]();
|
|
1822
|
-
const headers = {
|
|
1823
|
-
...token ? { Authorization: `Bearer ${token}` } : {}
|
|
1824
|
-
};
|
|
1825
|
-
const res = await fetch(url, {
|
|
1826
|
-
method: "POST",
|
|
1827
|
-
headers,
|
|
1828
|
-
body: formData
|
|
1829
|
-
// native FormData works fine
|
|
1830
|
-
});
|
|
1831
|
-
const text = await res.text();
|
|
1832
|
-
if (!res.ok) throw new Error(`File upload failed: ${res.status} - ${text}`);
|
|
1833
|
-
try {
|
|
1834
|
-
return JSON.parse(text);
|
|
1835
|
-
} catch (e) {
|
|
1836
|
-
return text;
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
});
|
|
1840
|
-
|
|
1841
|
-
// src/services/inventory/product.service.ts
|
|
1842
|
-
var createProductService = (client) => ({
|
|
1843
|
-
async uploadProductImage(form) {
|
|
1844
|
-
const fileClient = createFileService(client);
|
|
1845
|
-
return (await fileClient.uploadFile(form)).product;
|
|
1846
|
-
},
|
|
1847
|
-
async getCustomerProductCountsByIds(input, fetchFields, option) {
|
|
1848
|
-
var _a, _b, _c, _d;
|
|
1849
|
-
const res = await client.request(
|
|
1850
|
-
productSchema.getCustomerProductCountsByIds(
|
|
1851
|
-
gqlQueryStringBuilder(
|
|
1852
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getCustomerProductCountsByIdsResponse,
|
|
1853
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getCustomerProductCountsByIdsResponseNestedFields
|
|
1854
|
-
)
|
|
1855
|
-
),
|
|
1856
|
-
input,
|
|
1857
|
-
option
|
|
1858
|
-
);
|
|
1859
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getCustomerProductCountsByIds) != null ? _d : null;
|
|
1860
|
-
},
|
|
1861
|
-
async searchCategoriesAndTemplate(input, fetchFields, option) {
|
|
1862
|
-
var _a, _b, _c, _d;
|
|
1863
|
-
const res = await client.request(
|
|
1864
|
-
productSchema.searchCategoriesAndTemplate(
|
|
1865
|
-
gqlQueryStringBuilder(
|
|
1866
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : searchCategoriesAndTemplateResponse,
|
|
1867
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : searchCategoriesAndTemplateResponseNestedFields
|
|
1868
|
-
)
|
|
1869
|
-
),
|
|
1870
|
-
input,
|
|
1871
|
-
option
|
|
1872
|
-
);
|
|
1873
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.searchCategoriesAndTemplate) != null ? _d : null;
|
|
1874
|
-
},
|
|
1875
|
-
async searchProductNames(input, fetchFields, option) {
|
|
1876
|
-
var _a, _b, _c, _d;
|
|
1877
|
-
const res = await client.request(
|
|
1878
|
-
productSchema.searchProductNames(
|
|
1879
|
-
gqlQueryStringBuilder(
|
|
1880
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : searchProductNamesResponse,
|
|
1881
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : searchProductNamesResponseNestedFields
|
|
1882
|
-
)
|
|
1883
|
-
),
|
|
1884
|
-
input,
|
|
1885
|
-
option
|
|
1886
|
-
);
|
|
1887
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.searchProductNames) != null ? _d : null;
|
|
1888
|
-
},
|
|
1889
|
-
async updateProduct(input, fetchFields, option) {
|
|
1890
|
-
var _a, _b, _c, _d;
|
|
1891
|
-
const res = await client.request(
|
|
1892
|
-
productSchema.updateProduct(
|
|
1893
|
-
gqlQueryStringBuilder(
|
|
1894
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateProductResponseFields,
|
|
1895
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateProductResponseNestedFields
|
|
1896
|
-
)
|
|
1897
|
-
),
|
|
1898
|
-
input,
|
|
1899
|
-
option
|
|
1900
|
-
);
|
|
1901
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.updateProduct) != null ? _d : null;
|
|
1902
|
-
},
|
|
1903
|
-
async removeProduct(input, fetchFields, option) {
|
|
1904
|
-
var _a, _b, _c;
|
|
1905
|
-
const res = await client.request(
|
|
1906
|
-
productSchema.removeProduct(
|
|
1907
|
-
gqlQueryStringBuilder(
|
|
1908
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeProductResponseFields
|
|
1909
|
-
)
|
|
1910
|
-
),
|
|
1911
|
-
input,
|
|
1912
|
-
option
|
|
1913
|
-
);
|
|
1914
|
-
return (_c = (_b = res.data) == null ? void 0 : _b.removeProduct) != null ? _c : null;
|
|
1915
|
-
},
|
|
1916
|
-
async addProduct(input, fetchFields, option) {
|
|
1917
|
-
var _a, _b, _c, _d;
|
|
1918
|
-
const res = await client.request(
|
|
1919
|
-
productSchema.addProduct(
|
|
1920
|
-
gqlQueryStringBuilder(
|
|
1921
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addProductResponseFields,
|
|
1922
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addProductResponseNestedFields
|
|
1923
|
-
)
|
|
1924
|
-
),
|
|
1925
|
-
input,
|
|
1926
|
-
option
|
|
1927
|
-
);
|
|
1928
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.addProduct) != null ? _d : null;
|
|
1929
|
-
},
|
|
1930
|
-
async getProduct(input, fetchFields, option) {
|
|
1931
|
-
var _a, _b, _c, _d;
|
|
1932
|
-
const res = await client.request(
|
|
1933
|
-
productSchema.getProduct(
|
|
1934
|
-
gqlQueryStringBuilder(
|
|
1935
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getProductResponseFields,
|
|
1936
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getProductResponseNestedFields
|
|
1937
|
-
)
|
|
1938
|
-
),
|
|
1939
|
-
input,
|
|
1940
|
-
option
|
|
1941
|
-
);
|
|
1942
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getProduct) != null ? _d : null;
|
|
1943
|
-
},
|
|
1944
|
-
async getProducts(input, fetchFields, option) {
|
|
1945
|
-
var _a, _b, _c, _d;
|
|
1946
|
-
const res = await client.request(
|
|
1947
|
-
productSchema.getProducts(
|
|
1948
|
-
gqlQueryStringBuilder(
|
|
1949
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getProductsResponseFields,
|
|
1950
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getProductsResponseNestedFields
|
|
1951
|
-
)
|
|
1952
|
-
),
|
|
1953
|
-
input,
|
|
1954
|
-
option
|
|
1955
|
-
);
|
|
1956
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getProducts) != null ? _d : null;
|
|
1957
|
-
}
|
|
1958
|
-
});
|
|
1959
|
-
|
|
1960
|
-
// src/services/inventory/schema/stock.schema.ts
|
|
1961
|
-
var stockSchema = {
|
|
1962
|
-
getStock: (query) => `
|
|
1963
|
-
query getStock($stock: StockInput!) {
|
|
1964
|
-
stock(stock: $stock) {
|
|
2135
|
+
addPackage: (query) => `
|
|
2136
|
+
mutation addPackage($productPackage: ProductPackageInput!, $template: Boolean) {
|
|
2137
|
+
addPackage(productPackage: $productPackage, template: $template) {
|
|
1965
2138
|
${query}
|
|
1966
2139
|
}
|
|
1967
2140
|
}
|
|
1968
2141
|
`,
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
2142
|
+
addPackages: (query) => `
|
|
2143
|
+
mutation addPackages($productPackages: [ProductPackagesInput]!, $template: Boolean) {
|
|
2144
|
+
addPackages(productPackages: $productPackages, template: $template) {
|
|
1972
2145
|
${query}
|
|
1973
2146
|
}
|
|
1974
2147
|
}
|
|
1975
2148
|
`,
|
|
1976
|
-
|
|
1977
|
-
mutation
|
|
1978
|
-
|
|
1979
|
-
${
|
|
2149
|
+
updatePackage: (query) => `
|
|
2150
|
+
mutation updatePackage($packageId: String!, $productPackage: ProductPackageInput!, $template: Boolean) {
|
|
2151
|
+
updatePackage(packageId: $packageId, productPackage: $productPackage, template: $template) {
|
|
2152
|
+
${query}
|
|
1980
2153
|
}
|
|
1981
2154
|
}
|
|
1982
2155
|
`,
|
|
1983
|
-
|
|
1984
|
-
mutation
|
|
1985
|
-
|
|
1986
|
-
${
|
|
2156
|
+
updatePackages: (query) => `
|
|
2157
|
+
mutation updatePackages($packages: [PackagesInput]) {
|
|
2158
|
+
updatePackages(packages: $packages) {
|
|
2159
|
+
${query}
|
|
1987
2160
|
}
|
|
1988
2161
|
}
|
|
1989
2162
|
`,
|
|
1990
|
-
|
|
1991
|
-
mutation
|
|
1992
|
-
|
|
1993
|
-
${
|
|
2163
|
+
removePackage: (query) => `
|
|
2164
|
+
mutation removePackage($packageId: String!, $template: Boolean) {
|
|
2165
|
+
removePackage(packageId: $packageId, template: $template) {
|
|
2166
|
+
${query}
|
|
1994
2167
|
}
|
|
1995
2168
|
}
|
|
1996
2169
|
`
|
|
1997
2170
|
};
|
|
1998
2171
|
|
|
1999
|
-
// src/services/inventory/
|
|
2000
|
-
var
|
|
2001
|
-
async
|
|
2172
|
+
// src/services/inventory/package.service.ts
|
|
2173
|
+
var createPackageService = (client) => ({
|
|
2174
|
+
async updatePackage(input, fetchFields, option) {
|
|
2002
2175
|
var _a, _b, _c, _d;
|
|
2003
2176
|
const res = await client.request(
|
|
2004
|
-
|
|
2177
|
+
packageSchema.updatePackage(
|
|
2005
2178
|
gqlQueryStringBuilder(
|
|
2006
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2007
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2179
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updatePackageResponseFields,
|
|
2180
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updatePackageResponseNestedFields
|
|
2008
2181
|
)
|
|
2009
2182
|
),
|
|
2010
2183
|
input,
|
|
2011
2184
|
option
|
|
2012
2185
|
);
|
|
2013
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2186
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updatePackage) != null ? _d : null;
|
|
2014
2187
|
},
|
|
2015
|
-
async
|
|
2188
|
+
async removePackage(input, fetchFields, option) {
|
|
2016
2189
|
var _a, _b, _c;
|
|
2017
2190
|
const res = await client.request(
|
|
2018
|
-
|
|
2191
|
+
packageSchema.removePackage(
|
|
2019
2192
|
gqlQueryStringBuilder(
|
|
2020
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2193
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removePackageResponseFields
|
|
2021
2194
|
)
|
|
2022
2195
|
),
|
|
2023
2196
|
input,
|
|
2024
2197
|
option
|
|
2025
2198
|
);
|
|
2026
|
-
return (_c = (_b = res.data) == null ? void 0 : _b.
|
|
2199
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removePackage) != null ? _c : null;
|
|
2027
2200
|
},
|
|
2028
|
-
async
|
|
2201
|
+
async addPackages(input, fetchFields, option) {
|
|
2029
2202
|
var _a, _b, _c, _d;
|
|
2030
2203
|
const res = await client.request(
|
|
2031
|
-
|
|
2204
|
+
packageSchema.addPackages(
|
|
2032
2205
|
gqlQueryStringBuilder(
|
|
2033
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2034
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2206
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addPackagesResponseFields,
|
|
2207
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addPackagesResponseNestedFields
|
|
2035
2208
|
)
|
|
2036
2209
|
),
|
|
2037
2210
|
input,
|
|
2038
2211
|
option
|
|
2039
2212
|
);
|
|
2040
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2213
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addPackages) != null ? _d : null;
|
|
2041
2214
|
},
|
|
2042
|
-
async
|
|
2215
|
+
async addPackage(input, fetchFields, option) {
|
|
2043
2216
|
var _a, _b, _c, _d;
|
|
2044
2217
|
const res = await client.request(
|
|
2045
|
-
|
|
2218
|
+
packageSchema.addPackage(
|
|
2046
2219
|
gqlQueryStringBuilder(
|
|
2047
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2048
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2220
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addPackageResponseFields,
|
|
2221
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addPackageResponseNestedFields
|
|
2049
2222
|
)
|
|
2050
2223
|
),
|
|
2051
2224
|
input,
|
|
2052
2225
|
option
|
|
2053
2226
|
);
|
|
2054
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2227
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addPackage) != null ? _d : null;
|
|
2055
2228
|
},
|
|
2056
|
-
async
|
|
2229
|
+
async getPackage(input, fetchFields, option) {
|
|
2057
2230
|
var _a, _b, _c, _d;
|
|
2058
2231
|
const res = await client.request(
|
|
2059
|
-
|
|
2232
|
+
packageSchema.getPackage(
|
|
2060
2233
|
gqlQueryStringBuilder(
|
|
2061
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2062
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2234
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getPackageResponseFields,
|
|
2235
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getPackageResponseNestedFields
|
|
2063
2236
|
)
|
|
2064
2237
|
),
|
|
2065
2238
|
input,
|
|
2066
2239
|
option
|
|
2067
2240
|
);
|
|
2068
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2241
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getPackage) != null ? _d : null;
|
|
2242
|
+
},
|
|
2243
|
+
async getPackages(input, fetchFields, option) {
|
|
2244
|
+
var _a, _b, _c, _d;
|
|
2245
|
+
const res = await client.request(
|
|
2246
|
+
packageSchema.getPackages(
|
|
2247
|
+
gqlQueryStringBuilder(
|
|
2248
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getPackagesResponseFields,
|
|
2249
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getPackagesResponseNestedFields
|
|
2250
|
+
)
|
|
2251
|
+
),
|
|
2252
|
+
input,
|
|
2253
|
+
option
|
|
2254
|
+
);
|
|
2255
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getPackages) != null ? _d : null;
|
|
2069
2256
|
}
|
|
2070
2257
|
});
|
|
2071
2258
|
|
|
2072
|
-
// src/services/inventory/schema/
|
|
2073
|
-
var
|
|
2074
|
-
|
|
2075
|
-
query
|
|
2076
|
-
|
|
2077
|
-
${query}
|
|
2078
|
-
}
|
|
2079
|
-
}
|
|
2080
|
-
`,
|
|
2081
|
-
getStore: (query) => `
|
|
2082
|
-
query getStore($store: StoreInput!) {
|
|
2083
|
-
getStore(store: $store) {
|
|
2259
|
+
// src/services/inventory/schema/price.schema.ts
|
|
2260
|
+
var priceSchema = {
|
|
2261
|
+
getPrice: (query) => `
|
|
2262
|
+
query getPrice($price: PriceInput!) {
|
|
2263
|
+
price(price: $price) {
|
|
2084
2264
|
${query}
|
|
2085
2265
|
}
|
|
2086
2266
|
}
|
|
2087
2267
|
`,
|
|
2088
|
-
|
|
2089
|
-
query
|
|
2090
|
-
|
|
2268
|
+
getPrices: (query) => `
|
|
2269
|
+
query getPrices($price: PriceInput, $priceIds: [String], $limit: Int!, $skip: Int!) {
|
|
2270
|
+
prices(price: $price, priceIds: $priceIds, limit: $limit, skip: $skip) {
|
|
2091
2271
|
${query}
|
|
2092
2272
|
}
|
|
2093
2273
|
}
|
|
2094
2274
|
`,
|
|
2095
|
-
|
|
2096
|
-
mutation
|
|
2097
|
-
|
|
2275
|
+
addPrice: (mutation) => `
|
|
2276
|
+
mutation addPrice($price: PriceInput) {
|
|
2277
|
+
addPrice(price: $price) {
|
|
2098
2278
|
${mutation}
|
|
2099
2279
|
}
|
|
2100
2280
|
}
|
|
2101
2281
|
`,
|
|
2102
|
-
|
|
2103
|
-
mutation
|
|
2104
|
-
|
|
2282
|
+
updatePrice: (mutation) => `
|
|
2283
|
+
mutation updatePrice($priceId: String, $price: PriceInput) {
|
|
2284
|
+
updatePrice(priceId: $priceId, price: $price) {
|
|
2105
2285
|
${mutation}
|
|
2106
2286
|
}
|
|
2107
2287
|
}
|
|
2108
2288
|
`,
|
|
2109
|
-
|
|
2110
|
-
mutation
|
|
2111
|
-
|
|
2289
|
+
removePrice: (mutation) => `
|
|
2290
|
+
mutation removePrice($priceId: String!) {
|
|
2291
|
+
removePrice(priceId: $priceId) {
|
|
2112
2292
|
${mutation}
|
|
2113
2293
|
}
|
|
2114
2294
|
}
|
|
2115
2295
|
`
|
|
2116
2296
|
};
|
|
2117
2297
|
|
|
2118
|
-
// src/services/inventory/
|
|
2119
|
-
var
|
|
2120
|
-
async
|
|
2298
|
+
// src/services/inventory/price.service.ts
|
|
2299
|
+
var createPriceService = (client) => ({
|
|
2300
|
+
async updatePrice(input, fetchFields, option) {
|
|
2121
2301
|
var _a, _b, _c, _d;
|
|
2122
2302
|
const res = await client.request(
|
|
2123
|
-
|
|
2303
|
+
priceSchema.updatePrice(
|
|
2124
2304
|
gqlQueryStringBuilder(
|
|
2125
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2126
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2305
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updatePriceResponseFields,
|
|
2306
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updatePriceResponseNestedFields
|
|
2127
2307
|
)
|
|
2128
2308
|
),
|
|
2129
2309
|
input,
|
|
2130
2310
|
option
|
|
2131
2311
|
);
|
|
2132
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2312
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updatePrice) != null ? _d : null;
|
|
2133
2313
|
},
|
|
2134
|
-
async
|
|
2314
|
+
async removePrice(input, fetchFields, option) {
|
|
2135
2315
|
var _a, _b, _c;
|
|
2136
2316
|
const res = await client.request(
|
|
2137
|
-
|
|
2317
|
+
priceSchema.removePrice(
|
|
2138
2318
|
gqlQueryStringBuilder(
|
|
2139
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2319
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removePriceResponseFields
|
|
2140
2320
|
)
|
|
2141
2321
|
),
|
|
2142
2322
|
input,
|
|
2143
2323
|
option
|
|
2144
2324
|
);
|
|
2145
|
-
return (_c = (_b = res.data) == null ? void 0 : _b.
|
|
2325
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removePrice) != null ? _c : null;
|
|
2146
2326
|
},
|
|
2147
|
-
async
|
|
2327
|
+
async addPrice(input, fetchFields, option) {
|
|
2148
2328
|
var _a, _b, _c, _d;
|
|
2149
2329
|
const res = await client.request(
|
|
2150
|
-
|
|
2151
|
-
gqlQueryStringBuilder(
|
|
2152
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addStoreResponse,
|
|
2153
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addStoreResponseNestedFields
|
|
2154
|
-
)
|
|
2155
|
-
),
|
|
2156
|
-
input,
|
|
2157
|
-
option
|
|
2158
|
-
);
|
|
2159
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.createStore) != null ? _d : null;
|
|
2160
|
-
},
|
|
2161
|
-
async getStoreCount(input, fetchFields, option) {
|
|
2162
|
-
var _a, _b, _c;
|
|
2163
|
-
const res = await client.request(
|
|
2164
|
-
storeSchema.getStoreCount(
|
|
2330
|
+
priceSchema.addPrice(
|
|
2165
2331
|
gqlQueryStringBuilder(
|
|
2166
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2332
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addPriceResponseFields,
|
|
2333
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addPriceResponseNestedFields
|
|
2167
2334
|
)
|
|
2168
2335
|
),
|
|
2169
2336
|
input,
|
|
2170
2337
|
option
|
|
2171
2338
|
);
|
|
2172
|
-
return (
|
|
2339
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addPrice) != null ? _d : null;
|
|
2173
2340
|
},
|
|
2174
|
-
async
|
|
2341
|
+
async getPrice(input, fetchFields, option) {
|
|
2175
2342
|
var _a, _b, _c, _d;
|
|
2176
2343
|
const res = await client.request(
|
|
2177
|
-
|
|
2344
|
+
priceSchema.getPrice(
|
|
2178
2345
|
gqlQueryStringBuilder(
|
|
2179
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2180
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2346
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getPriceResponseFields,
|
|
2347
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getPriceResponseNestedFields
|
|
2181
2348
|
)
|
|
2182
2349
|
),
|
|
2183
2350
|
input,
|
|
2184
2351
|
option
|
|
2185
2352
|
);
|
|
2186
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2353
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getPrice) != null ? _d : null;
|
|
2187
2354
|
},
|
|
2188
|
-
async
|
|
2355
|
+
async getPrices(input, fetchFields, option) {
|
|
2189
2356
|
var _a, _b, _c, _d;
|
|
2190
2357
|
const res = await client.request(
|
|
2191
|
-
|
|
2358
|
+
priceSchema.getPrices(
|
|
2192
2359
|
gqlQueryStringBuilder(
|
|
2193
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2194
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2360
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getPricesResponseFields,
|
|
2361
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getPricesResponseNestedFields
|
|
2195
2362
|
)
|
|
2196
2363
|
),
|
|
2197
2364
|
input,
|
|
2198
2365
|
option
|
|
2199
2366
|
);
|
|
2200
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2367
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getPrices) != null ? _d : null;
|
|
2368
|
+
}
|
|
2369
|
+
});
|
|
2370
|
+
|
|
2371
|
+
// src/services/inventory/schema/product.schema.ts
|
|
2372
|
+
var productSchema = {
|
|
2373
|
+
getCustomerProductCountsByIds: (query) => `
|
|
2374
|
+
query getCustomerProductCountsByIds($userIds: [String]!) {
|
|
2375
|
+
getCustomerProductCountsByIds(userIds: $userIds) {
|
|
2376
|
+
${query}
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
`,
|
|
2380
|
+
searchCategoriesAndTemplate: (query) => `
|
|
2381
|
+
query searchCategoriesAndTemplate($search: String, $shouldGetFromAllStores: Boolean){
|
|
2382
|
+
searchCategoriesAndTemplate(search: $search, shouldGetFromAllStores: $shouldGetFromAllStores) {
|
|
2383
|
+
${query}
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2386
|
+
`,
|
|
2387
|
+
getProduct: (query) => `
|
|
2388
|
+
query getProduct($product: ProductInput!, $template: Boolean) {
|
|
2389
|
+
getProduct(product: $product, template: $template) {
|
|
2390
|
+
${query}
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
`,
|
|
2394
|
+
getProducts: (query) => `
|
|
2395
|
+
query getProducts($product: ProductInput, $productIds: [String], $search: String, $limit: Int!, $skip: Int!, $template: Boolean, $shouldGetFromAllStores: Boolean) {
|
|
2396
|
+
getProducts(product: $product, productIds: $productIds, search: $search, limit: $limit, skip: $skip, template: $template, shouldGetFromAllStores: $shouldGetFromAllStores) {
|
|
2397
|
+
${query}
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
`,
|
|
2401
|
+
getProductByBarcode: (query) => `
|
|
2402
|
+
query getProductByBarcode($barcode: String!, $fetchFromGS1IfNotFound: Boolean, $template: Boolean) {
|
|
2403
|
+
getProductByBarcode(barcode: $barcode, fetchFromGS1IfNotFound: $fetchFromGS1IfNotFound, template: $template) {
|
|
2404
|
+
${query}
|
|
2405
|
+
}
|
|
2406
|
+
}
|
|
2407
|
+
`,
|
|
2408
|
+
searchProductNames: (query) => `
|
|
2409
|
+
query searchProductNames($search: String!, $product: ProductInput, $limit: Int, $skip: Int, $template: Boolean) {
|
|
2410
|
+
searchProductNames(search: $search, product: $product, limit: $limit, skip: $skip, template: $template) {
|
|
2411
|
+
${query}
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
`,
|
|
2415
|
+
addProduct: (mutation) => `
|
|
2416
|
+
mutation addProduct($product: ProductInput!, $imageTypes: [String], $template: Boolean) {
|
|
2417
|
+
addProduct(product: $product, imageTypes: $imageTypes, template: $template) {
|
|
2418
|
+
${mutation}
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
`,
|
|
2422
|
+
updateProduct: (mutation) => `
|
|
2423
|
+
mutation updateProduct($productId: String!, $product: ProductInput!, $template: Boolean) {
|
|
2424
|
+
updateProduct(productId: $productId, product: $product, template: $template) {
|
|
2425
|
+
${mutation}
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
`,
|
|
2429
|
+
removeProduct: (mutation) => `
|
|
2430
|
+
mutation removeProduct($productId: String!, $template: Boolean) {
|
|
2431
|
+
removeProduct(productId: $productId, template: $template) {
|
|
2432
|
+
${mutation}
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
`
|
|
2436
|
+
};
|
|
2437
|
+
|
|
2438
|
+
// src/services/file/file.service.ts
|
|
2439
|
+
var createFileService = (client) => ({
|
|
2440
|
+
async uploadFile(formData) {
|
|
2441
|
+
const url = client["url"].replace("/graphql", "") + "/api/upload";
|
|
2442
|
+
const token = await client["tokenProvider"]();
|
|
2443
|
+
const headers = {
|
|
2444
|
+
...token ? { Authorization: `Bearer ${token}` } : {}
|
|
2445
|
+
};
|
|
2446
|
+
const res = await fetch(url, {
|
|
2447
|
+
method: "POST",
|
|
2448
|
+
headers,
|
|
2449
|
+
body: formData
|
|
2450
|
+
// native FormData works fine
|
|
2451
|
+
});
|
|
2452
|
+
const text = await res.text();
|
|
2453
|
+
if (!res.ok) throw new Error(`File upload failed: ${res.status} - ${text}`);
|
|
2454
|
+
try {
|
|
2455
|
+
return JSON.parse(text);
|
|
2456
|
+
} catch (e) {
|
|
2457
|
+
return text;
|
|
2458
|
+
}
|
|
2201
2459
|
}
|
|
2202
2460
|
});
|
|
2203
2461
|
|
|
2204
|
-
// src/services/inventory/
|
|
2205
|
-
var
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
}
|
|
2212
|
-
`,
|
|
2213
|
-
updateStoreCategory: (query) => `
|
|
2214
|
-
mutation updateStoreCategory($storeCategoryId: String!, $storeCategory: StoreCategoryInput!) {
|
|
2215
|
-
updateStoreCategory(storeCategoryId: $storeCategoryId, storeCategory: $storeCategory) {
|
|
2216
|
-
${query}
|
|
2217
|
-
}
|
|
2218
|
-
}
|
|
2219
|
-
`,
|
|
2220
|
-
removeStoreCategory: (query) => `
|
|
2221
|
-
mutation removeStoreCategory($storeCategoryId: String!) {
|
|
2222
|
-
removeStoreCategory(storeCategoryId: $storeCategoryId) {
|
|
2223
|
-
${query}
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
`,
|
|
2227
|
-
// get
|
|
2228
|
-
getStoreCategory: (query) => `
|
|
2229
|
-
query getStoreCategory($storeCategory: StoreCategoryInput!) {
|
|
2230
|
-
getStoreCategory(storeCategory: $storeCategory) {
|
|
2231
|
-
${query}
|
|
2232
|
-
}
|
|
2233
|
-
}
|
|
2234
|
-
`,
|
|
2235
|
-
getStoreCategories: (query) => `
|
|
2236
|
-
query getStoreCategories($search: String, $storeCategory: StoreCategoryInput, $storeCategoryIds: [String], $limit: Int!, $skip: Int!) {
|
|
2237
|
-
getStoreCategories(search: $search, storeCategory: $storeCategory, storeCategoryIds: $storeCategoryIds, limit: $limit, skip: $skip) {
|
|
2238
|
-
${query}
|
|
2239
|
-
}
|
|
2240
|
-
}
|
|
2241
|
-
`
|
|
2242
|
-
};
|
|
2243
|
-
|
|
2244
|
-
// src/services/inventory/store-category.service.ts
|
|
2245
|
-
var createStoreCategoryService = (client) => ({
|
|
2246
|
-
async getStoreCategories(input, fetchFields, option) {
|
|
2462
|
+
// src/services/inventory/product.service.ts
|
|
2463
|
+
var createProductService = (client) => ({
|
|
2464
|
+
async uploadProductImage(form) {
|
|
2465
|
+
const fileClient = createFileService(client);
|
|
2466
|
+
return (await fileClient.uploadFile(form)).product;
|
|
2467
|
+
},
|
|
2468
|
+
async getCustomerProductCountsByIds(input, fetchFields, option) {
|
|
2247
2469
|
var _a, _b, _c, _d;
|
|
2248
2470
|
const res = await client.request(
|
|
2249
|
-
|
|
2471
|
+
productSchema.getCustomerProductCountsByIds(
|
|
2250
2472
|
gqlQueryStringBuilder(
|
|
2251
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2252
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2473
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getCustomerProductCountsByIdsResponse,
|
|
2474
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getCustomerProductCountsByIdsResponseNestedFields
|
|
2253
2475
|
)
|
|
2254
2476
|
),
|
|
2255
2477
|
input,
|
|
2256
2478
|
option
|
|
2257
2479
|
);
|
|
2258
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2480
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getCustomerProductCountsByIds) != null ? _d : null;
|
|
2259
2481
|
},
|
|
2260
|
-
async
|
|
2482
|
+
async searchCategoriesAndTemplate(input, fetchFields, option) {
|
|
2261
2483
|
var _a, _b, _c, _d;
|
|
2262
2484
|
const res = await client.request(
|
|
2263
|
-
|
|
2485
|
+
productSchema.searchCategoriesAndTemplate(
|
|
2264
2486
|
gqlQueryStringBuilder(
|
|
2265
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2266
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2487
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : searchCategoriesAndTemplateResponse,
|
|
2488
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : searchCategoriesAndTemplateResponseNestedFields
|
|
2267
2489
|
)
|
|
2268
2490
|
),
|
|
2269
2491
|
input,
|
|
2270
2492
|
option
|
|
2271
2493
|
);
|
|
2272
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2494
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.searchCategoriesAndTemplate) != null ? _d : null;
|
|
2273
2495
|
},
|
|
2274
|
-
async
|
|
2496
|
+
async searchProductNames(input, fetchFields, option) {
|
|
2275
2497
|
var _a, _b, _c, _d;
|
|
2276
2498
|
const res = await client.request(
|
|
2277
|
-
|
|
2499
|
+
productSchema.searchProductNames(
|
|
2278
2500
|
gqlQueryStringBuilder(
|
|
2279
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2280
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2501
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : searchProductNamesResponse,
|
|
2502
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : searchProductNamesResponseNestedFields
|
|
2281
2503
|
)
|
|
2282
2504
|
),
|
|
2283
2505
|
input,
|
|
2284
2506
|
option
|
|
2285
2507
|
);
|
|
2286
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2508
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.searchProductNames) != null ? _d : null;
|
|
2287
2509
|
},
|
|
2288
|
-
async
|
|
2510
|
+
async updateProduct(input, fetchFields, option) {
|
|
2289
2511
|
var _a, _b, _c, _d;
|
|
2290
2512
|
const res = await client.request(
|
|
2291
|
-
|
|
2513
|
+
productSchema.updateProduct(
|
|
2292
2514
|
gqlQueryStringBuilder(
|
|
2293
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2294
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2515
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateProductResponseFields,
|
|
2516
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateProductResponseNestedFields
|
|
2295
2517
|
)
|
|
2296
2518
|
),
|
|
2297
2519
|
input,
|
|
2298
2520
|
option
|
|
2299
2521
|
);
|
|
2300
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2522
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateProduct) != null ? _d : null;
|
|
2301
2523
|
},
|
|
2302
|
-
async
|
|
2524
|
+
async removeProduct(input, fetchFields, option) {
|
|
2303
2525
|
var _a, _b, _c;
|
|
2304
2526
|
const res = await client.request(
|
|
2305
|
-
|
|
2306
|
-
gqlQueryStringBuilder(
|
|
2307
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeStoreCategoryResponseFields
|
|
2308
|
-
)
|
|
2309
|
-
),
|
|
2310
|
-
input,
|
|
2311
|
-
option
|
|
2312
|
-
);
|
|
2313
|
-
return (_c = (_b = res.data) == null ? void 0 : _b.removeStoreCategory) != null ? _c : null;
|
|
2314
|
-
}
|
|
2315
|
-
});
|
|
2316
|
-
|
|
2317
|
-
// src/services/inventory/schema/store-category-product.schema.ts
|
|
2318
|
-
var storeCategoryProductSchema = {
|
|
2319
|
-
createStoreCategoryProduct: (query) => `
|
|
2320
|
-
mutation createStoreCategoryProduct($storeCategoryProduct: StoreCategoryProductInput!) {
|
|
2321
|
-
createStoreCategoryProduct(storeCategoryProduct: $storeCategoryProduct) {
|
|
2322
|
-
${query}
|
|
2323
|
-
}
|
|
2324
|
-
}
|
|
2325
|
-
`,
|
|
2326
|
-
updateStoreCategoryProduct: (query) => `
|
|
2327
|
-
mutation updateStoreCategoryProduct($storeCategoryProductId: String!, $storeCategoryProduct: StoreCategoryProductInput!) {
|
|
2328
|
-
updateStoreCategoryProduct(storeCategoryProductId: $storeCategoryProductId, storeCategoryProduct: $storeCategoryProduct) {
|
|
2329
|
-
${query}
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
`,
|
|
2333
|
-
removeStoreCategoryProduct: (query) => `
|
|
2334
|
-
mutation removeStoreCategoryProduct($storeCategoryProductId: String!) {
|
|
2335
|
-
removeStoreCategoryProduct(storeCategoryProductId: $storeCategoryProductId) {
|
|
2336
|
-
${query}
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
`,
|
|
2340
|
-
// get
|
|
2341
|
-
getStoreCategoryProduct: (query) => `
|
|
2342
|
-
query getStoreCategoryProduct($storeCategoryProduct: StoreCategoryProductInput!) {
|
|
2343
|
-
getStoreCategoryProduct(storeCategoryProduct: $storeCategoryProduct) {
|
|
2344
|
-
${query}
|
|
2345
|
-
}
|
|
2346
|
-
}
|
|
2347
|
-
`,
|
|
2348
|
-
getStoreCategoryProducts: (query) => `
|
|
2349
|
-
query getStoreCategoryProducts($search: String, $storeCategoryProduct: StoreCategoryProductInput, $storeCategoryProductIds: [String], $limit: Int!, $skip: Int!) {
|
|
2350
|
-
getStoreCategoryProducts(search: $search, storeCategoryProduct: $storeCategoryProduct, storeCategoryProductIds: $storeCategoryProductIds, limit: $limit, skip: $skip) {
|
|
2351
|
-
${query}
|
|
2352
|
-
}
|
|
2353
|
-
}
|
|
2354
|
-
`
|
|
2355
|
-
};
|
|
2356
|
-
|
|
2357
|
-
// src/services/inventory/store-category-product.service.ts
|
|
2358
|
-
var createStoreCategoryProductService = (client) => ({
|
|
2359
|
-
async getStoreCategoryProducts(input, fetchFields, option) {
|
|
2360
|
-
var _a, _b, _c, _d;
|
|
2361
|
-
const res = await client.request(
|
|
2362
|
-
storeCategoryProductSchema.getStoreCategoryProducts(
|
|
2527
|
+
productSchema.removeProduct(
|
|
2363
2528
|
gqlQueryStringBuilder(
|
|
2364
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2365
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getStoreCategoryProductsResponseNestedFields
|
|
2529
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeProductResponseFields
|
|
2366
2530
|
)
|
|
2367
2531
|
),
|
|
2368
2532
|
input,
|
|
2369
2533
|
option
|
|
2370
2534
|
);
|
|
2371
|
-
return (
|
|
2535
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removeProduct) != null ? _c : null;
|
|
2372
2536
|
},
|
|
2373
|
-
async
|
|
2537
|
+
async addProduct(input, fetchFields, option) {
|
|
2374
2538
|
var _a, _b, _c, _d;
|
|
2375
2539
|
const res = await client.request(
|
|
2376
|
-
|
|
2540
|
+
productSchema.addProduct(
|
|
2377
2541
|
gqlQueryStringBuilder(
|
|
2378
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2379
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2542
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addProductResponseFields,
|
|
2543
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addProductResponseNestedFields
|
|
2380
2544
|
)
|
|
2381
2545
|
),
|
|
2382
2546
|
input,
|
|
2383
2547
|
option
|
|
2384
2548
|
);
|
|
2385
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2549
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addProduct) != null ? _d : null;
|
|
2386
2550
|
},
|
|
2387
|
-
async
|
|
2551
|
+
async getProduct(input, fetchFields, option) {
|
|
2388
2552
|
var _a, _b, _c, _d;
|
|
2389
2553
|
const res = await client.request(
|
|
2390
|
-
|
|
2554
|
+
productSchema.getProduct(
|
|
2391
2555
|
gqlQueryStringBuilder(
|
|
2392
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2393
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2556
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getProductResponseFields,
|
|
2557
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getProductResponseNestedFields
|
|
2394
2558
|
)
|
|
2395
2559
|
),
|
|
2396
2560
|
input,
|
|
2397
2561
|
option
|
|
2398
2562
|
);
|
|
2399
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2563
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getProduct) != null ? _d : null;
|
|
2400
2564
|
},
|
|
2401
|
-
async
|
|
2565
|
+
async getProducts(input, fetchFields, option) {
|
|
2402
2566
|
var _a, _b, _c, _d;
|
|
2403
2567
|
const res = await client.request(
|
|
2404
|
-
|
|
2568
|
+
productSchema.getProducts(
|
|
2405
2569
|
gqlQueryStringBuilder(
|
|
2406
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2407
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2570
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getProductsResponseFields,
|
|
2571
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getProductsResponseNestedFields
|
|
2408
2572
|
)
|
|
2409
2573
|
),
|
|
2410
2574
|
input,
|
|
2411
2575
|
option
|
|
2412
2576
|
);
|
|
2413
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
|
|
2577
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getProducts) != null ? _d : null;
|
|
2578
|
+
}
|
|
2579
|
+
});
|
|
2580
|
+
|
|
2581
|
+
// src/services/inventory/schema/stock.schema.ts
|
|
2582
|
+
var stockSchema = {
|
|
2583
|
+
getStock: (query) => `
|
|
2584
|
+
query getStock($stock: StockInput!) {
|
|
2585
|
+
stock(stock: $stock) {
|
|
2586
|
+
${query}
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
`,
|
|
2590
|
+
getStocks: (query) => `
|
|
2591
|
+
query getStocks($stock: StockInput, $stockIds: [String], $limit: Int!, $skip: Int!) {
|
|
2592
|
+
stocks(stock: $stock, stockIds: $stockIds, limit: $limit, skip: $skip) {
|
|
2593
|
+
${query}
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2596
|
+
`,
|
|
2597
|
+
addStock: (mutation) => `
|
|
2598
|
+
mutation addStock($stock: StockInput!) {
|
|
2599
|
+
addStock(stock: $stock) {
|
|
2600
|
+
${mutation}
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
`,
|
|
2604
|
+
updateStock: (mutation) => `
|
|
2605
|
+
mutation updateStock($stockId: String!, $stock: StockInput!) {
|
|
2606
|
+
updateStock(stockId: $stockId, stock: $stock) {
|
|
2607
|
+
${mutation}
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
`,
|
|
2611
|
+
removeStock: (mutation) => `
|
|
2612
|
+
mutation removeStock($stockId: String!) {
|
|
2613
|
+
removeStock(stockId: $stockId) {
|
|
2614
|
+
${mutation}
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
`
|
|
2618
|
+
};
|
|
2619
|
+
|
|
2620
|
+
// src/services/inventory/stock.service.ts
|
|
2621
|
+
var createStockService = (client) => ({
|
|
2622
|
+
async updateStock(input, fetchFields, option) {
|
|
2623
|
+
var _a, _b, _c, _d;
|
|
2417
2624
|
const res = await client.request(
|
|
2418
|
-
|
|
2625
|
+
stockSchema.updateStock(
|
|
2419
2626
|
gqlQueryStringBuilder(
|
|
2420
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2627
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateStockResponse,
|
|
2628
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateStockResponseNestedFields
|
|
2421
2629
|
)
|
|
2422
2630
|
),
|
|
2423
2631
|
input,
|
|
2424
2632
|
option
|
|
2425
2633
|
);
|
|
2426
|
-
return (
|
|
2427
|
-
}
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
// src/services/sales/schemas/order.schema.ts
|
|
2431
|
-
var orderSchema = {
|
|
2432
|
-
getOrder: (query) => `
|
|
2433
|
-
query getOrder($order: OrderInput) {
|
|
2434
|
-
getOrder(order: $order){
|
|
2435
|
-
${query}
|
|
2436
|
-
}
|
|
2437
|
-
}
|
|
2438
|
-
`,
|
|
2439
|
-
getOrders: (query) => `
|
|
2440
|
-
query getOrders($orderIds: [String], $order: OrderInput, $limit: Int, $skip: Int){
|
|
2441
|
-
getOrders(orderIds: $orderIds, order: $order, limit: $limit, skip: $skip){
|
|
2442
|
-
${query}
|
|
2443
|
-
}
|
|
2444
|
-
}
|
|
2445
|
-
`
|
|
2446
|
-
};
|
|
2447
|
-
|
|
2448
|
-
// src/services/sales/sale.entity.ts
|
|
2449
|
-
var transactionQuery = [
|
|
2450
|
-
"_id",
|
|
2451
|
-
"amountPaid",
|
|
2452
|
-
"amountTotal",
|
|
2453
|
-
"createdAt",
|
|
2454
|
-
"from",
|
|
2455
|
-
"fromWallet",
|
|
2456
|
-
"isCredit",
|
|
2457
|
-
"paymentDate",
|
|
2458
|
-
"paymentType",
|
|
2459
|
-
"platform",
|
|
2460
|
-
"saleIds",
|
|
2461
|
-
"saleStatus",
|
|
2462
|
-
"sales",
|
|
2463
|
-
"storeId",
|
|
2464
|
-
"to",
|
|
2465
|
-
"toWallet",
|
|
2466
|
-
"txStatus"
|
|
2467
|
-
];
|
|
2468
|
-
var orderQuery = [
|
|
2469
|
-
"_id",
|
|
2470
|
-
"createdAt",
|
|
2471
|
-
"orderStatus",
|
|
2472
|
-
"transactionId",
|
|
2473
|
-
"userId"
|
|
2474
|
-
];
|
|
2475
|
-
var saleQuery = [
|
|
2476
|
-
"_id",
|
|
2477
|
-
"amountTotal",
|
|
2478
|
-
"createdAt",
|
|
2479
|
-
"packageId",
|
|
2480
|
-
"productId",
|
|
2481
|
-
"quantity",
|
|
2482
|
-
"storeId"
|
|
2483
|
-
];
|
|
2484
|
-
|
|
2485
|
-
// src/services/sales/types/order.type.ts
|
|
2486
|
-
var getOrderResponse = ["order"];
|
|
2487
|
-
var getOrderResponseNestedFields = {
|
|
2488
|
-
order: orderQuery
|
|
2489
|
-
};
|
|
2490
|
-
var getOrdersResponse = ["orders"];
|
|
2491
|
-
var getOrdersResponseNestedFields = {
|
|
2492
|
-
orders: orderQuery
|
|
2493
|
-
};
|
|
2494
|
-
|
|
2495
|
-
// src/services/sales/order.service.ts
|
|
2496
|
-
var createOrderService = (client) => ({
|
|
2497
|
-
async getOrder(input, fetchFields, option) {
|
|
2498
|
-
var _a, _b, _c, _d;
|
|
2634
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateStock) != null ? _d : null;
|
|
2635
|
+
},
|
|
2636
|
+
async removeStock(input, fetchFields, option) {
|
|
2637
|
+
var _a, _b, _c;
|
|
2499
2638
|
const res = await client.request(
|
|
2500
|
-
|
|
2639
|
+
stockSchema.removeStock(
|
|
2501
2640
|
gqlQueryStringBuilder(
|
|
2502
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2503
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getOrderResponseNestedFields
|
|
2641
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeStockResponse
|
|
2504
2642
|
)
|
|
2505
2643
|
),
|
|
2506
2644
|
input,
|
|
2507
2645
|
option
|
|
2508
2646
|
);
|
|
2509
|
-
return (
|
|
2647
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removeStock) != null ? _c : null;
|
|
2510
2648
|
},
|
|
2511
|
-
async
|
|
2649
|
+
async addStock(input, fetchFields, option) {
|
|
2512
2650
|
var _a, _b, _c, _d;
|
|
2513
2651
|
const res = await client.request(
|
|
2514
|
-
|
|
2652
|
+
stockSchema.addStock(
|
|
2515
2653
|
gqlQueryStringBuilder(
|
|
2516
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2517
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2654
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addStockResponse,
|
|
2655
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addStockResponseNestedFields
|
|
2518
2656
|
)
|
|
2519
2657
|
),
|
|
2520
2658
|
input,
|
|
2521
2659
|
option
|
|
2522
2660
|
);
|
|
2523
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
// src/services/sales/schemas/sale.schema.ts
|
|
2528
|
-
var saleSchema = {
|
|
2529
|
-
getSales: (query) => `
|
|
2530
|
-
query getSales($saleIds: [String], $saleFilter: SaleFilterInput, $ShouldGetFromAllStores: Boolean, $dateFilter: DateFilterInput, $limit: Int, $skip: Int) {
|
|
2531
|
-
getSales(saleIds: $saleIds, saleFilter: $saleFilter, ShouldGetFromAllStores: $ShouldGetFromAllStores, dateFilter: $dateFilter, limit: $limit, skip: $skip) {
|
|
2532
|
-
${query}
|
|
2533
|
-
}
|
|
2534
|
-
}
|
|
2535
|
-
`,
|
|
2536
|
-
updateSale: (query) => `
|
|
2537
|
-
mutation updateSale($saleId: String!, $sale: SaleInput!) {
|
|
2538
|
-
updateSale(saleId: $saleId, sale: $sale) {
|
|
2539
|
-
${query}
|
|
2540
|
-
}
|
|
2541
|
-
}
|
|
2542
|
-
`
|
|
2543
|
-
};
|
|
2544
|
-
|
|
2545
|
-
// src/services/sales/types/sale.type.ts
|
|
2546
|
-
var getSaleResponse = ["sale"];
|
|
2547
|
-
var _getSaleResponseNestedFields = {
|
|
2548
|
-
..._getProductResponseNestedFields
|
|
2549
|
-
};
|
|
2550
|
-
var getSaleResponseNestedFields = {
|
|
2551
|
-
sale: saleQuery,
|
|
2552
|
-
..._getSaleResponseNestedFields
|
|
2553
|
-
};
|
|
2554
|
-
var getSalesResponse = [
|
|
2555
|
-
"sales",
|
|
2556
|
-
"uniqueProducts"
|
|
2557
|
-
];
|
|
2558
|
-
var getSalesResponseNestedFields = {
|
|
2559
|
-
sales: saleQuery,
|
|
2560
|
-
uniqueProducts: productQuery,
|
|
2561
|
-
..._getSaleResponseNestedFields
|
|
2562
|
-
};
|
|
2563
|
-
var UpdateSaleResponse = ["sale"];
|
|
2564
|
-
var updateSaleResponseNestedFields = getSaleResponseNestedFields;
|
|
2565
|
-
|
|
2566
|
-
// src/services/sales/sale.service.ts
|
|
2567
|
-
var createSaleService = (client) => ({
|
|
2568
|
-
async updateSale(input, fetchFields, option) {
|
|
2661
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addStock) != null ? _d : null;
|
|
2662
|
+
},
|
|
2663
|
+
async getStock(input, fetchFields, option) {
|
|
2569
2664
|
var _a, _b, _c, _d;
|
|
2570
2665
|
const res = await client.request(
|
|
2571
|
-
|
|
2666
|
+
stockSchema.getStock(
|
|
2572
2667
|
gqlQueryStringBuilder(
|
|
2573
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2574
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2668
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getStockResponse,
|
|
2669
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getStockResponseNestedFields
|
|
2575
2670
|
)
|
|
2576
2671
|
),
|
|
2577
2672
|
input,
|
|
2578
2673
|
option
|
|
2579
2674
|
);
|
|
2580
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2675
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getStock) != null ? _d : null;
|
|
2581
2676
|
},
|
|
2582
|
-
async
|
|
2677
|
+
async getStocks(input, fetchFields, option) {
|
|
2583
2678
|
var _a, _b, _c, _d;
|
|
2584
2679
|
const res = await client.request(
|
|
2585
|
-
|
|
2680
|
+
stockSchema.getStocks(
|
|
2586
2681
|
gqlQueryStringBuilder(
|
|
2587
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2588
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2682
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getStocksResponse,
|
|
2683
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getStocksResponseNestedFields
|
|
2589
2684
|
)
|
|
2590
2685
|
),
|
|
2591
2686
|
input,
|
|
2592
2687
|
option
|
|
2593
2688
|
);
|
|
2594
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2689
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getStocks) != null ? _d : null;
|
|
2595
2690
|
}
|
|
2596
2691
|
});
|
|
2597
2692
|
|
|
2598
|
-
// src/services/
|
|
2599
|
-
var
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2642
|
-
"transactions",
|
|
2643
|
-
"uniqueProducts"
|
|
2644
|
-
];
|
|
2645
|
-
var _getTransactionsResponseNestedFields = {
|
|
2646
|
-
sales: saleQuery,
|
|
2647
|
-
uniqueProducts: productNameQuery,
|
|
2648
|
-
..._getProductResponseNestedFields
|
|
2649
|
-
};
|
|
2650
|
-
var getTransactionsResponseNestedFields = {
|
|
2651
|
-
transactions: transactionQuery,
|
|
2652
|
-
..._getTransactionsResponseNestedFields
|
|
2693
|
+
// src/services/inventory/schema/store.schema.ts
|
|
2694
|
+
var storeSchema = {
|
|
2695
|
+
getStoreCount: (query) => `
|
|
2696
|
+
query getStoreCount($store: StoreInput!) {
|
|
2697
|
+
getStoreCount(store: $store) {
|
|
2698
|
+
${query}
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
`,
|
|
2702
|
+
getStore: (query) => `
|
|
2703
|
+
query getStore($store: StoreInput!) {
|
|
2704
|
+
getStore(store: $store) {
|
|
2705
|
+
${query}
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
`,
|
|
2709
|
+
getStores: (query) => `
|
|
2710
|
+
query getStores($search: String, $store: StoreInput, $storeIds: [String], $limit: Int, $skip: Int) {
|
|
2711
|
+
getStores(search: $search, store: $store, storeIds: $storeIds, limit: $limit, skip: $skip) {
|
|
2712
|
+
${query}
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
`,
|
|
2716
|
+
createStore: (mutation) => `
|
|
2717
|
+
mutation createStore($store: StoreInput) {
|
|
2718
|
+
createStore(store: $store) {
|
|
2719
|
+
${mutation}
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
`,
|
|
2723
|
+
updateStore: (mutation) => `
|
|
2724
|
+
mutation updateStore($storeId: String, $store: StoreInput) {
|
|
2725
|
+
updateStore(storeId: $storeId, store: $store) {
|
|
2726
|
+
${mutation}
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
`,
|
|
2730
|
+
deleteStore: (mutation) => `
|
|
2731
|
+
mutation deleteStore($storeId: String) {
|
|
2732
|
+
deleteStore(storeId: $storeId) {
|
|
2733
|
+
${mutation}
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
`
|
|
2653
2737
|
};
|
|
2654
|
-
var addTransactionResponse = getTransactionResponse;
|
|
2655
|
-
var addTransactionResponseNestedFields = getTransactionResponseNestedFields;
|
|
2656
|
-
var updateTransactionResponse = getTransactionResponse;
|
|
2657
|
-
var updateTransactionResponseNestedFields = getTransactionResponseNestedFields;
|
|
2658
2738
|
|
|
2659
|
-
// src/services/
|
|
2660
|
-
var
|
|
2661
|
-
async
|
|
2739
|
+
// src/services/inventory/store.service.ts
|
|
2740
|
+
var createStoreService = (client) => ({
|
|
2741
|
+
async updateStore(input, fetchFields, option) {
|
|
2662
2742
|
var _a, _b, _c, _d;
|
|
2663
2743
|
const res = await client.request(
|
|
2664
|
-
|
|
2744
|
+
storeSchema.updateStore(
|
|
2665
2745
|
gqlQueryStringBuilder(
|
|
2666
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2667
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2746
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateStoreResponse,
|
|
2747
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateStoreResponseNestedFields
|
|
2668
2748
|
)
|
|
2669
2749
|
),
|
|
2670
2750
|
input,
|
|
2671
2751
|
option
|
|
2672
2752
|
);
|
|
2673
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2753
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateStore) != null ? _d : null;
|
|
2674
2754
|
},
|
|
2675
|
-
async
|
|
2676
|
-
var _a, _b, _c
|
|
2755
|
+
async removeStore(input, fetchFields, option) {
|
|
2756
|
+
var _a, _b, _c;
|
|
2677
2757
|
const res = await client.request(
|
|
2678
|
-
|
|
2758
|
+
storeSchema.deleteStore(
|
|
2679
2759
|
gqlQueryStringBuilder(
|
|
2680
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2681
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addTransactionResponseNestedFields
|
|
2760
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeStoreResponse
|
|
2682
2761
|
)
|
|
2683
2762
|
),
|
|
2684
2763
|
input,
|
|
2685
2764
|
option
|
|
2686
2765
|
);
|
|
2687
|
-
return (
|
|
2766
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.deleteStore) != null ? _c : null;
|
|
2688
2767
|
},
|
|
2689
|
-
async
|
|
2768
|
+
async addStore(input, fetchFields, option) {
|
|
2690
2769
|
var _a, _b, _c, _d;
|
|
2691
2770
|
const res = await client.request(
|
|
2692
|
-
|
|
2771
|
+
storeSchema.createStore(
|
|
2693
2772
|
gqlQueryStringBuilder(
|
|
2694
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2695
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2773
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addStoreResponse,
|
|
2774
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addStoreResponseNestedFields
|
|
2696
2775
|
)
|
|
2697
2776
|
),
|
|
2698
2777
|
input,
|
|
2699
2778
|
option
|
|
2700
2779
|
);
|
|
2701
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
2780
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.createStore) != null ? _d : null;
|
|
2702
2781
|
},
|
|
2703
|
-
async
|
|
2704
|
-
var _a, _b, _c
|
|
2782
|
+
async getStoreCount(input, fetchFields, option) {
|
|
2783
|
+
var _a, _b, _c;
|
|
2705
2784
|
const res = await client.request(
|
|
2706
|
-
|
|
2785
|
+
storeSchema.getStoreCount(
|
|
2707
2786
|
gqlQueryStringBuilder(
|
|
2708
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2709
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getTransactionsResponseNestedFields
|
|
2787
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getStoreCountResponse
|
|
2710
2788
|
)
|
|
2711
2789
|
),
|
|
2712
2790
|
input,
|
|
2713
2791
|
option
|
|
2714
2792
|
);
|
|
2715
|
-
return (
|
|
2716
|
-
}
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
// src/services/subscription/schemas/paystack.schema.ts
|
|
2720
|
-
var paystackSchema = {
|
|
2721
|
-
paystackInitializeSubscription: (query) => `
|
|
2722
|
-
mutation paystackInitializeSubscription($userId: String!, $planId: String!, $subscriptionFrequencyType: SubscriptionFrequencyTypeEnum!) {
|
|
2723
|
-
paystackInitializeSubscription(userId: $userId, planId: $planId, subscriptionFrequencyType: $subscriptionFrequencyType) {
|
|
2724
|
-
${query}
|
|
2725
|
-
}
|
|
2726
|
-
}
|
|
2727
|
-
`,
|
|
2728
|
-
paystackInitializePayment: (query) => `
|
|
2729
|
-
mutation paystackInitializePayment($userId: String!) {
|
|
2730
|
-
paystackInitializePayment(userId: $userId) {
|
|
2731
|
-
${query}
|
|
2732
|
-
}
|
|
2733
|
-
}
|
|
2734
|
-
`
|
|
2735
|
-
};
|
|
2736
|
-
|
|
2737
|
-
// src/services/subscription/types/paystack.ts
|
|
2738
|
-
var paystackInitializePaymentResponse = [
|
|
2739
|
-
"accessCode",
|
|
2740
|
-
"authorizationUrl",
|
|
2741
|
-
"reference"
|
|
2742
|
-
];
|
|
2743
|
-
var paystackInitializeSubscriptionResponse = paystackInitializePaymentResponse;
|
|
2744
|
-
|
|
2745
|
-
// src/services/subscription/paystack.service.ts
|
|
2746
|
-
var createPaystackService = (client) => ({
|
|
2747
|
-
async paystackInitializeSubscription(input, fetchFields, option) {
|
|
2748
|
-
var _a, _b, _c;
|
|
2793
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.getStoreCount) != null ? _c : null;
|
|
2794
|
+
},
|
|
2795
|
+
async getStore(input, fetchFields, option) {
|
|
2796
|
+
var _a, _b, _c, _d;
|
|
2749
2797
|
const res = await client.request(
|
|
2750
|
-
|
|
2798
|
+
storeSchema.getStore(
|
|
2751
2799
|
gqlQueryStringBuilder(
|
|
2752
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2800
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getStoreResponse,
|
|
2801
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getStoreResponseNestedFields
|
|
2753
2802
|
)
|
|
2754
2803
|
),
|
|
2755
2804
|
input,
|
|
2756
2805
|
option
|
|
2757
2806
|
);
|
|
2758
|
-
return (
|
|
2807
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getStore) != null ? _d : null;
|
|
2759
2808
|
},
|
|
2760
|
-
async
|
|
2761
|
-
var _a, _b;
|
|
2809
|
+
async getStores(input, fetchFields, option) {
|
|
2810
|
+
var _a, _b, _c, _d;
|
|
2762
2811
|
const res = await client.request(
|
|
2763
|
-
|
|
2812
|
+
storeSchema.getStores(
|
|
2764
2813
|
gqlQueryStringBuilder(
|
|
2765
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2814
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getStoresResponse,
|
|
2815
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getStoresResponseNestedFields
|
|
2766
2816
|
)
|
|
2767
2817
|
),
|
|
2768
2818
|
input,
|
|
2769
2819
|
option
|
|
2770
2820
|
);
|
|
2771
|
-
return (
|
|
2821
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getStores) != null ? _d : null;
|
|
2772
2822
|
}
|
|
2773
2823
|
});
|
|
2774
2824
|
|
|
2775
|
-
// src/services/
|
|
2776
|
-
var
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
];
|
|
2814
|
-
|
|
2815
|
-
// src/services/subscription/types/subscription-plan-feature.type.ts
|
|
2816
|
-
var getSubscriptionPlanFeatureResponse = [
|
|
2817
|
-
"subscriptionPlanFeature"
|
|
2818
|
-
];
|
|
2819
|
-
var _getSubscriptionPlanFeatureResponseNestedFields = {};
|
|
2820
|
-
var getSubscriptionPlanFeatureResponseNestedFields = {
|
|
2821
|
-
..._getSubscriptionPlanFeatureResponseNestedFields,
|
|
2822
|
-
subscriptionPlanFeature: subscriptionPlanFeatureQuery
|
|
2823
|
-
};
|
|
2824
|
-
var getSubscriptionPlanFeaturesResponse = [
|
|
2825
|
-
"subscriptionPlanFeatures",
|
|
2826
|
-
"total"
|
|
2827
|
-
];
|
|
2828
|
-
var getSubscriptionPlanFeaturesResponseNestedFields = {
|
|
2829
|
-
..._getSubscriptionPlanFeatureResponseNestedFields,
|
|
2830
|
-
subscriptionPlanFeatures: subscriptionPlanFeatureQuery
|
|
2831
|
-
};
|
|
2832
|
-
var addSubscriptionPlanFeatureResponse = getSubscriptionPlanFeatureResponse;
|
|
2833
|
-
var addSubscriptionPlanFeatureResponseNestedFields = getSubscriptionPlanFeatureResponseNestedFields;
|
|
2834
|
-
var updateSubscriptionPlanFeatureResponse = getSubscriptionPlanFeatureResponse;
|
|
2835
|
-
var updateSubscriptionPlanFeatureResponseNestedFields = getSubscriptionPlanFeatureResponseNestedFields;
|
|
2836
|
-
var removeSubscriptionPlanFeatureResponse = [
|
|
2837
|
-
"subscriptionPlanFeatureId"
|
|
2838
|
-
];
|
|
2839
|
-
|
|
2840
|
-
// src/services/subscription/types/subscription-plan.type.ts
|
|
2841
|
-
var getSubscriptionPlanResponse = [
|
|
2842
|
-
"subscriptionPlan"
|
|
2843
|
-
];
|
|
2844
|
-
var _getSubscriptionPlanResponseNestedFields = {
|
|
2845
|
-
features: subscriptionPlanFeatureQuery
|
|
2846
|
-
};
|
|
2847
|
-
var getSubscriptionPlanResponseNestedFields = {
|
|
2848
|
-
..._getSubscriptionPlanResponseNestedFields,
|
|
2849
|
-
subscriptionPlan: subscriptionPlanQuery
|
|
2850
|
-
};
|
|
2851
|
-
var getSubscriptionPlansResponse = [
|
|
2852
|
-
"subscriptionPlans",
|
|
2853
|
-
"total"
|
|
2854
|
-
];
|
|
2855
|
-
var getSubscriptionPlansResponseNestedFields = {
|
|
2856
|
-
..._getSubscriptionPlanResponseNestedFields,
|
|
2857
|
-
subscriptionPlans: subscriptionPlanQuery
|
|
2858
|
-
};
|
|
2859
|
-
var addSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
2860
|
-
var addSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
2861
|
-
var updateSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
2862
|
-
var updateSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
2863
|
-
var removeSubscriptionPlanResponse = [
|
|
2864
|
-
"subscriptionPlanId"
|
|
2865
|
-
];
|
|
2866
|
-
|
|
2867
|
-
// src/services/subscription/types/subscription.type.ts
|
|
2868
|
-
var getSubscriptionResponse = [
|
|
2869
|
-
"subscription"
|
|
2870
|
-
];
|
|
2871
|
-
var _getSubscriptionResponseNestedFields = {};
|
|
2872
|
-
var getSubscriptionResponseNestedFields = {
|
|
2873
|
-
..._getSubscriptionResponseNestedFields,
|
|
2874
|
-
subscription: subscriptionQuery
|
|
2875
|
-
};
|
|
2876
|
-
var getSubscriptionsResponse = [
|
|
2877
|
-
"subscriptions",
|
|
2878
|
-
"total"
|
|
2879
|
-
];
|
|
2880
|
-
var getSubscriptionsResponseNestedFields = {
|
|
2881
|
-
..._getSubscriptionResponseNestedFields,
|
|
2882
|
-
subscriptions: subscriptionQuery
|
|
2825
|
+
// src/services/inventory/schema/store-category.schema.ts
|
|
2826
|
+
var storeCategorySchema = {
|
|
2827
|
+
createStoreCategory: (query) => `
|
|
2828
|
+
mutation createStoreCategory($storeCategory: StoreCategoryInput!) {
|
|
2829
|
+
createStoreCategory(storeCategory: $storeCategory) {
|
|
2830
|
+
${query}
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
`,
|
|
2834
|
+
updateStoreCategory: (query) => `
|
|
2835
|
+
mutation updateStoreCategory($storeCategoryId: String!, $storeCategory: StoreCategoryInput!) {
|
|
2836
|
+
updateStoreCategory(storeCategoryId: $storeCategoryId, storeCategory: $storeCategory) {
|
|
2837
|
+
${query}
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
`,
|
|
2841
|
+
removeStoreCategory: (query) => `
|
|
2842
|
+
mutation removeStoreCategory($storeCategoryId: String!) {
|
|
2843
|
+
removeStoreCategory(storeCategoryId: $storeCategoryId) {
|
|
2844
|
+
${query}
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
`,
|
|
2848
|
+
// get
|
|
2849
|
+
getStoreCategory: (query) => `
|
|
2850
|
+
query getStoreCategory($storeCategory: StoreCategoryInput!) {
|
|
2851
|
+
getStoreCategory(storeCategory: $storeCategory) {
|
|
2852
|
+
${query}
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
`,
|
|
2856
|
+
getStoreCategories: (query) => `
|
|
2857
|
+
query getStoreCategories($search: String, $storeCategory: StoreCategoryInput, $storeCategoryIds: [String], $limit: Int!, $skip: Int!) {
|
|
2858
|
+
getStoreCategories(search: $search, storeCategory: $storeCategory, storeCategoryIds: $storeCategoryIds, limit: $limit, skip: $skip) {
|
|
2859
|
+
${query}
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
`
|
|
2883
2863
|
};
|
|
2884
|
-
var addSubscriptionResponse = getSubscriptionResponse;
|
|
2885
|
-
var addSubscriptionResponseNestedFields = getSubscriptionResponseNestedFields;
|
|
2886
|
-
var updateSubscriptionResponse = getSubscriptionResponse;
|
|
2887
|
-
var updateSubscriptionResponseNestedFields = getSubscriptionResponseNestedFields;
|
|
2888
|
-
var removeSubscriptionResponse = [
|
|
2889
|
-
"subscriptionId"
|
|
2890
|
-
];
|
|
2891
2864
|
|
|
2892
|
-
// src/services/
|
|
2893
|
-
var
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2865
|
+
// src/services/inventory/store-category.service.ts
|
|
2866
|
+
var createStoreCategoryService = (client) => ({
|
|
2867
|
+
async getStoreCategories(input, fetchFields, option) {
|
|
2868
|
+
var _a, _b, _c, _d;
|
|
2869
|
+
const res = await client.request(
|
|
2870
|
+
storeCategorySchema.getStoreCategories(
|
|
2871
|
+
gqlQueryStringBuilder(
|
|
2872
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getStoreCategoriesResponseFields,
|
|
2873
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getStoreCategoriesResponseNestedFields
|
|
2874
|
+
)
|
|
2875
|
+
),
|
|
2876
|
+
input,
|
|
2877
|
+
option
|
|
2878
|
+
);
|
|
2879
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getStoreCategories) != null ? _d : null;
|
|
2880
|
+
},
|
|
2881
|
+
async getStoreCategory(input, fetchFields, option) {
|
|
2882
|
+
var _a, _b, _c, _d;
|
|
2883
|
+
const res = await client.request(
|
|
2884
|
+
storeCategorySchema.getStoreCategory(
|
|
2885
|
+
gqlQueryStringBuilder(
|
|
2886
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getStoreCategoryResponseFields,
|
|
2887
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getStoreCategoryResponseNestedFields
|
|
2888
|
+
)
|
|
2889
|
+
),
|
|
2890
|
+
input,
|
|
2891
|
+
option
|
|
2892
|
+
);
|
|
2893
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getStoreCategory) != null ? _d : null;
|
|
2894
|
+
},
|
|
2895
|
+
async updateStoreCategory(input, fetchFields, option) {
|
|
2896
|
+
var _a, _b, _c, _d;
|
|
2897
|
+
const res = await client.request(
|
|
2898
|
+
storeCategorySchema.updateStoreCategory(
|
|
2899
|
+
gqlQueryStringBuilder(
|
|
2900
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateStoreCategoryResponseFields,
|
|
2901
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateStoreCategoryResponseNestedFields
|
|
2902
|
+
)
|
|
2903
|
+
),
|
|
2904
|
+
input,
|
|
2905
|
+
option
|
|
2906
|
+
);
|
|
2907
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateStoreCategory) != null ? _d : null;
|
|
2908
|
+
},
|
|
2909
|
+
async createStoreCategory(input, fetchFields, option) {
|
|
2910
|
+
var _a, _b, _c, _d;
|
|
2911
|
+
const res = await client.request(
|
|
2912
|
+
storeCategorySchema.createStoreCategory(
|
|
2913
|
+
gqlQueryStringBuilder(
|
|
2914
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : createStoreCategoryResponseFields,
|
|
2915
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : createStoreCategoryResponseNestedFields
|
|
2916
|
+
)
|
|
2917
|
+
),
|
|
2918
|
+
input,
|
|
2919
|
+
option
|
|
2920
|
+
);
|
|
2921
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.createStoreCategory) != null ? _d : null;
|
|
2922
|
+
},
|
|
2923
|
+
async removeStoreCategory(input, fetchFields, option) {
|
|
2924
|
+
var _a, _b, _c;
|
|
2925
|
+
const res = await client.request(
|
|
2926
|
+
storeCategorySchema.removeStoreCategory(
|
|
2927
|
+
gqlQueryStringBuilder(
|
|
2928
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeStoreCategoryResponseFields
|
|
2929
|
+
)
|
|
2930
|
+
),
|
|
2931
|
+
input,
|
|
2932
|
+
option
|
|
2933
|
+
);
|
|
2934
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removeStoreCategory) != null ? _c : null;
|
|
2935
|
+
}
|
|
2936
|
+
});
|
|
2937
|
+
|
|
2938
|
+
// src/services/inventory/schema/store-category-product.schema.ts
|
|
2939
|
+
var storeCategoryProductSchema = {
|
|
2940
|
+
createStoreCategoryProduct: (query) => `
|
|
2941
|
+
mutation createStoreCategoryProduct($storeCategoryProduct: StoreCategoryProductInput!) {
|
|
2942
|
+
createStoreCategoryProduct(storeCategoryProduct: $storeCategoryProduct) {
|
|
2897
2943
|
${query}
|
|
2898
2944
|
}
|
|
2899
2945
|
}
|
|
2900
2946
|
`,
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2947
|
+
updateStoreCategoryProduct: (query) => `
|
|
2948
|
+
mutation updateStoreCategoryProduct($storeCategoryProductId: String!, $storeCategoryProduct: StoreCategoryProductInput!) {
|
|
2949
|
+
updateStoreCategoryProduct(storeCategoryProductId: $storeCategoryProductId, storeCategoryProduct: $storeCategoryProduct) {
|
|
2904
2950
|
${query}
|
|
2905
2951
|
}
|
|
2906
2952
|
}
|
|
2907
2953
|
`,
|
|
2908
|
-
|
|
2909
|
-
mutation
|
|
2910
|
-
|
|
2954
|
+
removeStoreCategoryProduct: (query) => `
|
|
2955
|
+
mutation removeStoreCategoryProduct($storeCategoryProductId: String!) {
|
|
2956
|
+
removeStoreCategoryProduct(storeCategoryProductId: $storeCategoryProductId) {
|
|
2911
2957
|
${query}
|
|
2912
2958
|
}
|
|
2913
2959
|
}
|
|
2914
2960
|
`,
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2961
|
+
// get
|
|
2962
|
+
getStoreCategoryProduct: (query) => `
|
|
2963
|
+
query getStoreCategoryProduct($storeCategoryProduct: StoreCategoryProductInput!) {
|
|
2964
|
+
getStoreCategoryProduct(storeCategoryProduct: $storeCategoryProduct) {
|
|
2918
2965
|
${query}
|
|
2919
2966
|
}
|
|
2920
2967
|
}
|
|
2921
2968
|
`,
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2969
|
+
getStoreCategoryProducts: (query) => `
|
|
2970
|
+
query getStoreCategoryProducts($search: String, $storeCategoryProduct: StoreCategoryProductInput, $storeCategoryProductIds: [String], $limit: Int!, $skip: Int!) {
|
|
2971
|
+
getStoreCategoryProducts(search: $search, storeCategoryProduct: $storeCategoryProduct, storeCategoryProductIds: $storeCategoryProductIds, limit: $limit, skip: $skip) {
|
|
2925
2972
|
${query}
|
|
2926
2973
|
}
|
|
2927
2974
|
}
|
|
2928
2975
|
`
|
|
2929
2976
|
};
|
|
2930
2977
|
|
|
2931
|
-
// src/services/
|
|
2932
|
-
var
|
|
2933
|
-
async
|
|
2934
|
-
var _a, _b, _c;
|
|
2978
|
+
// src/services/inventory/store-category-product.service.ts
|
|
2979
|
+
var createStoreCategoryProductService = (client) => ({
|
|
2980
|
+
async getStoreCategoryProducts(input, fetchFields, option) {
|
|
2981
|
+
var _a, _b, _c, _d;
|
|
2935
2982
|
const res = await client.request(
|
|
2936
|
-
|
|
2983
|
+
storeCategoryProductSchema.getStoreCategoryProducts(
|
|
2937
2984
|
gqlQueryStringBuilder(
|
|
2938
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2985
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getStoreCategoryProductsResponseFields,
|
|
2986
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getStoreCategoryProductsResponseNestedFields
|
|
2939
2987
|
)
|
|
2940
2988
|
),
|
|
2941
2989
|
input,
|
|
2942
2990
|
option
|
|
2943
2991
|
);
|
|
2944
|
-
return (
|
|
2992
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getStoreCategoryProducts) != null ? _d : null;
|
|
2945
2993
|
},
|
|
2946
|
-
async
|
|
2994
|
+
async getStoreCategoryProduct(input, fetchFields, option) {
|
|
2947
2995
|
var _a, _b, _c, _d;
|
|
2948
2996
|
const res = await client.request(
|
|
2949
|
-
|
|
2997
|
+
storeCategoryProductSchema.getStoreCategoryProduct(
|
|
2950
2998
|
gqlQueryStringBuilder(
|
|
2951
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2952
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
2999
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getStoreCategoryProductResponseFields,
|
|
3000
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getStoreCategoryProductResponseNestedFields
|
|
2953
3001
|
)
|
|
2954
3002
|
),
|
|
2955
3003
|
input,
|
|
2956
3004
|
option
|
|
2957
3005
|
);
|
|
2958
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
3006
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getStoreCategoryProduct) != null ? _d : null;
|
|
2959
3007
|
},
|
|
2960
|
-
async
|
|
3008
|
+
async updateStoreCategoryProduct(input, fetchFields, option) {
|
|
2961
3009
|
var _a, _b, _c, _d;
|
|
2962
3010
|
const res = await client.request(
|
|
2963
|
-
|
|
3011
|
+
storeCategoryProductSchema.updateStoreCategoryProduct(
|
|
2964
3012
|
gqlQueryStringBuilder(
|
|
2965
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2966
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
3013
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateStoreCategoryProductResponseFields,
|
|
3014
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateStoreCategoryProductResponseNestedFields
|
|
2967
3015
|
)
|
|
2968
3016
|
),
|
|
2969
3017
|
input,
|
|
2970
3018
|
option
|
|
2971
3019
|
);
|
|
2972
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
3020
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateStoreCategoryProduct) != null ? _d : null;
|
|
2973
3021
|
},
|
|
2974
|
-
async
|
|
3022
|
+
async createStoreCategoryProduct(input, fetchFields, option) {
|
|
2975
3023
|
var _a, _b, _c, _d;
|
|
2976
3024
|
const res = await client.request(
|
|
2977
|
-
|
|
3025
|
+
storeCategoryProductSchema.createStoreCategoryProduct(
|
|
2978
3026
|
gqlQueryStringBuilder(
|
|
2979
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2980
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
3027
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : createStoreCategoryProductResponseFields,
|
|
3028
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : createStoreCategoryProductResponseNestedFields
|
|
3029
|
+
)
|
|
3030
|
+
),
|
|
3031
|
+
input,
|
|
3032
|
+
option
|
|
3033
|
+
);
|
|
3034
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.createStoreCategoryProduct) != null ? _d : null;
|
|
3035
|
+
},
|
|
3036
|
+
async removeStoreCategoryProduct(input, fetchFields, option) {
|
|
3037
|
+
var _a, _b, _c;
|
|
3038
|
+
const res = await client.request(
|
|
3039
|
+
storeCategoryProductSchema.removeStoreCategoryProduct(
|
|
3040
|
+
gqlQueryStringBuilder(
|
|
3041
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeStoreCategoryProductResponseFields
|
|
3042
|
+
)
|
|
3043
|
+
),
|
|
3044
|
+
input,
|
|
3045
|
+
option
|
|
3046
|
+
);
|
|
3047
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removeStoreCategoryProduct) != null ? _c : null;
|
|
3048
|
+
}
|
|
3049
|
+
});
|
|
3050
|
+
|
|
3051
|
+
// src/services/sales/schemas/order.schema.ts
|
|
3052
|
+
var orderSchema = {
|
|
3053
|
+
getOrder: (query) => `
|
|
3054
|
+
query getOrder($order: OrderInput) {
|
|
3055
|
+
getOrder(order: $order){
|
|
3056
|
+
${query}
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
`,
|
|
3060
|
+
getOrders: (query) => `
|
|
3061
|
+
query getOrders($orderIds: [String], $order: OrderInput, $limit: Int, $skip: Int){
|
|
3062
|
+
getOrders(orderIds: $orderIds, order: $order, limit: $limit, skip: $skip){
|
|
3063
|
+
${query}
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
`
|
|
3067
|
+
};
|
|
3068
|
+
|
|
3069
|
+
// src/services/sales/sale.entity.ts
|
|
3070
|
+
var transactionQuery = [
|
|
3071
|
+
"_id",
|
|
3072
|
+
"amountPaid",
|
|
3073
|
+
"amountTotal",
|
|
3074
|
+
"createdAt",
|
|
3075
|
+
"from",
|
|
3076
|
+
"fromWallet",
|
|
3077
|
+
"isCredit",
|
|
3078
|
+
"paymentDate",
|
|
3079
|
+
"paymentType",
|
|
3080
|
+
"platform",
|
|
3081
|
+
"saleIds",
|
|
3082
|
+
"saleStatus",
|
|
3083
|
+
"sales",
|
|
3084
|
+
"storeId",
|
|
3085
|
+
"to",
|
|
3086
|
+
"toWallet",
|
|
3087
|
+
"txStatus"
|
|
3088
|
+
];
|
|
3089
|
+
var orderQuery = [
|
|
3090
|
+
"_id",
|
|
3091
|
+
"createdAt",
|
|
3092
|
+
"orderStatus",
|
|
3093
|
+
"transactionId",
|
|
3094
|
+
"userId"
|
|
3095
|
+
];
|
|
3096
|
+
var saleQuery = [
|
|
3097
|
+
"_id",
|
|
3098
|
+
"amountTotal",
|
|
3099
|
+
"createdAt",
|
|
3100
|
+
"packageId",
|
|
3101
|
+
"productId",
|
|
3102
|
+
"quantity",
|
|
3103
|
+
"storeId"
|
|
3104
|
+
];
|
|
3105
|
+
|
|
3106
|
+
// src/services/sales/types/order.type.ts
|
|
3107
|
+
var getOrderResponse = ["order"];
|
|
3108
|
+
var getOrderResponseNestedFields = {
|
|
3109
|
+
order: orderQuery
|
|
3110
|
+
};
|
|
3111
|
+
var getOrdersResponse = ["orders"];
|
|
3112
|
+
var getOrdersResponseNestedFields = {
|
|
3113
|
+
orders: orderQuery
|
|
3114
|
+
};
|
|
3115
|
+
|
|
3116
|
+
// src/services/sales/order.service.ts
|
|
3117
|
+
var createOrderService = (client) => ({
|
|
3118
|
+
async getOrder(input, fetchFields, option) {
|
|
3119
|
+
var _a, _b, _c, _d;
|
|
3120
|
+
const res = await client.request(
|
|
3121
|
+
orderSchema.getOrder(
|
|
3122
|
+
gqlQueryStringBuilder(
|
|
3123
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getOrderResponse,
|
|
3124
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getOrderResponseNestedFields
|
|
2981
3125
|
)
|
|
2982
3126
|
),
|
|
2983
3127
|
input,
|
|
2984
3128
|
option
|
|
2985
3129
|
);
|
|
2986
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
3130
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getOrder) != null ? _d : null;
|
|
2987
3131
|
},
|
|
2988
|
-
async
|
|
3132
|
+
async getOrders(input, fetchFields, option) {
|
|
2989
3133
|
var _a, _b, _c, _d;
|
|
2990
3134
|
const res = await client.request(
|
|
2991
|
-
|
|
3135
|
+
orderSchema.getOrders(
|
|
2992
3136
|
gqlQueryStringBuilder(
|
|
2993
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
2994
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
3137
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getOrdersResponse,
|
|
3138
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getOrdersResponseNestedFields
|
|
2995
3139
|
)
|
|
2996
3140
|
),
|
|
2997
3141
|
input,
|
|
2998
3142
|
option
|
|
2999
3143
|
);
|
|
3000
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
3144
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getOrders) != null ? _d : null;
|
|
3001
3145
|
}
|
|
3002
3146
|
});
|
|
3003
3147
|
|
|
3004
|
-
// src/services/
|
|
3005
|
-
var
|
|
3006
|
-
|
|
3007
|
-
query
|
|
3008
|
-
|
|
3009
|
-
${query}
|
|
3010
|
-
}
|
|
3011
|
-
}
|
|
3012
|
-
`,
|
|
3013
|
-
getSubscriptionPlans: (query) => `
|
|
3014
|
-
query getSubscriptionPlans($search: String, $subscriptionPlanIds: [String], $subscriptionPlan: SubscriptionPlanInput, $limit: Int!, $skip: Int!) {
|
|
3015
|
-
getSubscriptionPlans(search: $search, subscriptionPlanIds: $subscriptionPlanIds, subscriptionPlan: $subscriptionPlan, limit: $limit, skip: $skip) {
|
|
3016
|
-
${query}
|
|
3017
|
-
}
|
|
3018
|
-
}
|
|
3019
|
-
`,
|
|
3020
|
-
addSubscriptionPlan: (query) => `
|
|
3021
|
-
mutation addSubscriptionPlan($subscriptionPlan: SubscriptionPlanInput!) {
|
|
3022
|
-
addSubscriptionPlan(subscriptionPlan: $subscriptionPlan) {
|
|
3023
|
-
${query}
|
|
3024
|
-
}
|
|
3025
|
-
}
|
|
3026
|
-
`,
|
|
3027
|
-
updateSubscriptionPlan: (query) => `
|
|
3028
|
-
mutation updateSubscriptionPlan($subscriptionPlanId: String!, $subscriptionPlan: SubscriptionPlanInput!) {
|
|
3029
|
-
updateSubscriptionPlan(subscriptionPlanId: $subscriptionPlanId, subscriptionPlan: $subscriptionPlan) {
|
|
3148
|
+
// src/services/sales/schemas/sale.schema.ts
|
|
3149
|
+
var saleSchema = {
|
|
3150
|
+
getSales: (query) => `
|
|
3151
|
+
query getSales($saleIds: [String], $saleFilter: SaleFilterInput, $ShouldGetFromAllStores: Boolean, $dateFilter: DateFilterInput, $limit: Int, $skip: Int) {
|
|
3152
|
+
getSales(saleIds: $saleIds, saleFilter: $saleFilter, ShouldGetFromAllStores: $ShouldGetFromAllStores, dateFilter: $dateFilter, limit: $limit, skip: $skip) {
|
|
3030
3153
|
${query}
|
|
3031
3154
|
}
|
|
3032
3155
|
}
|
|
3033
3156
|
`,
|
|
3034
|
-
|
|
3035
|
-
mutation
|
|
3036
|
-
|
|
3157
|
+
updateSale: (query) => `
|
|
3158
|
+
mutation updateSale($saleId: String!, $sale: SaleInput!) {
|
|
3159
|
+
updateSale(saleId: $saleId, sale: $sale) {
|
|
3037
3160
|
${query}
|
|
3038
3161
|
}
|
|
3039
3162
|
}
|
|
3040
3163
|
`
|
|
3041
3164
|
};
|
|
3042
3165
|
|
|
3043
|
-
// src/services/
|
|
3044
|
-
var
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
input,
|
|
3068
|
-
option
|
|
3069
|
-
);
|
|
3070
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.updateSubscriptionPlan) != null ? _d : null;
|
|
3071
|
-
},
|
|
3072
|
-
async addSubscriptionPlan(input, fetchFields, option) {
|
|
3073
|
-
var _a, _b, _c, _d;
|
|
3074
|
-
const res = await client.request(
|
|
3075
|
-
subscriptionPlanSchema.addSubscriptionPlan(
|
|
3076
|
-
gqlQueryStringBuilder(
|
|
3077
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addSubscriptionPlanResponse,
|
|
3078
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addSubscriptionPlanResponseNestedFields
|
|
3079
|
-
)
|
|
3080
|
-
),
|
|
3081
|
-
input,
|
|
3082
|
-
option
|
|
3083
|
-
);
|
|
3084
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.addSubscriptionPlan) != null ? _d : null;
|
|
3085
|
-
},
|
|
3086
|
-
async getSubscriptionPlan(input, fetchFields, option) {
|
|
3166
|
+
// src/services/sales/types/sale.type.ts
|
|
3167
|
+
var getSaleResponse = ["sale"];
|
|
3168
|
+
var _getSaleResponseNestedFields = {
|
|
3169
|
+
..._getProductResponseNestedFields
|
|
3170
|
+
};
|
|
3171
|
+
var getSaleResponseNestedFields = {
|
|
3172
|
+
sale: saleQuery,
|
|
3173
|
+
..._getSaleResponseNestedFields
|
|
3174
|
+
};
|
|
3175
|
+
var getSalesResponse = [
|
|
3176
|
+
"sales",
|
|
3177
|
+
"uniqueProducts"
|
|
3178
|
+
];
|
|
3179
|
+
var getSalesResponseNestedFields = {
|
|
3180
|
+
sales: saleQuery,
|
|
3181
|
+
uniqueProducts: productQuery,
|
|
3182
|
+
..._getSaleResponseNestedFields
|
|
3183
|
+
};
|
|
3184
|
+
var UpdateSaleResponse = ["sale"];
|
|
3185
|
+
var updateSaleResponseNestedFields = getSaleResponseNestedFields;
|
|
3186
|
+
|
|
3187
|
+
// src/services/sales/sale.service.ts
|
|
3188
|
+
var createSaleService = (client) => ({
|
|
3189
|
+
async updateSale(input, fetchFields, option) {
|
|
3087
3190
|
var _a, _b, _c, _d;
|
|
3088
3191
|
const res = await client.request(
|
|
3089
|
-
|
|
3192
|
+
saleSchema.updateSale(
|
|
3090
3193
|
gqlQueryStringBuilder(
|
|
3091
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
3092
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
3194
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : UpdateSaleResponse,
|
|
3195
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateSaleResponseNestedFields
|
|
3093
3196
|
)
|
|
3094
3197
|
),
|
|
3095
3198
|
input,
|
|
3096
3199
|
option
|
|
3097
3200
|
);
|
|
3098
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
3201
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateSale) != null ? _d : null;
|
|
3099
3202
|
},
|
|
3100
|
-
async
|
|
3203
|
+
async getSales(input, fetchFields, option) {
|
|
3101
3204
|
var _a, _b, _c, _d;
|
|
3102
3205
|
const res = await client.request(
|
|
3103
|
-
|
|
3206
|
+
saleSchema.getSales(
|
|
3104
3207
|
gqlQueryStringBuilder(
|
|
3105
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
3106
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
3208
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSalesResponse,
|
|
3209
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSalesResponseNestedFields
|
|
3107
3210
|
)
|
|
3108
3211
|
),
|
|
3109
3212
|
input,
|
|
3110
3213
|
option
|
|
3111
3214
|
);
|
|
3112
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
3215
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSales) != null ? _d : null;
|
|
3113
3216
|
}
|
|
3114
3217
|
});
|
|
3115
3218
|
|
|
3116
|
-
// src/services/
|
|
3117
|
-
var
|
|
3118
|
-
|
|
3119
|
-
query
|
|
3120
|
-
|
|
3121
|
-
${query}
|
|
3122
|
-
}
|
|
3123
|
-
}
|
|
3124
|
-
`,
|
|
3125
|
-
getSubscriptions: (query) => `
|
|
3126
|
-
query getSubscriptions($search: String, $subscriptionIds: [String], $subscription: SubscriptionInput, $limit: Int!, $skip: Int!) {
|
|
3127
|
-
getSubscriptions(search: $search, subscriptionIds: $subscriptionIds, subscription: $subscription, limit: $limit, skip: $skip) {
|
|
3219
|
+
// src/services/sales/schemas/transaction.schema.ts
|
|
3220
|
+
var transactionSchema = {
|
|
3221
|
+
getTransaction: (query) => `
|
|
3222
|
+
query getTransaction($transaction: TransactionInput!){
|
|
3223
|
+
getTransaction(transaction: $transaction){
|
|
3128
3224
|
${query}
|
|
3129
3225
|
}
|
|
3130
3226
|
}
|
|
3131
3227
|
`,
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3228
|
+
getTransactions: (query) => `
|
|
3229
|
+
query getTransactions($dateFilter: DateFilterInput, $transactionIds: [String], $transaction: TransactionInput, $limit: Int, $skip: Int, $shouldGetFromAllStores: Boolean){
|
|
3230
|
+
getTransactions(dateFilter: $dateFilter, transactionIds: $transactionIds, transaction: $transaction, limit: $limit, skip: $skip, shouldGetFromAllStores: $shouldGetFromAllStores){
|
|
3135
3231
|
${query}
|
|
3136
3232
|
}
|
|
3137
3233
|
}
|
|
3138
3234
|
`,
|
|
3139
|
-
|
|
3140
|
-
mutation
|
|
3141
|
-
|
|
3235
|
+
addTransaction: (query) => `
|
|
3236
|
+
mutation addTransaction($transaction: TransactionInput!){
|
|
3237
|
+
addTransaction(transaction: $transaction){
|
|
3142
3238
|
${query}
|
|
3143
3239
|
}
|
|
3144
3240
|
}
|
|
3145
3241
|
`,
|
|
3146
|
-
|
|
3147
|
-
mutation
|
|
3148
|
-
|
|
3242
|
+
updateTransaction: (query) => `
|
|
3243
|
+
mutation updateTransaction($transactionId: String!, $transaction: TransactionInput!){
|
|
3244
|
+
updateTransaction(transactionId: $transactionId, transaction: $transaction){
|
|
3149
3245
|
${query}
|
|
3150
3246
|
}
|
|
3151
3247
|
}
|
|
3152
3248
|
`
|
|
3153
3249
|
};
|
|
3154
3250
|
|
|
3155
|
-
// src/services/
|
|
3156
|
-
var
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3251
|
+
// src/services/sales/types/transaction.type.ts
|
|
3252
|
+
var getTransactionResponse = [
|
|
3253
|
+
"transaction"
|
|
3254
|
+
];
|
|
3255
|
+
var _getTransactionResponseNestedFields = {
|
|
3256
|
+
sales: saleQuery
|
|
3257
|
+
};
|
|
3258
|
+
var getTransactionResponseNestedFields = {
|
|
3259
|
+
transaction: transactionQuery,
|
|
3260
|
+
..._getTransactionResponseNestedFields
|
|
3261
|
+
};
|
|
3262
|
+
var getTransactionsResponse = [
|
|
3263
|
+
"transactions",
|
|
3264
|
+
"uniqueProducts"
|
|
3265
|
+
];
|
|
3266
|
+
var _getTransactionsResponseNestedFields = {
|
|
3267
|
+
sales: saleQuery,
|
|
3268
|
+
uniqueProducts: productNameQuery,
|
|
3269
|
+
..._getProductResponseNestedFields
|
|
3270
|
+
};
|
|
3271
|
+
var getTransactionsResponseNestedFields = {
|
|
3272
|
+
transactions: transactionQuery,
|
|
3273
|
+
..._getTransactionsResponseNestedFields
|
|
3274
|
+
};
|
|
3275
|
+
var addTransactionResponse = getTransactionResponse;
|
|
3276
|
+
var addTransactionResponseNestedFields = getTransactionResponseNestedFields;
|
|
3277
|
+
var updateTransactionResponse = getTransactionResponse;
|
|
3278
|
+
var updateTransactionResponseNestedFields = getTransactionResponseNestedFields;
|
|
3279
|
+
|
|
3280
|
+
// src/services/sales/transaction.service.ts
|
|
3281
|
+
var createTransactionService = (client) => ({
|
|
3282
|
+
async updateTransaction(input, fetchFields, option) {
|
|
3171
3283
|
var _a, _b, _c, _d;
|
|
3172
3284
|
const res = await client.request(
|
|
3173
|
-
|
|
3285
|
+
transactionSchema.updateTransaction(
|
|
3174
3286
|
gqlQueryStringBuilder(
|
|
3175
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
3176
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
3287
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateTransactionResponse,
|
|
3288
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateTransactionResponseNestedFields
|
|
3177
3289
|
)
|
|
3178
3290
|
),
|
|
3179
3291
|
input,
|
|
3180
3292
|
option
|
|
3181
3293
|
);
|
|
3182
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
3294
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateTransaction) != null ? _d : null;
|
|
3183
3295
|
},
|
|
3184
|
-
async
|
|
3296
|
+
async addTransaction(input, fetchFields, option) {
|
|
3185
3297
|
var _a, _b, _c, _d;
|
|
3186
3298
|
const res = await client.request(
|
|
3187
|
-
|
|
3299
|
+
transactionSchema.addTransaction(
|
|
3188
3300
|
gqlQueryStringBuilder(
|
|
3189
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
3190
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
3301
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addTransactionResponse,
|
|
3302
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addTransactionResponseNestedFields
|
|
3191
3303
|
)
|
|
3192
3304
|
),
|
|
3193
3305
|
input,
|
|
3194
3306
|
option
|
|
3195
3307
|
);
|
|
3196
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
3308
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addTransaction) != null ? _d : null;
|
|
3197
3309
|
},
|
|
3198
|
-
async
|
|
3310
|
+
async getTransaction(input, fetchFields, option) {
|
|
3199
3311
|
var _a, _b, _c, _d;
|
|
3200
3312
|
const res = await client.request(
|
|
3201
|
-
|
|
3313
|
+
transactionSchema.getTransaction(
|
|
3202
3314
|
gqlQueryStringBuilder(
|
|
3203
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
3204
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
3315
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getTransactionResponse,
|
|
3316
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getTransactionResponseNestedFields
|
|
3205
3317
|
)
|
|
3206
3318
|
),
|
|
3207
3319
|
input,
|
|
3208
3320
|
option
|
|
3209
3321
|
);
|
|
3210
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
3322
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getTransaction) != null ? _d : null;
|
|
3211
3323
|
},
|
|
3212
|
-
async
|
|
3324
|
+
async getTransactions(input, fetchFields, option) {
|
|
3213
3325
|
var _a, _b, _c, _d;
|
|
3214
3326
|
const res = await client.request(
|
|
3215
|
-
|
|
3327
|
+
transactionSchema.getTransactions(
|
|
3216
3328
|
gqlQueryStringBuilder(
|
|
3217
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a :
|
|
3218
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b :
|
|
3329
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getTransactionsResponse,
|
|
3330
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getTransactionsResponseNestedFields
|
|
3219
3331
|
)
|
|
3220
3332
|
),
|
|
3221
3333
|
input,
|
|
3222
3334
|
option
|
|
3223
3335
|
);
|
|
3224
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.
|
|
3336
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getTransactions) != null ? _d : null;
|
|
3225
3337
|
}
|
|
3226
3338
|
});
|
|
3227
3339
|
|
|
3228
|
-
export { AuthenticationError, GraphQLClient, NetworkError, SdkError, SubscriptionPlanFeatureKeyLabels, UpdateSaleResponse, _getPackageResponseNestedFields, _getProductResponseNestedFields, _getSaleResponseNestedFields, _getStoreResponseNestedFields, _getSubscriptionPlanFeatureResponseNestedFields, _getSubscriptionPlanResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionPlanFeatureResponse, addSubscriptionPlanFeatureResponseNestedFields, addSubscriptionPlanResponse, addSubscriptionPlanResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createApplicationFeatureService, createAuthService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureService, createSubscriptionPlanService, createSubscriptionService, createTransactionService, createTransport, createUserAccountService, createUserNotificationService, createUserRoleService, createUserService, getCustomerProductCountsByIdsResponse, getCustomerProductCountsByIdsResponseNestedFields, getOrderResponse, getOrderResponseNestedFields, getOrdersResponse, getOrdersResponseNestedFields, getPackageResponseFields, getPackageResponseNestedFields, getPackagesResponseFields, getPackagesResponseNestedFields, getPriceResponseFields, getPriceResponseNestedFields, getPricesResponseFields, getPricesResponseNestedFields, getProductByBarcodeResponse, getProductByBarcodeResponseNestedFields, getProductResponseFields, getProductResponseNestedFields, getProductsResponseFields, getProductsResponseNestedFields, getSaleResponse, getSaleResponseNestedFields, getSalesResponse, getSalesResponseNestedFields, getStockResponse, getStockResponseNestedFields, getStocksResponse, getStocksResponseNestedFields, getStoreCategoriesResponseFields, getStoreCategoriesResponseNestedFields, getStoreCategoryProductResponseFields, getStoreCategoryProductResponseNestedFields, getStoreCategoryProductsResponseFields, getStoreCategoryProductsResponseNestedFields, getStoreCategoryResponseFields, getStoreCategoryResponseNestedFields, getStoreCountResponse, getStoreResponse, getStoreResponseNestedFields, getStoresResponse, getStoresResponseNestedFields, getSubscriptionPlanFeatureResponse, getSubscriptionPlanFeatureResponseNestedFields, getSubscriptionPlanFeaturesResponse, getSubscriptionPlanFeaturesResponseNestedFields, getSubscriptionPlanResponse, getSubscriptionPlanResponseNestedFields, getSubscriptionPlansResponse, getSubscriptionPlansResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, paystackInitializeSubscriptionResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionPlanFeatureResponse, removeSubscriptionPlanResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionPlanFeatureResponse, updateSubscriptionPlanFeatureResponseNestedFields, updateSubscriptionPlanResponse, updateSubscriptionPlanResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields };
|
|
3340
|
+
export { AuthenticationError, GraphQLClient, NetworkError, SdkError, SubscriptionPlanFeatureKeyLabels, UpdateSaleResponse, _getPackageResponseNestedFields, _getProductResponseNestedFields, _getSaleResponseNestedFields, _getStoreResponseNestedFields, _getSubscriptionPlanFeatureResponseNestedFields, _getSubscriptionPlanResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionPlanFeatureResponse, addSubscriptionPlanFeatureResponseNestedFields, addSubscriptionPlanResponse, addSubscriptionPlanResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createApplicationFeatureService, createAuthService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureBehaviourService, createSubscriptionPlanFeatureService, createSubscriptionPlanService, createSubscriptionService, createTransactionService, createTransport, createUserAccountService, createUserNotificationService, createUserRoleService, createUserService, getCustomerProductCountsByIdsResponse, getCustomerProductCountsByIdsResponseNestedFields, getOrderResponse, getOrderResponseNestedFields, getOrdersResponse, getOrdersResponseNestedFields, getPackageResponseFields, getPackageResponseNestedFields, getPackagesResponseFields, getPackagesResponseNestedFields, getPriceResponseFields, getPriceResponseNestedFields, getPricesResponseFields, getPricesResponseNestedFields, getProductByBarcodeResponse, getProductByBarcodeResponseNestedFields, getProductResponseFields, getProductResponseNestedFields, getProductsResponseFields, getProductsResponseNestedFields, getSaleResponse, getSaleResponseNestedFields, getSalesResponse, getSalesResponseNestedFields, getStockResponse, getStockResponseNestedFields, getStocksResponse, getStocksResponseNestedFields, getStoreCategoriesResponseFields, getStoreCategoriesResponseNestedFields, getStoreCategoryProductResponseFields, getStoreCategoryProductResponseNestedFields, getStoreCategoryProductsResponseFields, getStoreCategoryProductsResponseNestedFields, getStoreCategoryResponseFields, getStoreCategoryResponseNestedFields, getStoreCountResponse, getStoreResponse, getStoreResponseNestedFields, getStoresResponse, getStoresResponseNestedFields, getSubscriptionPlanFeatureResponse, getSubscriptionPlanFeatureResponseNestedFields, getSubscriptionPlanFeaturesResponse, getSubscriptionPlanFeaturesResponseNestedFields, getSubscriptionPlanResponse, getSubscriptionPlanResponseNestedFields, getSubscriptionPlansResponse, getSubscriptionPlansResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, paystackInitializeSubscriptionResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionPlanFeatureResponse, removeSubscriptionPlanResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, subscriptionPlanFeatureBehaviourDeleteIntegration, subscriptionPlanFeatureBehaviourIntegration, subscriptionPlanFeatureBehaviourListIntegration, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionPlanFeatureResponse, updateSubscriptionPlanFeatureResponseNestedFields, updateSubscriptionPlanResponse, updateSubscriptionPlanResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields };
|
|
3229
3341
|
//# sourceMappingURL=index.esm.js.map
|
|
3230
3342
|
//# sourceMappingURL=index.esm.js.map
|