@eway-crm/connector 1.0.126 → 1.0.128
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} +7 -6
- 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 +14 -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
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import * as Promise from 'es6-promise';
|
|
2
1
|
import { ApiConnection } from './ApiConnection';
|
|
3
2
|
import { HttpMethod } from './HttpMethod';
|
|
3
|
+
import { ISessionHandler } from './ISessionHandler';
|
|
4
4
|
import { ReturnCodes } from './ReturnCodes';
|
|
5
|
+
import { ITokenizedApiResult } from './tokenizedServices/ITokenizedApiResult';
|
|
5
6
|
import { TokenizedServiceConnection } from './tokenizedServices/TokenizedServiceConnection';
|
|
6
7
|
import { CommonDataConnection } from './tokenizedServices/CommonDataConnection';
|
|
7
8
|
import { ApiMethods } from './ApiMethods';
|
|
8
9
|
import GlobalSettingsNames from './constants/GlobalSettingsNames';
|
|
9
10
|
import FieldNames from './constants/FieldNames';
|
|
10
|
-
import { FolderNames } from './constants/FolderNames';
|
|
11
|
+
import { FolderNames, TFolderName } from './constants/FolderNames';
|
|
11
12
|
import { OAuthHelper } from './helpers/OAuthHelper';
|
|
12
|
-
import { HttpRequestError } from './exceptions/HttpRequestError';
|
|
13
|
+
import { HttpRequestError, TUnionError } from './exceptions/HttpRequestError';
|
|
14
|
+
import { TInputData } from './interfaces/ITokenData';
|
|
13
15
|
import EnumTypes from './constants/EnumTypes';
|
|
14
|
-
import RelationTypes from './constants/RelationTypes';
|
|
16
|
+
import RelationTypes, { TRelationType } from './constants/RelationTypes';
|
|
15
17
|
import { ColumnPermissionPermissionRules, ColumnPermissionMandatoryRules } from './constants/ColumnPermissionRules';
|
|
16
18
|
import { Edition } from './constants/Edition';
|
|
17
19
|
import { Feature } from './constants/Feature';
|
|
@@ -23,7 +25,6 @@ import LicenseKeyInvoiceSeverity from './constants/LicenseKeyInvoiceSeverity';
|
|
|
23
25
|
import ErrorHelper from './helpers/ErrorHelper';
|
|
24
26
|
import VersionHelperBase from './helpers/VersionHelperBase';
|
|
25
27
|
import { OAuthSessionHandlerBase } from './OAuthSessionHandlerBase';
|
|
26
|
-
Promise.polyfill();
|
|
27
28
|
export default ApiConnection;
|
|
28
29
|
export * from './data/EWItem';
|
|
29
30
|
export * from './data/IApiAdditionalField';
|
|
@@ -81,4 +82,4 @@ export * from './data/IApiWorkReport';
|
|
|
81
82
|
export * from './data/query/IApiQuery';
|
|
82
83
|
export * from './data/query/IApiQueryFilters';
|
|
83
84
|
export * from './interfaces/ITranslatableString';
|
|
84
|
-
export { HttpMethod, ReturnCodes, TokenizedServiceConnection, CommonDataConnection, ApiMethods, GlobalSettingsNames, FolderNames, OAuthHelper, HttpRequestError, FieldNames, EnumTypes, RelationTypes, ColumnPermissionPermissionRules, ColumnPermissionMandatoryRules, Edition, Feature, Functionality, CustomizationStatsItemKeys, LicenseRestrictionKeys, ExpirationReason, LicenseKeyInvoiceSeverity, ErrorHelper, VersionHelperBase, OAuthSessionHandlerBase };
|
|
85
|
+
export { HttpMethod, ISessionHandler, ReturnCodes, ITokenizedApiResult, TokenizedServiceConnection, CommonDataConnection, ApiMethods, GlobalSettingsNames, FolderNames, TFolderName, OAuthHelper, HttpRequestError, TUnionError, TInputData, FieldNames, EnumTypes, RelationTypes, TRelationType, ColumnPermissionPermissionRules, ColumnPermissionMandatoryRules, Edition, Feature, Functionality, CustomizationStatsItemKeys, LicenseRestrictionKeys, ExpirationReason, LicenseKeyInvoiceSeverity, ErrorHelper, VersionHelperBase, OAuthSessionHandlerBase };
|
package/lib/cjs/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("axios"),t=require("universal-base64url"),s=require("jwt-decode"),r=require("compare-versions");function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var o=n(t),i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var a,c={exports:{}},l=c.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)},r=0,n=void 0,o=void 0,a=function(e,t){g[r]=e,g[r+1]=t,2===(r+=2)&&(o?o(P):A())};function c(e){o=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(P)}}function C(){return void 0!==n?function(){n(P)}:E()}function f(){var e=0,t=new m(P),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=P,function(){return e.port2.postMessage(0)}}function E(){var e=setTimeout;return function(){return e(P,1)}}var g=new Array(1e3);function P(){for(var e=0;e<r;e+=2)(0,g[e])(g[e+1]),g[e]=void 0,g[e+1]=void 0;r=0}function v(){try{var e=Function("return this")().require("vertx");return n=e.runOnLoop||e.runOnContext,C()}catch(e){return E()}}var A=void 0;function k(e,t){var s=this,r=new this.constructor(T);void 0===r[b]&&J(r);var n=s._state;if(n){var o=arguments[n-1];a((function(){return _(n,r,o,s._result)}))}else W(s,r,e,t);return r}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():E();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 x(e,t,s,r){try{e.call(t,s,r)}catch(e){return e}}function R(e,t,s){a((function(e){var r=!1,n=x(s,t,(function(s){r||(r=!0,t!==s?B(e,s):G(e,s))}),(function(t){r||(r=!0,j(e,t))}),"Settle: "+(e._label||" unknown promise"));!r&&n&&(r=!0,j(e,n))}),e)}function L(e,t){t._state===D?G(e,t._result):t._state===N?j(e,t._result):W(t,void 0,(function(t){return B(e,t)}),(function(t){return j(e,t)}))}function U(e,s,r){s.constructor===e.constructor&&r===k&&s.constructor.resolve===I?L(e,s):void 0===r?G(e,s):t(r)?R(e,s,r):G(e,s)}function B(t,s){if(t===s)j(t,O());else if(e(s)){var r=void 0;try{r=s.then}catch(e){return void j(t,e)}U(t,s,r)}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 j(e,t){e._state===w&&(e._state=N,e._result=t,a(F,e))}function W(e,t,s,r){var n=e._subscribers,o=n.length;e._onerror=null,n[o]=t,n[o+D]=s,n[o+N]=r,0===o&&e._state&&a(H,e)}function H(e){var t=e._subscribers,s=e._state;if(0!==t.length){for(var r=void 0,n=void 0,o=e._result,i=0;i<t.length;i+=3)r=t[i],n=t[i+s],r?_(s,r,n,o):n(o);e._subscribers.length=0}}function _(e,s,r,n){var o=t(r),i=void 0,a=void 0,c=!0;if(o){try{i=r(n)}catch(e){c=!1,a=e}if(s===i)return void j(s,M())}else i=n;s._state!==w||(o&&c?B(s,i):!1===c?j(s,a):e===D?G(s,i):e===N&&j(s,i))}function z(e,t){try{t((function(t){B(e,t)}),(function(t){j(e,t)}))}catch(t){j(e,t)}}var V=0;function q(){return V++}function J(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 K=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(T),this.promise[b]||J(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))):j(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,r=s.resolve;if(r===I){var n=void 0,o=void 0,i=!1;try{n=e.then}catch(e){i=!0,o=e}if(n===k&&e._state!==w)this._settledAt(e._state,t,e._result);else if("function"!=typeof n)this._remaining--,this._result[t]=e;else if(s===te){var a=new s(T);i?j(a,o):U(a,e,n),this._willSettleAt(a,t)}else this._willSettleAt(new s((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,s){var r=this.promise;r._state===w&&(this._remaining--,e===N?j(r,s):this._result[t]=s),0===this._remaining&&G(r,this._result)},e.prototype._willSettleAt=function(e,t){var s=this;W(e,void 0,(function(e){return s._settledAt(D,t,e)}),(function(e){return s._settledAt(N,t,e)}))},e}();function Y(e){return new K(this,e).promise}function $(e){var t=this;return s(e)?new t((function(s,r){for(var n=e.length,o=0;o<n;o++)t.resolve(e[o]).then(s,r)})):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 j(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]=q(),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,r=s.constructor;return t(e)?s.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):s.then(e,e)},e}();function se(){var e=void 0;if(void 0!==i)e=i;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=Y,te.race=$,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 d{}d.rcSuccess="rcSuccess",d.rcBadSession="rcBadSession",d.rcDuplicateContact="rcDuplicateContact",d.rcWebServiceMoved="rcWebServiceMoved",d.rcAccessDenied="rcAccessDenied",d.rcLoginUserNameChanged="rcLoginUserNameChanged",d.rcLicenseExpired="rcLicenseExpired",exports.HttpMethod=void 0,(a=exports.HttpMethod||(exports.HttpMethod={})).get="get",a.post="post";class u{}u.isValidFolderName=e=>Object.values(u).includes(e),u.actions="Actions",u.additionalFields="AdditionalFields",u.bonuses="Bonuses",u.calendar="Calendar",u.capacityNotes="CapacityNotes",u.capacityNoteTypes="CapacityNoteTypes",u.carts="Carts",u.columnPermissions="ColumnPermissions",u.companies="Companies",u.contacts="Contacts",u.currencyExchangeRates="CurrencyExchangeRates",u.documents="Documents",u.emails="Emails",u.enumTypes="EnumTypes",u.enumValues="EnumValues",u.enumValuesRelations="EnumValuesRelations",u.features="Features",u.flows="Flows",u.globalSettings="GlobalSettings",u.goals="Goals",u.goods="Goods",u.goodsInCart="GoodsInCart",u.goodsInSet="GoodsInSet",u.groups="Groups",u.history="History",u.holidays="Holidays",u.children="Children",u.individualDiscounts="IndividualDiscounts",u.invoiceItems="InvoiceItems",u.invoices="Invoices",u.itemCopyRelations="ItemCopyRelations",u.journal="Journal",u.knowledge="Knowledge",u.layouts="Layouts",u.layoutsModels="LayoutsModels",u.leads="Leads",u.ledger="Ledger",u.mappings="Mappings",u.marketing="Marketing",u.marketingList="MarketingList",u.marketingListSources="MarketingListSources",u.models="Models",u.modulePermissions="ModulePermissions",u.objectTypesOptions="ObjectTypesOptions",u.payments="Payments",u.priceListGroups="PriceListGroups",u.projectAssignments="ProjectAssignments",u.projectAssignmentsPerUserProject="ProjectAssignmentsPerUserProject",u.projectAssignmentsTotal="ProjectAssignmentsTotal",u.projectAssignmentsTotalUserProject="ProjectAssignmentsTotalUserProject",u.projectList="ProjectList",u.projects="Projects",u.projectUsersInCaPlan="ProjectUsersInCaPlan",u.relationData="RelationData",u.relations="Relations",u.reports="Reports",u.revisionsHistory="RevisionsHistory",u.salaries="Salaries",u.salePrices="SalePrices",u.prices="Prices",u.sqlObjects="SqlObjects",u.tasks="Tasks",u.recurrencePatterns="RecurrencePatterns",u.teamRoles="TeamRoles",u.templates="Templates",u.training="Training",u.users="Users",u.userSettings="UserSettings",u.vacation="Vacation",u.webAccess2Options="WebAccess2Options",u.webAccessOptions="WebAccessOptions",u.workCommitments="WorkCommitments",u.workflowHistory="WorkflowHistory",u.workReports="WorkReports",u.wrongClientVersions="WrongClientVersions",u.xsltTransformations="XsltTransformations";class m{}m.getAllEmailAttachments="GetAllEmailAttachments",m.getCalendarsByItemGuids="GetCalendarsByItemGuids",m.getEmailAttachment="GetEmailAttachment",m.getItemPreview="GetItemPreview",m.getJournalsByItemGuids="GetJournalsByItemGuids",m.getMarketingCampaignsByItemGuids="GetMarketingCampaignsByItemGuids",m.getMarketingListsRecordsByItemGuids="GetMarketingListsRecordsByItemGuids",m.getRevisionHistoryRecordsByItemGuids="GetRevisionHistoryRecordsByItemGuids",m.getVacationsByItemGuids="GetVacationsByItemGuids",m.getWorkflowHistoryRecordsByItemGuids="GetWorkflowHistoryRecordsByItemGuids",m.logIn="LogIn",m.logOut="LogOut",m.getGetFolderNameByItemGuidsMethodName=e=>{switch(e){case u.calendar:return m.getCalendarsByItemGuids;case u.journal:return m.getJournalsByItemGuids;case u.marketing:return m.getMarketingCampaignsByItemGuids;case u.marketingList:return m.getMarketingListsRecordsByItemGuids;case u.revisionsHistory:return m.getRevisionHistoryRecordsByItemGuids;case u.vacation:return m.getVacationsByItemGuids;case u.workflowHistory:return m.getWorkflowHistoryRecordsByItemGuids;default:return`Get${e}ByItemGuids`}};class p{constructor(e,t,s,r,n,o){if(this.invalidateSessionId=(e,t)=>{t&&t()},this.getSessionId=(e,t)=>{e.callWithoutSession(m.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=r,this.clientMachineName=n,this.errorCallback=o}}class h{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 y extends Error{constructor(e,t){super(),this.returnCode=e,this.message=t}}class C{constructor(e,t,s,r,n){if(this.invalidateSessionId=(e,t)=>{t&&t()},this.getSessionId=(e,t)=>{const s={userName:this.username,appVersion:this.appVersion,createSessionCookie:e.supportsGetItemPreviewMethod},r={Authorization:"Bearer "+this.accessToken};e.callWithoutSession(m.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 y(e.ReturnCode,"Unable to login. Error response follows.\n"+JSON.stringify(e));if(!this.errorCallback)throw t;this.errorCallback(t)}),r,void 0,(s=>{if(401!==(null==s?void 0:s.statusCode)){if(!this.errorCallback)throw s;this.errorCallback(s)}else this.getNewAccessTokenCallback(e,((s,r)=>{this.accessToken=s,r||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=r,this.errorCallback=n}}class f extends C{constructor(e,t,s,r,n,o,i,a){if(!(e&&r&&t&&s))throw new Error("Non of the arguments 'username', 'clientId', 'clientSecret', 'refreshToken' can be empty.");super(e,n,o,((e,t)=>{I.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=r,this.clientId=t,this.clientSecret=s,this.refreshTokenCallback=a}}class S extends Error{constructor(e,t){super(),this.statusCode=e,this.message=t}}class E{}E.stringifyError=e=>JSON.stringify(e,E.replaceErrors),E.replaceErrors=(e,t)=>{if(t instanceof Error){const e={};return Object.getOwnPropertyNames(t).forEach((s=>{e[s]=t[s]})),e}return t};class g{constructor(t,s,r,n){if(this.createOpenLink=(e,t,s)=>{const r=o.encode(this.baseUri);let n="eway://"+e;t&&(n+="/"+(null==t?void 0:t.toLowerCase())),n=o.encode(n);let i="https://open.eway-crm.com/?ws="+r+"&l="+n;return s&&(i+="&n="+encodeURIComponent(s)),i},this.askUploadMethod=(e,t,s,r,n)=>new Promise(((o,i)=>{const a=n?e=>{throw i(e),e}:i;this.callUploadMethod(e,t,s,o,a,a,r)})),this.callUploadMethod=(t,s,r,n,o,i,a)=>{const c=()=>{this.sessionHandler.getSessionId(this,(e=>{this.sessionId=e,this.callUploadMethod(t,s,r,n,o,i,a)}))},l=this.sessionId;if(!l)return void c();const u=`${this.svcUri}/SaveBinaryAttachment?sessionId=${this.sessionId}&itemGuid=${t}&fileName=${encodeURIComponent(s)}`,m=e.post(u,r,a);g.handleCallPromise(m,n,(e=>{if(e.ReturnCode===d.rcBadSession)return this.sessionId=null,void this.sessionHandler.invalidateSessionId(l,c);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+": "+E.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,r)=>new Promise(((n,o)=>{const i=r?e=>{throw o(e),e}:o;this.callMethod(e,t,n,i,s,i)})),this.callMethod=(e,t,s,r,n,o)=>{n||(n=exports.HttpMethod.post);const i=()=>{this.sessionHandler.getSessionId(this,(i=>{this.sessionId=i,this.callMethod(e,t,s,r,n,o)}))},a=this.sessionId;if(!a)return void i();t.sessionId=a;const c=e!==m.logOut?s:e=>{this.sessionId=null,s(e)};this.callWithoutSession(e,t,c,(s=>{if(s.ReturnCode!==d.rcBadSession||(this.sessionId=null,e===m.logOut))if(r)r(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(a,i)}),null,n,o)},this.callWithoutSession=(t,s,r,n,o,i,a)=>{var c;i||(i=exports.HttpMethod.post);const l=this.svcUri+"/"+t;let d,u;switch(o&&(d={headers:o,withCredentials:null!==(c=this.supportGetItemPreviewMethod)&&void 0!==c?c:t==m.logIn}),i){case exports.HttpMethod.get:if(s)throw new Error("Calling api get method with data specified does not make any sense.");u=e.get(l,d);break;case exports.HttpMethod.post:u=e.post(l,s,d);break;default:throw new Error(`Unknown http method '${i}'.`)}g.handleCallPromise(u,r,n,(e=>{if(a)try{a(e)}catch(e){if(!this.errorCallback)throw e;this.errorCallback(e,s)}else{const t=new Error("Unhandled connection error when calling "+l+": "+E.stringifyError(e));if(!this.errorCallback)throw t;this.errorCallback(t,s)}}))},this.getItemPreviewGetMethodUrl=(e,t,s)=>this.svcUri+"/"+m.getItemPreview+"?folderName="+encodeURIComponent(e)+"&itemGuid="+encodeURIComponent(t)+(s||0===s?"&itemVersion="+encodeURIComponent(s.toString()):""),this.getEmailAttachmentGetMethodUrl=(e,t)=>this.svcUri+"/"+m.getEmailAttachment+"?itemGuid="+encodeURIComponent(e)+"&contentId="+encodeURIComponent(t),this.getAllEmailAttachmentsZipGetMethodUrl=e=>this.svcUri+"/"+m.getAllEmailAttachments+"?itemGuid="+encodeURIComponent(e),this.getActiveSessionId=()=>this.sessionId,!t)throw new Error("The argument 'apiServiceUri' cannot be empty.");if(t.length<8||"https://"!==t.substr(0,8).toLowerCase()&&"http://"!==t.substr(0,7).toLowerCase())throw new Error("Api service uri must start either with 'https://' or with 'http://'.");if(".svc"===t.substr(t.length-4).toLowerCase()){this.svcUri=t;const e=["/API.svc","/InsecureAPI.svc","/WcfService/Service.svc"].find((e=>e.toLowerCase()===t.substr(t.length-e.length).toLowerCase()))||"";this.baseUri=t.substr(0,t.length-e.length)}else this.baseUri=t,"/"===this.baseUri.substr(this.baseUri.length-1)&&(this.baseUri=this.baseUri.substr(0,this.baseUri.length-1)),"https://"===t.substr(0,8).toLowerCase()?this.svcUri=this.baseUri+"/API.svc":this.svcUri=this.baseUri+"/InsecureAPI.svc";this.sessionHandler=s,this.errorCallback=r,this.sessionId=null,this.supportGetItemPreviewMethod=null!=n&&n}get supportsGetItemPreviewMethod(){return this.supportGetItemPreviewMethod}static create(e,t,s,r,n,o,i,a){return new g(e,new p(t,s,r,n,o,i),i,a)}static createAnonymous(e,t){return new g(e,new h,t)}static createUsingOAuth(e,t,s,r,n,o,i,a,c,l){return new g(e,new f(t,s,r,n,o,i,a,c),a,l)}get wsUrl(){return this.baseUri}static handleCallPromise(e,t,s,r){e.then((e=>{200===e.status?e.data.ReturnCode===d.rcSuccess?t(e.data):s(e.data):r(new S(e.status,e.statusText))})).catch((e=>{e.response?r(new S(e.response.status,e.response.statusText)):r(e)}))}}class P{constructor(e,t,s,r,n,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,r)=>{this.isEnabled(((n,o)=>{t.token=o,P.call(n,e,t,s,(n=>{if(n.ReturnCodeString!==this.invalidTokenReturnCode){if(r)r(n);else if(this.generalErrorCallback){const e=new Error("Unhandled tokenized service connection return code "+n.ReturnCodeString+".\nDescription: "+n.Description);this.generalErrorCallback(e)}}else this.obtainToken((()=>{this.callTokenizedApi(e,t,s,r)}))}),(e=>{if(this.generalErrorCallback){const t=new Error("Unhandled tokenized service connection communication error: "+JSON.stringify(e));this.generalErrorCallback(t)}}))}),(()=>{r&&r(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=r,this.urlAndTokenObtainer=n,this.connection=o,this.generalErrorCallback=i||null,this.url=null,this.token=null,this.isActive=!0}static call(t,s,r,n,o,i){const a=t+"/"+s;e.post(a,r).then((e=>{200===e.status?"Success"===e.data.ReturnCodeString?n(e.data):o(e.data):i(new S(e.status,e.statusText))})).catch((e=>{e.response?i(new S(e.response.status,e.response.statusText)):i(e)}))}}const v=e=>({url:e.ServiceUrl,token:e.Token});class A{}A.acceptableBackwardWorkReportDays="AcceptableBackwardWorkReportDays",A.adminAppInactiveLogoutTime="AdminAppInactiveLogoutTime",A.applyGeneralDataProtectionRules="ApplyGeneralDataProtectionRules",A.automaticallyCreateJournalAfterCallDuration="AutomaticallyCreateJournalAfterCallDuration",A.bonusesCompletedState="BonusesCompletedState",A.cartInvoicedState="CartInvoicedState",A.cartOrderCanceledState="CartOrderCanceledState",A.cartOrderInProcessState="CartOrderInProcessState",A.cartOrderProcessedState="CartOrderProcessedState",A.cartPaidState="CartPaidState",A.cartProposalInProcessState="CartProposalInProcessState",A.cartProposalProcessedState="CartProposalProcessedState",A.cartSalesVoucherIssuedState="CartSalesVoucherIssuedState",A.cartToBeInvoicedState="CartToBeInvoicedState",A.cartVoidedState="CartVoidedState",A.clickToCallScheme="ClickToCallScheme",A.companyDuplicityCheckEnabled="CompanyDuplicityCheckEnabled",A.completedStateName="CompletedStateName",A.contactDuplicityCheckEnabled="ContactDuplicityCheckEnabled",A.createCompanyWhileImportingContactFromOutlook="CreateCompanyWhileImportingContactFromOutlook",A.deadStateName="DeadStateName",A.enableCompaniesSyncIntoMobileDeviceContacts="EnableCompaniesSyncIntoMobileDeviceContacts",A.enableContactsSyncIntoMobileDevice="EnableContactsSyncIntoMobileDevice",A.enableLeadsSyncIntoMobileDeviceContacts="EnableLeadsSyncIntoMobileDeviceContacts",A.enableUsersSyncIntoMobileDeviceContacts="EnableUsersSyncIntoMobileDeviceContacts",A.emailsActiveProjectsLeadsFilter="EmailsActiveProjectsLeadsFilter",A.exchangeRatesAdminGroupName="ExchangeRatesAdminGroupName",A.forcedEmailTrackingGroups="ForcedEmailTrackingGroups",A.groupsForAllUnpaidInvoicesNotification="GroupsForAllUnpaidInvoicesNotification",A.itemPreviewMaxHeight="ItemPreviewMaxHeight",A.lastActivityAttributes="LastActivityAttributes",A.leadsCompletedState="LeadsCompletedState",A.leadDeadlineAlertGroups="LeadDeadlineAlertGroups",A.leadsDeadState="LeadsDeadState",A.marketingCompletedState="MarketingCompletedState",A.marketingDeadState="MarketingDeadState",A.minimumPasswordLength="MinimumPasswordLength",A.nextStepAttributes="NextStepAttributes",A.notifyAboutInvoicedInvoiceInPohodaGroup="NotifyAboutInvoicedInvoiceInPohodaGroup",A.notifyAboutLeadsDeadline="NotifyAboutLeadsDeadline",A.notifyAboutPaidInvoiceInPohodaGroup="NotifyAboutPaidInvoiceInPohodaGroup",A.notifyAboutProjectDeadline="NotifyAboutProjectDeadline",A.numberOfDecimalPlaces="NumberOfDecimalPlaces",A.phoneListTaskSolverGroup="PhoneListTaskSolverGroup",A.projectDeadlineAlert="ProjectDeadlineAlert",A.serverUpdateProgressNotificationGroup="ServerUpdateProgressNotificationGroup",A.sumarizeCartsPricesOnLeads="SumarizeCartsPricesOnLeads",A.sumarizeCartsPricesOnProjects="SumarizeCartsPricesOnProjects",A.sumarizePeopleExpensesOnProjects="SumarizePeopleExpensesOnProjects",A.systemHealthNotificationGroup="SystemHealthNotificationGroup",A.tasksCompletedState="TasksCompletedState",A.tasksDeferredState="TasksDeferredState",A.tasksInProgressState="TasksInProgressState",A.tasksNotStartedState="TasksNotStartedState",A.tasksWaitOnSomeoneElseState="TasksWaitOnSomeoneElseState",A.trackDocumentVersions="TrackDocumentVersions",A.vacationCompletedState="VacationCompletedState",A.workReportApprovedState="WorkReportApprovedState",A.defaultLanguage="DefaultLanguage",A.defaultCurrency="DefaultCurrency",A.myCompanyCountry="MyCompanyCountry",A.myCompanyName="MyCompanyName",A.myCompanyStreet="MyCompanyStreet",A.myCompanyCity="MyCompanyCity",A.myCompanyState="MyCompanyState",A.myCompanyZip="MyCompanyZIP",A.myCompanyId="MyCompanyID",A.myCompanyVat="MyCompanyVAT";class k{}k.Common={CreatedByGUID:"CreatedByGUID",CurrencyEn:"CurrencyEn",DefaultCurrencySuffix:"DefaultCurrency",FileAs:"FileAs",ItemCreated:"ItemCreated",ItemChanged:"ItemChanged",ItemGUID:"ItemGUID",ItemVersion:"ItemVersion",ModifiedByGUID:"ModifiedByGUID",OwnerGUID:"OwnerGUID",ParentCurrencySuffix:"ParentCurrency"},k.Calendar={EndDate:"EndDate",Note:"Note"},k.Carts={SuperiorItem:"SuperiorItem",SuperiorCompany:"SuperiorCompany",SuperiorContact:"SuperiorContact",TypeEn:"TypeEn",StateEn:"StateEn"},k.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"},k.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"},k.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:k.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"},k.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"},k.Emails={To:"To",From:"SenderEmailAddress",Cc:"Cc",Subject:"Subject",ImportanceEn:"ImportanceEn",SuperiorItem:"SuperiorItem",SentOn:"SentOn",ReceivedTime:"ReceivedTime",FileSize:"FileSize",AttachmentsCount:"AttachmentsCount",Note:"Note"},k.Goods={Code:"Code",Structure:"Structure",Note:"Note",Description:"Description"},k.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"},k.Vacation={StartDate:"StartDate",EndDate:"EndDate",User:"User",Duration:"Duration",Place:"Place",Note:"Note",AllDay:"AllDay",TypeEn:"TypeEn",StateEn:"StateEn",IsPrivate:"Private"},k.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"},k.Projects={HumanID:"HID",FileAs:"FileAs",ProjectName:"ProjectName",ProjectOriginEn:"ProjectOriginEn",TypeEn:"TypeEn",StateEn:"StateEn",PaymentTypeEn:"PaymentTypeEn",ProjectStart:"ProjectStart",ProjectRealEnd:"ProjectRealEnd",EstimatedEnd:"ProjectEnd",CurrencyEn:k.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"},k.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"},k.Training={TitleEn:"TitleEn"},k.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"},k.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"},k.allTypeEnNames=["TypeEn",k.Documents.DocTypeEn,k.WorkReports.WorkReportEn,"TitleEn"],k.getFolderFileAs=e=>{switch(e){case u.leads:return k.Common.FileAs;case u.projects:return k.Projects.ProjectName;case u.documents:return k.Documents.DocName;case u.companies:return k.Companies.CompanyName;case u.contacts:case u.users:return k.Common.FileAs;case u.emails:return k.Emails.Subject;case u.journal:return k.Journal.FileAs;case u.tasks:return k.Tasks.Subject;case u.workReports:return k.WorkReports.Subject;case u.vacation:return k.Vacation.TypeEn;case u.carts:case u.goods:return k.Common.FileAs;default:return console.warn(`FileAs col name not defined for folderName ${e}`),k.Common.FileAs}};class I{}I.finishAuthorization=(e,t,s,r,n,o,i)=>{const a=new URLSearchParams;a.append("code_verifier",r),a.append("client_id",t),a.append("client_secret",s),a.append("code",n),a.append("redirect_uri",o),a.append("grant_type","authorization_code"),I.callTokenEndpoint(e,a,i)},I.refreshToken=(e,t,s,r,n)=>{const o=new URLSearchParams;o.append("client_id",t),o.append("client_secret",s),o.append("refresh_token",r),o.append("grant_type","refresh_token"),I.callTokenEndpoint(e,o,n)},I.getWebServiceUrl=e=>{const t=e.split(".");if(2!==t.length)throw new Error("Invalid token supplied");return o.decode(t[1])},I.getUserName=e=>s(e).username,I.callTokenEndpoint=(t,s,r)=>{e.post(t+"/auth/connect/token",s,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then((e=>{r(e.data)})).catch((e=>{if(!e.response||400!=e.response.status)throw new Error("Token request failed");r(e.response.data)}))};class b{}b.bonusType="BonusType",b.busyStatus="BusyStatus",b.cartType="CartType",b.companyType="CompanyType",b.contactType="ContactType",b.countryCode="CountryCode",b.customFieldCategory="CustomFieldCategory",b.documentOfflineState="DocumentOfflineState",b.documentType="DocumentType",b.emailOfflineState="EmailOfflineState",b.emailType="EmailType",b.globalSettingsCategory="GlobalSettingsCategory",b.goalType="GoalType",b.journalType="JournalType",b.knowledgeType="KnowledgeType",b.leadType="LeadType",b.marketingType="MarketingType",b.paymentType="PaymentType",b.prefixType="PrefixType",b.productType="ProductType",b.projectType="ProjectType",b.salaryType="SalaryType",b.salePriceType="SalePriceType",b.suffixType="SuffixType",b.taskType="TaskType",b.trainingTitle="TrainingTitle",b.userType="UserType",b.usStatesDistrictsTerritories="USStatesDistrictsTerritories",b.vacationType="VacationType",b.workReportType="WorkReportType";class T{}T.general="GENERAL",T.group="GROUP",T.contactPerson="CONTACTPERSON",T.contact="CONTACT",T.customer="CUSTOMER",T.company="COMPANY",T.outlookProject="OUTLOOKPROJECT",T.supervisor="SUPERVISOR";class w{}w.all="All",w.own="Own",w.readonly="Readonly",w.invisible="Invisible",w.none="None";class D{}var N,O,M;D.mandatory="Mandatory",D.optional="Optional",D.unique="Unique",D.none="None",exports.Edition=void 0,(N=exports.Edition||(exports.Edition={})).Free="Free",N.Basic="Basic",N.Professional="Professional",N.Enterprise="Enterprise",exports.Feature=void 0,(O=exports.Feature||(exports.Feature={})).ContactsAndCompanies="ContactsAndCompanies",O.Sales="Sales",O.Projects="Projects",O.Marketing="Marketing";class x{}x.contactsSynchronizationWithOutlook="ContactsSynchronizationWithOutlook",x.wordAddin="WordAddin",x.excelAddin="ExcelAddin",x.tasksRecurrentTasks="TasksRecurrentTasks",x.tasksSubtasks="TasksSubtasks",x.tasksSynchronizationWithOutlook="TasksSynchronizationWithOutlook",x.calendarSynchronizationWithOutlook="CalendarSynchronizationWithOutlook",x.emailsAutomaticTracking="EmailsAutomaticTracking",x.convertEmailToProject="ConvertEmailToProject",x.duplicityChecker="DuplicityChecker",x.nextStepAndLastActivityCustomization="NextStepAndLastActivityCustomization",x.subProjects="SubProjects",x.resourceAndPlanning="ResourceAndPlanning",x.professionalEmailCampaigns="ProfessionalEmailCampaigns",x.professionalEmailCampaignsAdvancedStatistics="ProfessionalEmailCampaignsAdvancedStatistics",x.wordEmailMerge="WordEmailMerge",x.printLabels="PrintLabels",x.printEnvelopes="PrintEnvelopes",x.userViews="UserViews",x.sharedUserViews="SharedUserViews",x.gridConditionalFormating="GridConditionalFormating",x.multipleCurrencies="MultipleCurrencies",x.historyTracking="HistoryTracking",x.privateItems="PrivateItems",x.itemTypes="ItemTypes",x.formLayoutCustomization="FormLayoutCustomization",x.workflowBasicDefinitions="WorkflowBasicDefinitions",x.workflowAdvancedDefinitions="WorkflowAdvancedDefinitions",x.workflowAdvancedDefinitionsRules="WorkflowAdvancedDefinitionsRules",x.workflowAdvancedDefinitionsActions="WorkflowAdvancedDefinitionsActions",x.workflowGroupLevelActions="WorkflowGroupLevelActions",x.customFields="CustomFields",x.importantFields="ImportantFields",x.mandatoryFields="MandatoryFields",x.uniqueFields="UniqueFields",x.readOnlyFields="ReadOnlyFields",x.transformationCustomTemplates="TransformationCustomTemplates",x.userRoles="UserRoles",x.modulePermissions="ModulePermissions",x.columnPermissions="ColumnPermissions",x.api="API",x.gate="Gate",x.threeCXIntegration="ThreeCXIntegration",x.tapiIntegration="TapiIntegration",x.pohodaIntegration="PohodaIntegration",x.pohodaSynchronizationIntervalCustomization="PohodaSynchronizationIntervalCustomization",x.pohodaSynchronizationFieldMappingCustomization="PohodaSynchronizationFieldMappingCustomization",x.quickBooksIntegration="QuickBooksIntegration",x.saveBinaryDataOnDisk="SaveBinaryDataOnDisk",x.activeDirectoryLogin="ActiveDirectoryLogin",x.callerIdentificationOnApple="CallerIdentificationOnApple",x.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"}(M||(M={}));var U,B=M;!function(e){e.License="License",e.CloudLicense="CloudLicense",e.MiscLicense="MiscLicense",e.Support="Support",e.Service="Service"}(U||(U={}));var F,G=U;class j{}j.getIsDebug=e=>{var t;return!!(null===(t=null==e?void 0:e.sessionHandler.lastSuccessfulLoginResponse)||void 0===t?void 0:t.Debug)},j.supportsFeaturesOf=(e,t)=>{var s;const n=null===(s=e.sessionHandler.lastSuccessfulLoginResponse)||void 0===s?void 0:s.WcfVersion;return!!n&&(r.compare(n,t,">=")||r.compare(n,"1.0.0.0","="))};exports.EnumTypeEditMode=void 0,(F=exports.EnumTypeEditMode||(exports.EnumTypeEditMode={})).Readonly="Readonly",F.VisibleRankDefaultOnly="VisibleRankDefaultOnly",F.Editable="Editable",l.polyfill(),exports.ApiMethods=m,exports.ColumnPermissionMandatoryRules=D,exports.ColumnPermissionPermissionRules=w,exports.CommonDataConnection=class{constructor(e,t){this.isCommonDataApiEnabled=(e,t)=>{this.tokenizedConnection.isEnabled(e,t)},this.callCommonDataApi=(e,t,s,r)=>{this.tokenizedConnection.callTokenizedApi(e,t,s,r)},this.tokenizedConnection=new P("ObtainCommonDataApiAccessToken",exports.HttpMethod.get,!1,"InvalidCommonDataToken",v,e,t)}},exports.CustomizationStatsItemKeys=R,exports.EWItem=class{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 u.contacts:{const e=this.baseItem;return e.Email1Address||e.Email2Address||e.Email3Address}case u.leads:return this.baseItem.Email;case u.companies:return this.baseItem.Email;case u.users:{const e=this.baseItem;return e.Email1Address||e.Email2Address}default:return null}}getInitials(){switch(this.folderName){case u.contacts:{const e=this.baseItem;return this.getInitialsInternal(e.FirstName,e.LastName)}case u.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 u.contacts:{const e=this.baseItem;return e.ProfilePicture?{imageData:e.ProfilePicture,width:e.ProfilePictureWidth||0,height:e.ProfilePictureHeight||0}:null}case u.users:{const e=this.baseItem;return e.ProfilePicture?{imageData:e.ProfilePicture,width:e.ProfilePictureWidth||0,height:e.ProfilePictureHeight||0}:null}default:return null}}},exports.EnumTypes=b,exports.ErrorHelper=E,exports.ExpirationReason=B,exports.FieldNames=k,exports.FolderNames=u,exports.Functionality=x,exports.GlobalSettingsNames=A,exports.HttpRequestError=S,exports.LicenseKeyInvoiceSeverity=G,exports.LicenseRestrictionKeys=L,exports.OAuthHelper=I,exports.OAuthSessionHandlerBase=C,exports.RelationTypes=T,exports.ReturnCodes=d,exports.TokenizedServiceConnection=P,exports.VersionHelperBase=j,exports.default=g;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ISessionHandler } from './ISessionHandler';
|
|
2
|
+
export declare class AnonymousSessionHandler implements ISessionHandler {
|
|
3
|
+
readonly getSessionId: (connection: import('./ApiConnection').ApiConnection, callback: (sessionId: string) => void) => void;
|
|
4
|
+
readonly invalidateSessionId: (sessionId: string, callback: () => void) => void;
|
|
5
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { IApiResult } from './data/IApiResult';
|
|
3
|
+
import { ISessionHandler } from './ISessionHandler';
|
|
4
|
+
import { HttpMethod } from './HttpMethod';
|
|
5
|
+
import { TUnionError } from './exceptions/HttpRequestError';
|
|
6
|
+
import { ITokenData, TInputData } from './interfaces/ITokenData';
|
|
7
|
+
import { TFolderName } from './constants/FolderNames';
|
|
8
|
+
export declare class ApiConnection {
|
|
9
|
+
private readonly svcUri;
|
|
10
|
+
private readonly baseUri;
|
|
11
|
+
readonly sessionHandler: ISessionHandler;
|
|
12
|
+
private readonly errorCallback;
|
|
13
|
+
private readonly supportGetItemPreviewMethod;
|
|
14
|
+
private sessionId;
|
|
15
|
+
constructor(apiServiceUri: string, sessionHandler: ISessionHandler, errorCallback?: (error: TUnionError, data?: TInputData | null) => void, supportGetItemPreviewMethod?: boolean);
|
|
16
|
+
get supportsGetItemPreviewMethod(): boolean;
|
|
17
|
+
static create(apiServiceUri: string, username: string, passwordHash: string, appVersion: string, clientMachineIdentifier: string, clientMachineName: string, errorCallback?: (error: TUnionError) => void, supportGetItemPreviewMethod?: boolean): ApiConnection;
|
|
18
|
+
static createAnonymous(apiServiceUri: string, errorCallback?: (error: TUnionError) => void): ApiConnection;
|
|
19
|
+
static createUsingOAuth(apiServiceUri: string, username: string, clientId: string, clientSecret: string, refreshToken: string, accessToken: string, appVersion: string, errorCallback?: (error: TUnionError) => void, refreshTokenCallback?: (tokenData: ITokenData) => void, supportGetItemPreviewMethod?: boolean): ApiConnection;
|
|
20
|
+
get wsUrl(): string;
|
|
21
|
+
readonly createOpenLink: (folderName: TFolderName, guid?: string, fileAs?: string) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a promise for async file upload using binary stream
|
|
24
|
+
* @param itemGuid Item identificator. Ex. '9ac561be-9b7d-4938-8e55-4cce97142483'.
|
|
25
|
+
* @param fileName File name, ex. 'picture.img'.
|
|
26
|
+
* @param data Single file to be uploaded.
|
|
27
|
+
* @param config Optional. Additional config for the request.
|
|
28
|
+
* @param catchGlobally Optional. If true, raises this the global error handler each time the promise is rejected.
|
|
29
|
+
*/
|
|
30
|
+
readonly askUploadMethod: (itemGuid: string, fileName: string, data: File, config?: AxiosRequestConfig, catchGlobally?: boolean) => Promise<IApiResult>;
|
|
31
|
+
/**
|
|
32
|
+
* Asynchronously uploads file using binary stream
|
|
33
|
+
* @param itemGuid Item identificator. Ex. '9ac561be-9b7d-4938-8e55-4cce97142483'.
|
|
34
|
+
* @param fileName File name, ex. 'picture.img'.
|
|
35
|
+
* @param data Single file to be uploaded.
|
|
36
|
+
* @param successCallback Handler callback when the method executes well. Gets the whole response JSON object as the only argument.
|
|
37
|
+
* @param unsuccessCallback Optional. Handler callback for eWay-API app level failures. Gets the whole response JSON object as the only argument. If not supplied, the global error handler is used.
|
|
38
|
+
* @param errorCallback Optional. Handler callback for any other failures. If not supplied, the global error handler is used.
|
|
39
|
+
* @param config Optional. Additional config for the request.
|
|
40
|
+
*/
|
|
41
|
+
readonly callUploadMethod: (itemGuid: string, fileName: string, data: File, successCallback: (res: IApiResult) => void, unsuccessCallback?: ((e: IApiResult) => void) | undefined, errorCallback?: ((e: TUnionError) => void) | undefined, config?: AxiosRequestConfig) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Creates a promise for async API method call.
|
|
44
|
+
* @param methodName API method name. Ex. 'GetUsers'.
|
|
45
|
+
* @param data Input data or empty object. Ex. {transmitObject: {FileAs: 'Peter File'}} or {itemGuids: ['9ac561be-9b7d-4938-8e55-4cce97142483']}.
|
|
46
|
+
* @param httpMethod Optional. The used HTTP method. POST or GET. Default is POST.
|
|
47
|
+
* @param catchGlobally Optional. If true, raises this the global error handler each time the promise is rejected.
|
|
48
|
+
*/
|
|
49
|
+
readonly askMethod: <TResult extends IApiResult>(methodName: string, data: TInputData, httpMethod?: HttpMethod, catchGlobally?: boolean) => Promise<TResult>;
|
|
50
|
+
/**
|
|
51
|
+
* Asynchronously calls API method with automatically added session data.
|
|
52
|
+
* @param methodName API method name. Ex. 'GetUsers'.
|
|
53
|
+
* @param data Input data or empty object. Ex. {transmitObject: {FileAs: 'Peter File'}} or {itemGuids: ['9ac561be-9b7d-4938-8e55-4cce97142483']}.
|
|
54
|
+
* @param successCallback Handler callback when the method executes well. Gets the whole response JSON object as the only argument.
|
|
55
|
+
* @param unsuccessCallback Optional. Handler callback for eWay-API app level failures. Gets the whole response JSON object as the only argument. If not supplied, the global error handler is used.
|
|
56
|
+
* @param httpMethod Optional. The used HTTP method. POST or GET. Default is POST.
|
|
57
|
+
* @param errorCallback Optional. Handler callback for any other failures. If not supplied, the global error handler is used.
|
|
58
|
+
*/
|
|
59
|
+
readonly callMethod: <TResult extends IApiResult>(methodName: string, data: TInputData, successCallback: (result: TResult) => void, unsuccessCallback?: ((result: TResult) => void) | undefined, httpMethod?: HttpMethod, errorCallback?: ((error: TUnionError) => void) | undefined) => void;
|
|
60
|
+
readonly callWithoutSession: <TResult extends IApiResult>(methodName: string, data: TInputData | null, successCallback: (result: TResult) => void, unsuccessCallback: (result: TResult) => void, headers?: Record<string, string> | null, httpMethod?: HttpMethod, errorCallback?: ((error: TUnionError) => void) | undefined) => void;
|
|
61
|
+
readonly getItemPreviewGetMethodUrl: (folderName: string, itemGuid: string, itemVersion?: number) => string;
|
|
62
|
+
readonly getEmailAttachmentGetMethodUrl: (itemGuid: string, contentId: string) => string;
|
|
63
|
+
readonly getAllEmailAttachmentsZipGetMethodUrl: (itemGuid: string) => string;
|
|
64
|
+
readonly getActiveSessionId: () => string | null;
|
|
65
|
+
private static handleCallPromise;
|
|
66
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TFolderName } from "./constants/FolderNames";
|
|
2
|
+
export declare class ApiMethods {
|
|
3
|
+
static readonly getAllEmailAttachments = "GetAllEmailAttachments";
|
|
4
|
+
static readonly getCalendarsByItemGuids = "GetCalendarsByItemGuids";
|
|
5
|
+
static readonly getEmailAttachment = "GetEmailAttachment";
|
|
6
|
+
static readonly getItemPreview = "GetItemPreview";
|
|
7
|
+
static readonly getJournalsByItemGuids = "GetJournalsByItemGuids";
|
|
8
|
+
static readonly getMarketingCampaignsByItemGuids = "GetMarketingCampaignsByItemGuids";
|
|
9
|
+
static readonly getMarketingListsRecordsByItemGuids = "GetMarketingListsRecordsByItemGuids";
|
|
10
|
+
static readonly getRevisionHistoryRecordsByItemGuids = "GetRevisionHistoryRecordsByItemGuids";
|
|
11
|
+
static readonly getVacationsByItemGuids = "GetVacationsByItemGuids";
|
|
12
|
+
static readonly getWorkflowHistoryRecordsByItemGuids = "GetWorkflowHistoryRecordsByItemGuids";
|
|
13
|
+
static readonly logIn = "LogIn";
|
|
14
|
+
static readonly logOut = "LogOut";
|
|
15
|
+
static readonly getGetFolderNameByItemGuidsMethodName: (folderName: TFolderName) => string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ISessionHandler } from './ISessionHandler';
|
|
2
|
+
import { ApiConnection } from './ApiConnection';
|
|
3
|
+
import { TUnionError } from './exceptions/HttpRequestError';
|
|
4
|
+
import { IApiLoginResponse } from './data/IApiLoginResponse';
|
|
5
|
+
export declare class CredentialsSessionHandler implements ISessionHandler {
|
|
6
|
+
private readonly username;
|
|
7
|
+
private readonly passwordHash;
|
|
8
|
+
private readonly appVersion;
|
|
9
|
+
private readonly clientMachineIdentifier;
|
|
10
|
+
private readonly clientMachineName;
|
|
11
|
+
private readonly errorCallback;
|
|
12
|
+
lastSuccessfulLoginResponse?: IApiLoginResponse;
|
|
13
|
+
constructor(username: string, passwordHash: string, appVersion: string, clientMachineIdentifier: string, clientMachineName: string, errorCallback?: (error: TUnionError) => void);
|
|
14
|
+
readonly invalidateSessionId: (_: string, callback: () => void) => void;
|
|
15
|
+
readonly getSessionId: (connection: ApiConnection, callback: (sessionId: string) => void) => void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ApiConnection } from './ApiConnection';
|
|
2
|
+
import { IApiLoginResponse } from './data/IApiLoginResponse';
|
|
3
|
+
export interface ISessionHandler {
|
|
4
|
+
invalidateSessionId(sessionId: string, callback: () => void): void;
|
|
5
|
+
getSessionId(connection: ApiConnection, callback: (sessionId: string) => void): void;
|
|
6
|
+
lastSuccessfulLoginResponse?: IApiLoginResponse;
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ITokenData } from './interfaces/ITokenData';
|
|
2
|
+
import { TUnionError } from './exceptions/HttpRequestError';
|
|
3
|
+
import { IApiLoginResponse } from './data/IApiLoginResponse';
|
|
4
|
+
import { OAuthSessionHandlerBase } from './OAuthSessionHandlerBase';
|
|
5
|
+
export declare class OAuthSessionHandler extends OAuthSessionHandlerBase {
|
|
6
|
+
private readonly refreshToken;
|
|
7
|
+
private readonly clientId;
|
|
8
|
+
private readonly clientSecret;
|
|
9
|
+
private readonly refreshTokenCallback?;
|
|
10
|
+
lastSuccessfulLoginResponse?: IApiLoginResponse;
|
|
11
|
+
constructor(username: string, clientId: string, clientSecret: string, refreshToken: string, accessToken: string, appVersion: string, errorCallback?: (error: TUnionError) => void, refreshTokenCallback?: (tokenData: ITokenData) => void);
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ISessionHandler } from './ISessionHandler';
|
|
2
|
+
import { ApiConnection } from './ApiConnection';
|
|
3
|
+
import { TUnionError } from './exceptions/HttpRequestError';
|
|
4
|
+
import { IApiLoginResponse } from './data/IApiLoginResponse';
|
|
5
|
+
export declare abstract class OAuthSessionHandlerBase implements ISessionHandler {
|
|
6
|
+
lastSuccessfulLoginResponse?: IApiLoginResponse;
|
|
7
|
+
private accessToken;
|
|
8
|
+
private readonly username;
|
|
9
|
+
private readonly appVersion;
|
|
10
|
+
protected readonly errorCallback: ((error: TUnionError) => void) | undefined;
|
|
11
|
+
private readonly getNewAccessTokenCallback;
|
|
12
|
+
constructor(username: string, accessToken: string, appVersion: string, getNewAccessTokenCallback: ((connection: ApiConnection, callback: (accessToken: string, error?: string) => void) => void), errorCallback?: (error: TUnionError) => void);
|
|
13
|
+
readonly invalidateSessionId: (_: string, callback: () => void) => void;
|
|
14
|
+
readonly getSessionId: (connection: ApiConnection, callback: (sessionId: string) => void) => void;
|
|
15
|
+
}
|
|
16
|
+
export default OAuthSessionHandlerBase;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class ReturnCodes {
|
|
2
|
+
static readonly rcSuccess = "rcSuccess";
|
|
3
|
+
static readonly rcBadSession = "rcBadSession";
|
|
4
|
+
static readonly rcDuplicateContact = "rcDuplicateContact";
|
|
5
|
+
static readonly rcWebServiceMoved = "rcWebServiceMoved";
|
|
6
|
+
static readonly rcAccessDenied = "rcAccessDenied";
|
|
7
|
+
static readonly rcLoginUserNameChanged = "rcLoginUserNameChanged";
|
|
8
|
+
static readonly rcLicenseExpired = "rcLicenseExpired";
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TActionEventType } from "../data/workflowActions/IApiAction";
|
|
2
|
+
export default class ActionEventTypes {
|
|
3
|
+
static readonly onValueChanging: TActionEventType;
|
|
4
|
+
static readonly onValueChanged: TActionEventType;
|
|
5
|
+
static readonly onSaving: TActionEventType;
|
|
6
|
+
static readonly onSaved: TActionEventType;
|
|
7
|
+
static readonly onLoad: TActionEventType;
|
|
8
|
+
static readonly onLoading: TActionEventType;
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TApiColumnPermissionMandatoryRuleOptions, TApiColumnPermissionPermissionRuleOptions } from "../data/IApiColumnPermission";
|
|
2
|
+
export declare class ColumnPermissionPermissionRules {
|
|
3
|
+
static readonly all: TApiColumnPermissionPermissionRuleOptions;
|
|
4
|
+
static readonly own: TApiColumnPermissionPermissionRuleOptions;
|
|
5
|
+
static readonly readonly: TApiColumnPermissionPermissionRuleOptions;
|
|
6
|
+
static readonly invisible: TApiColumnPermissionPermissionRuleOptions;
|
|
7
|
+
static readonly none: TApiColumnPermissionPermissionRuleOptions;
|
|
8
|
+
}
|
|
9
|
+
export declare class ColumnPermissionMandatoryRules {
|
|
10
|
+
static readonly mandatory: TApiColumnPermissionMandatoryRuleOptions;
|
|
11
|
+
static readonly optional: TApiColumnPermissionMandatoryRuleOptions;
|
|
12
|
+
static readonly unique: TApiColumnPermissionMandatoryRuleOptions;
|
|
13
|
+
static readonly none: TApiColumnPermissionMandatoryRuleOptions;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default class CustomizationStatsItemKeys {
|
|
2
|
+
static customAdditionalFieldsCount: string;
|
|
3
|
+
static customEnabledAdvancedWorkflowsCount: string;
|
|
4
|
+
static customEnabledBasicWorkflowsCount: string;
|
|
5
|
+
static customMandatoryFieldsCount: string;
|
|
6
|
+
static customOptionalFieldsCount: string;
|
|
7
|
+
static customReadonlyFieldsCount: string;
|
|
8
|
+
static customUniqueFieldsCount: string;
|
|
9
|
+
static customVisibleTypesCount: string;
|
|
10
|
+
static visibleCurrenciesCount: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default class EnumTypes {
|
|
2
|
+
static readonly bonusType = "BonusType";
|
|
3
|
+
static readonly busyStatus = "BusyStatus";
|
|
4
|
+
static readonly cartType = "CartType";
|
|
5
|
+
static readonly companyType = "CompanyType";
|
|
6
|
+
static readonly contactType = "ContactType";
|
|
7
|
+
static readonly countryCode = "CountryCode";
|
|
8
|
+
static readonly customFieldCategory = "CustomFieldCategory";
|
|
9
|
+
static readonly documentOfflineState = "DocumentOfflineState";
|
|
10
|
+
static readonly documentType = "DocumentType";
|
|
11
|
+
static readonly emailOfflineState = "EmailOfflineState";
|
|
12
|
+
static readonly emailType = "EmailType";
|
|
13
|
+
static readonly globalSettingsCategory = "GlobalSettingsCategory";
|
|
14
|
+
static readonly goalType = "GoalType";
|
|
15
|
+
static readonly journalType = "JournalType";
|
|
16
|
+
static readonly knowledgeType = "KnowledgeType";
|
|
17
|
+
static readonly leadType = "LeadType";
|
|
18
|
+
static readonly marketingType = "MarketingType";
|
|
19
|
+
static readonly paymentType = "PaymentType";
|
|
20
|
+
static readonly prefixType = "PrefixType";
|
|
21
|
+
static readonly productType = "ProductType";
|
|
22
|
+
static readonly projectType = "ProjectType";
|
|
23
|
+
static readonly salaryType = "SalaryType";
|
|
24
|
+
static readonly salePriceType = "SalePriceType";
|
|
25
|
+
static readonly suffixType = "SuffixType";
|
|
26
|
+
static readonly taskType = "TaskType";
|
|
27
|
+
static readonly trainingTitle = "TrainingTitle";
|
|
28
|
+
static readonly userType = "UserType";
|
|
29
|
+
static readonly usStatesDistrictsTerritories = "USStatesDistrictsTerritories";
|
|
30
|
+
static readonly vacationType = "VacationType";
|
|
31
|
+
static readonly workReportType = "WorkReportType";
|
|
32
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare enum ExpirationReason {
|
|
2
|
+
UnpaidImportantInvoices = "UnpaidImportantInvoices",
|
|
3
|
+
UncollectableSubscriptionPayment = "UncollectableSubscriptionPayment",
|
|
4
|
+
UncollectableSubscriptionPaymentWithExpiredCard = "UncollectableSubscriptionPaymentWithExpiredCard",
|
|
5
|
+
StandardSubscriptionPeriod = "StandardSubscriptionPeriod"
|
|
6
|
+
}
|
|
7
|
+
export default ExpirationReason;
|