@visa-check-r/integrations 0.0.76 → 0.0.78

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
@@ -2795,6 +2795,123 @@ var paystackInitializePaymentResponse = [
2795
2795
  "reference"
2796
2796
  ];
2797
2797
 
2798
+ // src/services/subscription/subscription.entity.ts
2799
+ var couponRedemptionQuery = [
2800
+ "coupon",
2801
+ "couponId",
2802
+ "createdAt",
2803
+ "id",
2804
+ "planId",
2805
+ "transactionAmount",
2806
+ "usedAt",
2807
+ "userId",
2808
+ "valueUsed"
2809
+ ];
2810
+ var couponQuery = [
2811
+ "code",
2812
+ "couponType",
2813
+ "createdAt",
2814
+ "expiredAt",
2815
+ "id",
2816
+ "maxUses",
2817
+ "perUseLimit",
2818
+ "couponStatus",
2819
+ "usedCount",
2820
+ "value"
2821
+ ];
2822
+ var creditPlanQuery = [
2823
+ "createdAt",
2824
+ "credits",
2825
+ "description",
2826
+ "id",
2827
+ "price",
2828
+ "title"
2829
+ ];
2830
+ var creditTransactionQuery = [
2831
+ "createdAt",
2832
+ "creditBalance",
2833
+ "credits",
2834
+ "id",
2835
+ "metaJson",
2836
+ "price",
2837
+ "transactionId",
2838
+ "userId",
2839
+ "planId",
2840
+ "creditTransactionType"
2841
+ ];
2842
+ var serviceCreditCostQuery = [
2843
+ "createdAt",
2844
+ "credits",
2845
+ "id",
2846
+ "serviceName"
2847
+ ];
2848
+
2849
+ // src/services/subscription/types/coupon.type.ts
2850
+ var ENTITY2 = "coupon";
2851
+ var couponIntegration = createStandardEntityIntegration({
2852
+ key: ENTITY2,
2853
+ fields: couponQuery
2854
+ });
2855
+ var couponListIntegration = createListIntegration({
2856
+ key: "coupons",
2857
+ fields: couponQuery
2858
+ });
2859
+ var couponDeleteIntegration = createDeleteIntegration(ENTITY2);
2860
+
2861
+ // src/services/subscription/types/coupon-redemption.type.ts
2862
+ var ENTITY3 = "couponRedemption";
2863
+ var couponRedemptionIntegration = createStandardEntityIntegration({
2864
+ key: ENTITY3,
2865
+ fields: couponRedemptionQuery,
2866
+ nested: {
2867
+ ...couponIntegration.get.nestedFields
2868
+ }
2869
+ });
2870
+ var couponRedemptionListIntegration = createListIntegration({
2871
+ key: "couponRedemptions",
2872
+ fields: couponRedemptionQuery,
2873
+ nested: {
2874
+ ...couponIntegration.get.nestedFields
2875
+ }
2876
+ });
2877
+ var couponRedemptionDeleteIntegration = createDeleteIntegration(ENTITY3);
2878
+
2879
+ // src/services/subscription/types/credit-plan.type.ts
2880
+ var ENTITY4 = "creditPlan";
2881
+ var creditPlanIntegration = createStandardEntityIntegration({
2882
+ key: ENTITY4,
2883
+ fields: creditPlanQuery
2884
+ });
2885
+ var creditPlanListIntegration = createListIntegration({
2886
+ key: "creditPlans",
2887
+ fields: creditPlanQuery
2888
+ });
2889
+ var creditPlanDeleteIntegration = createDeleteIntegration(ENTITY4);
2890
+
2891
+ // src/services/subscription/types/credit-transaction.type.ts
2892
+ var ENTITY5 = "creditTransaction";
2893
+ var creditTransactionIntegration = createStandardEntityIntegration({
2894
+ key: ENTITY5,
2895
+ fields: creditTransactionQuery
2896
+ });
2897
+ var creditTransactionListIntegration = createListIntegration({
2898
+ key: "creditTransactions",
2899
+ fields: creditTransactionQuery
2900
+ });
2901
+ var creditTransactionDeleteIntegration = createDeleteIntegration(ENTITY5);
2902
+
2903
+ // src/services/subscription/types/service-credit-cost.type.ts
2904
+ var ENTITY6 = "serviceCreditCost";
2905
+ var serviceCreditCostIntegration = createStandardEntityIntegration({
2906
+ key: ENTITY6,
2907
+ fields: serviceCreditCostQuery
2908
+ });
2909
+ var serviceCreditCostListIntegration = createListIntegration({
2910
+ key: "serviceCreditCosts",
2911
+ fields: serviceCreditCostQuery
2912
+ });
2913
+ var serviceCreditCostDeleteIntegration = createDeleteIntegration(ENTITY6);
2914
+
2798
2915
  // src/services/subscription/schemas/flutter-customer.schema.ts
