Skip to content

Commit a78d7c5

Browse files
committed
Merge remote-tracking branch 'origin' into shivansh/unit-ui-hint
2 parents fb74fb6 + cef03ae commit a78d7c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+24382
-11189
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/fern-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
registry-url: https://npm.pkg.github.com/
2121
env:
2222
NODE_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
23+
2324

2425
- name: Build Navigation
2526
run: |

.github/workflows/preview-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
registry-url: https://npm.pkg.github.com/
2323
env:
2424
NODE_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
25+
2526

2627
- name: Install Fern
2728
run: npm install -g fern-api

.github/workflows/publish-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
registry-url: https://npm.pkg.github.com/
2222
env:
2323
NODE_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
24+
2425

2526
- name: Download Fern
2627
run: npm install -g fern-api

.github/workflows/publish-typescript.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
registry-url: https://npm.pkg.github.com/
2929
env:
3030
NODE_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
31+
3132

3233
- name: Build Navigation
3334
run: |

changelog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def main(vrn, d):
1818
print('Sending request to LLM.')
1919
l = llm_client.get_response(p)
2020
log_file = f"./fern/apis/{vrn}/changelog/{d}.md"
21-
if (l):
21+
if (l) and 'Error' not in l.partition('\n')[0]:
2222
with open(log_file, 'w', encoding="utf-8") as outfile:
2323
outfile.write(llm_client.get_lines_between_tags(l, 'changelog'))
2424
print(f"Wrote log to {log_file}.")
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
export const Search = () => {
2+
return (
3+
<button
4+
id="fern-search-button"
5+
className="fern-search-bar w-full"
6+
style={{ marginBottom: '8px' }}
7+
onClick={() => {
8+
if ((window as any).plugSDK) {
9+
(window as any).plugSDK.toggleSearchAgent()
10+
}
11+
}}>
12+
<span className="search-placeholder">
13+
<svg
14+
width="1.5em"
15+
height="1.5em"
16+
viewBox="0 0 24 24"
17+
strokeWidth="1.5"
18+
fill="none"
19+
xmlns="http://www.w3.org/2000/svg"
20+
color="currentColor"
21+
className="size-icon-md">
22+
<path
23+
d="M17 17L21 21"
24+
stroke="currentColor"
25+
strokeLinecap="round"
26+
strokeLinejoin="round"></path>
27+
<path
28+
d="M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z"
29+
stroke="currentColor"
30+
strokeLinecap="round"
31+
strokeLinejoin="round"></path>
32+
</svg>
33+
<span>Search...</span>
34+
</span>
35+
<kbd className="keyboard-shortcut-hint">/</kbd>
36+
</button>
37+
)
38+
}

custom-implementation/src/main.tsx

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import React from 'react'
77

88
import Header from './components/header'
99
import Footer from './components/footer'
10+
11+
import { Search } from './components/search'
1012
import { ThemeSwitch } from './components/theme-switch'
1113

