@connect-plus-online/ogabai-integrations 0.0.39 → 0.0.50
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 +167 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +94 -1
- package/dist/index.d.ts +94 -1
- package/dist/index.esm.js +157 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2300,6 +2300,23 @@ var createPaystackService = (client) => ({
|
|
|
2300
2300
|
});
|
|
2301
2301
|
|
|
2302
2302
|
// src/services/subscription/subscription.entity.ts
|
|
2303
|
+
var subscriptionQuery = [
|
|
2304
|
+
"cancelAtPeriodEnd",
|
|
2305
|
+
"canceledAt",
|
|
2306
|
+
"createdAt",
|
|
2307
|
+
"currency",
|
|
2308
|
+
"currentPeriodEnd",
|
|
2309
|
+
"currentPeriodStart",
|
|
2310
|
+
"defaultPaymentMethodId",
|
|
2311
|
+
"id",
|
|
2312
|
+
"price",
|
|
2313
|
+
"subscriptionPlanId",
|
|
2314
|
+
"subscriptionStatus",
|
|
2315
|
+
"trialEnd",
|
|
2316
|
+
"updatedAt",
|
|
2317
|
+
"userId",
|
|
2318
|
+
"version"
|
|
2319
|
+
];
|
|
2303
2320
|
var subscriptionPlanFeatureQuery = [
|
|
2304
2321
|
"id",
|
|
2305
2322
|
"title",
|
|
@@ -2372,6 +2389,31 @@ var removeSubscriptionPlanResponse = [
|
|
|
2372
2389
|
"subscriptionPlanId"
|
|
2373
2390
|
];
|
|
2374
2391
|
|
|
2392
|
+
// src/services/subscription/types/subscription.type.ts
|
|
2393
|
+
var getSubscriptionResponse = [
|
|
2394
|
+
"subscription"
|
|
2395
|
+
];
|
|
2396
|
+
var _getSubscriptionResponseNestedFields = {};
|
|
2397
|
+
var getSubscriptionResponseNestedFields = {
|
|
2398
|
+
..._getSubscriptionResponseNestedFields,
|
|
2399
|
+
subscription: subscriptionQuery
|
|
2400
|
+
};
|
|
2401
|
+
var getSubscriptionsResponse = [
|
|
2402
|
+
"subscriptions",
|
|
2403
|
+
"total"
|
|
2404
|
+
];
|
|
2405
|
+
var getSubscriptionsResponseNestedFields = {
|
|
2406
|
+
..._getSubscriptionResponseNestedFields,
|
|
2407
|
+
subscriptions: subscriptionQuery
|
|
2408
|
+
};
|
|
2409
|
+
var addSubscriptionResponse = getSubscriptionResponse;
|
|
2410
|
+
var addSubscriptionResponseNestedFields = getSubscriptionResponseNestedFields;
|
|
2411
|
+
var updateSubscriptionResponse = getSubscriptionResponse;
|
|
2412
|
+
var updateSubscriptionResponseNestedFields = getSubscriptionResponseNestedFields;
|
|
2413
|
+
var removeSubscriptionResponse = [
|
|
2414
|
+
"subscriptionId"
|
|
2415
|
+
];
|
|
2416
|
+
|
|
2375
2417
|
// src/services/subscription/schemas/subscription-plan-feature.schema.ts
|
|
2376
2418
|
var subscriptionPlanFeatureSchema = {
|
|
2377
2419
|
getSubscriptionPlanFeature: (query) => `
|
|
@@ -2382,7 +2424,7 @@ var subscriptionPlanFeatureSchema = {
|
|
|
2382
2424
|
}
|
|
2383
2425
|
`,
|
|
2384
2426
|
getSubscriptionPlanFeatures: (query) => `
|
|
2385
|
-
query getSubscriptionPlanFeatures($search String, $subscriptionPlanFeatureIds: [String], $subscriptionPlanFeature: SubscriptionPlanFeatureInput, $limit: Int!, $skip: Int!) {
|
|
2427
|
+
query getSubscriptionPlanFeatures($search: String, $subscriptionPlanFeatureIds: [String], $subscriptionPlanFeature: SubscriptionPlanFeatureInput, $limit: Int!, $skip: Int!) {
|
|
2386
2428
|
getSubscriptionPlanFeatures(search: $search, subscriptionPlanFeatureIds: $subscriptionPlanFeatureIds, subscriptionPlanFeature: $subscriptionPlanFeature, limit: $limit, skip: $skip) {
|
|
2387
2429
|
${query}
|
|
2388
2430
|
}
|
|
@@ -2494,7 +2536,7 @@ var subscriptionPlanSchema = {
|
|
|
2494
2536
|
}
|
|
2495
2537
|
`,
|
|
2496
2538
|
getSubscriptionPlans: (query) => `
|
|
2497
|
-
query getSubscriptionPlans($search String, $subscriptionPlanIds: [String], $subscriptionPlan: SubscriptionPlanInput, $limit: Int!, $skip: Int!) {
|
|
2539
|
+
query getSubscriptionPlans($search: String, $subscriptionPlanIds: [String], $subscriptionPlan: SubscriptionPlanInput, $limit: Int!, $skip: Int!) {
|
|
2498
2540
|
getSubscriptionPlans(search: $search, subscriptionPlanIds: $subscriptionPlanIds, subscriptionPlan: $subscriptionPlan, limit: $limit, skip: $skip) {
|
|
2499
2541
|
${query}
|
|
2500
2542
|
}
|
|
@@ -2596,6 +2638,118 @@ var createSubscriptionPlanService = (client) => ({
|
|
|
2596
2638
|
}
|
|
2597
2639
|
});
|
|
2598
2640
|
|
|
2641
|
+
// src/services/subscription/schemas/subscription.schema.ts
|
|
2642
|
+
var subscriptionSchema = {
|
|
2643
|
+
getSubscription: (query) => `
|
|
2644
|
+
query getSubscription($subscription: SubscriptionInput!) {
|
|
2645
|
+
getSubscription(subscription: $subscription) {
|
|
2646
|
+
${query}
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
`,
|
|
2650
|
+
getSubscriptions: (query) => `
|
|
2651
|
+
query getSubscriptions($search: String, $subscriptionIds: [String], $subscription: SubscriptionInput, $limit: Int!, $skip: Int!) {
|
|
2652
|
+
getSubscriptions(search: $search, subscriptionIds: $subscriptionIds, subscription: $subscription, limit: $limit, skip: $skip) {
|
|
2653
|
+
${query}
|
|
2654
|
+
}
|
|
2655
|
+
}
|
|
2656
|
+
`,
|
|
2657
|
+
addSubscription: (query) => `
|
|
2658
|
+
mutation addSubscription($subscription: SubscriptionInput!) {
|
|
2659
|
+
addSubscription(subscription: $subscription) {
|
|
2660
|
+
${query}
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
`,
|
|
2664
|
+
updateSubscription: (query) => `
|
|
2665
|
+
mutation updateSubscription($subscriptionId: String!, $subscription: SubscriptionInput!) {
|
|
2666
|
+
updateSubscription(subscriptionId: $subcriptionId, subscription: $subscription) {
|
|
2667
|
+
${query}
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
`,
|
|
2671
|
+
removeSubscription: (query) => `
|
|
2672
|
+
mutation removeSubscription($subscriptionId: String!) {
|
|
2673
|
+
removeSubscription(subscriptionId: $subcriptionId) {
|
|
2674
|
+
${query}
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
`
|
|
2678
|
+
};
|
|
2679
|
+
|
|
2680
|
+
// src/services/subscription/subscription.service.ts
|
|
2681
|
+
var createSubscriptionService = (client) => ({
|
|
2682
|
+
async removeSubscription(input, fetchFields, option) {
|
|
2683
|
+
var _a, _b, _c;
|
|
2684
|
+
const res = await client.request(
|
|
2685
|
+
subscriptionSchema.removeSubscription(
|
|
2686
|
+
gqlQueryStringBuilder(
|
|
2687
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeSubscriptionResponse
|
|
2688
|
+
)
|
|
2689
|
+
),
|
|
2690
|
+
input,
|
|
2691
|
+
option
|
|
2692
|
+
);
|
|
2693
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removeSubscription) != null ? _c : null;
|
|
2694
|
+
},
|
|
2695
|
+
async updateSubscription(input, fetchFields, option) {
|
|
2696
|
+
var _a, _b, _c, _d;
|
|
2697
|
+
const res = await client.request(
|
|
2698
|
+
subscriptionSchema.updateSubscription(
|
|
2699
|
+
gqlQueryStringBuilder(
|
|
2700
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateSubscriptionResponse,
|
|
2701
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateSubscriptionResponseNestedFields
|
|
2702
|
+
)
|
|
2703
|
+
),
|
|
2704
|
+
input,
|
|
2705
|
+
option
|
|
2706
|
+
);
|
|
2707
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateSubscription) != null ? _d : null;
|
|
2708
|
+
},
|
|
2709
|
+
async addSubscription(input, fetchFields, option) {
|
|
2710
|
+
var _a, _b, _c, _d;
|
|
2711
|
+
const res = await client.request(
|
|
2712
|
+
subscriptionSchema.addSubscription(
|
|
2713
|
+
gqlQueryStringBuilder(
|
|
2714
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addSubscriptionResponse,
|
|
2715
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addSubscriptionResponseNestedFields
|
|
2716
|
+
)
|
|
2717
|
+
),
|
|
2718
|
+
input,
|
|
2719
|
+
option
|
|
2720
|
+
);
|
|
2721
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addSubscription) != null ? _d : null;
|
|
2722
|
+
},
|
|
2723
|
+
async getSubscription(input, fetchFields, option) {
|
|
2724
|
+
var _a, _b, _c, _d;
|
|
2725
|
+
const res = await client.request(
|
|
2726
|
+
subscriptionSchema.getSubscription(
|
|
2727
|
+
gqlQueryStringBuilder(
|
|
2728
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionResponse,
|
|
2729
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionResponseNestedFields
|
|
2730
|
+
)
|
|
2731
|
+
),
|
|
2732
|
+
input,
|
|
2733
|
+
option
|
|
2734
|
+
);
|
|
2735
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscription) != null ? _d : null;
|
|
2736
|
+
},
|
|
2737
|
+
async getSubscriptions(input, fetchFields, option) {
|
|
2738
|
+
var _a, _b, _c, _d;
|
|
2739
|
+
const res = await client.request(
|
|
2740
|
+
subscriptionSchema.getSubscriptions(
|
|
2741
|
+
gqlQueryStringBuilder(
|
|
2742
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionsResponse,
|
|
2743
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionsResponseNestedFields
|
|
2744
|
+
)
|
|
2745
|
+
),
|
|
2746
|
+
input,
|
|
2747
|
+
option
|
|
2748
|
+
);
|
|
2749
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptions) != null ? _d : null;
|
|
2750
|
+
}
|
|
2751
|
+
});
|
|
2752
|
+
|
|
2599
2753
|
exports.AuthenticationError = AuthenticationError;
|
|
2600
2754
|
exports.GraphQLClient = GraphQLClient;
|
|
2601
2755
|
exports.NetworkError = NetworkError;
|
|
@@ -2607,6 +2761,7 @@ exports._getSaleResponseNestedFields = _getSaleResponseNestedFields;
|
|
|
2607
2761
|
exports._getStoreResponseNestedFields = _getStoreResponseNestedFields;
|
|
2608
2762
|
exports._getSubscriptionPlanFeatureResponseNestedFields = _getSubscriptionPlanFeatureResponseNestedFields;
|
|
2609
2763
|
exports._getSubscriptionPlanResponseNestedFields = _getSubscriptionPlanResponseNestedFields;
|
|
2764
|
+
exports._getSubscriptionResponseNestedFields = _getSubscriptionResponseNestedFields;
|
|
2610
2765
|
exports._getTransactionResponseNestedFields = _getTransactionResponseNestedFields;
|
|
2611
2766
|
exports._getTransactionsResponseNestedFields = _getTransactionsResponseNestedFields;
|
|
2612
2767
|
exports.addPackageResponseFields = addPackageResponseFields;
|
|
@@ -2625,6 +2780,8 @@ exports.addSubscriptionPlanFeatureResponse = addSubscriptionPlanFeatureResponse;
|
|
|
2625
2780
|
exports.addSubscriptionPlanFeatureResponseNestedFields = addSubscriptionPlanFeatureResponseNestedFields;
|
|
2626
2781
|
exports.addSubscriptionPlanResponse = addSubscriptionPlanResponse;
|
|
2627
2782
|
exports.addSubscriptionPlanResponseNestedFields = addSubscriptionPlanResponseNestedFields;
|
|
2783
|
+
exports.addSubscriptionResponse = addSubscriptionResponse;
|
|
2784
|
+
exports.addSubscriptionResponseNestedFields = addSubscriptionResponseNestedFields;
|
|
2628
2785
|
exports.addTransactionResponse = addTransactionResponse;
|
|
2629
2786
|
exports.addTransactionResponseNestedFields = addTransactionResponseNestedFields;
|
|
2630
2787
|
exports.compose = compose;
|
|
@@ -2645,6 +2802,7 @@ exports.createStoreCategoryService = createStoreCategoryService;
|
|
|
2645
2802
|
exports.createStoreService = createStoreService;
|
|
2646
2803
|
exports.createSubscriptionPlanFeatureService = createSubscriptionPlanFeatureService;
|
|
2647
2804
|
exports.createSubscriptionPlanService = createSubscriptionPlanService;
|
|
2805
|
+
exports.createSubscriptionService = createSubscriptionService;
|
|
2648
2806
|
exports.createTransactionService = createTransactionService;
|
|
2649
2807
|
exports.createTransport = createTransport;
|
|
2650
2808
|
exports.createUserNotificationService = createUserNotificationService;
|
|
@@ -2698,6 +2856,10 @@ exports.getSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
|
2698
2856
|
exports.getSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
2699
2857
|
exports.getSubscriptionPlansResponse = getSubscriptionPlansResponse;
|
|
2700
2858
|
exports.getSubscriptionPlansResponseNestedFields = getSubscriptionPlansResponseNestedFields;
|
|
2859
|
+
exports.getSubscriptionResponse = getSubscriptionResponse;
|
|
2860
|
+
exports.getSubscriptionResponseNestedFields = getSubscriptionResponseNestedFields;
|
|
2861
|
+
exports.getSubscriptionsResponse = getSubscriptionsResponse;
|
|
2862
|
+
exports.getSubscriptionsResponseNestedFields = getSubscriptionsResponseNestedFields;
|
|
2701
2863
|
exports.getTransactionResponse = getTransactionResponse;
|
|
2702
2864
|
exports.getTransactionResponseNestedFields = getTransactionResponseNestedFields;
|
|
2703
2865
|
exports.getTransactionsResponse = getTransactionsResponse;
|
|
@@ -2713,6 +2875,7 @@ exports.removeStoreCategoryResponseFields = removeStoreCategoryResponseFields;
|
|
|
2713
2875
|
exports.removeStoreResponse = removeStoreResponse;
|
|
2714
2876
|
exports.removeSubscriptionPlanFeatureResponse = removeSubscriptionPlanFeatureResponse;
|
|
2715
2877
|
exports.removeSubscriptionPlanResponse = removeSubscriptionPlanResponse;
|
|
2878
|
+
exports.removeSubscriptionResponse = removeSubscriptionResponse;
|
|
2716
2879
|
exports.saleQuery = saleQuery;
|
|
2717
2880
|
exports.searchCategoriesAndTemplateResponse = searchCategoriesAndTemplateResponse;
|
|
2718
2881
|
exports.searchCategoriesAndTemplateResponseNestedFields = searchCategoriesAndTemplateResponseNestedFields;
|
|
@@ -2740,6 +2903,8 @@ exports.updateSubscriptionPlanFeatureResponse = updateSubscriptionPlanFeatureRes
|
|
|
2740
2903
|
exports.updateSubscriptionPlanFeatureResponseNestedFields = updateSubscriptionPlanFeatureResponseNestedFields;
|
|
2741
2904
|
exports.updateSubscriptionPlanResponse = updateSubscriptionPlanResponse;
|
|
2742
2905
|
exports.updateSubscriptionPlanResponseNestedFields = updateSubscriptionPlanResponseNestedFields;
|
|
2906
|
+
exports.updateSubscriptionResponse = updateSubscriptionResponse;
|
|
2907
|
+
exports.updateSubscriptionResponseNestedFields = updateSubscriptionResponseNestedFields;
|
|
2743
2908
|
exports.updateTransactionResponse = updateTransactionResponse;
|
|
2744
2909
|
exports.updateTransactionResponseNestedFields = updateTransactionResponseNestedFields;
|
|
2745
2910
|
//# sourceMappingURL=index.cjs.js.map
|