@webex/calling 0.0.1-next.0
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/README.md +67 -0
- package/dist/module/CallHistory/CallHistory.js +84 -0
- package/dist/module/CallHistory/callHistoryFixtures.js +307 -0
- package/dist/module/CallHistory/constants.js +9 -0
- package/dist/module/CallHistory/types.js +1 -0
- package/dist/module/CallSettings/CallSettings.js +65 -0
- package/dist/module/CallSettings/UcmBackendConnector.js +100 -0
- package/dist/module/CallSettings/WxCallBackendConnector.js +287 -0
- package/dist/module/CallSettings/constants.js +11 -0
- package/dist/module/CallSettings/testFixtures.js +62 -0
- package/dist/module/CallSettings/types.js +1 -0
- package/dist/module/CallingClient/CallingClient.js +268 -0
- package/dist/module/CallingClient/callRecordFixtures.js +93 -0
- package/dist/module/CallingClient/calling/CallerId/index.js +169 -0
- package/dist/module/CallingClient/calling/CallerId/types.js +1 -0
- package/dist/module/CallingClient/calling/call.js +1649 -0
- package/dist/module/CallingClient/calling/callManager.js +274 -0
- package/dist/module/CallingClient/calling/index.js +2 -0
- package/dist/module/CallingClient/calling/types.js +53 -0
- package/dist/module/CallingClient/callingClientFixtures.js +38 -0
- package/dist/module/CallingClient/constants.js +122 -0
- package/dist/module/CallingClient/line/index.js +110 -0
- package/dist/module/CallingClient/line/types.js +14 -0
- package/dist/module/CallingClient/registration/index.js +1 -0
- package/dist/module/CallingClient/registration/register.js +507 -0
- package/dist/module/CallingClient/registration/registerFixtures.js +28 -0
- package/dist/module/CallingClient/registration/types.js +1 -0
- package/dist/module/CallingClient/types.js +1 -0
- package/dist/module/Contacts/ContactsClient.js +487 -0
- package/dist/module/Contacts/constants.js +20 -0
- package/dist/module/Contacts/contactFixtures.js +284 -0
- package/dist/module/Contacts/types.js +10 -0
- package/dist/module/Errors/catalog/CallError.js +26 -0
- package/dist/module/Errors/catalog/CallingDeviceError.js +18 -0
- package/dist/module/Errors/catalog/ExtendedError.js +10 -0
- package/dist/module/Errors/catalog/LineError.js +24 -0
- package/dist/module/Errors/index.js +2 -0
- package/dist/module/Errors/types.js +48 -0
- package/dist/module/Events/impl/index.js +19 -0
- package/dist/module/Events/types.js +74 -0
- package/dist/module/Logger/index.js +114 -0
- package/dist/module/Logger/types.js +25 -0
- package/dist/module/Metrics/index.js +232 -0
- package/dist/module/Metrics/types.js +37 -0
- package/dist/module/SDKConnector/index.js +39 -0
- package/dist/module/SDKConnector/types.js +1 -0
- package/dist/module/SDKConnector/utils.js +12 -0
- package/dist/module/Voicemail/BroadworksBackendConnector.js +289 -0
- package/dist/module/Voicemail/UcmBackendConnector.js +275 -0
- package/dist/module/Voicemail/Voicemail.js +110 -0
- package/dist/module/Voicemail/WxCallBackendConnector.js +279 -0
- package/dist/module/Voicemail/constants.js +29 -0
- package/dist/module/Voicemail/types.js +1 -0
- package/dist/module/Voicemail/voicemailFixture.js +449 -0
- package/dist/module/common/Utils.js +802 -0
- package/dist/module/common/constants.js +40 -0
- package/dist/module/common/index.js +1 -0
- package/dist/module/common/testUtil.js +938 -0
- package/dist/module/common/types.js +57 -0
- package/dist/module/index.js +8 -0
- package/dist/types/CallHistory/CallHistory.d.ts +19 -0
- package/dist/types/CallHistory/CallHistory.d.ts.map +1 -0
- package/dist/types/CallHistory/callHistoryFixtures.d.ts +95 -0
- package/dist/types/CallHistory/callHistoryFixtures.d.ts.map +1 -0
- package/dist/types/CallHistory/constants.d.ts +10 -0
- package/dist/types/CallHistory/constants.d.ts.map +1 -0
- package/dist/types/CallHistory/types.d.ts +21 -0
- package/dist/types/CallHistory/types.d.ts.map +1 -0
- package/dist/types/CallSettings/CallSettings.d.ts +20 -0
- package/dist/types/CallSettings/CallSettings.d.ts.map +1 -0
- package/dist/types/CallSettings/UcmBackendConnector.d.ts +20 -0
- package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -0
- package/dist/types/CallSettings/WxCallBackendConnector.d.ts +22 -0
- package/dist/types/CallSettings/WxCallBackendConnector.d.ts.map +1 -0
- package/dist/types/CallSettings/constants.d.ts +12 -0
- package/dist/types/CallSettings/constants.d.ts.map +1 -0
- package/dist/types/CallSettings/testFixtures.d.ts +16 -0
- package/dist/types/CallSettings/testFixtures.d.ts.map +1 -0
- package/dist/types/CallSettings/types.d.ts +108 -0
- package/dist/types/CallSettings/types.d.ts.map +1 -0
- package/dist/types/CallingClient/CallingClient.d.ts +38 -0
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -0
- package/dist/types/CallingClient/callRecordFixtures.d.ts +4 -0
- package/dist/types/CallingClient/callRecordFixtures.d.ts.map +1 -0
- package/dist/types/CallingClient/calling/CallerId/index.d.ts +18 -0
- package/dist/types/CallingClient/calling/CallerId/index.d.ts.map +1 -0
- package/dist/types/CallingClient/calling/CallerId/types.d.ts +42 -0
- package/dist/types/CallingClient/calling/CallerId/types.d.ts.map +1 -0
- package/dist/types/CallingClient/calling/call.d.ts +95 -0
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -0
- package/dist/types/CallingClient/calling/callManager.d.ts +22 -0
- package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -0
- package/dist/types/CallingClient/calling/index.d.ts +3 -0
- package/dist/types/CallingClient/calling/index.d.ts.map +1 -0
- package/dist/types/CallingClient/calling/types.d.ts +204 -0
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -0
- package/dist/types/CallingClient/callingClientFixtures.d.ts +19 -0
- package/dist/types/CallingClient/callingClientFixtures.d.ts.map +1 -0
- package/dist/types/CallingClient/constants.d.ts +123 -0
- package/dist/types/CallingClient/constants.d.ts.map +1 -0
- package/dist/types/CallingClient/line/index.d.ts +39 -0
- package/dist/types/CallingClient/line/index.d.ts.map +1 -0
- package/dist/types/CallingClient/line/types.d.ts +51 -0
- package/dist/types/CallingClient/line/types.d.ts.map +1 -0
- package/dist/types/CallingClient/registration/index.d.ts +2 -0
- package/dist/types/CallingClient/registration/index.d.ts.map +1 -0
- package/dist/types/CallingClient/registration/register.d.ts +65 -0
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -0
- package/dist/types/CallingClient/registration/registerFixtures.d.ts +29 -0
- package/dist/types/CallingClient/registration/registerFixtures.d.ts.map +1 -0
- package/dist/types/CallingClient/registration/types.d.ts +21 -0
- package/dist/types/CallingClient/registration/types.d.ts.map +1 -0
- package/dist/types/CallingClient/types.d.ts +30 -0
- package/dist/types/CallingClient/types.d.ts.map +1 -0
- package/dist/types/Contacts/ContactsClient.d.ts +28 -0
- package/dist/types/Contacts/ContactsClient.d.ts.map +1 -0
- package/dist/types/Contacts/constants.d.ts +20 -0
- package/dist/types/Contacts/constants.d.ts.map +1 -0
- package/dist/types/Contacts/contactFixtures.d.ts +281 -0
- package/dist/types/Contacts/contactFixtures.d.ts.map +1 -0
- package/dist/types/Contacts/types.d.ts +75 -0
- package/dist/types/Contacts/types.d.ts.map +1 -0
- package/dist/types/Errors/catalog/CallError.d.ts +12 -0
- package/dist/types/Errors/catalog/CallError.d.ts.map +1 -0
- package/dist/types/Errors/catalog/CallingDeviceError.d.ts +11 -0
- package/dist/types/Errors/catalog/CallingDeviceError.d.ts.map +1 -0
- package/dist/types/Errors/catalog/ExtendedError.d.ts +7 -0
- package/dist/types/Errors/catalog/ExtendedError.d.ts.map +1 -0
- package/dist/types/Errors/catalog/LineError.d.ts +11 -0
- package/dist/types/Errors/catalog/LineError.d.ts.map +1 -0
- package/dist/types/Errors/index.d.ts +3 -0
- package/dist/types/Errors/index.d.ts.map +1 -0
- package/dist/types/Errors/types.d.ts +61 -0
- package/dist/types/Errors/types.d.ts.map +1 -0
- package/dist/types/Events/impl/index.d.ts +9 -0
- package/dist/types/Events/impl/index.d.ts.map +1 -0
- package/dist/types/Events/types.d.ts +284 -0
- package/dist/types/Events/types.d.ts.map +1 -0
- package/dist/types/Logger/index.d.ts +13 -0
- package/dist/types/Logger/index.d.ts.map +1 -0
- package/dist/types/Logger/types.d.ts +26 -0
- package/dist/types/Logger/types.d.ts.map +1 -0
- package/dist/types/Metrics/index.d.ts +6 -0
- package/dist/types/Metrics/index.d.ts.map +1 -0
- package/dist/types/Metrics/types.d.ts +43 -0
- package/dist/types/Metrics/types.d.ts.map +1 -0
- package/dist/types/SDKConnector/index.d.ts +13 -0
- package/dist/types/SDKConnector/index.d.ts.map +1 -0
- package/dist/types/SDKConnector/types.d.ts +129 -0
- package/dist/types/SDKConnector/types.d.ts.map +1 -0
- package/dist/types/SDKConnector/utils.d.ts +6 -0
- package/dist/types/SDKConnector/utils.d.ts.map +1 -0
- package/dist/types/Voicemail/BroadworksBackendConnector.d.ts +28 -0
- package/dist/types/Voicemail/BroadworksBackendConnector.d.ts.map +1 -0
- package/dist/types/Voicemail/UcmBackendConnector.d.ts +35 -0
- package/dist/types/Voicemail/UcmBackendConnector.d.ts.map +1 -0
- package/dist/types/Voicemail/Voicemail.d.ts +28 -0
- package/dist/types/Voicemail/Voicemail.d.ts.map +1 -0
- package/dist/types/Voicemail/WxCallBackendConnector.d.ts +24 -0
- package/dist/types/Voicemail/WxCallBackendConnector.d.ts.map +1 -0
- package/dist/types/Voicemail/constants.d.ts +30 -0
- package/dist/types/Voicemail/constants.d.ts.map +1 -0
- package/dist/types/Voicemail/types.d.ts +134 -0
- package/dist/types/Voicemail/types.d.ts.map +1 -0
- package/dist/types/Voicemail/voicemailFixture.d.ts +350 -0
- package/dist/types/Voicemail/voicemailFixture.d.ts.map +1 -0
- package/dist/types/common/Utils.d.ts +35 -0
- package/dist/types/common/Utils.d.ts.map +1 -0
- package/dist/types/common/constants.d.ts +41 -0
- package/dist/types/common/constants.d.ts.map +1 -0
- package/dist/types/common/index.d.ts +2 -0
- package/dist/types/common/index.d.ts.map +1 -0
- package/dist/types/common/testUtil.d.ts +3612 -0
- package/dist/types/common/testUtil.d.ts.map +1 -0
- package/dist/types/common/types.d.ts +192 -0
- package/dist/types/common/types.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +161 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Mutex } from 'async-mutex';
|
|
2
|
+
import { LOGGER } from '../../Logger/types';
|
|
3
|
+
import { IRegistration } from './types';
|
|
4
|
+
import { IDeviceInfo, MobiusStatus, ServiceData } from '../../common/types';
|
|
5
|
+
import { WebexSDK } from '../../SDKConnector/types';
|
|
6
|
+
import { LineEmitterCallback } from '../line/types';
|
|
7
|
+
export declare class Registration implements IRegistration {
|
|
8
|
+
private sdkConnector;
|
|
9
|
+
private webex;
|
|
10
|
+
private userId;
|
|
11
|
+
private serviceData;
|
|
12
|
+
private failback429RetryAttempts;
|
|
13
|
+
private registrationStatus;
|
|
14
|
+
private failbackTimer?;
|
|
15
|
+
private activeMobiusUrl;
|
|
16
|
+
private keepaliveTimer;
|
|
17
|
+
private rehomingIntervalMin;
|
|
18
|
+
private rehomingIntervalMax;
|
|
19
|
+
private mutex;
|
|
20
|
+
private metricManager;
|
|
21
|
+
private lineEmitter;
|
|
22
|
+
private callManager;
|
|
23
|
+
private deviceInfo;
|
|
24
|
+
private primaryMobiusUris;
|
|
25
|
+
private backupMobiusUris;
|
|
26
|
+
private registerRetry;
|
|
27
|
+
private reconnectPending;
|
|
28
|
+
constructor(webex: WebexSDK, serviceData: ServiceData, mutex: Mutex, lineEmitter: LineEmitterCallback, logLevel: LOGGER);
|
|
29
|
+
getActiveMobiusUrl(): string;
|
|
30
|
+
setActiveMobiusUrl(url: string): void;
|
|
31
|
+
setMobiusServers(primaryMobiusUris: string[], backupMobiusUris: string[]): void;
|
|
32
|
+
private postKeepAlive;
|
|
33
|
+
private deleteRegistration;
|
|
34
|
+
private postRegistration;
|
|
35
|
+
private restorePreviousRegistration;
|
|
36
|
+
private scheduleFailback429Retry;
|
|
37
|
+
private getRegRetryInterval;
|
|
38
|
+
private startFailoverTimer;
|
|
39
|
+
private clearFailbackTimer;
|
|
40
|
+
private isFailbackRequired;
|
|
41
|
+
private getFailbackInterval;
|
|
42
|
+
private initiateFailback;
|
|
43
|
+
private startFailbackTimer;
|
|
44
|
+
private executeFailback;
|
|
45
|
+
private setIntervalValues;
|
|
46
|
+
getDeviceInfo(): IDeviceInfo;
|
|
47
|
+
isDeviceRegistered(): boolean;
|
|
48
|
+
getStatus(): MobiusStatus;
|
|
49
|
+
setStatus(value: MobiusStatus): void;
|
|
50
|
+
private restartRegistration;
|
|
51
|
+
handleConnectionRestoration(retry: boolean): Promise<boolean>;
|
|
52
|
+
private restoreRegistrationCallBack;
|
|
53
|
+
triggerRegistration(): Promise<void>;
|
|
54
|
+
private attemptRegistrationWithServers;
|
|
55
|
+
private startKeepaliveTimer;
|
|
56
|
+
clearKeepaliveTimer(): void;
|
|
57
|
+
isReconnectPending(): boolean;
|
|
58
|
+
deregister(): Promise<void>;
|
|
59
|
+
private isRegRetry;
|
|
60
|
+
private setRegRetry;
|
|
61
|
+
private getExistingDevice;
|
|
62
|
+
reconnectOnFailure(caller: string): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
export declare const createRegistration: (webex: WebexSDK, serviceData: ServiceData, mutex: Mutex, lineEmitter: LineEmitterCallback, logLevel: LOGGER) => IRegistration;
|
|
65
|
+
//# sourceMappingURL=register.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/CallingClient/registration/register.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAQlC,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAEtC,OAAO,EAGL,WAAW,EACX,YAAY,EACZ,WAAW,EAEZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAgB,QAAQ,EAAC,MAAM,0BAA0B,CAAC;AAqBjE,OAAO,EAAc,mBAAmB,EAAC,MAAM,eAAe,CAAC;AAM/D,qBAAa,YAAa,YAAW,aAAa;IAChD,OAAO,CAAC,YAAY,CAAgB;IAEpC,OAAO,CAAC,KAAK,CAAW;IAExB,OAAO,CAAC,MAAM,CAAM;IAEpB,OAAO,CAAC,WAAW,CAAc;IAEjC,OAAO,CAAC,wBAAwB,CAAS;IACzC,OAAO,CAAC,kBAAkB,CAAe;IACzC,OAAO,CAAC,aAAa,CAAC,CAAe;IACrC,OAAO,CAAC,eAAe,CAAU;IAEjC,OAAO,CAAC,cAAc,CAA2B;IACjD,OAAO,CAAC,mBAAmB,CAAS;IAEpC,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,WAAW,CAAsB;IACzC,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,iBAAiB,CAAW;IACpC,OAAO,CAAC,gBAAgB,CAAW;IACnC,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,gBAAgB,CAAS;gBAU/B,KAAK,EAAE,QAAQ,EACf,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,mBAAmB,EAChC,QAAQ,EAAE,MAAM;IAuBX,kBAAkB,IAAI,MAAM;IAI5B,kBAAkB,CAAC,GAAG,EAAE,MAAM;IAM9B,gBAAgB,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,gBAAgB,EAAE,MAAM,EAAE;YAWjE,aAAa;YAmBb,kBAAkB;YAqBlB,gBAAgB;YAwBhB,2BAA2B;YAgB3B,wBAAwB;IA2BtC,OAAO,CAAC,mBAAmB;YAqBb,kBAAkB;IAkEhC,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,kBAAkB;YAeZ,eAAe;IA6C7B,OAAO,CAAC,iBAAiB;IAWlB,aAAa,IAAI,WAAW;IAW5B,kBAAkB,IAAI,OAAO;IAI7B,SAAS,IAAI,YAAY;IAIzB,SAAS,CAAC,KAAK,EAAE,YAAY;YAUtB,mBAAmB;IAcpB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IA8C1E,OAAO,CAAC,2BAA2B;IA+BtB,mBAAmB;YAwBlB,8BAA8B;IAuG5C,OAAO,CAAC,mBAAmB;IAgEpB,mBAAmB;IAOnB,kBAAkB,IAAI,OAAO;IAIvB,UAAU;IAoBvB,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,iBAAiB;IAgCZ,kBAAkB,CAAC,MAAM,EAAE,MAAM;CAkB/C;AASD,eAAO,MAAM,kBAAkB,UACtB,QAAQ,eACF,WAAW,SACjB,KAAK,eACC,mBAAmB,YACtB,MAAM,KACf,aAAmF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const DEVICE_ID = "9381a370-b26b-3c5b-8901-4e8dab405dcc";
|
|
2
|
+
export declare const CLIENT_DEVICE_URL = "https://clientDeviceUrl";
|
|
3
|
+
export declare const URL = "https://wdm-intb.ciscospark.com/wdm/api/v1/";
|
|
4
|
+
export declare const mockPostResponse: {
|
|
5
|
+
userId: string;
|
|
6
|
+
device: {
|
|
7
|
+
deviceId: string;
|
|
8
|
+
uri: string;
|
|
9
|
+
status: string;
|
|
10
|
+
lastSeen: string;
|
|
11
|
+
addresses: string[];
|
|
12
|
+
clientDeviceUri: string;
|
|
13
|
+
};
|
|
14
|
+
keepaliveInterval: number;
|
|
15
|
+
rehomingIntervalMin: number;
|
|
16
|
+
rehomingIntervalMax: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const mockDeleteResponse: {
|
|
19
|
+
userId: string;
|
|
20
|
+
device: {
|
|
21
|
+
deviceId: string;
|
|
22
|
+
uri: string;
|
|
23
|
+
status: string;
|
|
24
|
+
lastSeen: string;
|
|
25
|
+
addresses: string[];
|
|
26
|
+
clientDeviceUri: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=registerFixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registerFixtures.d.ts","sourceRoot":"","sources":["../../../../src/CallingClient/registration/registerFixtures.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,yCAAyC,CAAC;AAChE,eAAO,MAAM,iBAAiB,4BAA4B,CAAC;AAE3D,eAAO,MAAM,GAAG,gDAAgD,CAAC;AACjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAa5B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;CAU9B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IDeviceInfo, MobiusStatus } from '../../common/types';
|
|
2
|
+
export type Header = {
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
};
|
|
5
|
+
export type restoreRegistrationCallBack = (restoreData: IDeviceInfo, caller: string) => Promise<boolean>;
|
|
6
|
+
export interface IRegistration {
|
|
7
|
+
setMobiusServers: (primaryMobiusUris: string[], backupMobiusUris: string[]) => void;
|
|
8
|
+
triggerRegistration: () => Promise<void>;
|
|
9
|
+
isDeviceRegistered: () => boolean;
|
|
10
|
+
setStatus: (value: MobiusStatus) => void;
|
|
11
|
+
getStatus: () => MobiusStatus;
|
|
12
|
+
getDeviceInfo: () => IDeviceInfo;
|
|
13
|
+
clearKeepaliveTimer: () => void;
|
|
14
|
+
deregister: () => void;
|
|
15
|
+
setActiveMobiusUrl: (url: string) => void;
|
|
16
|
+
getActiveMobiusUrl: () => string;
|
|
17
|
+
reconnectOnFailure: (caller: string) => Promise<void>;
|
|
18
|
+
isReconnectPending: () => boolean;
|
|
19
|
+
handleConnectionRestoration: (retry: boolean) => Promise<boolean>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/CallingClient/registration/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAE7D,MAAM,MAAM,MAAM,GAAG;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,CACxC,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,KACX,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB,MAAM,WAAW,aAAa;IAC5B,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,MAAM,EAAE,EAAE,gBAAgB,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpF,mBAAmB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,kBAAkB,EAAE,MAAM,OAAO,CAAC;IAClC,SAAS,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACzC,SAAS,EAAE,MAAM,YAAY,CAAC;IAC9B,aAAa,EAAE,MAAM,WAAW,CAAC;IACjC,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,kBAAkB,EAAE,MAAM,MAAM,CAAC;IACjC,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,kBAAkB,EAAE,MAAM,OAAO,CAAC;IAClC,2BAA2B,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACnE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as Media from '@webex/internal-media-core';
|
|
2
|
+
import { LOGGER } from '../Logger/types';
|
|
3
|
+
import { ISDKConnector } from '../SDKConnector/types';
|
|
4
|
+
import { Eventing } from '../Events/impl';
|
|
5
|
+
import { CallingClientEventTypes } from '../Events/types';
|
|
6
|
+
import { CallDetails, CorrelationId, ServiceData } from '../common/types';
|
|
7
|
+
import { ICall } from './calling/types';
|
|
8
|
+
import { CallingClientError } from '../Errors';
|
|
9
|
+
export interface LoggerConfig {
|
|
10
|
+
level: LOGGER;
|
|
11
|
+
}
|
|
12
|
+
interface DiscoveryConfig {
|
|
13
|
+
country: string;
|
|
14
|
+
region: string;
|
|
15
|
+
}
|
|
16
|
+
export interface CallingClientConfig {
|
|
17
|
+
logger?: LoggerConfig;
|
|
18
|
+
discovery?: DiscoveryConfig;
|
|
19
|
+
serviceData?: ServiceData;
|
|
20
|
+
}
|
|
21
|
+
export type CallingClientErrorEmitterCallback = (err: CallingClientError, finalError?: boolean) => void;
|
|
22
|
+
export interface ICallingClient extends Eventing<CallingClientEventTypes> {
|
|
23
|
+
mediaEngine: typeof Media;
|
|
24
|
+
getSDKConnector: () => ISDKConnector;
|
|
25
|
+
getLoggingLevel: () => LOGGER;
|
|
26
|
+
makeCall: (dest: CallDetails) => ICall | undefined;
|
|
27
|
+
getCall: (correlationId: CorrelationId) => ICall;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/CallingClient/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAC,MAAM,EAAC,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAC,uBAAuB,EAAa,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAC,WAAW,EAAE,aAAa,EAAE,WAAW,EAAC,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,WAAW,CAAC;AAE7C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,MAAM,iCAAiC,GAAG,CAC9C,GAAG,EAAE,kBAAkB,EACvB,UAAU,CAAC,EAAE,OAAO,KACjB,IAAI,CAAC;AAEV,MAAM,WAAW,cAAe,SAAQ,QAAQ,CAAC,uBAAuB,CAAC;IACvE,WAAW,EAAE,OAAO,KAAK,CAAC;IAC1B,eAAe,EAAE,MAAM,aAAa,CAAC;IACrC,eAAe,EAAE,MAAM,MAAM,CAAC;IAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,KAAK,GAAG,SAAS,CAAC;IACnD,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,KAAK,KAAK,CAAC;CAClD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LoggerInterface } from '../Voicemail/types';
|
|
2
|
+
import { ISDKConnector, WebexSDK } from '../SDKConnector/types';
|
|
3
|
+
import { Contact, ContactResponse, IContacts, GroupType } from './types';
|
|
4
|
+
export declare class ContactsClient implements IContacts {
|
|
5
|
+
private sdkConnector;
|
|
6
|
+
private encryptionKeyUrl;
|
|
7
|
+
private webex;
|
|
8
|
+
private groups;
|
|
9
|
+
private contacts;
|
|
10
|
+
private defaultGroupId;
|
|
11
|
+
constructor(webex: WebexSDK, logger: LoggerInterface);
|
|
12
|
+
getSDKConnector(): ISDKConnector;
|
|
13
|
+
private decryptContactDetail;
|
|
14
|
+
private encryptContactDetail;
|
|
15
|
+
private encryptContact;
|
|
16
|
+
private decryptContact;
|
|
17
|
+
private fetchContactFromDSS;
|
|
18
|
+
getContacts(): Promise<ContactResponse>;
|
|
19
|
+
private createNewEncryptionKeyUrl;
|
|
20
|
+
private fetchEncryptionKeyUrl;
|
|
21
|
+
private fetchDefaultGroup;
|
|
22
|
+
createContactGroup(displayName: string, encryptionKeyUrl?: string, groupType?: GroupType): Promise<ContactResponse>;
|
|
23
|
+
deleteContactGroup(groupId: string): Promise<import("../CallHistory/types").JanusResponseEvent | import("../Voicemail/types").VoicemailResponseEvent | import("../CallSettings/types").CallSettingResponse | ContactResponse>;
|
|
24
|
+
createContact(contactInfo: Contact): Promise<ContactResponse>;
|
|
25
|
+
deleteContact(contactId: string): Promise<ContactResponse>;
|
|
26
|
+
}
|
|
27
|
+
export declare const createContactsClient: (webex: WebexSDK, logger: LoggerInterface) => IContacts;
|
|
28
|
+
//# sourceMappingURL=ContactsClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactsClient.d.ts","sourceRoot":"","sources":["../../../src/Contacts/ContactsClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAc9D,OAAO,EACL,OAAO,EAGP,eAAe,EAEf,SAAS,EAET,SAAS,EACV,MAAM,SAAS,CAAC;AAOjB,qBAAa,cAAe,YAAW,SAAS;IAC9C,OAAO,CAAC,YAAY,CAAgB;IAEpC,OAAO,CAAC,gBAAgB,CAAS;IAEjC,OAAO,CAAC,KAAK,CAAW;IAExB,OAAO,CAAC,MAAM,CAA6B;IAE3C,OAAO,CAAC,QAAQ,CAAwB;IAExC,OAAO,CAAC,cAAc,CAAS;gBAMnB,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe;IAsB7C,eAAe,IAAI,aAAa;YAWzB,oBAAoB;YA0BpB,oBAAoB;YAyBpB,cAAc;YAqEd,cAAc;YAuEd,mBAAmB;IAqEpB,WAAW,IAAI,OAAO,CAAC,eAAe,CAAC;YA4EtC,yBAAyB;YAsBzB,qBAAqB;YAoCrB,iBAAiB;IAyClB,kBAAkB,CAC7B,WAAW,EAAE,MAAM,EACnB,gBAAgB,CAAC,EAAE,MAAM,EACzB,SAAS,CAAC,EAAE,SAAS,GACpB,OAAO,CAAC,eAAe,CAAC;IA8Ed,kBAAkB,CAAC,OAAO,EAAE,MAAM;IA6ClC,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC;IA0G7D,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAqCxE;AAMD,eAAO,MAAM,oBAAoB,UAAW,QAAQ,UAAU,eAAe,KAAG,SAC7C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const CONTACTS_FILE = "Contacts";
|
|
2
|
+
export declare const CONTACT_FILTER = "contacts";
|
|
3
|
+
export declare const GROUP_FILTER = "groups";
|
|
4
|
+
export declare const ENCRYPT_FILTER = "encrypt";
|
|
5
|
+
export declare const USERS = "Users";
|
|
6
|
+
export declare const DEFAULT_GROUP_NAME = "Other contacts";
|
|
7
|
+
export declare const CONTACTS_SCHEMA = "urn:cisco:codev:identity:contact:core:1.0";
|
|
8
|
+
export declare enum encryptedFields {
|
|
9
|
+
ADDRESS_INFO = "addressInfo",
|
|
10
|
+
AVATAR_URL = "avatarURL",
|
|
11
|
+
COMPANY = "companyName",
|
|
12
|
+
DISPLAY_NAME = "displayName",
|
|
13
|
+
EMAILS = "emails",
|
|
14
|
+
FIRST_NAME = "firstName",
|
|
15
|
+
LAST_NAME = "lastName",
|
|
16
|
+
PHONE_NUMBERS = "phoneNumbers",
|
|
17
|
+
SIP_ADDRESSES = "sipAddresses",
|
|
18
|
+
TITLE = "title"
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/Contacts/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,aAAa,CAAC;AACxC,eAAO,MAAM,cAAc,aAAa,CAAC;AACzC,eAAO,MAAM,YAAY,WAAW,CAAC;AACrC,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,KAAK,UAAU,CAAC;AAC7B,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,eAAO,MAAM,eAAe,8CAA8C,CAAC;AAE3E,oBAAY,eAAe;IACzB,YAAY,gBAAgB;IAC5B,UAAU,cAAc;IACxB,OAAO,gBAAgB;IACvB,YAAY,gBAAgB;IAC5B,MAAM,WAAW;IACjB,UAAU,cAAc;IACxB,SAAS,aAAa;IACtB,aAAa,iBAAiB;IAC9B,aAAa,iBAAiB;IAC9B,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
export declare const mockCity = "Edinburgh";
|
|
2
|
+
export declare const mockCountry = "UK";
|
|
3
|
+
export declare const mockState = "London";
|
|
4
|
+
export declare const mockStreet = "511, Houston Street";
|
|
5
|
+
export declare const mockZipCode = "455372";
|
|
6
|
+
export declare const mockCompany = "Intel";
|
|
7
|
+
export declare const mockDisplayNameOne = "Jane Doe";
|
|
8
|
+
export declare const mockFirstName = "Jane";
|
|
9
|
+
export declare const mockLastName = "Doe";
|
|
10
|
+
export declare const mockEmail = "jando567@gmail.com";
|
|
11
|
+
export declare const mockNumber1 = "jando@intel.com";
|
|
12
|
+
export declare const mockNumber2 = "6647384294";
|
|
13
|
+
export declare const mockSipAddress = "jando@go.webex.com";
|
|
14
|
+
export declare const mockTitle = "Director";
|
|
15
|
+
export declare const mockGroupName = "Other contacts";
|
|
16
|
+
export declare const mockAvatarURL = "avatar-prod-us-east-2.webexcontent.com";
|
|
17
|
+
export declare const mockDisplayNameTwo = "TestUser Webrtc";
|
|
18
|
+
export declare const mockContactResponseBodyOne: {
|
|
19
|
+
contacts: ({
|
|
20
|
+
avatarUrlDomain: string;
|
|
21
|
+
contactId: string;
|
|
22
|
+
contactType: string;
|
|
23
|
+
encryptionKeyUrl: string;
|
|
24
|
+
groups: string[];
|
|
25
|
+
isMigration: boolean;
|
|
26
|
+
meta: {
|
|
27
|
+
created: string;
|
|
28
|
+
lastModified: string;
|
|
29
|
+
};
|
|
30
|
+
ownerId: string;
|
|
31
|
+
phoneNumbers: {
|
|
32
|
+
type: string;
|
|
33
|
+
value: string;
|
|
34
|
+
}[];
|
|
35
|
+
sipAddresses: {
|
|
36
|
+
type: string;
|
|
37
|
+
value: string;
|
|
38
|
+
}[];
|
|
39
|
+
addressInfo?: undefined;
|
|
40
|
+
avatarURL?: undefined;
|
|
41
|
+
companyName?: undefined;
|
|
42
|
+
displayName?: undefined;
|
|
43
|
+
emails?: undefined;
|
|
44
|
+
firstName?: undefined;
|
|
45
|
+
lastName?: undefined;
|
|
46
|
+
title?: undefined;
|
|
47
|
+
} | {
|
|
48
|
+
addressInfo: {
|
|
49
|
+
city: string;
|
|
50
|
+
country: string;
|
|
51
|
+
state: string;
|
|
52
|
+
street: string;
|
|
53
|
+
zipCode: string;
|
|
54
|
+
};
|
|
55
|
+
avatarUrlDomain: string;
|
|
56
|
+
avatarURL: string;
|
|
57
|
+
companyName: string;
|
|
58
|
+
contactId: string;
|
|
59
|
+
contactType: string;
|
|
60
|
+
displayName: string;
|
|
61
|
+
emails: {
|
|
62
|
+
type: string;
|
|
63
|
+
value: string;
|
|
64
|
+
}[];
|
|
65
|
+
encryptionKeyUrl: string;
|
|
66
|
+
firstName: string;
|
|
67
|
+
groups: string[];
|
|
68
|
+
isMigration: boolean;
|
|
69
|
+
lastName: string;
|
|
70
|
+
meta: {
|
|
71
|
+
created: string;
|
|
72
|
+
lastModified: string;
|
|
73
|
+
};
|
|
74
|
+
ownerId: string;
|
|
75
|
+
phoneNumbers: {
|
|
76
|
+
type: string;
|
|
77
|
+
value: string;
|
|
78
|
+
}[];
|
|
79
|
+
sipAddresses: {
|
|
80
|
+
type: string;
|
|
81
|
+
value: string;
|
|
82
|
+
}[];
|
|
83
|
+
title: string;
|
|
84
|
+
})[];
|
|
85
|
+
groups: {
|
|
86
|
+
meta: {
|
|
87
|
+
created: string;
|
|
88
|
+
lastModified: string;
|
|
89
|
+
};
|
|
90
|
+
groupId: string;
|
|
91
|
+
groupType: string;
|
|
92
|
+
ownerId: string;
|
|
93
|
+
displayName: string;
|
|
94
|
+
members: string[];
|
|
95
|
+
encryptionKeyUrl: string;
|
|
96
|
+
isMigration: boolean;
|
|
97
|
+
}[];
|
|
98
|
+
};
|
|
99
|
+
export declare const mockContactResponseBodyTwo: {
|
|
100
|
+
contacts: {
|
|
101
|
+
avatarUrlDomain: string;
|
|
102
|
+
contactId: string;
|
|
103
|
+
contactType: string;
|
|
104
|
+
displayName: string;
|
|
105
|
+
encryptionKeyUrl: string;
|
|
106
|
+
groups: string[];
|
|
107
|
+
ownerId: string;
|
|
108
|
+
}[];
|
|
109
|
+
groups: {
|
|
110
|
+
meta: {
|
|
111
|
+
created: string;
|
|
112
|
+
lastModified: string;
|
|
113
|
+
};
|
|
114
|
+
groupId: string;
|
|
115
|
+
groupType: string;
|
|
116
|
+
ownerId: string;
|
|
117
|
+
displayName: string;
|
|
118
|
+
members: string[];
|
|
119
|
+
encryptionKeyUrl: string;
|
|
120
|
+
isMigration: boolean;
|
|
121
|
+
}[];
|
|
122
|
+
};
|
|
123
|
+
export declare const mockContactResponseBodyThird: {
|
|
124
|
+
contacts: never[];
|
|
125
|
+
groups: never[];
|
|
126
|
+
ownerId: string;
|
|
127
|
+
};
|
|
128
|
+
export declare const mockContactListOne: ({
|
|
129
|
+
addressInfo: {
|
|
130
|
+
city: string;
|
|
131
|
+
country: string;
|
|
132
|
+
state: string;
|
|
133
|
+
street: string;
|
|
134
|
+
zipCode: string;
|
|
135
|
+
};
|
|
136
|
+
avatarUrlDomain: string;
|
|
137
|
+
companyName: string;
|
|
138
|
+
contactId: string;
|
|
139
|
+
contactType: string;
|
|
140
|
+
displayName: string;
|
|
141
|
+
emails: {
|
|
142
|
+
type: string;
|
|
143
|
+
value: string;
|
|
144
|
+
}[];
|
|
145
|
+
encryptionKeyUrl: string;
|
|
146
|
+
firstName: string;
|
|
147
|
+
groups: string[];
|
|
148
|
+
lastName: string;
|
|
149
|
+
ownerId: string;
|
|
150
|
+
phoneNumbers: {
|
|
151
|
+
type: string;
|
|
152
|
+
value: string;
|
|
153
|
+
}[];
|
|
154
|
+
sipAddresses: {
|
|
155
|
+
type: string;
|
|
156
|
+
value: string;
|
|
157
|
+
}[];
|
|
158
|
+
title: string;
|
|
159
|
+
isMigration: boolean;
|
|
160
|
+
meta: {
|
|
161
|
+
created: string;
|
|
162
|
+
lastModified: string;
|
|
163
|
+
};
|
|
164
|
+
avatarURL: string;
|
|
165
|
+
department?: undefined;
|
|
166
|
+
manager?: undefined;
|
|
167
|
+
} | {
|
|
168
|
+
avatarUrlDomain: string;
|
|
169
|
+
contactId: string;
|
|
170
|
+
contactType: string;
|
|
171
|
+
department: string;
|
|
172
|
+
displayName: string;
|
|
173
|
+
emails: {
|
|
174
|
+
value: string;
|
|
175
|
+
}[];
|
|
176
|
+
encryptionKeyUrl: string;
|
|
177
|
+
firstName: string;
|
|
178
|
+
groups: string[];
|
|
179
|
+
lastName: string;
|
|
180
|
+
manager: string;
|
|
181
|
+
ownerId: string;
|
|
182
|
+
phoneNumbers: {
|
|
183
|
+
type: string;
|
|
184
|
+
value: string;
|
|
185
|
+
}[];
|
|
186
|
+
sipAddresses: ({
|
|
187
|
+
type: string;
|
|
188
|
+
value: string;
|
|
189
|
+
primary: boolean;
|
|
190
|
+
} | {
|
|
191
|
+
type: string;
|
|
192
|
+
value: string;
|
|
193
|
+
primary?: undefined;
|
|
194
|
+
})[];
|
|
195
|
+
title: string;
|
|
196
|
+
avatarURL: string;
|
|
197
|
+
addressInfo?: undefined;
|
|
198
|
+
companyName?: undefined;
|
|
199
|
+
isMigration?: undefined;
|
|
200
|
+
meta?: undefined;
|
|
201
|
+
})[];
|
|
202
|
+
export declare const mockContactListTwo: {
|
|
203
|
+
avatarUrlDomain: string;
|
|
204
|
+
contactId: string;
|
|
205
|
+
contactType: string;
|
|
206
|
+
displayName: string;
|
|
207
|
+
encryptionKeyUrl: string;
|
|
208
|
+
groups: string[];
|
|
209
|
+
ownerId: string;
|
|
210
|
+
}[];
|
|
211
|
+
export declare const mockContactGroupListOne: {
|
|
212
|
+
meta: {
|
|
213
|
+
created: string;
|
|
214
|
+
lastModified: string;
|
|
215
|
+
};
|
|
216
|
+
groupId: string;
|
|
217
|
+
groupType: string;
|
|
218
|
+
ownerId: string;
|
|
219
|
+
displayName: string;
|
|
220
|
+
members: string[];
|
|
221
|
+
encryptionKeyUrl: string;
|
|
222
|
+
isMigration: boolean;
|
|
223
|
+
}[];
|
|
224
|
+
export declare const mockContactGroupListTwo: {
|
|
225
|
+
meta: {
|
|
226
|
+
created: string;
|
|
227
|
+
lastModified: string;
|
|
228
|
+
};
|
|
229
|
+
groupId: string;
|
|
230
|
+
groupType: string;
|
|
231
|
+
ownerId: string;
|
|
232
|
+
displayName: string;
|
|
233
|
+
members: string[];
|
|
234
|
+
encryptionKeyUrl: string;
|
|
235
|
+
isMigration: boolean;
|
|
236
|
+
}[];
|
|
237
|
+
export declare const mockDSSResponse: {
|
|
238
|
+
additionalInfo: {
|
|
239
|
+
created: string;
|
|
240
|
+
department: string;
|
|
241
|
+
extLinkedAccts: {
|
|
242
|
+
providerID: string;
|
|
243
|
+
accountGUID: string;
|
|
244
|
+
status: string;
|
|
245
|
+
}[];
|
|
246
|
+
firstName: string;
|
|
247
|
+
identityManager: {
|
|
248
|
+
displayName: string;
|
|
249
|
+
managerId: string;
|
|
250
|
+
};
|
|
251
|
+
jobTitle: string;
|
|
252
|
+
lastName: string;
|
|
253
|
+
modified: string;
|
|
254
|
+
nickName: string;
|
|
255
|
+
userName: string;
|
|
256
|
+
};
|
|
257
|
+
displayName: string;
|
|
258
|
+
emails: {
|
|
259
|
+
value: string;
|
|
260
|
+
}[];
|
|
261
|
+
entityProviderType: string;
|
|
262
|
+
identity: string;
|
|
263
|
+
orgId: string;
|
|
264
|
+
phoneNumbers: {
|
|
265
|
+
type: string;
|
|
266
|
+
value: string;
|
|
267
|
+
}[];
|
|
268
|
+
photos: {
|
|
269
|
+
value: string;
|
|
270
|
+
}[];
|
|
271
|
+
sipAddresses: {
|
|
272
|
+
type: string;
|
|
273
|
+
value: string;
|
|
274
|
+
primary: boolean;
|
|
275
|
+
}[];
|
|
276
|
+
type: string;
|
|
277
|
+
}[];
|
|
278
|
+
export declare const mockKmsKey: {
|
|
279
|
+
uri: string;
|
|
280
|
+
};
|
|
281
|
+
//# sourceMappingURL=contactFixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contactFixtures.d.ts","sourceRoot":"","sources":["../../../src/Contacts/contactFixtures.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,QAAQ,cAAc,CAAC;AACpC,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,SAAS,WAAW,CAAC;AAClC,eAAO,MAAM,UAAU,wBAAwB,CAAC;AAChD,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAC7C,eAAO,MAAM,aAAa,SAAS,CAAC;AACpC,eAAO,MAAM,YAAY,QAAQ,CAAC;AAClC,eAAO,MAAM,SAAS,uBAAuB,CAAC;AAC9C,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,eAAO,MAAM,WAAW,eAAe,CAAC;AACxC,eAAO,MAAM,cAAc,uBAAuB,CAAC;AACnD,eAAO,MAAM,SAAS,aAAa,CAAC;AACpC,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAC9C,eAAO,MAAM,aAAa,2CAA2C,CAAC;AAEtE,eAAO,MAAM,kBAAkB,oBAAoB,CAAC;AAEpD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GtC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;CA6BtC,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;CAIxC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6D9B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;GAU9B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;GAcnC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;GAcnC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmC3B,CAAC;AAEF,eAAO,MAAM,UAAU;;CAEtB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ContactDetail } from '../common/types';
|
|
2
|
+
import { ISDKConnector } from '../SDKConnector/types';
|
|
3
|
+
export declare enum ContactType {
|
|
4
|
+
CUSTOM = "CUSTOM",
|
|
5
|
+
CLOUD = "CLOUD"
|
|
6
|
+
}
|
|
7
|
+
export type AddressType = {
|
|
8
|
+
city?: string;
|
|
9
|
+
country?: string;
|
|
10
|
+
state?: string;
|
|
11
|
+
street?: string;
|
|
12
|
+
zipCode?: string;
|
|
13
|
+
};
|
|
14
|
+
export type Contact = {
|
|
15
|
+
addressInfo?: AddressType;
|
|
16
|
+
avatarURL?: string;
|
|
17
|
+
avatarUrlDomain?: string;
|
|
18
|
+
companyName?: string;
|
|
19
|
+
contactId?: string;
|
|
20
|
+
contactType: ContactType;
|
|
21
|
+
department?: string;
|
|
22
|
+
displayName?: string;
|
|
23
|
+
emails?: ContactDetail[];
|
|
24
|
+
encryptionKeyUrl: string;
|
|
25
|
+
firstName?: string;
|
|
26
|
+
groups: string[];
|
|
27
|
+
kmsResourceObjectUrl?: string;
|
|
28
|
+
lastName?: string;
|
|
29
|
+
manager?: string;
|
|
30
|
+
ownerId?: string;
|
|
31
|
+
phoneNumbers?: ContactDetail[];
|
|
32
|
+
primaryContactMethod?: string;
|
|
33
|
+
schemas?: string;
|
|
34
|
+
sipAddresses?: ContactDetail[];
|
|
35
|
+
title?: string;
|
|
36
|
+
};
|
|
37
|
+
export declare enum GroupType {
|
|
38
|
+
NORMAL = "NORMAL",
|
|
39
|
+
EXTERNAL = "EXTERNAL"
|
|
40
|
+
}
|
|
41
|
+
export type ContactGroup = {
|
|
42
|
+
displayName: string;
|
|
43
|
+
encryptionKeyUrl: string;
|
|
44
|
+
groupId: string;
|
|
45
|
+
groupType: GroupType;
|
|
46
|
+
members?: string[];
|
|
47
|
+
ownerId?: string;
|
|
48
|
+
};
|
|
49
|
+
export type ContactList = {
|
|
50
|
+
contacts: Contact[];
|
|
51
|
+
groups: ContactGroup[];
|
|
52
|
+
};
|
|
53
|
+
export type ContactResponse = {
|
|
54
|
+
statusCode: number;
|
|
55
|
+
data: {
|
|
56
|
+
contacts?: Contact[];
|
|
57
|
+
groups?: ContactGroup[];
|
|
58
|
+
contact?: Contact;
|
|
59
|
+
group?: ContactGroup;
|
|
60
|
+
error?: string;
|
|
61
|
+
};
|
|
62
|
+
message: string | null;
|
|
63
|
+
};
|
|
64
|
+
export interface IContacts {
|
|
65
|
+
getSDKConnector: () => ISDKConnector;
|
|
66
|
+
getContacts: () => Promise<ContactResponse>;
|
|
67
|
+
createContactGroup: (displayName: string, encryptionKeyUrl?: string, groupType?: GroupType) => Promise<ContactResponse>;
|
|
68
|
+
deleteContactGroup: (groupId: string) => Promise<ContactResponse>;
|
|
69
|
+
createContact: (contactInfo: Contact) => Promise<ContactResponse>;
|
|
70
|
+
deleteContact: (contactId: string) => Promise<ContactResponse>;
|
|
71
|
+
}
|
|
72
|
+
export type ContactIdContactInfo = {
|
|
73
|
+
[Key: string]: Contact;
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Contacts/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CallErrorObject, ErrorContext, ErrorMessage, ERROR_LAYER, ERROR_TYPE } from '../types';
|
|
2
|
+
import ExtendedError from './ExtendedError';
|
|
3
|
+
import { CorrelationId } from '../../common/types';
|
|
4
|
+
export declare class CallError extends ExtendedError {
|
|
5
|
+
private correlationId;
|
|
6
|
+
private errorLayer;
|
|
7
|
+
constructor(msg: ErrorMessage, context: ErrorContext, type: ERROR_TYPE, correlationId: CorrelationId, errorLayer: ERROR_LAYER);
|
|
8
|
+
setCallError(error: CallErrorObject): void;
|
|
9
|
+
getCallError(): CallErrorObject;
|
|
10
|
+
}
|
|
11
|
+
export declare const createCallError: (msg: ErrorMessage, context: ErrorContext, type: ERROR_TYPE, correlationId: CorrelationId, errorLayer: ERROR_LAYER) => CallError;
|
|
12
|
+
//# sourceMappingURL=CallError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallError.d.ts","sourceRoot":"","sources":["../../../../src/Errors/catalog/CallError.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAC9F,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAKjD,qBAAa,SAAU,SAAQ,aAAa;IAC1C,OAAO,CAAC,aAAa,CAAgB;IAErC,OAAO,CAAC,UAAU,CAAc;gBAY9B,GAAG,EAAE,YAAY,EACjB,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,UAAU,EAChB,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,WAAW;IAYlB,YAAY,CAAC,KAAK,EAAE,eAAe;IAYnC,YAAY,IAAI,eAAe;CASvC;AAYD,eAAO,MAAM,eAAe,QACrB,YAAY,WACR,YAAY,QACf,UAAU,iBACD,aAAa,cAChB,WAAW,cACwC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MobiusStatus } from '../../common/types';
|
|
2
|
+
import { ErrorContext, ErrorMessage, ErrorObject, ERROR_TYPE } from '../types';
|
|
3
|
+
import ExtendedError from './ExtendedError';
|
|
4
|
+
export declare class CallingClientError extends ExtendedError {
|
|
5
|
+
status: MobiusStatus;
|
|
6
|
+
constructor(msg: ErrorMessage, context: ErrorContext, type: ERROR_TYPE, status: MobiusStatus);
|
|
7
|
+
setError(error: ErrorObject): void;
|
|
8
|
+
getError(): ErrorObject;
|
|
9
|
+
}
|
|
10
|
+
export declare const createClientError: (msg: ErrorMessage, context: ErrorContext, type: ERROR_TYPE, status: MobiusStatus) => CallingClientError;
|
|
11
|
+
//# sourceMappingURL=CallingDeviceError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallingDeviceError.d.ts","sourceRoot":"","sources":["../../../../src/Errors/catalog/CallingDeviceError.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAC7E,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAK5C,qBAAa,kBAAmB,SAAQ,aAAa;IAC5C,MAAM,EAAE,YAAY,CAAwB;gBAUvC,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY;IAUrF,QAAQ,CAAC,KAAK,EAAE,WAAW;IAW3B,QAAQ,IAAI,WAAW;CAG/B;AAWD,eAAO,MAAM,iBAAiB,QACvB,YAAY,WACR,YAAY,QACf,UAAU,UACR,YAAY,uBACiC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ErrorContext, ErrorMessage, ERROR_TYPE } from '../types';
|
|
2
|
+
export default class ExtendedError extends Error {
|
|
3
|
+
type: ERROR_TYPE;
|
|
4
|
+
context: ErrorContext;
|
|
5
|
+
constructor(msg: ErrorMessage, context: ErrorContext, type: ERROR_TYPE);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ExtendedError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtendedError.d.ts","sourceRoot":"","sources":["../../../../src/Errors/catalog/ExtendedError.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAE,YAAY,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAKhE,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,KAAK;IACvC,IAAI,EAAE,UAAU,CAAC;IAEjB,OAAO,EAAE,YAAY,CAAC;gBAOjB,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU;CAKvE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LineStatus } from '../../CallingClient/line/types';
|
|
2
|
+
import { ErrorMessage, ERROR_TYPE, LineErrorObject, ErrorContext } from '../types';
|
|
3
|
+
import ExtendedError from './ExtendedError';
|
|
4
|
+
export declare class LineError extends ExtendedError {
|
|
5
|
+
status: LineStatus;
|
|
6
|
+
constructor(msg: ErrorMessage, context: ErrorContext, type: ERROR_TYPE, status: LineStatus);
|
|
7
|
+
setError(error: LineErrorObject): void;
|
|
8
|
+
getError(): LineErrorObject;
|
|
9
|
+
}
|
|
10
|
+
export declare const createLineError: (msg: ErrorMessage, context: ErrorContext, type: ERROR_TYPE, status: LineStatus) => LineError;
|
|
11
|
+
//# sourceMappingURL=LineError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LineError.d.ts","sourceRoot":"","sources":["../../../../src/Errors/catalog/LineError.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAC,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAC,MAAM,UAAU,CAAC;AACjF,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAK5C,qBAAa,SAAU,SAAQ,aAAa;IACnC,MAAM,EAAE,UAAU,CAAuB;gBAUpC,GAAG,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU;IAUnF,QAAQ,CAAC,KAAK,EAAE,eAAe;IAY/B,QAAQ,IAAI,eAAe;CAQnC;AAWD,eAAO,MAAM,eAAe,QACrB,YAAY,WACR,YAAY,QACf,UAAU,UACR,UAAU,cAC0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC"}
|