@eway-crm/connector 1.0.206 → 1.0.208
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/cjs/OAuthSessionHandlerBase.d.ts +9 -2
- package/lib/cjs/constants/GlobalSettingsNames.d.ts +78 -77
- package/lib/cjs/index.js +2 -2
- package/lib/cjs/interfaces/ITokenData.d.ts +6 -2
- package/lib/esm/OAuthSessionHandlerBase.d.ts +9 -2
- package/lib/esm/constants/GlobalSettingsNames.d.ts +78 -77
- package/lib/esm/index.js +1 -1
- package/lib/esm/interfaces/ITokenData.d.ts +6 -2
- package/lib/index.d.ts +93 -81
- package/package.json +3 -2
package/lib/index.d.ts
CHANGED
|
@@ -24,14 +24,18 @@ declare class HttpRequestError extends Error {
|
|
|
24
24
|
constructor(statusCode: number, message: string);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
interface
|
|
27
|
+
interface ITokenError {
|
|
28
|
+
error: string;
|
|
29
|
+
}
|
|
30
|
+
interface ITokenSuccess {
|
|
28
31
|
access_token: string;
|
|
29
32
|
expires_in: number;
|
|
30
33
|
id_token?: string;
|
|
31
34
|
token_type: string;
|
|
32
35
|
refresh_token: string;
|
|
33
|
-
error:
|
|
36
|
+
error: undefined;
|
|
34
37
|
}
|
|
38
|
+
type ITokenData = ITokenError | ITokenSuccess;
|
|
35
39
|
type TInputData = Record<string, Object | null>;
|
|
36
40
|
|
|
37
41
|
type TFolderName = 'Actions' | 'AdditionalFields' | 'Bonuses' | 'Calendar' | 'CapacityNotes' | 'CapacityNoteTypes' | 'Carts' | 'ColumnPermissions' | 'Companies' | 'Contacts' | 'ContactsSuggestions' | 'CurrencyExchangeRates' | 'Documents' | 'Emails' | 'EnumTypes' | 'EnumValues' | 'EnumValuesRelations' | 'Features' | 'Flows' | 'GlobalSettings' | 'Goals' | 'Goods' | 'GoodsInCart' | 'GoodsInSet' | 'Groups' | 'History' | 'Holidays' | 'Children' | 'IndividualDiscounts' | 'InvoiceItems' | 'Invoices' | 'ItemCopyRelations' | 'Journal' | 'Knowledge' | 'Layouts' | 'LayoutsModels' | 'Leads' | 'Ledger' | 'Mappings' | 'Marketing' | 'MarketingList' | 'MarketingListSources' | 'Models' | 'ModulePermissions' | 'ObjectTypesOptions' | 'Payments' | 'PriceListGroups' | 'ProjectAssignments' | 'ProjectAssignmentsPerUserProject' | 'ProjectAssignmentsTotal' | 'ProjectAssignmentsTotalUserProject' | 'ProjectList' | 'Projects' | 'ProjectUsersInCaPlan' | 'RelationData' | 'Relations' | 'Reports' | 'RevisionsHistory' | 'Salaries' | 'SalePrices' | 'Prices' | 'SqlObjects' | 'Tasks' | 'RecurrencePatterns' | 'TeamRoles' | 'Templates' | 'Training' | 'UnifiedRelations' | 'Users' | 'UserSettings' | 'Vacation' | 'WebAccess2Options' | 'WebAccessOptions' | 'WorkCommitments' | 'WorkflowHistory' | 'WorkReports' | 'WrongClientVersions' | 'XsltTransformations' | 'XsltTransformationsModels';
|
|
@@ -287,83 +291,84 @@ declare class ApiMethods {
|
|
|
287
291
|
}
|
|
288
292
|
|
|
289
293
|
declare class GlobalSettingsNames {
|
|
290
|
-
static acceptableBackwardWorkReportDays
|
|
291
|
-
static adminAppInactiveLogoutTime
|
|
292
|
-
static applyGeneralDataProtectionRules
|
|
293
|
-
static automaticallyCreateJournalAfterCallDuration
|
|
294
|
-
static bonusesCompletedState
|
|
295
|
-
static cartInvoicedState
|
|
296
|
-
static cartOrderCanceledState
|
|
297
|
-
static cartOrderInProcessState
|
|
298
|
-
static cartOrderProcessedState
|
|
299
|
-
static cartPaidState
|
|
300
|
-
static cartProposalInProcessState
|
|
301
|
-
static cartProposalProcessedState
|
|
302
|
-
static cartSalesVoucherIssuedState
|
|
303
|
-
static cartToBeInvoicedState
|
|
304
|
-
static cartVoidedState
|
|
305
|
-
static clickToCallScheme
|
|
306
|
-
static companyDuplicityCheckEnabled
|
|
307
|
-
static completedStateName
|
|
308
|
-
static contactDuplicityCheckEnabled
|
|
309
|
-
static createCompanyWhileImportingContactFromOutlook
|
|
310
|
-
static
|
|
311
|
-
static
|
|
312
|
-
static
|
|
313
|
-
static
|
|
314
|
-
static
|
|
315
|
-
static
|
|
316
|
-
static
|
|
317
|
-
static
|
|
318
|
-
static
|
|
319
|
-
static
|
|
320
|
-
static
|
|
321
|
-
static
|
|
322
|
-
static
|
|
323
|
-
static
|
|
324
|
-
static
|
|
325
|
-
static
|
|
326
|
-
static
|
|
327
|
-
static
|
|
328
|
-
static
|
|
329
|
-
static
|
|
330
|
-
static
|
|
331
|
-
static
|
|
332
|
-
static
|
|
333
|
-
static
|
|
334
|
-
static
|
|
335
|
-
static
|
|
336
|
-
static
|
|
337
|
-
static
|
|
338
|
-
static
|
|
339
|
-
static
|
|
340
|
-
static
|
|
341
|
-
static
|
|
342
|
-
static
|
|
343
|
-
static
|
|
344
|
-
static
|
|
345
|
-
static
|
|
346
|
-
static
|
|
347
|
-
static
|
|
348
|
-
static
|
|
349
|
-
static
|
|
350
|
-
static
|
|
351
|
-
static
|
|
352
|
-
static
|
|
353
|
-
static
|
|
354
|
-
static
|
|
355
|
-
static
|
|
356
|
-
static
|
|
357
|
-
static
|
|
358
|
-
static
|
|
359
|
-
static
|
|
360
|
-
static
|
|
361
|
-
static
|
|
362
|
-
static
|
|
363
|
-
static
|
|
364
|
-
static
|
|
365
|
-
static
|
|
366
|
-
static
|
|
294
|
+
static readonly acceptableBackwardWorkReportDays = "AcceptableBackwardWorkReportDays";
|
|
295
|
+
static readonly adminAppInactiveLogoutTime = "AdminAppInactiveLogoutTime";
|
|
296
|
+
static readonly applyGeneralDataProtectionRules = "ApplyGeneralDataProtectionRules";
|
|
297
|
+
static readonly automaticallyCreateJournalAfterCallDuration = "AutomaticallyCreateJournalAfterCallDuration";
|
|
298
|
+
static readonly bonusesCompletedState = "BonusesCompletedState";
|
|
299
|
+
static readonly cartInvoicedState = "CartInvoicedState";
|
|
300
|
+
static readonly cartOrderCanceledState = "CartOrderCanceledState";
|
|
301
|
+
static readonly cartOrderInProcessState = "CartOrderInProcessState";
|
|
302
|
+
static readonly cartOrderProcessedState = "CartOrderProcessedState";
|
|
303
|
+
static readonly cartPaidState = "CartPaidState";
|
|
304
|
+
static readonly cartProposalInProcessState = "CartProposalInProcessState";
|
|
305
|
+
static readonly cartProposalProcessedState = "CartProposalProcessedState";
|
|
306
|
+
static readonly cartSalesVoucherIssuedState = "CartSalesVoucherIssuedState";
|
|
307
|
+
static readonly cartToBeInvoicedState = "CartToBeInvoicedState";
|
|
308
|
+
static readonly cartVoidedState = "CartVoidedState";
|
|
309
|
+
static readonly clickToCallScheme = "ClickToCallScheme";
|
|
310
|
+
static readonly companyDuplicityCheckEnabled = "CompanyDuplicityCheckEnabled";
|
|
311
|
+
static readonly completedStateName = "CompletedStateName";
|
|
312
|
+
static readonly contactDuplicityCheckEnabled = "ContactDuplicityCheckEnabled";
|
|
313
|
+
static readonly createCompanyWhileImportingContactFromOutlook = "CreateCompanyWhileImportingContactFromOutlook";
|
|
314
|
+
static readonly defaultProposalValidityPeriod = "DefaultProposalValidityPeriod";
|
|
315
|
+
static readonly enableContactsTwoWaySyncWithM365 = "EnableContactsTwoWaySyncWithM365";
|
|
316
|
+
static readonly deadStateName = "DeadStateName";
|
|
317
|
+
static readonly enableCompaniesSyncIntoMobileDeviceContacts = "EnableCompaniesSyncIntoMobileDeviceContacts";
|
|
318
|
+
static readonly enableContactsSyncIntoMobileDevice = "EnableContactsSyncIntoMobileDevice";
|
|
319
|
+
static readonly enableLeadsSyncIntoMobileDeviceContacts = "EnableLeadsSyncIntoMobileDeviceContacts";
|
|
320
|
+
static readonly enableLlamaAiFeatures = "EnableLlamaAiFeatures";
|
|
321
|
+
static readonly enableUsersSyncIntoMobileDeviceContacts = "EnableUsersSyncIntoMobileDeviceContacts";
|
|
322
|
+
static readonly emailsActiveProjectsLeadsFilter = "EmailsActiveProjectsLeadsFilter";
|
|
323
|
+
static readonly exchangeRatesAdminGroupName = "ExchangeRatesAdminGroupName";
|
|
324
|
+
static readonly forcedEmailTrackingGroups = "ForcedEmailTrackingGroups";
|
|
325
|
+
static readonly ignoreEmailsFromDomainsOnEmailsTracking = "IgnoreEmailsFromDomainsOnEmailsTracking";
|
|
326
|
+
static readonly trackEmailsFromDomains = "TrackEmailsFromDomains";
|
|
327
|
+
static readonly groupsForAllUnpaidInvoicesNotification = "GroupsForAllUnpaidInvoicesNotification";
|
|
328
|
+
static readonly itemPreviewMaxHeight = "ItemPreviewMaxHeight";
|
|
329
|
+
static readonly lastActivityAttributes = "LastActivityAttributes";
|
|
330
|
+
static readonly leadsCompletedState = "LeadsCompletedState";
|
|
331
|
+
static readonly leadDeadlineAlertGroups = "LeadDeadlineAlertGroups";
|
|
332
|
+
static readonly leadsDeadState = "LeadsDeadState";
|
|
333
|
+
static readonly marketingCompletedState = "MarketingCompletedState";
|
|
334
|
+
static readonly marketingDeadState = "MarketingDeadState";
|
|
335
|
+
static readonly minimumPasswordLength = "MinimumPasswordLength";
|
|
336
|
+
static readonly nextStepAttributes = "NextStepAttributes";
|
|
337
|
+
static readonly notifyAboutInvoicedInvoiceInPohodaGroup = "NotifyAboutInvoicedInvoiceInPohodaGroup";
|
|
338
|
+
static readonly notifyAboutLeadsDeadline = "NotifyAboutLeadsDeadline";
|
|
339
|
+
static readonly notifyAboutPaidInvoiceInPohodaGroup = "NotifyAboutPaidInvoiceInPohodaGroup";
|
|
340
|
+
static readonly notifyAboutProjectDeadline = "NotifyAboutProjectDeadline";
|
|
341
|
+
static readonly numberOfDecimalPlaces = "NumberOfDecimalPlaces";
|
|
342
|
+
static readonly phoneListTaskSolverGroup = "PhoneListTaskSolverGroup";
|
|
343
|
+
static readonly projectDeadlineAlert = "ProjectDeadlineAlert";
|
|
344
|
+
static readonly serverUpdateProgressNotificationGroup = "ServerUpdateProgressNotificationGroup";
|
|
345
|
+
static readonly sumarizeCartsPricesOnLeads = "SumarizeCartsPricesOnLeads";
|
|
346
|
+
static readonly sumarizeCartsPricesOnProjects = "SumarizeCartsPricesOnProjects";
|
|
347
|
+
static readonly sumarizePeopleExpensesOnProjects = "SumarizePeopleExpensesOnProjects";
|
|
348
|
+
static readonly systemHealthNotificationGroup = "SystemHealthNotificationGroup";
|
|
349
|
+
static readonly tasksCompletedState = "TasksCompletedState";
|
|
350
|
+
static readonly tasksDeferredState = "TasksDeferredState";
|
|
351
|
+
static readonly tasksInProgressState = "TasksInProgressState";
|
|
352
|
+
static readonly tasksNotStartedState = "TasksNotStartedState";
|
|
353
|
+
static readonly tasksWaitOnSomeoneElseState = "TasksWaitOnSomeoneElseState";
|
|
354
|
+
static readonly trackDocumentVersions = "TrackDocumentVersions";
|
|
355
|
+
static readonly vacationCompletedState = "VacationCompletedState";
|
|
356
|
+
static readonly workReportApprovedState = "WorkReportApprovedState";
|
|
357
|
+
static readonly defaultLanguage = "DefaultLanguage";
|
|
358
|
+
static readonly defaultCurrency = "DefaultCurrency";
|
|
359
|
+
static readonly myCompanyCountry = "MyCompanyCountry";
|
|
360
|
+
static readonly myCompanyName = "MyCompanyName";
|
|
361
|
+
static readonly myCompanyStreet = "MyCompanyStreet";
|
|
362
|
+
static readonly myCompanyCity = "MyCompanyCity";
|
|
363
|
+
static readonly myCompanyState = "MyCompanyState";
|
|
364
|
+
static readonly myCompanyZip = "MyCompanyZIP";
|
|
365
|
+
static readonly myCompanyId = "MyCompanyID";
|
|
366
|
+
static readonly myCompanyVat = "MyCompanyVAT";
|
|
367
|
+
static readonly mergeGoodsInCart = "MergeGoodsInCart";
|
|
368
|
+
static readonly cartRefreshLogic = "CartRefreshLogic";
|
|
369
|
+
static readonly goodsDefaultQuantity = "GoodsDefaultQuantity";
|
|
370
|
+
static readonly goodsDefaultVAT = "GoodsDefaultVAT";
|
|
371
|
+
static readonly goodsDefaultVATIncluded = "GoodsDefaultVATIncluded";
|
|
367
372
|
}
|
|
368
373
|
|
|
369
374
|
declare class FieldNames {
|
|
@@ -1245,14 +1250,21 @@ declare class VersionHelperBase {
|
|
|
1245
1250
|
static readonly supportsVersionFeaturesOf: (testedVersion: string, version: string) => boolean;
|
|
1246
1251
|
}
|
|
1247
1252
|
|
|
1253
|
+
type GetAccessTokenResult = {
|
|
1254
|
+
error: string;
|
|
1255
|
+
accessToken?: undefined;
|
|
1256
|
+
} | {
|
|
1257
|
+
error?: undefined;
|
|
1258
|
+
accessToken: string;
|
|
1259
|
+
};
|
|
1248
1260
|
declare abstract class OAuthSessionHandlerBase implements ISessionHandler {
|
|
1249
1261
|
lastSuccessfulLoginResponse?: IApiLoginResponse;
|
|
1250
|
-
private accessToken
|
|
1262
|
+
private accessToken?;
|
|
1251
1263
|
private readonly username;
|
|
1252
1264
|
private readonly appVersion;
|
|
1253
1265
|
protected readonly errorCallback: ((error: TUnionError) => void) | undefined;
|
|
1254
1266
|
private readonly getNewAccessTokenCallback;
|
|
1255
|
-
constructor(username: string, accessToken: string, appVersion: string, getNewAccessTokenCallback: ((connection: ApiConnection, callback: (
|
|
1267
|
+
constructor(username: string, accessToken: string, appVersion: string, getNewAccessTokenCallback: ((connection: ApiConnection, callback: (result: GetAccessTokenResult) => void) => void), errorCallback?: (error: TUnionError) => void);
|
|
1256
1268
|
readonly invalidateSessionId: (_: string, callback: () => void) => void;
|
|
1257
1269
|
readonly getSessionId: (connection: ApiConnection, callback: (sessionId: string) => void) => void;
|
|
1258
1270
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eway-crm/connector",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.208",
|
|
4
4
|
"description": "eWay-CRM API JavaScript connector library.",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
"rollup-plugin-delete": "^2.0.0",
|
|
51
51
|
"rollup-plugin-dts": "^5.3.0",
|
|
52
52
|
"ts-jest": "^29.1.0",
|
|
53
|
-
"typescript": ">=5.3.3 <5.4.0"
|
|
53
|
+
"typescript": ">=5.3.3 <5.4.0",
|
|
54
|
+
"tslib": "^2.8.1"
|
|
54
55
|
},
|
|
55
56
|
"files": [
|
|
56
57
|
"lib/**/*"
|