@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.cjs.js
CHANGED
|
@@ -614,6 +614,17 @@ var createPaystackService = (client) => ({
|
|
|
614
614
|
});
|
|
615
615
|
|
|
616
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"
|
|
627
|
+
];
|
|
617
628
|
var subscriptionPlanFeatureBehaviourQuery = [
|
|
618
629
|
"id",
|
|
619
630
|
"createdAt",
|
|
@@ -640,17 +651,10 @@ var subscriptionQuery = [
|
|
|
640
651
|
"version"
|
|
641
652
|
];
|
|
642
653
|
var subscriptionPlanFeatureQuery = [
|
|
643
|
-
"id",
|
|
644
|
-
"title",
|
|
645
|
-
"description",
|
|
646
|
-
"createdAt",
|
|
647
654
|
"limitValue",
|
|
648
655
|
"accessValue",
|
|
649
656
|
"behaviourIds",
|
|
650
|
-
"subscriptionPlanFeatureKey"
|
|
651
|
-
"featureStatus",
|
|
652
|
-
"meta",
|
|
653
|
-
"planId"
|
|
657
|
+
"subscriptionPlanFeatureKey"
|
|
654
658
|
];
|
|
655
659
|
var subscriptionPlanQuery = [
|
|
656
660
|
"id",
|
|
@@ -668,57 +672,35 @@ var subscriptionPlanQuery = [
|
|
|
668
672
|
"annuallyPlanPrice"
|
|
669
673
|
];
|
|
670
674
|
|
|
671
|
-
// src/services/subscription/types/subscription-plan-feature.type.ts
|
|
672
|
-
var
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
"total"
|
|
683
|
-
];
|
|
684
|
-
var getSubscriptionPlanFeaturesResponseNestedFields = {
|
|
685
|
-
..._getSubscriptionPlanFeatureResponseNestedFields,
|
|
686
|
-
subscriptionPlanFeatures: subscriptionPlanFeatureQuery
|
|
687
|
-
};
|
|
688
|
-
var addSubscriptionPlanFeatureResponse = getSubscriptionPlanFeatureResponse;
|
|
689
|
-
var addSubscriptionPlanFeatureResponseNestedFields = getSubscriptionPlanFeatureResponseNestedFields;
|
|
690
|
-
var updateSubscriptionPlanFeatureResponse = getSubscriptionPlanFeatureResponse;
|
|
691
|
-
var updateSubscriptionPlanFeatureResponseNestedFields = getSubscriptionPlanFeatureResponseNestedFields;
|
|
692
|
-
var removeSubscriptionPlanFeatureResponse = [
|
|
693
|
-
"subscriptionPlanFeatureId"
|
|
694
|
-
];
|
|
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);
|
|
695
686
|
|
|
696
687
|
// src/services/subscription/types/subscription-plan.type.ts
|
|
697
|
-
var
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
subscriptionPlans: subscriptionPlanQuery
|
|
714
|
-
};
|
|
715
|
-
var addSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
716
|
-
var addSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
717
|
-
var updateSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
718
|
-
var updateSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
719
|
-
var removeSubscriptionPlanResponse = [
|
|
720
|
-
"subscriptionPlanId"
|
|
721
|
-
];
|
|
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);
|
|
722
704
|
|
|
723
705
|
// src/services/subscription/types/subscription.type.ts
|
|
724
706
|
var getSubscriptionResponse = [
|
|
@@ -746,239 +728,216 @@ var removeSubscriptionResponse = [
|
|
|
746
728
|
];
|
|
747
729
|
|
|
748
730
|
// src/services/subscription/types/subscription-plan-feature-behaviour.type.ts
|
|
749
|
-
var
|
|
731
|
+
var ENTITY4 = "subscriptionPlanFeatureBehaviour";
|
|
750
732
|
var subscriptionPlanFeatureBehaviourIntegration = createStandardEntityIntegration({
|
|
751
|
-
key:
|
|
733
|
+
key: ENTITY4,
|
|
752
734
|
fields: subscriptionPlanFeatureBehaviourQuery
|
|
753
735
|
});
|
|
754
736
|
var subscriptionPlanFeatureBehaviourListIntegration = createListIntegration({
|
|
755
737
|
key: "subscriptionPlanFeatureBehaviours",
|
|
756
738
|
fields: subscriptionPlanFeatureBehaviourQuery
|
|
757
739
|
});
|
|
758
|
-
var subscriptionPlanFeatureBehaviourDeleteIntegration = createDeleteIntegration(
|
|
740
|
+
var subscriptionPlanFeatureBehaviourDeleteIntegration = createDeleteIntegration(ENTITY4);
|
|
759
741
|
|
|
760
|
-
// src/
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
query getSubscriptionPlanFeature($subscriptionPlanFeature: SubscriptionPlanFeatureInput!) {
|
|
764
|
-
getSubscriptionPlanFeature(subscriptionPlanFeature: $subscriptionPlanFeature) {
|
|
765
|
-
${query}
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
`,
|
|
769
|
-
getSubscriptionPlanFeatures: (query) => `
|
|
770
|
-
query getSubscriptionPlanFeatures($search: String, $subscriptionPlanFeatureIds: [String], $subscriptionPlanFeature: SubscriptionPlanFeatureInput, $limit: Int!, $skip: Int!) {
|
|
771
|
-
getSubscriptionPlanFeatures(search: $search, subscriptionPlanFeatureIds: $subscriptionPlanFeatureIds, subscriptionPlanFeature: $subscriptionPlanFeature, limit: $limit, skip: $skip) {
|
|
772
|
-
${query}
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
`,
|
|
776
|
-
addSubscriptionPlanFeature: (query) => `
|
|
777
|
-
mutation addSubscriptionPlanFeature($subscriptionPlanFeature: SubscriptionPlanFeatureInput!) {
|
|
778
|
-
addSubscriptionPlanFeature(subscriptionPlanFeature: $subscriptionPlanFeature) {
|
|
779
|
-
${query}
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
`,
|
|
783
|
-
updateSubscriptionPlanFeature: (query) => `
|
|
784
|
-
mutation updateSubscriptionPlanFeature($subscriptionPlanFeatureId: String!, $subscriptionPlanFeature: SubscriptionPlanFeatureInput!) {
|
|
785
|
-
updateSubscriptionPlanFeature(subscriptionPlanFeatureId: $subcriptionPlanFeatureId, subscriptionPlanFeature: $subscriptionPlanFeature) {
|
|
786
|
-
${query}
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
`,
|
|
790
|
-
removeSubscriptionPlanFeature: (query) => `
|
|
791
|
-
mutation removeSubscriptionPlanFeature($subscriptionPlanFeatureId: String!) {
|
|
792
|
-
removeSubscriptionPlanFeature(subscriptionPlanFeatureId: $subcriptionPlanFeatureId) {
|
|
793
|
-
${query}
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
`
|
|
797
|
-
};
|
|
798
|
-
|
|
799
|
-
// src/services/subscription/subscription-plan-feature.service.ts
|
|
800
|
-
var createSubscriptionPlanFeatureService = (client) => ({
|
|
801
|
-
async removeSubscriptionPlanFeature(input, fetchFields, option) {
|
|
742
|
+
// src/helpers/service.factory.ts
|
|
743
|
+
function createOperationExecutor(client, key, config) {
|
|
744
|
+
return async (input, fetchFields, option) => {
|
|
802
745
|
var _a, _b, _c;
|
|
803
|
-
const
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
),
|
|
809
|
-
input,
|
|
810
|
-
option
|
|
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
|
+
)
|
|
811
751
|
);
|
|
812
|
-
return (_c = (_b = res.data) == null ? void 0 : _b.removeSubscriptionPlanFeature) != null ? _c : null;
|
|
813
|
-
},
|
|
814
|
-
async updateSubscriptionPlanFeature(input, fetchFields, option) {
|
|
815
|
-
var _a, _b, _c, _d;
|
|
816
752
|
const res = await client.request(
|
|
817
|
-
|
|
818
|
-
gqlQueryStringBuilder(
|
|
819
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateSubscriptionPlanFeatureResponse,
|
|
820
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateSubscriptionPlanFeatureResponseNestedFields
|
|
821
|
-
)
|
|
822
|
-
),
|
|
753
|
+
query,
|
|
823
754
|
input,
|
|
824
755
|
option
|
|
825
756
|
);
|
|
826
|
-
return (
|
|
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)"
|
|
827
784
|
},
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addSubscriptionPlanFeatureResponse,
|
|
834
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addSubscriptionPlanFeatureResponseNestedFields
|
|
835
|
-
)
|
|
836
|
-
),
|
|
837
|
-
input,
|
|
838
|
-
option
|
|
839
|
-
);
|
|
840
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.addSubscriptionPlanFeature) != null ? _d : null;
|
|
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)"
|
|
841
790
|
},
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlanFeatureResponse,
|
|
848
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlanFeatureResponseNestedFields
|
|
849
|
-
)
|
|
850
|
-
),
|
|
851
|
-
input,
|
|
852
|
-
option
|
|
853
|
-
);
|
|
854
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlanFeature) != null ? _d : null;
|
|
791
|
+
create: {
|
|
792
|
+
operation: "mutation",
|
|
793
|
+
name: "createSubscriptionPlanFeatureDefinition",
|
|
794
|
+
variables: "($subscriptionPlanFeatureDefinition: SubscriptionPlanFeatureDefinitionInput!)",
|
|
795
|
+
field: "(subscriptionPlanFeatureDefinition: $subscriptionPlanFeatureDefinition)"
|
|
855
796
|
},
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
);
|
|
868
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlanFeatures) != null ? _d : null;
|
|
797
|
+
update: {
|
|
798
|
+
operation: "mutation",
|
|
799
|
+
name: "updateSubscriptionPlanFeatureDefinition",
|
|
800
|
+
variables: "($subscriptionPlanFeatureDefinitionId: String!, $subscriptionPlanFeatureDefinition: SubscriptionPlanFeatureDefinitionInput!)",
|
|
801
|
+
field: "(subscriptionPlanFeatureDefinitionId: $subscriptionPlanFeatureDefinitionId, subscriptionPlanFeatureDefinition: $subscriptionPlanFeatureDefinition)"
|
|
802
|
+
},
|
|
803
|
+
delete: {
|
|
804
|
+
operation: "mutation",
|
|
805
|
+
name: "removeSubscriptionPlanFeatureDefinition",
|
|
806
|
+
variables: "($subscriptionPlanFeatureDefinitionId: String!)",
|
|
807
|
+
field: "(subscriptionPlanFeatureDefinitionId: $subscriptionPlanFeatureDefinitionId)"
|
|
869
808
|
}
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
// src/services/subscription/subscription-plan-feature-definition.service.ts
|
|
812
|
+
var createSubscriptionPlanFeatureDefinitionService = (client) => ({
|
|
813
|
+
createSubscriptionPlanFeatureDefinition: createOperationExecutor(
|
|
814
|
+
client,
|
|
815
|
+
"createSubscriptionPlanFeatureDefinition",
|
|
816
|
+
{
|
|
817
|
+
schema: buildSchema(subscriptionPlanFeatureDefinitionSchema.create),
|
|
818
|
+
defaultRootFields: subscriptionPlanFeatureDefinitionIntegration.create.responseFields,
|
|
819
|
+
defaultNestedFields: subscriptionPlanFeatureDefinitionIntegration.create.nestedFields
|
|
820
|
+
}
|
|
821
|
+
),
|
|
822
|
+
updateSubscriptionPlanFeatureDefinition: createOperationExecutor(
|
|
823
|
+
client,
|
|
824
|
+
"updateSubscriptionPlanFeatureDefinition",
|
|
825
|
+
{
|
|
826
|
+
schema: buildSchema(subscriptionPlanFeatureDefinitionSchema.update),
|
|
827
|
+
defaultRootFields: subscriptionPlanFeatureDefinitionIntegration.update.responseFields,
|
|
828
|
+
defaultNestedFields: subscriptionPlanFeatureDefinitionIntegration.update.nestedFields
|
|
829
|
+
}
|
|
830
|
+
),
|
|
831
|
+
getSubscriptionPlanFeatureDefinition: createOperationExecutor(
|
|
832
|
+
client,
|
|
833
|
+
"getSubscriptionPlanFeatureDefinition",
|
|
834
|
+
{
|
|
835
|
+
schema: buildSchema(subscriptionPlanFeatureDefinitionSchema.get),
|
|
836
|
+
defaultRootFields: subscriptionPlanFeatureDefinitionIntegration.get.responseFields,
|
|
837
|
+
defaultNestedFields: subscriptionPlanFeatureDefinitionIntegration.get.nestedFields
|
|
838
|
+
}
|
|
839
|
+
),
|
|
840
|
+
removeSubscriptionPlanFeatureDefinition: createOperationExecutor(
|
|
841
|
+
client,
|
|
842
|
+
"removeSubscriptionPlanFeatureDefinition",
|
|
843
|
+
{
|
|
844
|
+
schema: buildSchema(subscriptionPlanFeatureDefinitionSchema.delete),
|
|
845
|
+
defaultRootFields: subscriptionPlanFeatureDefinitionDeleteIntegration.responseFields,
|
|
846
|
+
defaultNestedFields: {}
|
|
847
|
+
}
|
|
848
|
+
),
|
|
849
|
+
getSubscriptionPlanFeatureDefinitions: createOperationExecutor(
|
|
850
|
+
client,
|
|
851
|
+
"getSubscriptionPlanFeatureDefinitions",
|
|
852
|
+
{
|
|
853
|
+
schema: buildSchema(subscriptionPlanFeatureDefinitionSchema.list),
|
|
854
|
+
defaultRootFields: [...subscriptionPlanFeatureDefinitionListIntegration.responseFields],
|
|
855
|
+
defaultNestedFields: subscriptionPlanFeatureDefinitionListIntegration.nestedFields
|
|
856
|
+
}
|
|
857
|
+
)
|
|
870
858
|
});
|
|
871
859
|
|
|
872
860
|
// src/services/subscription/schemas/subscription-plan.schema.ts
|
|
873
861
|
var subscriptionPlanSchema = {
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
}
|
|
880
|
-
`,
|
|
881
|
-
getSubscriptionPlans: (query) => `
|
|
882
|
-
query getSubscriptionPlans($search: String, $subscriptionPlanIds: [String], $subscriptionPlan: SubscriptionPlanInput, $limit: Int!, $skip: Int!) {
|
|
883
|
-
getSubscriptionPlans(search: $search, subscriptionPlanIds: $subscriptionPlanIds, subscriptionPlan: $subscriptionPlan, limit: $limit, skip: $skip) {
|
|
884
|
-
${query}
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
`,
|
|
888
|
-
addSubscriptionPlan: (query) => `
|
|
889
|
-
mutation addSubscriptionPlan($subscriptionPlan: SubscriptionPlanInput!) {
|
|
890
|
-
addSubscriptionPlan(subscriptionPlan: $subscriptionPlan) {
|
|
891
|
-
${query}
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
`,
|
|
895
|
-
updateSubscriptionPlan: (query) => `
|
|
896
|
-
mutation updateSubscriptionPlan($subscriptionPlanId: String!, $subscriptionPlan: SubscriptionPlanInput!) {
|
|
897
|
-
updateSubscriptionPlan(subscriptionPlanId: $subscriptionPlanId, subscriptionPlan: $subscriptionPlan) {
|
|
898
|
-
${query}
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
`,
|
|
902
|
-
removeSubscriptionPlan: (query) => `
|
|
903
|
-
mutation removeSubscriptionPlan($subscriptionPlanId: String!) {
|
|
904
|
-
removeSubscriptionPlan(subscriptionPlanId: $subscriptionPlanId) {
|
|
905
|
-
${query}
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
`
|
|
909
|
-
};
|
|
910
|
-
|
|
911
|
-
// src/services/subscription/subscription-plan.service.ts
|
|
912
|
-
var createSubscriptionPlanService = (client) => ({
|
|
913
|
-
async removeSubscriptionPlan(input, fetchFields, option) {
|
|
914
|
-
var _a, _b, _c;
|
|
915
|
-
const res = await client.request(
|
|
916
|
-
subscriptionPlanSchema.removeSubscriptionPlan(
|
|
917
|
-
gqlQueryStringBuilder(
|
|
918
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeSubscriptionPlanResponse
|
|
919
|
-
)
|
|
920
|
-
),
|
|
921
|
-
input,
|
|
922
|
-
option
|
|
923
|
-
);
|
|
924
|
-
return (_c = (_b = res.data) == null ? void 0 : _b.removeSubscriptionPlan) != null ? _c : null;
|
|
862
|
+
get: {
|
|
863
|
+
operation: "query",
|
|
864
|
+
name: "getSubscriptionPlan",
|
|
865
|
+
variables: "($subscriptionPlan: SubscriptionPlanInput!)",
|
|
866
|
+
field: "(subscriptionPlan: $subscriptionPlan)"
|
|
925
867
|
},
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateSubscriptionPlanResponse,
|
|
932
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateSubscriptionPlanResponseNestedFields
|
|
933
|
-
)
|
|
934
|
-
),
|
|
935
|
-
input,
|
|
936
|
-
option
|
|
937
|
-
);
|
|
938
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.updateSubscriptionPlan) != null ? _d : null;
|
|
868
|
+
list: {
|
|
869
|
+
operation: "query",
|
|
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)"
|
|
939
873
|
},
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addSubscriptionPlanResponse,
|
|
946
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addSubscriptionPlanResponseNestedFields
|
|
947
|
-
)
|
|
948
|
-
),
|
|
949
|
-
input,
|
|
950
|
-
option
|
|
951
|
-
);
|
|
952
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.addSubscriptionPlan) != null ? _d : null;
|
|
874
|
+
create: {
|
|
875
|
+
operation: "mutation",
|
|
876
|
+
name: "createSubscriptionPlan",
|
|
877
|
+
variables: "($subscriptionPlan: SubscriptionPlanInput!)",
|
|
878
|
+
field: "(subscriptionPlan: $subscriptionPlan)"
|
|
953
879
|
},
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlanResponse,
|
|
960
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlanResponseNestedFields
|
|
961
|
-
)
|
|
962
|
-
),
|
|
963
|
-
input,
|
|
964
|
-
option
|
|
965
|
-
);
|
|
966
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlan) != null ? _d : null;
|
|
880
|
+
update: {
|
|
881
|
+
operation: "mutation",
|
|
882
|
+
name: "updateSubscriptionPlan",
|
|
883
|
+
variables: "($subscriptionPlanId: String!, $subscriptionPlan: SubscriptionPlanInput!)",
|
|
884
|
+
field: "(subscriptionPlanId: $subscriptionPlanId, subscriptionPlan: $subscriptionPlan)"
|
|
967
885
|
},
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlansResponse,
|
|
974
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlansResponseNestedFields
|
|
975
|
-
)
|
|
976
|
-
),
|
|
977
|
-
input,
|
|
978
|
-
option
|
|
979
|
-
);
|
|
980
|
-
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlans) != null ? _d : null;
|
|
886
|
+
delete: {
|
|
887
|
+
operation: "mutation",
|
|
888
|
+
name: "removeSubscriptionPlan",
|
|
889
|
+
variables: "($subscriptionPlanId: String!)",
|
|
890
|
+
field: "(subscriptionPlanId: $subscriptionPlanId)"
|
|
981
891
|
}
|
|
892
|
+
};
|
|
893
|
+
|
|
894
|
+
// src/services/subscription/subscription-plan.service.ts
|
|
895
|
+
var createSubscriptionPlanService = (client) => ({
|
|
896
|
+
createSubscriptionPlan: createOperationExecutor(
|
|
897
|
+
client,
|
|
898
|
+
"createSubscriptionPlan",
|
|
899
|
+
{
|
|
900
|
+
schema: buildSchema(subscriptionPlanSchema.create),
|
|
901
|
+
defaultRootFields: subscriptionPlanIntegration.create.responseFields,
|
|
902
|
+
defaultNestedFields: subscriptionPlanIntegration.create.nestedFields
|
|
903
|
+
}
|
|
904
|
+
),
|
|
905
|
+
updateSubscriptionPlan: createOperationExecutor(
|
|
906
|
+
client,
|
|
907
|
+
"updateSubscriptionPlan",
|
|
908
|
+
{
|
|
909
|
+
schema: buildSchema(subscriptionPlanSchema.update),
|
|
910
|
+
defaultRootFields: subscriptionPlanIntegration.update.responseFields,
|
|
911
|
+
defaultNestedFields: subscriptionPlanIntegration.update.nestedFields
|
|
912
|
+
}
|
|
913
|
+
),
|
|
914
|
+
getSubscriptionPlan: createOperationExecutor(
|
|
915
|
+
client,
|
|
916
|
+
"getSubscriptionPlan",
|
|
917
|
+
{
|
|
918
|
+
schema: buildSchema(subscriptionPlanSchema.get),
|
|
919
|
+
defaultRootFields: subscriptionPlanIntegration.get.responseFields,
|
|
920
|
+
defaultNestedFields: subscriptionPlanIntegration.get.nestedFields
|
|
921
|
+
}
|
|
922
|
+
),
|
|
923
|
+
removeSubscriptionPlan: createOperationExecutor(
|
|
924
|
+
client,
|
|
925
|
+
"removeSubscriptionPlan",
|
|
926
|
+
{
|
|
927
|
+
schema: buildSchema(subscriptionPlanSchema.delete),
|
|
928
|
+
defaultRootFields: subscriptionPlanDeleteIntegration.responseFields,
|
|
929
|
+
defaultNestedFields: {}
|
|
930
|
+
}
|
|
931
|
+
),
|
|
932
|
+
getSubscriptionPlans: createOperationExecutor(
|
|
933
|
+
client,
|
|
934
|
+
"getSubscriptionPlans",
|
|
935
|
+
{
|
|
936
|
+
schema: buildSchema(subscriptionPlanSchema.list),
|
|
937
|
+
defaultRootFields: [...subscriptionPlanListIntegration.responseFields],
|
|
938
|
+
defaultNestedFields: subscriptionPlanListIntegration.nestedFields
|
|
939
|
+
}
|
|
940
|
+
)
|
|
982
941
|
});
|
|
983
942
|
|
|
984
943
|
// src/services/subscription/schemas/subscription.schema.ts
|
|
@@ -1093,41 +1052,6 @@ var createSubscriptionService = (client) => ({
|
|
|
1093
1052
|
}
|
|
1094
1053
|
});
|
|
1095
1054
|
|
|
1096
|
-
// src/helpers/service.factory.ts
|
|
1097
|
-
function createOperationExecutor(client, key, config) {
|
|
1098
|
-
return async (input, fetchFields, option) => {
|
|
1099
|
-
var _a, _b, _c;
|
|
1100
|
-
const query = config.schema(
|
|
1101
|
-
gqlQueryStringBuilder(
|
|
1102
|
-
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : config.defaultRootFields,
|
|
1103
|
-
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : config.defaultNestedFields
|
|
1104
|
-
)
|
|
1105
|
-
);
|
|
1106
|
-
const res = await client.request(
|
|
1107
|
-
query,
|
|
1108
|
-
input,
|
|
1109
|
-
option
|
|
1110
|
-
);
|
|
1111
|
-
return (_c = res.data) == null ? void 0 : _c[key];
|
|
1112
|
-
};
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
// src/helpers/schema-builder.ts
|
|
1116
|
-
function buildSchema({
|
|
1117
|
-
operation,
|
|
1118
|
-
name,
|
|
1119
|
-
variables,
|
|
1120
|
-
field
|
|
1121
|
-
}) {
|
|
1122
|
-
return (selection) => `
|
|
1123
|
-
${operation} ${name}${variables} {
|
|
1124
|
-
${name}${field} {
|
|
1125
|
-
${selection}
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
`.trim();
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
1055
|
// src/services/subscription/schemas/subscription-plan-feature-behaviour.ts
|
|
1132
1056
|
var subscriptionPlanFeatureBehaviourSchema = {
|
|
1133
1057
|
get: {
|
|
@@ -1712,9 +1636,9 @@ var createUserAccountService = (client) => ({
|
|
|
1712
1636
|
});
|
|
1713
1637
|
|
|
1714
1638
|
// src/services/user/types/user-role.type.ts
|
|
1715
|
-
var
|
|
1639
|
+
var ENTITY5 = "userRole";
|
|
1716
1640
|
var userRoleIntegration = createStandardEntityIntegration({
|
|
1717
|
-
key:
|
|
1641
|
+
key: ENTITY5,
|
|
1718
1642
|
fields: userRoleQuery,
|
|
1719
1643
|
nested: {
|
|
1720
1644
|
privileges: privilegeQuery
|
|
@@ -1727,7 +1651,7 @@ var userRoleListIntegration = createListIntegration({
|
|
|
1727
1651
|
privileges: privilegeQuery
|
|
1728
1652
|
}
|
|
1729
1653
|
});
|
|
1730
|
-
var userRoleDeleteIntegration = createDeleteIntegration(
|
|
1654
|
+
var userRoleDeleteIntegration = createDeleteIntegration(ENTITY5);
|
|
1731
1655
|
|
|
1732
1656
|
// src/services/user/schemas/user-role.schema.ts
|
|
1733
1657
|
var userRoleSchema = {
|
|
@@ -1813,16 +1737,16 @@ var createUserRoleService = (client) => ({
|
|
|
1813
1737
|
});
|
|
1814
1738
|
|
|
1815
1739
|
// src/services/user/types/application-feature.type.ts
|
|
1816
|
-
var
|
|
1740
|
+
var ENTITY6 = "applicationFeature";
|
|
1817
1741
|
var applicationFeatureIntegration = createStandardEntityIntegration({
|
|
1818
|
-
key:
|
|
1742
|
+
key: ENTITY6,
|
|
1819
1743
|
fields: applicationFeatureQuery
|
|
1820
1744
|
});
|
|
1821
1745
|
var applicationFeatureListIntegration = createListIntegration({
|
|
1822
1746
|
key: "applicationFeatures",
|
|
1823
1747
|
fields: applicationFeatureQuery
|
|
1824
1748
|
});
|
|
1825
|
-
var applicationFeatureDeleteIntegration = createDeleteIntegration(
|
|
1749
|
+
var applicationFeatureDeleteIntegration = createDeleteIntegration(ENTITY6);
|
|
1826
1750
|
|
|
1827
1751
|
// src/services/user/schemas/application-feature.schema.ts
|
|
1828
1752
|
var applicationFeatureSchema = {
|
|
@@ -3349,8 +3273,6 @@ exports._getPackageResponseNestedFields = _getPackageResponseNestedFields;
|
|
|
3349
3273
|
exports._getProductResponseNestedFields = _getProductResponseNestedFields;
|
|
3350
3274
|
exports._getSaleResponseNestedFields = _getSaleResponseNestedFields;
|
|
3351
3275
|
exports._getStoreResponseNestedFields = _getStoreResponseNestedFields;
|
|
3352
|
-
exports._getSubscriptionPlanFeatureResponseNestedFields = _getSubscriptionPlanFeatureResponseNestedFields;
|
|
3353
|
-
exports._getSubscriptionPlanResponseNestedFields = _getSubscriptionPlanResponseNestedFields;
|
|
3354
3276
|
exports._getSubscriptionResponseNestedFields = _getSubscriptionResponseNestedFields;
|
|
3355
3277
|
exports._getTransactionResponseNestedFields = _getTransactionResponseNestedFields;
|
|
3356
3278
|
exports._getTransactionsResponseNestedFields = _getTransactionsResponseNestedFields;
|
|
@@ -3366,10 +3288,6 @@ exports.addStockResponse = addStockResponse;
|
|
|
3366
3288
|
exports.addStockResponseNestedFields = addStockResponseNestedFields;
|
|
3367
3289
|
exports.addStoreResponse = addStoreResponse;
|
|
3368
3290
|
exports.addStoreResponseNestedFields = addStoreResponseNestedFields;
|
|
3369
|
-
exports.addSubscriptionPlanFeatureResponse = addSubscriptionPlanFeatureResponse;
|
|
3370
|
-
exports.addSubscriptionPlanFeatureResponseNestedFields = addSubscriptionPlanFeatureResponseNestedFields;
|
|
3371
|
-
exports.addSubscriptionPlanResponse = addSubscriptionPlanResponse;
|
|
3372
|
-
exports.addSubscriptionPlanResponseNestedFields = addSubscriptionPlanResponseNestedFields;
|
|
3373
3291
|
exports.addSubscriptionResponse = addSubscriptionResponse;
|
|
3374
3292
|
exports.addSubscriptionResponseNestedFields = addSubscriptionResponseNestedFields;
|
|
3375
3293
|
exports.addTransactionResponse = addTransactionResponse;
|
|
@@ -3392,7 +3310,7 @@ exports.createStoreCategoryResponseNestedFields = createStoreCategoryResponseNes
|
|
|
3392
3310
|
exports.createStoreCategoryService = createStoreCategoryService;
|
|
3393
3311
|
exports.createStoreService = createStoreService;
|
|
3394
3312
|
exports.createSubscriptionPlanFeatureBehaviourService = createSubscriptionPlanFeatureBehaviourService;
|
|
3395
|
-
exports.
|
|
3313
|
+
exports.createSubscriptionPlanFeatureDefinitionService = createSubscriptionPlanFeatureDefinitionService;
|
|
3396
3314
|
exports.createSubscriptionPlanService = createSubscriptionPlanService;
|
|
3397
3315
|
exports.createSubscriptionService = createSubscriptionService;
|
|
3398
3316
|
exports.createTransactionService = createTransactionService;
|
|
@@ -3442,14 +3360,6 @@ exports.getStoreResponse = getStoreResponse;
|
|
|
3442
3360
|
exports.getStoreResponseNestedFields = getStoreResponseNestedFields;
|
|
3443
3361
|
exports.getStoresResponse = getStoresResponse;
|
|
3444
3362
|
exports.getStoresResponseNestedFields = getStoresResponseNestedFields;
|
|
3445
|
-
exports.getSubscriptionPlanFeatureResponse = getSubscriptionPlanFeatureResponse;
|
|
3446
|
-
exports.getSubscriptionPlanFeatureResponseNestedFields = getSubscriptionPlanFeatureResponseNestedFields;
|
|
3447
|
-
exports.getSubscriptionPlanFeaturesResponse = getSubscriptionPlanFeaturesResponse;
|
|
3448
|
-
exports.getSubscriptionPlanFeaturesResponseNestedFields = getSubscriptionPlanFeaturesResponseNestedFields;
|
|
3449
|
-
exports.getSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
3450
|
-
exports.getSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
3451
|
-
exports.getSubscriptionPlansResponse = getSubscriptionPlansResponse;
|
|
3452
|
-
exports.getSubscriptionPlansResponseNestedFields = getSubscriptionPlansResponseNestedFields;
|
|
3453
3363
|
exports.getSubscriptionResponse = getSubscriptionResponse;
|
|
3454
3364
|
exports.getSubscriptionResponseNestedFields = getSubscriptionResponseNestedFields;
|
|
3455
3365
|
exports.getSubscriptionsResponse = getSubscriptionsResponse;
|
|
@@ -3468,17 +3378,21 @@ exports.removeStockResponse = removeStockResponse;
|
|
|
3468
3378
|
exports.removeStoreCategoryProductResponseFields = removeStoreCategoryProductResponseFields;
|
|
3469
3379
|
exports.removeStoreCategoryResponseFields = removeStoreCategoryResponseFields;
|
|
3470
3380
|
exports.removeStoreResponse = removeStoreResponse;
|
|
3471
|
-
exports.removeSubscriptionPlanFeatureResponse = removeSubscriptionPlanFeatureResponse;
|
|
3472
|
-
exports.removeSubscriptionPlanResponse = removeSubscriptionPlanResponse;
|
|
3473
3381
|
exports.removeSubscriptionResponse = removeSubscriptionResponse;
|
|
3474
3382
|
exports.saleQuery = saleQuery;
|
|
3475
3383
|
exports.searchCategoriesAndTemplateResponse = searchCategoriesAndTemplateResponse;
|
|
3476
3384
|
exports.searchCategoriesAndTemplateResponseNestedFields = searchCategoriesAndTemplateResponseNestedFields;
|
|
3477
3385
|
exports.searchProductNamesResponse = searchProductNamesResponse;
|
|
3478
3386
|
exports.searchProductNamesResponseNestedFields = searchProductNamesResponseNestedFields;
|
|
3387
|
+
exports.subscriptionPlanDeleteIntegration = subscriptionPlanDeleteIntegration;
|
|
3479
3388
|
exports.subscriptionPlanFeatureBehaviourDeleteIntegration = subscriptionPlanFeatureBehaviourDeleteIntegration;
|
|
3480
3389
|
exports.subscriptionPlanFeatureBehaviourIntegration = subscriptionPlanFeatureBehaviourIntegration;
|
|
3481
3390
|
exports.subscriptionPlanFeatureBehaviourListIntegration = subscriptionPlanFeatureBehaviourListIntegration;
|
|
3391
|
+
exports.subscriptionPlanFeatureDefinitionDeleteIntegration = subscriptionPlanFeatureDefinitionDeleteIntegration;
|
|
3392
|
+
exports.subscriptionPlanFeatureDefinitionIntegration = subscriptionPlanFeatureDefinitionIntegration;
|
|
3393
|
+
exports.subscriptionPlanFeatureDefinitionListIntegration = subscriptionPlanFeatureDefinitionListIntegration;
|
|
3394
|
+
exports.subscriptionPlanIntegration = subscriptionPlanIntegration;
|
|
3395
|
+
exports.subscriptionPlanListIntegration = subscriptionPlanListIntegration;
|
|
3482
3396
|
exports.toAsyncHeadersFactory = toAsyncHeadersFactory;
|
|
3483
3397
|
exports.toAsyncTokenProvider = toAsyncTokenProvider;
|
|
3484
3398
|
exports.transactionQuery = transactionQuery;
|
|
@@ -3497,10 +3411,6 @@ exports.updateStoreCategoryResponseFields = updateStoreCategoryResponseFields;
|
|
|
3497
3411
|
exports.updateStoreCategoryResponseNestedFields = updateStoreCategoryResponseNestedFields;
|
|
3498
3412
|
exports.updateStoreResponse = updateStoreResponse;
|
|
3499
3413
|
exports.updateStoreResponseNestedFields = updateStoreResponseNestedFields;
|
|
3500
|
-
exports.updateSubscriptionPlanFeatureResponse = updateSubscriptionPlanFeatureResponse;
|
|
3501
|
-
exports.updateSubscriptionPlanFeatureResponseNestedFields = updateSubscriptionPlanFeatureResponseNestedFields;
|
|
3502
|
-
exports.updateSubscriptionPlanResponse = updateSubscriptionPlanResponse;
|
|
3503
|
-
exports.updateSubscriptionPlanResponseNestedFields = updateSubscriptionPlanResponseNestedFields;
|
|
3504
3414
|
exports.updateSubscriptionResponse = updateSubscriptionResponse;
|
|
3505
3415
|
exports.updateSubscriptionResponseNestedFields = updateSubscriptionResponseNestedFields;
|
|
3506
3416
|
exports.updateTransactionResponse = updateTransactionResponse;
|