1214
import { getPageData } from './modules/sanity/utils'
@@ -22,16 +24,28 @@ const render = async () => {
2224
*/
2325

2426
const data = await getPageData()
27+
2528
const sidenav = document.querySelector('button.fern-search-bar')
2629
?.parentElement as HTMLElement
2730

2831
const theme = document.getElementsByTagName('html')[0].getAttribute('class')
2932

30-
if (!document.getElementById('theme-switch')) {
33+
if (!document.getElementById('sidenav-header-wrapper')) {
34+
const sidenavHeaderWrapper = document.createElement('div')
35+
sidenavHeaderWrapper.setAttribute('id', 'sidenav-header-wrapper')
36+
sidenav.appendChild(sidenavHeaderWrapper)
37+
38+
const search = document.createElement('div')
39+
search.setAttribute('id', 'search-component')
40+
sidenavHeaderWrapper.appendChild(search)
41+
ReactDOM.render(React.createElement(Search), search)
42+
3143
const wrapper = document.createElement('div')
3244
wrapper.setAttribute('id', 'theme-switch')
33-
sidenav.appendChild(wrapper)
45+
sidenavHeaderWrapper.appendChild(wrapper)
3446
ReactDOM.render(React.createElement(ThemeSwitch), wrapper)
47+
48+
sidenav.replaceWith(sidenavHeaderWrapper)
3549
}
3650

3751
const fernHeaderId = document.getElementById(FERN_CONTENT_WRAPPER_ID)
@@ -92,11 +106,46 @@ const render = async () => {
92106
if (footer) footer.style.display = 'block'
93107
},
94108
)
109+
110+
// Add Plug component directly to body
111+
if (!document.getElementById('plug-platform')) {
112+
const plugScript = document.createElement('script')
113+
plugScript.setAttribute('type', 'text/javascript')
114+
plugScript.setAttribute('id', 'plug-platform')
115+
plugScript.setAttribute('src', 'https://plug-platform.devrev.ai/static/plug.js')
116+
document.body.appendChild(plugScript)
117+
118+
// Initialize Plug SDK after script loads
119+
plugScript.onload = () => {
120+
if ((window as any).plugSDK) {
121+
(window as any).plugSDK?.init?.({
122+
app_id: data?.plug?.id,
123+
enable_session_recording: true,
124+
});
125+
126+
// Wait for the widget to be ready before adding event listeners
127+
(window as any).plugSDK.onEvent((payload: any) => {
128+
if(payload.type === "ON_PLUG_WIDGET_READY") {
129+
// Initialize search agent after widget is ready
130+
(window as any).plugSDK.initSearchAgent();
131+
132+
// Add keyboard shortcut for search agent
133+
document.addEventListener("keydown", function(event) {
134+
// Check if event.key is defined before accessing it
135+
if (event && event.key === "/") {
136+
event.preventDefault();
137+
(window as any).plugSDK.toggleSearchAgent();
138+
}
139+
});
140+
}
141+
});
142+
}
143+
}
144+
}
95145
}
96146

