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