@connect-plus-online/ogabai-integrations 0.0.69 → 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 +235 -325
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +117 -152
- package/dist/index.d.ts +117 -152
- package/dist/index.esm.js +229 -305
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -612,6 +612,17 @@ var createPaystackService = (client) => ({
|
|
|
612
612
|
});
|
|
613
613
|
|
|
614
614
|
// src/services/subscription/subscription.entity.ts
|
|
615
|
+
var subscriptionPlanFeatureDefinitionQuery = [
|
|
616
|
+
"id",
|
|
617
|
+
"title",
|
|
618
|
+
"description",
|
|
619
|
+
"subscriptionPlanFeatureKey",
|
|
620
|
+
"featureDefnitionStatus",
|
|
621
|
+
"accessDefinition",
|
|
622
|
+
"limitDefinition",
|
|
623
|
+
"behaviourDefinition",
|
|
624
|
+
"createdAt"
|
|
625
|
+
];
|
|
615
626
|
var subscriptionPlanFeatureBehaviourQuery = [
|
|
616
627
|
"id",
|
|
617
628
|
"createdAt",
|
|
@@ -638,17 +649,10 @@ var subscriptionQuery = [
|
|
|
638
649
|
"version"
|
|
639
650
|
];
|
|
640
651
|
var subscriptionPlanFeatureQuery = [
|
|
641
|
-
"id",
|
|
642
|
-
"title",
|
|
643
|
-
"description",
|
|
644
|
-
"createdAt",
|
|
645
652
|
"limitValue",
|
|
646
653
|
"accessValue",
|
|
647
654
|
"behaviourIds",
|
|
648
|
-
"subscriptionPlanFeatureKey"
|
|
649
|
-
"featureStatus",
|
|
650
|
-
"meta",
|
|
651
|
-
"planId"
|
|
655
|
+
"subscriptionPlanFeatureKey"
|
|
652
656
|
];
|
|
653
657
|
var subscriptionPlanQuery = [
|
|
654
658
|
"id",
|
|
@@ -666,57 +670,35 @@ var subscriptionPlanQuery = [
|
|
|
666
670
|
"annuallyPlanPrice"
|
|
667
671
|
];
|
|
668
672
|
|
|
669
|
-
// src/services/subscription/types/subscription-plan-feature.type.ts
|
|
670
|
-
var
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
"total"
|
|
681
|
-
];
|
|
682
|
-
var getSubscriptionPlanFeaturesResponseNestedFields = {
|
|
683
|
-
..._getSubscriptionPlanFeatureResponseNestedFields,
|
|
684
|
-
subscriptionPlanFeatures: subscriptionPlanFeatureQuery
|
|
685
|
-
};
|
|
686
|
-
var addSubscriptionPlanFeatureResponse = getSubscriptionPlanFeatureResponse;
|
|
687
|
-
var addSubscriptionPlanFeatureResponseNestedFields = getSubscriptionPlanFeatureResponseNestedFields;
|
|
688
|
-
var updateSubscriptionPlanFeatureResponse = getSubscriptionPlanFeatureResponse;
|
|
689
|
-
var updateSubscriptionPlanFeatureResponseNestedFields = getSubscriptionPlanFeatureResponseNestedFields;
|
|
690
|
-
var removeSubscriptionPlanFeatureResponse = [
|
|
691
|
-
"subscriptionPlanFeatureId"
|
|
692
|
-
];
|
|
673
|
+
// src/services/subscription/types/subscription-plan-feature-definition.type.ts
|
|
674
|
+
var ENTITY2 = "subscriptionPlanFeatureDefinition";
|
|
675
|
+
var subscriptionPlanFeatureDefinitionIntegration = createStandardEntityIntegration({
|
|
676
|
+
key: ENTITY2,
|
|
677
|
+
fields: subscriptionPlanFeatureDefinitionQuery
|
|
678
|
+
});
|
|
679
|
+
var subscriptionPlanFeatureDefinitionListIntegration = createListIntegration({
|
|
680
|
+
key: "subscriptionPlanFeatureDefinitions",
|
|
681
|
+
fields: subscriptionPlanFeatureDefinitionQuery
|
|
682
|
+
});
|
|
683
|
+
var subscriptionPlanFeatureDefinitionDeleteIntegration = createDeleteIntegration(ENTITY2);
|
|
693
684
|
|
|
694
685
|
// src/services/subscription/types/subscription-plan.type.ts
|
|
695
|
-
var
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
subscriptionPlans: subscriptionPlanQuery
|
|
712
|
-
};
|
|
713
|
-
var addSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
714
|
-
var addSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
715
|
-
var updateSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
716
|
-
var updateSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
717
|
-
var removeSubscriptionPlanResponse = [
|
|
718
|
-
"subscriptionPlanId"
|
|
719
|
-
];
|
|
686
|
+
var ENTITY3 = "subscriptionPlan";
|
|
687
|
+
var subscriptionPlanIntegration = createStandardEntityIntegration({
|
|
688
|
+
key: ENTITY3,
|
|
689
|
+
fields: subscriptionPlanQuery,
|
|
690
|
+
nested: {
|
|
691
|
+
features: subscriptionPlanFeatureQuery
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
var subscriptionPlanListIntegration = createListIntegration({
|
|
695
|
+
key: "subscriptionPlans",
|
|
696
|
+
fields: subscriptionPlanQuery,
|
|
697
|
+
nested: {
|
|
698
|
+
features: subscriptionPlanFeatureQuery
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
var subscriptionPlanDeleteIntegration = createDeleteIntegration(ENTITY3);
|
|
720
702
|
|
|
721
703
|
// src/services/subscription/types/subscription.type.ts
|
|
722
704
|
var getSubscriptionResponse = [
|
|
@@ -744,239 +726,216 @@ var removeSubscriptionResponse = [
|
|
|
744
726
|
];
|
|
745
727
|
|
|
746
728
|
// src/services/subscription/types/subscription-plan-feature-behaviour.type.ts
|
|
747
|
-
var
|
|
729
|
+
var ENTITY4 = "subscriptionPlanFeatureBehaviour";
|
|
748
730
|
var subscriptionPlanFeatureBehaviourIntegration = createStandardEntityIntegration({
|
|
749
|
-
key:
|
|
731
|
+
key: ENTITY4,
|
|
750
732
|
fields: subscriptionPlanFeatureBehaviourQuery
|
|
751
733
|
});
|
|
752
734
|
var subscriptionPlanFeatureBehaviourListIntegration = createListIntegration({
|
|
753
735
|
key: "subscriptionPlanFeatureBehaviours",
|
|
754
736
|
fields: subscriptionPlanFeatureBehaviourQuery
|
|
755
737
|
});
|
|
756
|
-
var subscriptionPlanFeatureBehaviourDeleteIntegration = createDeleteIntegration(
|
|
738
|
+
var subscriptionPlanFeatureBehaviourDeleteIntegration = createDeleteIntegration(ENTITY4);
|
|
757
739
|
|
|
758
|
-
// src/
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
query getSubscriptionPlanFeature($subscriptionPlanFeature: SubscriptionPlanFeatureInput!) {
|
|
762
|
-
getSubscriptionPlanFeature(subscriptionPlanFeature: $subscriptionPlanFeature) {
|
|
763
|
-
${query}
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
`,
|
|
767
|
-
getSubscriptionPlanFeatures: (query) => `
|
|
768
|
-
query getSubscriptionPlanFeatures($search: String, $subscriptionPlanFeatureIds: [String], $subscriptionPlanFeature: SubscriptionPlanFeatureInput, $limit: Int!, $skip: Int!) {
|
|
769
|
-
getSubscriptionPlanFeatures(search: $search, subscriptionPlanFeatureIds: $subscriptionPlanFeatureIds, subscriptionPlanFeature: $subscriptionPlanFeature, limit: $limit, skip: $skip) {
|
|
770
|
-
${query}
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
`,
|
|
774
|
-
addSubscriptionPlanFeature: (query) => `
|
|
775
|
-
mutation addSubscriptionPlanFeature($subscriptionPlanFeature: SubscriptionPlanFeatureInput!) {
|
|
776
|
-
addSubscriptionPlanFeature(subscriptionPlanFeature: $subscriptionPlanFeature) {
|
|
777
|
-
${query}
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
`,
|
|
781
|
-
updateSubscriptionPlanFeature: (query) => `
|
|
782
|
-
mutation updateSubscriptionPlanFeature($subscriptionPlanFeatureId: String!, $subscriptionPlanFeature: SubscriptionPlanFeatureInput!) {
|
|
783
|
-
updateSubscriptionPlanFeature(subscriptionPlanFeatureId: $subcriptionPlanFeatureId, subscriptionPlanFeature: $subscriptionPlanFeature) {
|
|
784
|
-
${query}
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
`,
|
|
788
|
-
removeSubscriptionPlanFeature: (query) => `
|
|
789
|
-
mutation removeSubscriptionPlanFeature($subscriptionPlanFeatureId: String!) {
|
|
790
|
-
removeSubscriptionPlanFeature(subscriptionPlanFeatureId: $subcriptionPlanFeatureId) {
|
|
791
|
-
${query}
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
`
|
|
795
|
-
};
|
|
796
|
-
|
|
797
|
-
// src/services/subscription/subscription-plan-feature.service.ts
|
|
798
|
-
var createSubscriptionPlanFeatureService = (client) => ({
|
|
799
|
-
async removeSubscriptionPlanFeature(input, fetchFields, option) {
|
|
740
|
+
// src/helpers/service.factory.ts
|
|
741
|
+
function createOperationExecutor(client, key, config) {
|
|
742
|
+
return async (input, fetchFields, option) => {
|
|
800
743
|
var _a, _b, _c;
|
|
801
|
-
const
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
),
|
|
807
|
-
input,
|
|
808
|
-
option
|
|
744
|
+
const query = config.schema(
|
|
745
|
+
gqlQueryStringBuilder(
|
|
746
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : config.defaultRootFields,
|
|
747
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : config.defaultNestedFields
|
|
748
|
+
)
|
|
809
749
|
);
|
|
810
|
-
return (_c = (_b = res.data) == null ? void 0 : _b.removeSubscriptionPlanFeature) != null ? _c : null;
|
|
811
|
-
},
|
|
812
|
-
async updateSubscriptionPlanFeature(input, fetchFields, option) {
|
|
813
|
-
var _a, _b, _c, _d;
|
|
814
750
|
const res = await client.request(
|
|
815
|
-
|
|
816
|
-
gqlQueryStringBuilder(
|
|
817
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateSubscriptionPlanFeatureResponse,
|
|
818
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateSubscriptionPlanFeatureResponseNestedFields
|
|
819
|
-
)
|
|
820
|
-
),
|
|
751
|
+
query,
|
|
821
752
|
input,
|
|
822
753
|
option
|
|
823
754
|
);
|
|
824
|
-
return (
|
|
755
|
+
return (_c = res.data) == null ? void 0 : _c[key];
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
// src/helpers/schema-builder.ts
|
|
760
|
+
function buildSchema({
|
|
761
|
+
operation,
|
|
762
|
+
name,
|
|
763
|
+
variables,
|
|
764
|
+
field
|
|
765
|
+
}) {
|
|
766
|
+
return (selection) => `
|
|
767
|
+
${operation} ${name}${variables} {
|
|
768
|
+
${name}${field} {
|
|
769
|
+
${selection}
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
`.trim();
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
// src/services/subscription/schemas/subscription-plan-feature-definition.schema.ts
|
|
776
|
+
var subscriptionPlanFeatureDefinitionSchema = {
|
|
777
|
+
get: {
|
|
778
|
+
operation: "query",
|
|
779
|
+
name: "getSubscriptionPlanFeatureDefinition",
|
|
780
|
+
variables: "($subscriptionPlanFeatureDefinition: SubscriptionPlanFeatureDefinitionInput!)",
|
|
781
|
+
field: "(subscriptionPlanFeatureDefinition: $subscriptionPlanFeatureDefinition)"
|
|
825
782
|
},
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addSubscriptionPlanFeatureResponse,
|
|
832
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addSubscriptionPlanFeatureResponseNestedFields
|
|
833
|
-
)
|
|
834
|
-
),
|
|
835
|
-
input,
|
|
836
|
-
option
|
|
837
|
-
);
|
|
838
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.addSubscriptionPlanFeature) != null ? _d : null;
|
|
783
|
+
list: {
|
|
784
|
+
operation: "query",
|
|
785
|
+
name: "getSubscriptionPlanFeatureDefinitions",
|
|
786
|
+
variables: "($limit: Int!, $skip: Int!, $search: String, $subscriptionPlanFeatureDefinition: SubscriptionPlanFeatureDefinitionInput, $subscriptionPlanFeatureDefinitionIds: [String])",
|
|
787
|
+
field: "(limit: $limit, skip: $skip, search: $search, subscriptionPlanFeatureDefinition: $subscriptionPlanFeatureDefinition, subscriptionPlanFeatureDefinitionIds: $subscriptionPlanFeatureDefinitionIds)"
|
|
839
788
|
},
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlanFeatureResponse,
|
|
846
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlanFeatureResponseNestedFields
|
|
847
|
-
)
|
|
848
|
-
),
|
|
849
|
-
input,
|
|
850
|
-
option
|
|
851
|
-
);
|
|
852
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlanFeature) != null ? _d : null;
|
|
789
|
+
create: {
|
|
790
|
+
operation: "mutation",
|
|
791
|
+
name: "createSubscriptionPlanFeatureDefinition",
|
|
792
|
+
variables: "($subscriptionPlanFeatureDefinition: SubscriptionPlanFeatureDefinitionInput!)",
|
|
793
|
+
field: "(subscriptionPlanFeatureDefinition: $subscriptionPlanFeatureDefinition)"
|
|
853
794
|
},
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
);
|
|
866
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlanFeatures) != null ? _d : null;
|
|
795
|
+
update: {
|
|
796
|
+
operation: "mutation",
|
|
797
|
+
name: "updateSubscriptionPlanFeatureDefinition",
|
|
798
|
+
variables: "($subscriptionPlanFeatureDefinitionId: String!, $subscriptionPlanFeatureDefinition: SubscriptionPlanFeatureDefinitionInput!)",
|
|
799
|
+
field: "(subscriptionPlanFeatureDefinitionId: $subscriptionPlanFeatureDefinitionId, subscriptionPlanFeatureDefinition: $subscriptionPlanFeatureDefinition)"
|
|
800
|
+
},
|
|
801
|
+
delete: {
|
|
802
|
+
operation: "mutation",
|
|
803
|
+
name: "removeSubscriptionPlanFeatureDefinition",
|
|
804
|
+
variables: "($subscriptionPlanFeatureDefinitionId: String!)",
|
|
805
|
+
field: "(subscriptionPlanFeatureDefinitionId: $subscriptionPlanFeatureDefinitionId)"
|
|
867
806
|
}
|
|
807
|
+
};
|
|
808
|
+
|
|
809
|
+
// src/services/subscription/subscription-plan-feature-definition.service.ts
|
|
810
|
+
var createSubscriptionPlanFeatureDefinitionService = (client) => ({
|
|
811
|
+
createSubscriptionPlanFeatureDefinition: createOperationExecutor(
|
|
812
|
+
client,
|
|
813
|
+
"createSubscriptionPlanFeatureDefinition",
|
|
814
|
+
{
|
|
815
|
+
schema: buildSchema(subscriptionPlanFeatureDefinitionSchema.create),
|
|
816
|
+
defaultRootFields: subscriptionPlanFeatureDefinitionIntegration.create.responseFields,
|
|
817
|
+
defaultNestedFields: subscriptionPlanFeatureDefinitionIntegration.create.nestedFields
|
|
818
|
+
}
|
|
819
|
+
),
|
|
820
|
+
updateSubscriptionPlanFeatureDefinition: createOperationExecutor(
|
|
821
|
+
client,
|
|
822
|
+
"updateSubscriptionPlanFeatureDefinition",
|
|
823
|
+
{
|
|
824
|
+
schema: buildSchema(subscriptionPlanFeatureDefinitionSchema.update),
|
|
825
|
+
defaultRootFields: subscriptionPlanFeatureDefinitionIntegration.update.responseFields,
|
|
826
|
+
defaultNestedFields: subscriptionPlanFeatureDefinitionIntegration.update.nestedFields
|
|
827
|
+
}
|
|
828
|
+
),
|
|
829
|
+
getSubscriptionPlanFeatureDefinition: createOperationExecutor(
|
|
830
|
+
client,
|
|
831
|
+
"getSubscriptionPlanFeatureDefinition",
|
|
832
|
+
{
|
|
833
|
+
schema: buildSchema(subscriptionPlanFeatureDefinitionSchema.get),
|
|
834
|
+
defaultRootFields: subscriptionPlanFeatureDefinitionIntegration.get.responseFields,
|
|
835
|
+
defaultNestedFields: subscriptionPlanFeatureDefinitionIntegration.get.nestedFields
|
|
836
|
+
}
|
|
837
|
+
),
|
|
838
|
+
removeSubscriptionPlanFeatureDefinition: createOperationExecutor(
|
|
839
|
+
client,
|
|
840
|
+
"removeSubscriptionPlanFeatureDefinition",
|
|
841
|
+
{
|
|
842
|
+
schema: buildSchema(subscriptionPlanFeatureDefinitionSchema.delete),
|
|
843
|
+
defaultRootFields: subscriptionPlanFeatureDefinitionDeleteIntegration.responseFields,
|
|
844
|
+
defaultNestedFields: {}
|
|
845
|
+
}
|
|
846
|
+
),
|
|
847
|
+
getSubscriptionPlanFeatureDefinitions: createOperationExecutor(
|
|
848
|
+
client,
|
|
849
|
+
"getSubscriptionPlanFeatureDefinitions",
|
|
850
|
+
{
|
|
851
|
+
schema: buildSchema(subscriptionPlanFeatureDefinitionSchema.list),
|
|
852
|
+
defaultRootFields: [...subscriptionPlanFeatureDefinitionListIntegration.responseFields],
|
|
853
|
+
defaultNestedFields: subscriptionPlanFeatureDefinitionListIntegration.nestedFields
|
|
854
|
+
}
|
|
855
|
+
)
|
|
868
856
|
});
|
|
869
857
|
|
|
870
858
|
// src/services/subscription/schemas/subscription-plan.schema.ts
|
|
871
859
|
var subscriptionPlanSchema = {
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
}
|
|
878
|
-
`,
|
|
879
|
-
getSubscriptionPlans: (query) => `
|
|
880
|
-
query getSubscriptionPlans($search: String, $subscriptionPlanIds: [String], $subscriptionPlan: SubscriptionPlanInput, $limit: Int!, $skip: Int!) {
|
|
881
|
-
getSubscriptionPlans(search: $search, subscriptionPlanIds: $subscriptionPlanIds, subscriptionPlan: $subscriptionPlan, limit: $limit, skip: $skip) {
|
|
882
|
-
${query}
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
`,
|
|
886
|
-
addSubscriptionPlan: (query) => `
|
|
887
|
-
mutation addSubscriptionPlan($subscriptionPlan: SubscriptionPlanInput!) {
|
|
888
|
-
addSubscriptionPlan(subscriptionPlan: $subscriptionPlan) {
|
|
889
|
-
${query}
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
`,
|
|
893
|
-
updateSubscriptionPlan: (query) => `
|
|
894
|
-
mutation updateSubscriptionPlan($subscriptionPlanId: String!, $subscriptionPlan: SubscriptionPlanInput!) {
|
|
895
|
-
updateSubscriptionPlan(subscriptionPlanId: $subscriptionPlanId, subscriptionPlan: $subscriptionPlan) {
|
|
896
|
-
${query}
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
`,
|
|
900
|
-
removeSubscriptionPlan: (query) => `
|
|
901
|
-
mutation removeSubscriptionPlan($subscriptionPlanId: String!) {
|
|
902
|
-
removeSubscriptionPlan(subscriptionPlanId: $subscriptionPlanId) {
|
|
903
|
-
${query}
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
`
|
|
907
|
-
};
|
|
908
|
-
|
|
909
|
-
// src/services/subscription/subscription-plan.service.ts
|
|
910
|
-
var createSubscriptionPlanService = (client) => ({
|
|
911
|
-
async removeSubscriptionPlan(input, fetchFields, option) {
|
|
912
|
-
var _a, _b, _c;
|
|
913
|
-
const res = await client.request(
|
|
914
|
-
subscriptionPlanSchema.removeSubscriptionPlan(
|
|
915
|
-
gqlQueryStringBuilder(
|
|
916
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeSubscriptionPlanResponse
|
|
917
|
-
)
|
|
918
|
-
),
|
|
919
|
-
input,
|
|
920
|
-
option
|
|
921
|
-
);
|
|
922
|
-
return (_c = (_b = res.data) == null ? void 0 : _b.removeSubscriptionPlan) != null ? _c : null;
|
|
860
|
+
get: {
|
|
861
|
+
operation: "query",
|
|
862
|
+
name: "getSubscriptionPlan",
|
|
863
|
+
variables: "($subscriptionPlan: SubscriptionPlanInput!)",
|
|
864
|
+
field: "(subscriptionPlan: $subscriptionPlan)"
|
|
923
865
|
},
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateSubscriptionPlanResponse,
|
|
930
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateSubscriptionPlanResponseNestedFields
|
|
931
|
-
)
|
|
932
|
-
),
|
|
933
|
-
input,
|
|
934
|
-
option
|
|
935
|
-
);
|
|
936
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.updateSubscriptionPlan) != null ? _d : null;
|
|
866
|
+
list: {
|
|
867
|
+
operation: "query",
|
|
868
|
+
name: "getSubscriptionPlans",
|
|
869
|
+
variables: "($limit: Int!, $skip: Int!, $search: String, $subscriptionPlan: SubscriptionPlanInput, $subscriptionPlanIds: [String])",
|
|
870
|
+
field: "(limit: $limit, skip: $skip, search: $search, subscriptionPlan: $subscriptionPlan, subscriptionPlanIds: $subscriptionPlanIds)"
|
|
937
871
|
},
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addSubscriptionPlanResponse,
|
|
944
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addSubscriptionPlanResponseNestedFields
|
|
945
|
-
)
|
|
946
|
-
),
|
|
947
|
-
input,
|
|
948
|
-
option
|
|
949
|
-
);
|
|
950
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.addSubscriptionPlan) != null ? _d : null;
|
|
872
|
+
create: {
|
|
873
|
+
operation: "mutation",
|
|
874
|
+
name: "createSubscriptionPlan",
|
|
875
|
+
variables: "($subscriptionPlan: SubscriptionPlanInput!)",
|
|
876
|
+
field: "(subscriptionPlan: $subscriptionPlan)"
|
|
951
877
|
},
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlanResponse,
|
|
958
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlanResponseNestedFields
|
|
959
|
-
)
|
|
960
|
-
),
|
|
961
|
-
input,
|
|
962
|
-
option
|
|
963
|
-
);
|
|
964
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlan) != null ? _d : null;
|
|
878
|
+
update: {
|
|
879
|
+
operation: "mutation",
|
|
880
|
+
name: "updateSubscriptionPlan",
|
|
881
|
+
variables: "($subscriptionPlanId: String!, $subscriptionPlan: SubscriptionPlanInput!)",
|
|
882
|
+
field: "(subscriptionPlanId: $subscriptionPlanId, subscriptionPlan: $subscriptionPlan)"
|
|
965
883
|
},
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlansResponse,
|
|
972
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlansResponseNestedFields
|
|
973
|
-
)
|
|
974
|
-
),
|
|
975
|
-
input,
|
|
976
|
-
option
|
|
977
|
-
);
|
|
978
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlans) != null ? _d : null;
|
|
884
|
+
delete: {
|
|
885
|
+
operation: "mutation",
|
|
886
|
+
name: "removeSubscriptionPlan",
|
|
887
|
+
variables: "($subscriptionPlanId: String!)",
|
|
888
|
+
field: "(subscriptionPlanId: $subscriptionPlanId)"
|
|
979
889
|
}
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
// src/services/subscription/subscription-plan.service.ts
|
|
893
|
+
var createSubscriptionPlanService = (client) => ({
|
|
894
|
+
createSubscriptionPlan: createOperationExecutor(
|
|
895
|
+
client,
|
|
896
|
+
"createSubscriptionPlan",
|
|
897
|
+
{
|
|
898
|
+
schema: buildSchema(subscriptionPlanSchema.create),
|
|
899
|
+
defaultRootFields: subscriptionPlanIntegration.create.responseFields,
|
|
900
|
+
defaultNestedFields: subscriptionPlanIntegration.create.nestedFields
|
|
901
|
+
}
|
|
902
|
+
),
|
|
903
|
+
updateSubscriptionPlan: createOperationExecutor(
|
|
904
|
+
client,
|
|
905
|
+
"updateSubscriptionPlan",
|
|
906
|
+
{
|
|
907
|
+
schema: buildSchema(subscriptionPlanSchema.update),
|
|
908
|
+
defaultRootFields: subscriptionPlanIntegration.update.responseFields,
|
|
909
|
+
defaultNestedFields: subscriptionPlanIntegration.update.nestedFields
|
|
910
|
+
}
|
|
911
|
+
),
|
|
912
|
+
getSubscriptionPlan: createOperationExecutor(
|
|
913
|
+
client,
|
|
914
|
+
"getSubscriptionPlan",
|
|
915
|
+
{
|
|
916
|
+
schema: buildSchema(subscriptionPlanSchema.get),
|
|
917
|
+
defaultRootFields: subscriptionPlanIntegration.get.responseFields,
|
|
918
|
+
defaultNestedFields: subscriptionPlanIntegration.get.nestedFields
|
|
919
|
+
}
|
|
920
|
+
),
|
|
921
|
+
removeSubscriptionPlan: createOperationExecutor(
|
|
922
|
+
client,
|
|
923
|
+
"removeSubscriptionPlan",
|
|
924
|
+
{
|
|
925
|
+
schema: buildSchema(subscriptionPlanSchema.delete),
|
|
926
|
+
defaultRootFields: subscriptionPlanDeleteIntegration.responseFields,
|
|
927
|
+
defaultNestedFields: {}
|
|
928
|
+
}
|
|
929
|
+
),
|
|
930
|
+
getSubscriptionPlans: createOperationExecutor(
|
|
931
|
+
client,
|
|
932
|
+
"getSubscriptionPlans",
|
|
933
|
+
{
|
|
934
|
+
schema: buildSchema(subscriptionPlanSchema.list),
|
|
935
|
+
defaultRootFields: [...subscriptionPlanListIntegration.responseFields],
|
|
936
|
+
defaultNestedFields: subscriptionPlanListIntegration.nestedFields
|
|
937
|
+
}
|
|
938
|
+
)
|
|
980
939
|
});
|
|
981
940
|
|
|
982
941
|
// src/services/subscription/schemas/subscription.schema.ts
|
|
@@ -1091,41 +1050,6 @@ var createSubscriptionService = (client) => ({
|
|
|
1091
1050
|
}
|
|
1092
1051
|
});
|
|
1093
1052
|
|
|
1094
|
-
// src/helpers/service.factory.ts
|
|
1095
|
-
function createOperationExecutor(client, key, config) {
|
|
1096
|
-
return async (input, fetchFields, option) => {
|
|
1097
|
-
var _a, _b, _c;
|
|
1098
|
-
const query = config.schema(
|
|
1099
|
-
gqlQueryStringBuilder(
|
|
1100
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : config.defaultRootFields,
|
|
1101
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : config.defaultNestedFields
|
|
1102
|
-
)
|
|
1103
|
-
);
|
|
1104
|
-
const res = await client.request(
|
|
1105
|
-
query,
|
|
1106
|
-
input,
|
|
1107
|
-
option
|
|
1108
|
-
);
|
|
1109
|
-
return (_c = res.data) == null ? void 0 : _c[key];
|
|
1110
|
-
};
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
// src/helpers/schema-builder.ts
|
|
1114
|
-
function buildSchema({
|
|
1115
|
-
operation,
|
|
1116
|
-
name,
|
|
1117
|
-
variables,
|
|
1118
|
-
field
|
|
1119
|
-
}) {
|
|
1120
|
-
return (selection) => `
|
|
1121
|
-
${operation} ${name}${variables} {
|
|
1122
|
-
${name}${field} {
|
|
1123
|
-
${selection}
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
`.trim();
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
1053
|
// src/services/subscription/schemas/subscription-plan-feature-behaviour.ts
|
|
1130
1054
|
var subscriptionPlanFeatureBehaviourSchema = {
|
|
1131
1055
|
get: {
|
|
@@ -1710,9 +1634,9 @@ var createUserAccountService = (client) => ({
|
|
|
1710
1634
|
});
|
|
1711
1635
|
|
|
1712
1636
|
// src/services/user/types/user-role.type.ts
|
|
1713
|
-
var
|
|
1637
|
+
var ENTITY5 = "userRole";
|
|
1714
1638
|
var userRoleIntegration = createStandardEntityIntegration({
|
|
1715
|
-
key:
|
|
1639
|
+
key: ENTITY5,
|
|
1716
1640
|
fields: userRoleQuery,
|
|
1717
1641
|
nested: {
|
|
1718
1642
|
privileges: privilegeQuery
|
|
@@ -1725,7 +1649,7 @@ var userRoleListIntegration = createListIntegration({
|
|
|
1725
1649
|
privileges: privilegeQuery
|
|
1726
1650
|
}
|
|
1727
1651
|
});
|
|
1728
|
-
var userRoleDeleteIntegration = createDeleteIntegration(
|
|
1652
|
+
var userRoleDeleteIntegration = createDeleteIntegration(ENTITY5);
|
|
1729
1653
|
|
|
1730
1654
|
// src/services/user/schemas/user-role.schema.ts
|
|
1731
1655
|
var userRoleSchema = {
|
|
@@ -1811,16 +1735,16 @@ var createUserRoleService = (client) => ({
|
|
|
1811
1735
|
});
|
|
1812
1736
|
|
|
1813
1737
|
// src/services/user/types/application-feature.type.ts
|
|
1814
|
-
var
|
|
1738
|
+
var ENTITY6 = "applicationFeature";
|
|
1815
1739
|
var applicationFeatureIntegration = createStandardEntityIntegration({
|
|
1816
|
-
key:
|
|
1740
|
+
key: ENTITY6,
|
|
1817
1741
|
fields: applicationFeatureQuery
|
|
1818
1742
|
});
|
|
1819
1743
|
var applicationFeatureListIntegration = createListIntegration({
|
|
1820
1744
|
key: "applicationFeatures",
|
|
1821
1745
|
fields: applicationFeatureQuery
|
|
1822
1746
|
});
|
|
1823
|
-
var applicationFeatureDeleteIntegration = createDeleteIntegration(
|
|
1747
|
+
var applicationFeatureDeleteIntegration = createDeleteIntegration(ENTITY6);
|
|
1824
1748
|
|
|
1825
1749
|
// src/services/user/schemas/application-feature.schema.ts
|
|
1826
1750
|
var applicationFeatureSchema = {
|
|
@@ -3337,6 +3261,6 @@ var createTransactionService = (client) => ({
|
|
|
3337
3261
|
}
|
|
3338
3262
|
});
|
|
3339
3263
|
|
|
3340
|
-
export { AuthenticationError, GraphQLClient, NetworkError, SdkError, SubscriptionPlanFeatureKeyLabels, UpdateSaleResponse, _getPackageResponseNestedFields, _getProductResponseNestedFields, _getSaleResponseNestedFields, _getStoreResponseNestedFields,
|
|
3264
|
+
export { AuthenticationError, GraphQLClient, NetworkError, SdkError, SubscriptionPlanFeatureKeyLabels, UpdateSaleResponse, _getPackageResponseNestedFields, _getProductResponseNestedFields, _getSaleResponseNestedFields, _getStoreResponseNestedFields, _getSubscriptionResponseNestedFields, _getTransactionResponseNestedFields, _getTransactionsResponseNestedFields, addPackageResponseFields, addPackageResponseNestedFields, addPackagesResponseFields, addPackagesResponseNestedFields, addPriceResponseFields, addPriceResponseNestedFields, addProductResponseFields, addProductResponseNestedFields, addStockResponse, addStockResponseNestedFields, addStoreResponse, addStoreResponseNestedFields, addSubscriptionResponse, addSubscriptionResponseNestedFields, addTransactionResponse, addTransactionResponseNestedFields, compose, createApplicationFeatureService, createAuthService, createOrderService, createPackageService, createPaystackService, createPriceService, createProductService, createSaleService, createStockService, createStoreCategoryProductResponseFields, createStoreCategoryProductResponseNestedFields, createStoreCategoryProductService, createStoreCategoryResponseFields, createStoreCategoryResponseNestedFields, createStoreCategoryService, createStoreService, createSubscriptionPlanFeatureBehaviourService, createSubscriptionPlanFeatureDefinitionService, createSubscriptionPlanService, createSubscriptionService, createTransactionService, createTransport, createUserAccountService, createUserNotificationService, createUserRoleService, createUserService, getCustomerProductCountsByIdsResponse, getCustomerProductCountsByIdsResponseNestedFields, getOrderResponse, getOrderResponseNestedFields, getOrdersResponse, getOrdersResponseNestedFields, getPackageResponseFields, getPackageResponseNestedFields, getPackagesResponseFields, getPackagesResponseNestedFields, getPriceResponseFields, getPriceResponseNestedFields, getPricesResponseFields, getPricesResponseNestedFields, getProductByBarcodeResponse, getProductByBarcodeResponseNestedFields, getProductResponseFields, getProductResponseNestedFields, getProductsResponseFields, getProductsResponseNestedFields, getSaleResponse, getSaleResponseNestedFields, getSalesResponse, getSalesResponseNestedFields, getStockResponse, getStockResponseNestedFields, getStocksResponse, getStocksResponseNestedFields, getStoreCategoriesResponseFields, getStoreCategoriesResponseNestedFields, getStoreCategoryProductResponseFields, getStoreCategoryProductResponseNestedFields, getStoreCategoryProductsResponseFields, getStoreCategoryProductsResponseNestedFields, getStoreCategoryResponseFields, getStoreCategoryResponseNestedFields, getStoreCountResponse, getStoreResponse, getStoreResponseNestedFields, getStoresResponse, getStoresResponseNestedFields, getSubscriptionResponse, getSubscriptionResponseNestedFields, getSubscriptionsResponse, getSubscriptionsResponseNestedFields, getTransactionResponse, getTransactionResponseNestedFields, getTransactionsResponse, getTransactionsResponseNestedFields, orderQuery, paystackInitializePaymentResponse, paystackInitializeSubscriptionResponse, removePackageResponseFields, removePriceResponseFields, removeProductResponseFields, removeStockResponse, removeStoreCategoryProductResponseFields, removeStoreCategoryResponseFields, removeStoreResponse, removeSubscriptionResponse, saleQuery, searchCategoriesAndTemplateResponse, searchCategoriesAndTemplateResponseNestedFields, searchProductNamesResponse, searchProductNamesResponseNestedFields, subscriptionPlanDeleteIntegration, subscriptionPlanFeatureBehaviourDeleteIntegration, subscriptionPlanFeatureBehaviourIntegration, subscriptionPlanFeatureBehaviourListIntegration, subscriptionPlanFeatureDefinitionDeleteIntegration, subscriptionPlanFeatureDefinitionIntegration, subscriptionPlanFeatureDefinitionListIntegration, subscriptionPlanIntegration, subscriptionPlanListIntegration, toAsyncHeadersFactory, toAsyncTokenProvider, transactionQuery, updatePackageResponseFields, updatePackageResponseNestedFields, updatePriceResponseFields, updatePriceResponseNestedFields, updateProductResponseFields, updateProductResponseNestedFields, updateSaleResponseNestedFields, updateStockResponse, updateStockResponseNestedFields, updateStoreCategoryProductResponseFields, updateStoreCategoryProductResponseNestedFields, updateStoreCategoryResponseFields, updateStoreCategoryResponseNestedFields, updateStoreResponse, updateStoreResponseNestedFields, updateSubscriptionResponse, updateSubscriptionResponseNestedFields, updateTransactionResponse, updateTransactionResponseNestedFields };
|
|
3341
3265
|
//# sourceMappingURL=index.esm.js.map
|
|
3342
3266
|
//# sourceMappingURL=index.esm.js.map
|