97147
let observations = 0
98148
document.addEventListener('DOMContentLoaded', async () => {
99-
console.log('DOMContentLoaded')
100149
await render()
101150
new MutationObserver(async (e, o) => {
102151
await render()

custom-implementation/src/modules/sanity/utils.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const SANITY_TYPES = {
1515
export const getPageData = async (): Promise<{
1616
header: object
1717
footer: object
18+
plug: { id: string }
1819
}> => {
1920
const header = await CLIENT.fetch(
2021
`*[_type == 'headerV2' && slug.current == 'developer']{
@@ -28,5 +29,11 @@ export const getPageData = async (): Promise<{
2829
}[0]`,
2930
)
3031

31-
return { header, footer }
32+
const plug = await CLIENT.fetch(
33+
`*[_type == 'externalLink' && slug.current == 'devrev-plug-app-id']{
34+
"id": href
35+
}[0]`,
36+
)
37+
38+
return { header, footer, plug }
3239
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
## New Endpoints
2+
3+
### Artifacts
4+
- [`/artifacts.versions.delete`](/beta/api-reference/artifacts/hard-delete-version): Delete an artifact version
5+
6+
### Brands
7+
- [`/brands.create`](/beta/api-reference/brands/create): Create a new brand
8+
- [`/brands.delete`](/beta/api-reference/brands/delete): Delete an existing brand
9+
- [`/brands.get`](/beta/api-reference/brands/get-post): Get the information for a brand
10+
- [`/brands.list`](/beta/api-reference/brands/list-post): List brands matching a given filter
11+
- [`/brands.update`](/beta/api-reference/brands/update): Update an existing brand
12+
13+
### Links
14+
- [`/links.replace`](/beta/api-reference/links/replace): Replace a link
15+
16+
### Metrics
17+
- [`/metric-trackers.get`](/beta/api-reference/slas/metric-trackers-get-post): Get a metric tracker
18+
19+
## Modified Endpoints
20+
21+
### Accounts
22+
- Added `subtype` and `tier` query parameters to [`/accounts.export`](/beta/api-reference/accounts/export-post) and [`/accounts.list`](/beta/api-reference/accounts/list-post)
23+
- Added `drop` property to `custom_schema_spec` in [`/accounts.create`](/beta/api-reference/accounts/create) and [`/accounts.update`](/beta/api-reference/accounts/update)
24+
25+
### Articles
26+
- Added `content_format` and `data_sources` properties in [`/articles.create`](/beta/api-reference/articles/create-article) and [`/articles.update`](/beta/api-reference/articles/update-article)
27+
- Made `applies_to_parts` optional in [`/articles.create`](/beta/api-reference/articles/create-article)
28+
29+
### Commands
30+
- Added `ai_assistant_chat` and `dm` to allowed object types in surface configuration for [`/commands.create`](/beta/api-reference/commands/create), [`/commands.update`](/beta/api-reference/commands/update) and related endpoints
31+
32+
### Conversations
33+
- Added `state` query parameter to [`/conversations.list`](/beta/api-reference/conversations/list-post) and [`/conversations.export`](/beta/api-reference/conversations/export-post)
34+
- Modified `owned_by.set` to allow empty arrays in [`/conversations.update`](/beta/api-reference/conversations/update)
35+
36+
### Groups
37+
- Added filtering by `created_by`, `name`, and `sync_metadata` fields to [`/groups.list`](/beta/api-reference/groups/list-post)
38+
39+
### Links
40+
- Added `custom_link_type` property to link objects in [`/links.create`](/beta/api-reference/links/create) and related endpoints
41+
42+
### Meetings
43+
- Added `sync_metadata` property to meeting objects in [`/meetings.create`](/beta/api-reference/meetings/create) and related endpoints
44+
45+
### Opportunities
46+
- Added `contacts` property to opportunity objects in work-related endpoints
47+
48+
### SLAs
49+
- Added `subtype` and `tier` properties to account selector in [`/slas.create`](/beta/api-reference/slas/create) and [`/slas.update`](/beta/api-reference/slas/update)
50+
51+
### Webhooks
52+
- Added `sla_tracker_fetched` event type to [`/webhooks.create`](/beta/api-reference/webhooks/create), [`/webhooks.update`](/beta/api-reference/webhooks/update) and related endpoints
53+
54+
### Widgets
55+
- Added `combination` visualization type
56+
- Removed `percentage_precision` from PVP metric configuration
57+
58+
## Schema Changes
59+
60+
### Custom Schema Spec
61+
Added `drop` property to `custom_schema_spec` in multiple endpoints including:
62+
- Account endpoints
63+
- Article endpoints
64+
- Chat endpoints
65+
- Code change endpoints
66+
- Conversation endpoints
67+
- Custom object endpoints
68+
- Dev user endpoints
69+
- Incident endpoints
70+
- Meeting endpoints
71+
- Part endpoints
72+
- Work endpoints
73+
74+
### Meeting Summary
75+
Added new subschema to meeting summary objects affecting multiple endpoints that reference meetings
76+
77+
### Link Summary
78+
Modified link summary schema to support custom link types across multiple endpoints
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## New Endpoints
2+
3+
### Chats
4+
- [`/chats.update`](/beta/api-reference/chats/update): Updates a chat (DM)
5+
6+
### Record Templates
7+
- [`/record-templates.get`](/beta/api-reference/record-templates/record-template-get-post): Gets a record template's information
8+
9+
### Service Accounts
10+
- [`/service-accounts.update`](/beta/api-reference/service-accounts/update): Updates a service account's information
11+
12+
### Subscribers
13+
- [`/subscribers.list`](/beta/api-reference/subscribers/list-post): Lists subscribers for an object
14+
15+
### Surveys
16+
- [`/surveys.get`](/beta/api-reference/surveys/get-post): Gets the information for a survey
17+
18+
## Modified Endpoints
19+
20+
### Accounts
21+
- Adds `primary_account` field, which is set when the account is merged with another
22+
23+
### AI Agents
24+
- Adds `suggestions` agent response type to the `ai_agent_response` webhook event
25+
26+
### Rev Orgs
27+
- Adds `primary_rev_org` field, which is set when the Rev org (workspace) is merged with another
28+
29+
### Users
30+
- Adds `primary_identity` field, which is set when the user is merged with another

0 commit comments

Comments
 (0)