@eway-crm/connector 1.0.125 → 1.0.127
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/lib/{index.js → cjs/index.d.ts} +6 -5
- package/lib/cjs/index.js +8 -0
- package/lib/esm/AnonymousSessionHandler.d.ts +5 -0
- package/lib/esm/ApiConnection.d.ts +66 -0
- package/lib/esm/ApiMethods.d.ts +16 -0
- package/lib/esm/CredentialsSessionHandler.d.ts +16 -0
- package/lib/esm/HttpMethod.d.ts +4 -0
- package/lib/esm/ISessionHandler.d.ts +7 -0
- package/lib/esm/OAuthSessionHandler.d.ts +12 -0
- package/lib/esm/OAuthSessionHandlerBase.d.ts +16 -0
- package/lib/esm/ReturnCodes.d.ts +9 -0
- package/lib/esm/constants/ActionEventTypes.d.ts +9 -0
- package/lib/esm/constants/ColumnPermissionRules.d.ts +14 -0
- package/lib/esm/constants/CompletionLevels.d.ts +6 -0
- package/lib/esm/constants/CustomizationStatsItemKeys.d.ts +11 -0
- package/lib/esm/constants/Edition.d.ts +6 -0
- package/lib/esm/constants/EnumTypes.d.ts +32 -0
- package/lib/esm/constants/ExpirationReason.d.ts +7 -0
- package/lib/esm/constants/Feature.d.ts +6 -0
- package/lib/esm/constants/FieldNames.d.ts +389 -0
- package/lib/esm/constants/FieldTypes.d.ts +15 -0
- package/lib/esm/constants/FolderNames.d.ts +80 -0
- package/lib/esm/constants/Functionality.d.ts +54 -0
- package/lib/esm/constants/GlobalSettingsNames.d.ts +71 -0
- package/lib/esm/constants/LicenseKeyInvoiceSeverity.d.ts +8 -0
- package/lib/esm/constants/LicenseRestrictionKeys.d.ts +62 -0
- package/lib/esm/constants/RelationTypes.d.ts +11 -0
- package/lib/esm/data/EWItem.d.ts +12 -0
- package/lib/esm/data/IApiAdditionalField.d.ts +21 -0
- package/lib/esm/data/IApiAvailableBundle.d.ts +4 -0
- package/lib/esm/data/IApiAvailableVersionResponse.d.ts +9 -0
- package/lib/esm/data/IApiBooleanResponse.d.ts +4 -0
- package/lib/esm/data/IApiCapacityAvailableBundle.d.ts +5 -0
- package/lib/esm/data/IApiCart.d.ts +48 -0
- package/lib/esm/data/IApiColumn.d.ts +51 -0
- package/lib/esm/data/IApiColumnPermission.d.ts +15 -0
- package/lib/esm/data/IApiCompany.d.ts +55 -0
- package/lib/esm/data/IApiContact.d.ts +58 -0
- package/lib/esm/data/IApiCurrencyExchangeRate.d.ts +9 -0
- package/lib/esm/data/IApiCustomizationStatsItem.d.ts +6 -0
- package/lib/esm/data/IApiDataResponse.d.ts +4 -0
- package/lib/esm/data/IApiDatumResponse.d.ts +4 -0
- package/lib/esm/data/IApiDocument.d.ts +22 -0
- package/lib/esm/data/IApiEmail.d.ts +26 -0
- package/lib/esm/data/IApiEnumType.d.ts +26 -0
- package/lib/esm/data/IApiEnumValue.d.ts +18 -0
- package/lib/esm/data/IApiEnumValuesRelation.d.ts +8 -0
- package/lib/esm/data/IApiFeature.d.ts +5 -0
- package/lib/esm/data/IApiFeaturesLicenseBundle.d.ts +10 -0
- package/lib/esm/data/IApiFlow.d.ts +9 -0
- package/lib/esm/data/IApiGlobalSetting.d.ts +33 -0
- package/lib/esm/data/IApiGoal.d.ts +22 -0
- package/lib/esm/data/IApiGood.d.ts +26 -0
- package/lib/esm/data/IApiGoodInCart.d.ts +62 -0
- package/lib/esm/data/IApiGroup.d.ts +16 -0
- package/lib/esm/data/IApiItemBase.d.ts +14 -0
- package/lib/esm/data/IApiItemIdentifier.d.ts +5 -0
- package/lib/esm/data/IApiItemUsageStatus.d.ts +4 -0
- package/lib/esm/data/IApiJournal.d.ts +25 -0
- package/lib/esm/data/IApiLead.d.ts +36 -0
- package/lib/esm/data/IApiLicense.d.ts +65 -0
- package/lib/esm/data/IApiLicenseBundleBase.d.ts +6 -0
- package/lib/esm/data/IApiLocalizedLicenseBundle.d.ts +4 -0
- package/lib/esm/data/IApiLoginResponse.d.ts +8 -0
- package/lib/esm/data/IApiMarketingCampaign.d.ts +32 -0
- package/lib/esm/data/IApiMarketingList.d.ts +17 -0
- package/lib/esm/data/IApiModulePermission.d.ts +14 -0
- package/lib/esm/data/IApiObjectType.d.ts +9 -0
- package/lib/esm/data/IApiPasswordStrength.d.ts +5 -0
- package/lib/esm/data/IApiPayment.d.ts +9 -0
- package/lib/esm/data/IApiProject.d.ts +59 -0
- package/lib/esm/data/IApiRecurrencePattern.d.ts +16 -0
- package/lib/{IApiResult.d.ts → esm/data/IApiResult.d.ts} +4 -4
- package/lib/esm/data/IApiSaveResponse.d.ts +4 -0
- package/lib/esm/data/IApiTask.d.ts +34 -0
- package/lib/esm/data/IApiUser.d.ts +22 -0
- package/lib/esm/data/IApiUserSetting.d.ts +6 -0
- package/lib/esm/data/IApiWebServiceTaskStatus.d.ts +10 -0
- package/lib/esm/data/IApiWorkReport.d.ts +36 -0
- package/lib/esm/data/IApiWorkflowActionDerivedItem.d.ts +21 -0
- package/lib/esm/data/IApiWorkflowModel.d.ts +8 -0
- package/lib/esm/data/query/IApiQuery.d.ts +42 -0
- package/lib/esm/data/query/IApiQueryFilters.d.ts +43 -0
- package/lib/esm/data/workflowActions/IApiAction.d.ts +106 -0
- package/lib/esm/exceptions/HttpRequestError.d.ts +7 -0
- package/lib/esm/exceptions/WebServiceError.d.ts +5 -0
- package/lib/esm/helpers/ErrorHelper.d.ts +4 -0
- package/lib/esm/helpers/OAuthHelper.d.ts +8 -0
- package/lib/esm/helpers/VersionHelperBase.d.ts +5 -0
- package/lib/esm/index.d.ts +85 -0
- package/lib/esm/index.js +8 -0
- package/lib/esm/interfaces/IEWJwtPayload.d.ts +4 -0
- package/lib/esm/interfaces/IItemPreview.d.ts +5 -0
- package/lib/esm/interfaces/ITokenData.d.ts +9 -0
- package/lib/esm/interfaces/ITranslatableString.d.ts +8 -0
- package/lib/esm/interfaces/TNumericValidatorType.d.ts +1 -0
- package/lib/esm/tokenizedServices/CommonDataConnection.d.ts +9 -0
- package/lib/esm/tokenizedServices/ITokenizedApiResult.d.ts +4 -0
- package/lib/esm/tokenizedServices/TokenizedServiceConnection.d.ts +25 -0
- package/lib/index.d.ts +2164 -85
- package/package.json +13 -4
- package/lib/AnonymousSessionHandler.js +0 -10
- package/lib/ApiConnection.js +0 -307
- package/lib/ApiMethods.js +0 -36
- package/lib/CredentialsSessionHandler.js +0 -54
- package/lib/HttpMethod.js +0 -5
- package/lib/IApiResult.js +0 -2
- package/lib/ISessionHandler.js +0 -1
- package/lib/OAuthSessionHandler.js +0 -29
- package/lib/OAuthSessionHandlerBase.js +0 -72
- package/lib/ReturnCodes.js +0 -10
- package/lib/axios/AxiosInstance.d.ts +0 -2
- package/lib/axios/AxiosInstance.js +0 -3
- package/lib/constants/ActionEventTypes.js +0 -9
- package/lib/constants/ColumnPermissionRules.js +0 -15
- package/lib/constants/CompletionLevels.js +0 -6
- package/lib/constants/CustomizationStatsItemKeys.js +0 -12
- package/lib/constants/Edition.js +0 -7
- package/lib/constants/EnumTypes.js +0 -33
- package/lib/constants/ExpirationReason.js +0 -8
- package/lib/constants/Feature.js +0 -7
- package/lib/constants/FieldNames.js +0 -422
- package/lib/constants/FieldTypes.js +0 -15
- package/lib/constants/FolderNames.js +0 -82
- package/lib/constants/Functionality.js +0 -55
- package/lib/constants/GlobalSettingsNames.js +0 -71
- package/lib/constants/LicenseKeyInvoiceSeverity.js +0 -9
- package/lib/constants/LicenseRestrictionKeys.js +0 -63
- package/lib/constants/RelationTypes.js +0 -11
- package/lib/data/EWItem.js +0 -86
- package/lib/data/IApiAdditionalField.js +0 -1
- package/lib/data/IApiAvailableBundle.js +0 -1
- package/lib/data/IApiAvailableVersionResponse.js +0 -1
- package/lib/data/IApiBooleanResponse.js +0 -1
- package/lib/data/IApiCapacityAvailableBundle.js +0 -1
- package/lib/data/IApiCart.js +0 -7
- package/lib/data/IApiColumn.js +0 -1
- package/lib/data/IApiColumnPermission.js +0 -1
- package/lib/data/IApiCompany.js +0 -7
- package/lib/data/IApiContact.js +0 -7
- package/lib/data/IApiCurrencyExchangeRate.js +0 -7
- package/lib/data/IApiCustomizationStatsItem.js +0 -1
- package/lib/data/IApiDataResponse.js +0 -1
- package/lib/data/IApiDatumResponse.js +0 -1
- package/lib/data/IApiDocument.js +0 -7
- package/lib/data/IApiEmail.js +0 -7
- package/lib/data/IApiEnumType.js +0 -6
- package/lib/data/IApiEnumValue.js +0 -1
- package/lib/data/IApiEnumValuesRelation.js +0 -7
- package/lib/data/IApiFeature.js +0 -1
- package/lib/data/IApiFeaturesLicenseBundle.js +0 -1
- package/lib/data/IApiFlow.js +0 -7
- package/lib/data/IApiGlobalSetting.js +0 -1
- package/lib/data/IApiGoal.js +0 -7
- package/lib/data/IApiGood.js +0 -7
- package/lib/data/IApiGoodInCart.js +0 -7
- package/lib/data/IApiGroup.js +0 -1
- package/lib/data/IApiItemBase.js +0 -1
- package/lib/data/IApiItemIdentifier.js +0 -1
- package/lib/data/IApiItemUsageStatus.js +0 -1
- package/lib/data/IApiJournal.js +0 -7
- package/lib/data/IApiLead.js +0 -7
- package/lib/data/IApiLicense.js +0 -1
- package/lib/data/IApiLicenseBundleBase.js +0 -1
- package/lib/data/IApiLocalizedLicenseBundle.js +0 -1
- package/lib/data/IApiLoginResponse.js +0 -1
- package/lib/data/IApiMarketingCampaign.js +0 -7
- package/lib/data/IApiMarketingList.js +0 -7
- package/lib/data/IApiModulePermission.js +0 -1
- package/lib/data/IApiObjectType.js +0 -1
- package/lib/data/IApiPasswordStrength.js +0 -1
- package/lib/data/IApiPayment.js +0 -7
- package/lib/data/IApiProject.js +0 -7
- package/lib/data/IApiRecurrencePattern.js +0 -7
- package/lib/data/IApiResult.js +0 -1
- package/lib/data/IApiSaveResponse.js +0 -1
- package/lib/data/IApiTask.js +0 -7
- package/lib/data/IApiUser.js +0 -1
- package/lib/data/IApiUserSetting.js +0 -1
- package/lib/data/IApiWebServiceTaskStatus.js +0 -1
- package/lib/data/IApiWorkReport.js +0 -7
- package/lib/data/IApiWorkflowActionDerivedItem.js +0 -1
- package/lib/data/IApiWorkflowModel.js +0 -1
- package/lib/data/query/IApiQuery.js +0 -1
- package/lib/data/query/IApiQueryFilters.js +0 -1
- package/lib/data/workflowActions/IApiAction.js +0 -1
- package/lib/exceptions/HttpRequestError.js +0 -7
- package/lib/exceptions/WebServiceError.js +0 -7
- package/lib/helpers/ErrorHelper.js +0 -16
- package/lib/helpers/OAuthHelper.js +0 -52
- package/lib/helpers/VersionHelperBase.js +0 -16
- package/lib/interfaces/IEWJwtPayload.js +0 -1
- package/lib/interfaces/IItemPreview.js +0 -1
- package/lib/interfaces/ITokenData.js +0 -1
- package/lib/interfaces/ITranslatableString.js +0 -1
- package/lib/interfaces/TNumericValidatorType.js +0 -1
- package/lib/tokenizedServices/CommonDataConnection.js +0 -16
- package/lib/tokenizedServices/ITokenizedApiResult.js +0 -1
- package/lib/tokenizedServices/TokenizedServiceConnection.js +0 -124
- /package/lib/{AnonymousSessionHandler.d.ts → cjs/AnonymousSessionHandler.d.ts} +0 -0
- /package/lib/{ApiConnection.d.ts → cjs/ApiConnection.d.ts} +0 -0
- /package/lib/{ApiMethods.d.ts → cjs/ApiMethods.d.ts} +0 -0
- /package/lib/{CredentialsSessionHandler.d.ts → cjs/CredentialsSessionHandler.d.ts} +0 -0
- /package/lib/{HttpMethod.d.ts → cjs/HttpMethod.d.ts} +0 -0
- /package/lib/{ISessionHandler.d.ts → cjs/ISessionHandler.d.ts} +0 -0
- /package/lib/{OAuthSessionHandler.d.ts → cjs/OAuthSessionHandler.d.ts} +0 -0
- /package/lib/{OAuthSessionHandlerBase.d.ts → cjs/OAuthSessionHandlerBase.d.ts} +0 -0
- /package/lib/{ReturnCodes.d.ts → cjs/ReturnCodes.d.ts} +0 -0
- /package/lib/{constants → cjs/constants}/ActionEventTypes.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/ColumnPermissionRules.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/CompletionLevels.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/CustomizationStatsItemKeys.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/Edition.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/EnumTypes.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/ExpirationReason.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/Feature.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/FieldNames.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/FieldTypes.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/FolderNames.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/Functionality.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/GlobalSettingsNames.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/LicenseKeyInvoiceSeverity.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/LicenseRestrictionKeys.d.ts +0 -0
- /package/lib/{constants → cjs/constants}/RelationTypes.d.ts +0 -0
- /package/lib/{data → cjs/data}/EWItem.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiAdditionalField.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiAvailableBundle.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiAvailableVersionResponse.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiBooleanResponse.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiCapacityAvailableBundle.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiCart.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiColumn.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiColumnPermission.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiCompany.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiContact.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiCurrencyExchangeRate.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiCustomizationStatsItem.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiDataResponse.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiDatumResponse.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiDocument.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiEmail.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiEnumType.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiEnumValue.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiEnumValuesRelation.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiFeature.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiFeaturesLicenseBundle.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiFlow.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiGlobalSetting.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiGoal.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiGood.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiGoodInCart.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiGroup.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiItemBase.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiItemIdentifier.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiItemUsageStatus.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiJournal.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiLead.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiLicense.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiLicenseBundleBase.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiLocalizedLicenseBundle.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiLoginResponse.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiMarketingCampaign.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiMarketingList.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiModulePermission.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiObjectType.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiPasswordStrength.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiPayment.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiProject.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiRecurrencePattern.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiResult.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiSaveResponse.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiTask.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiUser.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiUserSetting.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiWebServiceTaskStatus.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiWorkReport.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiWorkflowActionDerivedItem.d.ts +0 -0
- /package/lib/{data → cjs/data}/IApiWorkflowModel.d.ts +0 -0
- /package/lib/{data → cjs/data}/query/IApiQuery.d.ts +0 -0
- /package/lib/{data → cjs/data}/query/IApiQueryFilters.d.ts +0 -0
- /package/lib/{data → cjs/data}/workflowActions/IApiAction.d.ts +0 -0
- /package/lib/{exceptions → cjs/exceptions}/HttpRequestError.d.ts +0 -0
- /package/lib/{exceptions → cjs/exceptions}/WebServiceError.d.ts +0 -0
- /package/lib/{helpers → cjs/helpers}/ErrorHelper.d.ts +0 -0
- /package/lib/{helpers → cjs/helpers}/OAuthHelper.d.ts +0 -0
- /package/lib/{helpers → cjs/helpers}/VersionHelperBase.d.ts +0 -0
- /package/lib/{interfaces → cjs/interfaces}/IEWJwtPayload.d.ts +0 -0
- /package/lib/{interfaces → cjs/interfaces}/IItemPreview.d.ts +0 -0
- /package/lib/{interfaces → cjs/interfaces}/ITokenData.d.ts +0 -0
- /package/lib/{interfaces → cjs/interfaces}/ITranslatableString.d.ts +0 -0
- /package/lib/{interfaces → cjs/interfaces}/TNumericValidatorType.d.ts +0 -0
- /package/lib/{tokenizedServices → cjs/tokenizedServices}/CommonDataConnection.d.ts +0 -0
- /package/lib/{tokenizedServices → cjs/tokenizedServices}/ITokenizedApiResult.d.ts +0 -0
- /package/lib/{tokenizedServices → cjs/tokenizedServices}/TokenizedServiceConnection.d.ts +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { TApiQueryField } from './IApiQuery';
|
|
2
|
+
type TFilterValue = string | number | boolean | null;
|
|
3
|
+
interface IApiQueryFilterExpressionPredicateBase {
|
|
4
|
+
Field: TApiQueryField;
|
|
5
|
+
Value: TFilterValue;
|
|
6
|
+
}
|
|
7
|
+
export type TApiQueryFilterExpression = IApiQueryEqualsFilterExpressionPredicate | IApiQueryLessFilterExpressionPredicate | IApiQueryLessOrEqualFilterExpressionPredicate | IApiQueryGreaterFilterExpressionPredicate | IApiQueryGreaterOrEqualFilterExpressionPredicate | IApiQueryLikeFilterExpressionPredicate | IApiQueryInFilterExpressionPredicate | IApiQueryOrFilterExpressionOperator | IApiQueryNotFilterExpression | IApiQueryAndFilterExpressionOperator;
|
|
8
|
+
export interface IApiQueryEqualsFilterExpressionPredicate extends IApiQueryFilterExpressionPredicateBase {
|
|
9
|
+
__type: 'EqualsFilterExpressionPredicate:#EQ';
|
|
10
|
+
}
|
|
11
|
+
export interface IApiQueryLessFilterExpressionPredicate extends IApiQueryFilterExpressionPredicateBase {
|
|
12
|
+
__type: 'LessFilterExpressionPredicate:#EQ';
|
|
13
|
+
}
|
|
14
|
+
export interface IApiQueryLessOrEqualFilterExpressionPredicate extends IApiQueryFilterExpressionPredicateBase {
|
|
15
|
+
__type: 'LessOrEqualFilterExpressionPredicate:#EQ';
|
|
16
|
+
}
|
|
17
|
+
export interface IApiQueryGreaterFilterExpressionPredicate extends IApiQueryFilterExpressionPredicateBase {
|
|
18
|
+
__type: 'GreaterFilterExpressionPredicate:#EQ';
|
|
19
|
+
}
|
|
20
|
+
export interface IApiQueryGreaterOrEqualFilterExpressionPredicate extends IApiQueryFilterExpressionPredicateBase {
|
|
21
|
+
__type: 'GreaterOrEqualFilterExpressionPredicate:#EQ';
|
|
22
|
+
}
|
|
23
|
+
export interface IApiQueryLikeFilterExpressionPredicate extends IApiQueryFilterExpressionPredicateBase {
|
|
24
|
+
__type: 'LikeFilterExpressionPredicate:#EQ';
|
|
25
|
+
}
|
|
26
|
+
export interface IApiQueryInFilterExpressionPredicate {
|
|
27
|
+
__type: 'InFilterExpressionPredicate:#EQ';
|
|
28
|
+
Field: TApiQueryField;
|
|
29
|
+
Value: TFilterValue[];
|
|
30
|
+
}
|
|
31
|
+
export interface IApiQueryNotFilterExpression {
|
|
32
|
+
__type: 'NotFilterExpression:#EQ';
|
|
33
|
+
Child: TApiQueryFilterExpression;
|
|
34
|
+
}
|
|
35
|
+
export interface IApiQueryAndFilterExpressionOperator {
|
|
36
|
+
__type: 'AndFilterExpressionOperator:#EQ';
|
|
37
|
+
Children: TApiQueryFilterExpression[];
|
|
38
|
+
}
|
|
39
|
+
export interface IApiQueryOrFilterExpressionOperator {
|
|
40
|
+
__type: 'OrFilterExpressionOperator:#EQ';
|
|
41
|
+
Children: TApiQueryFilterExpression[];
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { TFolderName } from "../../constants/FolderNames";
|
|
2
|
+
export interface IApiEvent {
|
|
3
|
+
TypeName: TActionEventType;
|
|
4
|
+
Actions: TApiAction[];
|
|
5
|
+
}
|
|
6
|
+
export type TActionEventType = 'OnValueChanging' | 'OnValueChanged' | 'OnSaving' | 'OnSaved' | 'OnLoad' | 'OnLoading';
|
|
7
|
+
export type TApiAction = IApiAreEqualAction | IApiCreateRelationAction | IApiCreateTaskAction | IApiDatabaseFieldIsNotEmptyAction | IApiCheckPresenceOfRelationAction | IApiLockFieldAction | IApiLockFormAction | IApiSendEmailAction | IApiSetFieldValueAction | IApiSetItemOwnerAction | IApiWriteJournalEntryAction;
|
|
8
|
+
export interface IApiAction {
|
|
9
|
+
Name: string | null;
|
|
10
|
+
ExecuteOnlyOnce: boolean;
|
|
11
|
+
Relevance: TApiActionRelevant[];
|
|
12
|
+
}
|
|
13
|
+
type TApiActionRelevant = ({
|
|
14
|
+
GroupName: null;
|
|
15
|
+
IsForAllGroups: true;
|
|
16
|
+
} | {
|
|
17
|
+
GroupName: string;
|
|
18
|
+
IsForAllGroups: false;
|
|
19
|
+
}) & {
|
|
20
|
+
CompletionLevelName: TCompletionLevel;
|
|
21
|
+
};
|
|
22
|
+
export type TCompletionLevel = 'DoNothing' | 'CanIgnore' | 'CannotIgnore';
|
|
23
|
+
export interface IApiAreEqualAction extends IApiAction {
|
|
24
|
+
__type: 'AreEqualAction:#EA';
|
|
25
|
+
ComparisonParameters: {
|
|
26
|
+
ExpectedValue: string | null;
|
|
27
|
+
ActualValue: string | null;
|
|
28
|
+
NotEqualMessage: string | null;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface IApiCreateRelationAction extends IApiAction {
|
|
32
|
+
__type: 'CreateRelationAction:#EA';
|
|
33
|
+
NewRelationParameters: {
|
|
34
|
+
RelatedItemFileAs: string | null;
|
|
35
|
+
RelatedFolderName: TFolderName | null;
|
|
36
|
+
CreateItemCopy: boolean | null;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export interface IApiCreateTaskAction extends IApiAction {
|
|
40
|
+
__type: 'CreateTaskAction:#EA';
|
|
41
|
+
TaskData: {
|
|
42
|
+
TypeEn: string | null;
|
|
43
|
+
Subject: string | null;
|
|
44
|
+
Delegator: string | null;
|
|
45
|
+
Solver: string | null;
|
|
46
|
+
DueDate: string | null;
|
|
47
|
+
ReminderDate: string | null;
|
|
48
|
+
ImportanceEn: string | null;
|
|
49
|
+
SuperiorItem: string | null;
|
|
50
|
+
Company: string | null;
|
|
51
|
+
Contact: string | null;
|
|
52
|
+
Relations: string[] | null;
|
|
53
|
+
OpenWindowWhenPossible: boolean | null;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface IApiDatabaseFieldIsNotEmptyAction extends IApiAction {
|
|
57
|
+
__type: 'DatabaseFieldIsNotEmptyAction:#EA';
|
|
58
|
+
FieldName: string | null;
|
|
59
|
+
}
|
|
60
|
+
export interface IApiCheckPresenceOfRelationAction extends IApiAction {
|
|
61
|
+
__type: 'CheckPresenceOfRelationAction:#EA';
|
|
62
|
+
CheckParameters: {
|
|
63
|
+
RelationType: string | null;
|
|
64
|
+
RelatedFolderName: TFolderName | null;
|
|
65
|
+
RelationMissingMessage: string | null;
|
|
66
|
+
RelatedItemConditions: {
|
|
67
|
+
FieldName: string;
|
|
68
|
+
Value: string | null;
|
|
69
|
+
}[] | null;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export interface IApiLockFieldAction extends IApiAction {
|
|
73
|
+
__type: 'LockFieldAction:#EA';
|
|
74
|
+
FieldName: string | null;
|
|
75
|
+
}
|
|
76
|
+
export interface IApiLockFormAction extends IApiAction {
|
|
77
|
+
__type: 'LockFormAction:#EA';
|
|
78
|
+
}
|
|
79
|
+
export interface IApiSendEmailAction extends IApiAction {
|
|
80
|
+
__type: 'SendEmailAction:#EA';
|
|
81
|
+
EmailData: {
|
|
82
|
+
Body: string | null;
|
|
83
|
+
Subject: string | null;
|
|
84
|
+
RecipientGroups: string | null;
|
|
85
|
+
RecipientUsers: string | null;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export interface IApiSetFieldValueAction extends IApiAction {
|
|
89
|
+
__type: 'SetFieldValueAction:#EA';
|
|
90
|
+
FieldName: string | null;
|
|
91
|
+
NewValue: string | null;
|
|
92
|
+
}
|
|
93
|
+
export interface IApiSetItemOwnerAction extends IApiAction {
|
|
94
|
+
__type: 'SetItemOwnerAction:#EA';
|
|
95
|
+
Message: string | null;
|
|
96
|
+
}
|
|
97
|
+
export interface IApiWriteJournalEntryAction extends IApiAction {
|
|
98
|
+
__type: 'WriteJournalEntryAction:#EA';
|
|
99
|
+
JournalData: {
|
|
100
|
+
TypeEn: string | null;
|
|
101
|
+
FileAs: string | null;
|
|
102
|
+
Note: string | null;
|
|
103
|
+
ImportanceEn: string | null;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WebServiceError } from "./WebServiceError";
|
|
2
|
+
export type TUnionError = Error | HttpRequestError | WebServiceError;
|
|
3
|
+
export declare class HttpRequestError extends Error {
|
|
4
|
+
statusCode: number;
|
|
5
|
+
message: string;
|
|
6
|
+
constructor(statusCode: number, message: string);
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ITokenData } from '../interfaces/ITokenData';
|
|
2
|
+
export declare class OAuthHelper {
|
|
3
|
+
static finishAuthorization: (wsUrl: string, clientId: string, clientSecret: string, codeVerifier: string, authorizationCode: string, redirectUrl: string, callback: (tokenData: ITokenData) => void) => void;
|
|
4
|
+
static refreshToken: (wsUrl: string, clientId: string, clientSecret: string, refreshToken: string, callback: (tokenData: ITokenData) => void) => void;
|
|
5
|
+
static getWebServiceUrl: (refreshToken: string) => string;
|
|
6
|
+
static getUserName: (accessToken: string) => string | undefined;
|
|
7
|
+
private static callTokenEndpoint;
|
|
8
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ApiConnection } from "../ApiConnection";
|
|
2
|
+
export default class VersionHelperBase {
|
|
3
|
+
protected static readonly getIsDebug: (connection?: ApiConnection | null) => boolean;
|
|
4
|
+
protected static readonly supportsFeaturesOf: (connection: ApiConnection, version: string) => boolean;
|
|
5
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ApiConnection } from './ApiConnection';
|
|
2
|
+
import { HttpMethod } from './HttpMethod';
|
|
3
|
+
import { ISessionHandler } from './ISessionHandler';
|
|
4
|
+
import { ReturnCodes } from './ReturnCodes';
|
|
5
|
+
import { ITokenizedApiResult } from './tokenizedServices/ITokenizedApiResult';
|
|
6
|
+
import { TokenizedServiceConnection } from './tokenizedServices/TokenizedServiceConnection';
|
|
7
|
+
import { CommonDataConnection } from './tokenizedServices/CommonDataConnection';
|
|
8
|
+
import { ApiMethods } from './ApiMethods';
|
|
9
|
+
import GlobalSettingsNames from './constants/GlobalSettingsNames';
|
|
10
|
+
import FieldNames from './constants/FieldNames';
|
|
11
|
+
import { FolderNames, TFolderName } from './constants/FolderNames';
|
|
12
|
+
import { OAuthHelper } from './helpers/OAuthHelper';
|
|
13
|
+
import { HttpRequestError, TUnionError } from './exceptions/HttpRequestError';
|
|
14
|
+
import { TInputData } from './interfaces/ITokenData';
|
|
15
|
+
import EnumTypes from './constants/EnumTypes';
|
|
16
|
+
import RelationTypes from './constants/RelationTypes';
|
|
17
|
+
import { ColumnPermissionPermissionRules, ColumnPermissionMandatoryRules } from './constants/ColumnPermissionRules';
|
|
18
|
+
import { Edition } from './constants/Edition';
|
|
19
|
+
import { Feature } from './constants/Feature';
|
|
20
|
+
import Functionality from './constants/Functionality';
|
|
21
|
+
import CustomizationStatsItemKeys from './constants/CustomizationStatsItemKeys';
|
|
22
|
+
import LicenseRestrictionKeys from './constants/LicenseRestrictionKeys';
|
|
23
|
+
import ExpirationReason from './constants/ExpirationReason';
|
|
24
|
+
import LicenseKeyInvoiceSeverity from './constants/LicenseKeyInvoiceSeverity';
|
|
25
|
+
import ErrorHelper from './helpers/ErrorHelper';
|
|
26
|
+
import VersionHelperBase from './helpers/VersionHelperBase';
|
|
27
|
+
import { OAuthSessionHandlerBase } from './OAuthSessionHandlerBase';
|
|
28
|
+
export default ApiConnection;
|
|
29
|
+
export * from './data/EWItem';
|
|
30
|
+
export * from './data/IApiAdditionalField';
|
|
31
|
+
export * from './data/IApiAvailableBundle';
|
|
32
|
+
export * from './data/IApiAvailableVersionResponse';
|
|
33
|
+
export * from './data/IApiCapacityAvailableBundle';
|
|
34
|
+
export * from './data/IApiCart';
|
|
35
|
+
export * from './data/IApiColumn';
|
|
36
|
+
export * from './data/IApiColumnPermission';
|
|
37
|
+
export * from './data/IApiCompany';
|
|
38
|
+
export * from './data/IApiContact';
|
|
39
|
+
export * from './data/IApiCustomizationStatsItem';
|
|
40
|
+
export * from './data/IApiCurrencyExchangeRate';
|
|
41
|
+
export * from './data/IApiBooleanResponse';
|
|
42
|
+
export * from './data/IApiDataResponse';
|
|
43
|
+
export * from './data/IApiDatumResponse';
|
|
44
|
+
export * from './data/IApiDocument';
|
|
45
|
+
export * from './data/IApiEmail';
|
|
46
|
+
export * from './data/IApiEnumType';
|
|
47
|
+
export * from './data/IApiEnumValue';
|
|
48
|
+
export * from './data/IApiEnumValuesRelation';
|
|
49
|
+
export * from './data/IApiFeature';
|
|
50
|
+
export * from './data/IApiFeaturesLicenseBundle';
|
|
51
|
+
export * from './data/IApiFlow';
|
|
52
|
+
export * from './data/IApiGlobalSetting';
|
|
53
|
+
export * from './data/IApiGoal';
|
|
54
|
+
export * from './data/IApiGood';
|
|
55
|
+
export * from './data/IApiGoodInCart';
|
|
56
|
+
export * from './data/IApiGroup';
|
|
57
|
+
export * from './data/IApiItemBase';
|
|
58
|
+
export * from './data/IApiItemIdentifier';
|
|
59
|
+
export * from './data/IApiItemUsageStatus';
|
|
60
|
+
export * from './data/IApiJournal';
|
|
61
|
+
export * from './data/IApiLead';
|
|
62
|
+
export * from './data/IApiLicense';
|
|
63
|
+
export * from './data/IApiLicenseBundleBase';
|
|
64
|
+
export * from './data/IApiLocalizedLicenseBundle';
|
|
65
|
+
export * from './data/IApiLoginResponse';
|
|
66
|
+
export * from './data/IApiMarketingList';
|
|
67
|
+
export * from './data/IApiModulePermission';
|
|
68
|
+
export * from './data/IApiObjectType';
|
|
69
|
+
export * from './data/IApiPasswordStrength';
|
|
70
|
+
export * from './data/IApiPayment';
|
|
71
|
+
export * from './data/IApiProject';
|
|
72
|
+
export * from './data/IApiRecurrencePattern';
|
|
73
|
+
export * from './data/IApiResult';
|
|
74
|
+
export * from './data/IApiSaveResponse';
|
|
75
|
+
export * from './data/IApiTask';
|
|
76
|
+
export * from './data/IApiUser';
|
|
77
|
+
export * from './data/IApiUserSetting';
|
|
78
|
+
export * from './data/IApiWebServiceTaskStatus';
|
|
79
|
+
export * from './data/IApiWorkflowActionDerivedItem';
|
|
80
|
+
export * from './data/IApiWorkflowModel';
|
|
81
|
+
export * from './data/IApiWorkReport';
|
|
82
|
+
export * from './data/query/IApiQuery';
|
|
83
|
+
export * from './data/query/IApiQueryFilters';
|
|
84
|
+
export * from './interfaces/ITranslatableString';
|
|
85
|
+
export { HttpMethod, ISessionHandler, ReturnCodes, ITokenizedApiResult, TokenizedServiceConnection, CommonDataConnection, ApiMethods, GlobalSettingsNames, FolderNames, TFolderName, OAuthHelper, HttpRequestError, TUnionError, TInputData, FieldNames, EnumTypes, RelationTypes, ColumnPermissionPermissionRules, ColumnPermissionMandatoryRules, Edition, Feature, Functionality, CustomizationStatsItemKeys, LicenseRestrictionKeys, ExpirationReason, LicenseKeyInvoiceSeverity, ErrorHelper, VersionHelperBase, OAuthSessionHandlerBase };
|
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import e from"axios";import*as t from"universal-base64url";import s from"jwt-decode";import{compare as n}from"compare-versions";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var o,i={exports:{}},a=i.exports=function(){function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function t(e){return"function"==typeof e}var s=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,o=void 0,i=void 0,a=function(e,t){P[n]=e,P[n+1]=t,2===(n+=2)&&(i?i(E):A())};function c(e){i=e}function l(e){a=e}var d="undefined"!=typeof window?window:void 0,u=d||{},m=u.MutationObserver||u.WebKitMutationObserver,p="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function y(){return function(){return process.nextTick(E)}}function C(){return void 0!==o?function(){o(E)}:g()}function f(){var e=0,t=new m(E),s=document.createTextNode("");return t.observe(s,{characterData:!0}),function(){s.data=e=++e%2}}function S(){var e=new MessageChannel;return e.port1.onmessage=E,function(){return e.port2.postMessage(0)}}function g(){var e=setTimeout;return function(){return e(E,1)}}var P=new Array(1e3);function E(){for(var e=0;e<n;e+=2)(0,P[e])(P[e+1]),P[e]=void 0,P[e+1]=void 0;n=0}function v(){try{var e=Function("return this")().require("vertx");return o=e.runOnLoop||e.runOnContext,C()}catch(e){return g()}}var A=void 0;function k(e,t){var s=this,n=new this.constructor(T);void 0===n[b]&&q(n);var r=s._state;if(r){var o=arguments[r-1];a((function(){return _(r,n,o,s._result)}))}else j(s,n,e,t);return n}function I(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var s=new t(T);return B(s,e),s}A=p?y():m?f():h?S():void 0===d?v():g();var b=Math.random().toString(36).substring(2);function T(){}var w=void 0,D=1,N=2;function O(){return new TypeError("You cannot resolve a promise with itself")}function M(){return new TypeError("A promises callback cannot return that same promise.")}function R(e,t,s,n){try{e.call(t,s,n)}catch(e){return e}}function L(e,t,s){a((function(e){var n=!1,r=R(s,t,(function(s){n||(n=!0,t!==s?B(e,s):G(e,s))}),(function(t){n||(n=!0,W(e,t))}),"Settle: "+(e._label||" unknown promise"));!n&&r&&(n=!0,W(e,r))}),e)}function U(e,t){t._state===D?G(e,t._result):t._state===N?W(e,t._result):j(t,void 0,(function(t){return B(e,t)}),(function(t){return W(e,t)}))}function x(e,s,n){s.constructor===e.constructor&&n===k&&s.constructor.resolve===I?U(e,s):void 0===n?G(e,s):t(n)?L(e,s,n):G(e,s)}function B(t,s){if(t===s)W(t,O());else if(e(s)){var n=void 0;try{n=s.then}catch(e){return void W(t,e)}x(t,s,n)}else G(t,s)}function F(e){e._onerror&&e._onerror(e._result),H(e)}function G(e,t){e._state===w&&(e._result=t,e._state=D,0!==e._subscribers.length&&a(H,e))}function W(e,t){e._state===w&&(e._state=N,e._result=t,a(F,e))}function j(e,t,s,n){var r=e._subscribers,o=r.length;e._onerror=null,r[o]=t,r[o+D]=s,r[o+N]=n,0===o&&e._state&&a(H,e)}function H(e){var t=e._subscribers,s=e._state;if(0!==t.length){for(var n=void 0,r=void 0,o=e._result,i=0;i<t.length;i+=3)n=t[i],r=t[i+s],n?_(s,n,r,o):r(o);e._subscribers.length=0}}function _(e,s,n,r){var o=t(n),i=void 0,a=void 0,c=!0;if(o){try{i=n(r)}catch(e){c=!1,a=e}if(s===i)return void W(s,M())}else i=r;s._state!==w||(o&&c?B(s,i):!1===c?W(s,a):e===D?G(s,i):e===N&&W(s,i))}function z(e,t){try{t((function(t){B(e,t)}),(function(t){W(e,t)}))}catch(t){W(e,t)}}var V=0;function J(){return V++}function q(e){e[b]=V++,e._state=void 0,e._result=void 0,e._subscribers=[]}function Q(){return new Error("Array Methods must be provided an Array")}var Y=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(T),this.promise[b]||q(this.promise),s(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?G(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&G(this.promise,this._result))):W(this.promise,Q())}return e.prototype._enumerate=function(e){for(var t=0;this._state===w&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var s=this._instanceConstructor,n=s.resolve;if(n===I){var r=void 0,o=void 0,i=!1;try{r=e.then}catch(e){i=!0,o=e}if(r===k&&e._state!==w)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(s===te){var a=new s(T);i?W(a,o):x(a,e,r),this._willSettleAt(a,t)}else this._willSettleAt(new s((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,s){var n=this.promise;n._state===w&&(this._remaining--,e===N?W(n,s):this._result[t]=s),0===this._remaining&&G(n,this._result)},e.prototype._willSettleAt=function(e,t){var s=this;j(e,void 0,(function(e){return s._settledAt(D,t,e)}),(function(e){return s._settledAt(N,t,e)}))},e}();function $(e){return new Y(this,e).promise}function K(e){var t=this;return s(e)?new t((function(s,n){for(var r=e.length,o=0;o<r;o++)t.resolve(e[o]).then(s,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}function X(e){var t=new this(T);return W(t,e),t}function Z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function ee(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var te=function(){function e(t){this[b]=J(),this._result=this._state=void 0,this._subscribers=[],T!==t&&("function"!=typeof t&&Z(),this instanceof e?z(this,t):ee())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var s=this,n=s.constructor;return t(e)?s.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){throw t}))})):s.then(e,e)},e}();function se(){var e=void 0;if(void 0!==r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var s=null;try{s=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===s&&!t.cast)return}e.Promise=te}return te.prototype.then=k,te.all=$,te.race=K,te.resolve=I,te.reject=X,te._setScheduler=c,te._setAsap=l,te._asap=a,te.polyfill=se,te.Promise=te,te}();
|
|
2
|
+
/*!
|
|
3
|
+
* @overview es6-promise - a tiny implementation of Promises/A+.
|
|
4
|
+
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
|
5
|
+
* @license Licensed under MIT license
|
|
6
|
+
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
|
7
|
+
* @version v4.2.8+1e68dce6
|
|
8
|
+
*/class c{}c.rcSuccess="rcSuccess",c.rcBadSession="rcBadSession",c.rcDuplicateContact="rcDuplicateContact",c.rcWebServiceMoved="rcWebServiceMoved",c.rcAccessDenied="rcAccessDenied",c.rcLoginUserNameChanged="rcLoginUserNameChanged",c.rcLicenseExpired="rcLicenseExpired",function(e){e.get="get",e.post="post"}(o||(o={}));class l{}l.isValidFolderName=e=>Object.values(l).includes(e),l.actions="Actions",l.additionalFields="AdditionalFields",l.bonuses="Bonuses",l.calendar="Calendar",l.capacityNotes="CapacityNotes",l.capacityNoteTypes="CapacityNoteTypes",l.carts="Carts",l.columnPermissions="ColumnPermissions",l.companies="Companies",l.contacts="Contacts",l.currencyExchangeRates="CurrencyExchangeRates",l.documents="Documents",l.emails="Emails",l.enumTypes="EnumTypes",l.enumValues="EnumValues",l.enumValuesRelations="EnumValuesRelations",l.features="Features",l.flows="Flows",l.globalSettings="GlobalSettings",l.goals="Goals",l.goods="Goods",l.goodsInCart="GoodsInCart",l.goodsInSet="GoodsInSet",l.groups="Groups",l.history="History",l.holidays="Holidays",l.children="Children",l.individualDiscounts="IndividualDiscounts",l.invoiceItems="InvoiceItems",l.invoices="Invoices",l.itemCopyRelations="ItemCopyRelations",l.journal="Journal",l.knowledge="Knowledge",l.layouts="Layouts",l.layoutsModels="LayoutsModels",l.leads="Leads",l.ledger="Ledger",l.mappings="Mappings",l.marketing="Marketing",l.marketingList="MarketingList",l.marketingListSources="MarketingListSources",l.models="Models",l.modulePermissions="ModulePermissions",l.objectTypesOptions="ObjectTypesOptions",l.payments="Payments",l.priceListGroups="PriceListGroups",l.projectAssignments="ProjectAssignments",l.projectAssignmentsPerUserProject="ProjectAssignmentsPerUserProject",l.projectAssignmentsTotal="ProjectAssignmentsTotal",l.projectAssignmentsTotalUserProject="ProjectAssignmentsTotalUserProject",l.projectList="ProjectList",l.projects="Projects",l.projectUsersInCaPlan="ProjectUsersInCaPlan",l.relationData="RelationData",l.relations="Relations",l.reports="Reports",l.revisionsHistory="RevisionsHistory",l.salaries="Salaries",l.salePrices="SalePrices",l.prices="Prices",l.sqlObjects="SqlObjects",l.tasks="Tasks",l.recurrencePatterns="RecurrencePatterns",l.teamRoles="TeamRoles",l.templates="Templates",l.training="Training",l.users="Users",l.userSettings="UserSettings",l.vacation="Vacation",l.webAccess2Options="WebAccess2Options",l.webAccessOptions="WebAccessOptions",l.workCommitments="WorkCommitments",l.workflowHistory="WorkflowHistory",l.workReports="WorkReports",l.wrongClientVersions="WrongClientVersions",l.xsltTransformations="XsltTransformations";class d{}d.getAllEmailAttachments="GetAllEmailAttachments",d.getCalendarsByItemGuids="GetCalendarsByItemGuids",d.getEmailAttachment="GetEmailAttachment",d.getItemPreview="GetItemPreview",d.getJournalsByItemGuids="GetJournalsByItemGuids",d.getMarketingCampaignsByItemGuids="GetMarketingCampaignsByItemGuids",d.getMarketingListsRecordsByItemGuids="GetMarketingListsRecordsByItemGuids",d.getRevisionHistoryRecordsByItemGuids="GetRevisionHistoryRecordsByItemGuids",d.getVacationsByItemGuids="GetVacationsByItemGuids",d.getWorkflowHistoryRecordsByItemGuids="GetWorkflowHistoryRecordsByItemGuids",d.logIn="LogIn",d.logOut="LogOut",d.getGetFolderNameByItemGuidsMethodName=e=>{switch(e){case l.calendar:return d.getCalendarsByItemGuids;case l.journal:return d.getJournalsByItemGuids;case l.marketing:return d.getMarketingCampaignsByItemGuids;case l.marketingList:return d.getMarketingListsRecordsByItemGuids;case l.revisionsHistory:return d.getRevisionHistoryRecordsByItemGuids;case l.vacation:return d.getVacationsByItemGuids;case l.workflowHistory:return d.getWorkflowHistoryRecordsByItemGuids;default:return`Get${e}ByItemGuids`}};class u{constructor(e,t,s,n,r,o){if(this.invalidateSessionId=(e,t)=>{t&&t()},this.getSessionId=(e,t)=>{e.callWithoutSession(d.logIn,{userName:this.username,passwordHash:this.passwordHash,appVersion:this.appVersion,clientMachineIdentifier:this.clientMachineIdentifier,clientMachineName:this.clientMachineName,createSessionCookie:e.supportsGetItemPreviewMethod},(e=>{this.lastSuccessfulLoginResponse=e;const s=e.SessionId;if(s)t&&t(s);else{const e=new Error("Successful login but no session came.");if(!this.errorCallback)throw e;this.errorCallback(e)}}),(e=>{const t=new Error("Unable to login. Error response follows.\n"+JSON.stringify(e));if(!this.errorCallback)throw t;this.errorCallback(t)}))},!e||!t)throw new Error("Non of the arguments 'username', 'passwordHash' can be empty.");this.username=e,this.passwordHash=t,this.appVersion=s,this.clientMachineIdentifier=n,this.clientMachineName=r,this.errorCallback=o}}class m{constructor(){this.getSessionId=(e,t)=>{throw new Error("With anonymous session handler, use only connection methods without session.")},this.invalidateSessionId=(e,t)=>{throw new Error("With anonymous session handler, use only connection methods without session.")}}}class p extends Error{constructor(e,t){super(),this.returnCode=e,this.message=t}}class h{constructor(e,t,s,n,r){if(this.invalidateSessionId=(e,t)=>{t&&t()},this.getSessionId=(e,t)=>{const s={userName:this.username,appVersion:this.appVersion,createSessionCookie:e.supportsGetItemPreviewMethod},n={Authorization:"Bearer "+this.accessToken};e.callWithoutSession(d.logIn,s,(e=>{this.lastSuccessfulLoginResponse=e;const s=e.SessionId;if(s)t&&t(s);else{const e=new Error("Successful login but no session came.");if(!this.errorCallback)throw e;this.errorCallback(e)}}),(e=>{const t=new p(e.ReturnCode,"Unable to login. Error response follows.\n"+JSON.stringify(e));if(!this.errorCallback)throw t;this.errorCallback(t)}),n,void 0,(s=>{if(401!==(null==s?void 0:s.statusCode)){if(!this.errorCallback)throw s;this.errorCallback(s)}else this.getNewAccessTokenCallback(e,((s,n)=>{this.accessToken=s,n||this.getSessionId(e,t)}))}))},!e)throw new Error("Non of the arguments 'username', 'clientId', 'clientSecret', 'refreshToken' can be empty.");this.username=e,this.accessToken=t,this.appVersion=s,this.getNewAccessTokenCallback=n,this.errorCallback=r}}class y extends h{constructor(e,t,s,n,r,o,i,a){if(!(e&&n&&t&&s))throw new Error("Non of the arguments 'username', 'clientId', 'clientSecret', 'refreshToken' can be empty.");super(e,r,o,((e,t)=>{k.refreshToken(e.wsUrl,this.clientId,this.clientSecret,this.refreshToken,(e=>{try{this.refreshTokenCallback&&this.refreshTokenCallback(e)}catch(e){this.errorCallback&&this.errorCallback(new Error("Refresh token callback failed.\n"+JSON.stringify(e)))}t(e.access_token,e.error)}))}),i),this.refreshToken=n,this.clientId=t,this.clientSecret=s,this.refreshTokenCallback=a}}class C extends Error{constructor(e,t){super(),this.statusCode=e,this.message=t}}class f{}f.stringifyError=e=>JSON.stringify(e,f.replaceErrors),f.replaceErrors=(e,t)=>{if(t instanceof Error){const e={};return Object.getOwnPropertyNames(t).forEach((s=>{e[s]=t[s]})),e}return t};class S{constructor(s,n,r,i){if(this.createOpenLink=(e,s,n)=>{const r=t.encode(this.baseUri);let o="eway://"+e;s&&(o+="/"+(null==s?void 0:s.toLowerCase())),o=t.encode(o);let i="https://open.eway-crm.com/?ws="+r+"&l="+o;return n&&(i+="&n="+encodeURIComponent(n)),i},this.askUploadMethod=(e,t,s,n,r)=>new Promise(((o,i)=>{const a=r?e=>{throw i(e),e}:i;this.callUploadMethod(e,t,s,o,a,a,n)})),this.callUploadMethod=(t,s,n,r,o,i,a)=>{const l=()=>{this.sessionHandler.getSessionId(this,(e=>{this.sessionId=e,this.callUploadMethod(t,s,n,r,o,i,a)}))},d=this.sessionId;if(!d)return void l();const u=`${this.svcUri}/SaveBinaryAttachment?sessionId=${this.sessionId}&itemGuid=${t}&fileName=${encodeURIComponent(s)}`,m=e.post(u,n,a);S.handleCallPromise(m,r,(e=>{if(e.ReturnCode===c.rcBadSession)return this.sessionId=null,void this.sessionHandler.invalidateSessionId(d,l);if(o)o(e);else{const t=new Error("Unhandled connection return code "+e.ReturnCode+": "+e.Description);if(!this.errorCallback)throw t;this.errorCallback(t)}}),(e=>{let t=new Error("Unhandled connection error when calling "+u+": "+f.stringifyError(e));if("statusCode"in e&&413===e.statusCode&&(t=new Error("The file has exceeded the maximum allowed file size for uploading. You can contact your IT administrator or eWay-CRM support if you would like to increase the limit.")),i)i(t);else{if(!this.errorCallback)throw t;this.errorCallback(t)}}))},this.askMethod=(e,t,s,n)=>new Promise(((r,o)=>{const i=n?e=>{throw o(e),e}:o;this.callMethod(e,t,r,i,s,i)})),this.callMethod=(e,t,s,n,r,i)=>{r||(r=o.post);const a=()=>{this.sessionHandler.getSessionId(this,(o=>{this.sessionId=o,this.callMethod(e,t,s,n,r,i)}))},l=this.sessionId;if(!l)return void a();t.sessionId=l;const u=e!==d.logOut?s:e=>{this.sessionId=null,s(e)};this.callWithoutSession(e,t,u,(s=>{if(s.ReturnCode!==c.rcBadSession||(this.sessionId=null,e===d.logOut))if(n)n(s);else{const e=new Error("Unhandled connection return code "+s.ReturnCode+": "+s.Description);if(!this.errorCallback)throw e;this.errorCallback(e,t)}else this.sessionHandler.invalidateSessionId(l,a)}),null,r,i)},this.callWithoutSession=(t,s,n,r,i,a,c)=>{var l;a||(a=o.post);const u=this.svcUri+"/"+t;let m,p;switch(i&&(m={headers:i,withCredentials:null!==(l=this.supportGetItemPreviewMethod)&&void 0!==l?l:t==d.logIn}),a){case o.get:if(s)throw new Error("Calling api get method with data specified does not make any sense.");p=e.get(u,m);break;case o.post:p=e.post(u,s,m);break;default:throw new Error(`Unknown http method '${a}'.`)}S.handleCallPromise(p,n,r,(e=>{if(c)try{c(e)}catch(e){if(!this.errorCallback)throw e;this.errorCallback(e,s)}else{const t=new Error("Unhandled connection error when calling "+u+": "+f.stringifyError(e));if(!this.errorCallback)throw t;this.errorCallback(t,s)}}))},this.getItemPreviewGetMethodUrl=(e,t,s)=>this.svcUri+"/"+d.getItemPreview+"?folderName="+encodeURIComponent(e)+"&itemGuid="+encodeURIComponent(t)+(s||0===s?"&itemVersion="+encodeURIComponent(s.toString()):""),this.getEmailAttachmentGetMethodUrl=(e,t)=>this.svcUri+"/"+d.getEmailAttachment+"?itemGuid="+encodeURIComponent(e)+"&contentId="+encodeURIComponent(t),this.getAllEmailAttachmentsZipGetMethodUrl=e=>this.svcUri+"/"+d.getAllEmailAttachments+"?itemGuid="+encodeURIComponent(e),this.getActiveSessionId=()=>this.sessionId,!s)throw new Error("The argument 'apiServiceUri' cannot be empty.");if(s.length<8||"https://"!==s.substr(0,8).toLowerCase()&&"http://"!==s.substr(0,7).toLowerCase())throw new Error("Api service uri must start either with 'https://' or with 'http://'.");if(".svc"===s.substr(s.length-4).toLowerCase()){this.svcUri=s;const e=["/API.svc","/InsecureAPI.svc","/WcfService/Service.svc"].find((e=>e.toLowerCase()===s.substr(s.length-e.length).toLowerCase()))||"";this.baseUri=s.substr(0,s.length-e.length)}else this.baseUri=s,"/"===this.baseUri.substr(this.baseUri.length-1)&&(this.baseUri=this.baseUri.substr(0,this.baseUri.length-1)),"https://"===s.substr(0,8).toLowerCase()?this.svcUri=this.baseUri+"/API.svc":this.svcUri=this.baseUri+"/InsecureAPI.svc";this.sessionHandler=n,this.errorCallback=r,this.sessionId=null,this.supportGetItemPreviewMethod=null!=i&&i}get supportsGetItemPreviewMethod(){return this.supportGetItemPreviewMethod}static create(e,t,s,n,r,o,i,a){return new S(e,new u(t,s,n,r,o,i),i,a)}static createAnonymous(e,t){return new S(e,new m,t)}static createUsingOAuth(e,t,s,n,r,o,i,a,c,l){return new S(e,new y(t,s,n,r,o,i,a,c),a,l)}get wsUrl(){return this.baseUri}static handleCallPromise(e,t,s,n){e.then((e=>{200===e.status?e.data.ReturnCode===c.rcSuccess?t(e.data):s(e.data):n(new C(e.status,e.statusText))})).catch((e=>{e.response?n(new C(e.response.status,e.response.statusText)):n(e)}))}}class g{constructor(e,t,s,n,r,o,i){this.isEnabled=(e,t)=>{const s=()=>{this.url&&this.token?e(this.url,this.token):t()};this.url&&this.token?e(this.url,this.token):this.obtainToken(s)},this.callTokenizedApi=(e,t,s,n)=>{this.isEnabled(((r,o)=>{t.token=o,g.call(r,e,t,s,(r=>{if(r.ReturnCodeString!==this.invalidTokenReturnCode){if(n)n(r);else if(this.generalErrorCallback){const e=new Error("Unhandled tokenized service connection return code "+r.ReturnCodeString+".\nDescription: "+r.Description);this.generalErrorCallback(e)}}else this.obtainToken((()=>{this.callTokenizedApi(e,t,s,n)}))}),(e=>{if(this.generalErrorCallback){const t=new Error("Unhandled tokenized service connection communication error: "+JSON.stringify(e));this.generalErrorCallback(t)}}))}),(()=>{n&&n(null)}))},this.obtainToken=e=>{if(!this.isActive)return this.url=null,this.token=null,void e();const t=t=>{const s=this.urlAndTokenObtainer(t);s.url&&s.token?(this.url=s.url,this.token=s.token,this.isActive=!0,e()):(this.url=null,this.token=null,this.isActive=!1,e())},s=()=>{this.url=null,this.token=null,this.isActive=!1,e()};this.needsSession?this.connection.callMethod(this.obtainTokenMethodName,{},t,s,this.obtainTokenMethodType):this.connection.callWithoutSession(this.obtainTokenMethodName,null,t,s,null,this.obtainTokenMethodType)},this.obtainTokenMethodName=e,this.obtainTokenMethodType=t,this.needsSession=s,this.invalidTokenReturnCode=n,this.urlAndTokenObtainer=r,this.connection=o,this.generalErrorCallback=i||null,this.url=null,this.token=null,this.isActive=!0}static call(t,s,n,r,o,i){const a=t+"/"+s;e.post(a,n).then((e=>{200===e.status?"Success"===e.data.ReturnCodeString?r(e.data):o(e.data):i(new C(e.status,e.statusText))})).catch((e=>{e.response?i(new C(e.response.status,e.response.statusText)):i(e)}))}}const P=e=>({url:e.ServiceUrl,token:e.Token});class E{constructor(e,t){this.isCommonDataApiEnabled=(e,t)=>{this.tokenizedConnection.isEnabled(e,t)},this.callCommonDataApi=(e,t,s,n)=>{this.tokenizedConnection.callTokenizedApi(e,t,s,n)},this.tokenizedConnection=new g("ObtainCommonDataApiAccessToken",o.get,!1,"InvalidCommonDataToken",P,e,t)}}class v{}v.acceptableBackwardWorkReportDays="AcceptableBackwardWorkReportDays",v.adminAppInactiveLogoutTime="AdminAppInactiveLogoutTime",v.applyGeneralDataProtectionRules="ApplyGeneralDataProtectionRules",v.automaticallyCreateJournalAfterCallDuration="AutomaticallyCreateJournalAfterCallDuration",v.bonusesCompletedState="BonusesCompletedState",v.cartInvoicedState="CartInvoicedState",v.cartOrderCanceledState="CartOrderCanceledState",v.cartOrderInProcessState="CartOrderInProcessState",v.cartOrderProcessedState="CartOrderProcessedState",v.cartPaidState="CartPaidState",v.cartProposalInProcessState="CartProposalInProcessState",v.cartProposalProcessedState="CartProposalProcessedState",v.cartSalesVoucherIssuedState="CartSalesVoucherIssuedState",v.cartToBeInvoicedState="CartToBeInvoicedState",v.cartVoidedState="CartVoidedState",v.clickToCallScheme="ClickToCallScheme",v.companyDuplicityCheckEnabled="CompanyDuplicityCheckEnabled",v.completedStateName="CompletedStateName",v.contactDuplicityCheckEnabled="ContactDuplicityCheckEnabled",v.createCompanyWhileImportingContactFromOutlook="CreateCompanyWhileImportingContactFromOutlook",v.deadStateName="DeadStateName",v.enableCompaniesSyncIntoMobileDeviceContacts="EnableCompaniesSyncIntoMobileDeviceContacts",v.enableContactsSyncIntoMobileDevice="EnableContactsSyncIntoMobileDevice",v.enableLeadsSyncIntoMobileDeviceContacts="EnableLeadsSyncIntoMobileDeviceContacts",v.enableUsersSyncIntoMobileDeviceContacts="EnableUsersSyncIntoMobileDeviceContacts",v.emailsActiveProjectsLeadsFilter="EmailsActiveProjectsLeadsFilter",v.exchangeRatesAdminGroupName="ExchangeRatesAdminGroupName",v.forcedEmailTrackingGroups="ForcedEmailTrackingGroups",v.groupsForAllUnpaidInvoicesNotification="GroupsForAllUnpaidInvoicesNotification",v.itemPreviewMaxHeight="ItemPreviewMaxHeight",v.lastActivityAttributes="LastActivityAttributes",v.leadsCompletedState="LeadsCompletedState",v.leadDeadlineAlertGroups="LeadDeadlineAlertGroups",v.leadsDeadState="LeadsDeadState",v.marketingCompletedState="MarketingCompletedState",v.marketingDeadState="MarketingDeadState",v.minimumPasswordLength="MinimumPasswordLength",v.nextStepAttributes="NextStepAttributes",v.notifyAboutInvoicedInvoiceInPohodaGroup="NotifyAboutInvoicedInvoiceInPohodaGroup",v.notifyAboutLeadsDeadline="NotifyAboutLeadsDeadline",v.notifyAboutPaidInvoiceInPohodaGroup="NotifyAboutPaidInvoiceInPohodaGroup",v.notifyAboutProjectDeadline="NotifyAboutProjectDeadline",v.numberOfDecimalPlaces="NumberOfDecimalPlaces",v.phoneListTaskSolverGroup="PhoneListTaskSolverGroup",v.projectDeadlineAlert="ProjectDeadlineAlert",v.serverUpdateProgressNotificationGroup="ServerUpdateProgressNotificationGroup",v.sumarizeCartsPricesOnLeads="SumarizeCartsPricesOnLeads",v.sumarizeCartsPricesOnProjects="SumarizeCartsPricesOnProjects",v.sumarizePeopleExpensesOnProjects="SumarizePeopleExpensesOnProjects",v.systemHealthNotificationGroup="SystemHealthNotificationGroup",v.tasksCompletedState="TasksCompletedState",v.tasksDeferredState="TasksDeferredState",v.tasksInProgressState="TasksInProgressState",v.tasksNotStartedState="TasksNotStartedState",v.tasksWaitOnSomeoneElseState="TasksWaitOnSomeoneElseState",v.trackDocumentVersions="TrackDocumentVersions",v.vacationCompletedState="VacationCompletedState",v.workReportApprovedState="WorkReportApprovedState",v.defaultLanguage="DefaultLanguage",v.defaultCurrency="DefaultCurrency",v.myCompanyCountry="MyCompanyCountry",v.myCompanyName="MyCompanyName",v.myCompanyStreet="MyCompanyStreet",v.myCompanyCity="MyCompanyCity",v.myCompanyState="MyCompanyState",v.myCompanyZip="MyCompanyZIP",v.myCompanyId="MyCompanyID",v.myCompanyVat="MyCompanyVAT";class A{}A.Common={CreatedByGUID:"CreatedByGUID",CurrencyEn:"CurrencyEn",DefaultCurrencySuffix:"DefaultCurrency",FileAs:"FileAs",ItemCreated:"ItemCreated",ItemChanged:"ItemChanged",ItemGUID:"ItemGUID",ItemVersion:"ItemVersion",ModifiedByGUID:"ModifiedByGUID",OwnerGUID:"OwnerGUID",ParentCurrencySuffix:"ParentCurrency"},A.Calendar={EndDate:"EndDate",Note:"Note"},A.Carts={SuperiorItem:"SuperiorItem",SuperiorCompany:"SuperiorCompany",SuperiorContact:"SuperiorContact",TypeEn:"TypeEn",StateEn:"StateEn"},A.Companies={ID:"ID",CompanyName:"CompanyName",Department:"Department",AccountNumber:"AccountNumber",IdentificationNumber:"IdentificationNumber",VatNumber:"VatNumber",Sales:"Reversal",EmployeesCount:"EmployeesCount",Purchaser:"Purchaser",Suppliers:"Suppliers",Competitor:"Competitor",Address1Street:"Address1Street",Address1City:"Address1City",Address1PostalCode:"Address1PostalCode",Address1CountryEn:"Address1CountryEn",Address1State:"Address1State",Address1POBox:"Address1POBox",Address2Street:"Address2Street",Address2City:"Address2City",Address2PostalCode:"Address2PostalCode",Address2CountryEn:"Address2CountryEn",Address2State:"Address2State",Address2POBox:"Address2POBox",Address3Street:"Address3Street",Address3City:"Address3City",Address3PostalCode:"Address3PostalCode",Address3CountryEn:"Address3CountryEn",Address3State:"Address3State",Address3POBox:"Address3POBox",InvoiceAddress:"InvoiceAddress",PostalAddress:"PostalAddress",Phone:"Phone",Mobile:"Mobile",Fax:"Fax",WebPage:"WebPage",Email:"Email",ICQ:"ICQ",MSN:"MSN",Skype:"Skype",ImportanceEn:"ImportanceEn",FirstContactEn:"FirstContactEn",LineOfBusiness:"LineOfBusiness",EmailOptOut:"EmailOptOut",MailingListOther:"MailingListOther",MailingListOtherValue:"MailingListOtherValue",Note:"Note",IsPrivate:"IsPrivate",NextStep:"NextStep",LastActivity:"LastActivity",AdditionalDiscount:"AdditionalDiscount"},A.Contacts={ProfilePicture:"ProfilePicture",Title:"Title",Email1Address:"Email1Address",Email2Address:"Email2Address",Email3Address:"Email3Address",DoNotSendNewsletter:"DoNotSendNewsletter",ImportanceEn:"ImportanceEn",PrefixEn:"PrefixEn",FirstName:"FirstName",MiddleName:"MiddleName",LastName:"LastName",SuffixEn:"SuffixEn",BusinessAddressStreet:"BusinessAddressStreet",BusinessAddressCity:"BusinessAddressCity",BusinessAddressPostalCode:"BusinessAddressPostalCode",BusinessAddressCountryEn:"BusinessAddressCountryEn",BusinessAddressState:"BusinessAddressState",BusinessAddressPoBox:"BusinessAddressPOBox",HomeAddressStreet:"HomeAddressStreet",HomeAddressCity:"HomeAddressCity",HomeAddressPostalCode:"HomeAddressPostalCode",HomeAddressCountryEn:"HomeAddressCountryEn",HomeAddressState:"HomeAddressState",HomeAddressPOBox:"HomeAddressPOBox",OtherAddressStreet:"OtherAddressStreet",OtherAddressCity:"OtherAddressCity",OtherAddressPostalCode:"OtherAddressPostalCode",OtherAddressCountryEn:"OtherAddressCountryEn",OtherAddressState:"OtherAddressState",OtherAddressPOBox:"OtherAddressPOBox",BusinessPhoneNumber:"TelephoneNumber1",BusinessPhoneNumber2:"TelephoneNumber5",BusinessFaxNumber:"TelephoneNumber6",MobilePhoneNumber:"TelephoneNumber3",HomePhoneNumber:"TelephoneNumber2",OtherPhoneNumber:"TelephoneNumber4",ICQ:"ICQ",MSN:"MSN",Skype:"Skype",WebPage:"WebPage",Note:"Note",Department:"Department",Company:"Company",IsPrivate:"Private",NextStep:"NextStep",LastActivity:"LastActivity"},A.Leads={ID:"ID",FileAs:"FileAs",HumanID:"HID",Customer:"Customer",ContactPerson:"ContactPerson",Marketing:"Marketing",ReceiveDate:"ReceiveDate",Email:"Email",Phone:"Phone",Street:"Street",State:"State",CountryEn:"CountryEn",City:"City",POBox:"POBox",Zip:"Zip",Price:"Price",PriceChanged:"PriceChanged",CurrencyEn:A.Common.CurrencyEn,EstimatedEnd:"EstimatedEnd",Probability:"Probability",LeadOriginEn:"LeadOriginEn",PriceDefaultCurrency:"PriceDefaultCurrency",EstimatedValue:"EstimatedValue",EstimatedValueDefaultCurrency:"EstimatedValueDefaultCurrency",Note:"Note",TypeEn:"TypeEn",StateEn:"StateEn",PrevStateEn:"PrevStateEn",IsPrivate:"Private",EmailOptOut:"EmailOptOut",NextStep:"NextStep",LastActivity:"LastActivity",ItemVersion:"ItemVersion",EstimatedRevenue:"EstimatedRevenue",EstimatedRevenueDefaultCurrency:"EstimatedRevenueDefaultCurrency",CompletedDate:"CompletedDate"},A.Documents={FileAs:"FileAs",DocName:"DocName",Preview:"Preview",PreviewWidth:"PreviewWidth",PreviewHeight:"PreviewHeight",DocTypeEn:"DocTypeEn",StateEn:"StateEn",ImportanceEn:"ImportanceEn",SuperiorItem:"SuperiorItem",SuperiorCompany:"Company",SuperiorContact:"Contact",DocSize:"DocSize",Extension:"Extension",CreationTime:"CreationTime",LastWriteTime:"LastWriteTime",IsPrivate:"Private",Note:"Note"},A.Emails={To:"To",From:"SenderEmailAddress",Cc:"Cc",Subject:"Subject",ImportanceEn:"ImportanceEn",SuperiorItem:"SuperiorItem",SentOn:"SentOn",ReceivedTime:"ReceivedTime",FileSize:"FileSize",AttachmentsCount:"AttachmentsCount",Note:"Note"},A.Goods={Code:"Code",Structure:"Structure",Note:"Note",Description:"Description"},A.Journal={FileAs:"FileAs",Subject:"Subject",TypeEn:"TypeEn",StateEn:"StateEn",ImportanceEn:"ImportanceEn",EventStart:"EventStart",EventEnd:"EventEnd",SuperiorItem:"SuperiorItem",Company:"Company",Contact:"Contact",Marketing:"Marketing",IsSystem:"System",IsPrivate:"Private",Note:"Note",Phone:"Phone"},A.Vacation={StartDate:"StartDate",EndDate:"EndDate",User:"User",Duration:"Duration",Place:"Place",Note:"Note",AllDay:"AllDay",TypeEn:"TypeEn",StateEn:"StateEn",IsPrivate:"Private"},A.Marketing={HumanID:"HumanID",EstimatedStart:"EstimatedStart",EstimatedEnd:"EstimatedEnd",RealStart:"RealStart",RealEnd:"RealEnd",TargetGroup:"TargetGroup",EmailsSent:"EmailsSent",EmailsDelivered:"EmailsDelivered",EmailsViewed:"EmailsViewed",PeopleUnsubscribed:"PeopleUnsubscribed",FinalRevenues:"FinalRevenues",TypeEn:"TypeEn",StateEn:"StateEn"},A.Projects={HumanID:"HID",FileAs:"FileAs",ProjectName:"ProjectName",ProjectOriginEn:"ProjectOriginEn",TypeEn:"TypeEn",StateEn:"StateEn",PaymentTypeEn:"PaymentTypeEn",ProjectStart:"ProjectStart",ProjectRealEnd:"ProjectRealEnd",EstimatedEnd:"ProjectEnd",CurrencyEn:A.Common.CurrencyEn,DefaultCurrencyEn:"DefaultCurrencyEn",EstimatedMargin:"EstimatedMargin",EstimatedPeopleExpenses:"EstimatedPeopleExpenses",EstimatedPeopleExpensesDefaultCurrency:"EstimatedPeopleExpensesDefaultCurrency",EstimatedOtherExpenses:"EstimatedOtherExpenses",EstimatedOtherExpensesDefaultCurrency:"EstimatedOtherExpensesDefaultCurrency",EstimatedPrice:"EstimatedPrice",EstimatedPriceDefaultCurrency:"EstimatedPriceDefaultCurrency",EstimatedProfit:"EstimatedProfit",EstimatedProfitDefaultCurrency:"EstimatedProfitDefaultCurrency",EstimatedPriceChanged:"EstimatedPriceChanged",EstimatedPeopleExpensesChanged:"EstimatedPeopleExpensesChanged",EstimatedOtherExpensesChanged:"EstimatedOtherExpensesChanged",Delay:"Delay",EstimatedWorkHours:"EstimatedWorkHours",TotalWorkHours:"TotalWorkHours",PeopleExpenses:"PeopleExpenses",OtherExpenses:"OtherExpenses",PeopleExpensesDefaultCurrency:"PeopleExpensesDefaultCurrency",OtherExpensesDefaultCurrency:"OtherExpensesDefaultCurrency",PeopleExpensesChanged:"PeopleExpensesChanged",OtherExpensesChanged:"OtherExpensesChanged",Price:"Price",PriceDefaultCurrency:"PriceDefaultCurrency",Profit:"Profit",ProfitDefaultCurrency:"ProfitDefaultCurrency",Margin:"Margin",PriceChanged:"PriceChanged",SuperiorProject:"SuperiorProject",Customer:"Customer",ContactPerson:"ContactPerson",Users:"Users",ProjectManager:"ProjectManager",InvoicePaymentDate:"InvoicePaymentDate",PaymentMaturity:"PaymentMaturity",InvoiceIssueDate:"InvoiceIssueDate",LicensesCount:"LicensesCount",LicensePrice:"LicensePrice",LicensePriceDefaultCurrency:"LicensePriceDefaultCurrency",NextStep:"NextStep",LastActivity:"LastActivity",IsPrivate:"Private",LicensePriceChanged:"LicensePriceChanged",Note:"Note"},A.Tasks={FileAs:"FileAs",Subject:"Subject",RootItem:"RootItem",SuperiorItem:"SuperiorItem",Company:"Company",Contact:"Contact",StartDate:"StartDate",DueDate:"DueDate",Reminder:"Reminder",ReminderDate:"ReminderDate",ImportanceEn:"ImportanceEn",IsCompleted:"Complete",PercentComplete:"PercentComplete",PercentCompleteDecimal:"PercentCompleteDecimal",CompletedDate:"CompletedDate",Solver:"Solver",Delegator:"Delegator",Level:"Level",IsPrivate:"Private",ActualWorkHours:"ActualWorkHours",TotalWorkHours:"TotalWorkHours",Body:"Body",TypeEn:"TypeEn",StateEn:"StateEn"},A.Training={TitleEn:"TitleEn"},A.WorkReports={Task:"Task",ProjectName:"ProjectName",UserName:"UserName",Subject:"Subject",Date:"Date",FromTime:"FromTime",ToTime:"ToTime",Overtime:"Overtime",Month:"Month",Year:"Year",IsPrivate:"Private",Note:"Note",Duration:"Duration",WorkReportEn:"WorkReportEn",StateEn:"StateEn"},A.Users={ProfilePicture:"ProfilePicture",UserName:"UserName",JobTitle:"JobTitle",IDCardNumber:"IDCardNumber",Birthdate:"Birthdate",BirthPlace:"BirthPlace",PersonalIdentificationNumber:"PersonalIdentificationNumber",Active:"Active",FamilyStatusEn:"FamilyStatusEn",HomeAddressStreet:"HomeAddressStreet",HomeAddressCity:"HomeAddressCity",HomeAddressPostalCode:"HomeAddressPostalCode",HomeAddressCountryEn:"HomeAddressCountryEn",HomeAddressState:"HomeAddressState",HomeAddressPOBox:"HomeAddressPOBox",BankAccount:"BankAccount",BusinessPhoneNumber:"BusinessPhoneNumber",MobilePhoneNumber:"MobilePhoneNumber",Email1Address:"Email1Address",Email2Address:"Email2Address",ICQ:"ICQ",MSN:"MSN",Skype:"Skype",IdentificationNumber:"IdentificationNumber",HealthInsurance:"HealthInsurance",HolidayLength:"HolidayLength",RemainingDaysOfHoliday:"RemainingDaysOfHoliday",SalaryDateEn:"SalaryDateEn",Supervisor:"Supervisor",TravelDistance:"TravelDistance",TimeAccessibility:"TimeAccessibility",TransportMode:"TransportMode",WorkdayStartTime:"WorkdayStartTime",Note:"Note",IsSystem:"IsSystem"},A.allTypeEnNames=["TypeEn",A.Documents.DocTypeEn,A.WorkReports.WorkReportEn,"TitleEn"],A.getFolderFileAs=e=>{switch(e){case l.leads:return A.Common.FileAs;case l.projects:return A.Projects.ProjectName;case l.documents:return A.Documents.DocName;case l.companies:return A.Companies.CompanyName;case l.contacts:case l.users:return A.Common.FileAs;case l.emails:return A.Emails.Subject;case l.journal:return A.Journal.FileAs;case l.tasks:return A.Tasks.Subject;case l.workReports:return A.WorkReports.Subject;case l.vacation:return A.Vacation.TypeEn;case l.carts:case l.goods:return A.Common.FileAs;default:return console.warn(`FileAs col name not defined for folderName ${e}`),A.Common.FileAs}};class k{}k.finishAuthorization=(e,t,s,n,r,o,i)=>{const a=new URLSearchParams;a.append("code_verifier",n),a.append("client_id",t),a.append("client_secret",s),a.append("code",r),a.append("redirect_uri",o),a.append("grant_type","authorization_code"),k.callTokenEndpoint(e,a,i)},k.refreshToken=(e,t,s,n,r)=>{const o=new URLSearchParams;o.append("client_id",t),o.append("client_secret",s),o.append("refresh_token",n),o.append("grant_type","refresh_token"),k.callTokenEndpoint(e,o,r)},k.getWebServiceUrl=e=>{const s=e.split(".");if(2!==s.length)throw new Error("Invalid token supplied");return t.decode(s[1])},k.getUserName=e=>s(e).username,k.callTokenEndpoint=(t,s,n)=>{e.post(t+"/auth/connect/token",s,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((e=>{n(e.data)})).catch((e=>{if(!e.response||400!=e.response.status)throw new Error("Token request failed");n(e.response.data)}))};class I{}I.bonusType="BonusType",I.busyStatus="BusyStatus",I.cartType="CartType",I.companyType="CompanyType",I.contactType="ContactType",I.countryCode="CountryCode",I.customFieldCategory="CustomFieldCategory",I.documentOfflineState="DocumentOfflineState",I.documentType="DocumentType",I.emailOfflineState="EmailOfflineState",I.emailType="EmailType",I.globalSettingsCategory="GlobalSettingsCategory",I.goalType="GoalType",I.journalType="JournalType",I.knowledgeType="KnowledgeType",I.leadType="LeadType",I.marketingType="MarketingType",I.paymentType="PaymentType",I.prefixType="PrefixType",I.productType="ProductType",I.projectType="ProjectType",I.salaryType="SalaryType",I.salePriceType="SalePriceType",I.suffixType="SuffixType",I.taskType="TaskType",I.trainingTitle="TrainingTitle",I.userType="UserType",I.usStatesDistrictsTerritories="USStatesDistrictsTerritories",I.vacationType="VacationType",I.workReportType="WorkReportType";class b{}b.general="GENERAL",b.group="GROUP",b.contactPerson="CONTACTPERSON",b.contact="CONTACT",b.customer="CUSTOMER",b.company="COMPANY",b.outlookProject="OUTLOOKPROJECT",b.supervisor="SUPERVISOR";class T{}T.all="All",T.own="Own",T.readonly="Readonly",T.invisible="Invisible",T.none="None";class w{}var D,N,O;w.mandatory="Mandatory",w.optional="Optional",w.unique="Unique",w.none="None",function(e){e.Free="Free",e.Basic="Basic",e.Professional="Professional",e.Enterprise="Enterprise"}(D||(D={})),function(e){e.ContactsAndCompanies="ContactsAndCompanies",e.Sales="Sales",e.Projects="Projects",e.Marketing="Marketing"}(N||(N={}));class M{}M.contactsSynchronizationWithOutlook="ContactsSynchronizationWithOutlook",M.wordAddin="WordAddin",M.excelAddin="ExcelAddin",M.tasksRecurrentTasks="TasksRecurrentTasks",M.tasksSubtasks="TasksSubtasks",M.tasksSynchronizationWithOutlook="TasksSynchronizationWithOutlook",M.calendarSynchronizationWithOutlook="CalendarSynchronizationWithOutlook",M.emailsAutomaticTracking="EmailsAutomaticTracking",M.convertEmailToProject="ConvertEmailToProject",M.duplicityChecker="DuplicityChecker",M.nextStepAndLastActivityCustomization="NextStepAndLastActivityCustomization",M.subProjects="SubProjects",M.resourceAndPlanning="ResourceAndPlanning",M.professionalEmailCampaigns="ProfessionalEmailCampaigns",M.professionalEmailCampaignsAdvancedStatistics="ProfessionalEmailCampaignsAdvancedStatistics",M.wordEmailMerge="WordEmailMerge",M.printLabels="PrintLabels",M.printEnvelopes="PrintEnvelopes",M.userViews="UserViews",M.sharedUserViews="SharedUserViews",M.gridConditionalFormating="GridConditionalFormating",M.multipleCurrencies="MultipleCurrencies",M.historyTracking="HistoryTracking",M.privateItems="PrivateItems",M.itemTypes="ItemTypes",M.formLayoutCustomization="FormLayoutCustomization",M.workflowBasicDefinitions="WorkflowBasicDefinitions",M.workflowAdvancedDefinitions="WorkflowAdvancedDefinitions",M.workflowAdvancedDefinitionsRules="WorkflowAdvancedDefinitionsRules",M.workflowAdvancedDefinitionsActions="WorkflowAdvancedDefinitionsActions",M.workflowGroupLevelActions="WorkflowGroupLevelActions",M.customFields="CustomFields",M.importantFields="ImportantFields",M.mandatoryFields="MandatoryFields",M.uniqueFields="UniqueFields",M.readOnlyFields="ReadOnlyFields",M.transformationCustomTemplates="TransformationCustomTemplates",M.userRoles="UserRoles",M.modulePermissions="ModulePermissions",M.columnPermissions="ColumnPermissions",M.api="API",M.gate="Gate",M.threeCXIntegration="ThreeCXIntegration",M.tapiIntegration="TapiIntegration",M.pohodaIntegration="PohodaIntegration",M.pohodaSynchronizationIntervalCustomization="PohodaSynchronizationIntervalCustomization",M.pohodaSynchronizationFieldMappingCustomization="PohodaSynchronizationFieldMappingCustomization",M.quickBooksIntegration="QuickBooksIntegration",M.saveBinaryDataOnDisk="SaveBinaryDataOnDisk",M.activeDirectoryLogin="ActiveDirectoryLogin",M.callerIdentificationOnApple="CallerIdentificationOnApple",M.legacyAdministration="LegacyAdministration";class R{}R.customAdditionalFieldsCount="CustomAdditionalFieldsCount",R.customEnabledAdvancedWorkflowsCount="CustomEnabledAdvancedWorkflowsCount",R.customEnabledBasicWorkflowsCount="CustomEnabledBasicWorkflowsCount",R.customMandatoryFieldsCount="CustomMandatoryFieldsCount",R.customOptionalFieldsCount="CustomOptionalFieldsCount",R.customReadonlyFieldsCount="CustomReadonlyFieldsCount",R.customUniqueFieldsCount="CustomUniqueFieldsCount",R.customVisibleTypesCount="CustomVisibleTypesCount",R.visibleCurrenciesCount="VisibleCurrenciesCount";class L{}L.contactsSynchronizationWithOutlook="ContactsSynchronizationWithOutlook",L.contactsSynchronizationWithAndroid="ContactsSynchronizationWithAndroid",L.documentsRevisions="DocumentsRevisions",L.wordAddin="WordAddin",L.excelAddin="ExcelAddin",L.tasksReminders="TasksReminders",L.tasksRecurrentTasks="TasksRecurrentTasks",L.tasksSubtasks="TasksSubtasks",L.tasksSynchronizationWithOutlook="TasksSynchronizationWithOutlook",L.calendarSynchronizationWithOutlook="CalendarSynchronizationWithOutlook",L.emailsManualTracking="EmailsManualTracking",L.emailsAutomaticTracking="EmailsAutomaticTracking",L.convertEmailToContact="ConvertEmailToContact",L.convertEmailToDeal="ConvertEmailToDeal",L.convertEmailToProject="ConvertEmailToProject",L.convertEmailToTask="ConvertEmailToTask",L.gravatarIntegration="GravatarIntegration",L.logoboxIntegration="LogoboxIntegration",L.companiesBussinesRegisterApiIntegration="CompaniesBussinesRegisterApiIntegration",L.duplicityChecker="DuplicityChecker",L.nextStepAndLastActivityCustomization="NextStepAndLastActivityCustomization",L.subProjects="SubProjects",L.resourceAndPlanning="ResourceAndPlanning",L.professionalEmailCampaigns="ProfessionalEmailCampaigns",L.professionalEmailCampaignsAdvancedStatistics="ProfessionalEmailCampaignsAdvancedStatistics",L.wordEmailMerge="WordEmailMerge",L.printLabels="PrintLabels",L.printEnvelopes="PrintEnvelopes",L.userViews="UserViews",L.sharedUserViews="SharedUserViews",L.gridRowSummary="GridRowSummary",L.gridConditionalFormating="GridConditionalFormating",L.multipleCurrencies="MultipleCurrencies",L.historyTracking="HistoryTracking",L.privateItems="PrivateItems",L.itemTypes="ItemTypes",L.formLayoutCustomization="FormLayoutCustomization",L.workflowBasicDefinitions="WorkflowBasicDefinitions",L.workflowAdvancedDefinitions="WorkflowAdvancedDefinitions",L.workflowAdvancedDefinitionsRules="WorkflowAdvancedDefinitionsRules",L.workflowAdvancedDefinitionsActions="WorkflowAdvancedDefinitionsActions",L.workflowGroupLevelActions="WorkflowGroupLevelActions",L.customFields="CustomFields",L.importantFields="ImportantFields",L.mandatoryFields="MandatoryFields",L.uniqueFields="UniqueFields",L.readOnlyFields="ReadOnlyFields",L.transformationCustomTemplates="TransformationCustomTemplates",L.userRoles="UserRoles",L.modulePermissions="ModulePermissions",L.columnPermissions="ColumnPermissions",L.commonDataAPI="CommonDataAPI",L.eWayCrmAPI="eWayCrmAPI",L.threeCXIntegration="ThreeCXIntegration",L.tapiIntegration="TapiIntegration",L.pohodaIntegration="PohodaIntegration",L.pohodaSynchronizationIntervalCustomization="PohodaSynchronizationIntervalCustomization",L.pohodaSynchronizationFieldMappingCustomization="PohodaSynchronizationFieldMappingCustomization",L.quickBooksIntegration="QuickBooksIntegration",L.shareByTeams="ShareByTeams",function(e){e.UnpaidImportantInvoices="UnpaidImportantInvoices",e.UncollectableSubscriptionPayment="UncollectableSubscriptionPayment",e.UncollectableSubscriptionPaymentWithExpiredCard="UncollectableSubscriptionPaymentWithExpiredCard",e.StandardSubscriptionPeriod="StandardSubscriptionPeriod"}(O||(O={}));var U,x=O;!function(e){e.License="License",e.CloudLicense="CloudLicense",e.MiscLicense="MiscLicense",e.Support="Support",e.Service="Service"}(U||(U={}));var B,F=U;class G{}G.getIsDebug=e=>{var t;return!!(null===(t=null==e?void 0:e.sessionHandler.lastSuccessfulLoginResponse)||void 0===t?void 0:t.Debug)},G.supportsFeaturesOf=(e,t)=>{var s;const r=null===(s=e.sessionHandler.lastSuccessfulLoginResponse)||void 0===s?void 0:s.WcfVersion;return!!r&&(n(r,t,">=")||n(r,"1.0.0.0","="))};class W{constructor(e,t){if(!e||!t)throw new Error("Both folderName and baseItem has to be defined!");this.folderName=e,this.baseItem=t}getEmailAddress(){switch(this.folderName){case l.contacts:{const e=this.baseItem;return e.Email1Address||e.Email2Address||e.Email3Address}case l.leads:return this.baseItem.Email;case l.companies:return this.baseItem.Email;case l.users:{const e=this.baseItem;return e.Email1Address||e.Email2Address}default:return null}}getInitials(){switch(this.folderName){case l.contacts:{const e=this.baseItem;return this.getInitialsInternal(e.FirstName,e.LastName)}case l.users:{const e=this.baseItem;return this.getInitialsInternal(e.FirstName,e.LastName)}default:return null}}getInitialsInternal(e,t){const s=((null==e?void 0:e.substr(0,1))||"")+((null==t?void 0:t.substr(0,1))||"");return""==s?null:s}getItemPreview(){switch(this.folderName){case l.contacts:{const e=this.baseItem;return e.ProfilePicture?{imageData:e.ProfilePicture,width:e.ProfilePictureWidth||0,height:e.ProfilePictureHeight||0}:null}case l.users:{const e=this.baseItem;return e.ProfilePicture?{imageData:e.ProfilePicture,width:e.ProfilePictureWidth||0,height:e.ProfilePictureHeight||0}:null}default:return null}}}!function(e){e.Readonly="Readonly",e.VisibleRankDefaultOnly="VisibleRankDefaultOnly",e.Editable="Editable"}(B||(B={})),a.polyfill();export{d as ApiMethods,w as ColumnPermissionMandatoryRules,T as ColumnPermissionPermissionRules,E as CommonDataConnection,R as CustomizationStatsItemKeys,W as EWItem,D as Edition,B as EnumTypeEditMode,I as EnumTypes,f as ErrorHelper,x as ExpirationReason,N as Feature,A as FieldNames,l as FolderNames,M as Functionality,v as GlobalSettingsNames,o as HttpMethod,C as HttpRequestError,F as LicenseKeyInvoiceSeverity,L as LicenseRestrictionKeys,k as OAuthHelper,h as OAuthSessionHandlerBase,b as RelationTypes,c as ReturnCodes,g as TokenizedServiceConnection,G as VersionHelperBase,S as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TNumericValidatorType = 'None' | 'Double' | 'Currency' | 'Int' | 'Percent' | 'FileSize';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ApiConnection } from '../ApiConnection';
|
|
2
|
+
import { ITokenizedApiResult } from './ITokenizedApiResult';
|
|
3
|
+
import { TInputData } from '../interfaces/ITokenData';
|
|
4
|
+
export declare class CommonDataConnection {
|
|
5
|
+
private readonly tokenizedConnection;
|
|
6
|
+
constructor(connection: ApiConnection, errorCallback?: (error: Error) => void);
|
|
7
|
+
readonly isCommonDataApiEnabled: (enabledCallback: (url: string, token: string) => void, disabledCallback: () => void) => void;
|
|
8
|
+
readonly callCommonDataApi: <TResult extends ITokenizedApiResult>(methodName: string, data: TInputData, successCallback: (data: TResult) => void, unsuccessCallback?: ((data: TResult | null) => void) | null | undefined) => void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { HttpMethod } from '../HttpMethod';
|
|
2
|
+
import { ApiConnection } from '../ApiConnection';
|
|
3
|
+
import { ITokenizedApiResult } from './ITokenizedApiResult';
|
|
4
|
+
import { IApiResult } from '../data/IApiResult';
|
|
5
|
+
import { TInputData } from '../interfaces/ITokenData';
|
|
6
|
+
export declare class TokenizedServiceConnection<TObtainResponse extends IApiResult> {
|
|
7
|
+
private readonly obtainTokenMethodName;
|
|
8
|
+
private readonly obtainTokenMethodType;
|
|
9
|
+
private readonly needsSession;
|
|
10
|
+
private readonly invalidTokenReturnCode;
|
|
11
|
+
private readonly urlAndTokenObtainer;
|
|
12
|
+
private readonly connection;
|
|
13
|
+
private readonly generalErrorCallback;
|
|
14
|
+
private url;
|
|
15
|
+
private token;
|
|
16
|
+
private isActive;
|
|
17
|
+
constructor(obtainTokenMethodName: string, obtainTokenMethodType: HttpMethod, needsSession: boolean, invalidTokenReturnCode: string, urlAndTokenObtainer: (response: TObtainResponse) => {
|
|
18
|
+
url: string | null;
|
|
19
|
+
token: string | null;
|
|
20
|
+
}, connection: ApiConnection, errorCallback?: (error: Error) => void);
|
|
21
|
+
readonly isEnabled: (enabledCallback: (url: string, token: string) => void, disabledCallback: () => void) => void;
|
|
22
|
+
readonly callTokenizedApi: <TResult extends ITokenizedApiResult>(methodName: string, data: TInputData, successCallback: (data: TResult) => void, unsuccessCallback?: ((data: TResult | null) => void) | null | undefined) => void;
|
|
23
|
+
private readonly obtainToken;
|
|
24
|
+
private static call;
|
|
25
|
+
}
|