@webex/calling 3.0.0-next.8 → 3.0.1
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/dist/CallHistory/CallHistory.js +49 -49
- package/dist/CallHistory/CallHistory.js.map +1 -1
- package/dist/CallHistory/CallHistory.test.js +9 -0
- package/dist/CallHistory/CallHistory.test.js.map +1 -1
- package/dist/CallHistory/callHistoryFixtures.js +63 -7
- package/dist/CallHistory/callHistoryFixtures.js.map +1 -1
- package/dist/CallHistory/constants.js +9 -18
- package/dist/CallHistory/constants.js.map +1 -1
- package/dist/CallHistory/types.js.map +1 -1
- package/dist/CallSettings/CallSettings.js +18 -13
- package/dist/CallSettings/CallSettings.js.map +1 -1
- package/dist/CallSettings/CallSettings.test.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.js +7 -8
- package/dist/CallSettings/UcmBackendConnector.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.test.js +69 -37
- package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.js +19 -13
- package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.test.js +2 -2
- package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/constants.js +11 -22
- package/dist/CallSettings/constants.js.map +1 -1
- package/dist/CallSettings/testFixtures.js +4 -8
- package/dist/CallSettings/testFixtures.js.map +1 -1
- package/dist/CallSettings/types.js.map +1 -1
- package/dist/CallingClient/CallingClient.js +134 -75
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +170 -109
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/callRecordFixtures.js +2 -4
- package/dist/CallingClient/callRecordFixtures.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.js +9 -29
- package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
- package/dist/CallingClient/calling/call.js +140 -80
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +651 -409
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/callManager.js +3 -14
- package/dist/CallingClient/calling/callManager.js.map +1 -1
- package/dist/CallingClient/calling/callManager.test.js +1 -1
- package/dist/CallingClient/calling/callManager.test.js.map +1 -1
- package/dist/CallingClient/calling/types.js +31 -33
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/CallingClient/callingClientFixtures.js +107 -17
- package/dist/CallingClient/callingClientFixtures.js.map +1 -1
- package/dist/CallingClient/constants.js +101 -193
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/index.js +20 -18
- package/dist/CallingClient/line/index.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +13 -13
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/line/types.js +7 -11
- package/dist/CallingClient/line/types.js.map +1 -1
- package/dist/CallingClient/registration/register.js +102 -111
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +33 -32
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/registerFixtures.js +5 -10
- package/dist/CallingClient/registration/registerFixtures.js.map +1 -1
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/CallingClient/types.js.map +1 -1
- package/dist/Contacts/ContactsClient.js +30 -19
- package/dist/Contacts/ContactsClient.js.map +1 -1
- package/dist/Contacts/ContactsClient.test.js +4 -4
- package/dist/Contacts/ContactsClient.test.js.map +1 -1
- package/dist/Contacts/constants.js +10 -18
- package/dist/Contacts/constants.js.map +1 -1
- package/dist/Contacts/contactFixtures.js +26 -52
- package/dist/Contacts/contactFixtures.js.map +1 -1
- package/dist/Contacts/types.js +29 -9
- package/dist/Contacts/types.js.map +1 -1
- package/dist/Errors/catalog/CallError.js +3 -5
- package/dist/Errors/catalog/CallError.js.map +1 -1
- package/dist/Errors/catalog/CallingDeviceError.js +4 -6
- package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
- package/dist/Errors/catalog/ExtendedError.js +2 -3
- package/dist/Errors/catalog/ExtendedError.js.map +1 -1
- package/dist/Errors/catalog/LineError.js +5 -7
- package/dist/Errors/catalog/LineError.js.map +1 -1
- package/dist/Errors/index.js +7 -0
- package/dist/Errors/index.js.map +1 -1
- package/dist/Errors/types.js +15 -20
- package/dist/Errors/types.js.map +1 -1
- package/dist/Events/impl/index.js +2 -3
- package/dist/Events/impl/index.js.map +1 -1
- package/dist/Events/types.js +44 -52
- package/dist/Events/types.js.map +1 -1
- package/dist/Logger/index.js +1 -2
- package/dist/Logger/index.js.map +1 -1
- package/dist/Logger/index.test.js.map +1 -1
- package/dist/Logger/types.js +9 -12
- package/dist/Logger/types.js.map +1 -1
- package/dist/Metrics/index.js +2 -4
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +3 -3
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/Metrics/types.js +15 -20
- package/dist/Metrics/types.js.map +1 -1
- package/dist/SDKConnector/index.js +1 -2
- package/dist/SDKConnector/index.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/SDKConnector/utils.js +1 -2
- package/dist/SDKConnector/utils.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.js +21 -12
- package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.test.js +2 -2
- package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.js +19 -11
- package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.test.js +5 -4
- package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/Voicemail.js +35 -33
- package/dist/Voicemail/Voicemail.js.map +1 -1
- package/dist/Voicemail/Voicemail.test.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.js +18 -11
- package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.test.js +4 -4
- package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/constants.js +29 -58
- package/dist/Voicemail/constants.js.map +1 -1
- package/dist/Voicemail/types.js.map +1 -1
- package/dist/Voicemail/voicemailFixture.js +35 -70
- package/dist/Voicemail/voicemailFixture.js.map +1 -1
- package/dist/api.js +13 -20
- package/dist/api.js.map +1 -1
- package/dist/common/Utils.js +18 -25
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +3 -3
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/constants.js +41 -82
- package/dist/common/constants.js.map +1 -1
- package/dist/common/testUtil.js +12 -21
- package/dist/common/testUtil.js.map +1 -1
- package/dist/common/types.js +34 -43
- package/dist/common/types.js.map +1 -1
- package/dist/index.js +246 -0
- package/dist/index.js.map +1 -1
- package/dist/module/CallHistory/CallHistory.js +7 -5
- package/dist/module/CallHistory/callHistoryFixtures.js +59 -0
- package/dist/module/CallSettings/UcmBackendConnector.js +4 -4
- package/dist/module/CallingClient/CallingClient.js +59 -42
- package/dist/module/CallingClient/calling/CallerId/index.js +3 -23
- package/dist/module/CallingClient/calling/call.js +69 -26
- package/dist/module/CallingClient/calling/callManager.js +0 -6
- package/dist/module/CallingClient/callingClientFixtures.js +119 -1
- package/dist/module/CallingClient/constants.js +8 -4
- package/dist/module/CallingClient/line/index.js +9 -12
- package/dist/module/CallingClient/line/types.js +0 -5
- package/dist/module/CallingClient/registration/register.js +28 -20
- package/dist/module/Errors/catalog/CallingDeviceError.js +2 -2
- package/dist/module/Errors/catalog/LineError.js +2 -2
- package/dist/module/Errors/index.js +1 -0
- package/dist/module/Events/types.js +2 -0
- package/dist/module/common/Utils.js +14 -19
- package/dist/module/common/testUtil.js +2 -1
- package/dist/module/common/types.js +6 -5
- package/dist/module/index.js +9 -0
- package/dist/types/CallHistory/CallHistory.d.ts +2 -1
- package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
- package/dist/types/CallHistory/callHistoryFixtures.d.ts +1 -0
- package/dist/types/CallHistory/callHistoryFixtures.d.ts.map +1 -1
- package/dist/types/CallSettings/UcmBackendConnector.d.ts +1 -1
- package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
- package/dist/types/CallSettings/types.d.ts +1 -0
- package/dist/types/CallSettings/types.d.ts.map +1 -1
- package/dist/types/CallingClient/CallingClient.d.ts +2 -0
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/CallerId/index.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/CallerId/types.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts +2 -0
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/callManager.d.ts +0 -1
- package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +30 -30
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/callingClientFixtures.d.ts +69 -1
- package/dist/types/CallingClient/callingClientFixtures.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +7 -3
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/line/index.d.ts +6 -6
- package/dist/types/CallingClient/line/index.d.ts.map +1 -1
- package/dist/types/CallingClient/line/types.d.ts +11 -23
- package/dist/types/CallingClient/line/types.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +3 -3
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/types.d.ts +14 -14
- package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
- package/dist/types/CallingClient/types.d.ts +6 -4
- package/dist/types/CallingClient/types.d.ts.map +1 -1
- package/dist/types/Contacts/ContactsClient.d.ts +1 -1
- package/dist/types/Errors/catalog/CallingDeviceError.d.ts +4 -4
- package/dist/types/Errors/catalog/CallingDeviceError.d.ts.map +1 -1
- package/dist/types/Errors/catalog/LineError.d.ts +4 -4
- package/dist/types/Errors/catalog/LineError.d.ts.map +1 -1
- package/dist/types/Errors/index.d.ts +1 -0
- package/dist/types/Errors/index.d.ts.map +1 -1
- package/dist/types/Errors/types.d.ts +2 -3
- package/dist/types/Errors/types.d.ts.map +1 -1
- package/dist/types/Events/types.d.ts +28 -5
- package/dist/types/Events/types.d.ts.map +1 -1
- package/dist/types/SDKConnector/types.d.ts +2 -1
- package/dist/types/SDKConnector/types.d.ts.map +1 -1
- package/dist/types/Voicemail/UcmBackendConnector.d.ts +1 -1
- package/dist/types/Voicemail/Voicemail.d.ts.map +1 -1
- package/dist/types/Voicemail/WxCallBackendConnector.d.ts +1 -1
- package/dist/types/Voicemail/types.d.ts +10 -10
- package/dist/types/Voicemail/types.d.ts.map +1 -1
- package/dist/types/api.d.ts +4 -5
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/testUtil.d.ts +1 -0
- package/dist/types/common/testUtil.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +3 -2
- package/dist/types/common/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/Contacts/types.js
CHANGED
|
@@ -5,19 +5,39 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.GroupType = exports.ContactType = void 0;
|
|
8
|
-
var ContactType
|
|
9
|
-
exports.ContactType = ContactType;
|
|
10
|
-
(function (ContactType) {
|
|
8
|
+
var ContactType = exports.ContactType = /*#__PURE__*/function (ContactType) {
|
|
11
9
|
ContactType["CUSTOM"] = "CUSTOM";
|
|
12
10
|
ContactType["CLOUD"] = "CLOUD";
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
return ContactType;
|
|
12
|
+
}({});
|
|
15
13
|
/**
|
|
16
|
-
* `
|
|
14
|
+
* `Contact` object is used to represent a contact.
|
|
17
15
|
*/
|
|
18
|
-
exports.GroupType = GroupType
|
|
19
|
-
(function (GroupType) {
|
|
16
|
+
var GroupType = exports.GroupType = /*#__PURE__*/function (GroupType) {
|
|
20
17
|
GroupType["NORMAL"] = "NORMAL";
|
|
21
18
|
GroupType["EXTERNAL"] = "EXTERNAL";
|
|
22
|
-
|
|
19
|
+
return GroupType;
|
|
20
|
+
}({});
|
|
21
|
+
/**
|
|
22
|
+
* `ContactGroup` object is used to represent a contact group.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Interface for Contacts Module.
|
|
26
|
+
* This encompasses a set of APIs that enable the fetching, creation, and updating of contacts and groups.
|
|
27
|
+
* These APIs return promises that resolve to a `ContactResponse` object, which contains a status code, data, and message.
|
|
28
|
+
* The data field within this response object holds the contacts and groups object.
|
|
29
|
+
*
|
|
30
|
+
* Example - ContactResponse
|
|
31
|
+
*
|
|
32
|
+
* ```json
|
|
33
|
+
* {
|
|
34
|
+
* statusCode: 200,
|
|
35
|
+
* data: {
|
|
36
|
+
* contacts: Contact[],
|
|
37
|
+
* groups: ContactGroup[],
|
|
38
|
+
* },
|
|
39
|
+
* message: null
|
|
40
|
+
* }
|
|
41
|
+
* ````
|
|
42
|
+
*/
|
|
23
43
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ContactType","exports","GroupType"],"sources":["types.ts"],"sourcesContent":["import {ISDKConnector} from '../SDKConnector/types';\nimport {ContactDetail} from '../common/types';\n\nexport enum ContactType {\n CUSTOM = 'CUSTOM',\n CLOUD = 'CLOUD',\n}\n\nexport type AddressType = {\n city?: string;\n country?: string;\n state?: string;\n street?: string;\n zipCode?: string;\n};\n\n/**\n * `Contact` object is used to represent a contact.\n */\nexport type Contact = {\n /**\n * This represents the complete address of the contact.\n */\n addressInfo?: AddressType;\n /**\n * This represents the URL of the avatar of the contact.\n */\n avatarURL?: string;\n /**\n * This represents the domain of the avatar of the contact.\n */\n avatarUrlDomain?: string;\n /**\n * This represents the company name of the contact.\n */\n companyName?: string;\n /**\n * Unique identifier of the contact.\n */\n contactId?: string;\n /**\n * Indicates the type of the contact, can be `CLOUD` or `CUSTOM`.\n */\n contactType: ContactType;\n /**\n * Department of the contact in the company if it's a corporate contact.\n */\n department?: string;\n /**\n * This represents the display name of the contact.\n */\n displayName?: string;\n /**\n * This represents the array of different email addresses of the contact.\n */\n emails?: ContactDetail[];\n /**\n * This is encrypted key url of the contact used for encryption.\n */\n encryptionKeyUrl: string;\n /**\n * This represents the first name of the contact.\n */\n firstName?: string;\n /**\n * Array of different groups and it's details available for the user\n */\n groups: string[];\n /**\n * The kms resource object url used to generate the encryption key.\n */\n kmsResourceObjectUrl?: string;\n /**\n * This represents the last name of the contact.\n */\n lastName?: string;\n /**\n * This represents the manager of the contact.\n */\n manager?: string;\n /**\n * Userd ID of the user who has the contact.\n */\n ownerId?: string;\n /**\n * This represents the array of different phone numbers of the contact.\n */\n phoneNumbers?: ContactDetail[];\n /**\n * Primary contact method as set by the contact.\n */\n primaryContactMethod?: string;\n /**\n * This represents the schema of the contact.\n */\n schemas?: string;\n /**\n * This represents the array of different sip addresses of the contact.\n */\n sipAddresses?: ContactDetail[];\n /**\n * This represents the job title of the contact.\n */\n title?: string;\n};\n\nexport enum GroupType {\n NORMAL = 'NORMAL',\n EXTERNAL = 'EXTERNAL',\n}\n\n/**\n * `ContactGroup` object is used to represent a contact group.\n */\nexport type ContactGroup = {\n /**\n * Name of the contact group.\n */\n displayName: string;\n /**\n * Encrypted key url used for encryption.\n */\n encryptionKeyUrl: string;\n /**\n * Unique identifier of the contact group.\n */\n groupId: string;\n /**\n * Type of the contact group, can be `NORMAL` or `EXTERNAL`.\n */\n groupType: GroupType;\n /**\n * String array containing details of the contacts in each group.\n */\n members?: string[];\n /**\n * User ID of the user who owns the contact group.\n */\n ownerId?: string;\n};\n\nexport type ContactList = {\n contacts: Contact[];\n groups: ContactGroup[];\n};\n\nexport type ContactResponse = {\n statusCode: number;\n data: {\n contacts?: Contact[];\n groups?: ContactGroup[];\n contact?: Contact;\n group?: ContactGroup;\n error?: string;\n };\n message: string | null;\n};\n\n/**\n * Interface for Contacts Module.\n * This encompasses a set of APIs that enable the fetching, creation, and updating of contacts and groups.\n * These APIs return promises that resolve to a `ContactResponse` object, which contains a status code, data, and message.\n * The data field within this response object holds the contacts and groups object.\n *\n * Example - ContactResponse\n *\n * ```json\n * {\n * statusCode: 200,\n * data: {\n * contacts: Contact[],\n * groups: ContactGroup[],\n * },\n * message: null\n * }\n * ````\n */\nexport interface IContacts {\n getSDKConnector: () => ISDKConnector;\n /**\n * This API is used to fetch the list of contacts and groups for a user.\n *\n * Example\n * ```javascript\n * const contactsResponse = await contactClient.getContacts();\n * ```\n *\n * The `ContactsResponse` object contains a comprehensive list of both contacts and groups for the user.\n * Each `Contact` object within this list is defined by the properties detailed in the {@link Contact}.\n * Each `ContactGroup` adheres to the properties specified in the {@link ContactGroup}.\n *\n */\n getContacts(): Promise<ContactResponse>;\n\n /**\n * This API is used to create a contact group with the given display name.\n *\n * Example\n * ```javascript\n * const contactGroup = await contactClient.createContactGroup(displayName, encryptionKeyUrl, groupType);\n * ```\n *\n * The `ContactGroup` object for the given display name will be created and returned as a response with the properties of {@link ContactGroup}.\n */\n createContactGroup(\n displayName: string,\n encryptionKeyUrl?: string,\n groupType?: GroupType\n ): Promise<ContactResponse>;\n\n /**\n * This API is used to delete a contact group whose groupId is received.\n *\n * Example\n * ```javascript\n * const response = await contactClient.deleteContactGroup(groupId);\n * ```\n *\n * The received response includes a status code and a message that reflect the success or failure of the API call\n */\n deleteContactGroup(groupId: string): Promise<ContactResponse>;\n\n /**\n * This API is responsible for creating a new contact.\n *\n * Example\n * ```javascript\n * const contact = await contactClient.createContact(contactInfo);\n * ```\n */\n createContact(contactInfo: Contact): Promise<ContactResponse>;\n\n /**\n * This API is responsible for deleting an existing contact for the given contactId.\n *\n * Example\n * ```javascript\n * const response = await contactClient.deleteContact(contactId);\n * ```\n *\n * The received response includes a status code and a message that reflect the success or failure of the API call\n */\n deleteContact(contactId: string): Promise<ContactResponse>;\n}\n\nexport type ContactIdContactInfo = {\n [Key: string]: Contact;\n};\n"],"mappings":";;;;;;;IAGYA,WAAW
|
|
1
|
+
{"version":3,"names":["ContactType","exports","GroupType"],"sources":["types.ts"],"sourcesContent":["import {ISDKConnector} from '../SDKConnector/types';\nimport {ContactDetail} from '../common/types';\n\nexport enum ContactType {\n CUSTOM = 'CUSTOM',\n CLOUD = 'CLOUD',\n}\n\nexport type AddressType = {\n city?: string;\n country?: string;\n state?: string;\n street?: string;\n zipCode?: string;\n};\n\n/**\n * `Contact` object is used to represent a contact.\n */\nexport type Contact = {\n /**\n * This represents the complete address of the contact.\n */\n addressInfo?: AddressType;\n /**\n * This represents the URL of the avatar of the contact.\n */\n avatarURL?: string;\n /**\n * This represents the domain of the avatar of the contact.\n */\n avatarUrlDomain?: string;\n /**\n * This represents the company name of the contact.\n */\n companyName?: string;\n /**\n * Unique identifier of the contact.\n */\n contactId?: string;\n /**\n * Indicates the type of the contact, can be `CLOUD` or `CUSTOM`.\n */\n contactType: ContactType;\n /**\n * Department of the contact in the company if it's a corporate contact.\n */\n department?: string;\n /**\n * This represents the display name of the contact.\n */\n displayName?: string;\n /**\n * This represents the array of different email addresses of the contact.\n */\n emails?: ContactDetail[];\n /**\n * This is encrypted key url of the contact used for encryption.\n */\n encryptionKeyUrl: string;\n /**\n * This represents the first name of the contact.\n */\n firstName?: string;\n /**\n * Array of different groups and it's details available for the user\n */\n groups: string[];\n /**\n * The kms resource object url used to generate the encryption key.\n */\n kmsResourceObjectUrl?: string;\n /**\n * This represents the last name of the contact.\n */\n lastName?: string;\n /**\n * This represents the manager of the contact.\n */\n manager?: string;\n /**\n * Userd ID of the user who has the contact.\n */\n ownerId?: string;\n /**\n * This represents the array of different phone numbers of the contact.\n */\n phoneNumbers?: ContactDetail[];\n /**\n * Primary contact method as set by the contact.\n */\n primaryContactMethod?: string;\n /**\n * This represents the schema of the contact.\n */\n schemas?: string;\n /**\n * This represents the array of different sip addresses of the contact.\n */\n sipAddresses?: ContactDetail[];\n /**\n * This represents the job title of the contact.\n */\n title?: string;\n};\n\nexport enum GroupType {\n NORMAL = 'NORMAL',\n EXTERNAL = 'EXTERNAL',\n}\n\n/**\n * `ContactGroup` object is used to represent a contact group.\n */\nexport type ContactGroup = {\n /**\n * Name of the contact group.\n */\n displayName: string;\n /**\n * Encrypted key url used for encryption.\n */\n encryptionKeyUrl: string;\n /**\n * Unique identifier of the contact group.\n */\n groupId: string;\n /**\n * Type of the contact group, can be `NORMAL` or `EXTERNAL`.\n */\n groupType: GroupType;\n /**\n * String array containing details of the contacts in each group.\n */\n members?: string[];\n /**\n * User ID of the user who owns the contact group.\n */\n ownerId?: string;\n};\n\nexport type ContactList = {\n contacts: Contact[];\n groups: ContactGroup[];\n};\n\nexport type ContactResponse = {\n statusCode: number;\n data: {\n contacts?: Contact[];\n groups?: ContactGroup[];\n contact?: Contact;\n group?: ContactGroup;\n error?: string;\n };\n message: string | null;\n};\n\n/**\n * Interface for Contacts Module.\n * This encompasses a set of APIs that enable the fetching, creation, and updating of contacts and groups.\n * These APIs return promises that resolve to a `ContactResponse` object, which contains a status code, data, and message.\n * The data field within this response object holds the contacts and groups object.\n *\n * Example - ContactResponse\n *\n * ```json\n * {\n * statusCode: 200,\n * data: {\n * contacts: Contact[],\n * groups: ContactGroup[],\n * },\n * message: null\n * }\n * ````\n */\nexport interface IContacts {\n getSDKConnector: () => ISDKConnector;\n /**\n * This API is used to fetch the list of contacts and groups for a user.\n *\n * Example\n * ```javascript\n * const contactsResponse = await contactClient.getContacts();\n * ```\n *\n * The `ContactsResponse` object contains a comprehensive list of both contacts and groups for the user.\n * Each `Contact` object within this list is defined by the properties detailed in the {@link Contact}.\n * Each `ContactGroup` adheres to the properties specified in the {@link ContactGroup}.\n *\n */\n getContacts(): Promise<ContactResponse>;\n\n /**\n * This API is used to create a contact group with the given display name.\n *\n * Example\n * ```javascript\n * const contactGroup = await contactClient.createContactGroup(displayName, encryptionKeyUrl, groupType);\n * ```\n *\n * The `ContactGroup` object for the given display name will be created and returned as a response with the properties of {@link ContactGroup}.\n */\n createContactGroup(\n displayName: string,\n encryptionKeyUrl?: string,\n groupType?: GroupType\n ): Promise<ContactResponse>;\n\n /**\n * This API is used to delete a contact group whose groupId is received.\n *\n * Example\n * ```javascript\n * const response = await contactClient.deleteContactGroup(groupId);\n * ```\n *\n * The received response includes a status code and a message that reflect the success or failure of the API call\n */\n deleteContactGroup(groupId: string): Promise<ContactResponse>;\n\n /**\n * This API is responsible for creating a new contact.\n *\n * Example\n * ```javascript\n * const contact = await contactClient.createContact(contactInfo);\n * ```\n */\n createContact(contactInfo: Contact): Promise<ContactResponse>;\n\n /**\n * This API is responsible for deleting an existing contact for the given contactId.\n *\n * Example\n * ```javascript\n * const response = await contactClient.deleteContact(contactId);\n * ```\n *\n * The received response includes a status code and a message that reflect the success or failure of the API call\n */\n deleteContact(contactId: string): Promise<ContactResponse>;\n}\n\nexport type ContactIdContactInfo = {\n [Key: string]: Contact;\n};\n"],"mappings":";;;;;;;IAGYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAavB;AACA;AACA;AAFA,IA0FYE,SAAS,GAAAD,OAAA,CAAAC,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAKrB;AACA;AACA;AA6CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
|
@@ -16,11 +16,11 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
|
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
17
17
|
var _ExtendedError2 = _interopRequireDefault(require("./ExtendedError"));
|
|
18
18
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
19
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
19
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable valid-jsdoc */
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var CallError = /*#__PURE__*/function (_ExtendedError) {
|
|
23
|
+
var CallError = exports.CallError = /*#__PURE__*/function (_ExtendedError) {
|
|
24
24
|
(0, _inherits2.default)(CallError, _ExtendedError);
|
|
25
25
|
var _super = _createSuper(CallError);
|
|
26
26
|
/**
|
|
@@ -86,9 +86,7 @@ var CallError = /*#__PURE__*/function (_ExtendedError) {
|
|
|
86
86
|
* @param errorLayer - Call control or media layer.
|
|
87
87
|
* @returns CallingClientError instance.
|
|
88
88
|
*/
|
|
89
|
-
exports.
|
|
90
|
-
var createCallError = function createCallError(msg, context, type, correlationId, errorLayer) {
|
|
89
|
+
var createCallError = exports.createCallError = function createCallError(msg, context, type, correlationId, errorLayer) {
|
|
91
90
|
return new CallError(msg, context, type, correlationId, errorLayer);
|
|
92
91
|
};
|
|
93
|
-
exports.createCallError = createCallError;
|
|
94
92
|
//# sourceMappingURL=CallError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ExtendedError2","_interopRequireDefault","require","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","CallError","_ExtendedError","_inherits2","_super","msg","context","type","correlationId","errorLayer","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","_createClass2","key","value","setCallError","error","message","getCallError","ExtendedError","
|
|
1
|
+
{"version":3,"names":["_ExtendedError2","_interopRequireDefault","require","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","CallError","exports","_ExtendedError","_inherits2","_super","msg","context","type","correlationId","errorLayer","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","_createClass2","key","value","setCallError","error","message","getCallError","ExtendedError","createCallError"],"sources":["CallError.ts"],"sourcesContent":["/* eslint-disable valid-jsdoc */\nimport {CallErrorObject, ErrorContext, ErrorMessage, ERROR_LAYER, ERROR_TYPE} from '../types';\nimport ExtendedError from './ExtendedError';\nimport {CorrelationId} from '../../common/types';\n\n/**\n *\n */\nexport class CallError extends ExtendedError {\n private correlationId: CorrelationId;\n\n private errorLayer: ERROR_LAYER;\n\n /**\n * Instantiate the Error class with these parameters.\n *\n * @param msg - Custom error message.\n * @param context - Error context.\n * @param type - Error Type.\n * @param correlationId - Unique identifier for a call.\n * @param errorLayer - Call control or media layer.\n */\n constructor(\n msg: ErrorMessage,\n context: ErrorContext,\n type: ERROR_TYPE,\n correlationId: CorrelationId,\n errorLayer: ERROR_LAYER\n ) {\n super(msg, context, type);\n this.correlationId = correlationId;\n this.errorLayer = errorLayer;\n }\n\n /**\n * Class method exposed to callers to allow storing of error object.\n *\n * @param error - Error Object.\n */\n public setCallError(error: CallErrorObject) {\n this.message = error.message;\n this.correlationId = error.correlationId;\n this.context = error.context;\n this.type = error.type;\n }\n\n /**\n * Class method exposed to callers to retrieve error object.\n *\n * @returns Error.\n */\n public getCallError(): CallErrorObject {\n return <CallErrorObject>{\n message: this.message,\n context: this.context,\n type: this.type,\n correlationId: this.correlationId,\n errorLayer: this.errorLayer,\n };\n }\n}\n\n/**\n * Instantiate CallingClientError.\n *\n * @param msg - Custom error message.\n * @param context - Error context.\n * @param type - Error Type.\n * @param correlationId - Unique identifier for a call.\n * @param errorLayer - Call control or media layer.\n * @returns CallingClientError instance.\n */\nexport const createCallError = (\n msg: ErrorMessage,\n context: ErrorContext,\n type: ERROR_TYPE,\n correlationId: CorrelationId,\n errorLayer: ERROR_LAYER\n) => new CallError(msg, context, type, correlationId, errorLayer);\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4C,SAAAC,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAY,OAAA,qBAAAJ,kBAAA,oBAAAA,kBAAA,CAAAK,IAA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IAAAQ,GAAA;IAAAC,KAAA,EAKA,SAAAI,aAAA,EAAuC;MACrC,OAAwB;QACtBD,OAAO,EAAE,IAAI,CAACA,OAAO;QACrBb,OAAO,EAAE,IAAI,CAACA,OAAO;QACrBC,IAAI,EAAE,IAAI,CAACA,IAAI;QACfC,aAAa,EAAE,IAAI,CAACA,aAAa;QACjCC,UAAU,EAAE,IAAI,CAACA;MACnB,CAAC;IACH;EAAC;EAAA,OAAAT,SAAA;AAAA,EAnD4BqB,uBAAa;AAsD5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMC,eAAe,GAAArB,OAAA,CAAAqB,eAAA,GAAG,SAAlBA,eAAeA,CAC1BjB,GAAiB,EACjBC,OAAqB,EACrBC,IAAgB,EAChBC,aAA4B,EAC5BC,UAAuB;EAAA,OACpB,IAAIT,SAAS,CAACK,GAAG,EAAEC,OAAO,EAAEC,IAAI,EAAEC,aAAa,EAAEC,UAAU,CAAC;AAAA"}
|
|
@@ -17,11 +17,11 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
|
|
|
17
17
|
var _types = require("../../common/types");
|
|
18
18
|
var _ExtendedError2 = _interopRequireDefault(require("./ExtendedError"));
|
|
19
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
20
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable valid-jsdoc */
|
|
21
21
|
/**
|
|
22
22
|
* Any error reported from Calling client should be stored here.
|
|
23
23
|
*/
|
|
24
|
-
var CallingClientError = /*#__PURE__*/function (_ExtendedError) {
|
|
24
|
+
var CallingClientError = exports.CallingClientError = /*#__PURE__*/function (_ExtendedError) {
|
|
25
25
|
(0, _inherits2.default)(CallingClientError, _ExtendedError);
|
|
26
26
|
var _super = _createSuper(CallingClientError);
|
|
27
27
|
/**
|
|
@@ -36,7 +36,7 @@ var CallingClientError = /*#__PURE__*/function (_ExtendedError) {
|
|
|
36
36
|
var _this;
|
|
37
37
|
(0, _classCallCheck2.default)(this, CallingClientError);
|
|
38
38
|
_this = _super.call(this, msg, context, type);
|
|
39
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "status", _types.
|
|
39
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "status", _types.RegistrationStatus.INACTIVE);
|
|
40
40
|
_this.status = status;
|
|
41
41
|
return _this;
|
|
42
42
|
}
|
|
@@ -80,9 +80,7 @@ var CallingClientError = /*#__PURE__*/function (_ExtendedError) {
|
|
|
80
80
|
* @param status - Mobius Status, should be default.
|
|
81
81
|
* @returns CallingClientError instance.
|
|
82
82
|
*/
|
|
83
|
-
exports.
|
|
84
|
-
var createClientError = function createClientError(msg, context, type, status) {
|
|
83
|
+
var createClientError = exports.createClientError = function createClientError(msg, context, type, status) {
|
|
85
84
|
return new CallingClientError(msg, context, type, status);
|
|
86
85
|
};
|
|
87
|
-
exports.createClientError = createClientError;
|
|
88
86
|
//# sourceMappingURL=CallingDeviceError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_types","require","_ExtendedError2","_interopRequireDefault","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","CallingClientError","_ExtendedError","_inherits2","_super","msg","context","type","status","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","
|
|
1
|
+
{"version":3,"names":["_types","require","_ExtendedError2","_interopRequireDefault","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","CallingClientError","exports","_ExtendedError","_inherits2","_super","msg","context","type","status","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","RegistrationStatus","INACTIVE","_createClass2","key","value","setError","error","message","getError","ExtendedError","createClientError"],"sources":["CallingDeviceError.ts"],"sourcesContent":["/* eslint-disable valid-jsdoc */\nimport {RegistrationStatus} from '../../common/types';\n\nimport {ErrorContext, ErrorMessage, ErrorObject, ERROR_TYPE} from '../types';\nimport ExtendedError from './ExtendedError';\n\n/**\n * Any error reported from Calling client should be stored here.\n */\nexport class CallingClientError extends ExtendedError {\n public status: RegistrationStatus = RegistrationStatus.INACTIVE;\n\n /**\n * Instantiate the Error class with these parameters.\n *\n * @param msg - Custom error message.\n * @param context - Error context.\n * @param type - Error Type.\n * @param status - Mobius Status, should be default.\n */\n constructor(\n msg: ErrorMessage,\n context: ErrorContext,\n type: ERROR_TYPE,\n status: RegistrationStatus\n ) {\n super(msg, context, type);\n this.status = status;\n }\n\n /**\n * Class method exposed to callers to allow storing of error object.\n *\n * @param error - Error Object.\n */\n public setError(error: ErrorObject) {\n this.message = error.message;\n this.context = error.context;\n this.type = error.type;\n }\n\n /**\n * Class method exposed to callers to retrieve error object.\n *\n * @returns Error.\n */\n public getError(): ErrorObject {\n return <ErrorObject>{message: this.message, context: this.context, type: this.type};\n }\n}\n\n/**\n * Instantiate CallingClientError.\n *\n * @param msg - Custom error message.\n * @param context - Error context.\n * @param type - Error Type.\n * @param status - Mobius Status, should be default.\n * @returns CallingClientError instance.\n */\nexport const createClientError = (\n msg: ErrorMessage,\n context: ErrorContext,\n type: ERROR_TYPE,\n status: RegistrationStatus\n) => new CallingClientError(msg, context, type, status);\n"],"mappings":";;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA4C,SAAAG,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAY,OAAA,qBAAAJ,kBAAA,oBAAAA,kBAAA,CAAAK,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,kBAAA,CAAAO,OAAA,8CAAAI,CAAA,sBAJ5C;AAMA;AACA;AACA;AAFA,IAGaC,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAAE,cAAA;EAAA,IAAAC,UAAA,CAAAnB,OAAA,EAAAgB,kBAAA,EAAAE,cAAA;EAAA,IAAAE,MAAA,GAAA3B,YAAA,CAAAuB,kBAAA;EAG7B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,SAAAA,mBACEK,GAAiB,EACjBC,OAAqB,EACrBC,IAAgB,EAChBC,MAA0B,EAC1B;IAAA,IAAAC,KAAA;IAAA,IAAA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perty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
18
18
|
var _types = require("../types");
|
|
19
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
20
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable valid-jsdoc */
|
|
21
21
|
/**
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
|
-
var ExtendedError = /*#__PURE__*/function (_Error) {
|
|
24
|
+
var ExtendedError = exports.default = /*#__PURE__*/function (_Error) {
|
|
25
25
|
(0, _inherits2.default)(ExtendedError, _Error);
|
|
26
26
|
var _super = _createSuper(ExtendedError);
|
|
27
27
|
/**
|
|
@@ -41,5 +41,4 @@ var ExtendedError = /*#__PURE__*/function (_Error) {
|
|
|
41
41
|
}
|
|
42
42
|
return (0, _createClass2.default)(ExtendedError);
|
|
43
43
|
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
44
|
-
exports.default = ExtendedError;
|
|
45
44
|
//# sourceMappingURL=ExtendedError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_types","require","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","ExtendedError","_Error","_inherits2","_super","msg","context","type","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","ERROR_TYPE","DEFAULT","_createClass2","_wrapNativeSuper2","Error"
|
|
1
|
+
{"version":3,"names":["_types","require","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","ExtendedError","exports","_Error","_inherits2","_super","msg","context","type","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","ERROR_TYPE","DEFAULT","_createClass2","_wrapNativeSuper2","Error"],"sources":["ExtendedError.ts"],"sourcesContent":["/* eslint-disable valid-jsdoc */\nimport {ErrorContext, ErrorMessage, ERROR_TYPE} from '../types';\n\n/**\n *\n */\nexport default class ExtendedError extends Error {\n public type: ERROR_TYPE;\n\n public context: ErrorContext;\n\n /**\n * @param msg - TODO.\n * @param context - TODO.\n * @param type - TODO.\n */\n constructor(msg: ErrorMessage, context: ErrorContext, type: ERROR_TYPE) {\n super(msg);\n this.type = type || ERROR_TYPE.DEFAULT;\n this.context = context;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAAgE,SAAAC,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAY,OAAA,qBAAAJ,kBAAA,oBAAAA,kBAAA,CAAAK,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,kBAAA,CAAAO,OAAA,8CAAAI,CAAA,sBADhE;AAGA;AACA;AACA;AAFA,IAGqBC,aAAa,GAAAC,OAAA,CAAAjB,OAAA,0BAAAkB,MAAA;EAAA,IAAAC,UAAA,CAAAnB,OAAA,EAAAgB,aAAA,EAAAE,MAAA;EAAA,IAAAE,MAAA,GAAA3B,YAAA,CAAAuB,aAAA;EAKhC;AACF;AACA;AACA;AACA;EACE,SAAAA,cAAYK,GAAiB,EAAEC,OAAqB,EAAEC,IAAgB,EAAE;IAAA,IAAAC,KAAA;IAAA,IAAAC,gBAAA,CAAAzB,OAAA,QAAAgB,aAAA;IACtEQ,KAAA,GAAAJ,MAAA,CAAAN,IAAA,OAAMO,GAAG;IAAE,IAAAK,gBAAA,CAAA1B,OAAA,MAAA2B,uBAAA,CAAA3B,OAAA,EAAAwB,KAAA;IAAA,IAAAE,gBAAA,CAAA1B,OAAA,MAAA2B,uBAAA,CAAA3B,OAAA,EAAAwB,KAAA;IACXA,KAAA,CAAKD,IAAI,GAAGA,IAAI,IAAIK,iBAAU,CAACC,OAAO;IACtCL,KAAA,CAAKF,OAAO,GAAGA,OAAO;IAAC,OAAAE,KAAA;EACzB;EAAC,WAAAM,aAAA,CAAA9B,OAAA,EAAAgB,aAAA;AAAA,oBAAAe,iBAAA,CAAA/B,OAAA,EAdwCgC,KAAK"}
|
|
@@ -14,14 +14,14 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/
|
|
|
14
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
15
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
17
|
-
var _types = require("../../
|
|
17
|
+
var _types = require("../../common/types");
|
|
18
18
|
var _ExtendedError2 = _interopRequireDefault(require("./ExtendedError"));
|
|
19
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
20
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable valid-jsdoc */
|
|
21
21
|
/**
|
|
22
22
|
* Any error reported from Line class should be stored here.
|
|
23
23
|
*/
|
|
24
|
-
var LineError = /*#__PURE__*/function (_ExtendedError) {
|
|
24
|
+
var LineError = exports.LineError = /*#__PURE__*/function (_ExtendedError) {
|
|
25
25
|
(0, _inherits2.default)(LineError, _ExtendedError);
|
|
26
26
|
var _super = _createSuper(LineError);
|
|
27
27
|
/**
|
|
@@ -36,7 +36,7 @@ var LineError = /*#__PURE__*/function (_ExtendedError) {
|
|
|
36
36
|
var _this;
|
|
37
37
|
(0, _classCallCheck2.default)(this, LineError);
|
|
38
38
|
_this = _super.call(this, msg, context, type);
|
|
39
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "status", _types.
|
|
39
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "status", _types.RegistrationStatus.INACTIVE);
|
|
40
40
|
_this.status = status;
|
|
41
41
|
return _this;
|
|
42
42
|
}
|
|
@@ -82,9 +82,7 @@ var LineError = /*#__PURE__*/function (_ExtendedError) {
|
|
|
82
82
|
* @param status - Line Status, should be inactive.
|
|
83
83
|
* @returns LineError instance.
|
|
84
84
|
*/
|
|
85
|
-
exports.
|
|
86
|
-
var createLineError = function createLineError(msg, context, type, status) {
|
|
85
|
+
var createLineError = exports.createLineError = function createLineError(msg, context, type, status) {
|
|
87
86
|
return new LineError(msg, context, type, status);
|
|
88
87
|
};
|
|
89
|
-
exports.createLineError = createLineError;
|
|
90
88
|
//# sourceMappingURL=LineError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_types","require","_ExtendedError2","_interopRequireDefault","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","LineError","_ExtendedError","_inherits2","_super","msg","context","type","status","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","
|
|
1
|
+
{"version":3,"names":["_types","require","_ExtendedError2","_interopRequireDefault","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","LineError","exports","_ExtendedError","_inherits2","_super","msg","context","type","status","_this","_classCallCheck2","_defineProperty2","_assertThisInitialized2","RegistrationStatus","INACTIVE","_createClass2","key","value","setError","error","message","getError","ExtendedError","createLineError"],"sources":["LineError.ts"],"sourcesContent":["/* eslint-disable valid-jsdoc */\nimport {RegistrationStatus} from '../../common/types';\nimport {ErrorMessage, ERROR_TYPE, LineErrorObject, ErrorContext} from '../types';\nimport ExtendedError from './ExtendedError';\n\n/**\n * Any error reported from Line class should be stored here.\n */\nexport class LineError extends ExtendedError {\n public status: RegistrationStatus = RegistrationStatus.INACTIVE;\n\n /**\n * Instantiate the Error class with these parameters.\n *\n * @param msg - Custom error message.\n * @param context - Error context.\n * @param type - Error Type.\n * @param status - Line Status, should be inactive.\n */\n constructor(\n msg: ErrorMessage,\n context: ErrorContext,\n type: ERROR_TYPE,\n status: RegistrationStatus\n ) {\n super(msg, context, type);\n this.status = status;\n }\n\n /**\n * Class method exposed to allow storing of error object.\n *\n * @param error - Error Object.\n */\n public setError(error: LineErrorObject) {\n this.message = error.message;\n this.context = error.context;\n this.type = error.type;\n this.status = error.status;\n }\n\n /**\n * Class method exposed to retrieve error object.\n *\n * @returns Error.\n */\n public getError(): LineErrorObject {\n return <LineErrorObject>{\n message: this.message,\n context: this.context,\n type: this.type,\n status: this.status,\n };\n }\n}\n\n/**\n * Instantiate LineError.\n *\n * @param msg - Custom error message.\n * @param context - Error context.\n * @param type - Error Type.\n * @param status - Line Status, should be inactive.\n * @returns LineError instance.\n */\nexport const createLineError = (\n msg: ErrorMessage,\n context: ErrorContext,\n type: ERROR_TYPE,\n status: RegistrationStatus\n) => new LineError(msg, context, type, status);\n"],"mappings":";;;;;;;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA4C,SAAAG,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,E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,CAACC,MAAM,GAAGW,KAAK,CAACX,MAAM;IAC5B;;IAEA;AACF;AACA;AACA;AACA;EAJE;IAAAQ,GAAA;IAAAC,KAAA,EAKA,SAAAI,SAAA,EAAmC;MACjC,OAAwB;QACtBD,OAAO,EAAE,IAAI,CAACA,OAAO;QACrBd,OAAO,EAAE,IAAI,CAACA,OAAO;QACrBC,IAAI,EAAE,IAAI,CAACA,IAAI;QACfC,MAAM,EAAE,IAAI,CAACA;MACf,CAAC;IACH;EAAC;EAAA,OAAAR,SAAA;AAAA,EA7C4BsB,uBAAa;AAgD5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMC,eAAe,GAAAtB,OAAA,CAAAsB,eAAA,GAAG,SAAlBA,eAAeA,CAC1BlB,GAAiB,EACjBC,OAAqB,EACrBC,IAAgB,EAChBC,MAA0B;EAAA,OACvB,IAAIR,SAAS,CAACK,GAAG,EAAEC,OAAO,EAAEC,IAAI,EAAEC,MAAM,CAAC;AAAA"}
|
package/dist/Errors/index.js
CHANGED
|
@@ -16,6 +16,13 @@ _Object$defineProperty(exports, "CallingClientError", {
|
|
|
16
16
|
return _CallingDeviceError.CallingClientError;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
+
_Object$defineProperty(exports, "LineError", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return _LineError.LineError;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
19
25
|
var _CallingDeviceError = require("./catalog/CallingDeviceError");
|
|
20
26
|
var _CallError = require("./catalog/CallError");
|
|
27
|
+
var _LineError = require("./catalog/LineError");
|
|
21
28
|
//# sourceMappingURL=index.js.map
|
package/dist/Errors/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_CallingDeviceError","require","_CallError"],"sources":["index.ts"],"sourcesContent":["export {CallingClientError} from './catalog/CallingDeviceError';\nexport {CallError} from './catalog/CallError';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_CallingDeviceError","require","_CallError","_LineError"],"sources":["index.ts"],"sourcesContent":["export {CallingClientError} from './catalog/CallingDeviceError';\nexport {CallError} from './catalog/CallError';\nexport {LineError} from './catalog/LineError';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA"}
|
package/dist/Errors/types.js
CHANGED
|
@@ -6,15 +6,12 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.ERROR_TYPE = exports.ERROR_LAYER = exports.ERROR_CODE = exports.DEVICE_ERROR_CODE = exports.CALL_ERROR_CODE = void 0;
|
|
8
8
|
/* eslint-disable @typescript-eslint/no-empty-interface */
|
|
9
|
-
var ERROR_LAYER
|
|
10
|
-
exports.ERROR_LAYER = ERROR_LAYER;
|
|
11
|
-
(function (ERROR_LAYER) {
|
|
9
|
+
var ERROR_LAYER = exports.ERROR_LAYER = /*#__PURE__*/function (ERROR_LAYER) {
|
|
12
10
|
ERROR_LAYER["CALL_CONTROL"] = "call_control";
|
|
13
11
|
ERROR_LAYER["MEDIA"] = "media";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
exports.ERROR_TYPE = ERROR_TYPE
|
|
17
|
-
(function (ERROR_TYPE) {
|
|
12
|
+
return ERROR_LAYER;
|
|
13
|
+
}({});
|
|
14
|
+
var ERROR_TYPE = exports.ERROR_TYPE = /*#__PURE__*/function (ERROR_TYPE) {
|
|
18
15
|
ERROR_TYPE["CALL_ERROR"] = "call_error";
|
|
19
16
|
ERROR_TYPE["DEFAULT"] = "default_error";
|
|
20
17
|
ERROR_TYPE["FORBIDDEN_ERROR"] = "forbidden";
|
|
@@ -24,10 +21,9 @@ exports.ERROR_TYPE = ERROR_TYPE;
|
|
|
24
21
|
ERROR_TYPE["TIMEOUT"] = "timeout";
|
|
25
22
|
ERROR_TYPE["TOKEN_ERROR"] = "token_error";
|
|
26
23
|
ERROR_TYPE["SERVER_ERROR"] = "server_error";
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
exports.ERROR_CODE = ERROR_CODE
|
|
30
|
-
(function (ERROR_CODE) {
|
|
24
|
+
return ERROR_TYPE;
|
|
25
|
+
}({});
|
|
26
|
+
var ERROR_CODE = exports.ERROR_CODE = /*#__PURE__*/function (ERROR_CODE) {
|
|
31
27
|
ERROR_CODE[ERROR_CODE["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
|
|
32
28
|
ERROR_CODE[ERROR_CODE["FORBIDDEN"] = 403] = "FORBIDDEN";
|
|
33
29
|
ERROR_CODE[ERROR_CODE["DEVICE_NOT_FOUND"] = 404] = "DEVICE_NOT_FOUND";
|
|
@@ -37,10 +33,9 @@ exports.ERROR_CODE = ERROR_CODE;
|
|
|
37
33
|
ERROR_CODE[ERROR_CODE["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
|
38
34
|
ERROR_CODE[ERROR_CODE["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
|
|
39
35
|
ERROR_CODE[ERROR_CODE["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
exports.CALL_ERROR_CODE = CALL_ERROR_CODE
|
|
43
|
-
(function (CALL_ERROR_CODE) {
|
|
36
|
+
return ERROR_CODE;
|
|
37
|
+
}({});
|
|
38
|
+
var CALL_ERROR_CODE = exports.CALL_ERROR_CODE = /*#__PURE__*/function (CALL_ERROR_CODE) {
|
|
44
39
|
CALL_ERROR_CODE[CALL_ERROR_CODE["INVALID_STATUS_UPDATE"] = 111] = "INVALID_STATUS_UPDATE";
|
|
45
40
|
CALL_ERROR_CODE[CALL_ERROR_CODE["DEVICE_NOT_REGISTERED"] = 112] = "DEVICE_NOT_REGISTERED";
|
|
46
41
|
CALL_ERROR_CODE[CALL_ERROR_CODE["CALL_NOT_FOUND"] = 113] = "CALL_NOT_FOUND";
|
|
@@ -51,12 +46,12 @@ exports.CALL_ERROR_CODE = CALL_ERROR_CODE;
|
|
|
51
46
|
CALL_ERROR_CODE[CALL_ERROR_CODE["NOT_ACCEPTABLE"] = 118] = "NOT_ACCEPTABLE";
|
|
52
47
|
CALL_ERROR_CODE[CALL_ERROR_CODE["CALL_REJECTED"] = 119] = "CALL_REJECTED";
|
|
53
48
|
CALL_ERROR_CODE[CALL_ERROR_CODE["NOT_AVAILABLE"] = 120] = "NOT_AVAILABLE";
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
exports.DEVICE_ERROR_CODE = DEVICE_ERROR_CODE
|
|
57
|
-
(function (DEVICE_ERROR_CODE) {
|
|
49
|
+
return CALL_ERROR_CODE;
|
|
50
|
+
}({});
|
|
51
|
+
var DEVICE_ERROR_CODE = exports.DEVICE_ERROR_CODE = /*#__PURE__*/function (DEVICE_ERROR_CODE) {
|
|
58
52
|
DEVICE_ERROR_CODE[DEVICE_ERROR_CODE["DEVICE_LIMIT_EXCEEDED"] = 101] = "DEVICE_LIMIT_EXCEEDED";
|
|
59
53
|
DEVICE_ERROR_CODE[DEVICE_ERROR_CODE["DEVICE_CREATION_DISABLED"] = 102] = "DEVICE_CREATION_DISABLED";
|
|
60
54
|
DEVICE_ERROR_CODE[DEVICE_ERROR_CODE["DEVICE_CREATION_FAILED"] = 103] = "DEVICE_CREATION_FAILED";
|
|
61
|
-
|
|
55
|
+
return DEVICE_ERROR_CODE;
|
|
56
|
+
}({});
|
|
62
57
|
//# sourceMappingURL=types.js.map
|
package/dist/Errors/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ERROR_LAYER","exports","ERROR_TYPE","ERROR_CODE","CALL_ERROR_CODE","DEVICE_ERROR_CODE"],"sources":["types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport {
|
|
1
|
+
{"version":3,"names":["ERROR_LAYER","exports","ERROR_TYPE","ERROR_CODE","CALL_ERROR_CODE","DEVICE_ERROR_CODE"],"sources":["types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport {CorrelationId, IMetaContext, RegistrationStatus} from '../common/types';\n\nexport type ErrorMessage = string;\n\nexport enum ERROR_LAYER {\n CALL_CONTROL = 'call_control',\n MEDIA = 'media',\n}\n\nexport enum ERROR_TYPE {\n CALL_ERROR = 'call_error',\n DEFAULT = 'default_error',\n FORBIDDEN_ERROR = 'forbidden',\n NOT_FOUND = 'not_found',\n REGISTRATION_ERROR = 'registration_error',\n SERVICE_UNAVAILABLE = 'service_unavailable',\n TIMEOUT = 'timeout',\n TOKEN_ERROR = 'token_error',\n SERVER_ERROR = 'server_error',\n}\n\nexport enum ERROR_CODE {\n UNAUTHORIZED = 401,\n FORBIDDEN = 403,\n DEVICE_NOT_FOUND = 404,\n INTERNAL_SERVER_ERROR = 500,\n NOT_IMPLEMENTED = 501,\n SERVICE_UNAVAILABLE = 503,\n BAD_REQUEST = 400,\n REQUEST_TIMEOUT = 408,\n TOO_MANY_REQUESTS = 429,\n}\n\nexport enum CALL_ERROR_CODE {\n INVALID_STATUS_UPDATE = 111,\n DEVICE_NOT_REGISTERED = 112,\n CALL_NOT_FOUND = 113,\n ERROR_PROCESSING = 114,\n USER_BUSY = 115,\n PARSING_ERROR = 116,\n TIMEOUT_ERROR = 117,\n NOT_ACCEPTABLE = 118,\n CALL_REJECTED = 119,\n NOT_AVAILABLE = 120,\n}\n\nexport enum DEVICE_ERROR_CODE {\n DEVICE_LIMIT_EXCEEDED = 101,\n DEVICE_CREATION_DISABLED = 102,\n DEVICE_CREATION_FAILED = 103,\n}\n\nexport interface ErrorContext extends IMetaContext {}\n\nexport type ErrorObject = {\n message: ErrorMessage;\n type: ERROR_TYPE;\n context: ErrorContext;\n};\n\nexport interface LineErrorObject extends ErrorObject {\n status: RegistrationStatus;\n}\n\nexport interface CallErrorObject extends ErrorObject {\n correlationId: CorrelationId;\n errorLayer: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
|
@@ -17,11 +17,11 @@ var _events = _interopRequireDefault(require("events"));
|
|
|
17
17
|
var _Logger = _interopRequireDefault(require("../../Logger"));
|
|
18
18
|
var _types = require("../../Logger/types");
|
|
19
19
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
20
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
20
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable valid-jsdoc */ /* eslint-disable @typescript-eslint/no-shadow */ // eslint-disable-line import/no-extraneous-dependencies
|
|
21
21
|
/**
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
|
-
var Eventing = /*#__PURE__*/function (_ref) {
|
|
24
|
+
var Eventing = exports.Eventing = /*#__PURE__*/function (_ref) {
|
|
25
25
|
(0, _inherits2.default)(Eventing, _ref);
|
|
26
26
|
var _super = _createSuper(Eventing);
|
|
27
27
|
function Eventing() {
|
|
@@ -78,5 +78,4 @@ var Eventing = /*#__PURE__*/function (_ref) {
|
|
|
78
78
|
}]);
|
|
79
79
|
return Eventing;
|
|
80
80
|
}(_events.default);
|
|
81
|
-
exports.Eventing = Eventing;
|
|
82
81
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_events","_interopRequireDefault","require","_Logger","_types","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","Eventing","_ref","_inherits2","_super","_classCallCheck2","_createClass2","key","value","emit","event","_get2","timestamp","Date","toUTCString","_len","length","args","Array","_key","Logger","log","concat","LOG_PREFIX","EVENT","toString","file","method","_get3","on","listener","off","EventEmitter"
|
|
1
|
+
{"version":3,"names":["_events","_interopRequireDefault","require","_Logger","_types","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","Eventing","exports","_ref","_inherits2","_super","_classCallCheck2","_createClass2","key","value","emit","event","_get2","timestamp","Date","toUTCString","_len","length","args","Array","_key","Logger","log","concat","LOG_PREFIX","EVENT","toString","file","method","_get3","on","listener","off","EventEmitter"],"sources":["index.ts"],"sourcesContent":["/* eslint-disable valid-jsdoc */\n/* eslint-disable @typescript-eslint/no-shadow */\nimport EventEmitter from 'events';\nimport TypedEmitter, {EventMap} from 'typed-emitter'; // eslint-disable-line import/no-extraneous-dependencies\nimport Logger from '../../Logger';\nimport {LOG_PREFIX} from '../../Logger/types';\n\n/**\n *\n */\nexport class Eventing<T extends EventMap> extends (EventEmitter as {\n new <T extends EventMap>(): TypedEmitter<T>;\n})<T> {\n /**\n * @event\n *\n * @param event - Event that is going ot be emitted.\n * @param args - Parameters that are emitted with the event.\n */\n emit<E extends keyof T>(event: E, ...args: Parameters<T[E]>): boolean {\n const timestamp = new Date().toUTCString();\n\n Logger.log(\n `${timestamp} ${\n LOG_PREFIX.EVENT\n }: ${event.toString()} - event emitted with parameters -> ${args} = `,\n {\n file: 'Events/impl/index.ts',\n method: 'emit',\n }\n );\n\n return super.emit(event, ...args);\n }\n\n /**\n * .\n * @event\n *\n * @param event - Event to listen to.\n * @param listener - Callback for event.\n */\n on<E extends keyof T>(event: E, listener: T[E]): this {\n return super.on(event, listener);\n }\n\n /**\n * .\n * @event\n *\n * @param event - Event to remove listener on.\n * @param listener - Callback for event.\n */\n off<E extends keyof T>(event: E, listener: T[E]): this {\n return super.off(event, listener);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAEA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAA8C,SAAAG,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAY,OAAA,qBAAAJ,kBAAA,oBAAAA,kBAAA,CAAAK,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,kBAAA,CAAAO,OAAA,8CAAAI,CAAA,sBAL9C,iCACA,kDAEsD;AAItD;AACA;AACA;AAFA,IAGaC,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0BAAAE,IAAA;EAAA,IAAAC,UAAA,CAAAnB,OAAA,EAAAgB,QAAA,EAAAE,IAAA;EAAA,IAAAE,MAAA,GAAA3B,YAAA,CAAAuB,QAAA;EAAA,SAAAA,SAAA;IAAA,IAAAK,gBAAA,CA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