@visa-check-r/integrations 0.0.75 → 0.0.77

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,117 @@ 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-redemption.type.ts
2850
+ var ENTITY2 = "couponRedemption";
2851
+ var couponRedemptionIntegration = createStandardEntityIntegration({
2852
+ key: ENTITY2,
2853
+ fields: couponRedemptionQuery
2854
+ });
2855
+ var couponRedemptionListIntegration = createListIntegration({
2856
+ key: "couponRedemptions",
2857
+ fields: couponRedemptionQuery
2858
+ });
2859
+ var couponRedemptionDeleteIntegration = createDeleteIntegration(ENTITY2);
2860
+
2861
+ // src/services/subscription/types/coupon.type.ts
2862
+ var ENTITY3 = "coupon";
2863
+ var couponIntegration = createStandardEntityIntegration({
2864
+ key: ENTITY3,
2865
+ fields: couponQuery
2866
+ });
2867
+ var couponListIntegration = createListIntegration({
2868
+ key: "coupons",
2869
+ fields: couponQuery
2870
+ });
2871
+ var couponDeleteIntegration = createDeleteIntegration(ENTITY3);
2872
+
2873
+ // src/services/subscription/types/credit-plan.type.ts
2874
+ var ENTITY4 = "creditPlan";
2875
+ var creditPlanIntegration = createStandardEntityIntegration({
2876
+ key: ENTITY4,
2877
+ fields: creditPlanQuery
2878
+ });
2879
+ var creditPlanListIntegration = createListIntegration({
2880
+ key: "creditPlans",
2881
+ fields: creditPlanQuery
2882
+ });
2883
+ var creditPlanDeleteIntegration = createDeleteIntegration(ENTITY4);
2884
+
2885
+ // src/services/subscription/types/credit-transaction.type.ts
2886
+ var ENTITY5 = "creditTransaction";
2887
+ var creditTransactionIntegration = createStandardEntityIntegration({
2888
+ key: ENTITY5,
2889
+ fields: creditTransactionQuery
2890
+ });
2891
+ var creditTransactionListIntegration = createListIntegration({
2892
+ key: "creditTransactions",
2893
+ fields: creditTransactionQuery
2894
+ });
2895
+ var creditTransactionDeleteIntegration = createDeleteIntegration(ENTITY5);
2896
+
2897
+ // src/services/subscription/types/service-credit-cost.type.ts
2898
+ var ENTITY6 = "serviceCreditCost";
2899
+ var serviceCreditCostIntegration = createStandardEntityIntegration({
2900
+ key: ENTITY6,
2901
+ fields: serviceCreditCostQuery
2902
+ });
2903
+ var serviceCreditCostListIntegration = createListIntegration({
2904
+ key: "serviceCreditCosts",
2905
+ fields: serviceCreditCostQuery
2906
+ });
2907
+ var serviceCreditCostDeleteIntegration = createDeleteIntegration(ENTITY6);
2908
+
2798
2909
  // src/services/subscription/schemas/flutter-customer.schema.ts
