@bisondesk/commons-sdk 1.0.21 → 1.0.23-B
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/constants.d.ts +34 -4
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +94 -8
- package/lib/constants.js.map +1 -1
- package/lib/dayjs-utils.d.ts +7 -0
- package/lib/dayjs-utils.d.ts.map +1 -0
- package/lib/dayjs-utils.js +28 -0
- package/lib/dayjs-utils.js.map +1 -0
- package/lib/discussions.d.ts +43 -0
- package/lib/discussions.d.ts.map +1 -0
- package/lib/discussions.js +5 -0
- package/lib/discussions.js.map +1 -0
- package/lib/errors.d.ts +36 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +67 -0
- package/lib/errors.js.map +1 -0
- package/lib/exact.d.ts +10 -0
- package/lib/exact.d.ts.map +1 -0
- package/lib/exact.js +3 -0
- package/lib/exact.js.map +1 -0
- package/lib/ids.d.ts +2 -1
- package/lib/ids.d.ts.map +1 -1
- package/lib/ids.js +2 -1
- package/lib/ids.js.map +1 -1
- package/lib/insurance.d.ts +19 -0
- package/lib/insurance.d.ts.map +1 -0
- package/lib/insurance.js +3 -0
- package/lib/insurance.js.map +1 -0
- package/lib/messages.d.ts +56 -0
- package/lib/messages.d.ts.map +1 -0
- package/lib/messages.js +3 -0
- package/lib/messages.js.map +1 -0
- package/lib/notifications.d.ts +35 -0
- package/lib/notifications.d.ts.map +1 -0
- package/lib/notifications.js +9 -0
- package/lib/notifications.js.map +1 -0
- package/lib/pdf-gen.d.ts +40 -0
- package/lib/pdf-gen.d.ts.map +1 -0
- package/lib/pdf-gen.js +3 -0
- package/lib/pdf-gen.js.map +1 -0
- package/lib/storage.d.ts +63 -0
- package/lib/storage.d.ts.map +1 -0
- package/lib/storage.js +14 -0
- package/lib/storage.js.map +1 -0
- package/lib/types.d.ts +85 -2
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js.map +1 -1
- package/package.json +6 -3
- package/src/constants.ts +97 -7
- package/src/dayjs-utils.ts +27 -0
- package/src/discussions.ts +50 -0
- package/src/errors.ts +79 -0
- package/src/exact.ts +9 -0
- package/src/ids.ts +1 -0
- package/src/insurance.ts +21 -0
- package/src/messages.ts +65 -0
- package/src/notifications.ts +40 -0
- package/src/pdf-gen.ts +43 -0
- package/src/storage.ts +83 -0
- package/src/types.ts +97 -2
- package/tsconfig.tsbuildinfo +1 -2892
package/lib/constants.d.ts
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare enum AppRoles {
|
|
2
|
+
Accountant = "accountant",
|
|
3
|
+
Admin = "admins",
|
|
4
|
+
Administrative = "administrative",
|
|
5
|
+
Commercial = "commercial",
|
|
6
|
+
Manager = "manager",
|
|
7
|
+
ParkLogistics = "park_logistics"
|
|
8
|
+
}
|
|
5
9
|
export declare const SUPPORTED_LANGUAGES: string[];
|
|
10
|
+
export declare const TENANT_ID_ADMIN_HEADER = "tenant-id";
|
|
11
|
+
export declare const SERVICE_ID_ADMIN_HEADER = "service-id";
|
|
12
|
+
export declare const NO_TENANT_ID_VALUE = "notenant";
|
|
13
|
+
export declare const SYSTEM_USER_ID = "system";
|
|
14
|
+
export declare enum BusinessEntityIds {
|
|
15
|
+
BecrisDeclarations = "becris_declarations",
|
|
16
|
+
Contacts = "contacts",
|
|
17
|
+
Emails = "emails",
|
|
18
|
+
FinanceDocuments = "finance_documents",
|
|
19
|
+
InternetVehicles = "internet-vehicles",
|
|
20
|
+
Leads = "leads",
|
|
21
|
+
LeasingContracts = "leasing_contracts",
|
|
22
|
+
LeasingUploadAutomation = "leasing_upload_automation",
|
|
23
|
+
Opportunities = "opportunities",
|
|
24
|
+
Organizations = "organizations",
|
|
25
|
+
PdfTemplates = "pdf_templates",
|
|
26
|
+
Users = "users",
|
|
27
|
+
Vehicles = "vehicles",
|
|
28
|
+
VehiclesPriceLists = "vehicles_price_lists"
|
|
29
|
+
}
|
|
30
|
+
export declare const LEASING_QUOTE_TEMPLATE_GROUP_ID = "leasing_quote_template";
|
|
31
|
+
export declare const LEASING_QUOTE_PROFORMA_TEMPLATE_GROUP_ID = "leasing_quote_proforma_template";
|
|
32
|
+
export declare const LEASING_CONTRACT_AMORTIZATION_TEMPLATE_GROUP_ID = "leasing_contract_amortization_template";
|
|
33
|
+
export declare const LEASING_CONTRACT_TC_TEMPLATE_GROUP_ID = "leasing_contract_tc_template";
|
|
34
|
+
export declare const EU_VAT_COUNTRY_CODES: string[];
|
|
35
|
+
export declare const HEXON_LANG_CODES: [string, ...string[]];
|
|
6
36
|
//# sourceMappingURL=constants.d.ts.map
|
package/lib/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,oBAAY,QAAQ;IAClB,UAAU,eAAe;IACzB,KAAK,WAAW;IAChB,cAAc,mBAAmB;IACjC,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,aAAa,mBAAmB;CACjC;AAKD,eAAO,MAAM,mBAAmB,UAA2B,CAAC;AAK5D,eAAO,MAAM,sBAAsB,cAAc,CAAC;AAClD,eAAO,MAAM,uBAAuB,eAAe,CAAC;AAKpD,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAC7C,eAAO,MAAM,cAAc,WAAW,CAAC;AAKvC,oBAAY,iBAAiB;IAC3B,kBAAkB,wBAAwB;IAC1C,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,gBAAgB,sBAAsB;IACtC,gBAAgB,sBAAsB;IACtC,KAAK,UAAU;IACf,gBAAgB,sBAAsB;IACtC,uBAAuB,8BAA8B;IACrD,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,YAAY,kBAAkB;IAC9B,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,kBAAkB,yBAAyB;CAC5C;AAKD,eAAO,MAAM,+BAA+B,2BAA2B,CAAC;AACxE,eAAO,MAAM,wCAAwC,oCAAoC,CAAC;AAC1F,eAAO,MAAM,+CAA+C,2CAClB,CAAC;AAC3C,eAAO,MAAM,qCAAqC,iCAAiC,CAAC;AAKpF,eAAO,MAAM,oBAAoB,UA6BhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAalD,CAAC"}
|
package/lib/constants.js
CHANGED
|
@@ -1,18 +1,104 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.HEXON_LANG_CODES = exports.EU_VAT_COUNTRY_CODES = exports.LEASING_CONTRACT_TC_TEMPLATE_GROUP_ID = exports.LEASING_CONTRACT_AMORTIZATION_TEMPLATE_GROUP_ID = exports.LEASING_QUOTE_PROFORMA_TEMPLATE_GROUP_ID = exports.LEASING_QUOTE_TEMPLATE_GROUP_ID = exports.BusinessEntityIds = exports.SYSTEM_USER_ID = exports.NO_TENANT_ID_VALUE = exports.SERVICE_ID_ADMIN_HEADER = exports.TENANT_ID_ADMIN_HEADER = exports.SUPPORTED_LANGUAGES = exports.AppRoles = void 0;
|
|
4
4
|
//
|
|
5
5
|
// STATIC ROLES
|
|
6
6
|
//
|
|
7
|
-
|
|
7
|
+
var AppRoles;
|
|
8
|
+
(function (AppRoles) {
|
|
9
|
+
AppRoles["Accountant"] = "accountant";
|
|
10
|
+
AppRoles["Admin"] = "admins";
|
|
11
|
+
AppRoles["Administrative"] = "administrative";
|
|
12
|
+
AppRoles["Commercial"] = "commercial";
|
|
13
|
+
AppRoles["Manager"] = "manager";
|
|
14
|
+
AppRoles["ParkLogistics"] = "park_logistics";
|
|
15
|
+
})(AppRoles = exports.AppRoles || (exports.AppRoles = {}));
|
|
8
16
|
//
|
|
9
|
-
//
|
|
17
|
+
// I18N
|
|
10
18
|
//
|
|
11
|
-
exports.
|
|
12
|
-
exports.RDS_MASTER_SECRET_ID_OUTPUT_NAME = 'RDSMasterSecretId';
|
|
13
|
-
exports.RDS_DEFAULT_SECRET_ID_OUTPUT_NAME = 'RDSSecretId';
|
|
19
|
+
exports.SUPPORTED_LANGUAGES = ['en', 'fr', 'nl', 'es'];
|
|
14
20
|
//
|
|
15
|
-
//
|
|
21
|
+
// Headers
|
|
22
|
+
//
|
|
23
|
+
exports.TENANT_ID_ADMIN_HEADER = 'tenant-id';
|
|
24
|
+
exports.SERVICE_ID_ADMIN_HEADER = 'service-id';
|
|
25
|
+
//
|
|
26
|
+
// AUTH
|
|
27
|
+
//
|
|
28
|
+
exports.NO_TENANT_ID_VALUE = 'notenant';
|
|
29
|
+
exports.SYSTEM_USER_ID = 'system';
|
|
30
|
+
//
|
|
31
|
+
// Business Entity IDs
|
|
32
|
+
//
|
|
33
|
+
var BusinessEntityIds;
|
|
34
|
+
(function (BusinessEntityIds) {
|
|
35
|
+
BusinessEntityIds["BecrisDeclarations"] = "becris_declarations";
|
|
36
|
+
BusinessEntityIds["Contacts"] = "contacts";
|
|
37
|
+
BusinessEntityIds["Emails"] = "emails";
|
|
38
|
+
BusinessEntityIds["FinanceDocuments"] = "finance_documents";
|
|
39
|
+
BusinessEntityIds["InternetVehicles"] = "internet-vehicles";
|
|
40
|
+
BusinessEntityIds["Leads"] = "leads";
|
|
41
|
+
BusinessEntityIds["LeasingContracts"] = "leasing_contracts";
|
|
42
|
+
BusinessEntityIds["LeasingUploadAutomation"] = "leasing_upload_automation";
|
|
43
|
+
BusinessEntityIds["Opportunities"] = "opportunities";
|
|
44
|
+
BusinessEntityIds["Organizations"] = "organizations";
|
|
45
|
+
BusinessEntityIds["PdfTemplates"] = "pdf_templates";
|
|
46
|
+
BusinessEntityIds["Users"] = "users";
|
|
47
|
+
BusinessEntityIds["Vehicles"] = "vehicles";
|
|
48
|
+
BusinessEntityIds["VehiclesPriceLists"] = "vehicles_price_lists";
|
|
49
|
+
})(BusinessEntityIds = exports.BusinessEntityIds || (exports.BusinessEntityIds = {}));
|
|
50
|
+
//
|
|
51
|
+
// PDF Templates IDs
|
|
52
|
+
//
|
|
53
|
+
exports.LEASING_QUOTE_TEMPLATE_GROUP_ID = 'leasing_quote_template';
|
|
54
|
+
exports.LEASING_QUOTE_PROFORMA_TEMPLATE_GROUP_ID = 'leasing_quote_proforma_template';
|
|
55
|
+
exports.LEASING_CONTRACT_AMORTIZATION_TEMPLATE_GROUP_ID = 'leasing_contract_amortization_template';
|
|
56
|
+
exports.LEASING_CONTRACT_TC_TEMPLATE_GROUP_ID = 'leasing_contract_tc_template';
|
|
57
|
+
//
|
|
58
|
+
// VAT Prefixes for EU Countries and Great Britain & Northern Ireland
|
|
16
59
|
//
|
|
17
|
-
exports.
|
|
60
|
+
exports.EU_VAT_COUNTRY_CODES = [
|
|
61
|
+
'at',
|
|
62
|
+
'be',
|
|
63
|
+
'bg',
|
|
64
|
+
'hr',
|
|
65
|
+
'cy',
|
|
66
|
+
'cz',
|
|
67
|
+
'dk',
|
|
68
|
+
'ee',
|
|
69
|
+
'fi',
|
|
70
|
+
'fr',
|
|
71
|
+
'de',
|
|
72
|
+
'el',
|
|
73
|
+
'hu',
|
|
74
|
+
'ie',
|
|
75
|
+
'it',
|
|
76
|
+
'lv',
|
|
77
|
+
'lt',
|
|
78
|
+
'lu',
|
|
79
|
+
'mt',
|
|
80
|
+
'nl',
|
|
81
|
+
'pl',
|
|
82
|
+
'pt',
|
|
83
|
+
'ro',
|
|
84
|
+
'sk',
|
|
85
|
+
'si',
|
|
86
|
+
'es',
|
|
87
|
+
'se',
|
|
88
|
+
'xi', // Northern Ireland
|
|
89
|
+
];
|
|
90
|
+
exports.HEXON_LANG_CODES = [
|
|
91
|
+
'en',
|
|
92
|
+
'nl',
|
|
93
|
+
'de',
|
|
94
|
+
'fr',
|
|
95
|
+
'es',
|
|
96
|
+
'pt',
|
|
97
|
+
'it',
|
|
98
|
+
'pl',
|
|
99
|
+
'ru',
|
|
100
|
+
'ro',
|
|
101
|
+
'el',
|
|
102
|
+
'bg',
|
|
103
|
+
];
|
|
18
104
|
//# sourceMappingURL=constants.js.map
|
package/lib/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,EAAE;AACF,eAAe;AACf,EAAE;AACW,QAAA,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,EAAE;AACF,eAAe;AACf,EAAE;AACF,IAAY,QAOX;AAPD,WAAY,QAAQ;IAClB,qCAAyB,CAAA;IACzB,4BAAgB,CAAA;IAChB,6CAAiC,CAAA;IACjC,qCAAyB,CAAA;IACzB,+BAAmB,CAAA;IACnB,4CAAgC,CAAA;AAClC,CAAC,EAPW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAOnB;AAED,EAAE;AACF,OAAO;AACP,EAAE;AACW,QAAA,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAE5D,EAAE;AACF,UAAU;AACV,EAAE;AACW,QAAA,sBAAsB,GAAG,WAAW,CAAC;AACrC,QAAA,uBAAuB,GAAG,YAAY,CAAC;AAEpD,EAAE;AACF,OAAO;AACP,EAAE;AACW,QAAA,kBAAkB,GAAG,UAAU,CAAC;AAChC,QAAA,cAAc,GAAG,QAAQ,CAAC;AAEvC,EAAE;AACF,sBAAsB;AACtB,EAAE;AACF,IAAY,iBAeX;AAfD,WAAY,iBAAiB;IAC3B,+DAA0C,CAAA;IAC1C,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;IACjB,2DAAsC,CAAA;IACtC,2DAAsC,CAAA;IACtC,oCAAe,CAAA;IACf,2DAAsC,CAAA;IACtC,0EAAqD,CAAA;IACrD,oDAA+B,CAAA;IAC/B,oDAA+B,CAAA;IAC/B,mDAA8B,CAAA;IAC9B,oCAAe,CAAA;IACf,0CAAqB,CAAA;IACrB,gEAA2C,CAAA;AAC7C,CAAC,EAfW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAe5B;AAED,EAAE;AACF,oBAAoB;AACpB,EAAE;AACW,QAAA,+BAA+B,GAAG,wBAAwB,CAAC;AAC3D,QAAA,wCAAwC,GAAG,iCAAiC,CAAC;AAC7E,QAAA,+CAA+C,GAC1D,wCAAwC,CAAC;AAC9B,QAAA,qCAAqC,GAAG,8BAA8B,CAAC;AAEpF,EAAE;AACF,qEAAqE;AACrE,EAAE;AACW,QAAA,oBAAoB,GAAG;IAClC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI,EAAE,mBAAmB;CAC1B,CAAC;AAEW,QAAA,gBAAgB,GAA0B;IACrD,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACL,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import dayjs, { Dayjs } from 'dayjs';
|
|
2
|
+
export declare const tz: dayjs.DayjsTimezone;
|
|
3
|
+
export declare const utc: typeof dayjs.utc;
|
|
4
|
+
export declare const isSameOrAfter: (value: Dayjs, reference: Dayjs) => boolean;
|
|
5
|
+
export declare const isBetween: (value: Dayjs, startInclusive: Dayjs, endExclusive: Dayjs) => boolean;
|
|
6
|
+
export declare const businessDaysAdd: (value: Dayjs, days: number) => Dayjs;
|
|
7
|
+
//# sourceMappingURL=dayjs-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dayjs-utils.d.ts","sourceRoot":"","sources":["../src/dayjs-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAerC,eAAO,MAAM,EAAE,qBAAW,CAAC;AAE3B,eAAO,MAAM,GAAG,kBAAY,CAAC;AAE7B,eAAO,MAAM,aAAa,UAAW,KAAK,aAAa,KAAK,KAAG,OACV,CAAC;AAEtD,eAAO,MAAM,SAAS,UAAW,KAAK,kBAAkB,KAAK,gBAAgB,KAAK,KAAG,OACf,CAAC;AAEvE,eAAO,MAAM,eAAe,UAAW,KAAK,QAAQ,MAAM,KAAG,KACvB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.businessDaysAdd = exports.isBetween = exports.isSameOrAfter = exports.utc = exports.tz = void 0;
|
|
7
|
+
const dayjs_1 = __importDefault(require("dayjs"));
|
|
8
|
+
const dayjs_business_days_1 = __importDefault(require("dayjs-business-days"));
|
|
9
|
+
const customParseFormat_1 = __importDefault(require("dayjs/plugin/customParseFormat"));
|
|
10
|
+
const isoWeek_1 = __importDefault(require("dayjs/plugin/isoWeek"));
|
|
11
|
+
const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
|
|
12
|
+
const utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
13
|
+
dayjs_1.default.extend(dayjs_business_days_1.default);
|
|
14
|
+
dayjs_1.default.extend(isoWeek_1.default);
|
|
15
|
+
dayjs_1.default.extend(customParseFormat_1.default);
|
|
16
|
+
dayjs_1.default.extend(utc_1.default);
|
|
17
|
+
dayjs_1.default.extend(timezone_1.default);
|
|
18
|
+
// Exists only to make Typescript happy, otherwise the build would fail with
|
|
19
|
+
// "Property 'tz' does not exist on type 'Dayjs'"
|
|
20
|
+
exports.tz = dayjs_1.default.tz;
|
|
21
|
+
exports.utc = dayjs_1.default.utc;
|
|
22
|
+
const isSameOrAfter = (value, reference) => value.isAfter(reference) || value.isSame(reference);
|
|
23
|
+
exports.isSameOrAfter = isSameOrAfter;
|
|
24
|
+
const isBetween = (value, startInclusive, endExclusive) => (0, exports.isSameOrAfter)(value, startInclusive) && value.isBefore(endExclusive);
|
|
25
|
+
exports.isBetween = isBetween;
|
|
26
|
+
const businessDaysAdd = (value, days) => value.businessDaysAdd(days);
|
|
27
|
+
exports.businessDaysAdd = businessDaysAdd;
|
|
28
|
+
//# sourceMappingURL=dayjs-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dayjs-utils.js","sourceRoot":"","sources":["../src/dayjs-utils.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAqC;AACrC,8EAAoD;AACpD,uFAA+D;AAC/D,mEAA2C;AAC3C,qEAA6C;AAC7C,2DAAwC;AAExC,eAAK,CAAC,MAAM,CAAC,6BAAiB,CAAC,CAAC;AAChC,eAAK,CAAC,MAAM,CAAC,iBAAO,CAAC,CAAC;AACtB,eAAK,CAAC,MAAM,CAAC,2BAAiB,CAAC,CAAC;AAChC,eAAK,CAAC,MAAM,CAAC,aAAQ,CAAC,CAAC;AACvB,eAAK,CAAC,MAAM,CAAC,kBAAQ,CAAC,CAAC;AAEvB,4EAA4E;AAC5E,iDAAiD;AACpC,QAAA,EAAE,GAAG,eAAK,CAAC,EAAE,CAAC;AAEd,QAAA,GAAG,GAAG,eAAK,CAAC,GAAG,CAAC;AAEtB,MAAM,aAAa,GAAG,CAAC,KAAY,EAAE,SAAgB,EAAW,EAAE,CACvE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AADzC,QAAA,aAAa,iBAC4B;AAE/C,MAAM,SAAS,GAAG,CAAC,KAAY,EAAE,cAAqB,EAAE,YAAmB,EAAW,EAAE,CAC7F,IAAA,qBAAa,EAAC,KAAK,EAAE,cAAc,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AAD1D,QAAA,SAAS,aACiD;AAEhE,MAAM,eAAe,GAAG,CAAC,KAAY,EAAE,IAAY,EAAS,EAAE,CAClE,KAAa,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAD1B,QAAA,eAAe,mBACW"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BusinessEntityIds } from './constants';
|
|
2
|
+
export declare type Discussion = {
|
|
3
|
+
businessEntityId: BusinessEntityIds;
|
|
4
|
+
createdAt: string;
|
|
5
|
+
followers: string[];
|
|
6
|
+
id: string;
|
|
7
|
+
recordId: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type DiscussionData = {
|
|
11
|
+
discussion: Discussion;
|
|
12
|
+
messages: Message[];
|
|
13
|
+
};
|
|
14
|
+
export declare type NewDiscussion = {
|
|
15
|
+
businessEntityId: BusinessEntityIds;
|
|
16
|
+
content: MessageContent;
|
|
17
|
+
recordId: string;
|
|
18
|
+
title?: string;
|
|
19
|
+
followers: string[];
|
|
20
|
+
};
|
|
21
|
+
export declare type Message = {
|
|
22
|
+
author: string;
|
|
23
|
+
content?: MessageContent;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
deletedAt?: string;
|
|
26
|
+
id: string;
|
|
27
|
+
};
|
|
28
|
+
export declare type MessageContent = {
|
|
29
|
+
value: string;
|
|
30
|
+
mentions: string[];
|
|
31
|
+
};
|
|
32
|
+
export declare const MESSAGE_NOTIFICATION_ORIGIN = "message";
|
|
33
|
+
export declare type MessageNotificationData = {
|
|
34
|
+
snippet: string;
|
|
35
|
+
id: string;
|
|
36
|
+
mention?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export declare type NewDiscussionEvent = {
|
|
39
|
+
discussion: NewDiscussion;
|
|
40
|
+
tenantId: string;
|
|
41
|
+
author: string;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=discussions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discussions.d.ts","sourceRoot":"","sources":["../src/discussions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,oBAAY,UAAU,GAAG;IACvB,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,OAAO,EAAE,cAAc,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,2BAA2B,YAAY,CAAC;AAErD,oBAAY,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,UAAU,EAAE,aAAa,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discussions.js","sourceRoot":"","sources":["../src/discussions.ts"],"names":[],"mappings":";;;AAqCa,QAAA,2BAA2B,GAAG,SAAS,CAAC"}
|
package/lib/errors.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ValidationError } from 'joi';
|
|
2
|
+
export declare class XError extends Error {
|
|
3
|
+
errorCtx: any;
|
|
4
|
+
constructor(message?: string, errorCtx?: any);
|
|
5
|
+
}
|
|
6
|
+
export declare class WrappedError extends Error {
|
|
7
|
+
errorCtx: any;
|
|
8
|
+
constructor(err: Error, errorCtx?: any);
|
|
9
|
+
}
|
|
10
|
+
export declare class AsyncStopError extends Error {
|
|
11
|
+
constructor(message?: string);
|
|
12
|
+
}
|
|
13
|
+
export declare class ForbiddenError extends Error {
|
|
14
|
+
constructor(message?: string);
|
|
15
|
+
}
|
|
16
|
+
export declare class EntryAlreadyExistsError extends Error {
|
|
17
|
+
constructor(message?: string);
|
|
18
|
+
}
|
|
19
|
+
declare type FieldValidationError = {
|
|
20
|
+
message: string;
|
|
21
|
+
path: Array<string | number>;
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
export declare class InvalidArgumentsError extends Error {
|
|
25
|
+
validationErrors?: {
|
|
26
|
+
errors: FieldValidationError[];
|
|
27
|
+
};
|
|
28
|
+
isValidation: boolean;
|
|
29
|
+
errorCtx: any;
|
|
30
|
+
constructor(message?: string, errors?: ValidationError, errorCtx?: any);
|
|
31
|
+
}
|
|
32
|
+
export declare class UnauthorizedError extends Error {
|
|
33
|
+
constructor(message?: string);
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAuB,MAAM,KAAK,CAAC;AAE3D,qBAAa,MAAO,SAAQ,KAAK;IAC/B,QAAQ,EAAE,GAAG,CAAC;gBAEF,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,GAAG;CAK7C;AAED,qBAAa,YAAa,SAAQ,KAAK;IACrC,QAAQ,EAAE,GAAG,CAAC;gBAEF,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,GAAG;CAMvC;AAED,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED,aAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,gBAAgB,CAAC,EAAE;QAAE,MAAM,EAAE,oBAAoB,EAAE,CAAA;KAAE,CAAC;IACtD,YAAY,UAAQ;IACpB,QAAQ,EAAE,GAAG,CAAC;gBAEF,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,GAAG;CAiBvE;AAED,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,OAAO,CAAC,EAAE,MAAM;CAI7B"}
|
package/lib/errors.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnauthorizedError = exports.InvalidArgumentsError = exports.EntryAlreadyExistsError = exports.ForbiddenError = exports.AsyncStopError = exports.WrappedError = exports.XError = void 0;
|
|
4
|
+
class XError extends Error {
|
|
5
|
+
constructor(message, errorCtx) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'XError';
|
|
8
|
+
this.errorCtx = errorCtx;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.XError = XError;
|
|
12
|
+
class WrappedError extends Error {
|
|
13
|
+
constructor(err, errorCtx) {
|
|
14
|
+
super(err.message);
|
|
15
|
+
this.name = err.name;
|
|
16
|
+
this.stack = err.stack;
|
|
17
|
+
this.errorCtx = errorCtx;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.WrappedError = WrappedError;
|
|
21
|
+
class AsyncStopError extends Error {
|
|
22
|
+
constructor(message) {
|
|
23
|
+
super(message);
|
|
24
|
+
this.name = 'AsyncStopError';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.AsyncStopError = AsyncStopError;
|
|
28
|
+
class ForbiddenError extends Error {
|
|
29
|
+
constructor(message) {
|
|
30
|
+
super(message);
|
|
31
|
+
this.name = 'ForbiddenError';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.ForbiddenError = ForbiddenError;
|
|
35
|
+
class EntryAlreadyExistsError extends Error {
|
|
36
|
+
constructor(message) {
|
|
37
|
+
super(message);
|
|
38
|
+
this.name = 'EntryAlreadyExistsError';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.EntryAlreadyExistsError = EntryAlreadyExistsError;
|
|
42
|
+
class InvalidArgumentsError extends Error {
|
|
43
|
+
constructor(message, errors, errorCtx) {
|
|
44
|
+
super(message);
|
|
45
|
+
this.isValidation = true;
|
|
46
|
+
this.name = 'InvalidArgumentsError';
|
|
47
|
+
this.errorCtx = errorCtx;
|
|
48
|
+
if (errors != null) {
|
|
49
|
+
this.validationErrors = {
|
|
50
|
+
errors: errors.details.map(({ path, type, message }) => ({
|
|
51
|
+
message,
|
|
52
|
+
path,
|
|
53
|
+
type: type === 'custom' ? message : type,
|
|
54
|
+
})),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.InvalidArgumentsError = InvalidArgumentsError;
|
|
60
|
+
class UnauthorizedError extends Error {
|
|
61
|
+
constructor(message) {
|
|
62
|
+
super(message);
|
|
63
|
+
this.name = 'UnauthorizedError';
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.UnauthorizedError = UnauthorizedError;
|
|
67
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAEA,MAAa,MAAO,SAAQ,KAAK;IAG/B,YAAY,OAAgB,EAAE,QAAc;QAC1C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AARD,wBAQC;AAED,MAAa,YAAa,SAAQ,KAAK;IAGrC,YAAY,GAAU,EAAE,QAAc;QACpC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AATD,oCASC;AAED,MAAa,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AALD,wCAKC;AAED,MAAa,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AALD,wCAKC;AAED,MAAa,uBAAwB,SAAQ,KAAK;IAChD,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACxC,CAAC;CACF;AALD,0DAKC;AAOD,MAAa,qBAAsB,SAAQ,KAAK;IAK9C,YAAY,OAAgB,EAAE,MAAwB,EAAE,QAAc;QACpE,KAAK,CAAC,OAAO,CAAC,CAAC;QAJjB,iBAAY,GAAG,IAAI,CAAC;QAKlB,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;QACpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,IAAI,CAAC,gBAAgB,GAAG;gBACtB,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CACxB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAuB,EAAwB,EAAE,CAAC,CAAC;oBACvE,OAAO;oBACP,IAAI;oBACJ,IAAI,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;iBACzC,CAAC,CACH;aACF,CAAC;SACH;IACH,CAAC;CACF;AAtBD,sDAsBC;AAED,MAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AALD,8CAKC"}
|
package/lib/exact.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exact.d.ts","sourceRoot":"","sources":["../src/exact.ts"],"names":[],"mappings":"AAAA,oBAAY,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC"}
|
package/lib/exact.js
ADDED
package/lib/exact.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exact.js","sourceRoot":"","sources":["../src/exact.ts"],"names":[],"mappings":""}
|
package/lib/ids.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ export declare enum Alphabet {
|
|
|
2
2
|
Full = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_",
|
|
3
3
|
Alphanumeric = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
|
4
4
|
Lowercase = "abcdefghijklmnopqrstuvwxyz",
|
|
5
|
-
LowerAlphanumeric = "0123456789abcdefghijklmnopqrstuvwxyz"
|
|
5
|
+
LowerAlphanumeric = "0123456789abcdefghijklmnopqrstuvwxyz",
|
|
6
|
+
ReferenceCode = "123456789ABCDEFGHJKMNPQRSTUVWXYZ"
|
|
6
7
|
}
|
|
7
8
|
export declare const generateId: (idLength?: number, alphabet?: Alphabet) => string;
|
|
8
9
|
//# sourceMappingURL=ids.d.ts.map
|
package/lib/ids.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAEA,oBAAY,QAAQ;IAClB,IAAI,oEAAoE;IACxE,YAAY,mEAAmE;IAC/E,SAAS,+BAA+B;IACxC,iBAAiB,yCAAyC;
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":"AAEA,oBAAY,QAAQ;IAClB,IAAI,oEAAoE;IACxE,YAAY,mEAAmE;IAC/E,SAAS,+BAA+B;IACxC,iBAAiB,yCAAyC;IAC1D,aAAa,qCAAqC;CACnD;AAID,eAAO,MAAM,UAAU,cAAc,MAAM,aAAiB,QAAQ,KAAmB,MAQtF,CAAC"}
|
package/lib/ids.js
CHANGED
|
@@ -8,11 +8,12 @@ var Alphabet;
|
|
|
8
8
|
Alphabet["Alphanumeric"] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
9
9
|
Alphabet["Lowercase"] = "abcdefghijklmnopqrstuvwxyz";
|
|
10
10
|
Alphabet["LowerAlphanumeric"] = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
11
|
+
Alphabet["ReferenceCode"] = "123456789ABCDEFGHJKMNPQRSTUVWXYZ";
|
|
11
12
|
})(Alphabet = exports.Alphabet || (exports.Alphabet = {}));
|
|
12
13
|
// The ID can contain only alphabets and numbers and underscore.
|
|
13
14
|
// The ID should start with an alphabet and should not have two consecutive underscores or end with an underscore.
|
|
14
15
|
const generateId = (idLength = 15, alphabet = Alphabet.Full) => {
|
|
15
|
-
const nanoid = nanoid_1.customAlphabet(alphabet, idLength);
|
|
16
|
+
const nanoid = (0, nanoid_1.customAlphabet)(alphabet, idLength);
|
|
16
17
|
while (true) {
|
|
17
18
|
const id = nanoid();
|
|
18
19
|
if (isValid(id)) {
|
package/lib/ids.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":";;;AAAA,mCAAwC;AAExC,IAAY,
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../src/ids.ts"],"names":[],"mappings":";;;AAAA,mCAAwC;AAExC,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,oFAAwE,CAAA;IACxE,2FAA+E,CAAA;IAC/E,oDAAwC,CAAA;IACxC,sEAA0D,CAAA;IAC1D,8DAAkD,CAAA;AACpD,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB;AAED,gEAAgE;AAChE,kHAAkH;AAC3G,MAAM,UAAU,GAAG,CAAC,WAAmB,EAAE,EAAE,WAAqB,QAAQ,CAAC,IAAI,EAAU,EAAE;IAC9F,MAAM,MAAM,GAAG,IAAA,uBAAc,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAClD,OAAO,IAAI,EAAE;QACX,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;QACpB,IAAI,OAAO,CAAC,EAAE,CAAC,EAAE;YACf,OAAO,EAAE,CAAC;SACX;KACF;AACH,CAAC,CAAC;AARW,QAAA,UAAU,cAQrB;AAEF,MAAM,OAAO,GAAG,CAAC,EAAU,EAAW,EAAE;IACtC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;QACzC,OAAO,KAAK,CAAC;KACd;IAED,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QAC1C,OAAO,KAAK,CAAC;KACd;IAED,IAAI,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QACrB,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare type InsuranceEntry = {
|
|
2
|
+
checkedAt: string;
|
|
3
|
+
insured: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare type InsuranceCheckEvent = {
|
|
6
|
+
contractId: string;
|
|
7
|
+
tenantId: string;
|
|
8
|
+
vin: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type InsuranceCheckResponseEvent = InsuranceCheckEvent & {
|
|
11
|
+
insurance: InsuranceEntry;
|
|
12
|
+
};
|
|
13
|
+
export declare type InsuranceHistoryRequest = {
|
|
14
|
+
contractId: string;
|
|
15
|
+
tenantId: string;
|
|
16
|
+
limit?: number;
|
|
17
|
+
nextToken?: string;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=insurance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insurance.d.ts","sourceRoot":"","sources":["../src/insurance.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,oBAAY,mBAAmB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,oBAAY,2BAA2B,GAAG,mBAAmB,GAAG;IAC9D,SAAS,EAAE,cAAc,CAAC;CAC3B,CAAC;AAEF,oBAAY,uBAAuB,GAAG;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
package/lib/insurance.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insurance.js","sourceRoot":"","sources":["../src/insurance.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { AttachmentValue } from './types';
|
|
2
|
+
export declare type EmailAddress = {
|
|
3
|
+
name?: string;
|
|
4
|
+
email: string;
|
|
5
|
+
};
|
|
6
|
+
export declare type EmailDestination = EmailAddress & {
|
|
7
|
+
organizationId?: string;
|
|
8
|
+
contactId?: string;
|
|
9
|
+
addressType: 'TO' | 'CC' | 'BCC';
|
|
10
|
+
};
|
|
11
|
+
export declare type EmailContent = {
|
|
12
|
+
subject: string;
|
|
13
|
+
body: {
|
|
14
|
+
text?: string;
|
|
15
|
+
html?: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare type EmailMessage = {
|
|
19
|
+
id: string;
|
|
20
|
+
sentAt: string;
|
|
21
|
+
sentBy: string;
|
|
22
|
+
content?: AttachmentValue;
|
|
23
|
+
subject: string;
|
|
24
|
+
source: EmailAddress;
|
|
25
|
+
replyTo?: EmailAddress;
|
|
26
|
+
destinations: EmailDestination[];
|
|
27
|
+
};
|
|
28
|
+
export declare type EmailMessageEvent = {
|
|
29
|
+
tenantId: string;
|
|
30
|
+
message: EmailMessage;
|
|
31
|
+
};
|
|
32
|
+
export declare type TemplatedEmailRequest = {
|
|
33
|
+
data: Record<string, unknown>;
|
|
34
|
+
destinations: EmailDestination[];
|
|
35
|
+
replyTo?: EmailAddress;
|
|
36
|
+
source: EmailAddress;
|
|
37
|
+
subject: string;
|
|
38
|
+
template: string;
|
|
39
|
+
};
|
|
40
|
+
export declare type EmailRequest = {
|
|
41
|
+
references?: string[] | string;
|
|
42
|
+
inReplyTo?: string;
|
|
43
|
+
destinations: EmailDestination[];
|
|
44
|
+
replyTo?: EmailAddress;
|
|
45
|
+
source: EmailAddress;
|
|
46
|
+
subject: string;
|
|
47
|
+
attachments?: AttachmentValue[];
|
|
48
|
+
body: {
|
|
49
|
+
text?: string;
|
|
50
|
+
html: string;
|
|
51
|
+
} | {
|
|
52
|
+
html?: string;
|
|
53
|
+
text: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,oBAAY,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,gBAAgB,GAAG,YAAY,GAAG;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;CAClC,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC;CAClC,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC,IAAI,EACA;QACE,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,GACD;QACE,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACP,CAAC"}
|
package/lib/messages.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BusinessEntityIds } from './constants';
|
|
2
|
+
export declare enum NotificationVisibility {
|
|
3
|
+
UNREAD = "unread",
|
|
4
|
+
READ = "read"
|
|
5
|
+
}
|
|
6
|
+
export declare type NewNotificationsEvent<T = unknown> = {
|
|
7
|
+
tenantId: string;
|
|
8
|
+
notifications: NewNotification<T>[];
|
|
9
|
+
};
|
|
10
|
+
declare type BaseNotification<T = {}> = {
|
|
11
|
+
sourceId: string;
|
|
12
|
+
destinationId: string;
|
|
13
|
+
businessEntityId: BusinessEntityIds;
|
|
14
|
+
recordId: string;
|
|
15
|
+
recordTitle?: string;
|
|
16
|
+
meta: T;
|
|
17
|
+
origin: string;
|
|
18
|
+
};
|
|
19
|
+
export declare type NewNotification<T = unknown> = BaseNotification<T>;
|
|
20
|
+
export declare type Notification<T = unknown> = BaseNotification<T> & {
|
|
21
|
+
id: string;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
visibility: NotificationVisibility;
|
|
24
|
+
};
|
|
25
|
+
export declare type NotificationReadUpdates = {
|
|
26
|
+
notificationIds: string[] | undefined;
|
|
27
|
+
};
|
|
28
|
+
export declare type NotificationsInfo = {
|
|
29
|
+
unreadCount: number;
|
|
30
|
+
unseen: boolean;
|
|
31
|
+
latestSeenAt?: string;
|
|
32
|
+
latestNotificationAt?: string;
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=notifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../src/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,oBAAY,sBAAsB;IAChC,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,oBAAY,qBAAqB,CAAC,CAAC,GAAG,OAAO,IAAI;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;CACrC,CAAC;AAEF,aAAK,gBAAgB,CAAC,CAAC,GAAG,EAAE,IAAI;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,eAAe,CAAC,CAAC,GAAG,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAE/D,oBAAY,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAC5D,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,sBAAsB,CAAC;CACpC,CAAC;AAEF,oBAAY,uBAAuB,GAAG;IACpC,eAAe,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACvC,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationVisibility = void 0;
|
|
4
|
+
var NotificationVisibility;
|
|
5
|
+
(function (NotificationVisibility) {
|
|
6
|
+
NotificationVisibility["UNREAD"] = "unread";
|
|
7
|
+
NotificationVisibility["READ"] = "read";
|
|
8
|
+
})(NotificationVisibility = exports.NotificationVisibility || (exports.NotificationVisibility = {}));
|
|
9
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../src/notifications.ts"],"names":[],"mappings":";;;AAEA,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,2CAAiB,CAAA;IACjB,uCAAa,CAAA;AACf,CAAC,EAHW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAGjC"}
|