@connect-plus-online/ogabai-integrations 0.0.37 → 0.0.38
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 +162 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +77 -1
- package/dist/index.d.ts +77 -1
- package/dist/index.esm.js +152 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2306,6 +2306,20 @@ var subscriptionPlanFeatureQuery = [
|
|
|
2306
2306
|
"description",
|
|
2307
2307
|
"createdAt"
|
|
2308
2308
|
];
|
|
2309
|
+
var subscriptionPlanQuery = [
|
|
2310
|
+
"id",
|
|
2311
|
+
"code",
|
|
2312
|
+
"title",
|
|
2313
|
+
"description",
|
|
2314
|
+
"price",
|
|
2315
|
+
"currency",
|
|
2316
|
+
"period",
|
|
2317
|
+
"trialDays",
|
|
2318
|
+
"subscriptionPlanStatus",
|
|
2319
|
+
"createdAt",
|
|
2320
|
+
"updatedAt",
|
|
2321
|
+
"features"
|
|
2322
|
+
];
|
|
2309
2323
|
|
|
2310
2324
|
// src/services/subscription/types/subscription-plan-feature.type.ts
|
|
2311
2325
|
var getSubscriptionPlanFeatureResponse = [
|
|
@@ -2332,6 +2346,31 @@ var removeSubscriptionPlanFeatureResponse = [
|
|
|
2332
2346
|
"subscriptionPlanFeatureId"
|
|
2333
2347
|
];
|
|
2334
2348
|
|
|
2349
|
+
// src/services/subscription/types/subscription-plan.type.ts
|
|
2350
|
+
var getSubscriptionPlanResponse = [
|
|
2351
|
+
"subscriptionPlan"
|
|
2352
|
+
];
|
|
2353
|
+
var _getSubscriptionPlanResponseNestedFields = {};
|
|
2354
|
+
var getSubscriptionPlanResponseNestedFields = {
|
|
2355
|
+
..._getSubscriptionPlanResponseNestedFields,
|
|
2356
|
+
subscriptionPlan: subscriptionPlanQuery
|
|
2357
|
+
};
|
|
2358
|
+
var getSubscriptionPlansResponse = [
|
|
2359
|
+
"subscriptionPlans",
|
|
2360
|
+
"total"
|
|
2361
|
+
];
|
|
2362
|
+
var getSubscriptionPlansResponseNestedFields = {
|
|
2363
|
+
..._getSubscriptionPlanResponseNestedFields,
|
|
2364
|
+
subscriptionPlans: subscriptionPlanQuery
|
|
2365
|
+
};
|
|
2366
|
+
var addSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
2367
|
+
var addSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
2368
|
+
var updateSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
2369
|
+
var updateSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
2370
|
+
var removeSubscriptionPlanResponse = [
|
|
2371
|
+
"subscriptionPlanId"
|
|
2372
|
+
];
|
|
2373
|
+
|
|
2335
2374
|
// src/services/subscription/schemas/subscription-plan-feature.schema.ts
|
|
2336
2375
|
var subscriptionPlanFeatureSchema = {
|
|
2337
2376
|
getSubscriptionPlanFeature: (query) => `
|
|
@@ -2444,6 +2483,118 @@ var createSubscriptionPlanFeatureService = (client) => ({
|
|
|
2444
2483
|
}
|
|
2445
2484
|
});
|
|
2446
2485
|
|
|
2486
|
+
// src/services/subscription/schemas/subscription-plan.schema.ts
|
|
2487
|
+
var subscriptionPlanSchema = {
|
|
2488
|
+
getSubscriptionPlan: (query) => `
|
|
2489
|
+
query getSubscriptionPlan($subscriptionPlan: SubscriptionPlanInput!) {
|
|
2490
|
+
getSubscriptionPlan(subscriptionPlan: $subscriptionPlan) {
|
|
2491
|
+
${query}
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
`,
|
|
2495
|
+
getSubscriptionPlans: (query) => `
|
|
2496
|
+
query getSubscriptionPlans($search String, $subscriptionPlanIds: [String], $subscriptionPlan: SubscriptionPlanInput, $limit: Int!, $skip: Int!) {
|
|
2497
|
+
getSubscriptionPlans(search: $search, subscriptionPlanIds: $subscriptionPlanIds, subscriptionPlan: $subscriptionPlan, limit: $limit, skip: $skip) {
|
|
2498
|
+
${query}
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
`,
|
|
2502
|
+
addSubscriptionPlan: (query) => `
|
|
2503
|
+
mutation addSubscriptionPlan($subscriptionPlan: SubscriptionPlanInput!) {
|
|
2504
|
+
addSubscriptionPlan(subscriptionPlan: $subscriptionPlan) {
|
|
2505
|
+
${query}
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
`,
|
|
2509
|
+
updateSubscriptionPlan: (query) => `
|
|
2510
|
+
mutation updateSubscriptionPlan($subscriptionPlanId: String!, $subscriptionPlan: SubscriptionPlanInput!) {
|
|
2511
|
+
updateSubscriptionPlan(subscriptionPlanId: $subcriptionPlanId, subscriptionPlan: $subscriptionPlan) {
|
|
2512
|
+
${query}
|
|
2513
|
+
}
|
|
2514
|
+
}
|
|
2515
|
+
`,
|
|
2516
|
+
removeSubscriptionPlan: (query) => `
|
|
2517
|
+
mutation removeSubscriptionPlan($subscriptionPlanId: String!) {
|
|
2518
|
+
removeSubscriptionPlan(subscriptionPlanId: $subcriptionPlanId) {
|
|
2519
|
+
${query}
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
`
|
|
2523
|
+
};
|
|
2524
|
+
|
|
2525
|
+
// src/services/subscription/subscription-plan.service.ts
|
|
2526
|
+
var createSubscriptionPlanService = (client) => ({
|
|
2527
|
+
async removeSubscriptionPlan(input, fetchFields, option) {
|
|
2528
|
+
var _a, _b, _c;
|
|
2529
|
+
const res = await client.request(
|
|
2530
|
+
subscriptionPlanSchema.removeSubscriptionPlan(
|
|
2531
|
+
gqlQueryStringBuilder(
|
|
2532
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : removeSubscriptionPlanResponse
|
|
2533
|
+
)
|
|
2534
|
+
),
|
|
2535
|
+
input,
|
|
2536
|
+
option
|
|
2537
|
+
);
|
|
2538
|
+
return (_c = (_b = res.data) == null ? void 0 : _b.removeSubscriptionPlan) != null ? _c : null;
|
|
2539
|
+
},
|
|
2540
|
+
async updateSubscriptionPlan(input, fetchFields, option) {
|
|
2541
|
+
var _a, _b, _c, _d;
|
|
2542
|
+
const res = await client.request(
|
|
2543
|
+
subscriptionPlanSchema.updateSubscriptionPlan(
|
|
2544
|
+
gqlQueryStringBuilder(
|
|
2545
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : updateSubscriptionPlanResponse,
|
|
2546
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : updateSubscriptionPlanResponseNestedFields
|
|
2547
|
+
)
|
|
2548
|
+
),
|
|
2549
|
+
input,
|
|
2550
|
+
option
|
|
2551
|
+
);
|
|
2552
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.updateSubscriptionPlan) != null ? _d : null;
|
|
2553
|
+
},
|
|
2554
|
+
async addSubscriptionPlan(input, fetchFields, option) {
|
|
2555
|
+
var _a, _b, _c, _d;
|
|
2556
|
+
const res = await client.request(
|
|
2557
|
+
subscriptionPlanSchema.addSubscriptionPlan(
|
|
2558
|
+
gqlQueryStringBuilder(
|
|
2559
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : addSubscriptionPlanResponse,
|
|
2560
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : addSubscriptionPlanResponseNestedFields
|
|
2561
|
+
)
|
|
2562
|
+
),
|
|
2563
|
+
input,
|
|
2564
|
+
option
|
|
2565
|
+
);
|
|
2566
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.addSubscriptionPlan) != null ? _d : null;
|
|
2567
|
+
},
|
|
2568
|
+
async getSubscriptionPlan(input, fetchFields, option) {
|
|
2569
|
+
var _a, _b, _c, _d;
|
|
2570
|
+
const res = await client.request(
|
|
2571
|
+
subscriptionPlanSchema.getSubscriptionPlan(
|
|
2572
|
+
gqlQueryStringBuilder(
|
|
2573
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlanResponse,
|
|
2574
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlanResponseNestedFields
|
|
2575
|
+
)
|
|
2576
|
+
),
|
|
2577
|
+
input,
|
|
2578
|
+
option
|
|
2579
|
+
);
|
|
2580
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlan) != null ? _d : null;
|
|
2581
|
+
},
|
|
2582
|
+
async getSubscriptionPlans(input, fetchFields, option) {
|
|
2583
|
+
var _a, _b, _c, _d;
|
|
2584
|
+
const res = await client.request(
|
|
2585
|
+
subscriptionPlanSchema.getSubscriptionPlans(
|
|
2586
|
+
gqlQueryStringBuilder(
|
|
2587
|
+
(_a = fetchFields == null ? void 0 : fetchFields.root) != null ? _a : getSubscriptionPlansResponse,
|
|
2588
|
+
(_b = fetchFields == null ? void 0 : fetchFields.nestedFields) != null ? _b : getSubscriptionPlansResponseNestedFields
|
|
2589
|
+
)
|
|
2590
|
+
),
|
|
2591
|
+
input,
|
|
2592
|
+
option
|
|
2593
|
+
);
|
|
2594
|
+
return (_d = (_c = res.data) == null ? void 0 : _c.getSubscriptionPlans) != null ? _d : null;
|
|
2595
|
+
}
|
|
2596
|
+
});
|
|
2597
|
+
|
|
2447
2598
|
exports.AuthenticationError = AuthenticationError;
|
|
2448
2599
|
exports.GraphQLClient = GraphQLClient;
|
|
2449
2600
|
exports.NetworkError = NetworkError;
|
|
@@ -2454,6 +2605,7 @@ exports._getProductResponseNestedFields = _getProductResponseNestedFields;
|
|
|
2454
2605
|
exports._getSaleResponseNestedFields = _getSaleResponseNestedFields;
|
|
2455
2606
|
exports._getStoreResponseNestedFields = _getStoreResponseNestedFields;
|
|
2456
2607
|
exports._getSubscriptionPlanFeatureResponseNestedFields = _getSubscriptionPlanFeatureResponseNestedFields;
|
|
2608
|
+
exports._getSubscriptionPlanResponseNestedFields = _getSubscriptionPlanResponseNestedFields;
|
|
2457
2609
|
exports._getTransactionResponseNestedFields = _getTransactionResponseNestedFields;
|
|
2458
2610
|
exports._getTransactionsResponseNestedFields = _getTransactionsResponseNestedFields;
|
|
2459
2611
|
exports.addPackageResponseFields = addPackageResponseFields;
|
|
@@ -2470,6 +2622,8 @@ exports.addStoreResponse = addStoreResponse;
|
|
|
2470
2622
|
exports.addStoreResponseNestedFields = addStoreResponseNestedFields;
|
|
2471
2623
|
exports.addSubscriptionPlanFeatureResponse = addSubscriptionPlanFeatureResponse;
|
|
2472
2624
|
exports.addSubscriptionPlanFeatureResponseNestedFields = addSubscriptionPlanFeatureResponseNestedFields;
|
|
2625
|
+
exports.addSubscriptionPlanResponse = addSubscriptionPlanResponse;
|
|
2626
|
+
exports.addSubscriptionPlanResponseNestedFields = addSubscriptionPlanResponseNestedFields;
|
|
2473
2627
|
exports.addTransactionResponse = addTransactionResponse;
|
|
2474
2628
|
exports.addTransactionResponseNestedFields = addTransactionResponseNestedFields;
|
|
2475
2629
|
exports.compose = compose;
|
|
@@ -2489,6 +2643,7 @@ exports.createStoreCategoryResponseNestedFields = createStoreCategoryResponseNes
|
|
|
2489
2643
|
exports.createStoreCategoryService = createStoreCategoryService;
|
|
2490
2644
|
exports.createStoreService = createStoreService;
|
|
2491
2645
|
exports.createSubscriptionPlanFeatureService = createSubscriptionPlanFeatureService;
|
|
2646
|
+
exports.createSubscriptionPlanService = createSubscriptionPlanService;
|
|
2492
2647
|
exports.createTransactionService = createTransactionService;
|
|
2493
2648
|
exports.createTransport = createTransport;
|
|
2494
2649
|
exports.createUserNotificationService = createUserNotificationService;
|
|
@@ -2538,6 +2693,10 @@ exports.getSubscriptionPlanFeatureResponse = getSubscriptionPlanFeatureResponse;
|
|
|
2538
2693
|
exports.getSubscriptionPlanFeatureResponseNestedFields = getSubscriptionPlanFeatureResponseNestedFields;
|
|
2539
2694
|
exports.getSubscriptionPlanFeaturesResponse = getSubscriptionPlanFeaturesResponse;
|
|
2540
2695
|
exports.getSubscriptionPlanFeaturesResponseNestedFields = getSubscriptionPlanFeaturesResponseNestedFields;
|
|
2696
|
+
exports.getSubscriptionPlanResponse = getSubscriptionPlanResponse;
|
|
2697
|
+
exports.getSubscriptionPlanResponseNestedFields = getSubscriptionPlanResponseNestedFields;
|
|
2698
|
+
exports.getSubscriptionPlansResponse = getSubscriptionPlansResponse;
|
|
2699
|
+
exports.getSubscriptionPlansResponseNestedFields = getSubscriptionPlansResponseNestedFields;
|
|
2541
2700
|
exports.getTransactionResponse = getTransactionResponse;
|
|
2542
2701
|
exports.getTransactionResponseNestedFields = getTransactionResponseNestedFields;
|
|
2543
2702
|
exports.getTransactionsResponse = getTransactionsResponse;
|
|
@@ -2552,6 +2711,7 @@ exports.removeStoreCategoryProductResponseFields = removeStoreCategoryProductRes
|
|
|
2552
2711
|
exports.removeStoreCategoryResponseFields = removeStoreCategoryResponseFields;
|
|
2553
2712
|
exports.removeStoreResponse = removeStoreResponse;
|
|
2554
2713
|
exports.removeSubscriptionPlanFeatureResponse = removeSubscriptionPlanFeatureResponse;
|
|
2714
|
+
exports.removeSubscriptionPlanResponse = removeSubscriptionPlanResponse;
|
|
2555
2715
|
exports.saleQuery = saleQuery;
|
|
2556
2716
|
exports.searchCategoriesAndTemplateResponse = searchCategoriesAndTemplateResponse;
|
|
2557
2717
|
exports.searchCategoriesAndTemplateResponseNestedFields = searchCategoriesAndTemplateResponseNestedFields;
|
|
@@ -2577,6 +2737,8 @@ exports.updateStoreResponse = updateStoreResponse;
|
|
|
2577
2737
|
exports.updateStoreResponseNestedFields = updateStoreResponseNestedFields;
|
|
2578
2738
|
exports.updateSubscriptionPlanFeatureResponse = updateSubscriptionPlanFeatureResponse;
|
|
2579
2739
|
exports.updateSubscriptionPlanFeatureResponseNestedFields = updateSubscriptionPlanFeatureResponseNestedFields;
|
|
2740
|
+
exports.updateSubscriptionPlanResponse = updateSubscriptionPlanResponse;
|
|
2741
|
+
exports.updateSubscriptionPlanResponseNestedFields = updateSubscriptionPlanResponseNestedFields;
|
|
2580
2742
|
exports.updateTransactionResponse = updateTransactionResponse;
|
|
2581
2743
|
exports.updateTransactionResponseNestedFields = updateTransactionResponseNestedFields;
|
|
2582
2744
|
//# sourceMappingURL=index.cjs.js.map
|