@visa-check-r/integrations 0.0.85 → 0.0.87

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
@@ -250,6 +250,14 @@ var userSchema = {
250
250
  };
251
251
 
252
252
  // src/services/user/user.entity.ts
253
+ var notificationQuery = [
254
+ "id",
255
+ "userId",
256
+ "title",
257
+ "message",
258
+ "isRead",
259
+ "createdAt"
260
+ ];
253
261
  var partnerMatricesQuery = [
254
262
  "approvedApplications",
255
263
  "rejectedApplications",
@@ -1370,6 +1378,106 @@ var createUserCreditService = (client) => ({
1370
1378
  )
1371
1379
  });
1372
1380
 
1381
+ // src/services/user/schemas/notification.schema.ts
1382
+ var notificationSchema = {
1383
+ get: {
1384
+ operation: "query",
1385
+ name: "getNotification",
1386
+ variables: "($notification: NotificationInput!)",
1387
+ field: "(notification: $notification)"
1388
+ },
1389
+ list: {
1390
+ operation: "query",
1391
+ name: "listNotifications",
1392
+ variables: "($limit: Int!, $skip: Int!, $search: String, $notification: NotificationInput, $notificationIds: [String])",
1393
+ field: "(limit: $limit, skip: $skip, search: $search, notification: $notification, notificationIds: $notificationIds)"
1394
+ },
1395
+ create: {
1396
+ operation: "mutation",
1397
+ name: "createNotification",
1398
+ variables: "($notification: NotificationInput!)",
1399
+ field: "(notification: $notification)"
1400
+ },
1401
+ update: {
1402
+ operation: "mutation",
1403
+ name: "updateNotification",
1404
+ variables: "($notificationId: String!, $notification: NotificationInput!)",
1405
+ field: "(notificationId: $notificationId, notification: $notification)"
1406
+ },
1407
+ delete: {
1408
+ operation: "mutation",
1409
+ name: "deleteNotification",
1410
+ variables: "($notificationId: String!)",
1411
+ field: "(notificationId: $notificationId)"
1412
+ }
1413
+ };
1414
+
1415
+ // src/services/user/types/notification.type.ts
1416
+ var ENTITY2 = "notification";
1417
+ var notificationIntegration = createStandardEntityIntegration({
1418
+ key: ENTITY2,
1419
+ fields: notificationQuery
1420
+ });
1421
+ var notificationListIntegration = createListIntegration({
1422
+ key: "notifications",
1423
+ fields: notificationQuery
1424
+ });
1425
+ var notificationDeleteIntegration = createDeleteIntegration(ENTITY2);
1426
+
1427
+ // src/services/user/notification.service.ts
1428
+ var createNotificationService = (client) => ({
1429
+ // get notification
1430
+ getNotification: createOperationExecutor(
1431
+ client,
1432
+ "getNotification",
1433
+ {
1434
+ schema: buildSchema(notificationSchema.get),
1435
+ defaultRootFields: notificationIntegration.get.responseFields,
1436
+ defaultNestedFields: notificationIntegration.get.nestedFields
1437
+ }
1438
+ ),
1439
+ // list notifications
1440
+ listNotifications: createOperationExecutor(
1441
+ client,
1442
+ "listNotifications",
1443
+ {
1444
+ schema: buildSchema(notificationSchema.list),
1445
+ defaultRootFields: [...notificationListIntegration.responseFields],
1446
+ defaultNestedFields: notificationListIntegration.nestedFields
1447
+ }
1448
+ ),
1449
+ // create notification
1450
+ createNotification: createOperationExecutor(
1451
+ client,
1452
+ "createNotification",
1453
+ {
1454
+ schema: buildSchema(notificationSchema.create),
1455
+ defaultRootFields: notificationIntegration.create.responseFields,
1456
+ defaultNestedFields: notificationIntegration.create.nestedFields
1457
+ }
1458
+ ),
1459
+ // update notification
1460
+ updateNotification: createOperationExecutor(
1461
+ client,
1462
+ "updateNotification",
1463
+ {
1464
+ schema: buildSchema(notificationSchema.update),
1465
+ defaultRootFields: notificationIntegration.update.responseFields,
1466
+ defaultNestedFields: notificationIntegration.update.nestedFields
1467
+ }
1468
+ ),
1469
+ // delete notification
1470
+ deleteNotification: createOperationExecutor(
1471
+ client,
1472
+ "deleteNotification",
1473
+ {
1474
+ schema: buildSchema(notificationSchema.delete),
1475
+ defaultRootFields: notificationDeleteIntegration.responseFields,
1476
+ defaultNestedFields: {}
1477
+ }
1478
+ )
1479
+ });
1480
+
1373
1481
  // src/services/checklist/schemas/checklist-item.schema.ts
