TP-89230 | universal call sdk

This commit is contained in:
varnit goyal
2024-11-03 11:10:54 +05:30
parent fac5a4187a
commit 997c58cf0e
6 changed files with 81 additions and 112 deletions

View File

@@ -1,105 +1,13 @@
0 silly argv {
0 silly argv _: [ 'version' ],
0 silly argv lernaVersion: '8.1.8',
0 silly argv '$0': '/Users/varnitgoyal/office/universal-call-sdk/node_modules/.bin/lerna'
0 silly argv }
1 notice cli v8.1.8
2 verbose packageConfigs Resolving packages based on package.json "workspaces" configuration.
3 verbose rootPath /Users/varnitgoyal/office/universal-call-sdk
4 info versioning independent
5 silly isAnythingCommitted
6 verbose isAnythingCommitted 1
7 silly getCurrentBranch
8 verbose currentBranch TP-89230/universal-call-sdk
9 silly remoteBranchExists
10 silly isBehindUpstream
11 silly isBehindUpstream TP-89230/universal-call-sdk is behind origin/TP-89230/universal-call-sdk by 0 commit(s) and ahead by 0
12 silly hasTags
13 verbose hasTags false
14 info Assuming all packages changed
15 verbose updated @universal-call-sdk/adapter-ameyo
16 verbose updated @universal-call-sdk/common
17 verbose updated @universal-call-sdk/core
18 verbose git-describe undefined => "82fc492"
19 silly git-describe parsed => {"refCount":"1","sha":"82fc492","isDirty":false}
20 info execute Skipping releases
21 silly lifecycle No script for "preversion" in "root", continuing
22 silly lifecycle No script for "preversion" in "@universal-call-sdk/common", continuing
23 silly lifecycle No script for "preversion" in "@universal-call-sdk/core", continuing
24 verbose version @universal-call-sdk/common has no lockfile. Skipping lockfile update.
25 verbose version @universal-call-sdk/core has no lockfile. Skipping lockfile update.
26 silly lifecycle No script for "version" in "@universal-call-sdk/common", continuing
27 silly lifecycle No script for "preversion" in "@universal-call-sdk/adapter-ameyo", continuing
28 silly lifecycle No script for "version" in "@universal-call-sdk/core", continuing
29 verbose version @universal-call-sdk/adapter-ameyo has no lockfile. Skipping lockfile update.
30 silly lifecycle No script for "version" in "@universal-call-sdk/adapter-ameyo", continuing
31 silly lifecycle No script for "version" in "root", continuing
32 verbose version Detected yarn version 1.22.21
33 silly gitAdd [
33 silly gitAdd 'packages/common/package.json',
33 silly gitAdd 'packages/core/package.json',
33 silly gitAdd 'packages/adapter-ameyo/package.json'
33 silly gitAdd ]
34 silly gitCommit Publish
34 silly gitCommit
34 silly gitCommit - @universal-call-sdk/adapter-ameyo@0.1.0
34 silly gitCommit - @universal-call-sdk/common@1.1.0
34 silly gitCommit - @universal-call-sdk/core@0.1.0
35 verbose git [
35 verbose git 'commit',
35 verbose git '-F',
35 verbose git '/private/var/folders/sn/w7tw5nnd2qg7g_6gkz0vk0w40000gr/T/11322d66-bbe2-4b2c-8266-632330b910e2/lerna-commit.txt'
35 verbose git ]
36 silly gitTag @universal-call-sdk/adapter-ameyo@0.1.0 git tag %s -m %s
37 verbose git [
37 verbose git 'tag',
37 verbose git '@universal-call-sdk/adapter-ameyo@0.1.0',
37 verbose git '-m',
37 verbose git '@universal-call-sdk/adapter-ameyo@0.1.0'
37 verbose git ]
38 silly gitTag @universal-call-sdk/common@1.1.0 git tag %s -m %s
39 verbose git [
39 verbose git 'tag',
39 verbose git '@universal-call-sdk/common@1.1.0',
39 verbose git '-m',
39 verbose git '@universal-call-sdk/common@1.1.0'
39 verbose git ]
40 silly gitTag @universal-call-sdk/core@0.1.0 git tag %s -m %s
41 verbose git [
41 verbose git 'tag',
41 verbose git '@universal-call-sdk/core@0.1.0',
41 verbose git '-m',
41 verbose git '@universal-call-sdk/core@0.1.0'
41 verbose git ]
42 silly lifecycle No script for "postversion" in "@universal-call-sdk/adapter-ameyo", continuing
43 silly lifecycle No script for "postversion" in "@universal-call-sdk/common", continuing
44 silly lifecycle No script for "postversion" in "@universal-call-sdk/core", continuing
45 silly lifecycle No script for "postversion" in "root", continuing
46 info git Pushing tags...
47 silly gitPush origin TP-89230/universal-call-sdk
48 warn gitPush remote: error: GH013: Repository rule violations found for refs/heads/TP-89230/universal-call-sdk.
48 warn gitPush remote: Review all repository rules at https://github.com/navi-ppl/universal-call-sdk/rules?ref=refs%2Fheads%2FTP-89230%2Funiversal-call-sdk
48 warn gitPush remote:
48 warn gitPush remote: - Changes must be made through a pull request.
48 warn gitPush remote:
48 warn gitPush To github.com:navi-ppl/universal-call-sdk.git
48 warn gitPush ! [remote rejected] TP-89230/universal-call-sdk -> TP-89230/universal-call-sdk (push declined due to repository rule violations)
48 warn gitPush ! [remote rejected] @universal-call-sdk/adapter-ameyo@0.1.0 -> @universal-call-sdk/adapter-ameyo@0.1.0 (atomic transaction failed)
48 warn gitPush ! [remote rejected] @universal-call-sdk/common@1.1.0 -> @universal-call-sdk/common@1.1.0 (atomic transaction failed)
48 warn gitPush ! [remote rejected] @universal-call-sdk/core@0.1.0 -> @universal-call-sdk/core@0.1.0 (atomic transaction failed)
48 warn gitPush error: failed to push some refs to 'github.com:navi-ppl/universal-call-sdk.git'
49 info gitPush --atomic failed, attempting non-atomic push
50 error Error: Command failed with exit code 1: git push --follow-tags --no-verify origin TP-89230/universal-call-sdk
50 error remote: error: GH013: Repository rule violations found for refs/heads/TP-89230/universal-call-sdk.
50 error remote: Review all repository rules at https://github.com/navi-ppl/universal-call-sdk/rules?ref=refs%2Fheads%2FTP-89230%2Funiversal-call-sdk
50 error remote:
50 error remote: - Changes must be made through a pull request.
50 error remote:
50 error To github.com:navi-ppl/universal-call-sdk.git
50 error * [new tag] @universal-call-sdk/adapter-ameyo@0.1.0 -> @universal-call-sdk/adapter-ameyo@0.1.0
50 error * [new tag] @universal-call-sdk/common@1.1.0 -> @universal-call-sdk/common@1.1.0
50 error * [new tag] @universal-call-sdk/core@0.1.0 -> @universal-call-sdk/core@0.1.0
50 error ! [remote rejected] TP-89230/universal-call-sdk -> TP-89230/universal-call-sdk (push declined due to repository rule violations)
50 error error: failed to push some refs to 'github.com:navi-ppl/universal-call-sdk.git'
50 error at makeError (/Users/varnitgoyal/office/universal-call-sdk/node_modules/execa/lib/error.js:59:11)
50 error at handlePromise (/Users/varnitgoyal/office/universal-call-sdk/node_modules/execa/index.js:114:26)
17 error Error: Command failed with exit code 1: git remote update
17 error ERROR: The repository owner has an IP allow list enabled, and 122.172.85.219 is not permitted to access this repository.
17 error fatal: Could not read from remote repository.
17 error
17 error Please make sure you have the correct access rights
17 error and the repository exists.
17 error at makeError (/Users/varnitgoyal/office/universal-call-sdk/node_modules/execa/lib/error.js:59:11)
17 error at module.exports.sync (/Users/varnitgoyal/office/universal-call-sdk/node_modules/execa/index.js:186:17)
17 error at Object.execSync (/Users/varnitgoyal/office/universal-call-sdk/node_modules/lerna/dist/index.js:1579:31)
17 error at updateRemote (/Users/varnitgoyal/office/universal-call-sdk/node_modules/lerna/dist/index.js:9196:18)
17 error at isBehindUpstream (/Users/varnitgoyal/office/universal-call-sdk/node_modules/lerna/dist/index.js:9186:3)
17 error at VersionCommand.initialize (/Users/varnitgoyal/office/universal-call-sdk/node_modules/lerna/dist/index.js:9477:57)
17 error at VersionCommand.runCommand (/Users/varnitgoyal/office/universal-call-sdk/node_modules/lerna/dist/index.js:3296:36)

