@connect-plus-online/ogabai-integrations 0.0.53 → 0.0.55

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 CHANGED
@@ -2266,6 +2266,13 @@ var createTransactionService = (client) => ({
2266
2266
 
2267
2267
  // src/services/subscription/schemas/paystack.schema.ts
2268
2268
  var paystackSchema = {
2269
+ paystackInitializeSubscription: (query) => `
2270
+ mutation paystackInitializeSubscription($userId: String!, $planId: String!, $subscriptionFrequencyType: SubscriptionFrequencyTypeEnum!) {
2271
+ paystackInitializeSubscription(userId: $userId, planId: $planId, subscriptionFrequencyType: $subscriptionFrequencyType) {
2272
+ ${query}
2273
+ }
2274
+ }
2275
+ `,
2269
2276
  paystackInitializePayment: (query) => `
2270
2277
  mutation paystackInitializePayment($userId: String!) {
2271
2278
  paystackInitializePayment(userId: $userId) {
@@ -2277,13 +2284,27 @@ var paystackSchema = {
2277
2284
 
2278
2285
  // src/services/subscription/types/paystack.ts
2279
2286
  var paystackInitializePaymentResponse = [
2280
- "access_code",
2281
- "authorization_url",
2287
+ "accessCode",
2288
+ "authorizationUrl",
2282
2289
  "reference"
2283
2290
  ];
2291
+ var paystackInitializeSubscriptionResponse = paystackInitializePaymentResponse;
2284
2292
 
2285
2293
  // src/services/subscription/paystack.service.ts
2286
2294
  var createPaystackService = (client) => ({
2295
+ async paystackInitializeSubscription(input, fetchFields, option) {
2296
+ var _a, _b, _c;
2297
+ const res = await client.request(
2298
+ paystackSchema.paystackInitializeSubscription(
2299
+ gqlQueryStringBuilder(
2300
+ (_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : paystackInitializeSubscriptionResponse
2301
+ )
2302
+ ),
2303
+ input,
2304
+ option
2305
+ );
2306
+ return (_c = (_b = res.data) == null ? void 0 : _b.paystackInitializeSubscription) != null ? _c : null;
2307
+ },
2287
2308
  async paystackInitializePayment(input, fetchFields, option) {
2288
2309
  var _a, _b;
2289
2310
  const res = await client.request(
@@ -2328,7 +2349,6 @@ var subscriptionPlanQuery = [
2328
2349
  "code",
2329
2350
  "title",
2330
2351
  "description",
2331
- "subscriptionPlanPrice",
2332
2352
  "currency",
2333
2353
  "period",
2334
2354
  "trialDays",
@@ -2336,7 +2356,9 @@ var subscriptionPlanQuery = [
2336
2356
  "createdAt",
2337
2357
  "updatedAt",
2338
2358
  "subscriptionPlanFeatureIds",
2339
- "features"
2359
+ "features",
2360
+ "monthlyPlanPrice",
2361
+ "annuallyPlanPrice"
2340
2362
  ];
2341
2363
 
2342
2364
  // src/services/subscription/types/subscription-plan-feature.type.ts
@@ -2868,6 +2890,7 @@ exports.getTransactionsResponse = getTransactionsResponse;
2868
2890
  exports.getTransactionsResponseNestedFields = getTransactionsResponseNestedFields;
2869
2891
  exports.orderQuery = orderQuery;
2870
2892
  exports.paystackInitializePaymentResponse = paystackInitializePaymentResponse;
2893
+ exports.paystackInitializeSubscriptionResponse = paystackInitializeSubscriptionResponse;
2871
2894
  exports.removePackageResponseFields = removePackageResponseFields;
2872
2895
  exports.removePriceResponseFields = removePriceResponseFields;
2873
2896
  exports.removeProductResponseFields = removeProductResponseFields;