@bisondesk/core-sdk 1.0.56 → 1.0.58
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/package.json +2 -2
- package/src/constants.js +62 -0
- package/src/types/conversations.js +2 -0
- package/src/types/crm.js +2 -0
- package/src/types/definitions.js +2 -0
- package/src/types/events.js +10 -0
- package/src/types/fields.js +27 -0
- package/src/types/leads.js +2 -0
- package/src/types/picklists.js +2 -0
- package/src/types/search.js +44 -0
- package/src/types/storage.js +2 -0
- package/src/types/tenants.js +2 -0
- package/src/types/users.js +2 -0
- package/src/types/utils.js +2 -0
- package/src/types/vehicles.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bisondesk/core-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.58",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf build dist lib *.tsbuildinfo",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"author": "Ivo Anastácio",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@bisondesk/commons-sdk": "^1.0.
|
|
14
|
+
"@bisondesk/commons-sdk": "^1.0.58",
|
|
15
15
|
"joi": "17.4.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
package/src/constants.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KM_ROUNDING = exports.PRICE_ROUNDING = exports.MAX_PRICE = exports.MAX_KM = exports.MAX_AGE = exports.FILTER_MULTIPLE_SEPARATOR = exports.FILTER_RANGE_SEPARATOR = exports.MIN_SORT_PRIORITY = exports.MAX_SORT_PRIORITY = exports.Categories = exports.BusinessEntityIds = exports.ORG_SEGMENTS_PICKLIST_ID = exports.SUSPENSIONS_PICKLIST_ID = exports.MAKE_MODELS_PICKLIST_ID = exports.MAKES_PICKLIST_ID = exports.TRANSMISSIONS_PICKLIST_ID = exports.EURONORMS_PICKLIST_ID = exports.CONFIGURATIONS_PICKLIST_ID = exports.CATEGORIES_PICKLIST_ID = exports.CABINS_PICKLIST_ID = exports.BODYWORKS_PICKLIST_ID = exports.COUNTRIES_PICKLIST_ID = exports.TIMEZONES_PICKLIST_ID = exports.APP_LANGUAGES_PICKLIST_ID = void 0;
|
|
4
|
+
//
|
|
5
|
+
// STATIC PICKLIST IDS
|
|
6
|
+
//
|
|
7
|
+
exports.APP_LANGUAGES_PICKLIST_ID = 'appLanguages';
|
|
8
|
+
exports.TIMEZONES_PICKLIST_ID = 'timezones';
|
|
9
|
+
exports.COUNTRIES_PICKLIST_ID = 'countries';
|
|
10
|
+
//
|
|
11
|
+
// STATIC PICKLIST IDS FROM HyperDMS
|
|
12
|
+
//
|
|
13
|
+
exports.BODYWORKS_PICKLIST_ID = 'bodywork';
|
|
14
|
+
exports.CABINS_PICKLIST_ID = 'cabin';
|
|
15
|
+
exports.CATEGORIES_PICKLIST_ID = 'category';
|
|
16
|
+
exports.CONFIGURATIONS_PICKLIST_ID = 'configuration';
|
|
17
|
+
exports.EURONORMS_PICKLIST_ID = 'euronorm';
|
|
18
|
+
exports.TRANSMISSIONS_PICKLIST_ID = 'gearbox';
|
|
19
|
+
exports.MAKES_PICKLIST_ID = 'make';
|
|
20
|
+
exports.MAKE_MODELS_PICKLIST_ID = 'make_model';
|
|
21
|
+
exports.SUSPENSIONS_PICKLIST_ID = 'suspension';
|
|
22
|
+
exports.ORG_SEGMENTS_PICKLIST_ID = 'segment';
|
|
23
|
+
//
|
|
24
|
+
// STATIC VALUES FOR VEHICLE CATEGORIES
|
|
25
|
+
//
|
|
26
|
+
var BusinessEntityIds;
|
|
27
|
+
(function (BusinessEntityIds) {
|
|
28
|
+
BusinessEntityIds["Leads"] = "leads";
|
|
29
|
+
BusinessEntityIds["Organizations"] = "organizations";
|
|
30
|
+
BusinessEntityIds["Contacts"] = "contacts";
|
|
31
|
+
BusinessEntityIds["Vehicles"] = "vehicles";
|
|
32
|
+
})(BusinessEntityIds = exports.BusinessEntityIds || (exports.BusinessEntityIds = {}));
|
|
33
|
+
//
|
|
34
|
+
// STATIC VALUES FOR VEHICLE CATEGORIES
|
|
35
|
+
//
|
|
36
|
+
var Categories;
|
|
37
|
+
(function (Categories) {
|
|
38
|
+
Categories["TractorHead"] = "Tractor Head";
|
|
39
|
+
Categories["Truck"] = "Truck";
|
|
40
|
+
Categories["Trailer"] = "Trailer";
|
|
41
|
+
Categories["SemiTrailer"] = "Semi-Trailer";
|
|
42
|
+
Categories["Van"] = "Van";
|
|
43
|
+
Categories["Machine"] = "Machine";
|
|
44
|
+
})(Categories = exports.Categories || (exports.Categories = {}));
|
|
45
|
+
//
|
|
46
|
+
// PICKLIST CONSTANTS
|
|
47
|
+
//
|
|
48
|
+
exports.MAX_SORT_PRIORITY = 10000;
|
|
49
|
+
exports.MIN_SORT_PRIORITY = 1;
|
|
50
|
+
//
|
|
51
|
+
// SEARCH
|
|
52
|
+
//
|
|
53
|
+
exports.FILTER_RANGE_SEPARATOR = '__';
|
|
54
|
+
exports.FILTER_MULTIPLE_SEPARATOR = '__';
|
|
55
|
+
//
|
|
56
|
+
// Lead interests
|
|
57
|
+
//
|
|
58
|
+
exports.MAX_AGE = 15;
|
|
59
|
+
exports.MAX_KM = 1000000;
|
|
60
|
+
exports.MAX_PRICE = 100000;
|
|
61
|
+
exports.PRICE_ROUNDING = 1000;
|
|
62
|
+
exports.KM_ROUNDING = 100000;
|
package/src/types/crm.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecordAction = void 0;
|
|
4
|
+
var RecordAction;
|
|
5
|
+
(function (RecordAction) {
|
|
6
|
+
// if you rename this, you also need to adjust the SNS subscription filters
|
|
7
|
+
RecordAction["Create"] = "content.records.create";
|
|
8
|
+
RecordAction["Update"] = "content.records.update";
|
|
9
|
+
RecordAction["Delete"] = "content.records.delete";
|
|
10
|
+
})(RecordAction = exports.RecordAction || (exports.RecordAction = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DateGranularity = exports.FieldTypes = void 0;
|
|
4
|
+
var FieldTypes;
|
|
5
|
+
(function (FieldTypes) {
|
|
6
|
+
FieldTypes["checkbox"] = "checkbox";
|
|
7
|
+
FieldTypes["date"] = "date";
|
|
8
|
+
FieldTypes["email"] = "email";
|
|
9
|
+
FieldTypes["image"] = "image";
|
|
10
|
+
FieldTypes["multilang"] = "multilang";
|
|
11
|
+
FieldTypes["multiline"] = "multiline";
|
|
12
|
+
FieldTypes["number"] = "number";
|
|
13
|
+
FieldTypes["phoneNumber"] = "phoneNumber";
|
|
14
|
+
FieldTypes["picklist"] = "picklist";
|
|
15
|
+
FieldTypes["rating"] = "rating";
|
|
16
|
+
FieldTypes["text"] = "text";
|
|
17
|
+
})(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {}));
|
|
18
|
+
//
|
|
19
|
+
// Field values
|
|
20
|
+
//
|
|
21
|
+
var DateGranularity;
|
|
22
|
+
(function (DateGranularity) {
|
|
23
|
+
DateGranularity["year"] = "year";
|
|
24
|
+
DateGranularity["yearMonth"] = "yearMonth";
|
|
25
|
+
DateGranularity["yearMonthDay"] = "yearMonthDay";
|
|
26
|
+
DateGranularity["yearMonthDayTime"] = "yearMonthDayTime";
|
|
27
|
+
})(DateGranularity = exports.DateGranularity || (exports.DateGranularity = {}));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
///////////////////////////////////////////////////////
|
|
3
|
+
// Generic stuff
|
|
4
|
+
///////////////////////////////////////////////////////
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AggregationType = exports.SortOrder = exports.FILTER_RANGE_SEPARATOR = exports.ElasticsearchOperator = exports.ConditionType = void 0;
|
|
7
|
+
var ConditionType;
|
|
8
|
+
(function (ConditionType) {
|
|
9
|
+
ConditionType["and"] = "AND";
|
|
10
|
+
ConditionType["or"] = "OR";
|
|
11
|
+
})(ConditionType = exports.ConditionType || (exports.ConditionType = {}));
|
|
12
|
+
var ElasticsearchOperator;
|
|
13
|
+
(function (ElasticsearchOperator) {
|
|
14
|
+
// all properties
|
|
15
|
+
ElasticsearchOperator["empty"] = "EMPTY";
|
|
16
|
+
ElasticsearchOperator["notEmpty"] = "NOT_EMPTY";
|
|
17
|
+
ElasticsearchOperator["is"] = "IS";
|
|
18
|
+
ElasticsearchOperator["isNot"] = "IS_NOT";
|
|
19
|
+
// number, date properties
|
|
20
|
+
ElasticsearchOperator["greaterThanOrEqual"] = "GTE";
|
|
21
|
+
ElasticsearchOperator["greaterThan"] = "GT";
|
|
22
|
+
ElasticsearchOperator["lessThanEqual"] = "LTE";
|
|
23
|
+
ElasticsearchOperator["lessThan"] = "LT";
|
|
24
|
+
ElasticsearchOperator["between"] = "BETWEEN";
|
|
25
|
+
// string properties
|
|
26
|
+
ElasticsearchOperator["contains"] = "CONTAINS";
|
|
27
|
+
ElasticsearchOperator["notContains"] = "NOT_CONTAINS";
|
|
28
|
+
ElasticsearchOperator["startsWith"] = "STARTS_WITH";
|
|
29
|
+
ElasticsearchOperator["endsWith"] = "ENDS_WITH";
|
|
30
|
+
})(ElasticsearchOperator = exports.ElasticsearchOperator || (exports.ElasticsearchOperator = {}));
|
|
31
|
+
///////////////////////////////////////////////////////
|
|
32
|
+
// Search
|
|
33
|
+
///////////////////////////////////////////////////////
|
|
34
|
+
exports.FILTER_RANGE_SEPARATOR = '__';
|
|
35
|
+
var SortOrder;
|
|
36
|
+
(function (SortOrder) {
|
|
37
|
+
SortOrder["asc"] = "asc";
|
|
38
|
+
SortOrder["desc"] = "desc";
|
|
39
|
+
})(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
|
|
40
|
+
var AggregationType;
|
|
41
|
+
(function (AggregationType) {
|
|
42
|
+
AggregationType["term"] = "TERM";
|
|
43
|
+
AggregationType["range"] = "RANGE";
|
|
44
|
+
})(AggregationType = exports.AggregationType || (exports.AggregationType = {}));
|