You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/docs/pages/concepts.mdx
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -28,13 +28,13 @@ A connection uses a keyring object to provide authentication, access token refre
28
28
29
29
## Event source
30
30
31
-
[Event sources](/snap-in-development/references/event-sources) collect events from webhooks, emails, and timer-based API calls. Events can also be manually published. DevRev supports the ingestion of webhooks from any source. Each event source is assigned to a dev org.
31
+
[Event sources](/snapin-development/references/event-sources) collect events from webhooks, emails, and timer-based API calls. Events can also be manually published. DevRev supports the ingestion of webhooks from any source. Each event source is assigned to a dev org.
32
32
33
33
For example, if you want to collect webhook events from an organization's GitHub, create an event source which in turn gives us a URL to subscribe to on GitHub. Webhook events published to this URL are available from this event source.
34
34
35
35
## Function
36
36
37
-
The framework for executing code provided by users is [functions](/snap-in-development/references/functions). Currently, Javascript/TypeScript can be taken as input from the user and deployed as a function.
37
+
The framework for executing code provided by users is [functions](/snapin-development/references/functions). Currently, Javascript/TypeScript can be taken as input from the user and deployed as a function.
38
38
39
39
Connection values can be passed to a function at runtime, enabling it to execute API calls to DevRev and to external systems such as GitHub, Slack, Bitbucket, and Discord.
40
40
@@ -44,17 +44,17 @@ Snap-ins can be configured to enable and disable features, based on custom input
44
44
45
45
## Commands
46
46
47
-
A user can trigger [commands](/snap-in-development/references/commands) on different surfaces based on some parameters. Once a command is executed, a function is triggered.
47
+
A user can trigger [commands](/snapin-development/references/commands) on different surfaces based on some parameters. Once a command is executed, a function is triggered.
48
48
49
49
A developer can develop commands to be included in a snap-in Version along with associated functions. These commands are installed when the snap-in is installed.
50
50
51
51
As part of the snap-in, commands have access to keyrings, global variables, and event sources.
52
52
53
53
## Hooks
54
54
55
-
[Hooks](/snap-in-development/references/hooks) enable developers to invoke functions when various events in the lifecycle of a snap-in occur. Hooks can be used to perform various actions based on the event such as validating the snap-in inputs and keyrings when the configuration is updated, registering event-sources and webhooks in external platforms when snap-in is activated, or setting custom fields to be used by the snap-in.
55
+
[Hooks](/snapin-development/references/hooks) enable developers to invoke functions when various events in the lifecycle of a snap-in occur. Hooks can be used to perform various actions based on the event such as validating the snap-in inputs and keyrings when the configuration is updated, registering event-sources and webhooks in external platforms when snap-in is activated, or setting custom fields to be used by the snap-in.
56
56
57
-
Detailed documentation on hooks can be found in the [hooks reference](/snap-in-development/references/hooks).
57
+
Detailed documentation on hooks can be found in the [hooks reference](/snapin-development/references/hooks).
58
58
59
59
## States
60
60
@@ -76,7 +76,7 @@ The following diagram illustrates the transitions between different states.
76
76
77
77
## Snap-kit
78
78
79
-
[Snap-kit](/snap-in-development/references/snapkit) defines UI customization components. It's defined in the snap-in package and used to display developer-defined components. A snap-kit component can display data to a user or collect input for triggering a function.
79
+
[Snap-kit](/snapin-development/references/snapkit) defines UI customization components. It's defined in the snap-in package and used to display developer-defined components. A snap-kit component can display data to a user or collect input for triggering a function.
Copy file name to clipboardExpand all lines: fern/docs/pages/developer-intro.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ A brief [tutorial](/api-reference/getting-started) shows you how to access the A
10
10
11
11
Specifications covering the supported APIs are based on OpenAPI Specification 3.0. You can download the specs to use an OpenAPI 3.0-compliant tool to perform a variety of actions, including rendering them in UI and generating SDKs. Two [versions](/about/versioning) of the DevRev API are available: [public](/public) and [beta](/beta) (early access). Use the drop-down menu in the upper-left corner of this site to switch between versions.
12
12
13
-
To take action based on events from the DevRev platform, [webhooks](/guides/getting-started-with-webhooks) are also supported.
13
+
To take action based on events from the DevRev platform, [webhooks](/guides/webhooks) are also supported.
14
14
<Cards>
15
15
<Card
16
16
title="Public"
@@ -27,7 +27,7 @@ To take action based on events from the DevRev platform, [webhooks](/guides/gett
27
27
28
28
## 🧩 Snap-ins
29
29
30
-
Numerous snap-ins are available on the DevRev [Marketplace](https://devrev.ai/marketplace). The [snap-in framework](/snap-in-development/concepts) is available for you to create your own snap-ins for automation of DevRev workflows or integration with other system.
30
+
Numerous snap-ins are available on the DevRev [Marketplace](https://devrev.ai/marketplace). The [snap-in framework](/snapin-development/concepts) is available for you to create your own snap-ins for automation of DevRev workflows or integration with other system.
Copy file name to clipboardExpand all lines: fern/docs/pages/pagination.mdx
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
A lot of the time, when you're making calls to the DevRev API, there'll be a lot of results to return. For that reason, we paginate the results to make sure responses are easier to handle.
2
+
DevRev API uses a cursor-based pagination to provide consistency and support large data.
2
3
Let's say your initial call is asking to list all the users in an org; the result could be a massive response with hundreds of thousands of pages. That's not a good place to start.
3
4
4
5
When you make an API call, it returns a cursor with a random code. If there are more pages available, the response will include a field called `next_cursor` which points to the next page.
Copy file name to clipboardExpand all lines: fern/docs/pages/plug-sdk/methods.mdx
+48-17Lines changed: 48 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,28 @@
1
1
Our PLuG widget SDK is a powerful tool designed to further enhance our widget on your website or application. With our SDK, you can seamlessly integrate our feature-rich widget by empowering you to create a dynamic and personalized user experience. Let's get started.
Calling the `init()` method initializes the PLuG widget on your website. Initializing the PLuG widget is necessary for you to perform any other actions on the PLuG widget SDK.
9
+
-`plugSDK.shutdown()` End the user session which is currently initialized in PLuG widget.
10
+
11
+
-`plugSDK.toggleWidget()` Open/close the chat widget.
12
+
13
+
-`plugSDK.toggleSearchAgent()` Open/close the search agent.
14
+
15
+
-`plugSDK.onEvent()` Perform specific actions based on the payload type received from the PLuG widget.
-`plugSDK.toggleWidget(true, 'create_conversation', {startConversationContent: 'Hi',});` Start a conversation.
20
+
21
+
-`plugSDK.prefillSearchQuery(query:"string")` Prefill the search input of the search agent.
22
+
23
+
## Initialize chat
24
+
25
+
Calling the `init()` method initializes the PLuG chat widget on your website. Initializing the PLuG widget is necessary for you to perform any other actions on the PLuG widget SDK.
16
26
17
27
```jsx
18
28
useEffect(() => {
@@ -26,6 +36,25 @@ useEffect(() => {
26
36
When React is using `Strict` mode, you might get a warning message from `window.plugSDK.init()` being called multiple times. These errors won't impact the installation and functioning of the widget.
27
37
</Callout>
28
38
39
+
## Initialize search
40
+
41
+
Calling the `initSearchAgent()` method initializes the PLuG Search Agent on your website. Initializing search is necessary for you to perform any other actions on the PLuG widget SDK.
42
+
43
+
```jsx
44
+
useEffect(() => {
45
+
window.plugSDK.init({
46
+
app_id:'<your_unique_app_id>',
47
+
disable_plug_chat_window:true,
48
+
});
49
+
50
+
window.plugSDK.onEvent((payload) => {
51
+
if (payload.type==='ON_PLUG_WIDGET_READY') {
52
+
window.plugSDK.initSearchAgent();
53
+
}
54
+
});
55
+
}, []);
56
+
```
57
+
29
58
## Shutdown the widget
30
59
31
60
The `shutdown()` method is helpful when you want to end the user session which is currently initialized in the PLuG widget. You can use this method to clear your users' conversations and tickets when they log out of your application.
@@ -49,10 +78,11 @@ Once the `shutdown()` method is called, all the other functionality in the widge
49
78
50
79
## Open or close the widget
51
80
52
-
To control whether the PLuG widget launcher screen is open, you can use the `togglewidget()` method with a boolean value. Your code needs to listen to the event `ON_PLUG_WIDGET_READY` to call this method. If the widget isn't ready then this method won’t make any action.
81
+
To control whether the PLuG widget launcher screen is open, you should use either the `togglewidget()` method with a boolean value or the `toggleSearchAgent()`method, depending on which PLuG instance you are using.
|`ON_PLUG_WIDGET_CLOSED`| The PLuG widget is closed. |
72
-
|`ON_PLUG_WIDGET_OPENED`| The PLuG widget is opened. |
73
-
|`ON_PLUG_WIDGET_READY`| The PLuG widget is ready. |
74
-
|`ON_PLUG_WIDGET_UNREAD_COUNT_CHANGE`| The user receives a new message to their PLuG. You can also listen to the number of unread messages and display that to your user. |
99
+
-`ON_PLUG_WIDGET_CLOSED` The PLuG widget is closed.
100
+
101
+
-`ON_PLUG_WIDGET_OPENED` The PLuG widget is opened.
102
+
103
+
-`ON_PLUG_WIDGET_READY` The PLuG widget is ready.
104
+
-
105
+
-`ON_PLUG_WIDGET_UNREAD_COUNT_CHANGE` The user receives a new message to their PLuG. You can also listen to the number of unread messages and display that to your user.
Copy file name to clipboardExpand all lines: fern/docs/pages/publish_to_marketplace.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -34,11 +34,11 @@ The publishing process commences by initiating a marketplace submission, which e
34
34
35
35
## Get started
36
36
37
-
To get started with publishing marketplace item, you need DevRev CLI. Refer to [DevRev CLI Cheatsheet](/snap-in-development/references/install-dev-rev-cli) for more information.
37
+
To get started with publishing marketplace item, you need DevRev CLI. Refer to [DevRev CLI Cheatsheet](/snapin-development/references/install-dev-rev-cli) for more information.
38
38
39
39
### Create a snap-in
40
40
41
-
To proceed with making a submission in marketplace, you need a snap-in for which you are creating this submission. If you are new to snap-ins, [follow the development and deployment guide](/snap-in-development/tutorials/overview) to create your first snap-in.
41
+
To proceed with making a submission in marketplace, you need a snap-in for which you are creating this submission. If you are new to snap-ins, [follow the development and deployment guide](/snapin-development/tutorials/overview) to create your first snap-in.
Copy file name to clipboardExpand all lines: fern/docs/pages/references/cli.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -312,7 +312,7 @@ The `--force` flag deletes the snap-in even if the `deactivate` hook fails. If t
312
312
313
313
## Snap-in context
314
314
315
-
The CLI persists in the context of the CLI in a [snap-in context](#snap-in-context). The context is used to store the following information per snap-in package slug:
315
+
The CLI persists in the context of the CLI in a snap-in context. The context is used to store the following information per snap-in package slug:
316
316
317
317
1. The ID of the snap-in package owning the slug.
318
318
2. The ID of the last created/upgraded snap-in version, if any.
Copy file name to clipboardExpand all lines: fern/docs/pages/references/functions.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Using functions, you can provide custom code and link it to your event sources, automations, or snap-kit actions. Functions are written in JavaScript and can be used to transform events, send notifications, or perform any other custom logic including network calls.
2
2
3
-
In order to create a snap-in version, functions must be defined as shown in the [code samples](/snap-in-development/code-samples). Functions are packaged and provided as an artifact at the time of snap-in version creation and then used to deploy functions to snap-in versions. An artifact may contain multiple function definitions. The artifact is a zip file containing the following files:
3
+
In order to create a snap-in version, functions must be defined as shown in the [code samples](/snapin-development/code-samples). Functions are packaged and provided as an artifact at the time of snap-in version creation and then used to deploy functions to snap-in versions. An artifact may contain multiple function definitions. The artifact is a zip file containing the following files:
4
4
5
5
```bash
6
6
/
@@ -26,4 +26,4 @@ functions:
26
26
- `name`: It is the function name that should match the corresponding function name in the folder.
27
27
- `description`: It describes the function.
28
28
29
-
Refer to the [function invocation](/snap-in-development/references/function-invocation) for details about the exact payload of the function.
29
+
Refer to the [function invocation](/snapin-development/references/function-invocation) for details about the exact payload of the function.
Copy file name to clipboardExpand all lines: fern/docs/pages/references/hooks.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,9 @@ hooks:
18
18
function: update-resource
19
19
```
20
20
21
-
The above definition would register the hooks and invoke the provided functions alongside each hook. The functions can be defined in the manifest and provided in the code as explained in the [functions reference](/snap-in-development/references/functions).
21
+
The above definition would register the hooks and invoke the provided functions alongside each hook. The functions can be defined in the manifest and provided in the code as explained in the [functions reference](/snapin-development/references/functions).
22
22
23
-
For the event schema received by the function invocation, refer to the [function invocation reference](/snap-in-development/references/function-invocation).
23
+
For the event schema received by the function invocation, refer to the [function invocation reference](/snapin-development/references/function-invocation).
24
24
25
25
The event name is the identifier for the hook. The event name can be used to identify the hook that's being invoked. The identifiers are defined in the summary table below.
Copy file name to clipboardExpand all lines: fern/docs/pages/references/manifest.mdx
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
<Calloutintent="note">
2
-
The following section is for version 2 of the manifest specification. For the previous version, see [Manifest V1](/snap-in-development/references/snap-in-v-1-manifest).
2
+
The following section is for version 2 of the manifest specification. For the previous version, see [Manifest V1](/snapin-development/references/v1-manifest).
3
3
</Callout>
4
4
5
5
The snap-in manifest is what the developers write to define a snap-in. The manifest has the following sections:
@@ -14,7 +14,7 @@ version: 2
14
14
15
15
## Keyrings
16
16
17
-
Keyrings are secret tokens used to make calls to external systems. They can be categorized either as organizationscoped or userscoped. Keyrings are specified in the manifest with the following syntax:
17
+
Keyrings are secret tokens used to make calls to external systems. They can be categorized either as organization-scoped or user-scoped. Keyrings are specified in the manifest with the following syntax:
18
18
19
19
```yaml
20
20
keyrings:
@@ -61,7 +61,7 @@ Keyrings defined in the manifest can be provided in the snap-in configuration sc
61
61
62
62
Organization keyrings are common to the organization, while user keyrings are set per user. User keyrings are optional, so the developer must correctly handle cases where the keyring isn't found.
63
63
64
-
To view the supported connection types, see [Keyrings](/snap-in-development/references/keyrings).
64
+
To view the supported connection types, see [Keyrings](/snapin-development/references/keyrings).
65
65
66
66
## Developer keyrings
67
67
@@ -143,7 +143,7 @@ Event sources can be categorized as "organization" level and "user" level. Event
143
143
144
144
```
145
145
146
-
Refer to [Event sources](/snap-in-development/references/event-sources) for a checklist of supported event sources and their corresponding event types.
146
+
Refer to [Event sources](/snapin-development/references/event-sources) for a checklist of supported event sources and their corresponding event types.
147
147
148
148
Refer to the webhook event-request example for a list of supported webhooks:
0 commit comments