1374
1482
  var checklistItemSchema = {
1375
1483
  getChecklistItemCount: (query) => `
@@ -1660,8 +1768,9 @@ var deleteVisaProfileChecklistItemResponse = ["visaProfileChecklistItemId"];
1660
1768
  var createVisaProfileChecklistItemService = (client) => ({
1661
1769
  // upload file
1662
1770
  async uploadChecklistImage(form) {
1771
+ var _a;
1663
1772
  const fileClient = createFileService(client);
1664
- return (await fileClient.uploadFile(form)).visaProfileChecklistItem;
1773
+ return (_a = await fileClient.uploadFile(form)) == null ? void 0 : _a.visaProfileChecklistItem;
1665
1774
  },
1666
1775
  async deleteVisaProfileChecklistItem(input, fetchFields, option) {
1667
1776
  var _a, _b;
@@ -2925,21 +3034,21 @@ var serviceCreditCostQuery = [
2925
3034
  ];
2926
3035
 
2927
3036
  // src/services/subscription/types/coupon.type.ts
2928
- var ENTITY2 = "coupon";
3037
+ var ENTITY3 = "coupon";
2929
3038
  var couponIntegration = createStandardEntityIntegration({
2930
- key: ENTITY2,
3039
+ key: ENTITY3,
2931
3040
  fields: couponQuery
2932
3041
  });
2933
3042
  var couponListIntegration = createListIntegration({
2934
3043
  key: "coupons",
2935
3044
  fields: couponQuery
2936
3045
  });
2937
- var couponDeleteIntegration = createDeleteIntegration(ENTITY2);
3046
+ var couponDeleteIntegration = createDeleteIntegration(ENTITY3);
2938
3047
 
2939
3048
  // src/services/subscription/types/coupon-redemption.type.ts
2940
- var ENTITY3 = "couponRedemption";
3049
+ var ENTITY4 = "couponRedemption";
2941
3050
  var couponRedemptionIntegration = createStandardEntityIntegration({
2942
- key: ENTITY3,
3051
+ key: ENTITY4,
2943
3052
  fields: couponRedemptionQuery,
2944
3053
  nested: {
2945
3054
  ...couponIntegration.get.nestedFields
@@ -2952,24 +3061,24 @@ var couponRedemptionListIntegration = createListIntegration({
2952
3061
  ...couponIntegration.get.nestedFields
2953
3062
  }
2954
3063
  });
2955
- var couponRedemptionDeleteIntegration = createDeleteIntegration(ENTITY3);
3064
+ var couponRedemptionDeleteIntegration = createDeleteIntegration(ENTITY4);
2956
3065
 
2957
3066
  // src/services/subscription/types/credit-plan.type.ts
2958
- var ENTITY4 = "creditPlan";
3067
+ var ENTITY5 = "creditPlan";
2959
3068
  var creditPlanIntegration = createStandardEntityIntegration({
2960
- key: ENTITY4,
3069
+ key: ENTITY5,
2961
3070
  fields: creditPlanQuery
2962
3071
  });
2963
3072
  var creditPlanListIntegration = createListIntegration({
2964
3073
  key: "creditPlans",
2965
3074
  fields: creditPlanQuery
2966
3075
  });
2967
- var creditPlanDeleteIntegration = createDeleteIntegration(ENTITY4);
3076
+ var creditPlanDeleteIntegration = createDeleteIntegration(ENTITY5);
2968
3077
 
2969
3078
  // src/services/subscription/types/credit-transaction.type.ts
2970
- var ENTITY5 = "creditTransaction";
3079
+ var ENTITY6 = "creditTransaction";
2971
3080
  var creditTransactionIntegration = createStandardEntityIntegration({
2972
- key: ENTITY5,
3081
+ key: ENTITY6,
2973
3082
  fields: creditTransactionQuery,
2974
3083
  nested: {
2975
3084
  ...getUserResponseNestedFields
@@ -2982,19 +3091,19 @@ var creditTransactionListIntegration = createListIntegration({
2982
3091
  ...getUserResponseNestedFields
2983
3092
  }
2984
3093
  });
2985
- var creditTransactionDeleteIntegration = createDeleteIntegration(ENTITY5);
3094
+ var creditTransactionDeleteIntegration = createDeleteIntegration(ENTITY6);
2986
3095
 
2987
3096
  // src/services/subscription/types/service-credit-cost.type.ts
2988
- var ENTITY6 = "serviceCreditCost";
3097
+ var ENTITY7 = "serviceCreditCost";
2989
3098
  var serviceCreditCostIntegration = createStandardEntityIntegration({
2990
- key: ENTITY6,
3099
+ key: ENTITY7,
2991
3100
  fields: serviceCreditCostQuery
2992
3101
  });
2993
3102
  var serviceCreditCostListIntegration = createListIntegration({
2994
3103
  key: "serviceCreditCosts",
2995
3104
  fields: serviceCreditCostQuery
2996
3105
  });
2997
- var serviceCreditCostDeleteIntegration = createDeleteIntegration(ENTITY6);
3106
+ var serviceCreditCostDeleteIntegration = createDeleteIntegration(ENTITY7);
2998
3107
 
2999
3108
  // src/services/subscription/schemas/flutter-customer.schema.ts
3000
3109
  var flutterSchema = {
@@ -3635,6 +3744,7 @@ exports.createCreditPlanService = createCreditPlanService;
3635
3744
  exports.createCreditTransactionService = createCreditTransactionService;
3636
3745
  exports.createCustomerObjectResponse = createCustomerObjectResponse;
3637
3746
  exports.createFlutterwaveService = createFlutterwaveService;
3747
+ exports.createNotificationService = createNotificationService;
3638
3748
  exports.createPaystackService = createPaystackService;
3639
3749
  exports.createReadinessScoreReviewResponseFields = createReadinessScoreReviewResponseFields;
3640
3750
  exports.createReadinessScoreReviewResponseNestedFields = createReadinessScoreReviewResponseNestedFields;