@eway-crm/connector 1.0.119 → 1.0.120
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/AnonymousSessionHandler.d.ts +5 -5
- package/lib/AnonymousSessionHandler.js +15 -15
- package/lib/ApiConnection.d.ts +66 -66
- package/lib/ApiConnection.js +321 -321
- package/lib/ApiMethods.d.ts +16 -16
- package/lib/ApiMethods.js +41 -42
- package/lib/CredentialsSessionHandler.d.ts +16 -16
- package/lib/CredentialsSessionHandler.js +60 -60
- package/lib/HttpMethod.d.ts +4 -4
- package/lib/HttpMethod.js +8 -8
- package/lib/ISessionHandler.d.ts +7 -7
- package/lib/ISessionHandler.js +2 -2
- package/lib/OAuthSessionHandler.d.ts +12 -12
- package/lib/OAuthSessionHandler.js +52 -52
- package/lib/OAuthSessionHandlerBase.d.ts +16 -16
- package/lib/OAuthSessionHandlerBase.js +78 -78
- package/lib/ReturnCodes.d.ts +9 -9
- package/lib/ReturnCodes.js +15 -16
- package/lib/constants/ActionEventTypes.d.ts +9 -9
- package/lib/constants/ActionEventTypes.js +14 -14
- package/lib/constants/ColumnPermissionRules.d.ts +14 -14
- package/lib/constants/ColumnPermissionRules.js +22 -24
- package/lib/constants/CompletionLevels.d.ts +6 -6
- package/lib/constants/CompletionLevels.js +11 -11
- package/lib/constants/CustomizationStatsItemKeys.d.ts +11 -11
- package/lib/constants/CustomizationStatsItemKeys.js +17 -17
- package/lib/constants/Edition.d.ts +6 -6
- package/lib/constants/Edition.js +10 -10
- package/lib/constants/EnumTypes.d.ts +32 -32
- package/lib/constants/EnumTypes.js +38 -38
- package/lib/constants/ExpirationReason.d.ts +7 -7
- package/lib/constants/ExpirationReason.js +10 -10
- package/lib/constants/Feature.d.ts +6 -6
- package/lib/constants/Feature.js +10 -10
- package/lib/constants/FieldNames.d.ts +389 -389
- package/lib/constants/FieldNames.js +427 -427
- package/lib/constants/FieldTypes.d.ts +15 -15
- package/lib/constants/FieldTypes.js +20 -20
- package/lib/constants/FolderNames.d.ts +80 -80
- package/lib/constants/FolderNames.js +87 -88
- package/lib/constants/Functionality.d.ts +54 -54
- package/lib/constants/Functionality.js +60 -60
- package/lib/constants/GlobalSettingsNames.d.ts +71 -71
- package/lib/constants/GlobalSettingsNames.js +76 -76
- package/lib/constants/LicenseKeyInvoiceSeverity.d.ts +8 -8
- package/lib/constants/LicenseKeyInvoiceSeverity.js +11 -11
- package/lib/constants/LicenseRestrictionKeys.d.ts +62 -62
- package/lib/constants/LicenseRestrictionKeys.js +68 -68
- package/lib/constants/RelationTypes.d.ts +11 -11
- package/lib/constants/RelationTypes.js +16 -16
- package/lib/data/EWItem.d.ts +12 -12
- package/lib/data/EWItem.js +91 -91
- package/lib/data/IApiAdditionalField.d.ts +21 -21
- package/lib/data/IApiAdditionalField.js +2 -2
- package/lib/data/IApiAvailableBundle.d.ts +4 -4
- package/lib/data/IApiAvailableBundle.js +2 -2
- package/lib/data/IApiAvailableVersionResponse.d.ts +9 -9
- package/lib/data/IApiAvailableVersionResponse.js +2 -2
- package/lib/data/IApiBooleanResponse.d.ts +4 -4
- package/lib/data/IApiBooleanResponse.js +2 -2
- package/lib/data/IApiCapacityAvailableBundle.d.ts +5 -5
- package/lib/data/IApiCapacityAvailableBundle.js +2 -2
- package/lib/data/IApiCart.d.ts +48 -48
- package/lib/data/IApiCart.js +8 -8
- package/lib/data/IApiColumn.d.ts +51 -51
- package/lib/data/IApiColumn.js +2 -2
- package/lib/data/IApiColumnPermission.d.ts +15 -15
- package/lib/data/IApiColumnPermission.js +2 -2
- package/lib/data/IApiCompany.d.ts +55 -55
- package/lib/data/IApiCompany.js +8 -8
- package/lib/data/IApiContact.d.ts +58 -58
- package/lib/data/IApiContact.js +8 -8
- package/lib/data/IApiCurrencyExchangeRate.d.ts +9 -9
- package/lib/data/IApiCurrencyExchangeRate.js +8 -8
- package/lib/data/IApiCustomizationStatsItem.d.ts +6 -6
- package/lib/data/IApiCustomizationStatsItem.js +2 -2
- package/lib/data/IApiDataResponse.d.ts +4 -4
- package/lib/data/IApiDataResponse.js +2 -2
- package/lib/data/IApiDatumResponse.d.ts +4 -4
- package/lib/data/IApiDatumResponse.js +2 -2
- package/lib/data/IApiDocument.d.ts +22 -22
- package/lib/data/IApiDocument.js +8 -8
- package/lib/data/IApiEmail.d.ts +26 -26
- package/lib/data/IApiEmail.js +8 -8
- package/lib/data/IApiEnumType.d.ts +26 -26
- package/lib/data/IApiEnumType.js +9 -9
- package/lib/data/IApiEnumValue.d.ts +18 -18
- package/lib/data/IApiEnumValue.js +2 -2
- package/lib/data/IApiEnumValuesRelation.d.ts +8 -8
- package/lib/data/IApiEnumValuesRelation.js +8 -8
- package/lib/data/IApiFeature.d.ts +5 -5
- package/lib/data/IApiFeature.js +2 -2
- package/lib/data/IApiFeaturesLicenseBundle.d.ts +10 -10
- package/lib/data/IApiFeaturesLicenseBundle.js +2 -2
- package/lib/data/IApiFlow.d.ts +9 -9
- package/lib/data/IApiFlow.js +8 -8
- package/lib/data/IApiGlobalSetting.d.ts +33 -33
- package/lib/data/IApiGlobalSetting.js +2 -2
- package/lib/data/IApiGoal.d.ts +22 -22
- package/lib/data/IApiGoal.js +8 -8
- package/lib/data/IApiGood.d.ts +26 -26
- package/lib/data/IApiGood.js +8 -8
- package/lib/data/IApiGoodInCart.d.ts +62 -62
- package/lib/data/IApiGoodInCart.js +8 -8
- package/lib/data/IApiGroup.d.ts +16 -16
- package/lib/data/IApiGroup.js +2 -2
- package/lib/data/IApiItemBase.d.ts +14 -14
- package/lib/data/IApiItemBase.js +2 -2
- package/lib/data/IApiItemIdentifier.d.ts +5 -5
- package/lib/data/IApiItemIdentifier.js +2 -2
- package/lib/data/IApiItemUsageStatus.d.ts +4 -4
- package/lib/data/IApiItemUsageStatus.js +2 -2
- package/lib/data/IApiJournal.d.ts +25 -25
- package/lib/data/IApiJournal.js +8 -8
- package/lib/data/IApiLead.d.ts +36 -36
- package/lib/data/IApiLead.js +8 -8
- package/lib/data/IApiLicense.d.ts +65 -65
- package/lib/data/IApiLicense.js +2 -2
- package/lib/data/IApiLicenseBundleBase.d.ts +6 -6
- package/lib/data/IApiLicenseBundleBase.js +2 -2
- package/lib/data/IApiLocalizedLicenseBundle.d.ts +4 -4
- package/lib/data/IApiLocalizedLicenseBundle.js +2 -2
- package/lib/data/IApiLoginResponse.d.ts +8 -8
- package/lib/data/IApiLoginResponse.js +2 -2
- package/lib/data/IApiMarketingCampaign.d.ts +32 -32
- package/lib/data/IApiMarketingCampaign.js +8 -8
- package/lib/data/IApiMarketingList.d.ts +17 -17
- package/lib/data/IApiMarketingList.js +8 -8
- package/lib/data/IApiModulePermission.d.ts +14 -14
- package/lib/data/IApiModulePermission.js +2 -2
- package/lib/data/IApiObjectType.d.ts +9 -9
- package/lib/data/IApiObjectType.js +2 -2
- package/lib/data/IApiPasswordStrength.d.ts +5 -5
- package/lib/data/IApiPasswordStrength.js +2 -2
- package/lib/data/IApiPayment.d.ts +9 -9
- package/lib/data/IApiPayment.js +8 -8
- package/lib/data/IApiProject.d.ts +59 -59
- package/lib/data/IApiProject.js +8 -8
- package/lib/data/IApiRecurrencePattern.d.ts +16 -16
- package/lib/data/IApiRecurrencePattern.js +8 -8
- package/lib/data/IApiResult.d.ts +4 -4
- package/lib/data/IApiResult.js +2 -2
- package/lib/data/IApiSaveResponse.d.ts +4 -4
- package/lib/data/IApiSaveResponse.js +2 -2
- package/lib/data/IApiTask.d.ts +34 -34
- package/lib/data/IApiTask.js +8 -8
- package/lib/data/IApiUser.d.ts +22 -22
- package/lib/data/IApiUser.js +2 -2
- package/lib/data/IApiUserSetting.d.ts +6 -6
- package/lib/data/IApiUserSetting.js +2 -2
- package/lib/data/IApiWebServiceTaskStatus.d.ts +10 -10
- package/lib/data/IApiWebServiceTaskStatus.js +2 -2
- package/lib/data/IApiWorkReport.d.ts +36 -36
- package/lib/data/IApiWorkReport.js +8 -8
- package/lib/data/IApiWorkflowActionDerivedItem.d.ts +21 -21
- package/lib/data/IApiWorkflowActionDerivedItem.js +2 -2
- package/lib/data/IApiWorkflowModel.d.ts +8 -8
- package/lib/data/IApiWorkflowModel.js +2 -2
- package/lib/data/query/IApiQuery.d.ts +42 -42
- package/lib/data/query/IApiQuery.js +2 -2
- package/lib/data/query/IApiQueryFilters.d.ts +43 -43
- package/lib/data/query/IApiQueryFilters.js +2 -2
- package/lib/data/workflowActions/IApiAction.d.ts +106 -106
- package/lib/data/workflowActions/IApiAction.js +2 -2
- package/lib/exceptions/HttpRequestError.d.ts +7 -7
- package/lib/exceptions/HttpRequestError.js +29 -29
- package/lib/exceptions/WebServiceError.d.ts +5 -5
- package/lib/exceptions/WebServiceError.js +29 -29
- package/lib/helpers/ErrorHelper.d.ts +4 -4
- package/lib/helpers/ErrorHelper.js +21 -21
- package/lib/helpers/OAuthHelper.d.ts +8 -8
- package/lib/helpers/OAuthHelper.js +59 -60
- package/lib/helpers/VersionHelperBase.d.ts +5 -5
- package/lib/helpers/VersionHelperBase.js +21 -21
- package/lib/index.d.ts +85 -85
- package/lib/index.js +124 -124
- package/lib/interfaces/IEWJwtPayload.d.ts +4 -4
- package/lib/interfaces/IEWJwtPayload.js +2 -2
- package/lib/interfaces/IItemPreview.d.ts +5 -5
- package/lib/interfaces/IItemPreview.js +2 -2
- package/lib/interfaces/ITokenData.d.ts +9 -9
- package/lib/interfaces/ITokenData.js +2 -2
- package/lib/interfaces/ITranslatableString.d.ts +8 -8
- package/lib/interfaces/ITranslatableString.js +2 -2
- package/lib/interfaces/TNumericValidatorType.d.ts +1 -1
- package/lib/interfaces/TNumericValidatorType.js +2 -2
- package/lib/tokenizedServices/CommonDataConnection.d.ts +9 -9
- package/lib/tokenizedServices/CommonDataConnection.js +22 -22
- package/lib/tokenizedServices/ITokenizedApiResult.d.ts +4 -4
- package/lib/tokenizedServices/ITokenizedApiResult.js +2 -2
- package/lib/tokenizedServices/TokenizedServiceConnection.d.ts +25 -25
- package/lib/tokenizedServices/TokenizedServiceConnection.js +130 -130
- package/package.json +11 -11
|
@@ -1,5 +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
|
-
}
|
|
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
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnonymousSessionHandler = void 0;
|
|
4
|
-
var AnonymousSessionHandler = /** @class */ (function () {
|
|
5
|
-
function AnonymousSessionHandler() {
|
|
6
|
-
this.getSessionId = function (connection, callback) {
|
|
7
|
-
throw new Error('With anonymous session handler, use only connection methods without session.');
|
|
8
|
-
};
|
|
9
|
-
this.invalidateSessionId = function (sessionId, callback) {
|
|
10
|
-
throw new Error('With anonymous session handler, use only connection methods without session.');
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
return AnonymousSessionHandler;
|
|
14
|
-
}());
|
|
15
|
-
exports.AnonymousSessionHandler = AnonymousSessionHandler;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnonymousSessionHandler = void 0;
|
|
4
|
+
var AnonymousSessionHandler = /** @class */ (function () {
|
|
5
|
+
function AnonymousSessionHandler() {
|
|
6
|
+
this.getSessionId = function (connection, callback) {
|
|
7
|
+
throw new Error('With anonymous session handler, use only connection methods without session.');
|
|
8
|
+
};
|
|
9
|
+
this.invalidateSessionId = function (sessionId, callback) {
|
|
10
|
+
throw new Error('With anonymous session handler, use only connection methods without session.');
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
return AnonymousSessionHandler;
|
|
14
|
+
}());
|
|
15
|
+
exports.AnonymousSessionHandler = AnonymousSessionHandler;
|
package/lib/ApiConnection.d.ts
CHANGED
|
@@ -1,66 +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
|
-
}
|
|
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
|
+
}
|