Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(contact-center): Added new package for contact-center #3883

Merged
merged 16 commits into from
Oct 11, 2024

Conversation

Kesari3008
Copy link
Contributor

@Kesari3008 Kesari3008 commented Oct 4, 2024

COMPLETES #https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-558461

This pull request addresses

Added new package inside @webex folder. Contact-center package will be accessible after Webex init as webex.cc.

by making the following changes

New package is added under @webex for the contact-center. A new sample page is added for testing the contact-center package methods. Added jest config and basic tooling changes for package to build and run tests.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

Sample page created for the CC package and tested Webex.init using the samples page
https://github.com/user-attachments/assets/b2d98333-c903-466e-bcd7-9a74aa82cefa

I certified that

  • I have read and followed contributing guidelines

  • I discussed changes with code owners prior to submitting this pull request

  • I have not skipped any automated checks

  • All existing and new tests passed

  • I have updated the documentation accordingly


Make sure to have followed the contributing guidelines before submitting.

@Kesari3008 Kesari3008 added the validated If the pull request is validated for automation. label Oct 4, 2024
@Kesari3008 Kesari3008 requested a review from a team as a code owner October 4, 2024 10:10
@@ -0,0 +1,13 @@
{
"presets": [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to avoid babel for this package ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without Babel, the build gets impacted. Tried it when working on BYODS SDK, build started to fail

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think there will be tooling changes needed to fix, just take a note and we can fix it later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok will have a story created to address this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arun3528 - Why are we trying to get rid of babel though?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does babel do and what happens when we remove it?

Copy link
Contributor

@sreenara sreenara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the comments

webpack.config.js Outdated Show resolved Hide resolved
webpack.config.js Show resolved Hide resolved
tooling/lib/build.js Show resolved Hide resolved
packages/@webex/contact-center/package.json Outdated Show resolved Hide resolved
packages/@webex/contact-center/package.json Outdated Show resolved Hide resolved
packages/@webex/contact-center/src/cc.ts Outdated Show resolved Hide resolved
import {WCC_API_GATEWAY} from './constants';

export default class ContactCenter extends WebexPlugin implements IContactCenter {
namespace = 'WebexCC';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question.. what does this namespace do and where do we utilize it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, but it was being used in all the plugins. Will check and update here

packages/@webex/contact-center/src/config.ts Outdated Show resolved Hide resolved
docs/samples/contact-center/app.js Outdated Show resolved Hide resolved
docs/samples/contact-center/index.html Outdated Show resolved Hide resolved
packages/@webex/contact-center/README.md Outdated Show resolved Hide resolved
@@ -0,0 +1,13 @@
{
"presets": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arun3528 - Why are we trying to get rid of babel though?

import {CCConfig, IContactCenter, WebexSDK} from './types';

export default class ContactCenter extends WebexPlugin implements IContactCenter {
namespace = 'WebexCC';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this namespace useful?

docs/samples/contact-center/index.html Outdated Show resolved Hide resolved
docs/samples/contact-center/index.html Outdated Show resolved Hide resolved
packages/@webex/contact-center/package.json Outdated Show resolved Hide resolved
packages/@webex/contact-center/src/types.ts Outdated Show resolved Hide resolved
packages/@webex/contact-center/src/types.ts Outdated Show resolved Hide resolved
};
}

export interface WebexSDK {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not be exhaustive but a good start to get rid of all the ts-ignores in the other packages. Considering that, should we keep this somewhere common and not inside the CC SDK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do you recommend it to keep it? For now I kept it within CC SDK, because we will modify it as per CC SDK, but if we keep it in common place, the object needs to take care of all the functions and objects any package can use and then we have to take care of those type in each folder so not sure at the moment if that might introduce some sort of type errors

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We won't have to use it in other packages immediately but will help us improve by contributions from other teams. Can be inside Webex Core package or webex-common package.

If this is not too much change, we shall just keep it there and import here so that we can introduce this object to other packages also slowly and when we do so, this can be expanded

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkesavan13 @Kesari3008 this can be done in a future PR and if we have any other additional dependencies on the @webex/common package.

webpack.config.js Outdated Show resolved Hide resolved
Copy link
Contributor

@sreenara sreenara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this with 1 comment that can be taken care of in another PR

@@ -0,0 +1,99 @@
import {ServiceHost} from 'packages/calling/dist/types/SDKConnector/types';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be taken care of in a separate PR, but do we want to depende on calling?
If we depend on calling, we should use @webex/calling in our dependency instead of directly referring to the types.

@sreenara sreenara dismissed mkesavan13’s stale review October 11, 2024 08:21

Kesava is on leave. Need to merge this today for other PRs.

@sreenara sreenara merged commit 7e546e3 into webex:feat/wxcc Oct 11, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validated If the pull request is validated for automation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants