@zohoim/client-sdk 1.0.0-whatsAppPricing.4 → 1.2.0-attachmentsList
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/es/application/services/index.js +1 -3
- package/es/core/constants/ModuleNames.js +1 -3
- package/es/core/constants/index.js +1 -2
- package/es/domain/dto/index.js +1 -3
- package/es/domain/dto/sessions/getSessionAttachmentsRequest.js +6 -1
- package/es/domain/entities/index.js +1 -4
- package/es/domain/enum/index.js +1 -2
- package/es/domain/interfaces/repositories/index.js +1 -3
- package/es/domain/schema/index.js +1 -3
- package/es/frameworks/managers/ModuleFactory.js +24 -62
- package/es/frameworks/managers/ModuleManager.js +4 -20
- package/es/frameworks/sdk/IMSDK.js +11 -23
- package/es/infrastructure/adapters/index.js +1 -3
- package/es/infrastructure/api/BaseAPI.js +4 -5
- package/es/infrastructure/api/index.js +1 -3
- package/es/infrastructure/api/registry/getRegistryConfig.js +1 -5
- package/es/infrastructure/config/configRegistry.js +1 -8
- package/es/infrastructure/repositories/index.js +1 -3
- package/package.json +1 -1
- package/es/application/services/subscription/SubscriptionService.js +0 -36
- package/es/application/services/subscription/index.js +0 -2
- package/es/application/services/whatsAppPricing/WhatsAppPricingService.js +0 -21
- package/es/application/services/whatsAppPricing/index.js +0 -2
- package/es/core/constants/ModuleTypes.js +0 -5
- package/es/domain/dto/subscription/buyAddOnPackageRequest.js +0 -18
- package/es/domain/dto/subscription/getAddOnPackagesRequest.js +0 -15
- package/es/domain/dto/subscription/getLicenseDetailsRequest.js +0 -7
- package/es/domain/dto/subscription/index.js +0 -5
- package/es/domain/dto/subscription/modifyAddOnPackageRequest.js +0 -18
- package/es/domain/dto/whatsAppPricing/calculatePricingRequest.js +0 -14
- package/es/domain/dto/whatsAppPricing/index.js +0 -2
- package/es/domain/entities/AddOnPackage/AddOnPackage.js +0 -34
- package/es/domain/entities/AddOnPackage/index.js +0 -2
- package/es/domain/entities/LicenseDetails/LicenseDetails.js +0 -23
- package/es/domain/entities/LicenseDetails/index.js +0 -2
- package/es/domain/entities/WhatsAppPricingResult/WhatsAppPricingResult.js +0 -24
- package/es/domain/entities/WhatsAppPricingResult/index.js +0 -2
- package/es/domain/enum/subscription/AddOnSubscriptionStatus.js +0 -7
- package/es/domain/enum/subscription/index.js +0 -2
- package/es/domain/interfaces/repositories/subscription/ISubscriptionRepository.js +0 -35
- package/es/domain/interfaces/repositories/subscription/index.js +0 -2
- package/es/domain/interfaces/repositories/whatsAppPricing/IWhatsAppPricingRepository.js +0 -18
- package/es/domain/interfaces/repositories/whatsAppPricing/index.js +0 -2
- package/es/domain/schema/subscription/AddOnPackageSchema.js +0 -33
- package/es/domain/schema/subscription/AddOnSubscriptionSchema.js +0 -29
- package/es/domain/schema/subscription/LicenseDetailsSchema.js +0 -11
- package/es/domain/schema/subscription/index.js +0 -4
- package/es/domain/schema/whatsAppPricing/PricingCategorySchema.js +0 -11
- package/es/domain/schema/whatsAppPricing/WhatsAppPricingResultSchema.js +0 -21
- package/es/domain/schema/whatsAppPricing/index.js +0 -3
- package/es/frameworks/sdk/subscription/SubscriptionSDK.js +0 -29
- package/es/frameworks/sdk/subscription/index.js +0 -2
- package/es/frameworks/sdk/whatsAppPricing/WhatsAppPricingSDK.js +0 -27
- package/es/frameworks/sdk/whatsAppPricing/index.js +0 -2
- package/es/infrastructure/adapters/subscription/AddOnPackageAdapter.js +0 -25
- package/es/infrastructure/adapters/subscription/LicenseDetailsAdapter.js +0 -20
- package/es/infrastructure/adapters/subscription/index.js +0 -3
- package/es/infrastructure/adapters/whatsAppPricing/WhatsAppPricingResultAdapter.js +0 -22
- package/es/infrastructure/adapters/whatsAppPricing/index.js +0 -2
- package/es/infrastructure/api/registry/createPublicBaseUrl.js +0 -4
- package/es/infrastructure/api/registry/subscription/constructSubscriptionEndPoint.js +0 -10
- package/es/infrastructure/api/registry/subscription/index.js +0 -3
- package/es/infrastructure/api/registry/subscription/subscriptionAPIRegistry.js +0 -28
- package/es/infrastructure/api/registry/whatsAppPricing/constructWhatsAppPricingEndPoint.js +0 -5
- package/es/infrastructure/api/registry/whatsAppPricing/index.js +0 -2
- package/es/infrastructure/api/registry/whatsAppPricing/whatsAppPricingAPIRegistry.js +0 -13
- package/es/infrastructure/api/subscription/SubscriptionAPI.js +0 -44
- package/es/infrastructure/api/subscription/index.js +0 -2
- package/es/infrastructure/api/whatsAppPricing/WhatsAppPricingAPI.js +0 -14
- package/es/infrastructure/api/whatsAppPricing/index.js +0 -2
- package/es/infrastructure/repositories/subscription/SubscriptionRepository.js +0 -82
- package/es/infrastructure/repositories/subscription/index.js +0 -2
- package/es/infrastructure/repositories/whatsAppPricing/WhatsAppPricingRepository.js +0 -50
- package/es/infrastructure/repositories/whatsAppPricing/index.js +0 -2
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { ISubscriptionRepository } from '../../../domain/interfaces/repositories';
|
|
2
|
-
import { AddOnPackageAdapter, LicenseDetailsAdapter } from '../../adapters';
|
|
3
|
-
import { SubscriptionAPI } from '../../api';
|
|
4
|
-
import { ResponseTypes } from '../../../core/constants';
|
|
5
|
-
export default class SubscriptionRepository extends ISubscriptionRepository {
|
|
6
|
-
constructor() {
|
|
7
|
-
let {
|
|
8
|
-
subscriptionAPI,
|
|
9
|
-
addOnPackageAdapter,
|
|
10
|
-
licenseDetailsAdapter
|
|
11
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12
|
-
super();
|
|
13
|
-
this.defaultAPI = new SubscriptionAPI();
|
|
14
|
-
this.customAPI = subscriptionAPI;
|
|
15
|
-
this.subscriptionAPI = this.createAPIProxy(this.customAPI, this.defaultAPI);
|
|
16
|
-
this.addOnPackageAdapter = addOnPackageAdapter || new AddOnPackageAdapter();
|
|
17
|
-
this.licenseDetailsAdapter = licenseDetailsAdapter || new LicenseDetailsAdapter();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
async invokeAPI(_ref) {
|
|
21
|
-
let {
|
|
22
|
-
operation,
|
|
23
|
-
request,
|
|
24
|
-
adapter,
|
|
25
|
-
responseType
|
|
26
|
-
} = _ref;
|
|
27
|
-
return this.executeAPICall({
|
|
28
|
-
operation,
|
|
29
|
-
request,
|
|
30
|
-
apiProxy: this.subscriptionAPI,
|
|
31
|
-
customAPI: this.customAPI,
|
|
32
|
-
adapter,
|
|
33
|
-
responseType
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async getAddOnPackages(request) {
|
|
38
|
-
return this.invokeAPI({
|
|
39
|
-
operation: 'getAddOnPackages',
|
|
40
|
-
request,
|
|
41
|
-
adapter: this.addOnPackageAdapter,
|
|
42
|
-
responseType: ResponseTypes.LIST
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
async getLicenseDetails(request) {
|
|
47
|
-
return this.invokeAPI({
|
|
48
|
-
operation: 'getLicenseDetails',
|
|
49
|
-
request,
|
|
50
|
-
adapter: this.licenseDetailsAdapter,
|
|
51
|
-
responseType: ResponseTypes.SINGLE
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
async buyAddOnPackage(request) {
|
|
56
|
-
return this.invokeAPI({
|
|
57
|
-
operation: 'buyAddOnPackage',
|
|
58
|
-
request,
|
|
59
|
-
adapter: this.addOnPackageAdapter,
|
|
60
|
-
responseType: ResponseTypes.SINGLE
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
async modifyAddOnPackage(request) {
|
|
65
|
-
return this.invokeAPI({
|
|
66
|
-
operation: 'modifyAddOnPackage',
|
|
67
|
-
request,
|
|
68
|
-
adapter: this.addOnPackageAdapter,
|
|
69
|
-
responseType: ResponseTypes.SINGLE
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
toJSON() {
|
|
74
|
-
return {
|
|
75
|
-
getAddOnPackages: this.getAddOnPackages.bind(this),
|
|
76
|
-
getLicenseDetails: this.getLicenseDetails.bind(this),
|
|
77
|
-
buyAddOnPackage: this.buyAddOnPackage.bind(this),
|
|
78
|
-
modifyAddOnPackage: this.modifyAddOnPackage.bind(this)
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import IWhatsAppPricingRepository from '../../../domain/interfaces/repositories/whatsAppPricing/IWhatsAppPricingRepository';
|
|
2
|
-
import { WhatsAppPricingResultAdapter } from '../../adapters';
|
|
3
|
-
import { WhatsAppPricingAPI } from '../../api';
|
|
4
|
-
import { ResponseTypes } from '../../../core/constants';
|
|
5
|
-
export default class WhatsAppPricingRepository extends IWhatsAppPricingRepository {
|
|
6
|
-
constructor() {
|
|
7
|
-
let {
|
|
8
|
-
whatsAppPricingAPI,
|
|
9
|
-
whatsAppPricingResultAdapter
|
|
10
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
11
|
-
super();
|
|
12
|
-
this.defaultAPI = new WhatsAppPricingAPI();
|
|
13
|
-
this.customAPI = whatsAppPricingAPI;
|
|
14
|
-
this.whatsAppPricingAPI = this.createAPIProxy(this.customAPI, this.defaultAPI);
|
|
15
|
-
this.whatsAppPricingResultAdapter = whatsAppPricingResultAdapter || new WhatsAppPricingResultAdapter();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async invokeAPI(_ref) {
|
|
19
|
-
let {
|
|
20
|
-
operation,
|
|
21
|
-
request,
|
|
22
|
-
adapter,
|
|
23
|
-
responseType
|
|
24
|
-
} = _ref;
|
|
25
|
-
return this.executeAPICall({
|
|
26
|
-
operation,
|
|
27
|
-
request,
|
|
28
|
-
apiProxy: this.whatsAppPricingAPI,
|
|
29
|
-
customAPI: this.customAPI,
|
|
30
|
-
adapter,
|
|
31
|
-
responseType
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async calculatePricing(request) {
|
|
36
|
-
return this.invokeAPI({
|
|
37
|
-
operation: 'calculatePricing',
|
|
38
|
-
request,
|
|
39
|
-
adapter: this.whatsAppPricingResultAdapter,
|
|
40
|
-
responseType: ResponseTypes.SINGLE
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
toJSON() {
|
|
45
|
-
return {
|
|
46
|
-
calculatePricing: this.calculatePricing.bind(this)
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
}
|