2799
2910
  var flutterSchema = {
2800
2911
  createCardObject: (query) => `
@@ -2922,46 +3033,6 @@ var createPaystackService = (client) => ({
2922
3033
  }
2923
3034
  });
2924
3035
 
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
3036
  // src/services/subscription/schemas/credit-plan.schema.ts
2966
3037
  var creditPlanSchema = {
2967
3038
  get: {
@@ -3045,18 +3116,6 @@ var createCreditPlanService = (client) => ({
3045
3116
  )
3046
3117
  });
3047
3118
 
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
3119
  // src/services/subscription/schemas/credit-transaction.schema.ts
3061
3120
  var creditTransactionSchema = {
3062
3121
  get: {
@@ -3140,18 +3199,6 @@ var createCreditTransactionService = (client) => ({
3140
3199
  )
3141
3200
  });
3142
3201
 
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
3202
  // src/services/subscription/schemas/service-credit-cost.schema.ts
3156
3203
  var serviceCreditCostSchema = {
3157
3204
  get: {
@@ -3235,6 +3282,187 @@ var createServiceCreditCostService = (client) => ({
3235
3282
  )
3236
3283
  });
3237
3284
 
3285
+ // src/services/subscription/schemas/coupon-redemption.schema.ts
3286
+ var couponRedemptionSchema = {
3287
+ get: {
3288
+ operation: "query",
3289
+ name: "getCouponRedemption",
3290
+ variables: "($couponRedemption: CouponRedemptionInput!)",
3291
+ field: "(couponRedemption: $couponRedemption)"
3292
+ },
3293
+ list: {
3294
+ operation: "query",
3295
+ name: "listCouponRedemptions",
3296
+ variables: "($limit: Int!, $skip: Int!, $search: String, $couponRedemption: CouponRedemptionInput, $couponRedemptionIds: [String])",
3297
+ field: "(limit: $limit, skip: $skip, search: $search, couponRedemption: $couponRedemption, couponRedemptionIds: $couponRedemptionIds)"
3298
+ },
3299
+ create: {
3300
+ operation: "mutation",
3301
+ name: "createCouponRedemption",
3302
+ variables: "($couponRedemption: CouponRedemptionInput!)",
3303
+ field: "(couponRedemption: $couponRedemption)"
3304
+ },
3305
+ update: {
3306
+ operation: "mutation",
3307
+ name: "updateCouponRedemption",
3308
+ variables: "($couponRedemptionId: String!, $couponRedemption: CouponRedemptionInput!)",
3309
+ field: "(couponRedemptionId: $couponRedemptionId, couponRedemption: $couponRedemption)"
3310
+ },
3311
+ delete: {
3312
+ operation: "mutation",
3313
+ name: "deleteCouponRedemption",
3314
+ variables: "($couponRedemptionId: String!)",
3315
+ field: "(couponRedemptionId: $couponRedemptionId)"
3316
+ }
3317
+ };
3318
+
3319
+ // src/services/subscription/coupon-redemption.service.ts
3320
+ var createCouponRedemptionService = (client) => ({
3321
+ createCouponRedemption: createOperationExecutor(
3322
+ client,
3323
+ "createCouponRedemption",
3324
+ {
3325
+ schema: buildSchema(couponRedemptionSchema.create),
3326
+ defaultRootFields: couponRedemptionIntegration.create.responseFields,
3327
+ defaultNestedFields: couponRedemptionIntegration.create.nestedFields
3328
+ }
3329
+ ),
3330
+ updateCouponRedemption: createOperationExecutor(
3331
+ client,
3332
+ "updateCouponRedemption",
3333
+ {
3334
+ schema: buildSchema(couponRedemptionSchema.update),
3335
+ defaultRootFields: couponRedemptionIntegration.update.responseFields,
3336
+ defaultNestedFields: couponRedemptionIntegration.update.nestedFields
3337
+ }
3338
+ ),
3339
+ getCouponRedemption: createOperationExecutor(
3340
+ client,
3341
+ "getCouponRedemption",
3342
+ {
3343
+ schema: buildSchema(couponRedemptionSchema.get),
3344
+ defaultRootFields: couponRedemptionIntegration.get.responseFields,
3345
+ defaultNestedFields: couponRedemptionIntegration.get.nestedFields
3346
+ }
3347
+ ),
3348
+ deleteCouponRedemption: createOperationExecutor(
3349
+ client,
3350
+ "deleteCouponRedemption",
3351
+ {
3352
+ schema: buildSchema(couponRedemptionSchema.delete),
3353
+ defaultRootFields: couponRedemptionDeleteIntegration.responseFields,
3354
+ defaultNestedFields: {}
3355
+ }
3356
+ ),
3357
+ listCouponRedemptions: createOperationExecutor(
3358
+ client,
3359
+ "listCouponRedemptions",
3360
+ {
3361
+ schema: buildSchema(couponRedemptionSchema.list),
3362
+ defaultRootFields: [...couponRedemptionListIntegration.responseFields],
3363
+ defaultNestedFields: couponRedemptionListIntegration.nestedFields
3364
+ }
3365
+ )
3366
+ });
3367
+
3368
+ // src/services/subscription/schemas/coupon.schema.ts
3369
+ var couponSchema = {
3370
+ get: {
3371
+ operation: "query",
3372
+ name: "getCoupon",
3373
+ variables: "($coupon: CouponInput!)",
3374
+ field: "(coupon: $coupon)"
3375
+ },
3376
+ list: {
3377
+ operation: "query",
3378
+ name: "listCoupons",
3379
+ variables: "($limit: Int!, $skip: Int!, $search: String, $coupon: CouponInput, $couponIds: [String])",
3380
+ field: "(limit: $limit, skip: $skip, search: $search, coupon: $coupon, couponIds: $couponIds)"
3381
+ },
3382
+ create: {
3383
+ operation: "mutation",
3384
+ name: "createCoupon",
3385
+ variables: "($coupon: CouponInput!)",
3386
+ field: "(coupon: $coupon)"
3387
+ },
3388
+ update: {
3389
+ operation: "mutation",
3390
+ name: "updateCoupon",
3391
+ variables: "($couponId: String!, $coupon: CouponInput!)",
3392
+ field: "(couponId: $couponId, coupon: $coupon)"
3393
+ },
3394
+ delete: {
3395
+ operation: "mutation",
3396
+ name: "deleteCoupon",
3397
+ variables: "($couponId: String!)",
3398
+ field: "(couponId: $couponId)"
3399
+ },
3400
+ validate: {
3401
+ operation: "mutation",
3402
+ name: "validateCoupon",
3403
+ variables: "($userId: String!, $code: String!)",
3404
+ field: "(userId: $userId, code: $code)"
3405
+ }
3406
+ };
3407
+
3408
+ // src/services/subscription/coupon.service.ts
3409
+ var createCouponService = (client) => ({
3410
+ createCoupon: createOperationExecutor(
3411
+ client,
3412
+ "createCoupon",
3413
+ {
3414
+ schema: buildSchema(couponSchema.create),
3415
+ defaultRootFields: couponIntegration.create.responseFields,
3416
+ defaultNestedFields: couponIntegration.create.nestedFields
3417
+ }
3418
+ ),
3419
+ updateCoupon: createOperationExecutor(
3420
+ client,
3421
+ "updateCoupon",
3422
+ {
3423
+ schema: buildSchema(couponSchema.update),
3424
+ defaultRootFields: couponIntegration.update.responseFields,
3425
+ defaultNestedFields: couponIntegration.update.nestedFields
3426
+ }
3427
+ ),
3428
+ getCoupon: createOperationExecutor(
3429
+ client,
3430
+ "getCoupon",
3431
+ {
3432
+ schema: buildSchema(couponSchema.get),
3433
+ defaultRootFields: couponIntegration.get.responseFields,
3434
+ defaultNestedFields: couponIntegration.get.nestedFields
3435
+ }
3436
+ ),
3437
+ deleteCoupon: createOperationExecutor(
3438
+ client,
3439
+ "deleteCoupon",
3440
+ {
3441
+ schema: buildSchema(couponSchema.delete),
3442
+ defaultRootFields: couponDeleteIntegration.responseFields,
3443
+ defaultNestedFields: {}
3444
+ }
3445
+ ),
3446
+ listCoupons: createOperationExecutor(
3447
+ client,
3448
+ "listCoupons",
3449
+ {
3450
+ schema: buildSchema(couponSchema.list),
3451
+ defaultRootFields: [...couponListIntegration.responseFields],
3452
+ defaultNestedFields: couponListIntegration.nestedFields
3453
+ }
3454
+ ),
3455
+ validateCoupon: createOperationExecutor(
3456
+ client,
3457
+ "validateCoupon",
3458
+ {
3459
+ schema: buildSchema(couponSchema.validate),
3460
+ defaultRootFields: couponIntegration.get.responseFields,
3461
+ defaultNestedFields: couponIntegration.get.nestedFields
3462
+ }
3463
+ )
3464
+ });
3465
+
3238
3466
  // src/services/ai-integration/types/ai-server.entity.ts
3239
3467
  var aiServerAuthQuery = [
3240
3468
  "visaProfileId",
@@ -3294,6 +3522,12 @@ exports._getVisaProfileResponseNestedFields = _getVisaProfileResponseNestedField
3294
3522
  exports._getVisaProfileReviewCommentResponseNestedFields = _getVisaProfileReviewCommentResponseNestedFields;
3295
3523
  exports.compose = compose;
3296
3524
  exports.contactUsResponseFields = contactUsResponseFields;
3525
+ exports.couponDeleteIntegration = couponDeleteIntegration;
3526
+ exports.couponIntegration = couponIntegration;
3527
+ exports.couponListIntegration = couponListIntegration;
3528
+ exports.couponRedemptionDeleteIntegration = couponRedemptionDeleteIntegration;
3529
+ exports.couponRedemptionIntegration = couponRedemptionIntegration;
3530
+ exports.couponRedemptionListIntegration = couponRedemptionListIntegration;
3297
3531
  exports.createAIServerService = createAIServerService;
3298
3532
  exports.createActivityLogService = createActivityLogService;
3299
3533
  exports.createAuthService = createAuthService;
@@ -3305,6 +3539,8 @@ exports.createConsultantAssignmentResponseFields = createConsultantAssignmentRes
3305
3539
  exports.createConsultantAssignmentResponseNestedFields = createConsultantAssignmentResponseNestedFields;
3306
3540
  exports.createConsultantAssignmentService = createConsultantAssignmentService;
3307
3541
  exports.createConsultantInviteService = createConsultantInviteService;
3542
+ exports.createCouponRedemptionService = createCouponRedemptionService;
3543
+ exports.createCouponService = createCouponService;
3308
3544
  exports.createCreditPlanService = createCreditPlanService;
3309
3545
  exports.createCreditTransactionService = createCreditTransactionService;
3310
3546
  exports.createCustomerObjectResponse = createCustomerObjectResponse;
@@ -3341,6 +3577,12 @@ exports.createVisaProfileReviewCommentResponseFields = createVisaProfileReviewCo
3341
3577
  exports.createVisaProfileReviewCommentResponseNestedFields = createVisaProfileReviewCommentResponseNestedFields;
3342
3578
  exports.createVisaProfileReviewCommentService = createVisaProfileReviewCommentService;
3343
3579
  exports.createVisaProfileService = createVisaProfileService;
3580
+ exports.creditPlanDeleteIntegration = creditPlanDeleteIntegration;
3581
+ exports.creditPlanIntegration = creditPlanIntegration;
3582
+ exports.creditPlanListIntegration = creditPlanListIntegration;
3583
+ exports.creditTransactionDeleteIntegration = creditTransactionDeleteIntegration;
3584
+ exports.creditTransactionIntegration = creditTransactionIntegration;
3585
+ exports.creditTransactionListIntegration = creditTransactionListIntegration;
3344
3586
  exports.deleteChecklistItemResponse = deleteChecklistItemResponse;
3345
3587
  exports.deleteConsultantAssignmentResponseFields = deleteConsultantAssignmentResponseFields;
3346
3588
  exports.deleteReadinessScoreReviewResponseFields = deleteReadinessScoreReviewResponseFields;
@@ -3419,6 +3661,9 @@ exports.meResponseNestedFields = meResponseNestedFields;
3419
3661
  exports.paystackInitializePaymentResponse = paystackInitializePaymentResponse;
3420
3662
  exports.resetPasswordResponseFields = resetPasswordResponseFields;
3421
3663
  exports.sendOTPResponseFields = sendOTPResponseFields;
3664
+ exports.serviceCreditCostDeleteIntegration = serviceCreditCostDeleteIntegration;
3665
+ exports.serviceCreditCostIntegration = serviceCreditCostIntegration;
3666
+ exports.serviceCreditCostListIntegration = serviceCreditCostListIntegration;
3422
3667
  exports.signUpResponseFields = signUpResponseFields;
3423
3668
  exports.toAsyncHeadersFactory = toAsyncHeadersFactory;
3424
3669
  exports.toAsyncTokenProvider = toAsyncTokenProvider;