@visa-check-r/integrations 0.0.66 → 0.0.68
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 +367 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +115 -1
- package/dist/index.d.ts +115 -1
- package/dist/index.esm.js +365 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2835,6 +2835,370 @@ var createPaystackService = (client) => ({
|
|
|
2835
2835
|
}
|
|
2836
2836
|
});
|
|
2837
2837
|
|
|
2838
|
+
// src/helpers/entity.factory.ts
|
|
2839
|
+
function createEntityIntegration(config) {
|
|
2840
|
+
var _a;
|
|
2841
|
+
return {
|
|
2842
|
+
responseFields: [config.key],
|
|
2843
|
+
nestedFields: {
|
|
2844
|
+
...(_a = config.nested) != null ? _a : {},
|
|
2845
|
+
[config.key]: config.fields
|
|
2846
|
+
}
|
|
2847
|
+
};
|
|
2848
|
+
}
|
|
2849
|
+
function createListIntegration(config) {
|
|
2850
|
+
var _a;
|
|
2851
|
+
return {
|
|
2852
|
+
responseFields: [config.key, "total"],
|
|
2853
|
+
nestedFields: {
|
|
2854
|
+
...(_a = config.nested) != null ? _a : {},
|
|
2855
|
+
[config.key]: config.fields
|
|
2856
|
+
}
|
|
2857
|
+
};
|
|
2858
|
+
}
|
|
2859
|
+
function createDeleteIntegration(key) {
|
|
2860
|
+
const idKey = `${key}Id`;
|
|
2861
|
+
return {
|
|
2862
|
+
responseFields: [idKey]
|
|
2863
|
+
};
|
|
2864
|
+
}
|
|
2865
|
+
function createStandardEntityIntegration(config) {
|
|
2866
|
+
const base = createEntityIntegration(config);
|
|
2867
|
+
return {
|
|
2868
|
+
get: base,
|
|
2869
|
+
create: base,
|
|
2870
|
+
update: base
|
|
2871
|
+
};
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2874
|
+
// src/services/subscription/subscription.entity.ts
|
|
2875
|
+
var creditPlanQuery = [
|
|
2876
|
+
"createdAt",
|
|
2877
|
+
"credits",
|
|
2878
|
+
"description",
|
|
2879
|
+
"id",
|
|
2880
|
+
"price",
|
|
2881
|
+
"title"
|
|
2882
|
+
];
|
|
2883
|
+
var creditTransactionQuery = [
|
|
2884
|
+
"createdAt",
|
|
2885
|
+
"creditBalance",
|
|
2886
|
+
"credits",
|
|
2887
|
+
"id",
|
|
2888
|
+
"metaJson",
|
|
2889
|
+
"price",
|
|
2890
|
+
"transactionId",
|
|
2891
|
+
"userId",
|
|
2892
|
+
"planId"
|
|
2893
|
+
];
|
|
2894
|
+
var serviceCreditCostQuery = [
|
|
2895
|
+
"createdAt",
|
|
2896
|
+
"credits",
|
|
2897
|
+
"id",
|
|
2898
|
+
"serviceName"
|
|
2899
|
+
];
|
|
2900
|
+
|
|
2901
|
+
// src/services/subscription/types/credit-plan.type.ts
|
|
2902
|
+
var ENTITY = "creditPlan";
|
|
2903
|
+
var creditPlanIntegration = createStandardEntityIntegration({
|
|
2904
|
+
key: ENTITY,
|
|
2905
|
+
fields: creditPlanQuery
|
|
2906
|
+
});
|
|
2907
|
+
var creditPlanListIntegration = createListIntegration({
|
|
2908
|
+
key: "creditPlans",
|
|
2909
|
+
fields: creditPlanQuery
|
|
2910
|
+
});
|
|
2911
|
+
var creditPlanDeleteIntegration = createDeleteIntegration(ENTITY);
|
|
2912
|
+
|
|
2913
|
+
// src/services/subscription/schemas/credit-plan.schema.ts
|
|
2914
|
+
var creditPlanSchema = {
|
|
2915
|
+
get: {
|
|
2916
|
+
operation: "query",
|
|
2917
|
+
name: "getCreditPlan",
|
|
2918
|
+
variables: "($creditPlan: CreditPlanInput!)",
|
|
2919
|
+
field: "(creditPlan: $creditPlan)"
|
|
2920
|
+
},
|
|
2921
|
+
list: {
|
|
2922
|
+
operation: "query",
|
|
2923
|
+
name: "listCreditPlans",
|
|
2924
|
+
variables: "($limit: Int!, $skip: Int!, $search: String, $creditPlan: CreditPlanInput, $creditPlanIds: [String])",
|
|
2925
|
+
field: "(limit: $limit, skip: $skip, search: $search, creditPlan: $creditPlan, creditPlanIds: $creditPlanIds)"
|
|
2926
|
+
},
|
|
2927
|
+
create: {
|
|
2928
|
+
operation: "mutation",
|
|
2929
|
+
name: "createCreditPlan",
|
|
2930
|
+
variables: "($creditPlan: CreditPlanInput!)",
|
|
2931
|
+
field: "(creditPlan: $creditPlan)"
|
|
2932
|
+
},
|
|
2933
|
+
update: {
|
|
2934
|
+
operation: "mutation",
|
|
2935
|
+
name: "updateCreditPlan",
|
|
2936
|
+
variables: "($creditPlanId: String!, $creditPlan: CreditPlanInput!)",
|
|
2937
|
+
field: "(creditPlanId: $creditPlanId, creditPlan: $creditPlan)"
|
|
2938
|
+
},
|
|
2939
|
+
delete: {
|
|
2940
|
+
operation: "mutation",
|
|
2941
|
+
name: "deleteCreditPlan",
|
|
2942
|
+
variables: "($creditPlanId: String!)",
|
|
2943
|
+
field: "(creditPlanId: $creditPlanId)"
|
|
2944
|
+
}
|
|
2945
|
+
};
|
|
2946
|
+
|
|
2947
|
+
// src/helpers/schema-builder.ts
|
|
2948
|
+
function buildSchema({
|
|
2949
|
+
operation,
|
|
2950
|
+
name,
|
|
2951
|
+
variables,
|
|
2952
|
+
field
|
|
2953
|
+
}) {
|
|
2954
|
+
return (selection) => `
|
|
2955
|
+
${operation} ${name}${variables} {
|
|
2956
|
+
${name}${field} {
|
|
2957
|
+
${selection}
|
|
2958
|
+
}
|
|
2959
|
+
}
|
|
2960
|
+
`.trim();
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
// src/services/subscription/credit-plan.service.ts
|
|
2964
|
+
var createCreditPlanService = (client) => ({
|
|
2965
|
+
createCreditPlan: createOperationExecutor(
|
|
2966
|
+
client,
|
|
2967
|
+
"createCreditPlan",
|
|
2968
|
+
{
|
|
2969
|
+
schema: buildSchema(creditPlanSchema.create),
|
|
2970
|
+
defaultRootFields: creditPlanIntegration.create.responseFields,
|
|
2971
|
+
defaultNestedFields: creditPlanIntegration.create.nestedFields
|
|
2972
|
+
}
|
|
2973
|
+
),
|
|
2974
|
+
updateCreditPlan: createOperationExecutor(
|
|
2975
|
+
client,
|
|
2976
|
+
"updateCreditPlan",
|
|
2977
|
+
{
|
|
2978
|
+
schema: buildSchema(creditPlanSchema.update),
|
|
2979
|
+
defaultRootFields: creditPlanIntegration.update.responseFields,
|
|
2980
|
+
defaultNestedFields: creditPlanIntegration.update.nestedFields
|
|
2981
|
+
}
|
|
2982
|
+
),
|
|
2983
|
+
getCreditPlan: createOperationExecutor(
|
|
2984
|
+
client,
|
|
2985
|
+
"getCreditPlan",
|
|
2986
|
+
{
|
|
2987
|
+
schema: buildSchema(creditPlanSchema.get),
|
|
2988
|
+
defaultRootFields: creditPlanIntegration.get.responseFields,
|
|
2989
|
+
defaultNestedFields: creditPlanIntegration.get.nestedFields
|
|
2990
|
+
}
|
|
2991
|
+
),
|
|
2992
|
+
deleteCreditPlan: createOperationExecutor(
|
|
2993
|
+
client,
|
|
2994
|
+
"deleteCreditPlan",
|
|
2995
|
+
{
|
|
2996
|
+
schema: buildSchema(creditPlanSchema.delete),
|
|
2997
|
+
defaultRootFields: creditPlanDeleteIntegration.responseFields,
|
|
2998
|
+
defaultNestedFields: {}
|
|
2999
|
+
}
|
|
3000
|
+
),
|
|
3001
|
+
listCreditPlans: createOperationExecutor(
|
|
3002
|
+
client,
|
|
3003
|
+
"listCreditPlans",
|
|
3004
|
+
{
|
|
3005
|
+
schema: buildSchema(creditPlanSchema.list),
|
|
3006
|
+
defaultRootFields: [...creditPlanListIntegration.responseFields],
|
|
3007
|
+
defaultNestedFields: creditPlanListIntegration.nestedFields
|
|
3008
|
+
}
|
|
3009
|
+
)
|
|
3010
|
+
});
|
|
3011
|
+
|
|
3012
|
+
// src/services/subscription/types/credit-transaction.type.ts
|
|
3013
|
+
var ENTITY2 = "creditTransaction";
|
|
3014
|
+
var creditTransactionIntegration = createStandardEntityIntegration({
|
|
3015
|
+
key: ENTITY2,
|
|
3016
|
+
fields: creditTransactionQuery
|
|
3017
|
+
});
|
|
3018
|
+
var creditTransactionListIntegration = createListIntegration({
|
|
3019
|
+
key: "creditTransactions",
|
|
3020
|
+
fields: creditTransactionQuery
|
|
3021
|
+
});
|
|
3022
|
+
var creditTransactionDeleteIntegration = createDeleteIntegration(ENTITY2);
|
|
3023
|
+
|
|
3024
|
+
// src/services/subscription/schemas/credit-transaction.schema.ts
|
|
3025
|
+
var creditTransactionSchema = {
|
|
3026
|
+
get: {
|
|
3027
|
+
operation: "query",
|
|
3028
|
+
name: "getCreditTransaction",
|
|
3029
|
+
variables: "($creditTransaction: CreditTransactionInput!)",
|
|
3030
|
+
field: "(creditTransaction: $creditTransaction)"
|
|
3031
|
+
},
|
|
3032
|
+
list: {
|
|
3033
|
+
operation: "query",
|
|
3034
|
+
name: "listCreditTransactions",
|
|
3035
|
+
variables: "($limit: Int!, $skip: Int!, $search: String, $creditTransaction: CreditTransactionInput, $creditTransactionIds: [String])",
|
|
3036
|
+
field: "(limit: $limit, skip: $skip, search: $search, creditTransaction: $creditTransaction, creditTransactionIds: $creditTransactionIds)"
|
|
3037
|
+
},
|
|
3038
|
+
create: {
|
|
3039
|
+
operation: "mutation",
|
|
3040
|
+
name: "createCreditTransaction",
|
|
3041
|
+
variables: "($creditTransaction: CreditTransactionInput!)",
|
|
3042
|
+
field: "(creditTransaction: $creditTransaction)"
|
|
3043
|
+
},
|
|
3044
|
+
update: {
|
|
3045
|
+
operation: "mutation",
|
|
3046
|
+
name: "updateCreditTransaction",
|
|
3047
|
+
variables: "($creditTransactionId: String!, $creditTransaction: CreditTransactionInput!)",
|
|
3048
|
+
field: "(creditTransactionId: $creditTransactionId, creditTransaction: $creditTransaction)"
|
|
3049
|
+
},
|
|
3050
|
+
delete: {
|
|
3051
|
+
operation: "mutation",
|
|
3052
|
+
name: "deleteCreditTransaction",
|
|
3053
|
+
variables: "($creditTransactionId: String!)",
|
|
3054
|
+
field: "(creditTransactionId: $creditTransactionId)"
|
|
3055
|
+
}
|
|
3056
|
+
};
|
|
3057
|
+
|
|
3058
|
+
// src/services/subscription/credit-transaction.service.ts
|
|
3059
|
+
var createCreditTransactionService = (client) => ({
|
|
3060
|
+
createCreditTransaction: createOperationExecutor(
|
|
3061
|
+
client,
|
|
3062
|
+
"createCreditTransaction",
|
|
3063
|
+
{
|
|
3064
|
+
schema: buildSchema(creditTransactionSchema.create),
|
|
3065
|
+
defaultRootFields: creditTransactionIntegration.create.responseFields,
|
|
3066
|
+
defaultNestedFields: creditTransactionIntegration.create.nestedFields
|
|
3067
|
+
}
|
|
3068
|
+
),
|
|
3069
|
+
updateCreditTransaction: createOperationExecutor(
|
|
3070
|
+
client,
|
|
3071
|
+
"updateCreditTransaction",
|
|
3072
|
+
{
|
|
3073
|
+
schema: buildSchema(creditTransactionSchema.update),
|
|
3074
|
+
defaultRootFields: creditTransactionIntegration.update.responseFields,
|
|
3075
|
+
defaultNestedFields: creditTransactionIntegration.update.nestedFields
|
|
3076
|
+
}
|
|
3077
|
+
),
|
|
3078
|
+
getCreditTransaction: createOperationExecutor(
|
|
3079
|
+
client,
|
|
3080
|
+
"getCreditTransaction",
|
|
3081
|
+
{
|
|
3082
|
+
schema: buildSchema(creditTransactionSchema.get),
|
|
3083
|
+
defaultRootFields: creditTransactionIntegration.get.responseFields,
|
|
3084
|
+
defaultNestedFields: creditTransactionIntegration.get.nestedFields
|
|
3085
|
+
}
|
|
3086
|
+
),
|
|
3087
|
+
deleteCreditTransaction: createOperationExecutor(
|
|
3088
|
+
client,
|
|
3089
|
+
"deleteCreditTransaction",
|
|
3090
|
+
{
|
|
3091
|
+
schema: buildSchema(creditTransactionSchema.delete),
|
|
3092
|
+
defaultRootFields: creditTransactionDeleteIntegration.responseFields,
|
|
3093
|
+
defaultNestedFields: {}
|
|
3094
|
+
}
|
|
3095
|
+
),
|
|
3096
|
+
listCreditTransactions: createOperationExecutor(
|
|
3097
|
+
client,
|
|
3098
|
+
"listCreditTransactions",
|
|
3099
|
+
{
|
|
3100
|
+
schema: buildSchema(creditTransactionSchema.list),
|
|
3101
|
+
defaultRootFields: [...creditTransactionListIntegration.responseFields],
|
|
3102
|
+
defaultNestedFields: creditTransactionListIntegration.nestedFields
|
|
3103
|
+
}
|
|
3104
|
+
)
|
|
3105
|
+
});
|
|
3106
|
+
|
|
3107
|
+
// src/services/subscription/types/service-credit-cost.type.ts
|
|
3108
|
+
var ENTITY3 = "serviceCreditCost";
|
|
3109
|
+
var serviceCreditCostIntegration = createStandardEntityIntegration({
|
|
3110
|
+
key: ENTITY3,
|
|
3111
|
+
fields: serviceCreditCostQuery
|
|
3112
|
+
});
|
|
3113
|
+
var serviceCreditCostListIntegration = createListIntegration({
|
|
3114
|
+
key: "serviceCreditCosts",
|
|
3115
|
+
fields: serviceCreditCostQuery
|
|
3116
|
+
});
|
|
3117
|
+
var serviceCreditCostDeleteIntegration = createDeleteIntegration(ENTITY3);
|
|
3118
|
+
|
|
3119
|
+
// src/services/subscription/schemas/service-credit-cost.schema.ts
|
|
3120
|
+
var serviceCreditCostSchema = {
|
|
3121
|
+
get: {
|
|
3122
|
+
operation: "query",
|
|
3123
|
+
name: "getServiceCreditCost",
|
|
3124
|
+
variables: "($serviceCreditCost: ServiceCreditCostInput!)",
|
|
3125
|
+
field: "(serviceCreditCost: $serviceCreditCost)"
|
|
3126
|
+
},
|
|
3127
|
+
list: {
|
|
3128
|
+
operation: "query",
|
|
3129
|
+
name: "listServiceCreditCosts",
|
|
3130
|
+
variables: "($limit: Int!, $skip: Int!, $search: String, $serviceCreditCost: ServiceCreditCostInput, $serviceCreditCostIds: [String])",
|
|
3131
|
+
field: "(limit: $limit, skip: $skip, search: $search, serviceCreditCost: $serviceCreditCost, serviceCreditCostIds: $serviceCreditCostIds)"
|
|
3132
|
+
},
|
|
3133
|
+
create: {
|
|
3134
|
+
operation: "mutation",
|
|
3135
|
+
name: "createServiceCreditCost",
|
|
3136
|
+
variables: "($serviceCreditCost: ServiceCreditCostInput!)",
|
|
3137
|
+
field: "(serviceCreditCost: $serviceCreditCost)"
|
|
3138
|
+
},
|
|
3139
|
+
update: {
|
|
3140
|
+
operation: "mutation",
|
|
3141
|
+
name: "updateServiceCreditCost",
|
|
3142
|
+
variables: "($serviceCreditCostId: String!, $serviceCreditCost: ServiceCreditCostInput!)",
|
|
3143
|
+
field: "(serviceCreditCostId: $serviceCreditCostId, serviceCreditCost: $serviceCreditCost)"
|
|
3144
|
+
},
|
|
3145
|
+
delete: {
|
|
3146
|
+
operation: "mutation",
|
|
3147
|
+
name: "deleteServiceCreditCost",
|
|
3148
|
+
variables: "($serviceCreditCostId: String!)",
|
|
3149
|
+
field: "(serviceCreditCostId: $serviceCreditCostId)"
|
|
3150
|
+
}
|
|
3151
|
+
};
|
|
3152
|
+
|
|
3153
|
+
// src/services/subscription/service-credit-cost.service.ts
|
|
3154
|
+
var createServiceCreditCostService = (client) => ({
|
|
3155
|
+
createServiceCreditCost: createOperationExecutor(
|
|
3156
|
+
client,
|
|
3157
|
+
"createServiceCreditCost",
|
|
3158
|
+
{
|
|
3159
|
+
schema: buildSchema(serviceCreditCostSchema.create),
|
|
3160
|
+
defaultRootFields: serviceCreditCostIntegration.create.responseFields,
|
|
3161
|
+
defaultNestedFields: serviceCreditCostIntegration.create.nestedFields
|
|
3162
|
+
}
|
|
3163
|
+
),
|
|
3164
|
+
updateServiceCreditCost: createOperationExecutor(
|
|
3165
|
+
client,
|
|
3166
|
+
"updateServiceCreditCost",
|
|
3167
|
+
{
|
|
3168
|
+
schema: buildSchema(serviceCreditCostSchema.update),
|
|
3169
|
+
defaultRootFields: serviceCreditCostIntegration.update.responseFields,
|
|
3170
|
+
defaultNestedFields: serviceCreditCostIntegration.update.nestedFields
|
|
3171
|
+
}
|
|
3172
|
+
),
|
|
3173
|
+
getServiceCreditCost: createOperationExecutor(
|
|
3174
|
+
client,
|
|
3175
|
+
"getServiceCreditCost",
|
|
3176
|
+
{
|
|
3177
|
+
schema: buildSchema(serviceCreditCostSchema.get),
|
|
3178
|
+
defaultRootFields: serviceCreditCostIntegration.get.responseFields,
|
|
3179
|
+
defaultNestedFields: serviceCreditCostIntegration.get.nestedFields
|
|
3180
|
+
}
|
|
3181
|
+
),
|
|
3182
|
+
deleteServiceCreditCost: createOperationExecutor(
|
|
3183
|
+
client,
|
|
3184
|
+
"deleteServiceCreditCost",
|
|
3185
|
+
{
|
|
3186
|
+
schema: buildSchema(serviceCreditCostSchema.delete),
|
|
3187
|
+
defaultRootFields: serviceCreditCostDeleteIntegration.responseFields,
|
|
3188
|
+
defaultNestedFields: {}
|
|
3189
|
+
}
|
|
3190
|
+
),
|
|
3191
|
+
listServiceCreditCosts: createOperationExecutor(
|
|
3192
|
+
client,
|
|
3193
|
+
"listServiceCreditCosts",
|
|
3194
|
+
{
|
|
3195
|
+
schema: buildSchema(serviceCreditCostSchema.list),
|
|
3196
|
+
defaultRootFields: [...serviceCreditCostListIntegration.responseFields],
|
|
3197
|
+
defaultNestedFields: serviceCreditCostListIntegration.nestedFields
|
|
3198
|
+
}
|
|
3199
|
+
)
|
|
3200
|
+
});
|
|
3201
|
+
|
|
2838
3202
|
// src/services/ai-integration/types/ai-server.entity.ts
|
|
2839
3203
|
var aiServerAuthQuery = [
|
|
2840
3204
|
"visaProfileId",
|
|
@@ -2905,6 +3269,8 @@ exports.createConsultantAssignmentResponseFields = createConsultantAssignmentRes
|
|
|
2905
3269
|
exports.createConsultantAssignmentResponseNestedFields = createConsultantAssignmentResponseNestedFields;
|
|
2906
3270
|
exports.createConsultantAssignmentService = createConsultantAssignmentService;
|
|
2907
3271
|
exports.createConsultantInviteService = createConsultantInviteService;
|
|
3272
|
+
exports.createCreditPlanService = createCreditPlanService;
|
|
3273
|
+
exports.createCreditTransactionService = createCreditTransactionService;
|
|
2908
3274
|
exports.createCustomerObjectResponse = createCustomerObjectResponse;
|
|
2909
3275
|
exports.createFlutterwaveService = createFlutterwaveService;
|
|
2910
3276
|
exports.createPaystackService = createPaystackService;
|
|
@@ -2914,6 +3280,7 @@ exports.createReadinessScoreReviewService = createReadinessScoreReviewService;
|
|
|
2914
3280
|
exports.createSOPReviewResponseFields = createSOPReviewResponseFields;
|
|
2915
3281
|
exports.createSOPReviewResponseNestedFields = createSOPReviewResponseNestedFields;
|
|
2916
3282
|
exports.createSOPReviewService = createSOPReviewService;
|
|
3283
|
+
exports.createServiceCreditCostService = createServiceCreditCostService;
|
|
2917
3284
|
exports.createSubscriptionService = createSubscriptionService;
|
|
2918
3285
|
exports.createTransport = createTransport;
|
|
2919
3286
|
exports.createUserResponseFields = createUserResponseFields;
|