2799
2916
  var flutterSchema = {
2800
2917
  createCardObject: (query) => `
@@ -2922,46 +3039,6 @@ var createPaystackService = (client) => ({
2922
3039
  }
2923
3040
  });
2924
3041
 
2925
- // src/services/subscription/subscription.entity.ts
2926
- var creditPlanQuery = [
2927
- "createdAt",
2928
- "credits",
2929
- "description",
2930
- "id",
2931
- "price",
2932
- "title"
2933
- ];
2934
- var creditTransactionQuery = [
2935
- "createdAt",
2936
- "creditBalance",
2937
- "credits",
2938
- "id",
2939
- "metaJson",
2940
- "price",
2941
- "transactionId",
2942
- "userId",
2943
- "planId",
2944
- "creditTransactionType"
2945
- ];
2946
- var serviceCreditCostQuery = [
2947
- "createdAt",
2948
- "credits",
2949
- "id",
2950
- "serviceName"
2951
- ];
2952
-
2953
- // src/services/subscription/types/credit-plan.type.ts
2954
- var ENTITY2 = "creditPlan";
2955
- var creditPlanIntegration = createStandardEntityIntegration({
2956
- key: ENTITY2,
2957
- fields: creditPlanQuery
2958
- });
2959
- var creditPlanListIntegration = createListIntegration({
2960
- key: "creditPlans",
2961
- fields: creditPlanQuery
2962
- });
2963
- var creditPlanDeleteIntegration = createDeleteIntegration(ENTITY2);
2964
-
2965
3042
  // src/services/subscription/schemas/credit-plan.schema.ts
2966
3043
  var creditPlanSchema = {
2967
3044
  get: {
@@ -3045,18 +3122,6 @@ var createCreditPlanService = (client) => ({
3045
3122
  )
3046
3123
  });
3047
3124
 
3048
- // src/services/subscription/types/credit-transaction.type.ts
3049
- var ENTITY3 = "creditTransaction";
3050
- var creditTransactionIntegration = createStandardEntityIntegration({
3051
- key: ENTITY3,
3052
- fields: creditTransactionQuery
3053
- });
3054
- var creditTransactionListIntegration = createListIntegration({
3055
- key: "creditTransactions",
3056
- fields: creditTransactionQuery
3057
- });
3058
- var creditTransactionDeleteIntegration = createDeleteIntegration(ENTITY3);
3059
-
3060
3125
  // src/services/subscription/schemas/credit-transaction.schema.ts
3061
3126
  var creditTransactionSchema = {
3062
3127
  get: {
@@ -3140,18 +3205,6 @@ var createCreditTransactionService = (client) => ({
3140
3205
  )
3141
3206
  });
3142
3207
 
3143
- // src/services/subscription/types/service-credit-cost.type.ts
3144
- var ENTITY4 = "serviceCreditCost";
3145
- var serviceCreditCostIntegration = createStandardEntityIntegration({
3146
- key: ENTITY4,
3147
- fields: serviceCreditCostQuery
3148
- });
3149
- var serviceCreditCostListIntegration = createListIntegration({
3150
- key: "serviceCreditCosts",
3151
- fields: serviceCreditCostQuery
3152
- });
3153
- var serviceCreditCostDeleteIntegration = createDeleteIntegration(ENTITY4);
3154
-
3155
3208
  // src/services/subscription/schemas/service-credit-cost.schema.ts
3156
3209
  var serviceCreditCostSchema = {
3157
3210
  get: {
@@ -3235,6 +3288,187 @@ var createServiceCreditCostService = (client) => ({
3235
3288
  )
3236
3289
  });
3237
3290
 
3291
+ // src/services/subscription/schemas/coupon-redemption.schema.ts
3292
+ var couponRedemptionSchema = {
3293
+ get: {
3294
+ operation: "query",
3295
+ name: "getCouponRedemption",
3296
+ variables: "($couponRedemption: CouponRedemptionInput!)",
3297
+ field: "(couponRedemption: $couponRedemption)"
3298
+ },
3299
+ list: {
3300
+ operation: "query",
3301
+ name: "listCouponRedemptions",
3302
+ variables: "($limit: Int!, $skip: Int!, $search: String, $couponRedemption: CouponRedemptionInput, $couponRedemptionIds: [String])",
3303
+ field: "(limit: $limit, skip: $skip, search: $search, couponRedemption: $couponRedemption, couponRedemptionIds: $couponRedemptionIds)"
3304
+ },
3305
+ create: {
3306
+ operation: "mutation",
3307
+ name: "createCouponRedemption",
3308
+ variables: "($couponRedemption: CouponRedemptionInput!)",
3309
+ field: "(couponRedemption: $couponRedemption)"
3310
+ },
3311
+ update: {
3312
+ operation: "mutation",
3313
+ name: "updateCouponRedemption",
3314
+ variables: "($couponRedemptionId: String!, $couponRedemption: CouponRedemptionInput!)",
3315
+ field: "(couponRedemptionId: $couponRedemptionId, couponRedemption: $couponRedemption)"
3316
+ },
3317
+ delete: {
3318
+ operation: "mutation",
3319
+ name: "deleteCouponRedemption",
3320
+ variables: "($couponRedemptionId: String!)",
3321
+ field: "(couponRedemptionId: $couponRedemptionId)"
3322
+ }
3323
+ };
3324
+
3325
+ // src/services/subscription/coupon-redemption.service.ts
3326
+ var createCouponRedemptionService = (client) => ({
3327
+ createCouponRedemption: createOperationExecutor(
3328
+ client,
3329
+ "createCouponRedemption",
3330
+ {
3331
+ schema: buildSchema(couponRedemptionSchema.create),
3332
+ defaultRootFields: couponRedemptionIntegration.create.responseFields,
3333
+ defaultNestedFields: couponRedemptionIntegration.create.nestedFields
3334
+ }
3335
+ ),
3336
+ updateCouponRedemption: createOperationExecutor(
3337
+ client,
3338
+ "updateCouponRedemption",
3339
+ {
3340
+ schema: buildSchema(couponRedemptionSchema.update),
3341
+ defaultRootFields: couponRedemptionIntegration.update.responseFields,
3342
+ defaultNestedFields: couponRedemptionIntegration.update.nestedFields
3343
+ }
3344
+ ),
3345
+ getCouponRedemption: createOperationExecutor(
3346
+ client,
3347
+ "getCouponRedemption",
3348
+ {
3349
+ schema: buildSchema(couponRedemptionSchema.get),
3350
+ defaultRootFields: couponRedemptionIntegration.get.responseFields,
3351
+ defaultNestedFields: couponRedemptionIntegration.get.nestedFields
3352
+ }
3353
+ ),
3354
+ deleteCouponRedemption: createOperationExecutor(
3355
+ client,
3356
+ "deleteCouponRedemption",
3357
+ {
3358
+ schema: buildSchema(couponRedemptionSchema.delete),
3359
+ defaultRootFields: couponRedemptionDeleteIntegration.responseFields,
3360
+ defaultNestedFields: {}
3361
+ }
3362
+ ),
3363
+ listCouponRedemptions: createOperationExecutor(
3364
+ client,
3365
+ "listCouponRedemptions",
3366
+ {
3367
+ schema: buildSchema(couponRedemptionSchema.list),
3368
+ defaultRootFields: [...couponRedemptionListIntegration.responseFields],
3369
+ defaultNestedFields: couponRedemptionListIntegration.nestedFields
3370
+ }
3371
+ )
3372
+ });
3373
+
3374
+ // src/services/subscription/schemas/coupon.schema.ts
3375
+ var couponSchema = {
3376
+ get: {
3377
+ operation: "query",
3378
+ name: "getCoupon",
3379
+ variables: "($coupon: CouponInput!)",
3380
+ field: "(coupon: $coupon)"
3381
+ },
3382
+ list: {
3383
+ operation: "query",
3384
+ name: "listCoupons",
3385
+ variables: "($limit: Int!, $skip: Int!, $search: String, $coupon: CouponInput, $couponIds: [String])",
3386
+ field: "(limit: $limit, skip: $skip, search: $search, coupon: $coupon, couponIds: $couponIds)"
3387
+ },
3388
+ create: {
3389
+ operation: "mutation",
3390
+ name: "createCoupon",
3391
+ variables: "($coupon: CouponInput!)",
3392
+ field: "(coupon: $coupon)"
3393
+ },
3394
+ update: {
3395
+ operation: "mutation",
3396
+ name: "updateCoupon",
3397
+ variables: "($couponId: String!, $coupon: CouponInput!)",
3398
+ field: "(couponId: $couponId, coupon: $coupon)"
3399
+ },
3400
+ delete: {
3401
+ operation: "mutation",
3402
+ name: "deleteCoupon",
3403
+ variables: "($couponId: String!)",
3404
+ field: "(couponId: $couponId)"
3405
+ },
3406
+ validate: {
3407
+ operation: "mutation",
3408
+ name: "validateCoupon",
3409
+ variables: "($userId: String!, $code: String!)",
3410
+ field: "(userId: $userId, code: $code)"
3411
+ }
3412
+ };
3413
+
3414
+ // src/services/subscription/coupon.service.ts
3415
+ var createCouponService = (client) => ({
3416
+ createCoupon: createOperationExecutor(
3417
+ client,
3418
+ "createCoupon",
3419
+ {
3420
+ schema: buildSchema(couponSchema.create),
3421
+ defaultRootFields: couponIntegration.create.responseFields,
3422
+ defaultNestedFields: couponIntegration.create.nestedFields
3423
+ }
3424
+ ),
3425
+ updateCoupon: createOperationExecutor(
3426
+ client,
3427
+ "updateCoupon",
3428
+ {
3429
+ schema: buildSchema(couponSchema.update),
3430
+ defaultRootFields: couponIntegration.update.responseFields,
3431
+ defaultNestedFields: couponIntegration.update.nestedFields
3432
+ }
3433
+ ),
3434
+ getCoupon: createOperationExecutor(
3435
+ client,
3436
+ "getCoupon",
3437
+ {
3438
+ schema: buildSchema(couponSchema.get),
3439
+ defaultRootFields: couponIntegration.get.responseFields,
3440
+ defaultNestedFields: couponIntegration.get.nestedFields
3441
+ }
3442
+ ),
3443
+ deleteCoupon: createOperationExecutor(
3444
+ client,
3445
+ "deleteCoupon",
3446
+ {
3447
+ schema: buildSchema(couponSchema.delete),
3448
+ defaultRootFields: couponDeleteIntegration.responseFields,
3449
+ defaultNestedFields: {}
3450
+ }
3451
+ ),
3452
+ listCoupons: createOperationExecutor(
3453
+ client,
3454
+ "listCoupons",
3455
+ {
3456
+ schema: buildSchema(couponSchema.list),
3457
+ defaultRootFields: [...couponListIntegration.responseFields],
3458
+ defaultNestedFields: couponListIntegration.nestedFields
3459
+ }
3460
+ ),
3461
+ validateCoupon: createOperationExecutor(
3462
+ client,
3463
+ "validateCoupon",
3464
+ {
3465
+ schema: buildSchema(couponSchema.validate),
3466
+ defaultRootFields: couponIntegration.get.responseFields,
3467
+ defaultNestedFields: couponIntegration.get.nestedFields
3468
+ }
3469
+ )
3470
+ });
3471
+
3238
3472
  // src/services/ai-integration/types/ai-server.entity.ts
3239
3473
  var aiServerAuthQuery = [
3240
3474
  "visaProfileId",
@@ -3294,6 +3528,12 @@ exports._getVisaProfileResponseNestedFields = _getVisaProfileResponseNestedField
3294
3528
  exports._getVisaProfileReviewCommentResponseNestedFields = _getVisaProfileReviewCommentResponseNestedFields;
3295
3529
  exports.compose = compose;
3296
3530
  exports.contactUsResponseFields = contactUsResponseFields;
3531
+ exports.couponDeleteIntegration = couponDeleteIntegration;
3532
+ exports.couponIntegration = couponIntegration;
3533
+ exports.couponListIntegration = couponListIntegration;
3534
+ exports.couponRedemptionDeleteIntegration = couponRedemptionDeleteIntegration;
3535
+ exports.couponRedemptionIntegration = couponRedemptionIntegration;
3536
+ exports.couponRedemptionListIntegration = couponRedemptionListIntegration;
3297
3537
  exports.createAIServerService = createAIServerService;
3298
3538
  exports.createActivityLogService = createActivityLogService;
3299
3539
  exports.createAuthService = createAuthService;
@@ -3305,6 +3545,8 @@ exports.createConsultantAssignmentResponseFields = createConsultantAssignmentRes
3305
3545
  exports.createConsultantAssignmentResponseNestedFields = createConsultantAssignmentResponseNestedFields;
3306
3546
  exports.createConsultantAssignmentService = createConsultantAssignmentService;
3307
3547
  exports.createConsultantInviteService = createConsultantInviteService;
3548
+ exports.createCouponRedemptionService = createCouponRedemptionService;
3549
+ exports.createCouponService = createCouponService;
3308
3550
  exports.createCreditPlanService = createCreditPlanService;
3309
3551
  exports.createCreditTransactionService = createCreditTransactionService;
3310
3552
  exports.createCustomerObjectResponse = createCustomerObjectResponse;
@@ -3341,6 +3583,12 @@ exports.createVisaProfileReviewCommentResponseFields = createVisaProfileReviewCo
3341
3583
  exports.createVisaProfileReviewCommentResponseNestedFields = createVisaProfileReviewCommentResponseNestedFields;
3342
3584
  exports.createVisaProfileReviewCommentService = createVisaProfileReviewCommentService;
3343
3585
  exports.createVisaProfileService = createVisaProfileService;
3586
+ exports.creditPlanDeleteIntegration = creditPlanDeleteIntegration;
3587
+ exports.creditPlanIntegration = creditPlanIntegration;
3588
+ exports.creditPlanListIntegration = creditPlanListIntegration;
3589
+ exports.creditTransactionDeleteIntegration = creditTransactionDeleteIntegration;
3590
+ exports.creditTransactionIntegration = creditTransactionIntegration;
3591
+ exports.creditTransactionListIntegration = creditTransactionListIntegration;
3344
3592
  exports.deleteChecklistItemResponse = deleteChecklistItemResponse;
3345
3593
  exports.deleteConsultantAssignmentResponseFields = deleteConsultantAssignmentResponseFields;
3346
3594
  exports.deleteReadinessScoreReviewResponseFields = deleteReadinessScoreReviewResponseFields;
@@ -3419,6 +3667,9 @@ exports.meResponseNestedFields = meResponseNestedFields;
3419
3667
  exports.paystackInitializePaymentResponse = paystackInitializePaymentResponse;
3420
3668
  exports.resetPasswordResponseFields = resetPasswordResponseFields;
3421
3669
  exports.sendOTPResponseFields = sendOTPResponseFields;
3670
+ exports.serviceCreditCostDeleteIntegration = serviceCreditCostDeleteIntegration;
3671
+ exports.serviceCreditCostIntegration = serviceCreditCostIntegration;
3672
+ exports.serviceCreditCostListIntegration = serviceCreditCostListIntegration;
3422
3673
  exports.signUpResponseFields = signUpResponseFields;
3423
3674
  exports.toAsyncHeadersFactory = toAsyncHeadersFactory;
3424
3675
  exports.toAsyncTokenProvider = toAsyncTokenProvider;