View File

@@ -25,7 +25,7 @@ export const loginInAmeyo = (userId: string, password: string) => {;
});
};
export const maintainHeartbeat = (sessionId: string, webcoreTimestamp: string, counter: number) => {
const HEART_BEAT_REQUEST_TEXT = `7|0|8|https://naviapp1.ameyo.net:8443/app/application_ui/|93B024BCBAF3AE5EFEC49890FE64CF5F|com.drishti.ameyo.common.ui.rpc.CommonGwtRpcService|keepAliveWithPingPush|java.lang.String/2004016611|java.lang.Integer/3438268394|${sessionId}|${webcoreTimestamp}|1|2|3|4|3|5|5|6|7|8|6|${counter}|${sessionId}|`;
const HEART_BEAT_REQUEST_TEXT = `7|0|8|${BASE_AMEYO_URL}/app/application_ui/|93B024BCBAF3AE5EFEC49890FE64CF5F|com.drishti.ameyo.common.ui.rpc.CommonGwtRpcService|keepAliveWithPingPush|java.lang.String/2004016611|java.lang.Integer/3438268394|${sessionId}|${webcoreTimestamp}|1|2|3|4|3|5|5|6|7|8|6|${counter}|${sessionId}|`;
return getResponseWithoutCors({
url: `${BASE_AMEYO_URL}/ameyo40/service`,
method: 'POST',
@@ -57,7 +57,7 @@ export const setAgentOnBreak = (sessionId: string) => {
};
export const attachOmniqueService = (sessionId: string, userId: string) => {
const OMNIQUEUE_TEXT = `7|0|9|https://naviapp1.ameyo.net:8443/app/application_ui/|5B1786BFF89E87DC6EAAACDE629A89E2|com.drishti.ameyo.omniqueue.shared.CommonGwtRpcService|selectCamapign|java.lang.String/2004016611|[Ljava.lang.Integer;/1574882222|${sessionId}|${userId}|java.lang.Integer/3438268394|1|2|3|4|3|5|5|6|7|8|6|1|9|482|${sessionId}|`;
const OMNIQUEUE_TEXT = `7|0|9|${BASE_AMEYO_URL}/app/application_ui/|5B1786BFF89E87DC6EAAACDE629A89E2|com.drishti.ameyo.omniqueue.shared.CommonGwtRpcService|selectCamapign|java.lang.String/2004016611|[Ljava.lang.Integer;/1574882222|${sessionId}|${userId}|java.lang.Integer/3438268394|1|2|3|4|3|5|5|6|7|8|6|1|9|482|${sessionId}|`;
return getResponseWithoutCors({
url: `${BASE_AMEYO_URL}/ameyoomniqueue/service`,
method: 'POST',
@@ -118,7 +118,7 @@ export const autoSelectExtension = (sessionId: string, userId: string) => {
};
export const selectCampaign = (sessionId: string, userId: string) => {
const SELECT_CAMPAIGN_TEXT = `7|0|9|https://naviapp1.ameyo.net:8443/app/application_ui/|5B1786BFF89E87DC6EAAACDE629A89E2|com.drishti.ameyo.omniqueue.shared.CommonGwtRpcService|selectCamapign|java.lang.String/2004016611|[Ljava.lang.Integer;/1574882222|${sessionId}|${userId}|java.lang.Integer/3438268394|1|2|3|4|3|5|5|6|7|8|6|1|9|482|${sessionId}|`;
const SELECT_CAMPAIGN_TEXT = `7|0|9|${BASE_AMEYO_URL}/app/application_ui/|5B1786BFF89E87DC6EAAACDE629A89E2|com.drishti.ameyo.omniqueue.shared.CommonGwtRpcService|selectCamapign|java.lang.String/2004016611|[Ljava.lang.Integer;/1574882222|${sessionId}|${userId}|java.lang.Integer/3438268394|1|2|3|4|3|5|5|6|7|8|6|1|9|482|${sessionId}|`;
return getResponseWithoutCors({
url: `${BASE_AMEYO_URL}/ameyoomniqueue/service`,
method: 'POST',
@@ -147,7 +147,7 @@ export const setAutoStatus = (sessionId: string) => {
export const ameyoHangupUser = (sessionId: string, userCRTObjectId: string) => {
return getResponseWithoutCors({
url: `${BASE_AMEYO_URL}/ameyorestapi/voice/hangupUser`,
url: `${BASE_AMEYO_URL}/ameyorestapi/voice/hangupUser s`,
method: 'POST',
requestKey: RequestKeys.HANGUP_USER,
requestType: RequestType.JSON,

View File

@@ -1 +1,49 @@
var l = /* @__PURE__ */ ((t) => (t.JSON = "JSON", t.RAW = "RAW", t))(l || {});
const o = ({
url: t,
method: e,
data: a = {},
requestKey: n,
requestType: s = l.JSON,
headers: r = null
}) => {
window.postMessage({
type: "getResponseWithoutCors",
data: {
url: t,
method: e,
data: a,
requestKey: n,
requestType: s,
headers: r
}
});
};
class C {
registerOnCallIncoming(e) {
e();
}
registerOnCallConnected(e) {
e();
}
registerOnCallDisconnected(e) {
e();
}
acceptCall() {
}
rejectCall() {
}
muteCall() {
}
unmuteCall() {
}
setOnBreak() {
}
setAvailable() {
}
}
export {
C as IAdapter,
l as RequestType,
o as getResponseWithoutCors
};

View File

@@ -1,4 +1,4 @@
type GenericObject = {
export type GenericObject = {
[key: string]: any;
};
export default GenericObject;

View File

@@ -0,0 +1,13 @@
import getResponseWithoutCors from "../utils/getResponseWithoutCors.ts"
import GenericObject from "../../common/types/GenericObject.ts";
import RequestType from "../../common/types/RequestType.ts";
import IAdapter from "../Interfaces/IAdapter.ts";
export {
getResponseWithoutCors,
type GenericObject,
RequestType,
IAdapter
}

View File

@@ -1,4 +1,4 @@
type GenericObject = {
export type GenericObject = {
[key: string]: any;
};