@bigbinary/neeto-integrations-frontend 2.1.1 → 2.2.0-beta1

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 CHANGED
@@ -1,120 +1,177 @@
1
- @bigbinary/neeto-integrations-frontend
1
+ # neeto-integrations-nano
2
2
 
3
- ![npm](https://img.shields.io/npm/v/@bigbinary/neeto-integrations-frontend?color=greenyellow)
4
- ![npm](https://img.shields.io/npm/dw/@bigbinary/neeto-integrations-frontend?color=greenyellow)
3
+ The `neeto-integrations-nano` provides support for third-party integrations to neeto
4
+ applications. The nano exports the `@bigbinary/neeto-integrations-frontend` NPM package and `neeto-integrations-engine` Rails engine for development.
5
5
 
6
- UI for integrations for all neeto products.
6
+ The engine handles the authentication, webhooks and token management for integrations
7
+ with the following providers.
7
8
 
8
- ## Installation
9
+ - Meta ( Facebook, Instagram, WhatsApp )
10
+ - Google ( Analytics, YouTube )
11
+ - Microsoft ( MS Teams)
12
+ - Zapier
13
+ - Twilio
9
14
 
10
- ```bash
11
- yarn add @bigbinary/neeto-integrations-frontend
12
- ```
15
+ Host can provide required permissions for a supported third-party integration, then engine will handle the authentication, token storing and refreshing for the host. Tokens, account details and webhook subscription details are stored in tables handled by the engine.
13
16
 
14
- ## Usage
17
+ The frontend package provides components to handle integration card, steps, disconnect and other integration configuration page support.
15
18
 
16
- Available components:
19
+ ## Contents
20
+ 1. [Development with Host application](#development-with-host-application)
21
+ - [Engine](#engine)
22
+ - [Installation](#installation)
23
+ - [Details](#details)
24
+ - [neeto products currently using this engine](#neeto-products-currently-using-this-engine)
25
+ - [Frontend package](#frontend-package---bigbinaryneeto-integrations-frontend)
26
+ - [Installation](#installation-1)
27
+ - [Usage](#usage)
28
+ - [Product integrations](#product-integrations)
29
+ 2. [Instructions for publishing](#instructions-for-publishing)
17
30
 
18
- Available components:
31
+ ## Development with Host application
32
+
33
+ ### Engine
34
+
35
+ #### Installation
19
36
 
20
- - [Connect](./docs/connect/README.md)
21
- - [Finish](./docs/finish/README.md)
22
- - [Demo](./docs/demo/README.md)
23
- - [DisconnectAlert](./docs/DisconnectAlert/README.md)
37
+ 1. Add the gem to your `Gemfile`.
24
38
 
25
- View the [example app](./example/src/App.jsx) to see usage.
39
+ ```ruby
40
+ source "NEETO_GEM_SERVER_URL" do
41
+ gem "neeto-integrations-engine"
42
+ end
43
+ ```
44
+
45
+ 2. Run `bundle install`
26
46
 
27
- ## Development
47
+ 3. Add the required env variables to `.env.development` and update your
48
+ `secrets.yml`. Refer [OAuth Config](./docs/engine/oauth-config.md) for more details on specific
49
+ integrations.
28
50
 
29
- Install all the dependencies by executing the following command
51
+ 4. Import migrations to your project:
30
52
 
31
53
  ```bash
32
- yarn install
54
+ bundle exec rails neeto_integrations_engine:install:migrations
33
55
  ```
34
56
 
35
- ### Using example app
57
+ 5. Add the migrations to the database:
58
+
59
+ ```bash
60
+ bundle exec rails db:migrate
61
+ ```
36
62
 
37
- Start the development server using the `yarn start` command. Development server
38
- will run the example app using webpack.
63
+ 6. Add the Integrations List required to `config/neeto_integrations.yml`. Also,
64
+ add the required integration(not natively supported by engine) as
65
+ `other_applications` for post Integration UI support.
66
+
67
+ ```yml
68
+ applications:
69
+ - title: "Instagram Chat"
70
+ service_name: Instagram
71
+ provider: Facebook
72
+ service_type: Social
73
+ scope:
74
+ - email
75
+ - public_profile
76
+ - pages_show_list
77
+ - instagram_manage_messages
78
+ - instagram_basic
79
+ other_applications:
80
+ - title: "neetoDesk"
81
+ service_name: neetoDesk
82
+ service_type: Support
83
+ provider: neeto
84
+ ```
39
85
 
40
- ### Using host application
86
+ Refer the [Oauth Config](./docs/engine/oauth-config.md) for list of supported `provider`,
87
+ `service_name` and `service_type`.
41
88
 
42
- 1. Clone this repository.
43
- 2. Run `yarn install` to download the dependencies and setup the development
44
- environment.
45
- 3. Have a host application ready.
46
- 4. Run `yarn build --watch` to automatically transpile code as you save the
47
- file. You can omit the `--watch` flag if you want to run the build only once.
48
- 5. In a different terminal, run `yalc publish` to publish the
49
- neeto-integrations-frontend to the local yalc store.
50
- 6. Run `yalc add @bigbinary/neeto-integrations-frontend` to install the
51
- neeto-integrations-frontend to the host application.
52
- 7. After making necessary changes to `neeto-integrations-frontend`, run
53
- `yalc push` to push the changes to the host application (assuming that you
54
- are in watch mode and the changes are bundled automatically). Restart
55
- webpack-dev-server in host if changes are not applied.
56
- 8. Video explanation on how to use yalc: https://vimeo.com/722958162/9e931b640c
89
+ 7. Import data migration to update the integrations list with the newly added
90
+ integration from `config/neeto_integrations.yml`:
57
91
 
58
- ## Exports and Types
92
+ ```bash
93
+ bundle exec rails generate neeto_integrations_engine:integrations_list:update
94
+ ```
59
95
 
60
- The **neeto-integrations-frontend** JavaScript library offers two types of
61
- exports: the common bundle and the per-component bundle.
96
+ Or manually execute the following command in all the environments to update the
97
+ integrations list. Although the above approach is recommended.
62
98
 
63
- ### Common Bundle
99
+ ```bash
100
+ bundle exec rails neeto_integrations_engine:integrations_list:update
101
+ ```
64
102
 
65
- The common bundle includes components such as `Card`, `Modal`, and `Connect`.
66
- You can import them using the following syntax:
103
+ 8. Mount Neeto Integrations to your `routes.rb`:
67
104
 
68
- ```js
69
- import { Card, Modal, Connect } from "@bigbinary/neeto-integrations-frontend";
105
+ ```ruby
106
+ mount NeetoIntegrationsEngine::Engine => "/neeto_integrations"
70
107
  ```
71
108
 
72
- To add a component to the common bundle, follow these steps:
109
+ 9. Add association to `User` model:
73
110
 
74
- 1. Place the component inside the `components` folder
75
- 2. Add the necessary types for the component in the `types.d.ts` file located in
76
- the library's root directory
77
- 3. Export the component in the `index.js` file located in the library's root
78
- directory
111
+ ```ruby
112
+ has_many :auth_requests, class_name: "NeetoIntegrationsEngine::AuthRequest", dependent: :destroy
113
+ ```
114
+
115
+ 10. Add association to `Organization` model:
79
116
 
80
- ### Per-Component Bundle
117
+ ```ruby
118
+ has_many :integrated_apps, class_name: "NeetoIntegrationsEngine::IntegratedApp", dependent: :destroy
119
+ ```
81
120
 
82
- Each component inside the `components/Integrations` folder has its own bundle.
83
- For example, the `ZapierForm` component can be imported using the following
84
- syntax:
121
+ 11. If you want your integration to be specific to other model like `User`,
122
+ `Form` , etc, add association as:
85
123
 
86
- ```js
87
- import ZapierForm from "@bigbinary/neeto-integrations-frontend/ZapierForm";
124
+ ```ruby
125
+ has_many :integrated_apps, as: :integrable, class_name: "NeetoIntegrationsEngine::IntegratedApp", dependent: :destroy
88
126
  ```
89
127
 
90
- To export a component as its own bundle, follow these steps:
128
+ #### Details
91
129
 
92
- 1. Place the component strictly inside the `components/Integrations` folder.
93
- 2. Add the necessary types for the component in the `types` folder.
130
+ - [Endpoints](./docs/engine/endpoints.md)
131
+ - [Errors](./docs/engine/errors.md)
132
+ - [MS Teams credentials and integration information](./docs/engine/ms-teams.md)
94
133
 
95
- ## Building and releasing.
134
+ #### neeto products currently using this engine
96
135
 
97
- The `@bigbinary/neeto-integrations-frontend` package gets published to NPM when
98
- we merge a PR with `patch`, `minor` or `major` label to the `main` branch. The
99
- `patch` label is used for bug fixes, `minor` label is used for new features and
100
- `major` label is used for breaking changes. You can checkout the
101
- `Create and publish releases` workflow in GitHub Actions to get a live update.
136
+ | Products | Integrated (Used in production) | Integration (Currently in development/staging) |
137
+ | :---------: | :------------------------------------------------------------------: | :--------------------------------------------: |
138
+ | neetoChat | :x: | Instagram, WhatsApp, Twilio, Zapier, MS Teams |
139
+ | neetoSocial | Instagram(page), Facebook(page), Google(Analytics, YouTube), Twitter | :x: |
140
+ | neetoCal | MS Teams | :x: |
141
+ | neetoForm | :x: | MS Teams |
102
142
 
103
- In case if you missed to add the label, you can manually publish the package.
104
- For that first you need to create a PR to update the version number in the
105
- `package.json` file and merge it to the `main` branch. After merging the PR, you
106
- need to create a
107
- [new github release](https://github.com/bigbinary/neeto-integrations-frontend/releases/new)
108
- from main branch. Whenever a new release is created with a new version number,
109
- the github actions will automatically publish the built package to npm. You can
110
- checkout the `Publish to npm` workflow in GitHub Actions to get a live update.
143
+ ### Frontend package - @bigbinary/neeto-integrations-frontend
144
+
145
+ ![npm](https://img.shields.io/npm/v/@bigbinary/neeto-integrations-frontend?color=greenyellow)
146
+ ![npm](https://img.shields.io/npm/dw/@bigbinary/neeto-integrations-frontend?color=greenyellow)
111
147
 
112
- Please note that before publishing the package, you need to verify the
113
- functionality in some of the neeto web-apps locally using `yalc` package
114
- manager. The usage of yalc is explained in this video:
115
- https://youtu.be/QBiYGP0Rhe0
148
+ UI for integrations for all neeto products.
116
149
 
117
- # Product integrations
150
+ #### Installation
151
+
152
+ ```bash
153
+ yarn add @bigbinary/neeto-integrations-frontend
154
+ ```
155
+
156
+ #### Usage
157
+
158
+ Available components:
159
+
160
+ - Components
161
+ - [Card](./docs/frontend/components/Card/README.md)
162
+ - [Connect](./docs/frontend/components/connect/README.md)
163
+ - [Daily.co](./docs/frontend/components/daily.co/README.md)
164
+ - [Demo](./docs/frontend/components/demo/README.md)
165
+ - [DisconnectAlert](./docs/frontend/components/DisconnectAlert/README.md)
166
+ - [Finish](./docs/frontend/components/finish/README.md)
167
+ - [GoogleCalendar](./docs/frontend/components/GoogleCalendar/README.md)
168
+ - [Modal](./docs/frontend/components/Modal/README.md)
169
+ - [Twilio](./docs/frontend/components/twilio/README.md)
170
+ - [WalkthroughModal](./docs/frontend/components/WalkthroughModal/README.md)
171
+ - [Zoom](./docs/frontend/components/zoom/README.md)
172
+ - [Exports and Types](./docs/frontend/exports-and-types.md)
173
+
174
+ #### Product integrations
118
175
 
119
176
  | Projects | IntegrationsFrontend |
120
177
  | ------------ | :------------------: |
@@ -122,6 +179,14 @@ https://youtu.be/QBiYGP0Rhe0
122
179
  | neetoDesk | :white_check_mark: |
123
180
  | neetoForm | :white_check_mark: |
124
181
  | neetoInvoice | :white_check_mark: |
125
- | neetoBugtrap | :white_check_mark: |
182
+ | neetoKB | :white_check_mark: |
126
183
  | neetoMonitor | :white_check_mark: |
127
184
  | neetoCal | :white_check_mark: |
185
+
186
+ ### Instructions for development
187
+
188
+ Check the [Frontend package development guide](https://neeto-engineering.neetokb.com/p/a-d34cb4b0) for step-by-step instructions to develop the frontend package.
189
+
190
+ ## Instructions for Publishing
191
+
192
+ Consult the [building and releasing packages](https://neeto-engineering.neetokb.com/articles/building-and-releasing-packages) guide for details on how to publish.
@@ -0,0 +1,128 @@
1
+ {
2
+ "neetoIntegrations": {
3
+ "common": {
4
+ "continue": "Continue",
5
+ "connect": "Connect",
6
+ "connected": "Connected",
7
+ "manage": "Manage",
8
+ "disconnect": "Disconnect",
9
+ "finish": "Finish",
10
+ "required": "Required",
11
+ "delete": "Delete",
12
+ "tryAgain": "Try Again",
13
+ "verify": "Verify",
14
+ "phNo": "Phone number",
15
+ "saveChanges": "Save changes",
16
+ "disconnectIntegration": "Disconnect {{integration, anyCase}}",
17
+ "connectIntegration": "Connect {{integration, anyCase}}",
18
+ "manageIntegration": "Manage {{integration, anyCase}}",
19
+ "helpDocUrl": "To learn more about the {{integration, anyCase}} integration, see the <helpLink>Help center</helpLink>."
20
+ },
21
+ "errors": {
22
+ "required": "{{entity}} is required"
23
+ },
24
+ "tags": {
25
+ "connected": "Connected",
26
+ "expired": "Expired"
27
+ },
28
+ "tooltip": {
29
+ "integrationNotAvailable": "This integration is not available right now."
30
+ },
31
+ "demo": {
32
+ "title": "Check how it behaves",
33
+ "subtitle": "Watch the following video to understand how you can utilize this integration:",
34
+ "iFrameTitle": "Watch this video to utilize the integration"
35
+ },
36
+ "walkthroughModal": {
37
+ "header": "Check how it behaves",
38
+ "continue": "Continue"
39
+ },
40
+ "zapier": {
41
+ "apiKeys": "API Keys",
42
+ "copyApiKey": "Copy API Key",
43
+ "emptyText": "Generate an API Key to connect to the Zapier platform",
44
+ "generateApiKey": "Generate API Key",
45
+ "labelInputPlaceholder": "Enter a Label for the new API Key",
46
+ "tableColumns": {
47
+ "createdAt": "Created At",
48
+ "label": "Label"
49
+ },
50
+ "newApiKeyInstruction": "Here is your Zapier API key. Make sure to copy the API key now as the API key will not be shown again. If you lose the API key then you can generate a new API key anytime.",
51
+ "tableTitle": "Previously Generated API Keys",
52
+ "deleteApiKey": {
53
+ "title": "Delete API Key?",
54
+ "message": "You are permanently deleting the API Key <strong>{{key}}</strong>. This can't be undone."
55
+ },
56
+ "walkthroughText": "Check how it behaves",
57
+ "helpDoc": "Help document",
58
+ "label": {
59
+ "required": "Label is required",
60
+ "noBlankSpaces": "Label should not contain blank spaces"
61
+ }
62
+ },
63
+ "twilio": {
64
+ "sid": "SID",
65
+ "authToken": "Auth token",
66
+ "validations": {
67
+ "sidReq": "SID is required",
68
+ "authTokenReq": "Auth token is required",
69
+ "phNumReq": "Phone number is required"
70
+ },
71
+ "smsConfiguration": {
72
+ "delete": "Twilio SMS integration has been successfully deleted.",
73
+ "configuredSuccess": "Twilio SMS integration has been successfully configured.",
74
+ "invalidCredentials": "Twilio credentials are invalid",
75
+ "invalidPhoneNumberConfig": "Twilio phone number is invalid"
76
+ }
77
+ },
78
+ "steps": {
79
+ "configure": "Configure"
80
+ },
81
+ "daily": {
82
+ "title": "Daily.co",
83
+ "description": "Include daily.co links in your meetings booked using {{appName, anyCase}}.",
84
+ "apiKey": "API key",
85
+ "helpDoc": "<externalLink>See instructions</externalLink> on getting the API key",
86
+ "yourApiKey": "You are connected to Daily.co with the API key: <wrapper><span>{{apiKey, anyCase}}</span><copy /></wrapper>",
87
+ "connect": {
88
+ "account": "Connect your Daily.co account",
89
+ "title": "Connect Daily.co"
90
+ },
91
+ "connected": "You are connected to Daily.co",
92
+ "disconnect": {
93
+ "title": "Disconnect Daily.co integration?",
94
+ "message": "This action will disconnect Daily.co integration."
95
+ },
96
+ "walkthroughText": "Check how it behaves"
97
+ },
98
+ "browserTitles": {
99
+ "integrations": {
100
+ "dailyco": "Daily Co"
101
+ }
102
+ },
103
+ "zoom": {
104
+ "title": "Zoom",
105
+ "description": "Include Zoom video links in your meetings booked using {{appName, anyCase}}.",
106
+ "connect": "Connect your Zoom account",
107
+ "connected": "You are connected to Zoom",
108
+ "account": "Your connected email is <underline>{{email}}</underline>.",
109
+ "disconnect": {
110
+ "title": "Disconnect Zoom integration?",
111
+ "message": "This action will disconnect Zoom integration."
112
+ }
113
+ },
114
+ "google": {
115
+ "connect": {
116
+ "title": "Connect your Google account",
117
+ "signIn": "Sign in with Google",
118
+ "reminderToAcceptPermissions": "When connecting to your Google Account, please make sure to <strong>select the checkbox</strong> that grants app access to your Google Calendar after clicking the 'Sign in with Google' button. This checkbox can be found in the permission request screen as shown in the picture below.",
119
+ "selectCheckbox": "select the checkbox"
120
+ },
121
+ "finish": {
122
+ "title": "Google account is successfully integrated to neetoCal"
123
+ },
124
+ "calendar": "Google calendar",
125
+ "statusForbidden": "An unknown error occurred in your google integration, please reconnect."
126
+ }
127
+ }
128
+ }