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